Introduce common/errors.h
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ef87c8bb
GB
12014-08-19 Tom Tromey <tromey@redhat.com>
2 Gary Benson <gbenson@redhat.com>
3
4 * Makefile.in (SFILES): Add common/errors.c.
5 (OBS): Add errors.o.
6 (IPA_OBS): Add errors-ipa.o.
7 (errors.o): New rule.
8 (errors-ipa.o): Likewise.
9 * utils.h (perror_with_name, error, warning): Don't declare.
10 * utils.c (warning): Renamed and rewritten as...
11 (vwarning): New function.
12 (error): Renamed and rewritten as...
13 (verror): New function.
14 (internal_error): Renamed and rewritten as...
15 (internal_verror): New function.
16
bb974a24
GB
172014-08-07 Gary Benson <gbenson@redhat.com>
18
19 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
20 * configure: Regenerate.
21 * config.in: Likewise.
22 * server.h: Do not include errno.h.
23 * event-loop.c: Likewise.
24 * hostio-errno.c: Likewise.
25 * linux-low.c: Likewise.
26 * remote-utils.c: Likewise.
27 * spu-low.c: Likewise.
28 * utils.c: Likewise.
29 * gdbreplay.c: Unconditionally include errno.h.
30
6d3d12eb
GB
312014-08-07 Gary Benson <gbenson@redhat.com>
32
33 * server.h: Do not include string.h.
34 * event-loop.c: Likewise.
35 * linux-low.c: Likewise.
36 * regcache.c: Likewise.
37 * remote-utils.c: Likewise.
38 * spu-low.c: Likewise.
39 * utils.c: Likewise.
40
dccbb609
GB
412014-08-07 Gary Benson <gbenson@redhat.com>
42
43 * server.h: Do not include gdb_assert.h.
44
e76df0d0
GB
452014-08-07 Gary Benson <gbenson@redhat.com>
46
47 * server.h: Do not include common-utils.h.
48
4cb9c816
GB
492014-08-07 Gary Benson <gbenson@redhat.com>
50
51 * server.h: Do not include ptid.h.
52 * notif.h: Likewise.
53
3995eeee
GB
542014-08-07 Gary Benson <gbenson@redhat.com>
55
56 * server.h: Do not include gdb_locale.h.
57
cb9f1a9b
GB
582014-08-07 Gary Benson <gbenson@redhat.com>
59
60 * server.h: Do not include gdb/signals.h.
61 * win32-low.c: Likewise.
62
a5fceff8
GB
632014-08-07 Gary Benson <gbenson@redhat.com>
64
65 * server.h: Do not include pathmax.h.
66
b9391142
GB
672014-08-07 Gary Benson <gbenson@redhat.com>
68
69 * server.h: Do not include libiberty.h.
70 * linux-bfin-low.c: Likewise.
71
0e443c87
GB
722014-08-07 Gary Benson <gbenson@redhat.com>
73
74 * server.h: Do not include ansidecl.h.
75
8ebb3f56
GB
762014-08-07 Gary Benson <gbenson@redhat.com>
77
78 * linux-x86-low.c: Do not include stddef.h.
79 * lynx-ppc-low.c: Likewise.
80 * tracepoint.c: Likewise.
81
8980bdf6
GB
822014-08-07 Gary Benson <gbenson@redhat.com>
83
84 * server.h: Do not include stdarg.h.
85 * nto-low.c: Likewise.
86
d7096f71
GB
872014-08-07 Gary Benson <gbenson@redhat.com>
88
89 * server.h: Do not include stdlib.h.
90 * inferiors.c: Likewise.
91 * linux-low.c: Likewise.
92 * regcache.c: Likewise.
93 * spu-low.c: Likewise.
94 * tracepoint.c: Likewise.
95 * utils.c: Likewise.
96
d02f550d
GB
972014-08-07 Gary Benson <gbenson@redhat.com>
98
99 * server.h: Do not include stdio.h.
100 * linux-low.c: Likewise.
101 * remote-utils.c: Likewise.
102 * spu-low.c: Likewise.
103 * utils.c: Likewise.
104 * wincecompat.c: Likewise.
105
87f6c4e3
GB
1062014-08-06 Gary Benson <gbenson@redhat.com>
107
108 * regcache.c (init_register_cache): Move conditionals inside if.
109
7089dca4
GB
1102014-08-06 Gary Benson <gbenson@redhat.com>
111
112 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
113
462f517e
GB
1142014-07-31 Gary Benson <gbenson@redhat.com>
115
116 * ax.h: Do not include server.h.
117 * gdbthread.h: Likewise.
118 * lynx-low.h: Likewise.
119 * notif.h: Likewise.
120
976411d6
GB
1212014-07-30 Gary Benson <gbenson@redhat.com>
122
123 * server.h: Include common-defs.h.
124 Do not include config.h or build-gnulib-gdbserver/config.h.
125
d41f6d8e
GB
1262014-07-30 Gary Benson <gbenson@redhat.com>
127
128 * hostio-errno.c: Move server.h to top of includes list.
129 * inferiors.c: Likewise.
130 * linux-x86-low.c: Likewise.
131 * notif.c: Include server.h.
132
314c6a35
TT
1332014-07-24 Tom Tromey <tromey@redhat.com>
134 Gary Benson <gbenson@redhat.com>
135
136 * server.h (CORE_ADDR): Now unsigned.
137
69ff6be5
PA
1382014-07-16 Pedro Alves <palves@redhat.com>
139
140 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
141
ce9e3fe7
PA
1422014-07-15 Pedro Alves <palves@redhat.com>
143
144 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
145 copy.
146
e76126e8
PA
1472014-07-11 Pedro Alves <palves@redhat.com>
148
149 * linux-low.c (kill_wait_lwp): New function, based on
150 kill_one_lwp_callback, but use my_waitpid directly.
151 (kill_one_lwp_callback, linux_kill): Use it.
152
8e9db26e
PA
1532014-06-23 Pedro Alves <palves@redhat.com>
154
155 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
156 before setting DR0..DR3.
157
698b3e08
GB
1582014-06-20 Gary Benson <gbenson@redhat.com>
159
160 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
161 * configure: Regenerated.
162 * config.in: Likewise.
163
125f8a3d
GB
1642014-06-20 Gary Benson <gbenson@redhat.com>
165
166 * Makefile.in (SFILES): Update locations for files moved
167 from common to nat.
168 (object file files): Reordered.
169
42995dbd
GB
1702014-06-20 Gary Benson <gbenson@redhat.com>
171
172 * i386-low.h (i386_dr_low_can_set_addr): Removed.
173 (i386_dr_low_set_addr): Likewise.
174 (i386_dr_low_get_addr): Likewise.
175 (i386_dr_low_can_set_control): Likewise.
176 (i386_dr_low_set_control): Likewise.
177 (i386_dr_low_get_control): Likewise.
178 (i386_dr_low_get_status): Likewise.
179 (i386_get_debug_register_length): Likewise.
180 * linux-x86-low.c (i386_dr_low_set_addr):
181 Changed signature. Made static.
182 (i386_dr_low_get_addr): Likewise.
183 (i386_dr_low_set_control): Likewise.
184 (i386_dr_low_get_control): Likewise.
185 (i386_dr_low_get_status): Likewise.
186 (i386_dr_low): New global variable.
187 * win32-i386-low.c (i386_dr_low_set_addr):
188 Changed signature. Made static.
189 (i386_dr_low_get_addr): Likewise.
190 (i386_dr_low_set_control): Likewise.
191 (i386_dr_low_get_control): Likewise.
192 (i386_dr_low_get_status): Likewise.
193 (i386_dr_low): New global variable.
194
e1d2394b
MS
1952014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
196
197 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
198 * Makefile.in (AR, AR_FLAGS): Define.
199 * configure: Regenerate.
200
3a8ee006
GB
2012014-06-19 Gary Benson <gbenson@redhat.com>
202
203 * Makefile.in (i386-dregs.o): New rule.
204 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
205 * i386-low.c (target.h): Remove include.
206 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
207 (DR_CONTROL_SHIFT): Likewise.
208 (DR_CONTROL_SIZE): Likewise.
209 (DR_RW_EXECUTE): Likewise.
210 (DR_RW_WRITE): Likewise.
211 (DR_RW_READ): Likewise.
212 (DR_RW_IORW): Likewise.
213 (DR_LEN_1): Likewise.
214 (DR_LEN_2): Likewise.
215 (DR_LEN_4): Likewise.
216 (DR_LEN_8): Likewise.
217 (DR_LOCAL_ENABLE_SHIFT): Likewise.
218 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
219 (DR_ENABLE_SIZE): Likewise.
220 (DR_LOCAL_SLOWDOWN): Likewise.
221 (DR_GLOBAL_SLOWDOWN): Likewise.
222 (DR_CONTROL_RESERVED): Likewise.
223 (I386_DR_CONTROL_MASK): Likewise.
224 (I386_DR_VACANT): Likewise.
225 (I386_DR_LOCAL_ENABLE): Likewise.
226 (I386_DR_GLOBAL_ENABLE): Likewise.
227 (I386_DR_DISABLE): Likewise.
228 (I386_DR_SET_RW_LEN): Likewise.
229 (I386_DR_GET_RW_LEN): Likewise.
230 (I386_DR_WATCH_HIT): Likewise.
231 (i386_wp_op_t): Likewise.
232 (i386_show_dr): Likewise.
233 (i386_length_and_rw_bits): Likewise.
234 (i386_insert_aligned_watchpoint): Likewise.
235 (i386_remove_aligned_watchpoint): Likewise.
236 (i386_handle_nonaligned_watchpoint): Likewise.
237 i386_update_inferior_debug_regs(): Likewise.
238 (i386_dr_insert_watchpoint): Likewise.
239 (i386_dr_remove_watchpoint): Likewise.
240 (i386_dr_region_ok_for_watchpoint): Likewise.
241 (i386_dr_stopped_data_address): Likewise.
242 (i386_dr_stopped_by_watchpoint): Likewise.
243
8f26655c
GB
2442014-06-19 Gary Benson <gbenson@redhat.com>
245
246 * i386-low.c (i386_dr_show): Renamed to
247 i386_show_dr and made static. All uses updated.
248 (i386_dr_length_and_rw_bits): Renamed to
249 i386_length_and_rw_bits and made static.
250 All uses updated.
251 (i386_dr_insert_aligned_watchpoint): Renamed to
252 i386_insert_aligned_watchpoint and made static.
253 All uses updated.
254 (i386_dr_remove_aligned_watchpoint): Renamed to
255 i386_remove_aligned_watchpoint and made static.
256 All uses updated.
257 (i386_dr_update_inferior_debug_regs): Renamed to
258 i386_update_inferior_debug_regs and made static.
259 All uses updated.
260
b9228891
GB
2612014-06-18 Gary Benson <gbenson@redhat.com>
262
5171def3
GB
263 * i386-low.h (i386_dr_low_can_set_addr): New macro.
264 (i386_dr_low_can_set_control): Likewise.
265 (i386_get_debug_register_length): Likewise.
266 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
267 (i386_dr_low_can_set_control): Likewise.
268 (i386_get_debug_register_length): Likewise.
269
2702014-06-17 Gary Benson <gbenson@redhat.com>
271
b9228891
GB
272 * i386-low.h (i386-dregs.h): New include.
273 (DR_FIRSTADDR): Now in i386-dregs.h.
274 (DR_LASTADDR): Likewise.
275 (DR_NADDR): Likewise.
276 (DR_STATUS): Likewise.
277 (DR_CONTROL): Likewise.
278 (i386_debug_reg_state): Likewise.
279 (i386_dr_insert_watchpoint): Likewise.
280 (i386_dr_remove_watchpoint): Likewise.
281 (i386_dr_region_ok_for_watchpoint): Likewise.
282 (i386_dr_stopped_data_address): Likewise.
283 (i386_dr_stopped_by_watchpoint): Likewise.
284 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
285
4be83cc2
GB
2862014-06-18 Gary Benson <gbenson@redhat.com>
287
288 * i386-low.h (i386_low_insert_watchpoint): Renamed to
289 i386_dr_insert_watchpoint.
290 (i386_low_remove_watchpoint): Renamed to
291 i386_dr_remove_watchpoint.
292 (i386_low_region_ok_for_watchpoint): Renamed to
293 i386_dr_region_ok_for_watchpoint.
294 (i386_low_stopped_data_address): Renamed to
295 i386_dr_stopped_data_address.
296 (i386_low_stopped_by_watchpoint): Renamed to
297 i386_dr_stopped_by_watchpoint.
298 * i386-low.c (i386_show_dr): Renamed to
299 i386_dr_show and made nonstatic. All uses updated.
300 (i386_length_and_rw_bits): Renamed to
301 i386_dr_length_and_rw_bits and made nonstatic.
302 All uses updated.
303 (i386_insert_aligned_watchpoint): Renamed to
304 i386_dr_insert_aligned_watchpoint and made nonstatic.
305 All uses updated.
306 (i386_remove_aligned_watchpoint): Renamed to
307 i386_dr_remove_aligned_watchpoint and made nonstatic.
308 All uses updated.
309 (i386_update_inferior_debug_regs): Renamed to
310 i386_dr_update_inferior_debug_regs and made nonstatic.
311 All uses updated.
312 (i386_low_insert_watchpoint): Renamed to
313 i386_dr_insert_watchpoint. All uses updated.
314 (i386_low_remove_watchpoint): Renamed to
315 i386_dr_remove_watchpoint. All uses updated.
316 (i386_low_region_ok_for_watchpoint): Renamed to
317 i386_dr_region_ok_for_watchpoint. All uses updated.
318 (i386_low_stopped_data_address): Renamed to
319 i386_dr_stopped_data_address. All uses updated.
320 (i386_low_stopped_by_watchpoint): Renamed to
321 i386_dr_stopped_by_watchpoint. All uses updated.
322
131aa0d4
GB
3232014-06-18 Gary Benson <gbenson@redhat.com>
324
325 * i386-low.c (i386_dr_low_can_set_addr): New macro.
326 (i386_dr_low_can_set_control): Likewise.
327 (i386_insert_aligned_watchpoint): New check.
328
d9305f7f
GB
3292014-06-18 Gary Benson <gbenson@redhat.com>
330
331 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
332 Renamed to state.
333
e927c9fc
GB
3342014-06-18 Gary Benson <gbenson@redhat.com>
335
336 * i386-low.c (i386_length_and_rw_bits): Use internal_error
337 instead of fatal and error.
338 (i386_handle_nonaligned_watchpoint): Likewise.
339
1b6d4134
GB
3402014-06-18 Gary Benson <gbenson@redhat.com>
341
342 * i386-low.c (i386_get_debug_register_length): New macro.
343 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
344 (i386_show_dr): Use debug_printf instead of fprintf. Use
345 phex to format values.
346
6e62758f
GB
3472014-06-18 Gary Benson <gbenson@redhat.com>
348
349 * i386-low.h: Comment changes.
350 * i386-low.c: Likewise.
351
fc6e2f03
GB
3522014-06-18 Gary Benson <gbenson@redhat.com>
353
354 * i386-low.c: Whitespace changes.
355
f9d1eeed
TT
3562014-06-12 Tom Tromey <tromey@redhat.com>
357
358 * utils.c (freeargv): Remove.
359
0b04e523
TT
3602014-06-12 Tom Tromey <tromey@redhat.com>
361
362 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
363 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
364 (parse_debug_format_options): Likewise.
365 (gdbserver_usage): Likewise.
366 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
367 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
368 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
369 against libiberty.
370 ($(LIBGNU)): Depend on libiberty.
371 (all-lib): Recurse into all subdirs.
372 (install-only): Invoke "install" target in subdirs.
373 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
374 targets.
375 * configure: Rebuild.
376 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
377 for vasprintf, vsnprintf, or gettimeofday.
378 * configure.srv: Don't add safe-ctype.o or lbasename.o to
379 srv_tgtobj.
380
270c9937
JB
3812014-06-05 Joel Brobecker <brobecker@adacore.com>
382
383 * development.sh: Delete.
384 * Makefile.in (config.status): Adjust dependency on development.sh.
385 * configure.ac: Adjust development.sh source call.
386 * configure: Regenerate.
387
0a261ed8
PA
3882014-06-02 Pedro Alves <palves@redhat.com>
389
390 * ax.c (gdb_free_agent_expr): New function.
391 * ax.h (gdb_free_agent_expr): New declaration.
392 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
393 list.
394 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
395 static.
396 (clear_breakpoint_conditions_and_commands): New function.
397 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
398 (clear_breakpoint_conditions_and_commands): New declaration.
399
e9dae05e
RR
4002014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
401
402 * linux-aarch64-low.c (asm/ptrace.h): Include.
403
5876f503
JK
4042014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
405
406 Fix TLS access for -static -pthread.
407 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
408 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
409 (thread_db_load_search, try_thread_db_load_1): Initialize it.
410
802e8e6d
PA
4112014-05-20 Pedro Alves <palves@redhat.com>
412
413 * linux-aarch64-low.c (aarch64_insert_point)
414 (aarch64_remove_point): No longer check whether the type is
415 supported here. Adjust to new interface.
416 (the_low_target): Install aarch64_supports_z_point_type as
417 supports_z_point_type method.
418 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
419 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
420 instead of a Z packet char. Adjust.
421 (arm_supports_z_point_type): New function.
422 (arm_insert_point, arm_remove_point): Adjust to new interface.
423 (the_low_target): Install arm_supports_z_point_type.
424 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
425 (cris_insert_point, cris_remove_point): Adjust to new interface.
426 Don't check whether the type is supported here.
427 (the_low_target): Install cris_supports_z_point_type.
428 * linux-low.c (linux_supports_z_point_type): New function.
429 (linux_insert_point, linux_remove_point): Adjust to new interface.
430 * linux-low.h (struct linux_target_ops) <insert_point,
431 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
432 raw_breakpoint pointer parameter.
433 <supports_z_point_type>: New method.
434 * linux-mips-low.c (mips_supports_z_point_type): New function.
435 (mips_insert_point, mips_remove_point): Adjust to new interface.
436 Use mips_supports_z_point_type.
437 (the_low_target): Install mips_supports_z_point_type.
438 * linux-ppc-low.c (the_low_target): Install NULL as
439 supports_z_point_type method.
440 * linux-s390-low.c (the_low_target): Install NULL as
441 supports_z_point_type method.
442 * linux-sparc-low.c (the_low_target): Install NULL as
443 supports_z_point_type method.
444 * linux-x86-low.c (x86_supports_z_point_type): New function.
445 (x86_insert_point): Adjust to new insert_point interface. Use
446 insert_memory_breakpoint. Adjust to new
447 i386_low_insert_watchpoint interface.
448 (x86_remove_point): Adjust to remove_point interface. Use
449 remove_memory_breakpoint. Adjust to new
450 i386_low_remove_watchpoint interface.
451 (the_low_target): Install x86_supports_z_point_type.
452 * lynx-low.c (lynx_target_ops): Install NULL as
453 supports_z_point_type callback.
454 * nto-low.c (nto_supports_z_point_type): New.
455 (nto_insert_point, nto_remove_point): Adjust to new interface.
456 (nto_target_ops): Install nto_supports_z_point_type.
457 * mem-break.c: Adjust intro comment.
458 (struct raw_breakpoint) <raw_type, size>: New fields.
459 <inserted>: Update comment.
460 <shlib_disabled>: Delete field.
461 (enum bkpt_type) <gdb_breakpoint>: Delete value.
462 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
463 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
464 (raw_bkpt_type_to_target_hw_bp_type): New function.
465 (find_enabled_raw_code_breakpoint_at): New function.
466 (find_raw_breakpoint_at): New type and size parameters. Use them.
467 (insert_memory_breakpoint): New function, based off
468 set_raw_breakpoint_at.
469 (remove_memory_breakpoint): New function.
470 (set_raw_breakpoint_at): Reimplement.
471 (set_breakpoint): New, based on set_breakpoint_at.
472 (set_breakpoint_at): Reimplement.
473 (delete_raw_breakpoint): Go through the_target->remove_point
474 instead of assuming memory breakpoints.
475 (find_gdb_breakpoint_at): Delete.
476 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
477 (find_gdb_breakpoint): New function.
478 (set_gdb_breakpoint_at): Delete.
479 (z_type_supported): New function.
480 (set_gdb_breakpoint_1): New function, loosely based off
481 set_gdb_breakpoint_at.
482 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
483 (delete_gdb_breakpoint_at): Delete.
484 (delete_gdb_breakpoint_1): New function, loosely based off
485 delete_gdb_breakpoint_at.
486 (delete_gdb_breakpoint): New function.
487 (clear_gdb_breakpoint_conditions): Rename to ...
488 (clear_breakpoint_conditions): ... this. Don't handle a NULL
489 breakpoint.
490 (add_condition_to_breakpoint): Make static.
491 (add_breakpoint_condition): Take a struct breakpoint pointer
492 instead of an address. Adjust.
493 (gdb_condition_true_at_breakpoint): Rename to ...
494 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
495 z_type parameter.
496 (gdb_condition_true_at_breakpoint): Reimplement.
497 (add_breakpoint_commands): Take a struct breakpoint pointer
498 instead of an address. Adjust.
499 (gdb_no_commands_at_breakpoint): Rename to ...
500 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
501 parameter. Return true if no breakpoint was found. Change debug
502 output.
503 (gdb_no_commands_at_breakpoint): Reimplement.
504 (run_breakpoint_commands): Rename to ...
505 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
506 and change return type to boolean.
507 (run_breakpoint_commands): New function.
508 (gdb_breakpoint_here): Also check for Z1 breakpoints.
509 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
510 breakpoint. Go through the_target->remove_point instead of
511 assuming memory breakpoint.
512 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
513 software and hardware breakpoints.
514 (reinsert_raw_breakpoint): Go through the_target->insert_point
515 instead of assuming memory breakpoint.
516 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
517 software and hardware breakpoints.
518 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
519 Check both software and hardware breakpoints.
520 (validate_inserted_breakpoint): Assert the breakpoint is a
521 software breakpoint. Set the inserted flag to -1 instead of
522 setting shlib_disabled.
523 (delete_disabled_breakpoints): Adjust.
524 (validate_breakpoints): Only validate software breakpoints.
525 Adjust to inserted flag change.
526 (check_mem_read, check_mem_write): Skip breakpoint types other
527 than software breakpoints. Adjust to inserted flag change.
528 * mem-break.h (enum raw_bkpt_type): New enum.
529 (raw_breakpoint, struct process_info): Forward declare.
530 (Z_packet_to_target_hw_bp_type): Delete declaration.
531 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
532 (set_gdb_breakpoint, delete_gdb_breakpoint)
533 (clear_breakpoint_conditions): New declarations.
534 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
535 (breakpoint_inserted_here): Update comment.
536 (add_breakpoint_condition, add_breakpoint_commands): Replace
537 address parameter with a breakpoint pointer parameter.
538 (gdb_breakpoint_here): Update comment.
539 (delete_gdb_breakpoint_at): Delete.
540 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
541 * server.c (process_point_options): Take a struct breakpoint
542 pointer instead of an address. Adjust.
543 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
544 delete_gdb_breakpoint.
545 * spu-low.c (spu_target_ops): Install NULL as
546 supports_z_point_type method.
547 * target.h: Include mem-break.h.
548 (struct target_ops) <prepare_to_access_memory>: Update comment.
549 <supports_z_point_type>: New field.
550 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
551 instead of a char. Also take a raw breakpoint pointer.
552 * win32-arm-low.c (the_low_target): Install NULL as
553 supports_z_point_type.
554 * win32-i386-low.c (i386_supports_z_point_type): New function.
555 (i386_insert_point, i386_remove_point): Adjust to new interface.
556 (the_low_target): Install i386_supports_z_point_type.
557 * win32-low.c (win32_supports_z_point_type): New function.
558 (win32_insert_point, win32_remove_point): Adjust to new interface.
559 (win32_target_ops): Install win32_supports_z_point_type.
560 * win32-low.h (struct win32_target_ops):
561 <supports_z_point_type>: New method.
562 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
563 instead of a char. Also take a raw breakpoint pointer.
564
932539e3
PA
5652014-05-20 Pedro Alves <palves@redhat.com>
566
567 * mem-break.h: Include break-common.h.
568 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
569 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
570 (Z_packet_to_target_hw_bp_type): New declaration.
571 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
572 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
573 (Z_PACKET_ACCESS_WP): Delete macros.
574 (Z_packet_to_hw_type): Delete function.
575 * i386-low.h: Don't include break-common.h here.
576 (Z_packet_to_hw_type): Delete declaration.
577 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
578 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
579 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
580 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
581 * linux-aarch64-low.c: Don't include break-common.h here.
582 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
583 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
584 (Z_packet_to_target_hw_bp_type): Delete function.
585 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
586 function.
587 (mips_insert_point, mips_remove_point): Use
588 Z_packet_to_target_hw_bp_type.
589
4ff0d3d8
PA
5902014-05-20 Pedro Alves <palves@redhat.com>
591
592 * linux-aarch64-low.c: Include break-common.h.
593 (enum target_point_type): Delete.
594 (Z_packet_to_point_type): Rename to ...
595 (Z_packet_to_target_hw_bp_type): ... this, and return a
596 target_hw_bp_type instead.
597 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
598 instead of an enum target_point_type.
599 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
600 breakpoint type.
601 (aarch64_dr_state_insert_one_point)
602 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
603 (aarch64_handle_aligned_watchpoint)
604 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
605 Take an enum target_hw_bp_type instead of an enum
606 target_point_type.
607 (aarch64_supports_z_point_type): New function.
608 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
609 use Z_packet_to_target_hw_bp_type.
610
786dc519
JB
6112014-05-20 Joel Brobecker <brobecker@adacore.com>
612
613 * configure.ac: Only use -Werror by default when DEVELOPMENT
614 is true.
615 * configure: Regenerate.
616
9e0aa64f
JK
6172014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
618
619 Fix gdbserver qGetTLSAddr for x86_64 -m32.
620 * linux-x86-low.c (X86_64_USER_REGS): New.
621 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
622
2b577b92
YQ
6232014-04-28 Yao Qi <yao@codesourcery.com>
624
625 * Makefile.in (i386-avx512.c): Fix the typo of generated file
626 name.
627
94611da2
PA
6282014-04-25 Pedro Alves <palves@redhat.com>
629
630 PR server/16255
631 * linux-low.c (linux_attach_fail_reason_string): New function.
632 (linux_attach_lwp): Delete.
633 (linux_attach_lwp_1): Rename to ...
634 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
635 argument. Remove "initial" parameter. Return int instead of
636 void. Don't error or warn here.
637 (linux_attach): Adjust to call linux_attach_lwp. Call error on
638 failure to attach to the tgid. Call warning when failing to
639 attach to an lwp.
640 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
641 argument. Remove "initial" parameter. Return int instead of
642 void. Don't error or warn here.
643 (linux_attach_fail_reason_string): New declaration.
644 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
645 interface change. Use linux_attach_fail_reason_string.
646
01f9f808
MS
6472014-04-24 Michael Sturm <michael.sturm@mintel.com>
648 Walfred Tedeschi <walfred.tedeschi@intel.com>
649
650 * Makefile.in: Added rules to handle new files
651 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
652 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
653 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
654 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
655 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
656 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
657 x32-avx512-linux.o.
658 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
659 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
660 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
661 i386/x32-avx512.xml.
662 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
663 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
664 i386/x32-avx512-linux.xml.
665 * i387-fp.c (num_avx512_k_registers): New constant for number
666 of K registers.
667 (num_avx512_zmmh_low_registers): New constant for number of
668 lower ZMM registers (0-15).
669 (num_avx512_zmmh_high_registers): New constant for number of
670 higher ZMM registers (16-31).
671 (num_avx512_ymmh_registers): New contant for number of higher
672 YMM registers (ymm16-31 added by avx521 on x86_64).
673 (num_avx512_xmm_registers): New constant for number of higher
674 XMM registers (xmm16-31 added by AVX512 on x86_64).
675 (struct i387_xsave): Add space for AVX512 registers.
676 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
677 Add code to handle AVX512 registers.
678 (i387_xsave_to_cache): Add code to handle AVX512 registers.
679 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
680 prototypei from generated file.
681 (tdesc_amd64_avx512_linux): Likewise.
682 (init_registers_x32_avx512_linux): Likewise.
683 (tdesc_x32_avx512_linux): Likewise.
684 (init_registers_i386_avx512_linux): Likewise.
685 (tdesc_i386_avx512_linux): Likewise.
686 (x86_64_regmap): Add AVX512 registers.
687 (x86_linux_read_description): Add code to handle AVX512 XSTATE
688 mask.
689 (initialize_low_arch): Add code to initialize AVX512 registers.
690
51aa91f9
PA
6912014-04-23 Pedro Alves <palves@redhat.com>
692
693 * mem-break.c (find_gdb_breakpoint_at): Make static.
694 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
695
a4165e94
PA
6962014-04-23 Pedro Alves <palves@redhat.com>
697
698 * i386-low.c: Don't include break-common.h here.
699 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
700 prototype to take target_hw_bp_type as argument instead of a Z
701 packet char.
702 * i386-low.h: Include break-common.h here.
703 (Z_packet_to_hw_type): Declare.
704 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
705 prototypes.
706 * linux-x86-low.c (x86_insert_point): Convert the packet number to
707 a target_hw_bp_type before calling i386_low_insert_watchpoint.
708 (x86_remove_point): Convert the packet number to a
709 target_hw_bp_type before calling i386_low_remove_watchpoint.
710 * win32-i386-low.c (i386_insert_point): Convert the packet number
711 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
712 (i386_remove_point): Convert the packet number to a
713 target_hw_bp_type before calling i386_low_remove_watchpoint.
714
b8acf843
PA
7152014-04-23 Pedro Alves <palves@redhat.com>
716
717 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
718
d708bcd1
PA
7192014-04-10 Pedro Alves <palves@redhat.com>
720
721 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
722 Check if the condition or command is NULL before checking if the
723 breakpoint is known. On success, return true.
724 * mem-break.h (add_breakpoint_condition): Document return.
725 (add_breakpoint_commands): Add describing comment.
726 * server.c (skip_to_semicolon): New function.
727 (process_point_options): Use it.
728
2eec7d5b
PA
7292014-04-09 Pedro Alves <palves@redhat.com>
730
731 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
732 to lwpid_of.
733
fa96cb38
PA
7342014-02-27 Pedro Alves <palves@redhat.com>
735
736 PR 12702
737 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
738 macros.
739 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
740 output.
741 (last_thread_of_process_p): Take a PID argument instead of a
742 thread pointer.
743 (linux_wait_for_lwp): Delete.
744 (num_lwps, check_zombie_leaders, not_stopped_callback): New
745 functions.
746 (linux_low_filter_event): New function, party factored out from
747 linux_wait_for_event.
748 (linux_wait_for_event): Rename to ...
749 (linux_wait_for_event_filtered): ... this. Add new filter ptid
750 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
751 sigsuspend. Check for zombie leaders.
752 (linux_wait_for_event): Reimplement as wrapper around
753 linux_wait_for_event_filtered.
754 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
755 a normal or signal exit is seen, it's the whole process exiting.
756 (wait_for_sigstop): No longer a for_each_inferior callback.
757 Rewrite on top of linux_wait_for_event_filtered.
758 (stop_all_lwps): Call wait_for_sigstop directly.
759 * server.c (resume, handle_target_event): Handle
760 TARGET_WAITKIND_NO_RESUMED.
761
d763de10
JB
7622014-02-26 Joel Brobecker <brobecker@adacore.com>
763
764 * win32-low.c (psapi_get_dll_name,
765 * win32_CreateToolhelp32Snapshot): Delete.
766 (win32_CreateToolhelp32Snapshot, win32_Module32First)
767 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
768 Delete.
769 (handle_load_dll): Add function description.
770 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
771
850a0f76
JB
7722014-02-26 Joel Brobecker <brobecker@adacore.com>
773
774 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
775 Add comment.
776 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
777 base address when calling win32_add_one_solib.
778 (handle_load_dll): Delete local variable load_addr.
779 Remove 0x1000 offset applied to DLL base address when calling
780 win32_add_one_solib.
781 (handle_unload_dll): Add comment.
782
f25b3fc3
JB
7832014-02-26 Joel Brobecker <brobecker@adacore.com>
784
785 * win32-low.c (win32_add_all_dlls): Renames
786 win32_ensure_ntdll_loaded. Rewrite function documentation.
787 Adjust implementation to always load all DLLs.
788 Add 0x1000 offset to DLL base address when calling
789 win32_add_one_solib.
790 (child_initialization_done): New static global.
791 (do_initial_child_stuff): Set child_initialization_done to
792 zero during child initialization, and 1 after. Replace call
793 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
794 Add comment.
795 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
796 (handle_unload_dll): Add function documentation.
797 (get_child_debug_event): Ignore load and unload DLL events
798 during child initialization.
799
d86d4aaf
DE
8002014-02-20 Doug Evans <dje@google.com>
801
3bc32da3 802 Remove global all_lwps.
d86d4aaf
DE
803 * inferiors.h (ptid_of): Move here from linux-low.h.
804 (pid_of, lwpid_of): Ditto.
805 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
806 parameter is a struct thread_info * now.
807 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
808 directly. Pass &all_threads to find_inferior instead of &all_lwps.
809 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
810 directly.
811 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
812 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
813 * linux-arm-low.c (update_registers_callback): Update, "entry"
814 parameter is a struct thread_info * now.
815 Fetch lwpid from current_inferior directly.
816 (arm_insert_point): Pass &all_threads to find_inferior instead of
817 &all_lwps.
818 (arm_remove_point): Ditto.
819 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
820 (arm_prepare_to_resume): Fetch pid from thread.
821 (arm_read_description): Fetch lwpid from current_inferior directly.
822 * linux-low.c (all_lwps): Delete.
823 (delete_lwp): Delete call to remove_inferior.
824 (handle_extended_wait): Fetch lwpid from thread.
825 (add_lwp): Don't set lwp->entry.id. Remove call to
826 add_inferior_to_list.
827 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
828 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
829 (kill_one_lwp_callback): Ditto.
830 (linux_kill): Don't dereference NULL pointer.
831 Fetch ptid,lwpid from thread.
832 (get_detach_signal): Fetch ptid from thread.
833 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
834 Simplify call to regcache_invalidate_thread.
835 (delete_lwp_callback): Update, "entry" parameter is a
836 struct thread_info * now. Fetch pid from thread.
837 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
838 (status_pending_p_callback): Update, "entry" parameter is a
839 struct thread_info * now. Fetch ptid from thread.
840 (find_lwp_pid): Update, "entry" parameter is a
841 struct thread_info * now.
842 (linux_wait_for_lwp): Fetch pid from thread.
843 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
844 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
845 (enqueue_one_deferred_signal): Fetch lwpid from thread.
846 (dequeue_one_deferred_signal): Ditto.
847 (cancel_breakpoint): Fetch ptid from current_inferior.
848 (linux_wait_for_event): Pass &all_threads to find_inferior,
849 not &all_lwps. Fetch ptid, lwpid from thread.
850 (count_events_callback): Update, "entry" parameter is a
851 struct thread_info * now.
852 (select_singlestep_lwp_callback): Ditto.
853 (select_event_lwp_callback): Ditto.
854 (cancel_breakpoints_callback): Ditto.
855 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
856 not &all_lwps.
857 (select_event_lwp): Ditto. Fetch ptid from event_thread.
858 (unsuspend_one_lwp): Update, "entry" parameter is a
859 struct thread_info * now.
860 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
861 not &all_lwps.
862 (linux_stabilize_threads): Ditto. And for for_each_inferior.
863 Fetch lwpid from thread, not lwp.
864 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
865 Pass &all_threads to find_inferior, not &all_lwps.
866 (send_sigstop): Fetch lwpid from thread, not lwp.
867 (send_sigstop_callback): Update, "entry" parameter is a
868 struct thread_info * now.
869 (suspend_and_send_sigstop_callback): Ditto.
870 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
871 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
872 struct thread_info * now.
873 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
874 from thread, lwp.
875 (lwp_running): Update, "entry" parameter is a
876 struct thread_info * now.
877 (stop_all_lwps): Fetch ptid from thread.
878 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
879 (linux_resume_one_lwp): Fetch lwpid from thread.
880 (linux_set_resume_request): Update, "entry" parameter is a
881 struct thread_info * now. Fetch pid, lwpid from thread.
882 (resume_status_pending_p): Update, "entry" parameter is a
883 struct thread_info * now.
884 (need_step_over_p): Ditto. Fetch lwpid from thread.
885 (start_step_over): Fetch lwpid from thread.
886 (linux_resume_one_thread): Update, "entry" parameter is a
887 struct thread_info * now. Fetch lwpid from thread.
888 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
889 (proceed_one_lwp): Update, "entry" parameter is a
890 struct thread_info * now. Fetch lwpid from thread.
891 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
892 struct thread_info * now.
893 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
894 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
895 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
896 directly.
897 (regsets_store_inferior_registers): Ditto.
898 (fetch_register, store_register): Ditto.
899 (linux_read_memory, linux_write_memory): Ditto.
900 (linux_request_interrupt): Ditto.
901 (linux_read_auxv): Ditto.
902 (linux_xfer_siginfo): Ditto.
903 (linux_qxfer_spu): Ditto.
904 (linux_qxfer_libraries_svr4): Ditto.
905 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
906 moved to inferiors.h.
907 (get_lwp): Delete.
908 (get_thread_lwp): Update.
909 (struct lwp_info): Delete member "entry". Simplify comment for
910 member "thread".
911 (all_lwps): Delete.
912 * linux-mips-low.c (mips_read_description): Fetch lwpid from
913 current_inferior directly.
914 (update_watch_registers_callback): Update, "entry" parameter is a
915 struct thread_info * now. Fetch pid from thread.
916 (mips_linux_prepare_to_resume): Fetch ptid from thread.
917 (mips_insert_point): Fetch lwpid from current_inferior.
918 Pass &all_threads to find_inferior, not &all_lwps.
919 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
920 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
921 directly.
922 (mips_stopped_data_address): Ditto.
923 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
924 directly.
925 * linux-tile-low.c (tile_arch_setup): Ditto.
926 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
927 (update_debug_registers_callback): Update, "entry" parameter is a
928 struct thread_info * now. Fetch pid from thread.
929 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
930 Pass &all_threads to find_inferior, not &all_lwps.
931 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
932 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
933 Pass &all_threads to find_inferior, not &all_lwps.
934 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
935 (i386_dr_low_get_status): Ditto.
936 (x86_linux_prepare_to_resume): Fetch ptid from thread.
937 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
938 (x86_linux_read_description): Ditto.
939 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
940
3b8361aa
DE
9412014-02-20 Doug Evans <dje@google.com>
942
943 * inferiors.c (get_first_inferior): Fix buglet.
944
f7667f0d
DE
9452014-02-19 Doug Evans <dje@google.com>
946
947 * gdbthread.h (add_thread): Change result type to struct thread_info *.
948 * inferiors.c (add_thread): Change result type to struct thread_info *.
949 All callers updated.
950 (add_lwp): Call add_thread here instead of in callers.
951 All callers updated.
952 * linux-low.h (get_lwp_thread): Rewrite.
953 (struct lwp_info): New member "thread".
954
b3312d80
DE
9552014-02-19 Doug Evans <dje@google.com>
956
957 * linux-low.c (add_lwp): Change result to struct lwp_info *.
958 All callers updated.
959
ecc6f45c
DE
9602014-02-19 Doug Evans <dje@google.com>
961
962 * inferiors.c (add_thread): Fix whitespace.
963
649ebbca
DE
9642014-02-19 Doug Evans <dje@google.com>
965
966 * dll.c (clear_dlls): Replace accessing list implemention details
967 with API function.
968 * gdbthread.h (get_first_thread): Declare.
969 * inferiors.c (for_each_inferior_with_data): New function.
970 (get_first_thread): New function.
971 (find_thread_ptid): Simplify.
972 (get_first_inferior): New function.
973 (clear_list): Delete.
974 (one_inferior_p): New function.
975 (clear_inferior_list): New function.
976 (clear_inferiors): Update.
977 * inferiors.h (for_each_inferior_with_data): Declare.
978 (clear_inferior_list): Declare.
979 (one_inferior_p): Declare.
980 (get_first_inferior): Declare.
981 * linux-low.c (linux_wait_for_event): Replace accessing list
982 implemention details with API function.
983 * server.c (target_running): Ditto.
984 (accumulate_file_name_length): New function.
985 (emit_dll_description): New function.
986 (handle_qxfer_libraries): Replace accessing list implemention
987 details with API function.
988 (handle_qxfer_threads_worker): New function.
989 (handle_qxfer_threads_proper): Replace accessing list implemention
990 details with API function.
991 (handle_query): Ditto.
992 (visit_actioned_threads_callback_ftype): New typedef.
993 (visit_actioned_threads_data): New struct.
994 (visit_actioned_threads): Rewrite to be find_inferior callback.
995 (resume): Call find_inferior.
996 (handle_status): Replace accessing list implemention
997 details with API function.
998 (process_serial_event): Replace accessing list implemention details
999 with API function.
1000 * target.c (set_desired_inferior): Replace accessing list implemention
1001 details with API function.
1002 * tracepoint.c (same_process_p): New function.
1003 (gdb_agent_about_to_close): Replace accessing list implemention
1004 details with API function.
1005 * win32-low.c (child_delete_thread): Replace accessing list
1006 implemention details with API function.
1007 (match_dll_by_basename): New function.
1008 (dll_is_loaded_by_basename): New function.
1009 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1010 details call to dll_is_loaded_by_basename.
1011
80894984
DE
10122014-02-19 Doug Evans <dje@google.com>
1013
1014 * dll.h (struct dll_info): Add comment.
1015 * gdbthread.h (struct thread_info): Add comment.
1016 (current_ptid): Simplify.
1017 * inferiors.c (add_process): Update.
1018 (remove_process): Update.
1019 * inferiors.h (struct process_info): Rename member "head" to "entry".
1020 * linux-low.c (delete_lwp): Update.
1021 (add_lwp): Update.
1022 (last_thread_of_process_p): Update.
1023 (kill_one_lwp_callback, linux_kill): Update.
1024 (status_pending_p_callback): Update.
1025 (wait_for_sigstop): Update. Simplify read of ptid.
1026 (start_step_over): Update.
1027 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1028 (get_lwp_thread): Update.
1029 (struct lwp_info): Rename member "head" to "entry".
1030 * regcache.h (inferior_list_entry): Delete.
1031 * server.c (kill_inferior_callback): Update.
1032 (detach_or_kill_inferior_callback): Update.
1033 (print_started_pid): Update.
1034 (print_attached_pid): Update.
1035 (process_serial_event): Simplify read of ptid.
1036 * thread-db.c (thread_db_create_event): Update.
1037 (thread_db_get_tls_address): Update.
1038 * win32-low.c (current_inferior_ptid): Simplify.
1039
46917d26
TT
10402014-02-19 Tom Tromey <tromey@redhat.com>
1041
1042 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1043 argument.
1044 (target_supports_btrace): Update.
1045
0759a81e
YQ
10462014-02-14 Yao Qi <yao@codesourcery.com>
1047
1048 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1049 (rsp-low-ipa.o): New target.
1050
a7191e8b
TT
10512014-02-12 Tom Tromey <tromey@redhat.com>
1052
1053 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1054 convert_ascii_to_int.
1055 * regcache.c (registers_to_string): Likewise.
1056 * remote-utils.c (decode_M_packet): Likewise.
1057 * server.c (process_serial_event): Likewise.
1058
ff0e980e
TT
10592014-02-12 Tom Tromey <tromey@redhat.com>
1060
1061 * server.c (handle_query, handle_v_run): Use hex2bin, not
1062 unhexify.
1063 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1064
e9371aff
TT
10652014-02-12 Tom Tromey <tromey@redhat.com>
1066
1067 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1068 convert_int_to_ascii.
1069 * regcache.c (registers_to_string, collect_register_as_string):
1070 Likewise.
1071 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1072 Likewise.
1073 * server.c (process_serial_event): Likewise.
1074 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1075 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1076
971dc0b8
TT
10772014-02-12 Tom Tromey <tromey@redhat.com>
1078
1079 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1080 bin2hex, not hexify.
1081 * tracepoint.c (cmd_qtstatus): Likewise.
1082
0a822afb
TT
10832014-02-12 Tom Tromey <tromey@redhat.com>
1084
1085 * remote-utils.c (monitor_output): Pass explicit length to
1086 hexify.
1087
9c3d6531
TT
10882014-02-12 Tom Tromey <tromey@redhat.com>
1089
1090 * tracepoint.c: Include rsp-low.h.
1091 * server.c: Include rsp-low.h.
1092 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1093 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1094 declare.
1095 * remote-utils.c: Include rsp-low.h.
1096 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1097 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1098 (convert_int_to_ascii, convert_ascii_to_int): Move to
1099 common/rsp-low.c.
1100 * regcache.c: Include rsp-low.h.
1101 * ax.c: Include rsp-low.h.
1102 * Makefile.in (SFILES): Add common/rsp-low.c.
1103 (OBS): Add rsp-low.o.
1104 (rsp-low.o): New target.
1105
01fd3ea5
TT
11062014-02-12 Tom Tromey <tromey@redhat.com>
1107
1108 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1109 Include print-utils.h.
1110 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1111 (plongest, thirty_two, phex_nz): Remove.
1112 * Makefile.in (SFILES): Add common/print-utils.c.
1113 (OBS): Add print-utils.o.
1114 (print-utils-ipa.o): New target.
1115 (print-utils.o): New target.
1116 (IPA_OBJS): Add print-utils-ipa.o.
1117
e99dc820
TT
11182014-02-06 Tom Tromey <tromey@redhat.com>
1119
1120 * Makefile.in (SFILES): Fix indentation.
1121
ee1e2d4f
DE
11222014-02-05 Doug Evans <dje@google.com>
1123
1124 * linux-low.c (linux_wait_for_event): Improve comment.
1125 (linux_wait_1): Keep current_inferior in sync with event_child.
1126
f5a02773
DE
11272014-01-22 Doug Evans <dje@google.com>
1128
1129 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1130
87ce2a04
DE
11312014-01-22 Doug Evans <dje@google.com>
1132
1133 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1134 * configure: Regenerate.
1135 * config.in: Regenerate.
1136 * Makefile.in (SFILES): Add debug.c.
1137 (OBS): Add debug.o.
1138 * debug.c: New file.
1139 * debug.h: New file.
1140 * linux-aarch64-low.c (*): Update all debugging printfs to use
1141 debug_printf instead of fprintf.
1142 * linux-arm-low.c (*): Ditto.
1143 * linux-cris-low.c (*): Ditto.
1144 * linux-crisv32-low.c (*): Ditto.
1145 * linux-m32r-low.c (*): Ditto.
1146 * linux-sparc-low.c (*): Ditto.
1147 * linux-x86.c (*): Ditto.
1148 * linux-low.c (*): Ditto.
1149 (linux_wait_1): Add calls to debug_enter, debug_exit.
1150 (linux_wait): Remove redundant debugging printf.
1151 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1152 (linux_resume, unstop_all_lwps): Ditto.
1153 * mem-break.c (*): Update all debugging printfs to use
1154 debug_printf instead of fprintf.
1155 * remote-utils.c (*): Ditto.
1156 * thread-db.c (*): Ditto.
1157 * server.c #include <ctype.h>, "gdb_vecs.h".
1158 (debug_threads): Moved to debug.c.
1159 (*): Update all debugging printfs to use debug_printf instead of
1160 fprintf.
1161 (start_inferior): Replace call to fflush with call to debug_flush.
1162 (monitor_show_help): Mention set debug-format.
1163 (parse_debug_format_options): New function.
1164 (handle_monitor_command): Handle "monitor set debug-format".
1165 (gdbserver_usage): Mention --debug-format.
1166 (main): Parse --debug-format.
1167 * server.h (debug_threads): Declaration moved to debug.h.
1168 #include "debug.h".
1169 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1170 trace_debug_1 that uses debug_printf.
1171 (tracepoint_look_up_symbols): Update all debugging printfs to use
1172 debug_printf instead of fprintf.
1173
e671835b
BS
11742014-01-20 Baruch Siach <baruch@tkos.co.il>
1175
1176 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1177 sys/ptrace.h.
1178
b5737fa9
PA
11792014-01-17 Pedro Alves <palves@redhat.com>
1180
ea38d2a9 1181 PR build/16445
c7faa97a
PA
1182 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1183 defined after including gdb_proc_service.h.
b5737fa9 1184
40ed484e
DE
11852014-01-16 Doug Evans <dje@google.com>
1186
1187 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1188 (match_dll): Use it.
1189
969c39fb
MM
11902014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1191
1192 * target.h (target_ops) <read_btrace>: Change parameters and
1193 return type to allow error reporting.
1194 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1195 trace reading errors on.
1196 * linux-low.c (linux_low_read_btrace): Pass trace reading
1197 errors on.
1198 (linux_low_disable_btrace): New.
1199
ab7f45ba
DE
12002014-01-15 Doug Evans <dje@google.com>
1201
1202 * inferiors.c (thread_id_to_gdb_id): Delete.
1203 * inferiors.h (thread_id_to_gdb_id): Delete.
1204
66af0f44
EZ
12052014-01-13 Eli Zaretskii <eliz@gnu.org>
1206
1207 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1208 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1209 versions.
1210
9939e131
PA
12112014-01-08 Pedro Alves <palves@redhat.com>
1212
1213 * server.c (handle_status): Don't discard previous queued stop
1214 replies or thread's pending status here.
1215 (main) <disconnection>: Do it here instead.
1216
b7ea362b
PA
12172014-01-08 Pedro Alves <palves@redhat.com>
1218
1219 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1220 * server.c (visit_actioned_threads, handle_pending_status): New
1221 function.
1222 (handle_v_cont): Factor out parts to ...
1223 (resume): ... this new function. If in all-stop, and a thread
1224 being resumed has a pending status, report it without actually
1225 resuming.
1226 (myresume): Adjust to use the new 'resume' function.
1227 (clear_pending_status_callback, set_pending_status_callback)
1228 (find_status_pending_thread_callback): New functions.
1229 (handle_status): Handle the case of multiple threads having
1230 interesting statuses to report. Report threads' real last signal
1231 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1232 with an interesting thread to report the status for, instead of
1233 always reporting the status of the first thread.
1234
28498c42
JB
12352014-01-01 Joel Brobecker <brobecker@adacore.com>
1236
1237 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1238 * gdbreplay.c (gdbreplay_version): Likewise.
1239
f45c82da
YZ
12402013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1241
1242 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1243 iov.iov_len with the real length in use.
1244
379a5e2d
JB
12452013-12-13 Joel Brobecker <brobecker@adacore.com>
1246
1247 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1248 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1249 for all targets that use win32-low.c.
1250 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1251 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1252
4210d83e
PA
12532013-12-13 Pedro Alves <palves@redhat.com>
1254
1255 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1256 if equal to TARGET_WAITKIND_LOADED.
1257 * win32-low.c (cached_status): New static global.
1258 (win32_wait): Add declaration.
1259 (do_initial_child_stuff): Flush all initial pending debug events
1260 up to the initial breakpoint.
1261 (win32_wait): If CACHED_STATUS was set, return that instead
1262 of doing a real wait. Remove the code resuming the execution
1263 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1264 during the initial phase. Also remove the code changing
1265 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1266 TARGET_WAITKIND_STOPPED.
1267
e7f0d979
YQ
12682013-12-11 Yao Qi <yao@codesourcery.com>
1269
1270 * notif.c (handle_notif_ack): Return 0 if no notification
1271 matches.
1272
ebcf782c
DE
12732013-11-20 Doug Evans <dje@google.com>
1274
1275 * linux-low.c (linux_set_resume_request): Fix comment.
1276
20ad9378
DE
12772013-11-20 Doug Evans <dje@google.com>
1278
1279 * linux-low.c (resume_status_pending_p): Tweak comment.
1280
a196ebeb
WT
12812013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1282
1283 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1284 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1285 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1286 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1287 (srv_amd64_regobj): Add amd64-mpx.o.
1288 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1289 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1290 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1291 * i387-fp.c (num_pl_bnd_register) Added constant.
1292 (num_pl_bnd_cfg_registers) Added constant.
1293 (struct i387_xsave) Added reserved area and MPX fields.
1294 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1295 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1296 function.
1297 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1298 (init_registers_amd64_mpx_linux): Declare new function.
1299 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1300 (x86_64_regmap): Add MPX registers.
1301 (x86_linux_read_description): Add MPX case.
1302 (initialize_low_arch): Initialize MPX targets.
1303
0080a2f6
TT
13042013-11-18 Tom Tromey <tromey@redhat.com>
1305
1306 * configure: Rebuild.
1307 * configure.ac: Don't check for stdlib.h.
1308 * gdbreplay.c: Unconditionally include stdlib.h.
1309
2978b111
TT
13102013-11-18 Tom Tromey <tromey@redhat.com>
1311
1312 * config.in: Rebuild.
1313 * configure: Rebuild.
1314 * configure.ac: Don't use AC_HEADER_DIRENT.
1315
a3d08894
TT
13162013-11-18 Tom Tromey <tromey@redhat.com>
1317
1318 * server.h: Don't check HAVE_STRING_H.
1319 * gdbreplay.c: Don't check HAVE_STRING_H.
1320 * configure: Rebuild.
1321
0a5dd17d
TT
13222013-11-18 Tom Tromey <tromey@redhat.com>
1323
1324 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1325 LIBGNU.
1326
1bd2f0ba
TT
13272013-11-08 Tom Tromey <tromey@redhat.com>
1328
1329 * configure, config.in: Rebuild.
1330 * configure.ac: Remove unused configury.
1331
3266f10b
TT
13322013-11-08 Tom Tromey <tromey@redhat.com>
1333
1334 * acinclude.m4: Include common.m4, codeset.m4.
1335 * configure, config.in: Rebuild.
1336 * configure.ac: Use GDB_AC_COMMON.
1337
6682d959
AA
13382013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1339
1340 * linux-s390-low.c (HWCAP_S390_TE): New define.
1341 (s390_arch_setup): Consider the TE field in the HWCAP for
1342 determining 'have_regset_tdb'.
1343
fd0a4d76
SDJ
13442013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1345
1346 PR gdb/16014
1347 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1348 call to sizeof.
1349
1a3d890b
PA
13502013-10-02 Pedro Alves <palves@redhat.com>
1351
1352 * server.c (process_serial_event): Don't output "GDBserver
1353 exiting" if GDB is connected through stdio.
1354 * target.c (mywait): Likewise, be silent if GDB is connected
1355 through stdio.
1356
97ad4581
JB
13572013-10-01 Joel Brobecker <brobecker@adacore.com>
1358
1359 * lynx-low.c (lynx_add_threads_after_attach): New function.
1360 (lynx_attach): Remove call to add_thread. Add call to
1361 lynx_add_threads_after_attach instead.
1362
5b4e221c
MF
13632013-09-28 Mike Frysinger <vapier@gentoo.org>
1364
1365 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1366 * config.in, configure: Regenerated.
1367
ee47b2f8
YQ
13682013-09-18 Yao Qi <yao@codesourcery.com>
1369
1370 PR server/15959
1371 * server.c (start_inferior): Clear 'resume_info'.
1372
d6707650 13732013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1374
d6707650
JW
1375 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1376 for each register.
1377
9243dd0e 13782013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1379
9243dd0e
JW
1380 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1381 linux-tile-low.o to srv_tgtobj.
1382
c623a6ef
WN
13832013-09-16 Will Newton <will.newton@linaro.org>
1384
1385 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1386 out regs.
1387
fb71d39e
PA
13882013-09-06 Pedro Alves <palves@redhat.com>
1389
1390 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1391 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1392 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1393 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1394 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1395 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1396
8e7e9910
PA
13972013-09-06 Pedro Alves <palves@redhat.com>
1398
1399 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1400 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1401
7c3a12ca
PA
14022013-09-06 Pedro Alves <palves@redhat.com>
1403
1404 * linux-amd64-ipa.c: Include tracepoint.h.
1405 * linux-i386-ipa.c: Include tracepoint.h.
1406
8eb3d7b6
RW
14072013-09-06 Ricard Wanderlof <ricardw@axis.com>
1408
1409 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1410 (ps_get_thread_area): New function.
1411
eddddb9d
RW
14122013-09-06 Ricard Wanderlof <ricardw@axis.com>
1413
1414 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1415 (initialize_low_arch): Call init_registers_crisv32 rather than
1416 init_register_crisv32.
1417
533b0600
PA
14182013-09-05 Pedro Alves <palves@redhat.com>
1419
1420 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1421 to ...
1422 * hostio.h: ... this new file.
1423 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1424 win32-low.c: Include hostio.h.
1425
0ce3d3b5
PA
14262013-09-05 Pedro Alves <palves@redhat.com>
1427
1428 * server.h (gdb_client_data, handler_func, callback_handler_func)
1429 (delete_file_handler, add_file_handler, append_callback_event)
1430 (delete_callback_event, start_event_loop, initialize_event_loop):
1431 Move to event-loop.h and include it.
1432 * event-loop.h: New file.
1433
799cdc37
PA
14342013-09-05 Pedro Alves <palves@redhat.com>
1435
1436 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1437 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1438 (loaded_dll, unloaded_dll): Move to ...
1439 * dll.h: ... this new file.
1440 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1441
6a6bbd9d
PA
14422013-09-05 Pedro Alves <palves@redhat.com>
1443
1444 * server.h (current_process, get_thread_process, all_processes)
1445 (add_inferior_to_list, for_each_inferior, current_inferior)
1446 (remove_inferior, add_process, remove_process, find_process_pid)
1447 (have_started_inferiors_p, have_attached_inferiors_p)
1448 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1449 (clear_inferiors, find_inferior, find_inferior_id)
1450 (inferior_target_data, set_inferior_target_data)
1451 (inferior_regcache_data, set_inferior_regcache_data): Move to
1452 inferiors.h, and include it.
1453 * inferiors.h: New file.
1454
f699aaba
PA
14552013-09-05 Pedro Alves <palves@redhat.com>
1456
1457 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1458 Move ...
1459 * ax.h: ... here.
1460
c144c7a0
PA
14612013-09-05 Pedro Alves <palves@redhat.com>
1462
1463 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1464 tracepoint.h.
1465 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1466 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1467 (handle_tracepoint_general_set, handle_tracepoint_query)
1468 (tracepoint_finished_step, tracepoint_was_hit)
1469 (release_while_stepping_state_list, current_traceframe)
1470 (in_readonly_region, traceframe_read_mem)
1471 (fetch_traceframe_registers, traceframe_read_sdata)
1472 (traceframe_read_info, struct fast_tpoint_collect_status)
1473 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1474 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1475 (supply_fast_tracepoint_registers)
1476 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1477 (ipa_tdesc, claim_trampoline_space)
1478 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1479 (agent_mem_read, agent_get_trace_state_variable_value)
1480 (agent_set_trace_state_variable_value, agent_tsv_read)
1481 (agent_mem_read_string, get_raw_reg_func_addr)
1482 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1483 * tracepoint.h: ... this new file.
1484
ff42e6ab
PA
14852013-09-05 Pedro Alves <palves@redhat.com>
1486
1487 * server.h (perror_with_name, error, fatal, warning, paddress)
1488 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1489 include it.
1490 * utils.h: New file.
1491
541af0f4
PA
14922013-09-05 Pedro Alves <palves@redhat.com>
1493
1494 * server.h (remote_debug, noack_mode, transport_is_reliable)
1495 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1496 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1497 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1498 (write_enn, initialize_async_io, enable_async_io)
1499 (disable_async_io, check_remote_input_interrupt_request)
1500 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1501 (dead_thread_notify, prepare_resume_reply)
1502 (decode_address_to_semicolon, decode_address, decode_m_packet)
1503 (decode_M_packet, decode_X_packet, decode_xfer_write)
1504 (decode_search_memory_packet, unhexify, hexify)
1505 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1506 (look_up_one_symbol, relocate_instruction)
1507 (monitor_output): Move to remote-utils.h, and include it.
1508 * remote-utils.h: New file.
1509
eebdf26b
PA
15102013-09-05 Pedro Alves <palves@redhat.com>
1511
1512 * server.h (_): Delete.
1513
3aafd2ff
PA
15142013-09-02 Pedro Alves <palves@redhat.com>
1515
1516 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1517 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1518 allocated.
1519 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1520
cee83bcb
PM
15212013-09-02 Pierre Muller <muller@sourceware.org>
1522
1523 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1524 or WriteProcessMemory complete successfully and handle
1525 ERROR_PARTIAL_COPY error.
1526
9a13b2fa
PA
15272013-09-02 Pedro Alves <palves@redhat.com>
1528
1529 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1530 error instead of EIO.
1531
602e3198
JK
15322013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1533
1534 PR server/15604
1535 * linux-low.c: Include filestuff.h.
1536 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1537 * lynx-low.c: Include filestuff.h.
1538 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1539 * server.c: Include filestuff.h.
1540 (main): Call notice_open_fds.
1541 * spu-low.c: Include filestuff.h.
1542 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1543
96d7229d
LM
15442013-08-22 Luis Machado <lgustavo@codesourcery.com>
1545
1546 * Makefile.in: Explain why ../target and ../nat are not
1547 listed as include file search paths.
1548 (linux-waitpid.o): New object file rule.
1549 * configure.srv (srv_native_linux_obj): New variable.
1550 Replace all occurrences of linux native object files with
1551 $srv_native_linux_obj.
1552 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1553 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1554 (linux_enable_event_reporting): Remove declaration.
1555 (my_waitpid): Moved to common/linux-waitpid.c.
1556 (linux_wait_for_event): Pass ptid when calling
1557 linux_enable_event_reporting.
1558 (linux_supports_tracefork_flag): Remove.
1559 (linux_enable_event_reporting): Likewise.
1560 (linux_tracefork_grandchild): Remove.
1561 (STACK_SIZE): Moved to common/linux-ptrace.c.
1562 (linux_tracefork_child): Remove.
1563 (linux_test_for_tracefork): Remove.
1564 (linux_look_up_symbols): Call linux_supports_traceclone.
1565 (initialize_low): Remove call to linux_test_for_tracefork.
1566 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1567 common/linux-ptrace.h.
1568 (PTRACE_TYPE_ARG4): Likewise.
1569 Include linux-ptrace.h.
1570
32940073
PA
15712013-08-21 Pedro Alves <palves@redhat.com>
1572
1573 * config.in: Renegerate.
1574
33b60d58 15752013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1576
33b60d58
LM
1577 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1578 (SFILES): Remove $(srcdir)/common/target-common.c and
1579 add $(srcdir)/target/waitstatus.c.
1580 (OBS): Remove target-common.o and add waitstatus.o.
1581 (server_h): Remove $(srcdir)/../common/target-common.h and
1582 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1583 and $(srcdir)/../target/waitstatus.h.
1584 (target-common.o): Remove.
1585 (waitstatus.o): New target object file.
1586 * target.h: Do not include target-common.h and
1587 include target/resume.h, target/wait.h and
1588 target/waitstatus.h.
1589
b8e1b30e
LM
15902013-08-13 Luis Machado <lgustavo@codesourcery.com>
1591
1592 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1593 to PTRACE_TYPE_ARG3.
1594 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1595 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1596 PTRACE_TYPE_ARG4.
1597 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1598 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1599
7a60ad40
YQ
16002013-07-27 Jie Zhang <jie@codesourcery.com>
1601 Daniel Jacobowitz <dan@codesourcery.com>
1602 Yao Qi <yao@codesourcery.com>
1603
1604 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1605 (mips-linux-watch.o): New rule.
1606 (mips_linux_watch_h): New variable.
1607 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1608 srv_tgtobj.
1609 * linux-mips-low.c: Include mips-linux-watch.h.
1610 (struct arch_process_info, struct arch_lwp_info): New.
1611 (update_watch_registers_callback): New function.
1612 (mips_linux_new_process, mips_linux_new_thread) New functions.
1613 (mips_linux_prepare_to_resume, mips_insert_point): New
1614 functions.
1615 (mips_remove_point, mips_stopped_by_watchpoint): New
1616 functions.
1617 (rsp_bp_type_to_target_hw_bp_type): New function.
1618 (mips_stopped_data_address): New function.
1619 (the_low_target): Add watchpoint support functions.
1620
de6f69ad
YQ
16212013-07-27 Yao Qi <yao@codesourcery.com>
1622
1623 * i386-low.c: Include break-common.h.
1624 (enum target_hw_bp_type): Remove.
1625
3360c0bf
LM
16262013-07-24 Luis Machado <lgustavo@codesourcery.com>
1627
1628 * Makefile.in (SFILES): /common/target-common.c.
1629 (OBS): Add target-common.o.
1630 (server_h): Add $(srcdir)/../common/target-common.h.
1631 (target-common.o): New target.
1632 * server.c (queue_stop_reply_callback): Free
1633 status string after use.
1634 * target.c (target_waitstatus_to_string): Remove.
1635 * target.h: Include target-common.h.
1636 (resume_kind): Likewise.
1637 (target_waitkind): Likewise.
1638 (target_waitstatus): Likewise.
1639 (TARGET_WNOHANG): Likewise.
1640
bd885420
YQ
16412013-07-04 Yao Qi <yao@codesourcery.com>
1642
1643 * Makefile.in (host_alias): Use @host_noncanonical@.
1644 (target_alias): Use @target_noncanonical@.
1645 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1646 ACX_NONCANONICAL_HOST.
1647 * configure: Regenerated.
1648
1649 Revert:
1650 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1651
1652 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1653 * configure: Rebuild.
1654 * Makefile.in (version_host, version_target): Get from configure.
1655 (version.c): Use $(version_host) and $(version_target).
1656
17ef446e
PA
16572013-07-03 Pedro Alves <palves@redhat.com>
1658
1659 * Makefile.in (config.status): Depend on development.sh.
1660 * acinclude.m4: Include libmcheck.m4.
1661 * configure: Regenerate.
1662
7a9a7487
MG
16632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1664
1665 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1666 attribute inside the parentheses.
1667 (winapi_DebugSetProcessKillOnExit): Ditto.
1668 (winapi_DebugBreakProcess): Ditto.
1669 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 1670
49b64de6
MG
16712013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1672
1673 * notif.h (notif_event): Add a dummy member to avoid compiler
1674 errors.
1675
d5749ee7
PA
16762013-07-01 Pedro Alves <palves@redhat.com>
1677
1678 * hostio.c (HOSTIO_PATH_MAX): Define.
1679 (require_filename, handle_open, handle_unlink, handle_readlink):
1680 Use it.
1681
d8d2a3ee
PA
16822013-07-01 Pedro Alves <palves@redhat.com>
1683
1684 * server.h: Include "pathmax.h".
1685 * linux-low.c: Don't include sys/param.h.
1686 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1687 MAXPATHLEN.
1688 * win32-low.c: Don't include sys/param.h.
1689 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1690
bc7dea8d
PA
16912013-07-01 Pedro Alves <palves@redhat.com>
1692
1693 * event-loop.c: Don't check HAVE_UNISTD_H before including
1694 <unistd.h>.
1695 * gdbreplay.c: Likewise.
1696 * remote-utils.c: Likewise.
1697 * server.c: Likewise.
1698 * configure.ac: Don't check for unistd.h.
1699 * configure: Regenerate.
1700
d6c2da54
TT
17012013-06-28 Tom Tromey <tromey@redhat.com>
1702
1703 * Makefile.in (version.c): Use version.in, not
1704 common/version.in.
1705
257b6bec
MG
17062013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1707
1708 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1709 * configure: Rebuild.
1710 * Makefile.in (version_host, version_target): Get from configure.
1711 (version.c): Use $(version_host) and $(version_target).
1712
86ebe149
DK
17132013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1714
1715 Fix trace-status to output user name without trailing colon.
1716 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1717
f30aa5af
DK
17182013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1719
1720 Fix trace-status to output proper start-time and stop-time.
1721 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1722 output start time and stop time in hex as gdb expects.
1723
28a93511
YQ
17242013-06-26 Pedro Alves <pedro@codesourcery.com>
1725
1726 * tracepoint.c (build_traceframe_info_xml): Output trace state
1727 variables present in the trace buffer.
1728
01208463
TT
17292013-06-24 Tom Tromey <tromey@redhat.com>
1730
1731 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1732 create-version.sh.
1733 (version.o): Remove.
1734 * gdbreplay.c: Include version.h.
1735 (version, host_name): Don't declare.
1736 * server.h: Include version.h.
1737 (version, host_name): Don't declare.
1738
760256f9
PA
17392013-06-12 Pedro Alves <palves@redhat.com>
1740
1741 * linux-x86-low.c (linux_is_elf64): Delete global.
1742 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1743 with local linux_pid_exe_is_elf_64_file use.
1744
030031ee
PA
17452013-06-11 Pedro Alves <palves@redhat.com>
1746
1747 * linux-low.c (regset_disabled, disable_regset): New functions.
1748 (regsets_fetch_inferior_registers)
1749 (regsets_store_inferior_registers): Use them.
1750 (initialize_regsets_info); Don't allocate the disabled_regsets
1751 array here.
1752 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1753 comment.
1754
5da6eb0a
PA
17552013-06-11 Pedro Alves <palves@redhat.com>
1756
1757 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1758 xmalloc.
1759
7e5aaa09
PA
17602013-06-11 Pedro Alves <palves@redhat.com>
1761
1762 * linux-x86-low.c (initialize_low_arch): Call
1763 init_registers_x32_avx_linux.
1764
d878444c
JK
17652013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1766
1767 Fix compatibility with Android Bionic.
1768 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1769 it is not empty.
1770
3aee8918
PA
17712013-06-07 Pedro Alves <palves@redhat.com>
1772
5f2b57b5 1773 PR server/14823
3aee8918
PA
1774 * Makefile.in (OBS): Add tdesc.o.
1775 (IPA_OBJS): Add tdesc-ipa.o.
1776 (tdesc-ipa.o): New rule.
1777 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1778 interface.
1779 * linux-low.c (new_inferior): Delete.
1780 (disabled_regsets, num_regsets): Delete.
1781 (linux_add_process): Adjust to set the new per-process
1782 new_inferior flag.
1783 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1784 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1785 was a stop. When calling arch_setup, switch the current inferior
1786 to the thread that got an event.
1787 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1788 (regsets_fetch_inferior_registers)
1789 (regsets_store_inferior_registers): New regsets_info parameter.
1790 Adjust to use it.
1791 (linux_register_in_regsets): New regs_info parameter. Adjust to
1792 use it.
1793 (register_addr, fetch_register, store_register): New usrregs_info
1794 parameter. Adjust to use it.
1795 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1796 parameter regs_info. Adjust to use it.
1797 (linux_fetch_registers): Get the current inferior's regs_info, and
1798 adjust to use it.
1799 (linux_store_registers): Ditto.
1800 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1801 (initialize_low): Don't initialize the target_regsets here. Call
1802 initialize_low_arch.
1803 * linux-low.h (target_regsets): Delete declaration.
1804 (struct regsets_info): New.
1805 (struct usrregs_info): New.
1806 (struct regs_info): New.
1807 (struct process_info_private) <new_inferior>: New field.
1808 (struct linux_target_ops): Delete the num_regs, regmap, and
1809 regset_bitmap fields. New field regs_info.
1810 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1811 * i387-fp.c (num_xmm_registers): Delete.
1812 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1813 calls to new interface.
1814 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1815 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1816 Infer the number of xmm registers from the regcache's target
1817 description.
1818 * i387-fp.h (num_xmm_registers): Delete.
1819 * inferiors.c (add_thread): Don't install the thread's regcache
1820 here.
1821 * proc-service.c (gregset_info): Fetch the current inferior's
1822 regs_info. Adjust to use it.
1823 * regcache.c: Include tdesc.h.
1824 (register_bytes, reg_defs, num_registers)
1825 (gdbserver_expedite_regs): Delete.
1826 (get_thread_regcache): If the thread doesn't have a regcache yet,
1827 create one, instead of aborting gdbserver.
1828 (regcache_invalidate_one): Rename to ...
1829 (regcache_invalidate_thread): ... this.
1830 (regcache_invalidate_one): New.
1831 (regcache_invalidate): Only invalidate registers of the current
1832 process.
1833 (init_register_cache): Add target_desc parameter, and use it.
1834 (new_register_cache): Ditto. Assert the target description has a
1835 non zero registers_size.
1836 (regcache_cpy): Add assertions. Adjust.
1837 (realloc_register_cache, set_register_cache): Delete.
1838 (registers_to_string, registers_from_string): Adjust.
1839 (find_register_by_name, find_regno, find_register_by_number)
1840 (register_cache_size): Add target_desc parameter, and use it.
1841 (free_register_cache_thread, free_register_cache_thread_one)
1842 (regcache_release, register_cache_size): New.
1843 (register_size): Add target_desc parameter, and use it.
1844 (register_data, supply_register, supply_register_zeroed)
1845 (supply_regblock, supply_register_by_name, collect_register)
1846 (collect_register_as_string, collect_register_by_name): Adjust.
1847 * regcache.h (struct target_desc): Forward declare.
1848 (struct regcache) <tdesc>: New field.
1849 (init_register_cache, new_register_cache): Add target_desc
1850 parameter.
1851 (regcache_invalidate_thread): Declare.
1852 (regcache_invalidate_one): Delete declaration.
1853 (regcache_release): Declare.
1854 (find_register_by_number, register_cache_size, register_size)
1855 (find_regno): Add target_desc parameter.
1856 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1857 declarations.
1858 * remote-utils.c: Include tdesc.h.
1859 (outreg, prepare_resume_reply): Adjust.
1860 * server.c: Include tdesc.h.
1861 (gdbserver_xmltarget): Delete declaration.
1862 (get_features_xml, process_serial_event): Adjust.
1863 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1864 declare.
1865 (struct process_info) <tdesc>: New field.
1866 (ipa_tdesc): Declare.
1867 * tdesc.c: New file.
1868 * tdesc.h: New file.
1869 * tracepoint.c: Include tdesc.h.
1870 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1871 (get_context_regcache): Adjust to pass ipa_tdesc down.
1872 (do_action_at_tracepoint): Adjust to get the register cache size
1873 from the context regcache's description.
1874 (traceframe_walk_blocks): Adjust to get the register cache size
1875 from the current trace frame's description.
1876 (traceframe_get_pc): Adjust to get current trace frame's
1877 description and pass it down.
1878 (gdb_collect): Adjust to get the register cache size from the
1879 IPA's description.
1880 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1881 (gdbserver_xmltarget): Delete.
1882 (initialize_low_tracepoint): Set the ipa's target description.
1883 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1884 (initialize_low_tracepoint): Set the ipa's target description.
1885 * linux-x86-low.c: Include tdesc.h.
1886 [__x86_64__] (is_64bit_tdesc): New.
1887 (ps_get_thread_area, x86_get_thread_area): Use it.
1888 (i386_cannot_store_register): Rename to ...
1889 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1890 (i386_cannot_fetch_register): Rename to ...
1891 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1892 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1893 to new interface.
1894 (target_regsets): Rename to ...
1895 (x86_regsets): ... this.
1896 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1897 interface.
1898 (x86_siginfo_fixup): Use is_64bit_tdesc.
1899 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1900 (tdesc_x32_avx_linux, tdesc_x32_linux)
1901 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1902 Declare.
1903 (x86_linux_update_xmltarget): Delete.
1904 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1905 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
1906 (AMD64_LINUX_USER64_CS): New.
1907 (x86_linux_read_description): New, based on
1908 x86_linux_update_xmltarget.
1909 (same_process_callback): New.
1910 (x86_arch_setup_process_callback): New.
1911 (x86_linux_update_xmltarget): New.
1912 (x86_regsets_info): New.
1913 (amd64_linux_regs_info): New.
1914 (i386_linux_usrregs_info): New.
1915 (i386_linux_regs_info): New.
1916 (x86_linux_regs_info): New.
1917 (x86_arch_setup): Reimplement.
1918 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
1919 (x86_emit_ops): Ditto.
1920 (the_low_target): Adjust. Install x86_linux_regs_info,
1921 x86_cannot_fetch_register, and x86_cannot_store_register.
1922 (initialize_low_arch): New.
1923 * linux-ia64-low.c (tdesc_ia64): Declare.
1924 (ia64_fetch_register): Adjust.
1925 (ia64_usrregs_info, regs_info): New globals.
1926 (ia64_regs_info): New function.
1927 (the_low_target): Adjust.
1928 (initialize_low_arch): New function.
1929 * linux-sparc-low.c (tdesc_sparc64): Declare.
1930 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
1931 Adjust.
1932 (sparc_arch_setup): New function.
1933 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
1934 (the_low_target): Adjust.
1935 (initialize_low_arch): New function.
1936 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
1937 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
1938 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
1939 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
1940 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
1941 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
1942 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
1943 (tdesc_powerpc_isa205_vsx64l): Declare.
1944 (ppc_cannot_store_register, ppc_collect_ptrace_register)
1945 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
1946 (ppc_set_pc, ppc_get_hwcap): Adjust.
1947 (ppc_usrregs_info): Forward declare.
1948 (!__powerpc64__) ppc_regmap_adjusted: New global.
1949 (ppc_arch_setup): Adjust to the current process'es target
1950 description.
1951 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
1952 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
1953 (ppc_store_evrregset): Adjust.
1954 (target_regsets): Rename to ...
1955 (ppc_regsets): ... this, and make static.
1956 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
1957 (ppc_regs_info): New function.
1958 (the_low_target): Adjust.
1959 (initialize_low_arch): New function.
1960 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
1961 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
1962 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1963 (tdesc_s390x_linux64v2): Declare.
1964 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1965 (s390_fill_gregset, s390_store_last_break): Adjust.
1966 (target_regsets): Rename to ...
1967 (s390_regsets): ... this, and make static.
1968 (s390_get_pc, s390_set_pc): Adjust.
1969 (s390_get_hwcap): New target_desc parameter, and use it.
1970 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1971 (s390_arch_setup): Adjust to set the current process'es target
1972 description. Don't adjust the regmap.
1973 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1974 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1975 (regs_info_3264): New globals.
1976 (s390_regs_info): New function.
1977 (the_low_target): Adjust.
1978 (initialize_low_arch): New function.
1979 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1980 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1981 [__mips64] (init_registers_mips_linux)
1982 (init_registers_mips_dsp_linux): Delete defines.
1983 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1984 (have_dsp): New global.
1985 (mips_read_description): New, based on mips_arch_setup.
1986 (mips_arch_setup): Reimplement.
1987 (get_usrregs_info): New function.
1988 (mips_cannot_fetch_register, mips_cannot_store_register)
1989 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1990 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1991 (target_regsets): Rename to ...
1992 (mips_regsets): ... this, and make static.
1993 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1994 (dsp_regs_info, regs_info): New globals.
1995 (mips_regs_info): New function.
1996 (the_low_target): Adjust.
1997 (initialize_low_arch): New function.
1998 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1999 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2000 Declare.
2001 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2002 (arm_read_description): New, with bits factored from
2003 arm_arch_setup.
2004 (arm_arch_setup): Reimplement.
2005 (target_regsets): Rename to ...
2006 (arm_regsets): ... this, and make static.
2007 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2008 (arm_regs_info): New function.
2009 (the_low_target): Adjust.
2010 (initialize_low_arch): New function.
2011 * linux-m68k-low.c (tdesc_m68k): Declare.
2012 (target_regsets): Rename to ...
2013 (m68k_regsets): ... this, and make static.
2014 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2015 (m68k_regs_info): New function.
2016 (m68k_arch_setup): New function.
2017 (the_low_target): Adjust.
2018 (initialize_low_arch): New function.
2019 * linux-sh-low.c (tdesc_sharch): Declare.
2020 (target_regsets): Rename to ...
2021 (sh_regsets): ... this, and make static.
2022 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2023 (sh_regs_info, sh_arch_setup): New functions.
2024 (the_low_target): Adjust.
2025 (initialize_low_arch): New function.
2026 * linux-bfin-low.c (tdesc_bfin): Declare.
2027 (bfin_arch_setup): New function.
2028 (bfin_usrregs_info, regs_info): New globals.
2029 (bfin_regs_info): New function.
2030 (the_low_target): Adjust.
2031 (initialize_low_arch): New function.
2032 * linux-cris-low.c (tdesc_cris): Declare.
2033 (cris_arch_setup): New function.
2034 (cris_usrregs_info, regs_info): New globals.
2035 (cris_regs_info): New function.
2036 (the_low_target): Adjust.
2037 (initialize_low_arch): New function.
2038 * linux-cris-low.c (tdesc_crisv32): Declare.
2039 (cris_arch_setup): New function.
2040 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2041 (cris_regs_info): New function.
2042 (the_low_target): Adjust.
2043 (initialize_low_arch): New function.
2044 * linux-m32r-low.c (tdesc_m32r): Declare.
2045 (m32r_arch_setup): New function.
2046 (m32r_usrregs_info, regs_info): New globals.
2047 (m32r_regs_info): Adjust.
2048 (initialize_low_arch): New function.
2049 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2050 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2051 (tic6x_usrregs_info): Forward declare.
2052 (tic6x_read_description): New function, based on ...
2053 (tic6x_arch_setup): ... this. Reimplement.
2054 (target_regsets): Rename to ...
2055 (tic6x_regsets): ... this, and make static.
2056 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2057 (tic6x_regs_info): New function.
2058 (the_low_target): Adjust.
2059 (initialize_low_arch): New function.
2060 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2061 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2062 (target_regsets): Rename to ...
2063 (xtensa_regsets): ... this, and make static.
2064 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2065 globals.
2066 (xtensa_arch_setup, xtensa_regs_info): New functions.
2067 (the_low_target): Adjust.
2068 (initialize_low_arch): New function.
2069 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2070 (nios2_arch_setup): Set the current process'es tdesc.
2071 (target_regsets): Rename to ...
2072 (nios2_regsets): ... this.
2073 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2074 (nios2_regs_info): New function.
2075 (the_low_target): Adjust.
2076 (initialize_low_arch): New function.
a261b8f5
PA
2077 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2078 (aarch64_arch_setup): Set the current process'es tdesc.
2079 (target_regsets): Rename to ...
2080 (aarch64_regsets): ... this.
2081 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2082 (aarch64_regs_info): New function.
2083 (the_low_target): Adjust.
2084 (initialize_low_arch): New function.
3aee8918
PA
2085 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2086 globals.
2087 (target_regsets): Rename to ...
2088 (tile_regsets): ... this.
2089 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2090 (tile_regs_info): New function.
2091 (tile_arch_setup): Set the current process'es tdesc.
2092 (the_low_target): Adjust.
2093 (initialize_low_arch): New function.
2094 * spu-low.c (tdesc_spu): Declare.
2095 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2096 * win32-arm-low.c (tdesc_arm): Declare.
2097 (arm_arch_setup): New function.
2098 (the_low_target): Install arm_arch_setup instead of
2099 init_registers_arm.
2100 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2101 (init_windows_x86): Rename to ...
2102 (i386_arch_setup): ... this. Set `win32_tdesc'.
2103 (the_low_target): Adjust.
2104 * win32-low.c (win32_tdesc): New global.
2105 (child_add_thread): Don't create the thread cache here.
2106 (do_initial_child_stuff): Set the new process'es tdesc.
2107 * win32-low.h (struct target_desc): Forward declare.
2108 (win32_tdesc): Declare.
2109 * lynx-i386-low.c (tdesc_i386): Declare global.
2110 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2111 * lynx-low.c (lynx_tdesc): New global.
2112 (lynx_add_process): Set the new process'es tdesc.
2113 * lynx-low.h (struct target_desc): Forward declare.
2114 (lynx_tdesc): Declare global.
2115 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2116 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2117 * nto-low.c (nto_tdesc): New global.
2118 (do_attach): Set the new process'es tdesc.
2119 * nto-low.h (struct target_desc): Forward declare.
2120 (nto_tdesc): Declare.
2121 * nto-x86-low.c (tdesc_i386): Declare.
2122 (nto_x86_arch_setup): Set `nto_tdesc'.
2123
b1fbec62
GB
21242013-06-04 Gary Benson <gbenson@redhat.com>
2125
2126 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2127 to qSupported response when appropriate.
2128 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2129 with nonzero-length annex.
2130 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2131 arguments supplied in annex.
2132
d1ec4ce7
DE
21332013-05-31 Doug Evans <dje@google.com>
2134
ac44adcb 2135 PR server/15594
d1ec4ce7
DE
2136 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2137 64 bits in 64-cross-32 environment.
2138
9b25f2d3
PA
21392013-05-28 Pedro Alves <palves@redhat.com>
2140
2141 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2142 (aarch64-without-fpu.c): Delete rule.
2143 * configure.srv (aarch64*-*-linux*): Remove references to
2144 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2145 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2146 declaration.
2147
6740dc9c
PA
21482013-05-24 Pedro Alves <palves@redhat.com>
2149
2150 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2151 instead of strchr/decode_address. Error if the range isn't split
2152 with a ','. Don't assume there's be a ':' in the action.
2153
c2d6af84
PA
21542013-05-23 Yao Qi <yao@codesourcery.com>
2155 Pedro Alves <palves@redhat.com>
2156
2157 * linux-low.c (lwp_in_step_range): New function.
2158 (linux_wait_1): If the thread was range stepping and stopped
2159 outside the stepping range, report the stop to GDB. Otherwise,
2160 continue stepping. Add range stepping debug output.
2161 (linux_set_resume_request): Copy the step range from the resume
2162 request to the lwp.
2163 (linux_supports_range_stepping): New.
2164 (linux_target_ops) <supports_range_stepping>: Set to
2165 linux_supports_range_stepping.
2166 * linux-low.h (struct linux_target_ops)
2167 <supports_range_stepping>: New field.
2168 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2169 * linux-x86-low.c (x86_supports_range_stepping): New.
2170 (the_low_target) <supports_range_stepping>: Set to
2171 x86_supports_range_stepping.
2172 * server.c (handle_v_cont): Handle 'r' action.
2173 (handle_v_requests): Append ";r" if the target supports range
2174 stepping.
2175 * target.h (struct thread_resume) <step_range_start,
2176 step_range_end>: New fields.
2177 (struct target_ops) <supports_range_stepping>:
2178 New field.
2179 (target_supports_range_stepping): New macro.
2180
58794e1a
JB
21812013-05-17 Joel Brobecker <brobecker@adacore.com>
2182
2183 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2184 confusion in comment.
2185
d631c5a7
JB
21862013-05-17 Joel Brobecker <brobecker@adacore.com>
2187
2188 * lynx-low.c (struct process_info_private): New type.
2189 (lynx_add_process): New function.
2190 (lynx_create_inferior, lynx_attach): Replace calls to
2191 add_process by calls to lynx_add_process.
2192 (lynx_resume): If PTID is null, then try using
2193 current_process()->private->last_wait_event_ptid.
2194 Add comments.
2195 (lynx_clear_inferiors): Delete. The contents of that function
2196 has been inlined in lynx_mourn;
2197 (lynx_wait_1): Save the ptid in the process's private data.
2198 (lynx_mourn): Free the process' private data. Replace call
2199 to lynx_clear_inferiors by call to clear_inferiors.
2200
96f7a20f
YQ
22012013-05-17 Yao Qi <yao@codesourcery.com>
2202
2203 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2204 the right place.
2205
db0dfaa0
LM
22062013-05-16 Luis Machado <lgustavo@codesourcery.com>
2207
2208 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2209 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2210 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2211 PT_TEXT_END_ADDR guards. Update comments.
2212 (linux_target_op) <read_offsets>: Conditionally define to
2213 linux_read_offsets if the target is UCLIBC and if it defines
2214 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2215
68f5f838
SL
22162013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2217 Andrew Jenner <andrew@codesourcery.com>
2218
2219 * Makefile.in (SFILES): Add linux-nios2-low.c.
2220 (clean): Add action to delete nios2-linux.c.
2221 (nios2-linux.c): New rule.
2222 * configure.srv: Add nios2*-*-linux*.
2223 * linux-nios2-low.c: New.
2224
1ebff1fd
HAQ
22252013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2226
2227 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2228
f6150862
HZ
22292013-04-25 Hui Zhu <hui@codesourcery.com>
2230
2231 PR gdb/15186
f6150862
HZ
2232 * ax.c (ax_printf): Add fflush.
2233
614c279d
TT
22342013-04-22 Tom Tromey <tromey@redhat.com>
2235
2236 * Makefile.in (SFILES): Add filestuff.c.
2237 (OBS): Add filestuff.o.
2238 (filestuff.o): New target.
2239 * config.in, configure: Rebuild.
2240 * configure.ac: Check for fdwalk, pipe2.
2241
7d4e5717
PA
22422013-04-17 Pedro Alves <palves@redhat.com>
2243
2244 * configure.ac (USE_THREAD_DB): Delete variable.
2245 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2246 Don't AC_SUBST USE_THREAD_DB.
2247 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2248 * config.in, configure: Regenerate.
2249
d5c93e41
PA
22502013-04-16 Pedro Alves <palves@redhat.com>
2251
2252 * linux-low.h (struct lwp_info) <thread_known>: Move under
2253 the USE_THREAD_DB #ifdef.
2254
04f5fe89
PA
22552013-04-16 Pedro Alves <palves@redhat.com>
2256
2257 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2258 (linux-low.o): Delete rule.
2259 * linux-low.h: Always include "gdb_thread_db.h" instead of
2260 conditionally including thread_db.h.
2261 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2262 HAVE_THREAD_DB_H.
2263
480b27bf
JK
22642013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2265
2266 * Makefile.in (install-only): Fix make install regression.
2267
43662968
JK
22682013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2269
2270 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2271 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2272 installation.
2273 * gdbserver.1: Remove.
2274
3e74e146
PA
22752013-03-22 Pedro Alves <palves@redhat.com>
2276
2277 * linux-low.c (handle_extended_wait): Don't call
2278 linux_enable_event_reporting.
2279
a8347a2a
TT
22802013-03-15 Tony Theodore <tonyt@logyst.com>
2281
2282 PR build/9098:
2283 * Makefile.in (SHELL): Use @SHELL@.
2284
eeb56fa7
SDJ
22852013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2286
2287 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2288 compiler warning.
2289
4fa7e2ff
JB
22902013-03-13 Joel Brobecker <brobecker@adacore.com>
2291
2292 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2293 Remove extraneous NULL element.
2294
8ddb1965
YQ
22952013-03-13 Yao Qi <yao@codesourcery.com>
2296
2297 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2298 'V' block in trace frame.
2299
9accd112
MM
23002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2301
2302 * target.h (struct target_ops): Add btrace ops.
2303 (target_supports_btrace): New macro.
2304 (target_enable_btrace): New macro.
2305 (target_disable_btrace): New macro.
2306 (target_read_btrace): New macro.
2307 * gdbthread.h (struct thread_info): Add btrace field.
2308 * server.c: Include btrace-common.h.
2309 (handle_btrace_general_set): New function.
2310 (handle_btrace_enable): New function.
2311 (handle_btrace_disable): New function.
2312 (handle_general_set): Call handle_btrace_general_set.
2313 (handle_qxfer_btrace): New function.
2314 (struct qxfer qxfer_packets[]): Add btrace entry.
2315 * inferiors.c (remove_thread): Disable btrace.
2316 * linux-low: Include linux-btrace.h.
2317 (linux_low_enable_btrace): New function.
2318 (linux_low_read_btrace): New function.
2319 (linux_target_ops): Add btrace ops.
2320 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2321 Add srv_linux_btrace=yes.
2322 (x86_64-*-linux*): Add linux-btrace.o.
2323 Add srv_linux_btrace=yes.
2324 * configure.ac: Define HAVE_LINUX_BTRACE.
2325 * config.in: Regenerated.
2326 * configure: Regenerated.
2327
5cc22e4c
MM
23282013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2329
2330 * server.c (handle_qxfer): Preserve error message if -3 is
2331 returned.
2332 (qxfer): Document the -3 return value.
2333
7c97f91e
MM
23342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2335
2336 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2337 (linux_btrace_h): New variable.
2338 (linux-btrace.o): New rule.
2339
be9a119c 23402013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2341 Hafiz Abid Qadeer <abidh@codesourcery.com>
2342
2343 * tracepoint.c (trace_buffer_size): New global.
2344 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2345 (init_trace_buffer): Change to one-argument function. Allocate
2346 trace buffer memory.
2347 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2348 handle QTBuffer:size packet.
2349 (cmd_bigqtbuffer_size): New function.
2350 (initialize_tracepoint): Call init_trace_buffer with
2351 DEFAULT_TRACE_BUFFER_SIZE.
2352 * server.c (handle_query): Add QTBuffer:size in the
2353 supported packets.
2354
e64f7499
YQ
23552013-03-07 Yao Qi <yao@codesourcery.com>
2356
2357 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2358 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2359 of -1.
2360 (cmd_qtsp): Adjust condition. Do post increment.
2361 Set cur_action and cur_step_action back to 0.
2362
f0ae6fc3
PA
23632013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2364
2365 PR server/15236
2366 * linux-low.c (linux_write_memory): Return early success if LEN is
2367 zero.
2368
b5b0b0af
CV
23692013-03-05 Corinna Vinschen <vinschen@redhat.de>
2370
334ad4a8 2371 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2372
589bc927
TT
23732013-02-28 Tom Tromey <tromey@redhat.com>
2374
2375 * configure.ac: Invoke AC_SYS_LARGEFILE.
2376 * configure, config.in: Rebuild.
2377
dfe07582
CV
23782013-02-28 Corinna Vinschen <vinschen@redhat.com>
2379
2380 * win32-low.c: Throughout, fix format strings and casts of
2381 printf-like functions to avoid type related warnings on all
2382 platforms.
2383 (get_child_debug_event): Print dwDebugEventCode as hex since
2384 that's how it's usually documented.
2385
736cd585
YQ
23862013-02-28 Yao Qi <yao@codesourcery.com>
2387
2388 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2389 pulongest.
2390
e1f58301
JW
23912013-02-27 Jiong Wang <jiwang@tilera.com>
2392
2393 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2394 (reg-tilegx32.c): New rule.
2395 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2396 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2397 different register info initializer according to elf class.
2398 (init_registers_tilgx32): New function. The tilegx32 register info
2399 initializer.
2400 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2401 (tile_store_gregset): Likewise.
2402
d171ca78
YQ
24032013-02-27 Yao Qi <yao@codesourcery.com>
2404
2405 * server.c (process_point_options): Print debug message when
2406 debug_threads is true.
2407
282bbdf3
YQ
24082013-02-26 Yao Qi <yao@codesourcery.com>
2409
2410 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2411
aca22551
PA
24122013-02-19 Pedro Alves <palves@redhat.com>
2413 Kai Tietz <ktietz@redhat.com>
2414
2415 PR gdb/15161
2416
2417 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2418 instead of strtoul to extract address from packet.
2419 (process_serial_event) <'z'>: Likewise.
2420
4f3cee1c
YQ
24212013-02-18 Yao Qi <yao@codesourcery.com>
2422
2423 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2424
8e1d55a3
PA
24252013-02-14 Pedro Alves <palves@redhat.com>
2426
2427 Plug memory leak.
2428
2429 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2430 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2431
458820da
PA
24322013-02-14 Pedro Alves <palves@redhat.com>
2433
2434 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2435
baea0dae
PA
24362013-02-14 Pedro Alves <palves@redhat.com>
2437
2438 * tracepoint.c (save_string): Delete.
2439 (add_tracepoint_action): Use savestring instead of save_string.
2440
0b1afbb3
PA
24412013-02-12 Pedro Alves <palves@redhat.com>
2442
2443 * linux-xtensa-low.c: Ditto.
2444 * xtensa-xtregs.c: Ditto.
2445
8a4ac37e
PA
24462013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2447
2448 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2449 thread_db.
2450
148de6bb
MS
24512013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2452
2453 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2454 aarch64_num_wp_regs and aarch64_num_bp_regs to
2455 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2456
55fac6e0
MS
24572013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2458
2459 * linux-aarch64-low.c (ps_get_thread_area): Replace
2460 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2461
176eb98c
MS
24622013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2463 Marcus Shawcroft <marcus.shawcroft@arm.com>
2464 Nigel Stephens <nigel.stephens@arm.com>
2465 Yufeng Zhang <yufeng.zhang@arm.com>
2466
2467 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2468 (aarch64.c, aarch64-without-fpu.c): New targets.
2469 * configure.srv (aarch64*-*-linux*): New.
2470 * linux-aarch64-low.c: New file.
2471
56f7af9c
MS
24722013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2473
43aaf8b6 2474 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2475 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2476 (dequeue_one_deferred_signal, linux_resume_one_thread)
2477 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2478 (linux_tracefork_grandchild, linux_test_for_tracefork)
2479 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2480 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2481 where the argument is 0.
2482
60f662b0
YQ
24832013-01-25 Yao Qi <yao@codesourcery.com>
2484
2485 * event-loop.c: Include "queue.h".
2486 (gdb_event_p): New typedef.
2487 (struct gdb_event) <next_event>: Remove.
2488 (event_queue): Change to QUEUE(gdb_event_p).
2489 (async_queue_event): Remove.
2490 (gdb_event_xfree): New.
2491 (initialize_event_loop): New.
2492 (process_event): Use API from QUEUE.
2493 (wait_for_event): Likewise.
2494 * server.c (main): Call initialize_event_loop.
2495 * server.h (initialize_event_loop): Declare.
2496
5ae4861a
YQ
24972013-01-18 Yao Qi <yao@codesourcery.com>
2498
2499 * ax.h (struct eval_agent_expr_context): New.
2500 (gdb_eval_agent_expr): Update declaration.
2501 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2502 TFRAME. Add new argument CTX.
2503 * server.h (struct eval_agent_expr_context): Declare.
2504 (agent_mem_read, agent_tsv_read): Update declaration.
2505 (agent_mem_read_string): Likewise.
2506 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2507 (add_traceframe_block): Add new argument TPOINT.
2508 Increase TPOINT->traceframe_usage.
2509 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2510 eval_tracepoint_agent_expr.
2511 (condition_true_at_tracepoint): Likewise.
2512 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2513 (agent_mem_read_string, agent_tsv_read): Likewise.
2514
85e00e85
YQ
25152013-01-16 Yao Qi <yao@codesourcery.com>
2516
2517 * linux-low.c (linux_resume_one_lwp): Don't check
2518 'lwp->bp_reinsert != 0'.
2519
4039cf45
JB
25202013-01-07 Joel Brobecker <brobecker@adacore.com>
2521 Pedro Alves <palves@redhat.com>
2522
2523 * lynx-low.c (ptrace_request_to_str): Define a temporary
2524 macro and use it to simplify this function's implementation.
2525
9044dee2
JB
25262013-01-07 Joel Brobecker <brobecker@adacore.com>
2527
2528 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2529 sets errno.
2530
e6352c8f
JB
25312013-01-07 Joel Brobecker <brobecker@adacore.com>
2532
2533 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2534
50681a27
JB
25352013-01-07 Joel Brobecker <brobecker@adacore.com>
2536
2537 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2538
3f6e77ef
JB
25392013-01-07 Joel Brobecker <brobecker@adacore.com>
2540
2541 * lynx-low.c (lynx_resume): Use the resume_info parameter
2542 to determine the ptid for the lynx_ptrace call, unless
2543 it is equal to minus_one_ptid, in which case we use the
2544 ptid of the current_inferior.
2545 (lynx_wait_1): After having received a thread create/exit
2546 event, resume the inferior's execution using the signaling
2547 thread's ptid, rather than the old ptid.
2548
7fda33ae
JB
25492013-01-07 Joel Brobecker <brobecker@adacore.com>
2550
2551 * lynx-low.c (lynx_resume): Delete variable ret.
2552
b9786c74
JB
25532013-01-01 Joel Brobecker <brobecker@adacore.com>
2554
2555 * gdbreplay.c (gdbreplay_version): Update copyright year.
2556 * server.c (gdbserver_version): Likewise.
2557
8b93d60f
JB
25582012-12-17 Joel Brobecker <brobecker@adacore.com>
2559
2560 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2561 new thread.
2562
037335a7
JB
25632012-12-17 Joel Brobecker <brobecker@adacore.com>
2564
2565 * lynx-low.c (ptrace_request_to_str): Add handling for
2566 PTRACE_GETTRACESIG.
2567
52d4cbd8
JB
25682012-12-17 Joel Brobecker <brobecker@adacore.com>
2569
2570 * lynx-low.c (lynx_attach): Delete variable new_process.
2571
ab8f6ca9
JB
25722012-12-17 Joel Brobecker <brobecker@adacore.com>
2573
2574 * lynx-low.c (lynx_create_inferior): Delete variable
2575 new_process.
2576
78cbc024
JB
25772012-12-17 Joel Brobecker <brobecker@adacore.com>
2578
2579 * lynx-low.c (ptrace_request_to_str): Do not handle
2580 PTRACE_GETTHREADLIST if this macro does not exist.
2581
14a00470
YQ
25822012-12-15 Yao Qi <yao@codesourcery.com>
2583
2584 * Makefile.in (OBS): Add notif.o.
2585 * notif.c, notif.h: New.
2586 * server.c: Include "notif.h".
2587 (struct vstop_notif) <next>: Remove.
2588 <base>: New field.
2589 (queue_stop_reply): Update.
2590 (push_event, send_next_stop_reply): Remove.
2591 (discard_queued_stop_replies): Update.
2592 (notif_stop): New variable.
2593 (handle_v_stopped): Remove.
2594 (handle_v_requests): Don't call handle_v_stopped. Call
2595 handle_ack_notif instead.
2596 (queue_stop_reply_callback): Call notif_event_enque instead
2597 of queue_stop_reply.
2598 (handle_status): Don't call send_next_stop_reply, call
2599 notif_write_event instead.
2600 (kill_inferior_callback): Likewise.
2601 (detach_or_kill_inferior_callback): Likewise.
2602 (main): Call initialize_notif.
2603 (process_serial_event): Call QUEUE_is_empty.
2604 (handle_target_event): Call notif_push instead of push event.
2605 * server.h (push_event): Remove declaration.
2606
61c125b9
TT
26072012-12-10 Tom Tromey <tromey@redhat.com>
2608
2609 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2610 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2611 macros.
2612 (.c.o): Rewrite.
2613 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2614 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2615 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2616 (amd64-linux-ipa.o, ax.o): Rewrite.
2617 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2618 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2619 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2620 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2621 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2622 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2623 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2624 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2625 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2626 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2627 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2628 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2629 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2630 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2631 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2632 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2633 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2634 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2635 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2636 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2637 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2638 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2639 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2640 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2641 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2642 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2643 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2644 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2645 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2646 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2647 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2648 (reg-tilegx.o): Remove.
2649 (all_object_files): New macro.
2650 Include .deps files.
2651 * aclocal.m4, configure: Rebuild.
2652 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2653 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2654 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2655
e90e9ad9
TT
26562012-12-05 Tom Tromey <tromey@redhat.com>
2657
2658 PR gdb/14917:
2659 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2660
02d403bf 26612012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
2662
2663 * configure.ac: Check for linux/perf_event.h.
2664 * config.in: Regenerated.
2665 * configure: Regenerated.
2666
0270a750
PA
26672012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2668
2669 * hostio.c (handle_readlink): Decrease buffer size
2670 parameter passed to readlink by one byte.
2671
8c29b58e
YQ
26722012-11-26 Yao Qi <yao@codesourcery.com>
2673
2674 * configure.ac (build_warnings): Append '-Wempty-body'.
2675 * configure: Regenerated.
2676 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2677 body.
2678
8bdce1ff
PM
26792012-11-15 Pierre Muller <muller@sourceware.org>
2680
2681 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2682 * config.in: Regenerate.
2683 * configure: Regenerate.
2684 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2685 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2686 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2687 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2688 header.
2689 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2690 instead of <sys/wait.h> header.
2691 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2692
02d403bf 26932012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
2694
2695 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2696 (various make rules): Remove -DGDBSERVER
2697
fbd5db48
YQ
26982012-11-09 Yao Qi <yao@codesourcery.com>
2699
2700 * spu-low.c (current_ptid): Move it to ..
2701 * gdbthread.h: ... here. New.
2702 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2703 * server.c (myresume, process_serial_event): Likewise.
2704 * thread-db.c (thread_db_find_new_threads): Likewise.
2705 * tracepoint.c (run_inferior_command): Likewise.
2706
b3dc46ff
AB
27072012-10-01 Andrew Burgess <aburgess@broadcom.com>
2708
2709 * server.c (handle_search_memory_1): Include access length in
2710 warning message.
2711
07c04788
HPN
27122012-09-05 Michael Brandt <michael.brandt@axis.com>
2713
2714 * linux-crisv32-low.c: Fix compile errors.
2715
918d227b
YQ
27162012-09-04 Yao Qi <yao@codesourcery.com>
2717
2718 * tracepoint.c (cmd_qtsv): Adjust debug message.
2719 Don't check CUR_TPOINT.
2720
18c1b81a
YQ
27212012-08-28 Yao Qi <yao@codesourcery.com>
2722
2723 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2724 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2725 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2726 Remove declarations of xmalloc, xreallloc, xstrdup and
2727 freeargv.
2728 * Makefile.in (libiberty_h): New.
2729 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2730 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2731
dc82f37b
YQ
27322012-08-23 Yao Qi <yao@codesourcery.com>
2733
2734 * server.h: Remove declaration of 'xsnprintf'.
2735
406b1477
KS
27362012-08-22 Keith Seitz <keiths@redhat.com>
2737
2738 * server.h: Include build-gnulib-gbserver/config.h.
2739 * gdbreplay.c: Likewise.
2740
e6712ff1
DE
27412012-08-08 Doug Evans <dje@google.com>
2742
2743 * Makefile.in (SFILES): Add gdb_vecs.c.
2744 (OBS): Add gdb_vecs.o.
2745 (gdb_vecs_h, host_defs_h): New variables.
2746 (thread-db.o): Add $(gdb_vecs_h) dependency.
2747 (gdb_vecs.o): New rule.
2748 * thread-db.c: #include "gdb_vecs.h".
2749 (thread_db_load_search): Use a vector to iterate over path elements.
2750 Handle text appearing after "$pdir".
2751
2752 * configure.ac: Add check for strstr.
2753 * config.in: Regenerate.
2754 * configure: Regenerate.
2755
7c3270ae
UW
27562012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2757
2758 * hostio.c (handle_pread): If pread fails, fall back to attempting
2759 lseek/read.
2760 (handle_pwrite): Likewise for pwrite.
2761
b62e2b27
UW
27622012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2763
2764 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2765 between unsupported TYPE and unimplementable ADDR/LEN combination.
2766 (arm_insert_point): Act on new return value.
2767
78a99e91
PA
27682012-07-31 Pedro Alves <palves@redhat.com>
2769
2770 * server.c (process_point_options): Only skip tokens if we find
2771 one that is unrecognized. Don't treat 'X' specially while
2772 skipping unrecognized tokens.
2773
fcf303ab
UW
27742012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2775
2776 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2777 to 4-byte-align HW breakpoint addresses for Thumb.
2778
7255706c
YQ
27792012-07-27 Yao Qi <yao@codesourcery.com>
2780
2781 PR remote/14161.
2782
2783 * server.h: Declare gdb_agent_about_to_close.
2784 * target.c (kill_inferior): Include "agent.h".
2785 New. Send command 'kill'.
2786 * target.h (kill_inferior): Removed macro.
2787 * tracepoint.c (gdb_agent_about_to_close): New.
2788 (gdb_agent_helper_thread): Handle command 'close'.
2789 Wait endlessly until the inferior stops.
2790 Install gdb_agent_remove_socket to atexit hook.
2791 (agent_socket_name): New static variable.
2792 (gdb_agent_socket_init): Replace local variable 'name' with
2793 'agent_socket_name'.
2794 (gdb_agent_remove_socket): New.
2795
5a3f286f
YQ
27962012-07-27 Yao Qi <yao@codesourcery.com>
2797
2798 * server.c (process_point_options): Stop at 'X' when parsing.
2799
961bd387
ME
28002012-07-19 Michael Eager <eager@eagercon.com>
2801
a261b8f5 2802 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
2803 to hw_execute.
2804 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2805 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2806 hardware breakpoint.
2807
aa7c7447
JK
28082012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2809
2810 * gdbserver/linux-low.c (initialize_low): Call
2811 linux_ptrace_init_warnings.
2812
7f216e7c
DE
28132012-07-02 Doug Evans <dje@google.com>
2814
2815 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2816 pointer to int.
2817
d3ce09f5
SS
28182012-07-02 Stan Shebs <stan@codesourcery.com>
2819
2820 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2821 (ax.o): Add it to build rule.
2822 (ax-ipa.o): Ditto.
2823 (OBS): Add format.o.
2824 (IPA_OBS): Add format.o.
2825 * server.c (handle_query): Claim support for breakpoint commands.
2826 (process_point_options): Add command case.
2827 (process_serial_event): Leave running if there are printfs in
2828 effect.
2829 * mem-break.h (any_persistent_commands): Declare.
2830 (add_breakpoint_commands): Declare.
2831 (gdb_no_commands_at_breakpoint): Declare.
2832 (run_breakpoint_commands): Declare.
2833 * mem-break.c (struct point_command_list): New struct.
2834 (struct breakpoint): New field command_list.
2835 (any_persistent_commands): New function.
2836 (add_commands_to_breakpoint): New function.
2837 (add_breakpoint_commands): New function.
2838 (gdb_no_commands_at_breakpoint): New function.
2839 (run_breakpoint_commands): New function.
2840 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2841 locally.
2842 * ax.c: Include format.h.
2843 (ax_printf): New function.
2844 (gdb_eval_agent_expr): Add printf opcode.
2845
2f8f6aed
YQ
28462012-06-13 Yao Qi <yao@codesourcery.com>
2847
2848 * server.c (start_inferior): Remove duplicated writes to fields
2849 'last_resume_kind' and 'last_status' of 'current_inferior'.
2850
0c9070b3
YQ
28512012-06-12 Yao Qi <yao@codesourcery.com>
2852 Pedro Alves <palves@redhat.com>
2853
2854 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2855 comment.
2856 * server.c (handle_v_cont): Extend comment.
2857
c52daf70
YQ
28582012-06-11 Yao Qi <yao@codesourcery.com>
2859
2860 * linux-low.c (linux_attach): Add 'static'.
2861
d38bbb0a
YQ
28622012-06-06 Yao Qi <yao@codesourcery.com>
2863
2864 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2865
89dc0afd
JK
28662012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2867
2868 Fix gcc -flto compilation warning.
2869 * server.c (main): Make variable multi_mode and attach volatile.
2870
75f62ce7
TJB
28712012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2872
2873 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2874 if the platform doesn't know about it.
2875
65f479b6
PA
28762012-05-30 Jeff Kenton <jkenton@tilera.com>
2877
2878 * Makefile.in (SFILES): Add linux-tile-low.c.
2879 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2880 * configure.srv: Handle tilegx-*-linux*.
2881 * linux-tile-low.c: New file.
2882
0c5bf5a9
JK
28832012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2884
2885 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2886
a493e3e2
PA
28872012-05-24 Pedro Alves <palves@redhat.com>
2888
2889 PR gdb/7205
2890
43aaf8b6 2891 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 2892
2ea28649
PA
28932012-05-24 Pedro Alves <palves@redhat.com>
2894
2895 PR gdb/7205
2896
2897 Replace target_signal with gdb_signal throughout.
2898
8d409d16
MR
28992012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2900
2901 * linux-low.c (linux_store_registers): Avoid the copying sequence
2902 when no data has been retrieved by ptrace.
2903
23512c01
MGD
29042012-05-22 Will Deacon <will.deacon@arm.com>
2905
2906 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
2907 Include asm/ptrace.h.
2908 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
2909 already defined.
2910
4934b29e
MR
29112012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
2912
2913 * linux-low.c (linux_store_registers): Don't re-retrieve data
2914 with ptrace that has already been obtained from /proc. Always
2915 copy any data retrieved with ptrace to the buffer supplied.
2916
bde24c0a
PA
29172012-05-11 Yao Qi <yao@codesourcery.com>
2918 Pedro Alves <palves@redhat.com>
2919
2920 * linux-low.c (enum stopping_threads_kind): New.
2921 (stopping_threads): Change type to `enum stopping_threads_kind'.
2922 (handle_extended_wait): If stopping and suspending threads, leave
2923 the new_lwp suspended too.
2924 (linux_wait_for_event): Adjust.
2925 (stop_all_lwps): Set `stopping_threads' to
2926 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
2927 whether we're suspending threads or just stopping them. Assert no
2928 recursion happens.
2929
623b6bdf
YQ
29302012-04-29 Yao Qi <yao@codesourcery.com>
2931
2932 * server.h: Move some code to ...
2933 * gdbthread.h: ... here. New.
2934 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
2935 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
2936 (nto-low.o, win32-low.o): Likewise.
2937 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
2938 * regcache.c, remote-utils.c, server.c: Likewise.
2939 * target.c, tracepoint.c, win32-low.c: Likewise.
2940
f15f9948
TJB
29412012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2942
2943 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
2944 (PTRACE_ARG4_TYPE): Likewise.
2945 (PTRACE_XFER_TYPE): Likewise.
2946 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
2947 ptrace to PTRACE_ARG3_TYPE.
2948 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
2949 (PTRACE_ARG4_TYPE): Likewise.
2950 (PTRACE_XFER_TYPE): Likewise.
2951 (linux_detach_one_lwp): Cast fourth argument of
2952 ptrace to long then PTRACE_ARG4_TYPE.
2953 (regsets_fetch_inferior_registers): Cast third argument of
2954 ptrace to long then PTRACE_ARG3_TYPE.
2955 (regsets_store_inferior_registers): Likewise.
2956
38ea300a
PA
29572012-04-20 Pedro Alves <palves@redhat.com>
2958
2959 * configure: Regenerate.
2960
c971b7fa
PA
29612012-04-19 Pedro Alves <palves@redhat.com>
2962
43aaf8b6 2963 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 2964 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
2965 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2966 (all, install-only, uninstall, clean-info, all-lib, clean): No
2967 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2968 (maintainer-clean realclean distclean): Use subdir_do.
2969 (subdir_do): New.
2970 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 2971 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
2972 * acinclude.m4: Include acx_configure_dir.m4.
2973 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2974 calls. Call AC_PROG_RANLIB. Configure gnulib using
2975 ACX_CONFIGURE_DIR.
2976 (GNULIB): New.
2977 (GNULIB_STDINT_H): Adjust.
2978 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2979 * gdbreplay.c: Include build-gnulib/config.h.
2980 * server.h: Likewise.
2981 * aclocal.m4: Regenerate.
2982 * config.in: Regenerate.
2983 * configure: Regenerate.
c971b7fa 2984
809277f8
PA
29852012-04-19 Pedro Alves <palves@redhat.com>
2986
2987 * Makefile.in (LIBGNU, INCGNU): Adjust.
2988 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2989 (all, install-only, uninstall, clean-info, all-lib, clean)
2990 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2991 * configure.ac: Adjust AC_OUTPUT output.
2992 * aclocal.m4: Regenerate.
2993 * configure: Regenerate.
2994
fd9bb8b8
PA
29952012-04-19 Pedro Alves <palves@redhat.com>
2996
2997 * Makefile.in (generated_files): New.
2998 (server_h): Remove the explicit dependency on config.h, and depend
2999 on $generated_files.
3000
1c298c66
PA
30012012-04-19 Pedro Alves <palves@redhat.com>
3002
3003 * Makefile.in (INCGNU): Add -Ignulib.
3004
57c4b50b
PA
30052012-04-19 Pedro Alves <palves@redhat.com>
3006
3007 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3008 (INCGNU): ... this, and spell out -I here.
3009 (GNULIB_LIB): Rename to ...
3010 (LIBGNU): ... this.
3011 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3012
1030e047
PA
30132012-04-19 Pedro Alves <palves@redhat.com>
3014
3015 * config.in: Regenerate.
3016
447d4319
PA
30172012-04-19 Pedro Alves <palves@redhat.com>
3018
3019 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3020 * server.h (memmem): Remove declaration.
3021 * config.in: Regenerate.
3022 * configure: Regenerate.
3023
aad9eab9
YQ
30242012-04-19 Yao Qi <yao@codesourcery.com>
3025
3026 * Makefile.in (SFILES): Add common/vec.c.
3027 (OBS): Add vec.o.
3028 (vec.o): New rule.
3029
3e10640f
YQ
30302012-04-19 Yao Qi <yao@codesourcery.com>
3031
3032 * remote-utils.c (prepare_resume_reply): Replace with macro
3033 target_core_of_thread.
3034 * server.c (handle_qxfer_threads_proper): Likewise.
3035 * target.h (traget_core_of_thread): New macro.
3036
71622373
PA
30372012-04-18 Pedro Alves <palves@redhat.com>
3038
3039 * aclocal.m4: Regenerate.
3040 * configure: Regenerate.
3041
80d26939
YQ
30422012-04-16 Yao Qi <yao@codesourcery.com>
3043
3044 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3045 duplicated on address.
3046
42476b70
YQ
30472012-04-16 Yao Qi <yao@codesourcery.com>
3048
3049 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3050 (struct tracepoint_action_ops) <send>: New field.
3051 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3052 (agent_expr_send, x_tracepoint_action_send): New.
3053 (l_tracepoint_action_send): New.
3054 (cmd_qtdp): Download and install tracepoint
3055 according to `use_agent'.
3056 (run_inferior_command): Add one more parameter `len'.
3057 Update callers.
3058 (tracepoint_send_agent): New.
3059 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3060
7bc83639
YQ
30612012-04-16 Yao Qi <yao@codesourcery.com>
3062
3063 * tracepoint.c (download_tracepoints): Moved to ...
3064 (cmd_qtstart): ... here.
3065
5f18041e
YQ
30662012-04-14 Yao Qi <yao@codesourcery.com>
3067
3068 * tracepoint.c: Include inttypes.h.
3069 (struct collect_memory_action): Use sized types.
3070 (struct tracepoint): Likewise.
3071 (cmd_qtdp, stop_tracing): Update print specifiers.
3072 (cmd_qtp, response_tracepoint): Likewise.
3073 (collect_data_at_tracepoint): Likewise.
3074 (collect_data_at_step): Likewise.
3075
55a8c076
YQ
30762012-04-14 Yao Qi <yao@codesourcery.com>
3077
3078 Import gnulib module inttypes.
3079 * aclocal.m4, config.in, configure: Regenerated.
3080
dc750257
YQ
30812012-04-14 Yao Qi <yao@codesourcery.com>
3082
3083 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3084 Makefile and config.status at last.
3085
0ab5faf9
YQ
30862012-04-13 Yao Qi <yao@codesourcery.com>
3087
3088 * tracepoint.c: Include stdint.h unconditionally.
3089
18f5fd81
TJB
30902012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3091
3092 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3093 on BFD_HAVE_SYS_PROCFS_TYPE.
3094 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3095 * configure: Regenerate.
3096 * config.in: Likewise.
3097
4d47af5c
L
30982012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3099
3100 * Makefile.in (clean): Also remove x32.c x32-linux.c
3101 x32-avx.c x32-avx-linux.c.
3102 (x32.o): New target.
3103 (x32.c): Likewise.
3104 (x32-linux.o): Likewise.
3105 (x32-linux.c): Likewise.
3106 (x32-avx.o): Likewise.
3107 (x32-avx.c): Likewise.
3108 (x32-avx-linux.o): Likewise.
3109 (x32-avx-linux.c): Likewise.
3110
3111 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3112 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3113 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3114 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3115 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3116 i386/x32-avx-linux.xml.
3117
3118 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3119 (init_registers_x32_avx_linux): Likwise.
3120 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3121 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3122
ecedbe58
PA
31232012-04-13 Pedro Alves <palves@redhat.com>
3124
3125 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3126 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3127 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3128 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3129 the sub-make.
3130
c92b5177
L
31312012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3132
3133 * linux-x86-low.c (compat_x32_clock_t): New.
3134 (compat_x32_siginfo_t): Likewise.
3135 (compat_x32_siginfo_from_siginfo): Likewise.
3136 (siginfo_from_compat_x32_siginfo): Likewise.
3137 (linux_is_elf64): Likewise.
3138 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3139 and siginfo_from_compat_x32_siginfo for x32.
3140 (x86_arch_setup): Set linux_is_elf64.
3141
214d508e
L
31422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3143
3144 PR gdb/13969
3145 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3146 e_machine field.
3147 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3148 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3149 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3150 compatible with process.
3151
c9a1864a
YQ
31522012-04-12 Yao Qi <yao@codesourcery.com>
3153
3154 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3155 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3156 (install-only, install-info, clean): Handle sub dir gnulib.
3157 (all-lib, am--refresh): New targets.
3158 (memmem.o): Remove target.
3159 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3160 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3161 (AC_REPLACE_FUNCS): Remove memmem.
3162 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3163 (AC_OUTPUT): Generate Makefile in gnulib/.
3164 * aclocal.m4, config.in, configure: Regenerated.
3165
367ba2c2
MR
31662012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3167
3168 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3169
9d236627
PA
31702012-04-05 Pedro Alves <palves@redhat.com>
3171
3172 -Werror=strict-aliasing
3173
3174 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3175 pointer.
3176
111217b3
PA
31772012-04-04 Pedro Alves <palves@redhat.com>
3178
3179 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3180 (sparc_store_gregset_from_stack, sparc_store_gregset)
3181 (sparc_breakpoint_at): Fix formatting.
3182
8365dcf5
TJB
31832012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3184
3185 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3186 are available.
3187 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3188 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3189 * config.in: Regenerate.
3190 * configure: Likewise.
3191
689cc2ae
PA
31922012-03-29 Pedro Alves <palves@redhat.com>
3193
3194 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3195 Correct ptrace arguments.
3196
c14dfd32
PA
31972012-03-28 Pedro Alves <palves@redhat.com>
3198
3199 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3200 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3201 (IA64_FR1_REGNUM): New defines.
3202 (ia64_fetch_register): New.
3203 (the_low_target): Install it.
3204 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3205 field.
3206 * linux-low.c (linux_fetch_registers): Try the
3207 the_low_target.fetch_register hook first.
3208
3209 * linux-arm-low.c (the_low_target): Adjust.
3210 * linux-bfin-low.c (the_low_target): Adjust.
3211 * linux-cris-low.c (the_low_target): Adjust.
3212 * linux-crisv32-low.c (the_low_target): Adjust.
3213 * linux-m32r-low.c (the_low_target): Adjust.
3214 * linux-m68k-low.c (the_low_target): Adjust.
3215 * linux-mips-low.c (the_low_target): Adjust.
3216 * linux-ppc-low.c (the_low_target): Adjust.
3217 * linux-s390-low.c (the_low_target): Adjust.
3218 * linux-sh-low.c (the_low_target): Adjust.
3219 * linux-sparc-low.c (the_low_target): Adjust.
3220 * linux-tic6x-low.c (the_low_target): Adjust.
3221 * linux-x86-low.c (the_low_target): Adjust.
3222 * linux-xtensa-low.c (the_low_target): Adjust.
3223
63c88e13
PA
32242012-03-26 Pedro Alves <palves@redhat.com>
3225
3226 * server.c (handle_qxfer_libraries): Don't bail early if
3227 the_target->qxfer_libraries_svr4 is not NULL.
3228
fb723180
PA
32292012-03-26 Pedro Alves <palves@redhat.com>
3230
3231 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3232
0afae3cf
PA
32332012-03-23 Pedro Alves <palves@redhat.com>
3234
3235 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3236 "library-list-svr4" element's start tag when the the DSO list is
3237 empty.
3238
485f1ee4
PA
32392012-03-23 Pedro Alves <palves@redhat.com>
3240
3241 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3242 a variable whose type size is the same as the inferior's pointer
3243 size.
3244
a5362b9a
TS
32452012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3246
3247 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3248 struct siginfo.
3249 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3250 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3251 * linux-low.h: Include <signal.h>.
3252 (struct siginfo): Remove forward declaration.
3253 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3254 struct siginfo.
3255
d226c142
MF
32562012-03-21 Mike Frysinger <vapier@gentoo.org>
3257
3258 * .gitignore: Ignore more files.
3259
122f36ef
PA
32602012-03-19 Pedro Alves <palves@redhat.com>
3261 Jan Kratochvil <jan.kratochvil@redhat.com>
3262
3263 * server.c (cont_thread, general_thread): Add describing comments.
3264 (start_inferior): Clear `cont_thread'.
3265 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3266 of a process.
3267
fc3e5175
YQ
32682012-03-15 Yao Qi <yao@codesourcery.com>
3269
3270 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3271 handling to ...
3272 (cmd_qtdp): ... here.
3273
8d0d92cd
YQ
32742012-03-15 Yao Qi <yao@codesourcery.com>
3275
3276 * tracepoint.c (struct tracepoint_action_ops): New.
3277 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3278 (m_tracepoint_action_download): New.
3279 (r_tracepoint_action_download): New.
3280 (x_tracepoint_action_download): New.
3281 (l_tracepoint_action_download): New.
3282 (add_tracepoint_action): Install `action->ops' according type.
3283 (download_tracepoint_1): Move code `download' function pointer
3284 of various tracepoint_action_ops.
3285
87b0bb13
JK
32862012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3287
3288 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3289 linux_ptrace_attach_warnings.
3290
5f572dec
JK
32912012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3292
3293 * Makefile.in (linux-ptrace.o): New.
3294 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3295 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3296 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3297 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3298 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3299 of these targets.
3300 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3301
f4647387
YQ
33022012-03-08 Yao Qi <yao@codesourcery.com>
3303 Pedro Alves <palves@redhat.com>
3304
3305 Fix PR server/13392.
3306 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3307 offset of JMP insn.
3308 * tracepoint.c (remove_tracepoint): New.
3309 (cmd_qtdp): Call remove_tracepoint when failed to install.
3310
9b224c5e
PA
33112012-03-07 Pedro Alves <palves@redhat.com>
3312
3313 * linux-low.c (get_detach_signal): New.
3314 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3315 Pass on pending signals to PTRACE_DETACH. Check the result of the
3316 ptrace call.
3317 * server.c (program_signals, program_signals_p): New.
3318 (handle_general_set): Handle QProgramSignals.
3319 * server.h (program_signals, program_signals_p): Declare.
3320
e237a7e2
JK
33212012-03-05 Pedro Alves <palves@redhat.com>
3322 Jan Kratochvil <jan.kratochvil@redhat.com>
3323
3324 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3325 New comment why.
3326
5808517f
YQ
33272012-03-03 Yao Qi <yao@codesourcery.com>
3328
3329 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3330 agent_look_up_symbols.
3331
58b4daa5
YQ
33322012-03-03 Yao Qi <yao@codesourcery.com>
3333
3334 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3335 (linux-x86-low.o): Likewise.
3336 * server.h: Remove in_process_agent_loaded.
3337 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3338 common/agent.c.
3339 Update callers.
3340
8ffcbaaf
YQ
33412012-03-03 Yao Qi <yao@codesourcery.com>
3342
3343 * tracepoint.c (gdb_agent_capability): New global.
3344 (in_process_agent_loaded_ust): Renamed to
3345 `in_process_agent_supports_ust'.
3346 Update callers.
3347 (in_process_agent_supports_ust): Call agent_capability_check.
3348 (clear_installed_tracepoints): Assert that agent supports
3349 agent.
3350
d1feda86
YQ
33512012-03-03 Yao Qi <yao@codesourcery.com>
3352
3353 * linux-low.c (linux_supports_agent): New.
3354 (linux_target_ops): Initialize field `supports_agent' with
3355 linux_supports_agent.
3356 * target.h (struct target_ops) <supports_agent>: New.
3357 (target_supports_agent): New macro.
3358 * server.c (handle_general_set): Handle packet 'QAgent'.
3359 (handle_query): Send `QAgent+'.
3360 * Makefile.in (server.o): Depends on agent.h.
3361
2fa291ac
YQ
33622012-03-03 Yao Qi <yao@codesourcery.com>
3363
3364 * Makefile.in (OBS): Add agent.o.
3365 Add new rule for agent.o.
3366 Track dependence of tracepoint.c on agent.h.
3367 * tracepoint.c (run_inferior_command_1):
3368 (run_inferior_command): Call agent_run_command.
3369 (gdb_ust_connect_sync_socket): Deleted. Move it to
3370 common/agent.c.
3371 (resume_thread, stop_thread): Likewise.
3372 (gdb_ust_socket_init): Renamed to ...
3373 (gdb_agent_socket_init): ... New.
3374 (gdb_ust_thread): Renamed to ...
3375 (gdb_agent_helper_thread): ... New.
3376 (gdb_ust_init): Move some code to ...
3377 (gdb_agent_init): ... here. New.
3378 [HAVE_UST]: Call gdb_ust_init.
3379 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3380 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3381 * config.in, configure: Regenerated.
3382
05044653
PA
33832012-03-02 Pedro Alves <palves@redhat.com>
3384
3385 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3386 * linux-low.c (struct simple_pid_list): New.
3387 (stopped_pids): New a struct simple_pid_list pointer.
3388 (add_to_pid_list, pull_pid_from_list): New.
3389 (handle_extended_wait): Don't assume the first signal new children
3390 report is SIGSTOP. Adjust call to pull_pid_from_list.
3391 (linux_wait_for_lwp): Adjust.
3392
8d00225b
YQ
33932012-03-02 Yao Qi <yao@codesourcery.com>
3394
3395 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3396 debug log.
3397
19560ba5
YQ
33982012-03-02 Yao Qi <yao@codesourcery.com>
3399
3400 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3401 `stop_pc' and `tpoint'. Update caller.
3402
1faeff08
MR
34032012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3404
3405 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3406 * linux-low.c (use_linux_regsets): New macro.
3407 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3408 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3409 (linux_register_in_regsets): New function.
3410 (usr_fetch_inferior_registers): Skip registers covered by
3411 regsets.
3412 (usr_store_inferior_registers): Likewise.
3413 (usr_fetch_inferior_registers): New macro.
3414 (usr_store_inferior_registers): Likewise.
3415 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3416 (linux_store_registers): Likewise.
3417 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3418 prototype.
3419 (init_registers_mips64_dsp_linux): Likewise.
3420 (init_registers_mips_linux): New macro.
3421 (init_registers_mips_dsp_linux): Likewise.
3422 (mips_dsp_num_regs): Likewise.
3423 (DSP_BASE, DSP_CONTROL): New fallback macros.
3424 (mips_base_regs): New macro.
3425 (mips_regmap): Use it. Fix the size.
3426 (mips_dsp_regmap): New variable.
3427 (mips_dsp_regset_bitmap): Likewise.
3428 (mips_arch_setup): New function.
3429 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3430 than mips_regmap.
3431 (mips_cannot_store_register): Likewise.
3432 (the_low_target): Update .arch_setup, .num_regs and .regmap
3433 initializers. Add .regset_bitmap initializer.
3434 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3435 initializer.
3436 * linux-bfin-low.c (the_low_target): Likewise.
3437 * linux-cris-low.c (the_low_target): Likewise.
3438 * linux-crisv32-low.c (the_low_target): Likewise.
3439 * linux-ia64-low.c (the_low_target): Likewise.
3440 * linux-m32r-low.c (the_low_target): Likewise.
3441 * linux-m68k-low.c (the_low_target): Likewise.
3442 * linux-ppc-low.c (the_low_target): Likewise.
3443 * linux-s390-low.c (the_low_target): Likewise.
3444 * linux-sh-low.c (the_low_target): Likewise.
3445 * linux-sparc-low.c (the_low_target): Likewise.
3446 * linux-tic6x-low.c (the_low_target): Likewise.
3447 * linux-x86-low.c (the_low_target): Likewise.
3448 * linux-xtensa-low.c (the_low_target): Likewise.
3449 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3450 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3451 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3452 srv_xmlfiles.
3453 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3454 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3455
c03e6ccc
YQ
34562012-02-29 Yao Qi <yao@codesourcery.com>
3457 Pedro Alves <palves@redhat.com>
3458
3459 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3460 `step_over_finished' is true.
3461
644cebc9
PA
34622012-02-27 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3465 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3466
c14d7ab2
PA
34672012-02-27 Pedro Alves <palves@redhat.com>
3468
3469 PR server/9684
3470 * linux-low.c (pid_is_stopped): New.
3471 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3472
412c89dd
LM
34732012-02-25 Luis Machado <lgustavo@codesourcery.com>
3474
3475 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3476 of conditions.
3477
b745defe
MR
34782012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3479
3480 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3481
9f3a5c85
LM
34822012-02-24 Luis Machado <lgustavo@codesourcery>
3483
3484 * server.c (handle_query): Advertise support for target-side
3485 breakpoint condition evaluation.
3486 (process_point_options): New function.
3487 (process_serial_event): When inserting a breakpoint, check for
3488 a target-side condition that should be evaluated.
3489
3490 * mem-break.c: Include regcache.h and ax.h.
3491 (point_cond_list_t): New data structure.
3492 (breakpoint) <cond_list>: New field.
3493 (find_gdb_breakpoint_at): Make non-static.
3494 (delete_gdb_breakpoint_at): Clear any target-side
3495 conditions.
3496 (clear_gdb_breakpoint_conditions): New function.
3497 (add_condition_to_breakpoint): Likewise.
3498 (add_breakpoint_condition): Likewise.
3499 (gdb_condition_true_at_breakpoint): Likewise.
3500 (gdb_breakpoint_here): Return result directly instead
3501 of going through a local variable.
3502
3503 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3504 (clear_gdb_breakpoint_conditions): Likewise.
3505 (add_breakpoint_condition): Likewise.
3506 (gdb_condition_true_at_breakpoint): Likewise.
3507
3508 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3509 (need_step_over_p): Take target-side breakpoint condition into
3510 consideration.
3511
5e1dc496
LM
35122012-02-24 Luis Machado <lgustavo@codesourcery>
3513
3514 * server.h: Include tracepoint.h.
3515 (agent_mem_read, agent_get_trace_state_variable_value,
3516 agent_set_trace_state_variable_value,
3517 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3518 get_set_tsv_func_addr): New prototypes.
3519
3520 * ax.h: New include file.
3521 * ax.c: New source file.
3522
3523 * tracepoint.c: Include ax.h.
3524 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3525 agent_expr, eval_result_type): Move to ax.h.
3526 (parse_agent_expr): Rename to ...
3527 (gdb_parse_agent_expr): ... this, make it non-static and move
3528 to ax.h.
3529 (unparse_agent_expr) Rename to ...
3530 (gdb_unparse_agent_expr): ... this, make it non-static and move
3531 to ax.h.
3532 (eval_agent_expr): Rename to ...
3533 (eval_tracepoint_agent_expr): ... this.
3534 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3535 forward declarations.
3536 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3537 (agent_get_trace_state_variable_value): New function.
3538 (agent_set_trace_state_variable_value): New function.
3539 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3540 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3541 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3542 (condition_true_at_tracepoint): Likewise.
3543 (parse_agent_expr): Rename to ...
3544 (gdb_parse_agent_expr): ... this and move to ax.c.
3545 (unparse_agent_expr): Rename to ...
3546 (gdb_unparse_agent_expr): ... this and move to ax.c.
3547 (gdb_agent_op_name): Move to ax.c.
3548 (eval_agent_expr): Rename to ...
3549 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3550 and move to ax.c.
3551 (eval_tracepoint_agent_expr): New function.
3552 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3553 non-static.
5e1dc496
LM
3554 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3555 ax.c.
3556 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3557 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3558 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3559 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3560 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3561 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3562 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3563 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3564 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3565 (compile_bytecodes): Remove forward declaration.
3566 (is_goto_target): Move to ax.c.
3567 (compile_bytecodes): Move to ax.c and call
3568 agent_get_trace_state_variable_value (...) and
3569 agent_set_trace_state_variable_value (...).
3570
3571 * Makefile.in: Update ax.c and IPA dependencies.
3572
277e4e52
PA
35732012-02-24 Pedro Alves <palves@redhat.com>
3574
3575 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3576 (cmd_bigqtbuffer_circular): ... this. Only handle
3577 'QTBuffer:circular:'.
3578 (handle_tracepoint_general_set): Adjust.
3579
bf4c19f7
YQ
35802012-02-16 Yao Qi <yao@codesourcery.com>
3581
3582 * inferiors.c: Move code to ...
3583 * dll.c: .... here. New.
3584 * server.h: Declare clear_dlls.
3585 * Makefile.in (SFILES): Add dll.c.
3586 (OBS): Add dll.o
3587 (dll.o): New rule.
3588
d73f2619
YQ
35892012-02-11 Yao Qi <yao@codesourcery.com>
3590
3591 * server.c: (handle_monitor_command): Add a new parameter
3592 `own_buf'.
3593 (handle_query): Update caller.
3594
f8255c2a
JB
35952012-02-09 Joel Brobecker <brobecker@adacore.com>
3596
3597 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3598 * configure, config.in: Regenerate.
3599 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3600 is not defined.
3601
da84f473
PA
36022012-02-02 Pedro Alves <palves@redhat.com>
3603
3604 Try SIGKILL first, then PTRACE_KILL.
3605 * linux-low.c (linux_kill_one_lwp): New.
3606 (linux_kill_one_lwp): Rename to ...
3607 (kill_one_lwp_callback): ... this. Use the new
3608 linux_kill_one_lwp.
3609
e886a173
PA
36102012-02-02 Pedro Alves <palves@redhat.com>
3611
3612 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3613 inferior.
3614
be07f1a2
PA
36152012-01-27 Pedro Alves <palves@redhat.com>
3616
3617 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3618 (elf_64_file_p): Make static.
3619 (linux_pid_exe_is_elf_64_file): New.
3620 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3621 Delete declarations.
3622 (linux_pid_exe_is_elf_64_file): Declare.
3623 * linux-x86-low.c (x86_arch_setup): Use
3624 linux_pid_exe_is_elf_64_file.
3625
d8301ad1
JK
36262012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3627
3628 * linux-low.c (linux_wait_for_event_1): Rename to ...
3629 (linux_wait_for_event): ... here and merge it with former
3630 linux_wait_for_event - new variable wait_ptid, use it.
3631 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3632
01b17894
PA
36332012-01-23 Pedro Alves <palves@redhat.com>
3634
3635 * server.c (main): Avoid yet another case of infinite loop while
3636 detaching/killing after a longjmp.
3637
e825046f
JK
36382012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3639
3640 Code cleanup.
3641 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3642
b9e7b9c3
UW
36432012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3644
3645 * hostio.c (handle_readlink): New function.
3646 (handle_vFile): Call it to handle "vFile:readlink" packets.
3647
901f9912
UW
36482012-01-20 Pedro Alves <palves@redhat.com>
3649 Ulrich Weigand <ulrich.weigand@linaro.org>
3650
3651 * server.c (handle_v_requests): Only support vAttach and vRun to
3652 start multiple processes when in extended protocol mode.
3653
fc1ab1a0
PA
36542012-01-17 Pedro Alves <palves@redhat.com>
3655
3656 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3657 memalign plus mprotect to allocate the scratch buffer.
3658
7d5d4e98
PA
36592012-01-13 Pedro Alves <palves@redhat.com>
3660
3661 * server.c (attach_inferior): Clear `cont_thread'.
3662
f128d5e9
PA
36632012-01-13 Pedro Alves <palves@redhat.com>
3664
3665 * server.c (main): Avoid infinite loop while detaching/killing
3666 after a longjmp.
3667
06db92f0
DE
36682012-01-09 Doug Evans <dje@google.com>
3669
3670 * server.c (start_inferior): Set last_ptid in --wrapper case.
3671
32d92999
YQ
36722012-01-06 Yao Qi <yao@codesourcery.com>
3673
3674 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3675 defined.
3676 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3677
5e0a92a9
YQ
36782012-01-04 Yao Qi <yao@codesourcery.com>
3679
3680 * tracepoint.c (cmd_qtdp): Print debug message
3681 for static tracepoint.
3682
ae639e8c
YQ
36832012-01-04 Yao Qi <yao@codesourcery.com>
3684
3685 * tracepoint.c (trace_vdebug): Differentiate debug message
3686 between gdbserver and IPA.
3687
f72429c5
YQ
36882012-01-03 Yao Qi <yao@codesourcery.com>
3689
3690 * tracepoint.c (tracepoint_was_hit): Don't collect for
3691 static tracepoint.
3692
12c3e59c
JB
36932012-01-02 Joel Brobecker <brobecker@adacore.com>
3694
3695 * terminal.h: Reformat copyright header.
3696
67827812
JB
36972012-01-02 Joel Brobecker <brobecker@adacore.com>
3698
3699 * server.c (gdbserver_version): Update copyright year.
3700 * gdbreplay.c (gdbreplay_version): Likewise.
3701
3e52c33d
JK
37022011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3703
3704 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3705
3706 Revert:
3707 2011-12-18 Hui Zhu <teawater@gmail.com>
3708 * linux-low.c (linux_create_inferior): Save return value to ret.
3709
66f1260e
HZ
37102011-12-18 Hui Zhu <teawater@gmail.com>
3711
3712 * linux-low.c (linux_create_inferior): Save return value to ret.
3713
e77616d7
DE
37142011-12-16 Doug Evans <dje@google.com>
3715
e7b06c57
DE
3716 * linux-low.c (linux_create_inferior): If stdio connection,
3717 redirect stdin from /dev/null, stdout to stderr.
3718 * remote-utils.c (remote_is_stdio): New static global.
3719 (remote_connection_is_stdio): New function.
3720 (remote_prepare): Handle stdio connection.
3721 (remote_open): Ditto.
3722 (remote_close): Don't close stdin for stdio connections.
3723 (read_prim,write_prim): New functions. Replace all calls to
3724 read/write to these.
3725 * server.c (main): Watch for "-" argument. Move call to
3726 remote_prepare before start_inferior.
3727 * server.h (STDIO_CONNECTION_NAME): New macro.
3728 (remote_connection_is_stdio): Declare.
3729
e77616d7
DE
3730 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3731 in debugging output.
3732
82067193
YQ
37332011-12-15 Yao Qi <yao@codesourcery.com>
3734
3735 * tracepoint.c: Include sys/syscall.h.
3736 (gdb_ust_thread): Remove preprocessor conditional.
3737
82bfbe7e
PA
37382011-12-14 Pedro Alves <pedro@codesourcery.com>
3739
3740 * linux-low.c (linux_detach_one_lwp): Call
3741 the_low_target.prepare_to_resume before detaching.
3742
712c6575
YQ
37432011-12-14 Yao Qi <yao@codesourcery.com>
3744
3745 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3746 of write.
3747
d54d1edf
YQ
37482011-12-14 Yao Qi <yao@codesourcery.com>
3749
3750 * i386-low.c (i386_low_stopped_data_address): Initialize local
3751 variable `control'.
3752
6210a125
PA
37532011-12-13 Pedro Alves <pedro@codesourcery.com>
3754
3755 PR remote/13492
3756
3757 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3758 DR_CONTROL unless necessary. Extend comments.
3759 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3760 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3761
2ece8244
YQ
37622011-12-13 Yao Qi <yao@codesourcery.com>
3763
3764 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3765 macros.
3766 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3767
784867a5
JK
37682011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3769
3770 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3771 Print new debug message for such case.
3772
6bf36717
JK
37732011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3774
3775 Fix overlapping memcpy.
3776 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3777 the read_inferior_memory transfer.
3778 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3779 write_inferior_memory transfer.
3780 (set_fast_tracepoint_jump): New variable buf. Use it for the
3781 read_inferior_memory and write_inferior_memory transfers.
3782 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3783 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3784 Use it for the write_inferior_memory transfer.
3785 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3786 buffers.
3787
50275556
MR
37882011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3789
3790 * linux-low.c (fetch_register, store_register): Make code
3791 consistent, fix formatting.
3792
7325beb4
MR
37932011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3794
3795 * linux-low.c (usr_store_inferior_registers): Factor out code
3796 to handle individual registers into...
3797 (store_register): ... this new function.
3798
c642a434
UW
37992011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3800
3801 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3802 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3803 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3804 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3805 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3806 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3807 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3808 (srv_xmlfiles): Add new XML files.
3809
3810 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3811 and <sys/uio.h>.
3812 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3813 (init_registers_s390_linux32v1): Add prototype.
3814 (init_registers_s390_linux32v2): Likewise.
3815 (init_registers_s390_linux64v1): Likewise.
3816 (init_registers_s390_linux64v2): Likewise.
3817 (init_registers_s390x_linux64v1): Likewise.
3818 (init_registers_s390x_linux64v2): Likewise.
3819 (s390_num_regs): Increment to 52.
3820 (s390_regmap): Add orig_r2 register.
3821 (s390_num_regs_3264): Increment to 68.
3822 (s390_regmap_3264): Add orig_r2 register.
3823 (s390_collect_ptrace_register): Handle orig_r2 register.
3824 (s390_supply_ptrace_register): Likewise.
3825 (s390_fill_last_break): New function.
3826 (s390_store_last_break): Likewise.
3827 (s390_fill_system_call): New function.
3828 (s390_store_system_call): Likewise.
3829 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3830 register sets.
3831 (s390_check_regset): New function.
3832 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3833 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3834 Update target_regsets for available register sets.
3835
2268b414
JK
38362011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3837 Jan Kratochvil <jan.kratochvil@redhat.com>
3838
3839 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3840 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3841 New.
3842 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3843 * linux-low.h (struct process_info_private): New member r_debug.
3844 * server.c (handle_qxfer_libraries): Call
3845 the_target->qxfer_libraries_svr4.
3846 (handle_qxfer_libraries_svr4): New function.
3847 (qxfer_packets): New entry "libraries-svr4".
3848 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3849 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3850 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3851 PACKET_qXfer_libraries_svr4.
3852
d6db1fab
UW
38532011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3854
3855 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3856 PSW address/mask between 8-byte and 16-byte formats.
3857 (s390_supply_ptrace_register): Likewise.
3858 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3859 basic addressing mode bit.
3860
242f5f1c
SS
38612011-11-24 Stan Shebs <stan@codesourcery.com>
3862
3863 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3864
f196051f
SS
38652011-11-17 Stan Shebs <stan@codesourcery.com>
3866
3867 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3868 (tracing_start_time): New global.
3869 (tracing_stop_time): New global.
3870 (tracing_user_name): New global.
3871 (tracing_notes): New global.
3872 (tracing_stop_note): New global.
3873 (cmd_qtstart): Set traceframe_usage, start_time.
3874 (stop_tracing): Set stop_time.
3875 (cmd_qtstatus): Report additional status.
3876 (cmd_qtp): New function.
3877 (handle_tracepoint_query): Call it.
3878 (cmd_qtnotes): New function.
3879 (handle_tracepoint_general_set): Call it.
3880 (get_timestamp): Rename from tsv_get_timestamp.
3881
405f8e94
SS
38822011-11-14 Stan Shebs <stan@codesourcery.com>
3883 Kwok Cheung Yeung <kcy@codesourcery.com>
3884
3885 * linux-x86-low.c (small_jump_insn): New.
3886 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3887 trampoline and error message, build a trampoline and issue a small
3888 jump instruction to it.
3889 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3890 trampoline and error message.
3891 (x86_get_min_fast_tracepoint_insn_len): New.
3892 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3893 * linux-low.h (struct linux_target_ops): Add arguments to
3894 install_fast_tracepoint_jump_pad operation, add new operation.
3895 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3896 arguments.
3897 (linux_get_min_fast_tracepoint_insn_len): New function.
3898 (linux_target_op): Add new operation.
3899 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3900 (gdb_trampoline_buffer_end): Ditto.
3901 (gdb_trampoline_buffer_error): Ditto.
3902 (struct ipa_sym_addresses): Add fields for new IPA variables.
3903 (symbol_list): Add entries for new IPA variables.
3904 (struct tracepoint): Add fields to hold the address range of the
3905 trampoline used by the tracepoint.
3906 (trampoline_buffer_head): New static variable.
3907 (trampoline_buffer_tail): Ditto.
3908 (claim_trampoline_space): New function.
3909 (have_fast_tracepoint_trampoline_buffer): New function.
3910 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
3911 structure.
3912 (install_fast_tracepoint): Ditto, also add error buffer argument.
3913 (cmd_qtminftpilen): New function.
3914 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
3915 (fast_tracepoint_from_trampoline_address): New function.
3916 (fast_tracepoint_collecting): Handle trampoline as part of jump
3917 pad space.
3918 (set_trampoline_buffer_space): New function.
3919 (initialize_tracepoint): Initialize new IPA variables.
3920 * target.h (struct target_ops): Add arguments to
3921 install_fast_tracepoint_jump_pad operation, add new
3922 get_min_fast_tracepoint_insn_len operation.
3923 (target_get_min_fast_tracepoint_insn_len): New.
3924 (install_fast_tracepoint_jump_pad): Add arguments.
3925 * server.h (IPA_BUFSIZ): Define.
3926 * linux-i386-ipa.c: Include extra header files.
3927 (initialize_fast_tracepoint_trampoline_buffer): New function.
3928 (initialize_low_tracepoint): Call it.
3929 * server.h (set_trampoline_buffer_space): Declare.
3930 (claim_trampoline_space): Ditto.
3931 (have_fast_tracepoint_trampoline_buffer): Ditto.
3932
1e4d1764
YQ
39332011-11-14 Yao Qi <yao@codesourcery.com>
3934
3935 * server.c (handle_query): Handle InstallInTrace for qSupported.
3936 * tracepoint.c (add_tracepoint): Sort list.
3937 (install_tracepoint, download_tracepoint): New.
3938 (cmd_qtdp): Call them to install and download tracepoints.
3939 (sort_tracepoints): Removed.
3940 (cmd_qtstart): Update.
3941
5c73ff4e
YQ
39422011-11-14 Yao Qi <yao@codesourcery.com>
3943
3944 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
3945 * mem-break.h: Declare.
3946 * tracepoint.c (cmd_qtstart): Move some code to ...
3947 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
3948 New.
3949 (download_tracepoints): Move some code to ...
3950 (download_tracepoint_1): ... here. New.
3951
86a30030
YQ
39522011-11-08 Yao Qi <yao@codesourcery.com>
3953
3954 * remote-utils.c (relocate_instruction): A comment fix.
3955
8d26e50c
JB
39562011-11-07 Joel Brobecker <brobecker@adacore.com>
3957
3958 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
3959 (i386_dr_low_get_control, i386_dr_low_get_status): Use
3960 dr_status_mirror and dr_control_mirror from debug_reg_state.
3961 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
3962 (i386_initial_stuff): Remove use of deleted globals.
3963 (i386_get_thread_context, i386_set_thread_context,
3964 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3965 from debug_reg_state.
3966
a59306a3
YQ
39672011-11-05 Yao Qi <yao@codesourcery.com>
3968
3969 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3970 address as TPOINT's.
3971
3065dfb6
SS
39722011-11-02 Stan Shebs <stan@codesourcery.com>
3973
3974 * tracepoint.c (agent_mem_read_string): New function.
3975 (eval_agent_expr): Call it for tracenz.
3976 * server.c (handle_query): Report support for tracenz.
3977
fd0d8c7c
YQ
39782011-11-02 Yao Qi <yao@codesourcery.com>
3979
3980 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3981
609086b1
YQ
39822011-11-02 Yao Qi <yao@codesourcery.com>
3983
3984 * target.h: Fix a typo in comment.
3985
b9fd1791
PA
39862011-10-31 Pedro Alves <pedro@codesourcery.com>
3987
3988 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3989 clobber the breakpoints' shadows with fast tracepoint jumps.
3990 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3991 * target.c (write_inferior_memory): Also pass MYADDR down to
3992 check_mem_write.
3993
03583c20
UW
39942011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3995
3996 * configure.ac: Check support for personality routine.
3997 * configure: Regenerate.
3998 * config.in: Likewise.
3999 * linux-low.c: Include <sys/personality.h>.
4000 Define ADDR_NO_RANDOMIZE if necessary.
4001 (linux_create_inferior): Disable address space randomization when
4002 forking inferior, if requested.
4003 (linux_supports_disable_randomization): New function.
4004 (linux_target_ops): Install it.
4005 * server.h (disable_randomization): Declare.
4006 * server.c (disable_randomization): New global variable.
4007 (handle_general_set): Handle QDisableRandomization.
4008 (handle_query): Likewise for qSupported.
4009 (main): Support --disable-randomization and --no-disable-randomization
4010 command line arguments.
4011 * target.h (struct target_ops): Add supports_disable_randomization.
4012 (target_supports_disable_randomization): New macro.
4013
723b724b
MF
40142011-09-29 Mike Frysinger <vapier@gentoo.org>
4015
4016 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4017 ifdef check.
4018 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4019 [!PT_GETDSBT] (target_loadmap): New definition.
4020 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4021 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4022 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4023 and PT_GETDSBT to LINUX_LOADMAP.
4024 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4025 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4026
55329a5c 40272011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4028
4029 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4030 (arm_linux_hwbp_cap): New static variable.
4031 (arm_linux_get_hwbp_cap): Replace by ...
4032 (arm_linux_init_hwbp_cap): ... this new function.
4033 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4034 (arm_linux_get_hw_watchpoint_count): Likewise.
4035 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4036 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4037 (arm_prepare_to_resume): Use perror_with_name instead of error.
4038
55329a5c 40392011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4040
4041 * linux-arm-low.c: Include <signal.h>.
4042 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4043 (struct arm_linux_hwbp_cap): New data type.
4044 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4045 (struct arm_linux_hw_breakpoint): New data type.
4046 (MAX_BPTS, MAX_WPTS): Define.
4047 (struct arch_process_info, struct arch_lwp_info): New data types.
4048 (arm_linux_get_hwbp_cap): New function.
4049 (arm_linux_get_hw_breakpoint_count): Likewise.
4050 (arm_linux_get_hw_watchpoint_count): Likewise.
4051 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4052 (arm_hwbp_control_initialize): Likewise.
4053 (arm_hwbp_control_is_enabled): Likewise.
4054 (arm_hwbp_control_is_initialized): Likewise.
4055 (arm_hwbp_control_disable): Likewise.
4056 (arm_linux_hw_breakpoint_equal): Likewise.
4057 (arm_linux_hw_point_initialize): Likewise.
4058 (struct update_registers_data): New data structure.
4059 (update_registers_callback: New function.
4060 (arm_insert_point): Likewise.
4061 (arm_remove_point): Likewise.
4062 (arm_stopped_by_watchpoint): Likewise.
4063 (arm_stopped_data_address): Likewise.
4064 (arm_new_process): Likewise.
4065 (arm_new_thread): Likewise.
4066 (arm_prepare_to_resume): Likewise.
4067 (the_low_target): Register arm_insert_point, arm_remove_point,
4068 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4069 arm_new_thread, and arm_prepare_to_resume.
4070
6b9801d4
SS
40712011-09-15 Stan Shebs <stan@codesourcery.com>
4072
4073 * server.h (struct emit_ops): Add compare-goto fields.
4074 * tracepoint.c (gdb_agent_op_sizes): New table.
4075 (emit_eq_goto): New function.
4076 (emit_ne_goto): New function.
4077 (emit_lt_goto): New function.
4078 (emit_le_goto): New function.
4079 (emit_gt_goto): New function.
4080 (emit_ge_goto): New function.
4081 (is_goto_target): New function.
4082 (compile_bytecodes): Recognize special cases of compare-goto
4083 combinations and call specialized emitters for them.
4084 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4085 (amd64_emit_ne_goto): New function.
4086 (amd64_emit_lt_goto): New function.
4087 (amd64_emit_le_goto): New function.
4088 (amd64_emit_gt_goto): New function.
4089 (amd64_emit_ge_goto): New function.
4090 (amd64_emit_ops): Add the new functions.
4091 (i386_emit_eq_goto): New function.
4092 (i386_emit_ne_goto): New function.
4093 (i386_emit_lt_goto): New function.
4094 (i386_emit_le_goto): New function.
4095 (i386_emit_gt_goto): New function.
4096 (i386_emit_ge_goto): New function.
4097 (i386_emit_ops): Add the new functions.
4098
bf15cbda
SS
40992011-09-08 Stan Shebs <stan@codesourcery.com>
4100
4101 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4102 (i386_emit_epilogue): Restore %ebx.
4103
943ca1dd
JZ
41042011-08-31 Jie Zhang <jzhang918@gmail.com>
4105
4106 * server.c (step_thread): Remove definition.
4107 (process_serial_event): Don't handle Hs.
4108 * server.h (step_thread): Remove declaration.
4109 * target.c (set_desired_inferior): Remove use of step_thread.
4110
e3deef73
LM
41112011-08-24 Luis Machado <lgustavo@codesourcery.com>
4112
4113 * linux-low.c: Include linux-procfs.h.
4114 (linux_attach_lwp_1): Update comments.
4115 (linux_attach): Scan for existing threads when attaching to a
4116 process that is the tgid.
4117 * Makefile.in: Update dependencies.
4118
13da1c97
LM
41192011-08-24 Luis Machado <lgustavo@codesourcery.com>
4120
4121 * configure.srv: Add linux-procfs.o dependencies.
4122
881127c9
YQ
41232011-08-14 Yao Qi <yao@codesourcery.com>
4124
4125 * target.h (struct target_ops): Fix indent.
4126 * win32-low.c (win32_target_ops): Fix comment.
4127
58dbd541
YQ
41282011-08-14 Andrew Jenner <andrew@codesourcery.com>
4129 Yao Qi <yao@codesourcery.com>
4130
4131 * Makefile.in (clean): Remove tic6x-*.c files.
4132 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4133 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4134 (tic6x-c64xp-linux.c): Likewise.
4135 * configure.srv: Add support for tic6x-*-uclinux.
4136 * linux-tic6x-low.c: New.
4137 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4138
78d85199
YQ
41392011-08-14 Andrew Stubbs <ams@codesourcery.com>
4140 Yao Qi <yao@codesourcery.com>
4141
4142 * target.h (struct target_ops): Add read_loadmap.
4143 * linux-low.c (struct target_loadseg): New type.
4144 (struct target_loadmap): New type.
4145 (linux_read_loadmap): New function.
4146 (linux_target_ops): Add linux_read_loadmap.
4147 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4148 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4149 to NULL.
78d85199 4150
a959a88d
EZ
41512011-08-05 Eli Zaretskii <eliz@gnu.org>
4152
4153 * win32-low.c: Include <stdint.h>.
4154
1ced966e
PA
41552011-07-22 Pedro Alves <pedro@codesourcery.com>
4156
4157 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4158 to the inferior here.
4159 (i386_remove_aligned_watchpoint): Ditto.
4160 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4161 fit part of the watchpoint in the debug registers.
4162 (i386_update_inferior_debug_regs): New.
4163 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4164 registers, and only update the inferior on success.
4165 (i386_low_remove_watchpoint): Ditto.
4166
d26e3629
KY
41672011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4168
4169 * linux-low.c (compare_ints, unique, list_threads, show_process,
4170 linux_core_of_thread): Delete.
4171 (linux_target_ops): Change linux_core_of_thread to
4172 linux_common_core_of_thread.
4173 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4174 * utils.c (malloc_failure): Change type of argument.
4175 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4176 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4177 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4178 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4179 (IPA_OBJS): Add common-utils-ipa.o.
4180 (ptid_h, linux_osdata_h): New macros.
4181 (server_h): Add common/common-utils.h, common/xml-utils.h,
4182 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4183 common/ptid.h.
4184 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4185 ptid.o, buffer.o): New rules.
4186 (linux-low.o): Add common/linux-osdata.h as a dependency.
4187 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4188 * configure.ac: Add AC_HEADER_DIRENT check.
4189 * config.in: Regenerate.
4190 * configure: Regenerate.
4191 * remote-utils.c (xml_escape_text): Delete.
4192 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4193 buffer_xml_printf): Move to common/buffer.c.
4194 * server.c (main): Remove call to initialize_inferiors.
4195 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4196 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4197 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4198 internal_error, gdb_assert, gdb_assert_fail): Delete.
4199 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4200 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4201 common/buffer.h.
4202 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4203 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4204 initialize_inferiors): Delete.
4205
2275a1a7
PA
42062011-07-20 Pedro Alves <pedro@codesourcery.com>
4207
4208 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4209 symbol error.
4210
0a5b1e09
PA
42112011-05-31 Pedro Alves <pedro@codesourcery.com>
4212
4213 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4214 assertion.
4215 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4216
6938fd34
YQ
42172011-05-26 Yao Qi <yao@codesourcery.com>
4218
4219 * Makefile.in (thread-db.o): Track dependence to
4220 common/gdb_thread_db.h.
4221 * thread-db.c: include gdb_thread_db.h from right place.
4222
b481f9e0
TT
42232011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4224
4225 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4226 __FILE__ and __LINE__ to internal_error.
4227
98a5dd13
DE
42282011-05-13 Doug Evans <dje@google.com>
4229
4230 * thread-db.c (try_thread_db_load_from_sdir): New function.
4231 (try_thread_db_load_from_dir): New function.
4232 (thread_db_load_search): Handle $sdir, ignore $pdir.
4233 Remove trying of system directories if search of
4234 libthread-db-search-path fails, that is now done via $sdir.
4235
d248b706
KY
42362011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4237
4238 * server.c (handle_query): Add EnableDisableTracepoints to the list
4239 of supported features.
43aaf8b6 4240 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4241 tracepoints.
43aaf8b6
PA
4242 (cmd_qtenable_disable): New.
4243 (cmd_qtstart): Install tracepoints even if disabled.
4244 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4245 receiving a QTEnable or QTDisable packet.
4246 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4247 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4248 tracepoints.
4249 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4250
84e578fb
DE
42512011-05-10 Doug Evans <dje@google.com>
4252
4253 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4254
71f55dd8
DE
42552011-05-04 Doug Evans <dje@google.com>
4256
4257 * linux-low.c (linux_join): Skip process lookup.
4258 * spu-low.c (spu_join): Ditto.
4259 * server.c (join_inferiors_callback): Delete.
4260 (process_serial_event): For 'D' packet (detach) call join_inferior
4261 directly.
4262
4d393d60
JM
42632011-05-04 Joseph Myers <joseph@codesourcery.com>
4264
4265 * README: Don't mention xscale*-*-linux*.
4266 * configure.srv (xscale*-*-linux*): Don't handle target.
4267
b00ad6ff
NF
42682011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4269
4270 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4271 casting pointers.
4272 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4273 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4274 (i386_emit_void_call_2): Likewise.
4275
af96c192
YQ
42762011-04-26 Yao Qi <yao@codesourcery.com>
4277
43aaf8b6
PA
4278 * linux-low.c: Move common macros to linux-ptrace.h.
4279 Include linux-ptrace.h.
af96c192
YQ
4280 * Makefile.in (linux_ptrace_h): New.
4281 (linux-low.o): Depends on linux-ptrace.h.
4282
03f2bd59
JK
42832011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4284
4285 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4286 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4287 (remote_prepare): New function with most of the TCP code from ...
4288 (remote_open): ... here. Detect PORT here unconditionally. Move also
4289 setting transport_is_reliable.
4290 * server.c (run_once): New variable.
4291 (gdbserver_usage): Document it.
4292 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4293 the first run if RUN_ONCE.
4294 * server.h (run_once, remote_prepare): New declarations.
4295
7a9dd1b2
TT
42962011-04-19 Tom Tromey <tromey@redhat.com>
4297
4298 * win32-low.c (handle_load_dll): Remove duplicate "the".
4299
81239425
PM
43002011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4301
4302 Remove support for old Cygwin 1.5 versions.
4303 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4304 function to avoid warning.
4305 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4306 warning.
4307
9e0627f1
PM
43082011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4309
4310 * gdbserver/server.h (Macro _): Define it if not available.
4311
588eebee
MS
43122011-03-14 Michael Snyder <msnyder@vmware.com>
4313
348af9f7 4314 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4315
43f70d4c
JB
43162011-03-10 Joel Brobecker <brobecker@adacore.com>
4317
4318 * Makefile.in (maintainer-clean realclean distclean): Remove
4319 "make ... subdir_do" command.
4320
348af9f7
MS
43212011-03-10 Michael Snyder <msnyder@vmware.com>
4322
4323 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4324
4325 * server.c (handle_v_run): Free alloced buffer on early return.
4326
e637a4f5
YQ
43272011-03-09 Yao Qi <yao@codesourcery.com>
4328
4329 Revert:
4330 2011-03-04 Yao Qi <yao@codesourcery.com>
4331
4332 * Makefile.in: Remove GNU make feature --directory.
4333
4334 2011-03-05 Yao Qi <yao@codesourcery.com>
4335
4336 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4337 (subdir_do): New make target. Copied from gdb/Makefile.
4338 (maintainer-clean, realclean, distclean, clean): Call corresponding
4339 make targets in common/Makefile.
4340
4341 2011-02-11 Yao Qi <yao@codesourcery.com>
4342
4343 * configure.ac: Call AC_PROG_RANLIB.
4344 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4345 * configure: Regenerate.
4346
e6edda56
JK
43472011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4348
4349 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4350
e5141119
JB
43512011-03-06 Yao Qi <yao@codesourcery.com>
4352
4353 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4354
64794aa4
JB
43552011-03-05 Yao Qi <yao@codesourcery.com>
4356
4357 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4358 (subdir_do): New make target. Copied from gdb/Makefile.
4359 (maintainer-clean, realclean, distclean, clean): Call corresponding
4360 make targets in common/Makefile.
4361
7a762829
YQ
43622011-03-04 Yao Qi <yao@codesourcery.com>
4363
4364 * Makefile.in: Remove GNU make feature --directory.
4365
348af9f7
MS
43662011-03-04 Michael Snyder <msnyder@vmware.com>
4367
4368 * server.c (queue_stop_reply): Call xmalloc not malloc.
4369
43702011-03-02 Michael Snyder <msnyder@vmware.com>
4371
4372 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4373
9f72fee2
MS
43742011-02-28 Michael Snyder <msnyder@vmware.com>
4375
588eebee
MS
4376 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4377 (cmd_qtframe): Ditto.
4378 (cmd_qtbuffer): Ditto.
4379 (cmd_bigqtbuffer): Ditto.
4380
9f72fee2
MS
4381 * utils.c (decimal2str): Initialize 'width' to nine, then
4382 don't mess with it.
4383
8040bd49
UW
43842011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4385
4386 * hostio.c (require_data): Free *data, not data.
4387
7e52cbd0
JK
43882011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4389
4390 * hostio.c (require_data): Use free, not xfree.
4391
9130f83e
MS
43922011-02-27 Michael Snyder <msnyder@vmware.com>
4393
4b812f4e
MS
4394 * server.c (handle_query): Discard unused value.
4395
9130f83e
MS
4396 * hostio.c (require_data): Free malloc memory before returning
4397 error.
4398
69d37113
MS
43992011-02-26 Michael Snyder <msnyder@vmware.com>
4400
4401 * linux-low.c (list_threads): Call closedir for dirent.
4402
35f5825a
MS
44032011-02-27 Michael Snyder <msnyder@vmware.com>
4404
2a589cef
MS
4405 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4406 a case statement falls through.
4407
0adea5f7
MS
4408 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4409
35f5825a
MS
4410 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4411 in comparison.
4412
238f1c74
MS
44132011-02-26 Michael Snyder <msnyder@vmware.com>
4414
4415 * utils.c (decimal2str): Eliminate dead code and dead param.
4416 (pulongest): Drop dead param from call to decimal2str.
4417 (plongest): Ditto.
4418
633ff500
JB
44192011-02-24 Joel Brobecker <brobecker@adacore.com>
4420
4421 Revert the following patch (not approved yet):
4422 2011-02-21 Hui Zhu <teawater@gmail.com>
4423 * tracepoint.c (tp_printf): New function.
4424 (eval_agent_expr): Handle gdb_agent_op_printf.
4425
f9c6ff72
HZ
44262011-02-21 Hui Zhu <teawater@gmail.com>
4427
4428 * tracepoint.c (tp_printf): New function.
4429 (eval_agent_expr): Handle gdb_agent_op_printf.
4430
94d5e490
TT
44312011-02-18 Tom Tromey <tromey@redhat.com>
4432
4433 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4434 (tracepoint.o): Likewise.
4435 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4436 (gdb_agent_op_names): Likewise.
4437
c7f96d2b
TT
44382011-02-18 Tom Tromey <tromey@redhat.com>
4439
4440 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4441 gdb_agent_op_rot>: New constants.
4442 (gdb_agent_op_names): Add pick and roll.
4443 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4444 cases.
4445
0feedb2c
JK
44462011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4447
4448 * aclocal.m4: Regenerated with aclocal-1.11.1.
4449
b3b9301e
PA
44502011-02-14 Pedro Alves <pedro@codesourcery.com>
4451
4452 * server.c (handle_qxfer_traceframe_info): New.
4453 (qxfer_packets): Register "traceframe-info".
4454 (handle_query): Report support for qXfer:traceframe-info:read+.
4455 * tracepoint.c (match_blocktype): New.
4456 (traceframe_find_block_type): Rename to ...
4457 (traceframe_walk_blocks): ... this. Add callback filter argument,
4458 and use it.
4459 (traceframe_find_block_type): New, reimplemented on top of
4460 traceframe_walk_blocks.
4461 (build_traceframe_info_xml): New.
4462 (traceframe_read_info): New.
4463 * server.h (traceframe_read_info): Declare.
4464
4f3e6fb7
YQ
44652011-02-11 Yao Qi <yao@codesourcery.com>
4466
4467 * configure.ac: Call AC_PROG_RANLIB.
4468 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4469 * configure: Regenerate.
4470
764880b7
PA
44712011-02-07 Pedro Alves <pedro@codesourcery.com>
4472
4473 * server.c (gdb_read_memory): Change return semantics to allow
4474 partial transfers.
4475 (handle_search_memory_1): Adjust.
4476 (process_serial_event) <'m' packet>: Handle partial transfers.
4477 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4478
1c79eb8a
PA
44792011-01-28 Pedro Alves <pedro@codesourcery.com>
4480
4481 * regcache.c (init_register_cache): Initialize
4482 regcache->register_status.
4483 (free_register_cache): Release regcache->register_status.
4484 (regcache_cpy): Copy register_status.
4485 (registers_to_string): Print 'x's for unavailable registers.
4486 (supply_register): Mark the register's status valid or
4487 unavailable, depending on whether a buffer was passed in or not.
4488 (supply_register_zeroed): New.
4489 (supply_regblock): Mark the registers' status valid or
4490 unavailable, depending on whether a buffer was passed in or not.
4491 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4492 (struct regcache): New `register_status' field.
4493 (supply_register_zeroed): Declare.
4494 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4495 supply_register_zeroed, rather than passing a NULL buffer to
4496 supply_register.
4497 * tracepoint.c (fetch_traceframe_registers): Update comment.
4498
85724a0e
PA
44992011-01-28 Pedro Alves <pedro@codesourcery.com>
4500
4501 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4502 buffer explicit.
4503
d08aafef
PA
45042011-01-25 Pedro Alves <pedro@codesourcery.com>
4505
4506 * server.h (decode_xfer_write): Change prototype.
4507 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4508 and don't extract the annex here.
4509 * server.c (decode_xfer_read): Remove `annex' parameter,
4510 and don't extract the annex here.
4511 (decode_xfer): New.
4512 (struct qxfer): New.
4513 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4514 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4515 (handle_qxfer_statictrace): New functions, abstracted out from
4516 handle_query, and made to use the struct qxfer interface.
4517 (handle_threads_qxfer_proper): Rename to ...
4518 (handle_qxfer_threads_proper): ... this.
4519 (handle_threads_qxfer): Rename to ...
4520 (handle_qxfer_threads): ... this. Adjust.
4521 (qxfer_packets): New array.
4522 (handle_qxfer): New function.
4523 (handle_query): Use handle_qxfer.
4524
493e2a69
MS
45252011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4526
4527 * gdbreplay.c: Shorten lines of >= 80 columns.
4528 * linux-low.c: Ditto.
4529 * linux-ppc-low.c: Ditto.
4530 * linux-s390-low.c: Ditto.
4531 * linux-sparc-low.c: Ditto.
4532 * linux-x86-low.c: Ditto.
4533 * linux-xtensa-low.c: Ditto.
4534 * mem-break.c: Ditto.
4535 * nto-low.c: Ditto.
4536 * regcache.h: Ditto.
4537 * remote-utils.c: Ditto.
4538 * server.c: Ditto.
4539 * server.h: Ditto.
4540 * thread-db.c: Ditto.
4541 * tracepoint.c: Ditto.
4542 * utils.c: Ditto.
4543 * win32-low.h: Ditto.
4544
44944448
JB
45452011-01-05 Joel Brobecker <brobecker@adacore.com>
4546
4547 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4548 update.
4549
71ce852c
JB
45502011-01-01 Joel Brobecker <brobecker@adacore.com>
4551
4552 * server.c (gdbserver_version): Update copyright year in version
4553 output.
4554 * gdbreplay.c (gdbreplay_version): Ditto.
4555
eb826dc6
MF
45562010-12-29 Jie Zhang <jie.zhang@analog.com>
4557
4558 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4559 * linux-bfin-low.c: New file.
4560 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4561 PT_DATA_ADDR for BFIN targets.
4562 * Makefile.in (SFILES): Add linux-bfin-low.c.
4563 (clean): Remove reg-bfin.c.
4564 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4565 * README: Mention supported Blackfin targets.
4566
39ab222a
MF
45672010-12-23 Mike Frysinger <vapier@gentoo.org>
4568
4569 * .gitignore: New file.
4570
a1f2ce7d
MF
45712010-11-16 Mike Frysinger <vapier@gentoo.org>
4572
4573 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4574
f474844c
JZ
45752010-10-22 Jie Zhang <jie@codesourcery.com>
4576
4577 * Makefile.in: Add FLAGS_TO_PASS variable.
4578 (install): Remove dependency of install-only and recursively
4579 invoke make for install-only.
4580
f1048712
DE
45812010-10-04 Doug Evans <dje@google.com>
4582
4583 * Makefile.in (uninstall): Use $(DESTDIR).
4584
b53a1623
PA
45852010-09-24 Pedro Alves <pedro@codesourcery.com>
4586
e6ee044d
PA
4587 PR gdb/11842
4588
b53a1623
PA
4589 * linux-x86-low.c (compat_siginfo_from_siginfo)
4590 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4591 si_code is < 0. Check for si_code == SI_TIMER before checking for
4592 si_code < 0.
4593
fa1bd1e4
JB
45942010-09-13 Joel Brobecker <brobecker@adacore.com>
4595
4596 * lynx-i386-low.c: New file.
4597 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4598
47fac8f8
JB
45992010-09-13 Joel Brobecker <brobecker@adacore.com>
4600
4601 * lynx-low.c (ptrace_request_to_str): Remove handling for
4602 request values that have been removed in LynxOS 5.x.
4603
1adfc54d
JB
46042010-09-13 Joel Brobecker <brobecker@adacore.com>
4605
4606 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4607 <ptrace.h>
4608
c2a66c29
NS
46092010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4610
4611 * configure.ac: Add --enable-inprocess-agent option.
4612 * configure: Rebuilt.
4613
32fcada3
YQ
46142010-09-06 Yao Qi <yao@codesourcery.com>
4615
4616 * linux-low.c (linux_kill): Remove unused variable.
4617 (linux_stabilize_threads): Likewise.
4618 * server.c (start_inferior): Likewise.
4619 (queue_stop_reply_callback): Likewise.
4620 * tracepoint.c (do_action_at_tracepoint): Likewise.
4621
0cccb683
YQ
46222010-09-06 Yao Qi <yao@codesourcery.com>
4623
4624 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4625 on return.
4626
423ec54c
JK
46272010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4628
4629 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4630
12ac6819
PA
46312010-09-06 Pedro Alves <pedro@codesourcery.com>
4632
4633 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4634 "$(IPA_DEPFILES)".
4635
8ed54b31
JB
46362010-09-01 Joel Brobecker <brobecker@adacore.com>
4637
4638 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4639 gdbserver/lynx-ppc-low.c: New files.
4640 * Makefile.in (lynx_low_h): New variable.
4641 (lynx-low.o, lynx-ppc-low.o): New rules.
4642 * configure.ac: On LynxOS, link with -lnetinet.
4643 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4644 * configure: regenerate.
4645
bb0116a4
JB
46462010-09-01 Joel Brobecker <brobecker@adacore.com>
4647
4648 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4649 * configure.ac: Add check for vasprintf and vsnprintf.
4650 * configure, config.in: Regenerate.
4651 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4652
a778ab81 46532010-09-01 Joel Brobecker <brobecker@adacore.com>
4654
4655 * gdbreplay.c: Move include of alloca.h up, next to include of
4656 malloc.h.
4657 * server.h: Add include of malloc.h.
4658 * mem-break.c: Remove include of malloc.h.
4659 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4660
8b034a19 46612010-09-01 Joel Brobecker <brobecker@adacore.com>
4662
4663 * Makefile.in (memmem.o): Build with -Wno-error.
4664
46652010-09-01 Joel Brobecker <brobecker@adacore.com>
4666
4667 * utils.c (xsnprintf): Make non-static.
4668 * server.h: Add xsnprintf declaration.
4669 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4670 replace calls to snprintf by calls to xsnprintf throughout.
4671
46722010-09-01 Joel Brobecker <brobecker@adacore.com>
4673
4674 * configure.ac: Add configure check for alloca.
4675 * configure, config.in: Regenerate.
4676 * server.h: Include alloca.h if it exists.
4677 * gdbreplay.c: Include alloca.h if it exists.
4678
1a981360
PA
46792010-08-28 Pedro Alves <pedro@codesourcery.com>
4680
4681 * linux-low.c (__SIGRTMIN): Define if not already defined.
4682 (linux_create_inferior): Check for __ANDROID__ rather than
4683 __SIGRTMIN.
4684 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4685 are already deferred.
4686 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4687 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4688 stopped and already has a pending signal to report.
4689 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4690 a pending signal to report or is moving out of a jump pad.
4691 (linux_init_signals): Check for __ANDROID__ rather than
4692 __SIGRTMIN.
4693
b4d51a55
PA
46942010-08-28 Pedro Alves <pedro@codesourcery.com>
4695
4696 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4697 debug_threads check. Avoid a linear search when not doing debug
4698 output.
4699
ec48365d
PA
47002010-08-27 Pedro Alves <pedro@codesourcery.com>
4701
4702 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4703 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4704 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4705 (process_event): Change local fd's type to gdb_fildes_t.
4706 (create_file_handler): Adjust prototype.
4707 (delete_file_handler): Adjust prototype.
4708 (handle_file_event): Adjust prototype. Use pfildes.
4709 (create_file_event): Adjsut prototype.
4710 * remote-utils.c (remote_desc, listen_desc): Change type to
4711 gdb_fildes_t.
4712 * server.h: New gdb_fildes_t typedef.
4713 [USE_WIN32API]: Include winsock2.h.
4714 (delete_file_handler, add_file_handler): Adjust prototypes.
4715 (pfildes): Declare.
4716 * utils.c (pfildes): New.
4717
854d88f0
PA
47182010-08-27 Pedro Alves <pedro@codesourcery.com>
4719
4720 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4721 * configure: Regenerate.
4722
0146f85b
PA
47232010-08-27 Pedro Alves <pedro@codesourcery.com>
4724
4725 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4726 (linux_done_accessing_memory): ... this.
4727 (linux_target_ops): Adjust.
4728 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4729 * nto-low.c (nto_target_ops): Adjust comment.
4730 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4731 * spu-low.c (spu_target_ops): Adjust comment.
4732 * target.h (target_ops): Rename unprepare_to_access_memory field
4733 to done_accessing_memory.
4734 (unprepare_to_access_memory): Rename to ...
4735 (done_accessing_memory): ... this.
4736
90d74c30
PA
47372010-08-26 Pedro Alves <pedro@codesourcery.com>
4738
4739 * linux-low.c (linux_prepare_to_access_memory): New.
4740 (linux_unprepare_to_access_memory): New.
4741 (linux_target_ops): Install them.
4742 * server.c (read_memory): Rename to ...
4743 (gdb_read_memory): ... this. Use
4744 prepare_to_access_memory/prepare_to_access_memory.
4745 (write_memory): Rename to ...
4746 (gdb_write_memory): ... this. Use
4747 prepare_to_access_memory/prepare_to_access_memory.
4748 (handle_search_memory_1): Adjust.
4749 (process_serial_event): Adjust.
4750 * target.h (struct target_ops): New fields
4751 prepare_to_access_memory and unprepare_to_access_memory.
4752 (prepare_to_access_memory, unprepare_to_access_memory): New.
4753 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4754 prepare_to_access_memory/prepare_to_access_memory.
4755 * nto-low.c (nto_target_ops): Adjust.
4756 * spu-low.c (spu_target_ops): Adjust.
4757 * win32-low.c (win32_target_ops): Adjust.
4758
fd467969
PA
47592010-08-26 Pedro Alves <pedro@codesourcery.com>
4760
4761 * Makefile.in (WARN_CFLAGS): Get it from configure.
4762 (WERROR_CFLAGS): New.
4763 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4764 * configure.ac: Introduce --enable-werror, which adds -Werror to
4765 the compiler command line. Enabled by default. Disable with
4766 --disable-werror. Add -Wdeclaration-after-statement
4767 Wpointer-arith and -Wformat-nonliteral to warning flags.
4768 * configure: Regenerate.
4769
331e2f5f
PA
47702010-08-26 Pedro Alves <pedro@codesourcery.com>
4771
4772 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4773
e581f2b4
PA
47742010-08-26 Pedro Alves <pedro@codesourcery.com>
4775
4776 * gdbreplay.c (remote_error): New.
4777 (gdbchar): New.
4778 (expect): Use gdbchar. Check for error reading from GDB.
4779 Clarify sync error output.
4780 (play): Check for errors writing to GDB.
4781 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4782 * remote-utils.c (getpkt): Check for errors writing to the remote
4783 descriptor.
4784
3c11dd79
PA
47852010-08-25 Pedro Alves <pedro@codesourcery.com>
4786
4787 * linux-low.c (linux_wait_1): Move non-debugging code out of
4788 `debug_threads' control.
4789
d20a8ad9
PA
47902010-08-25 Pedro Alves <pedro@codesourcery.com>
4791
4792 * linux-low.c (linux_wait_1): Don't set last_status here.
4793 * server.c (push_event, queue_stop_reply_callback): Assert we're
4794 not pushing a TARGET_WAITKIND_IGNORE event.
4795 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4796 (myresume, handle_target_event): Set the thread's last_resume_kind
4797 and last_status from the target returned status.
4798
964e4306
PA
47992010-08-25 Pedro Alves <pedro@codesourcery.com>
4800
4801 PR threads/10729
4802
4803 * linux-x86-low.c (update_debug_registers_callback): New.
4804 (i386_dr_low_set_addr): Use it.
4805 (i386_dr_low_get_addr): New.
4806 (i386_dr_low_set_control): Use update_debug_registers_callback.
4807 (i386_dr_low_get_control): New.
4808 (i386_dr_low_get_status): Adjust.
4809 * linux-low.c (linux_stop_lwp): New.
4810 * linux-low.h (linux_stop_lwp): Declare.
4811
4812 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4813 argument instead of a i386_debug_reg_state.
4814 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4815 a i386_debug_reg_state.
4816 (i386_insert_aligned_watchpoint): Adjust.
4817 (i386_remove_aligned_watchpoint): Adjust.
4818 (i386_low_stopped_data_address): Read the debug registers from the
4819 inferior instead of from the mirrors.
4820 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4821 (i386_dr_low_get_addr): Declare.
4822 (i386_dr_low_get_control): Declare.
4823 (i386_dr_low_get_status): Change prototype.
4824
4825 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4826 (i386_dr_low_get_addr): New.
4827 (i386_dr_low_get_control): New.
4828 (i386_dr_low_get_status): Adjust prototype. Return
4829 dr_status_mirror.
4830 (i386_initial_stuff): Clear dr_status_mirror and
4831 dr_control_mirror.
4832 (i386_get_thread_context): Adjust.
4833 (i386_set_thread_context): Adjust.
4834 (i386_thread_added): Adjust.
4835
5f21a75b
PA
48362010-08-24 Pedro Alves <pedro@codesourcery.com>
4837
4838 * linux-low.h (linux_thread_area): Delete declaration.
4839
3e4c1235
TS
48402010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4841
4842 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4843 after its termination.
4844
1971b033
PA
48452010-08-09 Pedro Alves <pedro@codesourcery.com>
4846
4847 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4848 (gdb_wants_all_stopped): Delete.
4849 (linux_wait_1): Don't call them.
4850 * server.c (handle_v_cont): Tag all threads as want-stopped.
4851 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4852 stopped as "client-wants-stopped".
4853
310444ac
PA
48542010-07-31 Pedro Alves <pedro@codesourcery.com>
4855
4856 * Makefile.in (signals_h): New.
4857 (server_h): Depend on it.
4858 (server.o): Don't depend on $(signals_def).
4859 (signals.o): Depend on $(signals_def).
4860
a19cae16
JK
48612010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4862
4863 * Makefile.in (signals_def): New.
4864 (server_h): Append include/gdb/signals.h and signals_def.
4865 (server.o): Append signals_def.
4866
30d50328
JK
48672010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4868
4869 * server.c (handle_target_event): Use target_signal_to_host for
4870 resume_info.sig initialization.
4871 * target.h (struct thread_resume) <sig>: New comment.
4872
5c3216e2
OS
48732010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4874
c6f46ca0
OS
4875 * server.c (handle_query): strcpy() the returned string from paddress()
4876 instead of sprintf().
5c3216e2
OS
4877 * utils.c (paddress): Return phex_nz().
4878
6bd31874
JB
48792010-07-07 Joel Brobecker <brobecker@adacore.com>
4880
4881 * server.c (handle_v_cont): Call mourn_inferior if process
4882 just exited.
4883 (myresume): Likewise.
4884
0fb4aa4b
PA
48852010-07-01 Pedro Alves <pedro@codesourcery.com>
4886
4887 Static tracepoints, and integration with UST.
4888
4889 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4890 * mem-break.c (uninsert_all_breakpoints)
4891 (reinsert_all_breakpoints): New.
4892 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4893 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4894 (gdb_agent_ust_loaded, helper_thread_id)
4895 (gdb_agent_helper_thread_id): New macros.
4896 (struct ipa_sym_addresses): Add addr_ust_loaded,
4897 addr_helper_thread_id, addr_cmd_buf.
4898 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4899 (in_process_agent_loaded_ust): New.
4900 (write_e_ust_not_loaded): New.
4901 (maybe_write_ipa_ust_not_loaded): New.
4902 (struct collect_static_trace_data_action): New.
4903 (enum tracepoint_type) <static_tracepoint>: New.
4904 (struct tracepoint) <handle>: Mention static tracepoints.
4905 (struct static_tracepoint_ctx): New.
4906 (CMD_BUF_SIZE): New.
4907 (add_tracepoint_action): Handle static tracepoint actions.
4908 (unprobe_marker_at): New.
4909 (clear_installed_tracepoints): Handle static tracepoints.
4910 (cmd_qtdp): Handle static tracepoints.
4911 (probe_marker_at): New.
4912 (cmd_qtstart): Handle static tracepoints.
4913 (response_tracepoint): Handle static tracepoints.
4914 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
4915 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
4916 (get_context_regcache): Handle static tracepoints.
4917 (do_action_at_tracepoint): Handle static tracepoint actions.
4918 (traceframe_find_block_type): Handle static trace data blocks.
4919 (traceframe_read_sdata): New.
4920 (download_tracepoints): Download static tracepoint actions.
4921 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
4922 (GDB_PROBE_NAME): New.
4923 (ust_ops): New.
4924 (GET_UST_SYM): New.
4925 (USTF): New.
4926 (dlsym_ust): New.
4927 (ust_marker_to_static_tracepoint): New.
4928 (gdb_probe): New.
4929 (collect_ust_data_at_tracepoint): New.
4930 (gdb_ust_probe): New.
4931 (UNIX_PATH_MAX, SOCK_DIR): New.
4932 (gdb_ust_connect_sync_socket): New.
4933 (resume_thread, stop_thread): New.
4934 (run_inferior_command): New.
4935 (init_named_socket): New.
4936 (gdb_ust_socket_init): New.
4937 (cstr_to_hexstr): New.
4938 (next_st): New.
4939 (first_marker, next_marker): New.
4940 (response_ust_marker): New.
4941 (cmd_qtfstm, cmd_qtsstm): New.
4942 (unprobe_marker_at, probe_marker_at): New.
4943 (cmd_qtstmat, gdb_ust_thread): New.
4944 (gdb_ust_init): New.
4945 (initialize_tracepoint_ftlib): Call gdb_ust_init.
4946 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
4947 (ST_REGENTRY): New.
4948 (x86_64_st_collect_regmap): New.
4949 (X86_64_NUM_ST_COLLECT_GREGS): New.
4950 (AMD64_RIP_REGNUM): New.
4951 (supply_static_tracepoint_registers): New.
4952 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
4953 (ST_REGENTRY): New.
4954 (i386_st_collect_regmap): New.
4955 (i386_NUM_ST_COLLECT_GREGS): New.
4956 (supply_static_tracepoint_registers): New.
4957 * server.c (handle_query): Handle qXfer:statictrace:read.
4958 <qSupported>: Report support for StaticTracepoints, and
4959 qXfer:statictrace:read features.
4960 * server.h (traceframe_read_sdata)
4961 (supply_static_tracepoint_registers): Declare.
4962 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4963 (unpack_varlen_hex): Include in IPA build.
4964 * Makefile.in (ustlibs, ustinc): New.
4965 (IPA_OBJS): Add remote-utils-ipa.o.
4966 ($(IPA_LIB)): Link -ldl and -lpthread.
4967 (UST_CFLAGS): New.
4968 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4969 * config.in, configure: Regenerate.
4970
9e4344e5
PA
49712010-06-20 Ian Lance Taylor <iant@google.com>
4972 Pedro Alves <pedro@codesourcery.com>
4973
4974 * linux-x86-low.c (always_true): Delete.
4975 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4976 trying to fool the compiler with always_true.
4977
c6beb2cb
PA
49782010-06-20 Pedro Alves <pedro@codesourcery.com>
4979
4980 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4981 conditions in gdbserver.
4982
d2ed6730
UW
49832010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4984
4985 * spu-low.c (spu_read_memory): Wrap around local store limit.
4986 (spu_write_memory): Likewise.
4987
4e29fb54
PA
49882010-06-15 Pedro Alves <pedro@codesourcery.com>
4989
4990 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4991 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4992 LONGEST uses.
4993 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4994 uses.
4995 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4996 uses with LONGEST uses.
4997
6a271cae
PA
49982010-06-14 Stan Shebs <stan@codesourcery.com>
4999 Pedro Alves <pedro@codesourcery.com>
5000
5001 Bytecode compiler.
5002
5003 * linux-x86-low.c: Include limits.h.
5004 (add_insns): New.
5005 (always_true): New.
5006 (EMIT_ASM): New.
5007 (EMIT_ASM32): New.
5008 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5009 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5010 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5011 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5012 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5013 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5014 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5015 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5016 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5017 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5018 (amd64_emit_void_call_2): New.
5019 (amd64_emit_ops): New.
5020 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5021 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5022 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5023 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5024 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5025 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5026 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5027 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5028 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5029 (i386_emit_stack_adjust, i386_emit_int_call_1)
5030 (i386_emit_void_call_2): New.
5031 (i386_emit_ops): New.
5032 (x86_emit_ops): New.
5033 (the_low_target): Install x86_emit_ops.
5034 * server.h (struct emit_ops): New.
5035 (get_raw_reg_func_addr): Declare.
5036 (current_insn_ptr, emit_error): Declare.
5037 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5038 (set_trace_state_variable_value): New defines.
5039 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5040 addr_get_trace_state_variable_value and
5041 addr_set_trace_state_variable_value.
5042 (symbol_list): New fields for get_raw_reg,
5043 get_trace_state_variable_value and set_trace_state_variable_value.
5044 (condfn): New typedef.
5045 (struct tracepoint): New field `compiled_cond'.
5046 (do_action_at_tracepoint): Clear compiled_cond.
5047 (get_trace_state_variable_value, set_trace_state_variable_value):
5048 Export in the IPA.
5049 (condition_true_at_tracepoint): If there's a compiled condition,
5050 run that.
5051 (current_insn_ptr, emit_error): New globals.
5052 (struct bytecode_address): New.
5053 (get_raw_reg_func_addr): New.
5054 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5055 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5056 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5057 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5058 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5059 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5060 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5061 (compile_tracepoint_condition, compile_bytecodes): New.
5062 * target.h (emit_ops): Forward declare.
5063 (struct target_ops): New field emit_ops.
5064 (target_emit_ops): New.
5065 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5066 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5067 * linux-low.c (linux_emit_ops): New.
5068 (linux_target_ops): Install it.
5069 * linux-low.h (struct linux_target_ops): New field emit_ops.
5070
92b72907
UW
50712010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5072
5073 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5074 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5075
fa593d66
PA
50762010-06-01 Pedro Alves <pedro@codesourcery.com>
5077 Stan Shebs <stan@codesourcery.com>
5078
5079 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5080 (all): Depend on $(extra_libraries).
5081 (install-only): Install the IPA.
5082 (IPA_OBJS, IPA_LIB): New.
5083 (clean): Remove the IPA lib.
5084 (IPAGENT_CFLAGS): New.
5085 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5086 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5087 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5088 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5089 * configure.ac: Check for atomic builtins support in the compiler.
5090 (IPA_DEPFILES, extra_libraries): Define.
5091 * configure.srv (ipa_obj): Add description.
5092 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5093 (i[34567]86-*-linux*): Set ipa_obj.
5094 (x86_64-*-linux*): Set ipa_obj.
5095 * linux-low.c (stabilizing_threads): New.
5096 (supports_fast_tracepoints): New.
5097 (linux_detach): Stabilize threads before detaching.
5098 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5099 the lwp is either not stabilizing, or is moving out of a jump pad.
5100 (linux_fast_tracepoint_collecting): New.
5101 (maybe_move_out_of_jump_pad): New.
5102 (enqueue_one_deferred_signal): New.
5103 (dequeue_one_deferred_signal): New.
5104 (linux_wait_for_event_1): If moving out of a jump pad, defer
5105 pending signals to later.
5106 (linux_stabilize_threads): New.
5107 (linux_wait_1): Check if threads need moving out of jump pads, and
5108 do it if so.
5109 (stuck_in_jump_pad_callback): New.
5110 (move_out_of_jump_pad_callback): New.
5111 (lwp_running): New.
5112 (linux_resume_one_lwp): Handle moving out of jump pads.
5113 (linux_set_resume_request): Dequeue deferred signals.
5114 (need_step_over_p): Also step over fast tracepoint jumps.
5115 (start_step_over): Also uninsert fast tracepoint jumps.
5116 (finish_step_over): Also reinsert fast tracepoint jumps.
5117 (linux_install_fast_tracepoint_jump): New.
5118 (linux_target_ops): Install linux_stabilize_threads and
5119 linux_install_fast_tracepoint_jump_pad.
5120 * linux-low.h (linux_target_ops) <get_thread_area,
5121 install_fast_tracepoint_jump_pad>: New fields.
5122 (struct lwp_info) <collecting_fast_tracepoint,
5123 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5124 (linux_get_thread_area): Declare.
5125 * linux-x86-low.c (jump_insn): New.
5126 (x86_get_thread_area): New.
5127 (append_insns): New.
5128 (push_opcode): New.
5129 (amd64_install_fast_tracepoint_jump_pad): New.
5130 (i386_install_fast_tracepoint_jump_pad): New.
5131 (x86_install_fast_tracepoint_jump_pad): New.
5132 (the_low_target): Install x86_get_thread_area and
5133 x86_install_fast_tracepoint_jump_pad.
5134 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5135 (struct fast_tracepoint_jump): New.
5136 (fast_tracepoint_jump_insn): New.
5137 (fast_tracepoint_jump_shadow): New.
5138 (find_fast_tracepoint_jump_at): New.
5139 (fast_tracepoint_jump_here): New.
5140 (delete_fast_tracepoint_jump): New.
5141 (set_fast_tracepoint_jump): New.
5142 (uninsert_fast_tracepoint_jumps_at): New.
5143 (reinsert_fast_tracepoint_jumps_at): New.
5144 (set_breakpoint_at): Use write_inferior_memory.
5145 (uninsert_raw_breakpoint): Use write_inferior_memory.
5146 (check_mem_read): Mask out fast tracepoint jumps.
5147 (check_mem_write): Mask out fast tracepoint jumps.
5148 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5149 (set_fast_tracepoint_jump): Declare.
5150 (delete_fast_tracepoint_jump)
5151 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5152 (reinsert_fast_tracepoint_jumps_at): Declare.
5153 * regcache.c: Don't compile many functions when building the
5154 in-process agent library.
5155 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5156 the register buffer in the heap.
5157 (free_register_cache): If the register buffer isn't owned by the
5158 regcache, don't free it.
5159 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5160 pre-existing register caches.
5161 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5162 type.
5163 (convert_ascii_to_int): : Constify `from' parameter type.
5164 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5165 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5166 the needed buffer in-place.
5167 (relocate_instruction): New.
5168 * server.c (handle_query) <qSymbols>: If the target supports
5169 tracepoints, give it a chance of looking up symbols. Report
5170 support for fast tracepoints.
5171 (handle_status): Stabilize threads.
5172 (process_serial_event): Adjust.
5173 * server.h (struct fast_tracepoint_jump): Forward declare.
5174 (struct process_info) <fast_tracepoint_jumps>: New field.
5175 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5176 (decode_X_packet, decode_M_packet): Adjust.
5177 (relocate_instruction): Declare.
5178 (in_process_agent_loaded): Declare.
5179 (tracepoint_look_up_symbols): Declare.
5180 (struct fast_tpoint_collect_status): Declare.
5181 (fast_tracepoint_collecting): Declare.
5182 (force_unlock_trace_buffer): Declare.
5183 (handle_tracepoint_bkpts): Declare.
5184 (initialize_low_tracepoint)
5185 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5186 * target.h (struct target_ops) <stabilize_threads,
5187 install_fast_tracepoint_jump_pad>: New fields.
5188 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5189 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5190 [HAVE_STDINT_H]: Include stdint.h.
5191 (trace_debug_1): Rename to ...
5192 (trace_vdebug): ... this.
5193 (trace_debug): Rename to ...
5194 (trace_debug_1): ... this. Add `level' parameter.
5195 (trace_debug): New.
5196 (ATTR_USED, ATTR_NOINLINE): New.
5197 (IP_AGENT_EXPORT): New.
5198 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5199 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5200 (about_to_request_buffer_space, trace_buffer_is_full)
5201 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5202 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5203 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5204 (traceframe_write_count, traceframes_created)
5205 (trace_state_variables)
5206 New renaming defines.
5207 (struct ipa_sym_addresses): New.
5208 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5209 (symbol_list): New.
5210 (ipa_sym_addrs): New.
5211 (all_tracepoint_symbols_looked_up): New.
5212 (in_process_agent_loaded): New.
5213 (write_e_ipa_not_loaded): New.
5214 (maybe_write_ipa_not_loaded): New.
5215 (tracepoint_look_up_symbols): New.
5216 (debug_threads) [IN_PROCESS_AGENT]: New.
5217 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5218 (UNKNOWN_SIDE_EFFECTS): New.
5219 (stop_tracing): New.
5220 (flush_trace_buffer): New.
5221 (stop_tracing_bkpt): New.
5222 (flush_trace_buffer_bkpt): New.
5223 (read_inferior_integer): New.
5224 (read_inferior_uinteger): New.
5225 (read_inferior_data_pointer): New.
5226 (write_inferior_data_pointer): New.
5227 (write_inferior_integer): New.
5228 (write_inferior_uinteger): New.
5229 (struct collect_static_trace_data_action): Delete.
5230 (enum tracepoint_type): New.
5231 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5232 <actions_str, step_actions, step_actions_str>: Only include in
5233 GDBserver.
fa593d66
PA
5234 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5235 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5236 (tracepoints): Use IP_AGENT_EXPORT.
5237 (last_tracepoint): Don't include in the IPA.
5238 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5239 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5240 (alloced_trace_state_variables): New.
5241 (trace_state_variables): Use IP_AGENT_EXPORT.
5242 (traceframe_t): Delete unused variable.
5243 (circular_trace_buffer): Don't include in the IPA.
5244 (trace_buffer_start): Delete.
5245 (struct trace_buffer_control): New.
5246 (trace_buffer_free): Delete.
5247 (struct ipa_trace_buffer_control): New.
5248 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5249 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5250 New.
5251 (trace_buffer_ctrl): New.
5252 (TRACE_BUFFER_CTRL_CURR): New.
5253 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5254 Reimplement as macros.
5255 (trace_buffer_wrap): Delete.
5256 (traceframe_write_count, traceframe_read_count)
5257 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5258 (struct tracepoint_hit_ctx) <type>: New field.
5259 (struct fast_tracepoint_ctx): New.
5260 (memory_barrier): New.
5261 (cmpxchg): New.
5262 (record_tracepoint_error): Update atomically in the IPA.
5263 (clear_inferior_trace_buffer): New.
5264 (about_to_request_buffer_space): New.
5265 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5266 updating the same buffer.
5267 (add_tracepoint): Default the tracepoint's type to trap
5268 tracepoint, and orig_size to -1.
5269 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5270 internal variables.
5271 (create_trace_state_variable): New parameter `gdb'. Handle it.
5272 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5273 (cmd_qtdp): Handle fast tracepoints.
5274 (cmd_qtdv): Adjust.
5275 (max_jump_pad_size): New.
5276 (gdb_jump_pad_head): New.
5277 (get_jump_space_head): New.
5278 (claim_jump_space): New.
5279 (sort_tracepoints): New.
5280 (MAX_JUMP_SIZE): New.
5281 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5282 IPA.
5283 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5284 support. Upload fast traceframes, and delete internal IPA
5285 breakpoints.
5286 (stop_tracing_handler): New.
5287 (flush_trace_buffer_handler): New.
5288 (cmd_qtstop): Upload fast tracepoints.
5289 (response_tracepoint): Handle fast tracepoints.
5290 (tracepoint_finished_step): Upload fast traceframes. Set the
5291 tracepoint hit context's tracepoint type.
5292 (handle_tracepoint_bkpts): New.
5293 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5294 type. Add comment about fast tracepoints.
5295 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5296 non-existing action_str field.
5297 (get_context_regcache): Handle fast tracepoints.
5298 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5299 to the regcache.
5300 (fast_tracepoint_from_jump_pad_address): New.
5301 (fast_tracepoint_from_ipa_tpoint_address): New.
5302 (collecting_t): New.
5303 (force_unlock_trace_buffer): New.
5304 (fast_tracepoint_collecting): New.
5305 (collecting): New.
5306 (gdb_collect): New.
5307 (write_inferior_data_ptr): New.
5308 (target_tp_heap): New.
5309 (target_malloc): New.
5310 (download_agent_expr): New.
5311 (UALIGN): New.
5312 (download_tracepoints): New.
5313 (download_trace_state_variables): New.
5314 (upload_fast_traceframes): New.
5315 (IPA_FIRST_TRACEFRAME): New.
5316 (IPA_NEXT_TRACEFRAME_1): New.
5317 (IPA_NEXT_TRACEFRAME): New.
5318 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5319 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5320 (gdb_jump_pad_buffer_end): New.
5321 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5322 (initialize_tracepoint): Adjust.
5323 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5324 buffer. Initialize the low module.
5325 * utils.c (PREFIX, TOOLNAME): New.
5326 (malloc_failure): Use PREFIX.
5327 (error): In the IPA, an error causes an exit.
5328 (fatal, warning): Use PREFIX.
5329 (internal_error): Use TOOLNAME.
5330 (NUMCELLS): Increase to 10.
5331 * configure, config.in: Regenerate.
5332
d149dd1d
PA
53332010-06-01 Pedro Alves <pedro@codesourcery.com>
5334
5335 * server.c (handle_query) <qSupported>: Do two passes over the
5336 qSupported string to avoid nesting strtok.
5337
f6528abd
JK
53382010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5339
5340 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5341 (CDEPS): New.
5342 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5343 -Wl,--dynamic-list.
5344 * configure: Regenerate.
5345 * proc-service.list: New.
5346
ca2a87a0
JK
53472010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5348
5349 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5350 New comment.
5351
363a6e9f
OS
53522010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5353
5354 * gdbreplay.c (remote_open): Check error return from socket() call by
5355 its equality to -1 not by it being negative.
5356 * remote-utils.c (remote_open): Likewise.
5357
d23b6cb1
PA
53582010-05-23 Pedro Alves <pedro@codesourcery.com>
5359
5360 * config.h: Regenerate.
5361
28d3cf85
MK
53622010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5363
5364 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5365 doesn't provide PTRACE_GET_THREAD_AREA.
5366
fea36a59
MK
53672010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5368
5369 * linux-m68k-low.c: Include <asm/ptrace.h>
5370 (ps_get_thread_area): Implement.
5371
24b066ba
DE
53722010-05-03 Doug Evans <dje@google.com>
5373
5374 * event-loop.c (struct callback_event): New struct.
5375 (callback_list): New global.
5376 (append_callback_event, delete_callback_event): New functions.
5377 (process_callback): New function.
5378 (start_event_loop): Call it.
5379 * remote-utils.c (NOT_SCHEDULED): Define.
5380 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5381 moved out of readchar.
5382 (readchar): Rewrite. Call reschedule before returning.
5383 (reset_readchar): New function.
5384 (remote_close): Call it.
5385 (process_remaining, reschedule): New functions.
5386 * server.h (callback_handler_func): New typedef.
5387 (append_callback_event, delete_callback_event): Declare.
5388
9836d6ea
PA
53892010-05-03 Pedro Alves <pedro@codesourcery.com>
5390
5391 * proc-service.c (ps_pglobal_lookup): Use
5392 thread_db_look_up_one_symbol.
5393 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5394 parameter. Use it instead of all_symbols_looked_up.
5395 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5396 field.
5397 (all_symbols_looked_up): Don't declare.
5398 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5399 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5400 field.
5401 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5402 Set all_symbols_looked_up here.
5403 (thread_db_look_up_one_symbol): New.
5404 (thread_db_get_tls_address): Adjust.
5405 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5406 thread_db object on the heap, and tentatively set it in the
5407 process structure.
5408 (thread_db_init): Don't set all_symbols_looked_up here.
5409 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5410
7984d532
PA
54112010-05-03 Pedro Alves <pedro@codesourcery.com>
5412
5413 * linux-low.c (linux_kill, linux_detach): Adjust.
5414 (status_pending_p_callback): Remove redundant statement. Check
5415 for !TARGET_WAITIKIND_IGNORE, instead of
5416 TARGET_WAITKIND_STOPPED.
5417 (handle_tracepoints): Make sure LWP is locked. Adjust.
5418 (linux_wait_for_event_1): Adjust.
5419 (linux_cancel_breakpoints): New.
5420 (unsuspend_one_lwp): New.
5421 (unsuspend_all_lwps): New.
5422 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5423 (send_sigstop_callback): Change return type to int, add new
5424 `except' parameter and handle it.
5425 (suspend_and_send_sigstop_callback): New.
5426 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5427 pass them down. If SUSPEND, also increment the lwp's suspend
5428 count.
5429 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5430 (need_step_over_p): Don't consider suspended LWPs.
5431 (start_step_over): Adjust.
5432 (proceed_one_lwp): Change return type to int, add new `except'
5433 parameter and handle it.
5434 (unsuspend_and_proceed_one_lwp): New.
5435 (proceed_all_lwps): Use find_inferior instead of
5436 for_each_inferior.
5437 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5438 also decrement the suspend count of LWPs. Pass `except' down,
5439 instead of hacking its suspend count.
5440 (linux_pause_all): Add `freeze' parameter. Adjust.
5441 (linux_unpause_all): New.
5442 (linux_target_ops): Install linux_unpause_all.
5443 * server.c (handle_status): Adjust.
5444 * target.h (struct target_ops): New fields `unpause_all' and
5445 `cancel_breakpoints'. Add new parameter to `pause_all'.
5446 (pause_all): Add new `freeze' parameter.
5447 (unpause_all): New.
5448 (cancel_breakpoints): New.
5449 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5450 cancel breakpoints.
5451 (cmd_qtstart): Pause threads.
5452 (stop_tracing): Pause threads, and cancel breakpoints.
5453 * win32-low.c (win32_target_ops): Adjust.
5454
e471f25b
PA
54552010-05-03 Pedro Alves <pedro@codesourcery.com>
5456
5457 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5458 the inferior right away from here...
5459 (linux_wait_1): ... to here, and adjust to check the thread's
5460 last_resume_kind instead of the lwp's step or stop_expected flags.
5461
1915ef4f
PA
54622010-05-02 Pedro Alves <pedro@codesourcery.com>
5463
5464 * README: Use consistent `GDB' and `GDBserver' spellings.
5465
f9e39928
PA
54662010-05-02 Pedro Alves <pedro@codesourcery.com>
5467
5468 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5469 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5470 (linux_detach_one_lwp): Assume the lwp is stopped.
5471 (any_thread_of): Delete.
5472 (linux_detach): Stop all lwps here. Don't blindly delete all
5473 breakpoints.
5474 (delete_lwp_callback): New.
5475 (linux_mourn): Delete all lwps of the process that is gone.
5476 (linux_wait_1): Don't delete the last lwp of the process here.
5477 * mem-break.h (mark_breakpoints_out): Declare.
5478 * mem-break.c (mark_breakpoints_out): New.
5479 (free_all_breakpoints): Use it.
5480 * server.c (handle_target_event): If the process is gone, mark
5481 breakpoints out.
5482 * thread-db.c (struct thread_db) <create_bp>: New field.
5483 (thread_db_enable_reporting): Fix prototype. Store a thread event
5484 breakpoint reference in the thread_db struct.
5485 (thread_db_load_search): Clear the thread_db object.
5486 (try_thread_db_load_1): Ditto.
5487 (switch_to_process): New.
5488 (disable_thread_event_reporting): Use it.
5489 (remove_thread_event_breakpoints): New.
5490 (thread_db_detach, thread_db_mourn): Use it.
5491
1e7fc18c
PA
54922010-05-01 Pedro Alves <pedro@codesourcery.com>
5493
5494 * linux-low.c (linux_enable_event_reporting): New.
5495 (linux_wait_for_event_1, handle_extended_wait): Use it.
5496
02fc4de7
PA
54972010-04-30 Pedro Alves <pedro@codesourcery.com>
5498
5499 * linux-low.c (linux_kill_one_lwp, linux_kill)
5500 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5501 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5502 SIGSTOP even if the LWP is stopped.
5503 (send_sigstop_callback): New.
5504 (stop_all_lwps): Use send_sigstop_callback instead.
5505 (linux_resume_one_thread): Adjust.
5506 (proceed_one_lwp): Still proceed an LWP that the client has
5507 requested to stop, if we haven't reported it as stopped yet. Make
5508 sure that LWPs the client want stopped, have a pending SIGSTOP.
5509
bc3b5632
DE
55102010-04-26 Doug Evans <dje@google.com>
5511
ae1ada35
DE
5512 * server.c (handle_general_set): Make static.
5513
bc3b5632
DE
5514 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5515 Print received char after testing for error/eof instead of before.
5516 (input_interrupt): Tweak comment.
5517
65730243
DE
55182010-04-23 Doug Evans <dje@google.com>
5519
5520 * server.c (start_inferior): Print inferior argv if --debug.
5521
a8ae7dc0
AR
55222010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5523
5524 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5525 * nto-x86-low.c: Include server.h
5526
1c07cc19
PM
55272010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5528
5529 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5530 be consistent with other sources of this directory.
5531 (init_registers_amd64): Correct name of source file of this function
5532 in the comment.
5533
e0a61e09
PM
55342010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5535
5536 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5537 64-bit executables.
5538
54709339
PM
55392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5540
5541 * win32-i386-low.c: Add 64-bit support.
5542 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5543 (init_registers_amd64): Declare.
5544 (mappings): Add 64-bit version of array.
5545 (init_windows_x86): New function.
5546 (the_low_target): Change init_arch field to init_windows_x86.
5547
e8f0053d
PM
55482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5549
5550 * win32-low.c: Adapt to support also 64-bit architecture.
5551 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5552 (get_image_name): Use SIZE_T type for local variable `done'.
5553 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5554 (toolhelp_get_dll_name): Idem.
5555 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5556 Use uintptr_t typecast to avoid warning.
5557 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5558 (handle_exception): Use phex_nz to avoid warning.
5559 (win32_wait): Remove unused local variable `process'.
5560
c481e77e
PM
55612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5562
5563 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5564 `amd64-avx.o'.
5565
12ea4b69
PM
55662010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5567
5568 * configure.ac: Use `ws2_32' library for srv_mingw.
5569 * configure: Regenerate.
5570 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5571 * remote-utils.c: Likewise.
5572
f6d1620c
L
55732010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5574
5575 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5576 if __x86_64__ is defined.
5577
8e642873
PM
55782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5579
5580 * configure: Regenerate.
5581
711e434b
PM
55822010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5583
5584 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5585 * target.h (target_ops): New get_tib_address field.
5586 * win32-low.h (win32_thread_info): Add thread_local_base field.
5587 * win32-low.c (child_add_thread): Add tlb argument.
5588 Set thread_local_base field to TLB.
5589 (get_child_debug_event): Adapt to child_add_thread change.
5590 (win32_get_tib_address): New function.
5591 (win32_target_ops): Set get_tib_address field to
5592 win32_get_tib_address.
5593 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5594
505106cd
PA
55952010-04-12 Pedro Alves <pedro@codesourcery.com>
5596
505106cd
PA
5597 * linux-low.c (linux_mourn): Also remove the process.
5598 * server.c (handle_target_event): Don't remove the process here.
5599 * nto-low.c (nto_mourn): New.
5600 (nto_target_ops): Install it.
5601 * spu-low.c (spu_mourn): New.
5602 (spu_target_ops): Install it.
5603 * win32-low.c (win32_mourn): New.
5604 (win32_target_ops): Install it.
5605
e8470a06
PA
56062010-04-12 Pedro Alves <pedro@codesourcery.com>
5607
5608 * server.h (buffer_xml_printf): Remove redundant `;'.
5609
45ba0d02
PA
56102010-04-12 Pedro Alves <pedro@codesourcery.com>
5611
5612 * regcache.c (set_register_cache): Invalidate regcaches before
5613 changing the register cache layout.
5614 (regcache_invalidate_one): Allow a NULL regcache.
5615 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5616 regcaches before changing the register cache layout or the target
5617 regsets.
5618
59e04013
L
56192010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5620
5621 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5622 variable warning on Linux/x86-64.
5623
8336d594
PA
56242010-04-11 Pedro Alves <pedro@codesourcery.com>
5625
5626 GDBserver disconnected tracing support.
5627
5628 * linux-low.c (linux_remove_process): Delete.
5629 (add_lwp): Don't set last_resume_kind here.
5630 (linux_kill): Use `mourn'.
5631 (linux_detach): Use `thread_db_detach', and `mourn'.
5632 (linux_mourn): New.
5633 (linux_attach_lwp_1): Adjust comment.
5634 (linux_attach): last_resume_kind moved the thread_info; adjust.
5635 (status_pending_p_callback): Adjust.
5636 (linux_wait_for_event_1): Adjust.
5637 (count_events_callback, select_singlestep_lwp_callback)
5638 (select_event_lwp_callback, cancel_breakpoints_callback)
5639 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5640 (proceed_one_lwp): Adjust.
5641 (linux_async): Add debug output.
5642 (linux_thread_stopped): New.
5643 (linux_pause_all): New.
5644 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5645 linux_pause_all.
5646 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5647 (thread_db_free): Delete declaration.
5648 (thread_db_detach, thread_db_mourn): Declare.
5649 * thread-db.c (thread_db_init): Use thread_db_mourn.
5650 (thread_db_free): Delete, split in two.
5651 (disable_thread_event_reporting): New.
5652 (thread_db_detach): New.
5653 (thread_db_mourn): New.
5654
5655 * server.h (struct thread_info) <last_resume_kind>: New field.
5656 <attached>: Add comment.
5657 <gdb_detached>: New field.
5658 (handler_func): Change return type to int.
5659 (handle_serial_event, handle_target_event): Ditto.
5660 (gdb_connected): Declare.
5661 (tracing): Delete.
5662 (disconnected_tracing): Declare.
5663 (stop_tracing): Declare.
5664
5665 * server.c (handle_query) <qSupported>: Report support for
5666 disconnected tracing.
5667 (queue_stop_reply_callback): Account for running threads.
5668 (gdb_wants_thread_stopped): New.
5669 (gdb_wants_all_threads_stopped): New.
5670 (gdb_reattached_process): New.
5671 (handle_status): Clear the `gdb_detached' flag of all processes.
5672 In all-stop, stop all threads.
5673 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5674 (process_serial_event): If the remote connection breaks, or if an
5675 exit was forced with "monitor exit", force an event loop exit.
5676 Handle disconnected tracing on detach.
5677 (handle_serial_event): Adjust.
5678 (handle_target_event): If GDB isn't connected, forward events back
5679 to the inferior, unless the last process exited, in which case,
5680 exit gdbserver. Adjust interface.
5681
5682 * remote-utils.c (remote_open): Don't block in accept. Instead
5683 register an event loop source on the listen socket file
5684 descriptor. Refactor bits into ...
5685 (listen_desc): ... this new global.
5686 (gdb_connected): ... this new function.
5687 (enable_async_notification): ... this new function.
5688 (handle_accept_event): ... this new function.
5689 (remote_close): Clear remote_desc.
5690
5691 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5692
5693 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5694 New fields.
5695 (mourn_inferior): Define.
5696 (target_process_qsupported): Avoid the dangling else problem.
5697 (thread_stopped): Define.
5698 (pause_all): Define.
5699 (target_waitstatus_to_string): Declare.
5700 * target.c (target_waitstatus_to_string): New.
5701
5702 * tracepoint.c (tracing): Make extern.
5703 (disconnected_tracing): New.
5704 (stop_tracing): Make extern. Handle tracing stops due to GDB
5705 disconnecting.
5706 (cmd_qtdisconnected): New.
5707 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5708 (handle_tracepoint_general_set): Handle QTDisconnected.
5709
5710 * event-loop.c (event_handler_func): Change return type to int.
5711 (process_event): Bail out if the event handler wants the event
5712 loop to stop.
5713 (handle_file_event): Ditto.
5714 (start_event_loop): Bail out if the event handler wants the event
5715 loop to stop.
5716
5717 * nto-low.c (nto_target_ops): Adjust.
5718 * spu-low.c (spu_wait): Don't remove the process here.
5719 (spu_target_ops): Adjust.
5720 * win32-low.c (win32_wait): Don't remove the process here.
5721 (win32_target_ops): Adjust.
5722
5d267c4c
PA
57232010-04-11 Pedro Alves <pedro@codesourcery.com>
5724
5725 * regcache.c (realloc_register_cache): Invalidate inferior's
5726 regcache before recreating it.
5727
623ccd72
PA
57282010-04-09 Pedro Alves <pedro@codesourcery.com>
5729
5730 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5731
219f2f23
PA
57322010-04-09 Stan Shebs <stan@codesourcery.com>
5733 Pedro Alves <pedro@codesourcery.com>
5734
5735 * server.h (LONGEST): New.
5736 (struct thread_info) <while_stepping>: New field.
5737 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5738 Declare.
5739 (initialize_tracepoint, handle_tracepoint_general_set)
5740 (handle_tracepoint_query, tracepoint_finished_step)
5741 (tracepoint_was_hit, release_while_stepping_state_list):
5742 (current_traceframe): Declare.
5743 * server.c (handle_general_set): Handle tracepoint packets.
5744 (read_memory): New.
5745 (write_memory): New.
5746 (handle_search_memory_1): Use read_memory.
5747 (handle_query): Report support for conditional tracepoints, trace
5748 state variables, and tracepoint sources. Handle tracepoint
5749 queries.
5750 (main): Initialize the tracepoints module.
5751 (process_serial_event): Handle traceframe reads/writes.
5752
5753 * linux-low.c (handle_tracepoints): New.
5754 (linux_wait_1): Call it.
5755 (linux_resume_one_lwp): Handle while-stepping.
5756 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5757 (linux_target_ops): Install them.
5758 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5759 New field.
5760 * linux-x86-low.c (x86_supports_tracepoints): New.
5761 (the_low_target). Install it.
5762
5763 * mem-break.h (delete_breakpoint): Declare.
5764 * mem-break.c (delete_breakpoint): Make external.
5765
5766 * target.h (struct target_ops): Add `supports_tracepoints',
5767 `read_pc', and `write_pc' fields.
5768 (target_supports_tracepoints): Define.
5769 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5770 (phex_nz): New.
5771
5772 * regcache.h (struct regcache) <registers_owned>: New field.
5773 (init_register_cache, regcache_cpy): Declare.
5774 (regcache_read_pc, regcache_write_pc): Declare.
5775 (register_cache_size): Declare.
5776 (supply_regblock): Declare.
5777 * regcache.c (init_register_cache): New.
5778 (new_register_cache): Use it.
5779 (regcache_cpy): New.
5780 (register_cache_size): New.
5781 (supply_regblock): New.
5782 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 5783
219f2f23
PA
5784 * tracepoint.c: New.
5785
5786 * Makefile.in (OBS): Add tracepoint.o.
5787 (tracepoint.o): New rule.
5788
3a13a53b
L
57892010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5790
5791 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5792 (i386-mmx.o): New.
5793 (i386-mmx.c): Likewise.
5794 (i386-mmx-linux.o): Likewise.
5795 (i386-mmx-linux.c): Likewise.
5796
5797 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5798 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5799 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5800 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5801
5802 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5803 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5804 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5805
1570b33e
L
58062010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5807
5808 * Makefile.in (clean): Updated.
5809 (i386-avx.o): New.
5810 (i386-avx.c): Likewise.
5811 (i386-avx-linux.o): Likewise.
5812 (i386-avx-linux.c): Likewise.
5813 (amd64-avx.o): Likewise.
5814 (amd64-avx.c): Likewise.
5815 (amd64-avx-linux.o): Likewise.
5816 (amd64-avx-linux.c): Likewise.
5817
5818 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5819 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5820 (srv_amd64_regobj): Add amd64-avx.o.
5821 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5822 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5823 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5824 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5825 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5826 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5827 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5828
5829 * i387-fp.c: Include "i386-xstate.h".
5830 (i387_xsave): New.
5831 (i387_cache_to_xsave): Likewise.
5832 (i387_xsave_to_cache): Likewise.
5833 (x86_xcr0): Likewise.
5834
5835 * i387-fp.h (i387_cache_to_xsave): Likewise.
5836 (i387_xsave_to_cache): Likewise.
5837 (x86_xcr0): Likewise.
5838
5839 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5840 * linux-crisv32-low.c (target_regsets): Likewise.
5841 * linux-m68k-low.c (target_regsets): Likewise.
5842 * linux-mips-low.c (target_regsets): Likewise.
5843 * linux-ppc-low.c (target_regsets): Likewise.
5844 * linux-s390-low.c (target_regsets): Likewise.
5845 * linux-sh-low.c (target_regsets): Likewise.
5846 * linux-sparc-low.c (target_regsets): Likewise.
5847 * linux-xtensa-low.c (target_regsets): Likewise.
5848
5849 * linux-low.c: Include <sys/uio.h>.
5850 (regsets_fetch_inferior_registers): Support nt_type.
5851 (regsets_store_inferior_registers): Likewise.
5852 (linux_process_qsupported): New.
5853 (linux_target_ops): Add linux_process_qsupported.
5854
5855 * linux-low.h (regset_info): Add nt_type.
5856 (linux_target_ops): Add process_qsupported.
5857
5858 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5859 and <sys/uio.h>.
5860 (init_registers_i386_avx_linux): New.
5861 (init_registers_amd64_avx_linux): Likewise.
5862 (xmltarget_i386_linux_no_xml): Likewise.
5863 (xmltarget_amd64_linux_no_xml): Likewise.
5864 (PTRACE_GETREGSET): Likewise.
5865 (PTRACE_SETREGSET): Likewise.
5866 (x86_fill_xstateregset): Likewise.
5867 (x86_store_xstateregset): Likewise.
5868 (use_xml): Likewise.
5869 (x86_linux_update_xmltarget): Likewise.
5870 (x86_linux_process_qsupported): Likewise.
5871 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5872 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5873 init_registers_i386_linux here. Call
5874 x86_linux_update_xmltarget.
5875 (the_low_target): Add x86_linux_process_qsupported.
5876
5877 * server.c (handle_query): Call target_process_qsupported.
5878
5879 * target.h (target_ops): Add process_qsupported.
5880 (target_process_qsupported): New.
5881
fc7238bb
PA
58822010-04-03 Pedro Alves <pedro@codesourcery.com>
5883
5884 * inferiors.c (add_thread): Set last_status kind to
5885 TARGET_WAITKIND_IGNORE.
5886 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5887 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5888 (linux_wait_1): Move `thread' local definition to block that uses
5889 it. Don't NULL initialize `event_child'.
5890 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5891 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5892 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5893
bdabb078
PA
58942010-04-01 Pedro Alves <pedro@codesourcery.com>
5895
5896 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5897 an extended waitstatus, or by a watchpoint.
5898 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5899 thread was stepping or has been stopped by a watchpoint.
5900
d3bbe7a0
PA
59012010-04-01 Pedro Alves <pedro@codesourcery.com>
5902
5903 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5904 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5905 of another, then delete the previous, and validate all
5906 breakpoints.
5907 (validate_inserted_breakpoint): New.
5908 (delete_disabled_breakpoints): New.
5909 (validate_breakpoints): New.
5910 (check_mem_read): Validate breakpoints before trusting their
5911 shadow. Delete disabled breakpoints.
5912 (check_mem_write): Validate breakpoints before trusting they
5913 should be inserted. Delete disabled breakpoints.
5914 * mem-break.h (validate_breakpoints):
5915 * server.c (handle_query): Validate breakpoints when we see a
5916 qSymbol query.
5917
8b07ae33
PA
59182010-04-01 Pedro Alves <pedro@codesourcery.com>
5919
5920 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
5921 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
5922 if we could tell there's a GDB breakpoint at stop_pc.
5923 (need_step_over_p): Don't do a step over if we find a GDB
5924 breakpoint at the resume PC.
5925
5926 * mem-break.c (struct raw_breakpoint): New.
5927 (enum bkpt_type): New type `gdb_breakpoint'.
5928 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
5929 fields. New field `raw'.
5930 (find_raw_breakpoint_at): New.
5931 (set_raw_breakpoint_at): Handle refcounting. Create a raw
5932 breakpoint instead.
5933 (set_breakpoint_at): Adjust.
5934 (delete_raw_breakpoint): New.
5935 (release_breakpoint): New.
5936 (delete_breakpoint): Rename to...
5937 (delete_breakpoint_1): ... this. Add proc parameter. Use
5938 release_breakpoint. Return ENOENT.
5939 (delete_breakpoint): Reimplement.
5940 (find_breakpoint_at): Delete.
5941 (find_gdb_breakpoint_at): New.
5942 (delete_breakpoint_at): Delete.
5943 (set_gdb_breakpoint_at): New.
5944 (delete_gdb_breakpoint_at): New.
5945 (gdb_breakpoint_here): New.
5946 (set_reinsert_breakpoint): Use release_breakpoint.
5947 (uninsert_breakpoint): Rename to ...
5948 (uninsert_raw_breakpoint): ... this.
5949 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
5950 (reinsert_raw_breakpoint): Change parameter type to
5951 raw_breakpoint.
5952 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
5953 instead.
5954 (check_breakpoints): Adjust. Use release_breakpoint.
5955 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
5956 (breakpoint_inserted_here): Ditto.
5957 (check_mem_read): Adjust to iterate over raw breakpoints instead.
5958 Don't trust the breakpoint's shadow if it is not inserted.
5959 (check_mem_write): Adjust to iterate over raw breakpoints instead.
5960 (delete_all_breakpoints): Adjust.
5961 (free_all_breakpoints): Mark all breakpoints as uninserted, and
5962 use delete_breakpoint_1.
5963
5964 * mem-break.h (breakpoints_supported): Delete declaration.
5965 (set_gdb_breakpoint_at): Declare.
5966 (gdb_breakpoint_here): Declare.
5967 (delete_breakpoint_at): Delete.
5968 (delete_gdb_breakpoint_at): Declare.
5969
5970 * server.h (struct raw_breakpoint): Forward declare.
5971 (struct process_info): New field `raw_breakpoints'.
5972
5973 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5974 breakpoints.
5975
6bf5e0ba
PA
59762010-03-24 Pedro Alves <pedro@codesourcery.com>
5977
5978 * linux-low.c (status_pending_p_callback): Fix comment.
5979 (linux_wait_for_event_1): Move most of the internal breakpoint
5980 handling from here...
5981 (linux_wait_1): ... to here.
5982 (count_events_callback): New.
5983 (select_singlestep_lwp_callback): New.
5984 (select_event_lwp_callback): New.
5985 (cancel_breakpoints_callback): New.
5986 (select_event_lwp): New.
5987 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5988 priority to all LWPs that have had events that should be reported
5989 to the client. Cancel breakpoints when about to reporting the
5990 event to the client, not while stopping lwps. No longer cancel
5991 finished single-steps here.
5992 (cancel_finished_single_step): Delete.
5993 (cancel_finished_single_steps): Delete.
5994
414a389f
PA
59952010-03-24 Pedro Alves <pedro@codesourcery.com>
5996
5997 * mem-break.c (enum bkpt_type): New.
5998 (struct breakpoint): New field `type'.
5999 (set_breakpoint_at): Change return type to struct breakpoint
6000 pointer. Set type to `other_breakpoint' by default.
6001 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6002 in the breakpoint list.
6003 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6004 (reinsert_breakpoint): Rename to ...
6005 (reinsert_raw_breakpoint): ... this.
6006 (reinsert_breakpoints_at): Adjust.
6007 * mem-break.h (struct breakpoint): Declare.
6008 (set_breakpoint_at): Change return type to struct breakpoint
6009 pointer.
6010
2280c721
PA
60112010-03-24 Pedro Alves <pedro@codesourcery.com>
6012
6013 * server.c (handle_query): Assign, not compare.
6014
d50171e4
PA
60152010-03-24 Pedro Alves <pedro@codesourcery.com>
6016
6017 Teach linux gdbserver to step-over-breakpoints.
6018
6019 * linux-low.c (can_hardware_single_step): New.
6020 (supports_breakpoints): New.
6021 (handle_extended_wait): If stopping threads, read the stop pc of
6022 the new cloned LWP.
6023 (get_pc): New.
6024 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6025 low target doesn't support retrieving the PC.
6026 (add_lwp): Set last_resume_kind to resume_continue.
6027 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6028 (linux_attach): Don't clear stop_expected. Set the lwp's
6029 last_resume_kind to resume_stop.
6030 (linux_detach_one_lwp): Don't check for removed breakpoints.
6031 (check_removed_breakpoint): Delete.
6032 (status_pending_p): Rename to ...
6033 (status_pending_p_callback): ... this. Don't check for removed
6034 breakpoints. Don't consider threads that are stopped from GDB's
6035 perspective.
6036 (linux_wait_for_lwp): Always read the stop_pc here.
6037 (cancel_breakpoint): New.
6038 (step_over_bkpt): New global.
6039 (linux_wait_for_event_1): Implement stepping over breakpoints.
6040 (gdb_wants_lwp_stopped): New.
6041 (gdb_wants_all_stopped): New.
6042 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6043 single-step traps here. Store the thread's last reported target
6044 wait status.
6045 (send_sigstop): Don't clear stop_expected. Always set it,
6046 instead.
6047 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6048 (cancel_finished_single_step): New.
6049 (cancel_finished_single_steps): New.
6050 (wait_for_sigstop): Don't cancel finished single-step traps here.
6051 (linux_resume_one_lwp): Don't check for removed breakpoints.
6052 Don't set `step' on non-hardware step archs.
6053 (linux_set_resume_request): Ignore resume_stop requests if already
6054 stopping or stopped. Set the lwp's last_resume_kind.
6055 (resume_status_pending_p): Don't check for removed breakpoints.
6056 (need_step_over_p): New.
6057 (start_step_over): New.
6058 (finish_step_over): New.
6059 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6060 requests. Clear the thread's last reported target waitstatus.
6061 Don't use the `suspended' flag. Don't consider pending breakpoints.
6062 (linux_resume): Start a step-over if necessary.
6063 (proceed_one_lwp): New.
6064 (proceed_all_lwps): New.
6065 (unstop_all_lwps): New.
6066 * linux-low.h (struct lwp_info): Rewrite comment for the
6067 `suspended' flag. Add the `stop_pc' field. Delete the
6068 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6069 Add `'last_resume_kind' and `need_step_over' fields.
6070 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6071 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6072 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6073 (set_raw_breakpoint_at): New.
6074 (set_breakpoint_at): Rewrite to use it.
6075 (reinsert_breakpoint_handler): Delete.
6076 (set_reinsert_breakpoint): New.
6077 (reinsert_breakpoint_by_bp): Delete.
6078 (delete_reinsert_breakpoints): New.
6079 (uninsert_breakpoint): Rewrite.
6080 (uninsert_breakpoints_at): New.
6081 (reinsert_breakpoint): Rewrite.
6082 (reinsert_breakpoints_at): New.
6083 (check_breakpoints): Rewrite.
6084 (breakpoint_here): New.
6085 (breakpoint_inserted_here): New.
6086 (check_mem_read): Adjust.
6087 * mem-break.h (breakpoints_supported, breakpoint_here)
6088 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6089 (reinsert_breakpoint_by_bp): Delete declaration.
6090 (delete_reinsert_breakpoints): Declare.
6091 (reinsert_breakpoint): Delete declaration.
6092 (reinsert_breakpoints_at): Declare.
6093 (uninsert_breakpoint): Delete declaration.
6094 (uninsert_breakpoints_at): Declare.
6095 (check_breakpoints): Adjust prototype.
6096 * server.h: Adjust include order.
6097 (struct thread_info): Declare here. Add a `last_status' field.
6098
30ba68cb
MS
60992010-03-23 Michael Snyder <msnyder@vmware.com>
6100
6101 * server.c (crc32): New function.
6102 (handle_query): Add handling for 'qCRC:' request.
6103
b9a881c2
PA
61042010-03-23 Pedro Alves <pedro@codesourcery.com>
6105
6106 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6107 lwp had been stopped by a watchpoint.
6108
e92d13d5
PA
61092010-03-16 Pedro Alves <pedro@codesourcery.com>
6110
6111 * server.h (internal_error): Declare.
6112 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6113 * utils.c (internal_error): New function.
6114
64daa791
AS
61152010-03-15 Andreas Schwab <schwab@redhat.com>
6116
6117 * configure.srv: Fix typo setting srv_regobj.
6118
f52cd8cd
PA
61192010-03-15 Pedro Alves <pedro@codesourcery.com>
6120
6121 * linux-low.c (fetch_register): Avoid passing a non string literal
6122 format to `error'.
6123 (usr_store_inferior_registers): Ditto.
6124
93ae6fdc
PA
61252010-03-14 Pedro Alves <pedro@codesourcery.com>
6126
6127 * linux-low.c (linux_write_memory): Bail out early if peeking
6128 memory failed.
6129
c3adc08c
PA
61302010-03-14 Pedro Alves <pedro@codesourcery.com>
6131
6132 * linux-low.h (struct lwp_info): New fields
6133 `stopped_by_watchpoint' and `stopped_data_address'.
6134 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6135 here, and cache them in the lwp object.
6136 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6137 directly.
6138 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6139 field.
6140 (linux_stopped_by_watchpoint): Rewrite.
6141 (linux_stopped_data_address): Rewrite.
6142
bce522a2
PA
61432010-03-06 Simo Melenius <simo.melenius@iki.fi>
6144
6145 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6146 switching the current inferior, not before.
6147
90884b2b
L
61482010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6149
6150 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6151 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6152 i386-linux.c and amd64-linux.c.
6153 (reg-i386.o): Removed.
6154 (reg-i386.c): Likewise.
6155 (reg-i386-linux.o): Likewise.
6156 (reg-i386-linux.c): Likewise.
6157 (reg-x86-64.o): Likewise.
6158 (reg-x86-64.c): Likewise.
6159 (reg-x86-64-linux.o): Likewise.
6160 (reg-x86-64-linux.c): Likewise.
6161 (i386.o): New.
6162 (i386.c): Likewise.
6163 (i386-linux.o): Likewise.
6164 (i386-linux.c): Likewise.
6165 (amd64.o): Likewise.
6166 (amd64.c): Likewise.
6167 (amd64-linux.o): Likewise.
6168 (amd64-linux.c): Likewise.
6169
6170 * configure.srv (srv_i386_regobj): New.
6171 (srv_i386_linux_regobj): Likewise.
6172 (srv_amd64_regobj): Likewise.
6173 (srv_amd64_linux_regobj): Likewise.
6174 (srv_i386_32bit_xmlfiles): Likewise.
6175 (srv_i386_64bit_xmlfiles): Likewise.
6176 (srv_i386_xmlfiles): Likewise.
6177 (srv_amd64_xmlfiles): Likewise.
6178 (srv_i386_linux_xmlfiles): Likewise.
6179 (srv_amd64_linux_xmlfiles): Likewise.
6180 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6181 srv_xmlfiles to $srv_i386_xmlfiles.
6182 (i[34567]86-*-mingw32ce*): Likewise.
6183 (i[34567]86-*-mingw*): Likewise.
6184 (i[34567]86-*-nto*): Likewise.
6185 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6186 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6187 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6188 (x86_64-*-linux*): Likewise.
6189
6190 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6191 (init_registers_amd64_linux): New.
6192 (x86_arch_setup): Replace init_registers_x86_64_linux with
6193 init_registers_amd64_linux.
6194
193f13e6
MK
61952010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6196
6197 * configure.ac: Check for libdl. If it is not available link against
6198 static libthread_db.
6199 * configure: Regenerate.
6200
85d721b8
PA
62012010-02-22 Pedro Alves <pedro@codesourcery.com>
6202
6203 PR9605
6204
6205 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6206 handing a read watchpoint.
6207 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6208
6076632b
DE
62092010-02-12 Doug Evans <dje@google.com>
6210
6211 * linux-low.c (linux_supports_tracefork_flag): Document.
6212 (linux_look_up_symbols): Add comment.
6213
3327ccf7
L
62142010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6215
6216 * regcache.c (supply_register): Clear regcache if buf is NULL.
6217
0718675c 62182010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6219 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6220
6221 * inferiors.c (find_inferior): Add function documentation.
6222 (unloaded_dll): Handle the case where the unloaded dll has not
6223 been previously registered in the dll list.
6224
177321bd
DJ
62252010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6226
6227 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6228 (thumb2_breakpoint): New.
6229 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6230
2b009048
DJ
62312010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6232
6233 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6234 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6235 breakpoints.
6236
3be029c7
PA
62372010-01-21 Pedro Alves <pedro@codesourcery.com>
6238
6239 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6240
18f5de3b
JK
62412010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 * linux-s390-low.c (s390_collect_ptrace_register)
6244 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6245
3743bb4f
DE
62462010-01-21 Doug Evans <dje@google.com>
6247
14ce3065
DE
6248 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6249 (PTRACE_ARG4_TYPE): New macro.
6250 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6251 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6252 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6253 (usr_store_inferior_registers): Ditto.
6254 (linux_read_memory, linux_write_memory): Ditto.
6255 (linux_test_for_tracefork): Ditto.
6256
3743bb4f
DE
6257 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6258 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6259
8b315be5
PA
62602010-01-21 Pedro Alves <pedro@codesourcery.com>
6261
6262 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6263 target.
6264
85492558
PA
62652010-01-21 Pedro Alves <pedro@codesourcery.com>
6266
6267 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6268 prototype to take a regcache. Adjust.
6269
442ea881
PA
62702010-01-20 Pedro Alves <pedro@codesourcery.com>
6271
6272 * regcache.h (struct thread_info): Forward declare.
6273 (struct regcache): New.
6274 (new_register_cache): Adjust prototype.
6275 (get_thread_regcache): Declare.
6276 (free_register_cache): Adjust prototype.
6277 (registers_to_string, registers_from_string): Ditto.
6278 (supply_register, supply_register_by_name, collect_register)
6279 (collect_register_as_string, collect_register_by_name): Ditto.
6280 * regcache.c (struct inferior_regcache_data): Delete.
6281 (get_regcache): Rename to ...
6282 (get_thread_regcache): ... this. Adjust. Switch inferior before
6283 fetching registers.
6284 (regcache_invalidate_one): Adjust.
6285 (regcache_invalidate): Fix prototype.
6286 (new_register_cache): Return the new register cache.
6287 (free_register_cache): Change prototype.
6288 (realloc_register_cache): Adjust.
6289 (registers_to_string): Change prototype to take a regcache. Adjust.
6290 (registers_from_string): Ditto.
6291 (register_data): Ditto.
6292 (supply_register): Ditto.
6293 (supply_register_by_name): Ditto.
6294 (collect_register): Ditto.
6295 (collect_register_as_string): Ditto.
6296 (collect_register_by_name): Ditto.
6297 * server.c (process_serial_event): Adjust.
6298 * linux-low.h (regset_fill_func, regset_store_func): Change
6299 prototype.
6300 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6301 Change prototype.
6302 * linux-low.c (get_stop_pc): Adjust.
6303 (check_removed_breakpoint): Adjust.
6304 (linux_wait_for_event): Adjust.
6305 (linux_resume_one_lwp): Adjust.
6306 (fetch_register): Add regcache parameter. Adjust.
6307 (usr_store_inferior_registers): Ditto.
6308 (regsets_fetch_inferior_registers): Ditto.
6309 (regsets_store_inferior_registers): Ditto.
6310 (linux_fetch_registers, linux_store_registers): Ditto.
6311 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6312 regcache. Adjust.
43aaf8b6
PA
6313 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6314 Ditto.
442ea881
PA
6315 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6316 prototype to take a regcache.
6317 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6318 * remote-utils.c (convert_ascii_to_int, outreg)
6319 (prepare_resume_reply): Change prototype to take a regcache.
6320 Adjust.
6321 * target.h (struct target_ops) <fetch_registers, store_registers>:
6322 Change prototype to take a regcache.
6323 (fetch_inferior_registers, store_inferior_registers): Change
6324 prototype to take a regcache. Adjust.
6325 * proc-service.c (ps_lgetregs): Adjust.
6326 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6327 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6328 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6329 take a regcache. Adjust.
6330 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6331 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6332 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6333 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6334 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6335 (cris_cannot_fetch_register):
6336 (cris_breakpoint_at): Change prototype to take a regcache.
6337 Adjust.
6338 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6339 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6340 to take a regcache. Adjust.
6341 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6342 Adjust.
6343 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6344 take a regcache. Adjust.
6345 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6346 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6347 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6348 * linux-mips-low.c (mips_get_pc):
6349 (mips_set_pc): Change prototype to take a regcache. Adjust.
6350 (mips_reinsert_addr): Adjust.
6351 (mips_collect_register): Change prototype to take a regcache.
6352 Adjust.
6353 (mips_supply_register):
6354 (mips_collect_register_32bit, mips_supply_register_32bit)
6355 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6356 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6357 * linux-ppc-low.c (ppc_supply_ptrace_register)
6358 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6359 (parse_spufs_run): Adjust.
6360 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6361 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6362 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6363 take a regcache. Adjust.
6364 * linux-s390-low.c (s390_collect_ptrace_register)
6365 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6366 (s390_set_pc): Change prototype to take a regcache. Adjust.
6367 (s390_arch_setup): Adjust.
6368 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6369 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6370 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6371 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6372 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6373 regcache. Adjust.
6374 (sparc_breakpoint_at): Adjust.
6375 * linux-xtensa-low.c (xtensa_fill_gregset):
6376 (xtensa_store_gregset):
6377 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6378 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6379 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6380 prototype to take a regcache. Adjust.
6381 * win32-arm-low.c (arm_fetch_inferior_register)
6382 (arm_store_inferior_register): Change prototype to take a
6383 regcache. Adjust.
6384 * win32-i386-low.c (i386_fetch_inferior_register)
6385 (i386_store_inferior_register): Change prototype to take a
6386 regcache. Adjust.
6387 * win32-low.c (child_fetch_inferior_registers)
6388 (child_store_inferior_registers): Change prototype to take a
6389 regcache. Adjust.
6390 (win32_wait): Adjust.
6391 (win32_fetch_inferior_registers): Change prototype to take a
6392 regcache. Adjust.
6393 (win32_store_inferior_registers): Adjust.
6394 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6395 store_inferior_register>: Change prototype to take a regcache.
6396
60c3d7b0
DE
63972010-01-20 Doug Evans <dje@google.com>
6398
6399 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6400 #ifdef.
6401 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6402 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6403
dc146f7c
VP
64042010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6405
6406 * linux-low.c (linux_core_of_thread): New.
6407 (compare_ints, show_process, list_threads): New.
6408 (linux_qxfer_osdata): Report threads and cores.
6409 (linux_target_op): Register linux_core_of_thread.
6410 * remote-utils.c (prepare_resume_reply): Report the core.
6411 (buffer_xml_printf): Support %d specifier.
6412 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6413 New.
6414 (handle_query): Handle qXfer:threads. Announce availability
6415 thereof.
6416 * target.h (struct target_ops): New field core_of_thread.
6417
7803799a
UW
64182010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6419
6420 * Makefile.in (clean): Remove new generated files.
6421 (reg-s390.o, reg-s390.c): Remove rules.
6422 (reg-s390x.o, reg-s390x.c): Likewise.
6423 (s390-linux32.o, s390-linux32.c): Add rules.
6424 (s390-linux64.o, s390-linux64.c): Likewise.
6425 (s390x-linux64.o, s390x-linux64.c): Likewise.
6426 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6427 * linux-s390-low.c: Include <elf.h>.
6428 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6429 (init_registers_s390): Remove prototype.
6430 (init_registers_s390x): Likewise.
6431 (init_registers_s390_linux32): Add prototype.
6432 (init_registers_s390_linux64): Likewise.
6433 (init_registers_s390x_linux64): Likewise.
6434 (s390_num_regs_3264): New define.
6435 (s390_regmap_3264): New global variable.
6436 (s390_cannot_fetch_register): Remove obsolete check.
6437 (s390_cannot_store_register): Likewise.
6438 (s390_collect_ptrace_register): Handle upper/lower register halves.
6439 (s390_supply_ptrace_register): Likewise.
6440 (s390_fill_gregset): Update to register number changes.
6441 (s390_get_hwcap): New routine.
6442 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6443 Install appropriate regmap and register set.
6444
6e7ffa39
JB
64452010-01-01 Joel Brobecker <brobecker@adacore.com>
6446
6447 * server.c (gdbserver_version): Update copyright year to 2010.
6448 * gdbreplay.c (gdbreplay_version): Likewise.
6449
957f3f49
DE
64502009-12-28 Doug Evans <dje@google.com>
6451
6452 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6453 elf/external.h. Include <elf.h> instead but only if necessary.
6454
ca5c370d
PA
64552009-12-28 Pedro Alves <pedro@codesourcery.com>
6456
6457 * linux-low.c (linux_remove_process): Remove `detaching'
6458 parameter. Don't release/detach from thread_db here.
6459 (linux_kill): Release/detach from thread_db here, ...
6460 (linux_detach): ... and here, before actually detaching.
6461 (linux_wait_1): ... and here, when a process exits.
6462 * thread-db.c (any_thread_of): New.
6463 (thread_db_free): Switch the current inferior to a thread of the
6464 passed in process.
6465
4ee62156
DE
64662009-12-21 Doug Evans <dje@google.com>
6467
d90e6a88
DE
6468 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6469
c5f62d5f
DE
6470 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6471 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6472 warning ifndef __NR_tkill. Move setting of errno there too.
6473 Delete unnecessary resetting of errno after syscall.
6474 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6475
10e86dd7
DE
6476 * configure.ac: Check for dladdr.
6477 * config.in: Regenerate.
6478 * configure: Regenerate.
6479 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6480 (try_thread_db_load): Update.
6481
4ee62156
DE
6482 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6483
00f515da
DE
64842009-12-18 Doug Evans <dje@google.com>
6485
e9464885
DE
6486 * event-loop.c: Include unistd.h if it exists.
6487
07d4f67e
DE
6488 * linux-low.c (my_waitpid): Move definition away from being in
6489 between linux_tracefork_child/linux_test_for_tracefork.
6490
00f515da
DE
6491 * gdb_proc_service.h (psaddr_t): Fix type.
6492 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6493 signature to match glibc.
6494
1de1badb
DE
64952009-12-16 Doug Evans <dje@google.com>
6496
6497 * linux-low.c (linux_read_memory): Fix argument to read.
6498
aeeb81d1
PA
64992009-11-26 Pedro Alves <pedro@codesourcery.com>
6500
6501 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6502 events, don't leave current_inferior pointing at null.
6503
10357975
PA
65042009-11-26 Pedro Alves <pedro@codesourcery.com>
6505
6506 * win32-low.c (LOG): Delete.
6507 (OUTMSG): Output to stderr.
6508 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6509 on compile time LOG macro.
6510 (win32_wait): Fix debug output.
6511
cf6e3471
PA
65122009-11-26 Pedro Alves <pedro@codesourcery.com>
6513
6514 * win32-low.c (win32_add_one_solib): If the dll name is
6515 "ntdll.dll", prepend the system directory to the dll path.
6516
0c85e18e
MK
65172009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6518
6519 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6520
9ac544ce 65212009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6522 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6523
6524 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6525 * configure.ac: Check for __mcoldfire__ and set
6526 gdb_cv_m68k_is_coldfire.
6527 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6528 reg-cf.o and reg-m68k.o.
6529 * configure: Regenerated.
6530
fd7dd3e6
PA
65312009-11-16 Pedro Alves <pedro@codesourcery.com>
6532
6533 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6534 Pass it to thread_db_free.
6535 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6536 proper `detaching' argument to linux_remove_process.
6537 * linux-low.h (thread_db_free): Add `detaching' parameter.
6538 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6539 to thread_db_free.
6540 (thread_db_free): Add `detaching' parameter. Only
6541 call td_ta_clear_event if detaching from process.
6542
75aa492e
MK
65432009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6544
6545 * thread-db.c (thread_db_free): Fix typo.
6546
21e1bee4
PP
65472009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6548
6549 PR gdb/10838
6550 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6551
8838b45e
NS
65522009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6553
6554 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6555 with an i686 compiler.
6556 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6557 needed.
6558 * configure: Rebuilt.
6559
8a35fb51
SL
65602009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6561
6562 PR gdb/10783
6563
6564 * server.c (handle_search_memory_1): Correct read_addr initialization
6565 in loop for searching subsequent chunks.
6566
96f15937
PP
65672009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6568
6569 * configure.ac: New --with-libthread-db option.
6570 * thread-db.c: Allow direct dependence on libthread_db.
6571 (thread_db_free): Adjust.
6572 * config.in: Regenerate.
6573 * configure: Likewise.
889bf7c5 6574
5f7d1694
PP
65752009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6576
6577 PR gdb/10757
6578 * thread-db.c (attach_thread): New function.
6579 (maybe_attach_thread): Return success/failure.
6580 (find_new_threads_callback): Adjust.
889bf7c5
PA
6581 (thread_db_find_new_threads): Loop until no new threads.
6582
88e3b899
PA
65832009-10-13 Pedro Alves <pedro@codesourcery.com>
6584
6585 * proc-service.c (ps_lgetregs): Formatting.
6586
cdbfd419
PP
65872009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6588
6589 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6590 * configure.ac: Adjust.
6591 * linux-low.h (struct process_info_private): Move members to struct
6592 thread_db.
6593 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6594 * linux-low.c (linux_remove_process): Adjust.
6595 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6596 * server.c (handle_query): Move code ...
6597 (handle_monitor_command): ... here. New function.
6598 * target.h (struct target_ops): New member.
6599 * thread-db.c (struct thread_db): New.
6600 (libthread_db_search_path): New variable.
6601 (thread_db_create_event, thread_db_enable_reporting)
6602 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6603 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6604 (try_thread_db_load_1, dladdr_to_soname): New functions.
6605 (try_thread_db_load, thread_db_load_search): New functions.
6606 (thread_db_init): Search for libthread_db.
6607 (thread_db_free): New function.
6608 (thread_db_handle_monitor_command): Likewise.
6609 * config.in: Regenerate.
6610 * configure: Regenerate.
889bf7c5 6611
4168d2d6
UW
66122009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6613
6614 * spu-low.c (spu_kill): Wait for inferior to terminate.
6615 Call clear_inferiors.
6616 (spu_detach): Call clear_inferiors.
6617
81ecdfbb
RW
66182009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6619
6620 * aclocal.m4: Regenerate.
6621 * config.in: Likewise.
6622 * configure: Likewise.
6623
0b9ff2c0
UW
66242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6625
6626 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6627 (parse_spufs_run): New function.
6628 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6629 (ppc_breakpoint_at): Handle SPU breakpoints.
6630
efcbbd14
UW
66312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6632
6633 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6634 (SPUFS_MAGIC): Define.
6635 (spu_enumerate_spu_ids): New function.
6636 (linux_qxfer_spu): New function.
6637 (linux_target_ops): Install linux_qxfer_spu.
6638
f4d9bade
UW
66392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6640
6641 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6642 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6643 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6644 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6645 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6646 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6647 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6648 (init_registers_powerpc_cell32l): Add prototype.
6649 (init_registers_powerpc_cell64l): Likewise.
6650 (ppc_arch_setup): Detect Cell/B.E. architecture.
6651
96e946ca
RW
66522009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6653
6654 * Makefile.in (datarootdir): New variable.
6655
58d6951d
DJ
66562009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6657
6658 * linux-low.c (linux_write_memory): Update debugging output.
6659 * Makefile.in (clean): Add new descriptions.
6660 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6661 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6662 * configure.srv: Add new files for arm*-*-linux*.
6663 * linux-arm-low.c: Add new declarations.
6664 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6665 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6666 (HWCAP_VFPv3D16): New.
6667 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6668 instead of __IWMMXT__.
6669 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6670 (arm_arch_setup): New.
6671 (target_regsets): Remove #ifdef. Add VFP regset.
6672 (the_low_target): Use arm_arch_setup.
6673
12b42a12
DJ
66742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6675
6676 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6677 the main thread again.
6678
ac8c974e
AR
66792009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6680
6681 Adding Neutrino gdbserver.
6682 * configure: Regenerated.
6683 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6684 * configure.srv (i[34567]86-*-nto*): New target.
6685 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6686 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6687 (nto_comctrl) [__QNX__]: New function.
6688 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6689
4424e0c3 66902009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
6691
6692 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6693 srv_tgtobj.
6694
912cf4ba
PA
66952009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6696 Pedro Alves <pedro@codesourcery.com>
6697
6698 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6699 don't support CONTEXT_EXTENDED_REGISTERS.
6700 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6701 (the_low_target): Install them.
6702 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6703 failing with ERROR_PIPE_NOT_CONNECTED.
6704
aa5ca48f
DE
67052009-06-30 Doug Evans <dje@google.com>
6706 Pierre Muller <muller@ics.u-strasbg.fr>
6707
6708 Add h/w watchpoint support to x86-linux, win32-i386.
6709 * Makefile.in (SFILES): Add i386-low.c
6710 (i386_low_h): Define.
6711 (i386-low.o): Add dependencies.
6712 (linux-x86-low.o): Add i386-low.h dependency.
6713 (win32-i386-low.o): Ditto.
6714 * i386-low.c: New file.
6715 * i386-low.h: New file.
6716 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6717 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6718 * linux-low.c (linux_add_process): Initialize arch_private.
6719 (linux_remove_process): Free arch_private.
6720 (add_lwp): Initialize arch_private.
6721 (delete_lwp): Free arch_private.
6722 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6723 provided.
6724 * linux-low.h (process_info_private): New member arch_private.
6725 (lwp_info): New member arch_private.
6726 (linux_target_ops): New members new_process, new_thread,
6727 prepare_to_resume.
6728 (ptid_of): New macro.
6729 * linux-x86-low.c: Include stddef.h, i386-low.h.
6730 (arch_process_info): New struct.
6731 (arch_lwp_info): New struct.
6732 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6733 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6734 (i386_dr_low_get_status): New function.
6735 (x86_insert_point, x86_remove_point): New functions.
6736 (x86_stopped_by_watchpoint): New function.
6737 (x86_stopped_data_address): New function.
6738 (x86_linux_new_process, x86_linux_new_thread): New functions.
6739 (x86_linux_prepare_to_resume): New function.
6740 (the_low_target): Add entries for insert_point, remove_point,
6741 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6742 prepare_to_resume.
6743 * server.c (debug_hw_points): New global.
6744 (monitor_show_help): Document set debug-hw-points.
6745 (handle_query): Process "set debug-hw-points".
6746 * server.h (debug_hw_points): Declare.
6747 (paddress): Declare.
6748 * utils.c (NUMCELLS, CELLSIZE): New macros.
6749 (get_sell, xsnprintf, paddress): New functions.
6750 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6751 remove_point, stopped_by_watchpoint, stopped_data_address.
6752 * win32-i386-low.c: Include i386-low.h.
6753 (debug_reg_state): Replaces dr.
6754 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6755 (i386_dr_low_get_status): New function.
6756 (i386_insert_point, i386_remove_point): New functions.
6757 (i386_stopped_by_watchpoint): New function.
6758 (i386_stopped_data_address): New function.
6759 (i386_initial_stuff): Update.
6760 (get_thread_context,set_thread_context,i386_thread_added): Update.
6761 (the_low_target): Add entries for insert_point,
6762 remove_point, stopped_by_watchpoint, stopped_data_address.
6763 * win32-low.c (win32_insert_watchpoint): New function.
6764 (win32_remove_watchpoint): New function.
6765 (win32_stopped_by_watchpoint): New function.
6766 (win32_stopped_data_address): New function.
6767 (win32_target_ops): Add entries for insert_watchpoint,
6768 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6769 * win32-low.h (win32_target_ops): New members insert_point,
6770 remove_point, stopped_by_watchpoint, stopped_data_address.
6771
d993e290
PA
67722009-06-25 Pedro Alves <pedro@codesourcery.com>
6773
6774 * server.c (process_serial_event): Re-return unsupported, not
6775 error, if the type isn't recognized. Re-allow supporting only
6776 insert or remove packets. Also call require_running for
6777 breakpoints. Add missing break statement to default case. Tidy.
6778 * target.h (struct target_ops): Rename insert_watchpoint to
6779 insert_point, and remove_watchpoint to remove_point.
6780
6781 * linux-low.h (struct linux_target_ops): Likewise.
6782 * linux-low.c (linux_insert_watchpoint): Rename to ...
6783 (linux_insert_point): ... this. Adjust.
6784 (linux_remove_watchpoint): Rename to ...
6785 (linux_remove_point): ... this. Adjust.
6786 (linux_target_ops): Adjust.
6787 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6788 (cris_insert_point): ... this.
6789 (cris_remove_watchpoint): Rename to ...
6790 (cris_remove_point): ... this.
6791 (the_low_target): Adjust.
6792
0f54c268
PM
67932009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6794
6795 * server.c (handle_v_kill): Pass signal_pid to
6796 kill_inferior if multi_process is zero.
6797
c6314022
AR
67982009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6799
6800 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6801 * target.h (target_ops): Comment for *_watchpoint to make it clear
6802 the functions can get types '0' and '1'.
6803
4463ce24
AR
68042009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6805
6806 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6807 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6808 * regcache.c (get_regcache): Likewise.
6809 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6810 * win32-low.c (child_fetch_inferior_registers): Remove check for
6811 regno 0.
6812
cf8fd78b
PA
68132009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6814 Pedro Alves <pedro@codesourcery.com>
6815
6816 * target.h (struct target_ops) <supports_multi_process>: New
6817 callback.
6818 (target_supports_multi_process): New.
6819 * server.c (handle_query): Even if GDB reports support, only
6820 enable multi-process if the target also supports it. Report
6821 multi-process support only if the target backend supports it.
6822 * linux-low.c (linux_supports_multi_process): New function.
6823 (linux_target_ops): Install it as target_supports_multi_process
6824 callback.
6825
47c0c975
DE
68262009-05-24 Doug Evans <dje@google.com>
6827
e09875d4
DE
6828 Global renaming of find_thread_pid to find_thread_ptid.
6829 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6830 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6831 All callers updated.
6832
e27d73f6
DE
6833 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6834 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6835 directly.
6836
47c0c975
DE
6837 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6838 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6839 (linux_resume_one_lwp): Ditto.
6840
2acc282a
DE
68412009-05-23 Doug Evans <dje@google.com>
6842
6843 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6844 from struct inferior_list_entry * to struct lwp_info *.
6845 All callers updated.
6846
9f1036c1
DE
68472009-05-13 Doug Evans <dje@google.com>
6848
6849 * linux-x86-low.c: Don't include assert.h.
6850 (x86_siginfo_fixup): Use fatal, not assert.
6851 (x86_arch_setup): Fix comment.
6852
d0722149
DE
68532009-05-12 Doug Evans <dje@google.com>
6854
6855 Biarch support for i386/amd64 gdbserver.
6856 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6857 Add linux-x86-low.c.
6858 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6859 (linux-x86-low.o): Add.
6860 * linux-x86-64-low.c: Delete.
6861 * linux-i386-low.c: Delete.
6862 * linux-x86-low.c: New file.
6863 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6864 linux-x86-low.o.
6865 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6866 linux-x86-low.o.
6867 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6868 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6869 (linux_child_pid_to_exec_file): New function.
6870 (elf_64_header_p, elf_64_file_p): New functions.
6871 (siginfo_fixup): New function.
6872 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6873 give target a chance to convert layout.
6874 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6875 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6876
fdeb2a12
DE
68772009-05-07 Doug Evans <dje@google.com>
6878
6879 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6880 (regsets_store_inferior_registers): Ditto.
6881
a6dbe5df
PA
68822009-05-06 Pedro Alves <pedro@codesourcery.com>
6883
6884 PR server/10048
6885
6886 * linux-low.c (must_set_ptrace_flags): Delete.
6887 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6888 of the global.
6889 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6890 `lwp->must_set_ptrace_flags' instead.
ba42693b 6891 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
6892 (linux_wait_1): ... not here.
6893
5091eb23
DE
68942009-04-30 Doug Evans <dje@google.com>
6895
9f767825
DE
6896 * inferiors.c (started_inferior_callback): New function.
6897 (attached_inferior_callback): New function.
6898 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6899 * server.c (print_started_pid, print_attached_pid): New functions.
6900 (detach_or_kill_for_exit): New function.
6901 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6902 * server.h (have_started_inferiors_p): Declare.
6903 (have_attached_inferiors_p): Declare.
6904
5091eb23
DE
6905 * inferiors.c (remove_process): Fix memory leak, free process.
6906 * linux-low.c (linux_remove_process): New function.
6907 (linux_kill): Call it instead of remove_process.
6908 (linux_detach, linux_wait_1): Ditto.
6909
155c8968
PA
69102009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
6911
6912 * configure.srv: Add x86 Windows CE target.
6913
7fe519cb
UW
69142009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6915
6916 * inferiors.c (get_thread_process): Make global.
6917 * server.h (get_thread_process): Add prototype.
6918 * thread-db.c (find_one_thread): Use get_thread_process
6919 instead of current_process.
6920 (thread_db_get_tls_address): Do not crash if called when
6921 thread layer is not yet initialized.
6922
5472f405
UW
69232009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6924
6925 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
6926 * spu-low.c (current_tid): Rename to ...
6927 (current_ptid): ... this.
6928 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
6929 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
6930 ptid_get_lwp (current_ptid) instead of current_tid.
6931 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
6932 instead of current_tid. Use find_process_pid to verify pid
6933 argument is valid. Pass proper argument to remove_process.
6934 (spu_thread_alive): Compare current_ptid instead of current_tid.
6935 (spu_resume): Likewise.
6936
55ac2b99
PA
69372009-04-02 Pedro Alves <pedro@codesourcery.com>
6938
6939 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
6940 variable.
6941
95954743
PA
69422009-04-01 Pedro Alves <pedro@codesourcery.com>
6943
6944 Implement the multiprocess extensions, and add linux multiprocess
6945 support.
6946
6947 * server.h (ULONGEST): Declare.
6948 (struct ptid, ptid_t): New.
6949 (minus_one_ptid, null_ptid): Declare.
6950 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6951 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
6952 (struct inferior_list_entry): Change `id' type from unsigned from
6953 to ptid_t.
6954 (struct sym_cache, struct breakpoint, struct
6955 process_info_private): Forward declare.
6956 (struct process_info): Declare.
6957 (current_process): Declare.
6958 (all_processes): Declare.
6959 (initialize_inferiors): Declare.
6960 (add_thread): Adjust to use ptid_t.
6961 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
6962 (add_process, remove_process, find_thread_pid): Declare.
6963 (find_inferior_id): Adjust to use ptid_t.
6964 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6965 (multi_process): Declare.
6966 (push_event): Adjust to use ptid_t.
6967 (read_ptid, write_ptid): Declare.
6968 (prepare_resume_reply): Adjust to use ptid_t.
6969 (clear_symbol_cache): Declare.
6970 * inferiors.c (all_processes): New.
6971 (null_ptid, minus_one_ptid): New.
6972 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6973 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6974 (add_thread): Change unsigned long to ptid. Remove gdb_id
6975 parameter. Adjust.
6976 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6977 (gdb_id_to_thread): Rename to ...
6978 (find_thread_pid): ... this. Change unsigned long to ptid.
6979 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6980 (loaded_dll, pull_pid_from_list): Adjust.
6981 (add_process, remove_process, find_process_pid)
6982 (get_thread_process, current_process, initialize_inferiors): New.
6983 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6984 (struct target_waitstatus) <related_pid>: Ditto.
6985 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6986 return type to int.
6987 (struct target_ops) <join>: Add `pid' argument.
6988 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6989 (struct target_ops) <wait>: Add `ptid' field. Change return type
6990 to ptid.
6991 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6992 (mywait): Add `ptid' argument. Change return type to ptid_t.
6993 (target_pid_to_str): Declare.
6994 * target.c (set_desired_inferior): Adjust to use ptids.
6995 (mywait): Add new `ptid' argument. Adjust.
6996 (target_pid_to_str): New.
6997 * mem-break.h (free_all_breakpoints): Declare.
6998 * mem-break.c (breakpoints): Delelete.
6999 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7000 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7001 to use per-process breakpoint list.
7002 (free_all_breakpoints): New.
7003 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7004 (symbol_cache, all_symbols_looked_up): Delete.
7005 (hexchars): New.
7006 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7007 read_ptid): New.
7008 (prepare_resume_reply): Change ptid argument's type from unsigned
7009 long to ptid_t. Adjust. Implement W;process and X;process.
7010 (free_sym_cache, clear_symbol_cache): New.
7011 (look_up_one_symbol): Adjust to per-process symbol cache. *
7012 * server.c (cont_thread, general_thread, step_thread): Change type
7013 to ptid_t.
7014 (attached): Delete.
7015 (multi_process): New.
7016 (last_ptid): Change type to ptid_t.
7017 (struct vstop_notif) <ptid>: Change type to ptid_t.
7018 (queue_stop_reply, push_event): Change `ptid' argument's type to
7019 ptid_t.
7020 (discard_queued_stop_replies): Add `pid' argument.
7021 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7022 changes. Don't reference the `attached' global.
7023 (attach_inferior): Adjust to mywait interface changes.
7024 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7025 features. Handle and report "multiprocess+". Handle
7026 "qAttached:PID".
7027 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7028 changes.
7029 (handle_v_kill): New.
7030 (handle_v_stopped): Adjust to use target_pid_to_str.
7031 (handle_v_requests): Allow multiple attaches and runs when
7032 multiprocess extensions are in effect. Handle "vKill".
7033 (myresume): Adjust to use ptids.
7034 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7035 (handle_status): Adjust to discard_queued_stop_replies interface
7036 change.
7037 (first_thread_of, kill_inferior_callback)
7038 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7039 (main): Call initialize_inferiors. Adjust to use ptids, killing
7040 and detaching from all inferiors. Handle multiprocess packet
7041 variants.
7042 * linux-low.h: Include gdb_proc_service.h.
7043 (struct process_info_private): New.
7044 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7045 <lwpid_of>: Use ptid_get_lwp.
7046 (get_lwp_thread): Adjust.
7047 (struct lwp_info): Add `dead' member.
7048 (find_lwp_pid): Declare.
7049 * linux-low.c (thread_db_active): Delete.
7050 (new_inferior): Adjust comment.
7051 (inferior_pid): Delete.
7052 (linux_add_process): New.
7053 (handle_extended_wait): Adjust.
7054 (add_lwp): Change unsigned long to ptid.
7055 (linux_create_inferior): Add process to processes table. Adjust
7056 to use ptids. Don't set new_inferior here.
7057 (linux_attach_lwp): Rename to ...
7058 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7059 it. Adjust to use ptids.
7060 (linux_attach_lwp): New.
7061 (linux_attach): Add process to processes table. Don't set
7062 new_inferior here.
7063 (struct counter): New.
7064 (second_thread_of_pid_p, last_thread_of_process_p): New.
7065 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7066 multiple processes.
7067 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7068 processes. Remove process from process table.
7069 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7070 to multiple processes.
7071 (any_thread_of): New.
7072 (linux_detach): Add `pid' argument, and handle it. Remove process
7073 from processes table.
7074 (linux_join): Add `pid' argument. Handle it.
7075 (linux_thread_alive): Change unsighed long argument to ptid_t.
7076 Consider dead lwps as not being alive.
7077 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7078 threads we're not interested in.
7079 (same_lwp, find_lwp_pid): New.
7080 (linux_wait_for_lwp): Change `pid' argument's type from int to
7081 ptid_t. Adjust.
7082 (linux_wait_for_event): Rename to ...
7083 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7084 from int to ptid_t. Adjust.
7085 (linux_wait_for_event): New.
7086 (linux_wait_1): Add `ptid' argument. Change return type to
7087 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7088 that exit from the process table.
7089 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7090 Adjust.
7091 (mark_lwp_dead): New.
7092 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7093 stopping all threads, mark its main lwp as dead.
7094 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7095 ptids.
7096 (fetch_register, usr_store_inferior_registers)
7097 (regsets_fetch_inferior_registers)
7098 (regsets_store_inferior_registers, linux_read_memory)
7099 (linux_write_memory): Inline `inferior_pid'.
7100 (linux_look_up_symbols): Adjust to use per-process
7101 `thread_db_active'.
7102 (linux_request_interrupt): Adjust to use ptids.
7103 (linux_read_auxv): Inline `inferior_pid'.
7104 (initialize_low): Don't reference thread_db_active.
7105 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7106 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7107 (ps_getpid): Return the pid of the current inferior.
7108 * thread-db.c (proc_handle, thread_agent): Delete.
7109 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7110 per-process data.
7111 (find_one_thread): Change argument type to ptid_t. Adjust to
7112 per-process data.
7113 (maybe_attach_thread): Adjust to per-process data and ptids.
7114 (thread_db_find_new_threads): Ditto.
7115 (thread_db_init): Ditto.
7116 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7117 processes table. Adjust to use ptids.
7118 (spu_kill, spu_detach): Adjust interface. Remove process from
7119 processes table.
7120 (spu_join, spu_thread_alive): Adjust interface.
7121 (spu_wait): Adjust interface. Remove process from processes
7122 table. Adjust to use ptids.
7123 * win32-low.c (current_inferior_tid): Delete.
7124 (current_inferior_ptid): New.
7125 (debug_event_ptid): New.
7126 (thread_rec): Take a ptid. Adjust.
7127 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7128 (child_delete_thread): Ditto.
7129 (do_initial_child_stuff): Add `attached' argument. Add process to
7130 processes table.
7131 (child_fetch_inferior_registers, child_store_inferior_registers):
7132 Adjust.
7133 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7134 (win32_attach): Pass 1 to do_initial_child_stuff.
7135 (win32_kill): Adjust interface. Remove process from processes
7136 table.
7137 (win32_detach): Ditto.
7138 (win32_join): Adjust interface.
7139 (win32_thread_alive): Take a ptid.
7140 (win32_resume): Adjust to use ptids.
7141 (get_child_debug_event): Ditto.
7142 (win32_wait): Adjust interface. Remove exiting process from
7143 processes table.
7144
bd99dc85
PA
71452009-04-01 Pedro Alves <pedro@codesourcery.com>
7146
7147 Non-stop mode support.
7148
7149 * server.h (non_stop): Declare.
7150 (gdb_client_data, handler_func): Declare.
7151 (delete_file_handler, add_file_handler, start_event_loop):
7152 Declare.
7153 (handle_serial_event, handle_target_event, push_event)
7154 (putpkt_notif): Declare.
7155 * target.h (enum resume_kind): New.
7156 (struct thread_resume): Replace `step' field by `kind' field.
7157 (TARGET_WNOHANG): Define.
7158 (struct target_ops) <wait>: Add `options' argument.
7159 <supports_non_stop, async, start_non_stop>: New fields.
7160 (target_supports_non_stop, target_async): New.
7161 (start_non_stop): Declare.
7162 (mywait): Add `options' argument.
7163 * target.c (mywait): Add `options' argument. Print child exit
7164 notifications here.
7165 (start_non_stop): New.
7166 * server.c (non_stop, own_buf, mem_buf): New globals.
7167 (struct vstop_notif): New.
7168 (notif_queue): New global.
7169 (queue_stop_reply, push_event, discard_queued_stop_replies)
7170 (send_next_stop_reply): New.
7171 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7172 interface changes.
7173 (attach_inferior): In non-stop mode, don't wait for the target
7174 here.
7175 (handle_general_set): Handle QNonStop.
7176 (handle_query): When handling qC, return the current general
7177 thread, instead of the first thread of the list.
7178 (handle_query): If the backend supports non-stop mode, include
7179 QNonStop+ in the qSupported query response.
7180 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7181 and non-stop mode.
7182 (handle_v_attach, handle_v_run): Handle non-stop mode.
7183 (handle_v_stopped): New.
7184 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7185 (myresume): Adjust to use resume_kind. Handle non-stop.
7186 (queue_stop_reply_callback): New.
7187 (handle_status): Handle non-stop mode.
7188 (main): Clear non_stop flag on reconnection. Use the event-loop.
7189 Refactor serial protocol handling from here ...
7190 (process_serial_event): ... to this new function. When GDB
7191 selects any thread, select one here. In non-stop mode, wait until
7192 GDB acks all pending events before exiting.
7193 (handle_serial_event, handle_target_event): New.
7194 * remote-utils.c (remote_open): Install remote_desc in the event
7195 loop.
7196 (remote_close): Remove remote_desc from the event loop.
7197 (putpkt_binary): Rename to...
7198 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7199 (putpkt_binary): New as wrapper around putpkt_binary_1.
7200 (putpkt_notif): New.
7201 (prepare_resume_reply): In non-stop mode, don't change the
7202 general_thread.
7203 * event-loop.c: New.
7204 * Makefile.in (OBJ): Add event-loop.o.
7205 (event-loop.o): New rule.
7206
7207 * linux-low.h (pid_of): Moved here.
7208 (lwpid_of): New.
7209 (get_lwp_thread): Use lwpid_of.
7210 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7211 * linux-low.c (pid_of): Delete.
7212 (inferior_pid): Use lwpid_of.
7213 (linux_event_pipe): New.
7214 (target_is_async_p): New.
7215 (delete_lwp): New.
7216 (handle_extended_wait): Use lwpid_of.
7217 (add_lwp): Don't set lwpid field.
7218 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7219 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7220 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7221 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7222 first. Adjust to linux_wait_for_event interface changes. Use
7223 lwpid_of.
7224 (linux_detach): Don't delete the main lwp here.
7225 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7226 (status_pending_p): Don't consider explicitly suspended lwps.
7227 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7228 pointer. Add OPTIONS argument. Change return type to int. Use
7229 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7230 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7231 pointer. Add status pointer argument. Return a pid instead of a
7232 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7233 changes. In non-stop mode, don't switch to a random thread.
7234 (linux_wait): Rename to...
7235 (linux_wait_1): ... this. Add target_options argument, and handle
7236 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7237 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7238 clean exit and signal exit code. Don't stop all threads in
7239 non-stop mode. In all-stop mode, only stop all threads when
7240 reporting a stop to GDB. Handle explicit thread stop requests.
7241 (async_file_flush, async_file_mark): New.
7242 (linux_wait): New.
7243 (send_sigstop): Use lwpid_of.
7244 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7245 interface changes. In non-stop mode, don't switch to a random
7246 thread.
7247 (linux_resume_one_lwp): Use lwpid_of.
7248 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7249 (linux_resume_one_thread): ... this. Handle resume_stop. In
7250 non-stop mode, don't look for pending flag in all threads.
7251 (resume_status_pending_p): Don't consider explicitly suspended
7252 threads.
7253 (my_waitpid): Reimplement. Emulate __WALL.
7254 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7255 Use lwpid_of.
7256 (sigchld_handler, linux_supports_non_stop, linux_async)
7257 (linux_start_non_stop): New.
7258 (linux_target_ops): Register linux_supports_non_stop, linux_async
7259 and linux_start_non_stop.
7260 (initialize_low): Install SIGCHLD handler.
7261 * thread-db.c (thread_db_create_event, find_one_thread)
7262 (thread_db_get_tls_address): Use lwpid_of.
7263 * win32-low.c (win32_detach): Adjust to use resume_kind.
7264 (win32_wait): Add `options' argument.
7265 * spu-low.c (spu_resume): Adjust to use resume_kind.
7266 (spu_wait): Add `options' argument.
7267
5b1c542e
PA
72682009-04-01 Pedro Alves <pedro@codesourcery.com>
7269
7270 Decouple target code from remote protocol.
7271
7272 * target.h (enum target_waitkind): New.
7273 (struct target_waitstatus): New.
7274 (struct target_ops) <wait>: Return an unsigned long. Take a
7275 target_waitstatus pointer instead of a char pointer.
7276 (mywait): Likewise.
7277 * target.c (mywait): Change prototype to return an unsigned long.
7278 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7279 * server.h (thread_from_wait, old_thread_from_wait): Delete
7280 declarations.
7281 (prepare_resume_reply): Change prototype to take a
7282 target_waitstatus.
7283 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7284 (last_status, last_ptid): New.
7285 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7286 pid instead of a signal.
7287 (attach_inferior): Remove "status" and "signal" parameters.
7288 Adjust.
7289 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7290 not as an address.
7291 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7292 (handle_v_requests, myresume): Remove "status" and "signal"
7293 parameters. Adjust.
7294 (handle_status): New.
7295 (main): Delete local `status'. Adjust.
7296 * remote-utils.c: Include target.h.
7297 (prepare_resume_reply): Change prototype to take a
7298 target_waitstatus. Adjust.
7299
7300 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7301 interface.
7302 * spu-low.c (spu_wait): Adjust.
7303 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7304 Delete.
7305 (win32_wait): Adjust.
7306
2bd7c093
PA
73072009-04-01 Pedro Alves <pedro@codesourcery.com>
7308
7309 * target.h (struct thread_resume): Delete leave_stopped member.
7310 (struct target_ops): Add a `n' argument to the `resume' callback.
7311 * server.c (start_inferior): Adjust.
7312 (handle_v_cont, myresume): Adjust.
7313 * linux-low.c (check_removed_breakpoint): Adjust to resume
7314 interface change, and to removed leave_stopped field.
7315 (resume_ptr): Delete.
7316 (struct thread_resume_array): New.
7317 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7318 resume interface change.
7319 (linux_continue_one_thread, linux_queue_one_thread)
7320 (resume_status_pending_p): Check if the resume field is NULL
7321 instead of checking the leave_stopped member.
7322 (linux_resume): Adjust to the target resume interface change.
7323 * spu-low.c (spu_resume): Adjust to the target resume interface
7324 change.
7325 * win32-low.c (win32_detach, win32_resume): Ditto.
7326
c35fafde
PA
73272009-04-01 Pedro Alves <pedro@codesourcery.com>
7328
7329 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7330 flag.
7331 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7332 pending.
7333 (linux_continue_one_thread): Only preserve the stepping flag if
7334 there's a pending breakpoint.
7335
0a59d50b
PA
73362009-03-31 Pedro Alves <pedro@codesourcery.com>
7337
7338 * server.c (main): After the inferior having exited, call
7339 remote_close before exiting gdbserver.
7340
f04c6d38
TJB
73412009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7342
7343 Fix size of FPSCR in Power 7 processors.
7344 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7345 (PPC_FEATURE_HAS_DFP): New #define.
7346 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7347 size of the FPSCR.
7348
78e5cee6
PA
73492009-03-23 Pedro Alves <pedro@codesourcery.com>
7350
7351 * server.c (handle_query) Whitespace and formatting.
7352
1b3f6016
PA
73532009-03-22 Pedro Alves <pedro@codesourcery.com>
7354
7355 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7356 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7357 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7358 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7359 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7360 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7361 Makefile.in, configure.ac: Fix whitespace throughout.
7362 * configure: Regenerate.
7363
a07b2135
PA
73642009-03-22 Pedro Alves <pedro@codesourcery.com>
7365
7366 * inferiors.c (find_inferior): Make it safe for the callback
7367 function to delete the currently iterated inferior.
7368
67cc2626
PA
73692009-03-22 Pedro Alves <pedro@codesourcery.com>
7370
7371 * Makefile.in (linuw_low_h): Move higher.
7372 (thread-db.o): Depend on $(linux_low_h).
7373
54a0b537
PA
73742009-03-17 Pedro Alves <pedro@codesourcery.com>
7375
7376 Rename "process" to "lwp" throughout.
7377
7378 * linux-low.c (all_processes): Rename to...
7379 (all_lwps): ... this.
7380 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7381 (add_process): Rename to ...
7382 (add_lwp): ... this. Adjust.
7383 (linux_create_inferior): Adjust.
7384 (linux_attach_lwp): Adjust.
7385 (linux_attach): Adjust.
7386 (linux_kill_one_process): Rename to ...
7387 (linux_kill_one_lwp): ... this. Adjust.
7388 (linux_kill): Adjust.
7389 (linux_detach_one_process): Rename to ...
7390 (linux_detach_one_lwp): ... this. Adjust.
7391 (linux_detach): Adjust.
7392 (check_removed_breakpoint): Adjust.
7393 (status_pending_p): Adjust.
7394 (linux_wait_for_process): Rename to ...
7395 (linux_wait_for_lwp): ... this. Adjust.
7396 (linux_wait_for_event): Adjust.
7397 (send_sigstop): Adjust.
7398 (wait_for_sigstop): Adjust.
7399 (stop_all_processes): Rename to ...
7400 (stop_all_lwps): ... this.
7401 (linux_resume_one_process): Rename to ...
7402 (linux_resume_one_lwp): ... this. Adjust.
7403 (linux_set_resume_request, linux_continue_one_thread)
7404 (linux_queue_one_thread, resume_status_pending_p)
7405 (usr_store_inferior_registers, regsets_store_inferior_registers)
7406 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7407 Adjust.
7408 * linux-low.h (get_process): Rename to ...
7409 (get_lwp): ... this. Adjust.
7410 (get_thread_process): Rename to ...
7411 (get_thread_lwp): ... this. Adjust.
7412 (get_process_thread): Rename to ...
7413 (get_lwp_thread): ... this. Adjust.
7414 (struct process_info): Rename to ...
7415 (struct lwp_info): ... this.
7416 (all_processes): Rename to ...
7417 (all_lwps): ... this.
7418 * proc-service.c (ps_lgetregs): Adjust.
7419 * thread-db.c (thread_db_create_event, find_one_thread)
7420 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7421
0b16c5cf
PA
74222009-03-14 Pedro Alves <pedro@codesourcery.com>
7423
7424 * server.c (handle_query): Handle "qAttached".
7425
32de4b9d
NS
74262009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7427
7428 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7429 GPLv3, update license URL.
7430
2aecd87f
DE
74312009-03-01 Doug Evans <dje@google.com>
7432
93efd302 7433 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7434 (server_h): Add gdb_signals.h.
7435 (signals.o): Update.
7436 * server.h (target_signal_from_host,target_signal_to_host_p)
7437 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7438
86b1f9c5
PM
74392009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7440
7441 * remote-utils.c (getpkt): Also generate remote-debug
7442 information if noack_mode is set.
7443
4aa995e1
PA
74442009-02-06 Pedro Alves <pedro@codesourcery.com>
7445
7446 * server.c (handle_query): Report qXfer:siginfo:read and
7447 qXfer:siginfo:write as supported and handle them.
7448 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7449 * linux-low.c (linux_xfer_siginfo): New.
7450 (linux_target_ops): Set it.
7451
62709adf
PA
74522009-01-26 Pedro Alves <pedro@codesourcery.com>
7453
7454 * server.c (gdbserver_usage): Mention --remote-debug.
7455 (main): Accept '--remote-debug' switch.
7456
aef93bd7
DE
74572009-01-18 Doug Evans <dje@google.com>
7458
7459 * regcache.c (new_register_cache): No need to check result of xcalloc.
7460 * server.c (handle_search_memory): Back out calls to xmalloc,
7461 result is checked and error is returned to user upon failure.
7462 (handle_query): Ditto. Add more checks for result of malloc.
7463 (handle_v_cont): Check result of malloc, report error back to
7464 user upon failure.
7465 (handle_v_run): Ditto. Call freeargv.
7466 * server.h (freeargv): Declare.
7467 * utils.c (freeargv): New fn.
7468
54363045
DE
74692009-01-15 Doug Evans <dje@google.com>
7470
f626972c
DE
7471 * gdbreplay.c (perror_with_name): Make arg const char *.
7472 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7473 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7474 * utils.c (perror_with_name): Make arg const char *.
54363045 7475
18aae699
PA
74762009-01-14 Pedro Alves <pedro@codesourcery.com>
7477
7478 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7479 when handling a EXIT_PROCESS_DEBUG_EVENT.
7480
ff703abe
JB
74812009-01-06 Joel Brobecker <brobecker@adacore.com>
7482
7483 * gdbreplay.c (gdbreplay_version): Update copyright year.
7484 * server.c (gdbserver_version): Likewise.
7485
f21cc1a2 74862009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7487
7488 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7489 (handle_extended_wait): Improve comment.
0e21c1ec 7490
bca929d3
DE
74912008-12-13 Doug Evans <dje@google.com>
7492
7493 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7494 * server.h (ATTR_MALLOC): New macro.
7495 (xmalloc,xcalloc,xstrdup): Declare.
7496 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7497 * inferiors.c: Ditto.
7498 * linux-low.c: Ditto.
7499 * mem-break.c: Ditto.
7500 * regcache.c: Ditto.
7501 * remote-utils.c: Ditto.
7502 * server.c: Ditto.
7503 * target.c: Ditto.
7504 * win32-low.c: Ditto.
7505
97438e3f
DE
75062008-12-12 Doug Evans <dje@google.com>
7507
896c7fbb
DE
7508 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7509 in debugging printf.
7510
97438e3f
DE
7511 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7512
e3b886f8
DE
75132008-12-09 Doug Evans <dje@google.com>
7514
7515 * linux-low.h (struct process_info): Delete member tid, unused.
7516 * thread-db.c (find_one_thread): Update.
7517 (maybe_attach_thread): Update.
7518
07e059b5
VP
75192008-12-02 Pedro Alves <pedro@codesourcery.com>
7520
889bf7c5
PA
7521 * target.h (struct target_ops): Add qxfer_osdata member.
7522 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7523 and dirent.h.
7524 (linux_qxfer_osdata): New functions.
7525 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7526 callback.
7527 * server.c (handle_query): Handle "qXfer:osdata:read:".
7528 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7529 (buffer_xml_printf): New functions.
7530 * server.h (struct buffer): New.
7531 (buffer_grow_str, buffer_grow_str0): New macros.
7532 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7533 (buffer_xml_printf): Declare.
07e059b5 7534
4cab47ab
DE
75352008-11-24 Doug Evans <dje@google.com>
7536
7537 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7538
f142445f
DJ
75392008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7540
7541 * server.c (handle_v_run): Always use the supplied argument list.
7542
d0107bb6 75432008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7544
d0107bb6
BW
7545 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7546 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7547
2c4ad781
TJB
75482008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7549
7550 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7551 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7552 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7553 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7554 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7555 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7556 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7557 XML target descriptions.
7558 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7559 when inferior is running on an ISA 2.05 or later processor. Add
7560 special case to return offset for full 64-bit slot of FPSCR when
7561 in 32-bits.
7562
dfb64f85
DJ
75632008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7564
7565 * Makefile.in (SFILES, clean): Added sparc64 files.
7566 (reg-sparc64.o, reg-sparc64.c): New.
7567 * configure.srv (sparc*-*-linux*): New configuration.
7568 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7569 syscall arguments for SPARC.
7570 (regsets_store_inferior_registers): Likewise.
7571 * linux-sparc-low.c: New file.
7572
66b6e1dd
DE
75732008-10-21 Doug Evans <dje@google.com>
7574
7575 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7576 (READLINE_DIR,READLINE_DEP): Delete.
7577 (INTERNAL_CFLAGS): Update.
7578 (LINTFLAGS): Update.
7579
9b710a42
PA
75802008-10-10 Pedro Alves <pedro@codesourcery.com>
7581
7582 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7583 whole argv from the last run, not just argv[0].
7584
5822d809
PA
75852008-09-08 Pedro Alves <pedro@codesourcery.com>
7586
7587 * regcache.c (new_register_cache): Return NULL if the register
7588 cache size isn't known yet.
7589 (free_register_cache): Avoid dereferencing a NULL regcache.
7590
74aac56f
DJ
75912008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7592
7593 * configure.srv: Merge MIPS and MIPS64.
7594
400b20f5
MR
75952008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7596
7597 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7598
677c5bb1
LM
75992008-08-18 Luis Machado <luisgpm@br.ibm.com>
7600
7601 * Makefile.in: Add required vsx dependencies.
7602
7603 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7604 Declare init_registers_powerpc_vsx32l.
7605 Declare init_registers_powerpc_vsx64l.
7606 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7607 (ppc_arch_setup): Check for VSX in hwcap.
7608 (ppc_fill_vsxregset): New function.
7609 (ppc_store_vsxregset): New function.
7610 Add new VSX entry in regset_info target_regsets.
7611
7612 * configure.srv: Add new VSX dependencies.
7613
a6f3e723
SL
76142008-08-12 Pedro Alves <pedro@codesourcery.com>
7615
7616 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7617 (remote_open): Set or clear transport_is_reliable.
7618 (putpkt_binary): Don't expect acks in noack mode.
7619 (getpkt): Don't send ack/nac in noack mode.
7620 * server.c (handle_general_set): Handle QStartNoAckMode.
7621 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7622 qSupported.
7623 (main): Reset noack_mode on every connection.
7624 * server.h (noack_mode): Declare.
7625
a417dc56
RW
76262008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7627
7628 * Makefile.in (GDBREPLAY_OBS): New variable.
7629 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7630
3221518c
UW
76312008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7632 Daniel Jacobowitz <dan@codesourcery.com>
7633
7634 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7635 (usr_store_inferior_registers): Likewise.
7636 (regsets_store_inferior_registers): Likewise.
7637
ec56be1b
PA
76382008-07-31 Rolf Jansen <rj@surtec.com>
7639 Pedro Alves <pedro@codesourcery.com>
7640
7641 * configure.ac: Check for memmem declaration.
7642 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7643 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7644 (disable_packet_qfThreadInfo): Unconditionally compile.
7645 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7646 * configure, config.in: Regenerate.
7647
2fe5e3ff
DE
76482008-07-28 Doug Kwan <dougkwan@google.com>
7649
7650 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7651 (linux_write_memory): Remove declaration of errno.
7652
836acd6d
UW
76532008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7654
7655 * linux-low.c (handle_extended_wait): Do not use "status"
7656 variable uninitialized.
7657
aeba519e
PA
76582008-07-07 Pedro Alves <pedro@codesourcery.com>
7659
7660 * server.c (handle_v_attach): Inhibit reporting dll changes.
7661
db42f210
PA
76622008-06-27 Pedro Alves <pedro@codesourcery.com>
7663
7664 * remote-utils.c (prepare_resume_reply): If requested, don't
7665 output "thread:TID" in the T stop reply.
7666
7667 * server.c (disable_packet_vCont, disable_packet_Tthread)
7668 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7669 (handle_query): If requested, disable support for qC, qfThreadInfo
7670 and qsThreadInfo.
7671 (handle_v_requests): If requested, disable support for vCont.
7672 (gdbserver_show_disableable): New.
7673 (main): Handle --disable-packet and --disable-packet=LIST.
7674
7675 * server.h (disable_packet_vCont, disable_packet_Tthread)
7676 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7677
8e4c5421
CD
76782008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7679
7680 * server.c (gdbserver_usage): Mention --version.
7681
6e23a804
DJ
76822008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7683
7684 * Makefile.in (gdbreplay.o): New rule.
7685
90aa6a40
JM
76862008-06-06 Joseph Myers <joseph@codesourcery.com>
7687
7688 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7689 message, not gdbserver.
7690
c16158bc 76912008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
7692 Nathan Sidwell <nathan@codesourcery.com>
7693 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
7694
7695 * acinclude.m4: Include ../../config/acx.m4.
7696 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7697 * configure, config.in: Regenerate.
7698 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7699 * server.c (gdbserver_version): Print PKGVERSION.
7700 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7701 (main): Adjust gdbserver_usage calls.
7702 * gdbreplay.c (version, host_name): Add declarations.
7703 (gdbreplay_version, gdbreplay_usage): New.
7704 (main): Accept --version and --help options.
7705
aeb75bf5
DJ
77062008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7707
7708 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7709 (arm_breakpoint_at): Handle Thumb.
7710 (the_low_target): Add comment.
7711
76b233dd
UW
77122008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7713
7714 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7715
08388c79
DE
77162008-05-09 Doug Evans <dje@google.com>
7717
a3c83fae
DE
7718 * server.h (decode_search_memory_packet): Declare.
7719 * remote-utils.c (decode_search_memory_packet): New fn.
7720 * server.c (handle_search_memory_1): New fn.
08388c79
DE
7721 (handle_search_memory): New fn.
7722 (handle_query): Process qSearch:memory packets.
7723
bb9c3d36
UW
77242008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7725
7726 * regcache.c (registers_length): Remove.
7727 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7728 full register packet.
7729 * regcache.h (registers_length): Remove prototype.
7730 * server.h (PBUFSIZ): Define to 16384.
7731
7284e1be
UW
77322008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7733
7734 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7735 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7736 powerpc-64l.o, and powerpc-altivec64l.o.
7737 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7738 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7739 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7740 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7741 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7742 to srv_xmlfiles.
7743
7744 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7745 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7746 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7747 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7748 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7749 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7750 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7751 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7752 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7753 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7754 (clean): Update.
7755
7756 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7757 (init_registers_powerpc_32l): ... this new prototype.
7758 (init_registers_powerpc_32): Remove, replace by ...
7759 (init_registers_powerpc_altivec32l): ... this new prototype.
7760 (init_registers_powerpc_e500): Remove, replace by ...
7761 (init_registers_powerpc_e500l): ... this new prototype.
7762 (init_registers_ppc64): Remove, replace by ...
7763 (init_registers_powerpc_64l): ... this new prototype.
7764 (init_registers_powerpc_64): Remove, replace by ...
7765 (init_registers_powerpc_altivec64l): ... this new prototype.
7766 (ppc_num_regs): Set to 73.
7767 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7768 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7769 (ppc_cannot_store_register): Handle orig_r3 and trap.
7770 (ppc_arch_setup): Update init_registers_... calls.
7771 (ppc_fill_gregset): Handle orig_r3 and trap.
7772
7773 * inferiors.c (clear_inferiors): Reset current_inferior.
7774
fdc59709
PB
77752008-04-23 Paolo Bonzini <bonzini@gnu.org>
7776
889bf7c5
PA
7777 * acinclude.m4: Add override.m4.
7778 * configure: Regenerate.
fdc59709 7779
c9b2f845
UW
77802008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7781
7782 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7783 initial call to init_register_ppc64.
7784
550512b8
UW
77852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7786
43aaf8b6
PA
7787 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7788 single powerpc*-*-linux* case.
550512b8
UW
7789 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7790
b6430ec3
UW
77912008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7792
7793 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 7794 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
7795 from reg_xmlfiles.
7796 * linux-ppc-low.c: Include <elf.h>.
7797 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7798 (ppc_hwcap): New global variable.
7799 (ppc_regmap): Remove __SPE__ #ifdef sections.
7800 (ppc_regmap_e500): New global variable.
7801 (ppc_cannot_store_register): Update __SPE__ special case.
7802 (ppc_get_hwcap): New function.
7803 (ppc_arch_setup): Use it to determine whether inferior supports
7804 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7805 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7806 Do not access registers if target does not support AltiVec.
7807 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7808 Do not access registers if target does not support SPE.
7809 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7810
52fa2412
UW
78112008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7812
7813 * linux-low.c (disabled_regsets, num_regsets): New.
7814 (use_regsets_p): Delete.
7815 (linux_wait_for_process): Clear disabled_regsets.
7816 (regsets_fetch_inferior_registers): Check and set it.
7817 (regsets_store_inferior_registers): Likewise.
7818 (linux_fetch_registers, linux_store_registers): Do not use
7819 use_regsets_p.
7820 (initialize_low): Allocate disabled_regsets.
7821
e28b3332
DJ
78222008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7823
7824 * Makefile.in (LIBOBJS): New.
7825 (OBS): Use LIBOBJS.
7826 (memmem.o): New rule.
7827 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7828 * configure: Regenerated.
7829
4536995d
UW
78302008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7831
7832 * server.c (handle_query): Never return "unsupported" for
7833 qXfer:features:read queries.
7834
221c031f
UW
78352008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7836
7837 * server.c (get_features_xml): Fix inverted condition.
7838 (handle_query): Always support qXfer:feature:read.
7839
ccd213ac
DJ
78402008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7841
7842 * server.c (wrapper_argv): New.
7843 (start_inferior): Handle wrapper_argv. If set, expect an extra
7844 trap.
7845 (gdbserver_usage): Document --wrapper.
7846 (main): Parse --wrapper.
7847
6fe305f7
UW
78482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7849
7850 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7851 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7852 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7853 (ppc_set_pc): Likewise.
7854 (ppc_arch_setup): New function.
7855 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7856 of collect_register.
889bf7c5 7857 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 7858
5b0a002e
UW
78592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7860
7861 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7862 instead of linux-ppc64-low.o.
7863 * linux-ppc64-low.c: Remove file.
7864 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7865 (linux-ppc64-low.o): Remove rule.
7866
7867 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7868 (init_registers_powerpc_64): Likewise.
7869 (ppc_regmap): Conditionally define depending on __powerpc64__.
7870 (ppc_cannot_store_register): Do not special-case "fpscr" when
7871 compiled on __powerpc64__.
7872 (ppc_collect_ptrace_register): New function.
7873 (ppc_supply_ptrace_register): New function.
7874 (ppc_breakpoint): Change type to "unsigned int".
7875 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7876 (the_low_target): Conditionally provide initializers for the
889bf7c5 7877 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
7878 collect_ptrace_register and supply_ptrace_register members.
7879
9b4b61c8
UW
78802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7881
7882 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7883 * server.c (gdbserver_xmltarget): Define.
7884 (get_features_xml): Use it to replace "target.xml" and arch_string.
7885
7886 * configure.srv: Remove srv_xmltarget. Add XML files that were
7887 mentioned there to srv_xmlfiles instead. Remove conditional tests
7888 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7889 srv_xmlfiles and srv_regobj to include all possible choices.
7890 * configure.ac (srv_xmltarget): Remove.
7891 (srv_xmlfiles): Do not add "target.xml".
7892 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7893 checks for supplementary target information.
7894 * configure: Regenerate.
7895 * Makefile.in (XML_TARGET): Remove.
7896 (target.xml): Remove rule.
7897 (clean): Do not clean up target.xml.
7898 (.PRECIOUS): Do not mention target.xml.
7899
7900 * target.h (struct target_ops): Remove arch_string member.
7901 * linux-low.c (linux_arch_string): Remove.
7902 (linux_target_ops): Remove arch_string initializer.
7903 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7904 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7905 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
7906 * spu-low.c (spu_arch_string): Remove.
7907 (spu_target_ops): Remove arch_string initializer.
7908 * win32-low.c (win32_arch_string): Remove.
7909 (win32_target_ops): Remove arch_string initializer.
7910 * win32-low.h (struct win32_target_ops): Remove arch_string member.
7911 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
7912 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
7913
ee1a7ae4
UW
79142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7915
7916 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
7917 by collect_ptrace_register and supply_ptrace_register hooks.
7918 * linux-low.c (fetch_register): Use supply_ptrace_register callback
7919 instead of checking for the_low_target.left_pad_xfer.
7920 (usr_store_inferior_registers): Use collect_ptrace_register callback
7921 instead of checking for the_low_target.left_pad_xfer.
7922
7923 * linux-s390-low.c (s390_collect_ptrace_register): New function.
7924 (s390_supply_ptrace_register): Likewise.
7925 (s390_fill_gregset): Call s390_collect_ptrace_register.
7926 (the_low_target): Update.
7927
7928 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
7929 (ppc_supply_ptrace_register): Likewise.
7930 (the_low_target): Update.
7931
7932 * linux-i386-low.c (the_low_target): Update.
7933 * linux-x86-64-low.c (the_low_target): Update.
7934
d61ddec4
UW
79352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7936
7937 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
7938 reg-s390.o and reg-s390x.o.
7939
7940 * linux-low.c (new_inferior): New global variable.
7941 (linux_create_inferior, linux_attach): Set it.
7942 (linux_wait_for_process): Call the_low_target.arch_setup after the
7943 target has stopped for the first time.
7944 (initialize_low): Do not call the_low_target.arch_setup.
7945
7946 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
7947 (s390_set_pc): Likewise.
7948 (s390_arch_setup): New function.
7949 (the_low_target): Use s390_arch_setup as arch_setup routine.
7950
7951 * regcache.c (realloc_register_cache): New function.
7952 (set_register_cache): Call it for each existing regcache.
7953
d05b4ac3
UW
79542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
7955
7956 * server.h (init_registers): Remove prototype.
7957
7958 * linux-low.h (struct linux_target_ops): Add arch_setup field.
7959 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
7960 instead of init_registers ().
7961 * linux-arm-low.c (init_registers_arm): Add prototype.
7962 (init_registers_arm_with_iwmmxt): Likewise.
7963 (the_low_target): Add initializer for arch_setup field.
7964 * linux-cris-low.c (init_registers_cris): Add prototype.
7965 (the_low_target): Add initializer for arch_setup field.
7966 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7967 (the_low_target): Add initializer for arch_setup field.
7968 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7969 (the_low_target): Add initializer for arch_setup field.
7970 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7971 (the_low_target): Add initializer for arch_setup field.
7972 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7973 (the_low_target): Add initializer for arch_setup field.
7974 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7975 (the_low_target): Add initializer for arch_setup field.
7976 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7977 (init_registers_mips64_linux): Likewise.
7978 (the_low_target): Add initializer for arch_setup field.
7979 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7980 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7981 (the_low_target): Add initializer for arch_setup field.
7982 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7983 (init_registers_powerpc_64): Likewise.
7984 (the_low_target): Add initializer for arch_setup field.
7985 * linux-s390-low.c (init_registers_s390): Add prototype.
7986 (init_registers_s390x): Likewise.
7987 (the_low_target): Add initializer for arch_setup field.
7988 * linux-sh-low.c (init_registers_sh): Add prototype.
7989 (the_low_target): Add initializer for arch_setup field.
7990 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7991 (the_low_target): Add initializer for arch_setup field.
7992 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7993 (the_low_target): Add initializer for arch_setup field.
7994
7995 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7996 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7997 instead of init_registers ().
7998 * win32-arm-low.c (init_registers_arm): Add prototype.
7999 (the_low_target): Add initializer for arch_setup field.
8000 * win32-i386-low.c (init_registers_i386): Add prototype.
8001 (the_low_target): Add initializer for arch_setup field.
8002
8003 * spu-low.c (init_registers_spu): Add prototype.
8004 (initialize_low): Call initialie_registers_spu () instead of
8005 initialize_registers ().
8006
fd96d250
PA
80072008-02-19 Pedro Alves <pedro@codesourcery.com>
8008
8009 * server.c (handle_v_requests): When handling the vRun and vAttach
8010 packets, if already debugging a process, don't kill it. Return an
8011 error instead.
8012
d41b6bb4
DJ
80132008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8014
8015 * server.c (handle_query): Correct length check.
8016
5ac588cf
PA
80172008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8018
8019 * win32-low.c (do_initial_child_stuff): Add process handle
8020 parameter. Set current_process_handle and current_process_id from the
8021 parameters. Clear globals.
8022 (win32_create_inferior): Don't set current_process_handle and
8023 current_process_id here. Instead pass them on the call to
8024 do_initial_child_stuff.
8025 (win32_attach): Likewise.
8026 (win32_clear_inferiors): New.
8027 (win32_kill): Don't close the current process handle or the
8028 current thread handle here. Instead call win32_clear_inferiors.
8029 (win32_detach): Don't open a new handle to the process. Call
8030 win32_clear_inferiors.
8031 (win32_join): Don't rely on current_process_handle; open a new
8032 handle using the process id.
8033 (win32_wait): Call win32_clear_inferiors when the inferior process
8034 has exited.
8035
ecd7ecbc
DJ
80362008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8037
8038 * server.c (monitor_show_help): Add "exit".
8039
1525d545
MG
80402008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8041
ecd7ecbc 8042 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8043 (clean): Add reg-xtensa.c.
8044 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8045 * configure.srv (xtensa*-*-linux*) New target.
8046 * linux-xtensa-low.c: New.
8047 * xtensa-xtregs.c: New.
1525d545 8048
59a016f0
PA
80492008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8050
8051 * hostio.c: Don't include errno.h.
8052 (errno_to_fileio_errno): Move to hostio-errno.
8053 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8054 error number outputting to the target->hostio_last_error callback.
8055 (hostio_packet_error): Use FILEIO_EINVAL directly.
8056 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8057 calls to hostio_error.
8058 * hostio-errno.c: New.
8059 * server.h (hostio_last_error_from_errno): Declare.
8060 * target.h (target_ops): Add hostio_last_error member.
8061 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8062 as hostio_last_error handler.
889bf7c5 8063 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8064 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8065 (wince_hostio_last_error): New functions.
8066 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8067 as hostio_last_error handler.
8068 (win32_target_ops) [!_WIN32_WCE]: Register
8069 hostio_last_error_from_errno as hostio_last_error handler.
8070 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8071 (hostio-errno.o): New rule.
8072 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8073 * configure.srv (srv_hostio_err_objs): New variable. Default to
8074 hostio-errno.o.
8075 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8076 * configure: Regenerate.
8077
2d717e4f
DJ
80782008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8079
8080 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8081 (linux_kill, linux_detach): Clean up the process list.
8082 * remote-utils.c (remote_open): Improve port number parsing.
8083 (putpkt_binary, input_interrupt): Only send interrupts if the target
8084 is running.
8085 * server.c (extended_protocol): Make static.
8086 (attached): Define earlier.
8087 (exit_requested, response_needed, program_argv): New variables.
8088 (target_running): New.
8089 (start_inferior): Clear attached here.
8090 (attach_inferior): Set attached here.
8091 (require_running): Define.
8092 (handle_query): Use require_running and target_running. Implement
8093 "monitor exit".
8094 (handle_v_attach, handle_v_run): New.
8095 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8096 (gdbserver_usage): Update.
8097 (main): Redo argument parsing. Handle --debug and --multi. Handle
8098 --attach along with other options or after the port. Save
8099 program_argv. Support no initial program. Resynchronize
8100 communication with GDB after an error. Handle "monitor exit".
8101 Use require_running and target_running. Always allow the extended
8102 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8103 restart in extended mode.
8104 * README: Refer to the GDB manual. Update --attach usage.
8105
7407e2de
AS
81062007-12-20 Andreas Schwab <schwab@suse.de>
8107
8108 * linux-low.c (STACK_SIZE): Define.
8109 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8110 (linux_test_for_tracefork): Likewise.
8111
b65d95c5
DJ
81122007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8113
8114 * linux-low.c (linux_wait_for_event): Update messages. Do not
8115 reinsert auto-delete breakpoints.
8116 * mem-break.c (struct breakpoint): Change return type of handler to
8117 int.
8118 (set_breakpoint_at): Update handler type.
8119 (reinsert_breakpoint_handler): Return 1 instead of calling
8120 delete_breakpoint.
8121 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8122 setting a new one.
8123 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8124 * mem-break.h (set_breakpoint_at): Update handler type.
8125 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8126 * win32-low.c (auto_delete_breakpoint): New.
8127 (get_child_debug_event): Use it.
8128
4e799345
DJ
81292007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8130
8131 * configure.ac: Check for pread and pwrite.
8132 * hostio.c (handle_pread): Fall back to lseek and read.
8133 (handle_pwrite): Fall back to lseek and write.
8134 * config.in, configure: Regenerated.
8135
27524b67
DJ
81362007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8137
8138 * server.c (myresume): Add own_buf argument.
8139 (main): Update calls.
8140
a20d5e98
DJ
81412007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8142
8143 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8144 * remote-utils.c (remote_open): Do not call disable_async_io.
8145 (block_async_io): Delete.
8146 (unblock_async_io): Make static.
8147 (initialize_async_io): New.
8148 * server.c (handle_v_cont): Handle async I/O here.
8149 (myresume): Likewise. Move other common resume tasks here...
8150 (main): ... from here. Call initialize_async_io. Disable async
8151 I/O before the main loop.
8152 * server.h (initialize_async_io): Declare.
8153 (block_async_io, unblock_async_io): Delete prototypes.
8154 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8155
b79d787e
DJ
81562007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8157
8158 * remote-utils.c (readchar): Allow binary data in received messages.
8159
d97903b2
PA
81602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8161
8162 * win32-low.c (attaching): New global.
8163 (win32_create_inferior): Clear the `attaching' global.
8164 (win32_attach): Set the `attaching' global.
8165 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8166 attaching. Only set a breakpoint at the entry point if not
8167 attaching.
8168
311de423
PA
81692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8170
8171 * server.c (main): Don't report dll events on the initial
8172 connection on attaches.
8173
6c2d16d2
PA
81742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8175
8176 * server.c (main): Relax numerical bases supported for the pid of
8177 the --attach command line argument.
8178
5ca906e6
PA
81792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8180
8181 * win32-low.c (win32_attach): Call OpenProcess before
8182 DebugActiveProcess, not after. Add last error output to error
8183 call.
8184
9c6c8194
PA
81852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8186
8187 * win32-low.c (win32_get_thread_context)
8188 (win32_set_thread_context): New functions.
8189 (thread_rec): Use win32_get_thread_context.
8190 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8191 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8192 field.
8193
4d5d1aaa
PA
81942007-12-03 Leo Zayas
8195 Pedro Alves <pedro_alves@portugalmail.pt>
8196
8197 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8198 global variables.
8199 (child_add_thread): Minor cleanup.
8200 (child_continue): Resume artificially suspended threads before
8201 calling ContinueDebugEvent.
8202 (suspend_one_thread): New.
8203 (fake_breakpoint_event): New.
8204 (get_child_debug_event): Change return type to int. Check here if
8205 gdb sent an interrupt request. If a soft interrupt was requested,
8206 fake a breakpoint event. Return 0 if there is no event to handle,
8207 and 1 otherwise.
8208 (win32_wait): Don't check here if gdb sent an interrupt request.
8209 Ensure there is a valid event to handle.
8210 (win32_request_interrupt): Add soft interruption method as last
8211 resort.
8212
c436e841
PA
82132007-12-03 Leo Zayas
8214 Pedro Alves <pedro_alves@portugalmail.pt>
8215
8216 * win32-low.h (win32_thread_info): Add descriptions to the
8217 structure members. Replace `suspend_count' counter by a
8218 `suspended' flag.
8219 * win32-low.c (thread_rec): Update condition of when to get the
8220 context from the inferior. Rely on ContextFlags being set if it
8221 has already been retrieved. Only suspend the inferior thread if
8222 we haven't already. Warn if that fails.
8223 (continue_one_thread): s/suspend_count/suspended/. Only call
8224 ResumeThread once. Warn if that fails.
8225
e7b5fa67
PA
82262007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8227
8228 * win32-low.c (win32_wait): Don't read from the inferior when it
8229 has already exited.
8230
a385171d
PA
82312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8232
8233 * Makefile.in (win32_low_h): New variable.
8234 (win32-low.o): Add dependency on $(win32_low_h).
8235 (win32-arm-low.o, win32-i386-low.o): New rules.
8236
f80c84b3
DJ
82372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8238
8239 * hostio.c: Correct copyright year.
8240
a6b151f1
DJ
82412007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8242
8243 * Makefile.in (OBS): Add hostio.o.
8244 (hostio.o): New rule.
8245 * server.h (handle_vFile): Declare.
8246 * hostio.c: New file.
8247 * server.c (handle_v_requests): Take packet_len and new_packet_len
8248 for binary packets. Call handle_vFile.
8249 (main): Update call to handle_v_requests.
8250
f9387fc3
DJ
82512007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8252
8253 * linux-low.c: Include <sched.h>.
8254
51c2684e
DJ
82552007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8256
8257 * linux-low.c (linux_tracefork_grandchild): New.
8258 (linux_tracefork_child): Use clone.
8259 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8260
75f83163
JB
82612007-10-31 Joel Brobecker <brobecker@adacore.com>
8262
8263 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8264
da5898ce
DJ
82652007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8266
8267 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8268
24a09b5f
DJ
82692007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8270
8271 * inferiors.c (change_inferior_id): Delete.
8272 (add_pid_to_list, pull_pid_from_list): New.
8273 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8274 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8275 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8276 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8277 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8278 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8279 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8280 (using_threads): Always set to 1.
8281 (handle_extended_wait): New.
8282 (add_process): Do not set TID.
8283 (linux_create_inferior): Set must_set_ptrace_flags.
8284 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8285 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8286 (linux_thread_alive): Rename TID argument to LWPID.
8287 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8288 (linux_wait_for_event): Do not use TID or check using_threads. Update
8289 call to dead_thread_notify. Call handle_extended_wait.
8290 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8291 (send_sigstop): Delete sigstop_sent.
8292 (wait_for_sigstop): Avoid TID.
8293 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8294 (linux_test_for_tracefork): New.
8295 (linux_lookup_signals): Use thread_db_active and
8296 linux_supports_tracefork_flag.
8297 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8298 * linux-low.h (get_process_thread): Avoid TID.
8299 (struct process_ifo): Move thread_known and tid to the end. Remove
8300 sigstop_sent.
8301 (linux_attach_lwp, thread_db_init): Update prototypes.
8302 * server.h (change_inferior_id): Delete prototype.
8303 (add_pid_to_list, pull_pid_from_list): New prototypes.
8304 * thread-db.c (thread_db_use_events): New.
8305 (find_first_thread): Rename to...
8306 (find_one_thread): ...this. Update callers and messages. Do not
8307 call fatal. Check thread_db_use_events. Do not call
8308 change_inferior_id or new_thread_notify.
8309 (maybe_attach_thread): Update. Do not call new_thread_notify.
8310 (thread_db_init): Set thread_db_use_events. Check use_events.
8311 * utils.c (fatal, warning): Correct message prefix.
8312
30ed0a8f
DJ
83132007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8314
8315 * Makefile.in (clean): Remove new files.
8316 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8317 (powerpc-64.o, powerpc-64.c): New rules.
8318 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8319 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8320 with SPE.
8321 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8322 SPE targets.
8323 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8324 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8325 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8326 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8327 (target_regsets): Add AltiVec and SPE register sets.
8328 * configure.ac: Check for AltiVec and SPE.
8329 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8330 (ppc_fill_vrregset, ppc_store_vrregset): New.
8331 (target_regsets): Add AltiVec register set.
8332 * configure: Regenerated.
8333
fd462a61
DJ
83342007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8335
8336 * linux-low.c (O_LARGEFILE): Define.
8337 (linux_read_memory): Use /proc/PID/mem.
8338 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8339 * configure, config.in: Regenerated.
8340
69f223ed
DJ
83412007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8342
8343 * linux-low.c (linux_wait_for_event): Do not pass signals while
8344 single-stepping.
8345
aec18585
PA
83462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8347
8348 * win32-low.c (create_process): New.
8349 (win32_create_inferior): Use create_process instead of
8350 CreateProcess. If create_process failed retry appending an ".exe"
8351 suffix. Store the GetLastError result immediatelly after
8352 create_process calls and use it on the call to error.
8353
34d86ddd
PA
83542007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8355
8356 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8357
5a0e3bd0
JB
83582007-08-23 Joel Brobecker <brobecker@adacore.com>
8359
8360 * configure.ac: Switch license to GPLv3.
8361
f88c79e6
MS
83622007-08-01 Michael Snyder <msnyder@access-company.com>
8363
8364 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8365
6b3d9b83
PA
83662007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8367
8368 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8369 typedef.
8370 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8371 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8372 CloseToolhelp32Snapshot.
8373 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8374 CloseToolhelp32Snapshot.
8375
c588c53c
MS
83762007-07-27 Michael Snyder <michael.snyder@access-company.com>
8377
8378 * server.c (main): Check for inferior exit before main loop.
8379
aa0403d9
PA
83802007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8381
8382 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8383 instead of on tmp_desc.
8384
255e7678
DJ
83852007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8386 Daniel Jacobowitz <dan@codesourcery.com>
8387
8388 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8389 (add_thread): Minor cleanups.
8390 (clear_inferiors): Move lower in the file. Clear the DLL
8391 list.
8392 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8393 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8394 (xml_escape_text): New.
8395 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8396 for qSupported.
8397 (handle_v_cont): Report errors.
8398 (gdbserver_version): Update.
8399 (main): Correct size of own_buf. Do not report initial DLL events.
8400 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8401 (unloaded_dll, xml_escape_text): New.
8402 * win32-low.c (enum target_waitkind): Update comments.
8403 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8404 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8405 (win32_EnumProcessModules, win32_GetModuleInformation)
8406 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8407 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8408 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8409 (win32_Module32First, win32_Module32Next, load_toolhelp)
8410 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8411 (get_child_debug_event): Handle DLL events.
8412 (win32_wait): Likewise.
8413
0d37add9
DJ
84142007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8415
8416 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8417 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8418
45e2715e
PA
84192007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8420
8421 * win32-low.c (handle_output_debug_string): Ignore event if not
8422 waiting.
8423
c5674cf1
PA
84242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8425
8426 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8427
2bbe3cc1
DJ
84282007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8429
8430 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8431
ae13219e
DJ
84322007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8433
8434 * inferiors.c (change_inferior_id): Add comment.
8435 * linux-low.c (check_removed_breakpoint): Add an early
8436 prototype. Improve debug output.
8437 (linux_attach): Doc update.
8438 (linux_detach_one_process, linux_detach): Clean up before releasing
8439 each process.
8440 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8441 * linux-low.h (struct process_info): Doc improvement.
8442 * mem-break.c (delete_all_breakpoints): New.
8443 * mem-break.h (delete_all_breakpoints): New prototype.
8444 * thread-db.c (find_first_thread): New.
8445 (thread_db_create_event): Call it instead of
8446 thread_db_find_new_threads. Clean up unused variables.
8447 (maybe_attach_thread): Remove first thread handling.
8448 (thread_db_find_new_threads): Use find_first_thread.
8449 (thread_db_get_tls_address): Likewise.
8450
4105de34
DJ
84512007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8452
8453 * thread-db.c (thread_db_find_new_threads): Add prototype.
8454 (thread_db_create_event): Check for the main thread before adding
8455 a new thread.
8456 (maybe_attach_thread): Only enable event reporting if TID == 0.
8457 (thread_db_get_tls_address): Check for new threads.
8458
2b876972
DJ
84592007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8460
8461 * linux-low.c (linux_create_inferior): Try execv before execvp.
8462 * spu-low.c (spu_create_inferior): Likewise.
8463
7a245884
DJ
84642007-06-13 Mike Frysinger <vapier@gentoo.org>
8465
8466 * linux-low.c (linux_create_inferior): Change execv to execvp.
8467 * spu-low.c (spu_create_inferior): Likewies.
8468
117ce543
DJ
84692007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8470
8471 * Makefile.in (clean): Clean new files instead of deleted ones.
8472 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8473 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8474 rules.
8475 * configure.srv: Specify XML files and new regformats for MIPS and
8476 MIPS64 GNU/Linux.
8477 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8478 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8479 an entry for the restart register.
8480 (mips_cannot_fetch_register, mips_cannot_store_register)
8481 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8482 register names to match the XML descriptions.
8483 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8484 restart register instead of $0.
8485
0e7f50da
UW
84862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8487 Markus Deuling <deuling@de.ibm.com>
8488
8489 * remote-utils.c (decode_xfer_write): New function.
8490 * server.h (decode_xfer_write): Add prototype.
8491 * server.c (handle_query): Add PACKET_LEN argument. Support
8492 qXfer:spu:read and qXfer:spu:write packets.
8493 (main): Pass packet_len to handle_query.
8494 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8495 * target.h (target_ops): Add qxfer_spu.
8496
374c1d38
UW
84972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8498
8499 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8500 accessing non-seekable spufs files.
8501
bb63802a
UW
85022007-05-16 Markus Deuling <deuling@de.ibm.com>
8503
889bf7c5 8504 * server.c (handle_query): Add reply for qC packet.
bb63802a 8505
7390519e
PA
85062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8507 Leo Zayas <lerele@champenstudios@com>
8508
8509 * server.h (check_remote_input_interrupt_request): New function.
8510 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8511 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8512 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8513 (check_remote_input_interrupt_request): New function.
8514 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8515 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8516 winapi_GenerateConsoleCtrlEvent): New typedefs.
8517 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8518 to 250 ms.
8519 (win32_wait): Check for remote interrupt request
8520 with check_remote_input_interrupt_request.
8521 (win32_request_interrupt): New function.
8522 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8523
34b34921
PA
85242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8525
8526 * win32-low.c (debug_registers_changed,
8527 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8528 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8529 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8530 (thread_rec): Get context using the low target.
8531 (child_add_thread): Call thread_added on the low target,
8532 which does the same thing.
8533 (regptr): Delete.
8534 (do_initial_child_stuff): Remove debug registers references.
8535 Set context using the low target. Resume threads after
8536 setting the contexts.
8537 (child_continue): Remove dead variable. Remove debug
8538 registers references.
8539 (child_fetch_inferior_registers): Go through the low target.
8540 (do_child_store_inferior_registers): Remove.
8541 (child_store_inferior_registers): Go through the low target.
8542 (win32_resume): Remove debug registers references.
8543 Set context using the low target.
8544 (handle_exception): Change return type to void. Don't record
8545 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8546 first chance exception.
889bf7c5 8547 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8548 goto loop. Always return after waiting for debug event.
8549 (win32_wait): Convert to switch statement. Handle spurious
8550 events.
8551
8552 * win32-i386-low.c (debug_registers_changed,
8553 debug_registers_used): New.
8554 (initial_stuff): Rename to ...
8555 (i386_initial_stuff): ... this. Clear debug registers
8556 state variables.
8557 (store_debug_registers): Delete.
8558 (i386_get_thread_context): New.
8559 (load_debug_registers): Delete.
8560 (i386_set_thread_context): New.
8561 (i386_thread_added): New.
8562 (single_step): Rename to ...
8563 (i386_single_step): ... this.
8564 (do_fetch_inferior_registers): Rename to ...
8565 (i386_fetch_inferior_register): ... this.
8566 (i386_store_inferior_register): New.
8567 (the_low_target): Adapt to new interface.
8568
8569 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8570 (arm_get_thread_context): New.
8571 (arm_set_thread_context): New.
8572 (regptr): New.
8573 (do_fetch_inferior_registers): Rename to ...
8574 (arm_fetch_inferior_register): ... this.
8575 (arm_store_inferior_register): New.
8576 (arm_wince_breakpoint): Reimplement as unsigned long.
8577 (arm_wince_breakpoint_len): Define.
8578 (the_low_target): Adapt to new interface.
8579
8580 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8581 load_debug_registers. Add get_thread_context, set_thread_context,
8582 thread_added and store_inferior_register. Rename
8583 fetch_inferior_registers to fetch_inferior_register.
8584 (regptr): Remove declaration.
8585
dd6953e1
PA
85862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8587
8588 * linux-low.c (linux_detach): Change return type to int. Return 0.
8589 * spu-low.c (spu_detach): Likewise.
8590
444d6139
PA
85912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8592
8593 * target.h (target_ops): Change return type of detach to int.
8594 Add join.
8595 (join_inferior): New.
8596 * server.c (main): Don't skip detach support on mingw32.
8597 If the inferior doesn't support detaching return error.
8598 Call join_inferior instead of using waitpid.
8599 * linux-low.c (linux_join): New.
8600 (linux_target_op): Add linux_join.
8601 * spu-low.c (spu_join): New.
8602 (spu_target_ops): Add spu_join.
8603 * win32-low.c (win32_detach): Adapt to new interface.
8604 Reopen current_process_handle before detaching. Issue a child
8605 resume before detaching.
8606 (win32_join): New.
8607 (win32_target_op): Add win32_join.
8608
1d5315fe
PA
86092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8610
8611 * win32-low.c (win32-attach): Fix return value.
8612 * target.h (target_ops): Describe ATTACH return values.
8613
bf914831
PA
86142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8615
8616 * win32-low.c (GETPROCADDRESS): Define.
8617 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8618 (winapi_DebugSetProcessKillOnExit): Likewise.
8619 (win32_create_inferior): Force usage of ansi CreateProcessA.
8620 (win32_attach): Use GETPROCADDRESS.
8621 (win32_detach): Likewise.
8622
f72f3e60
PA
86232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8624
8625 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8626
ed50f18f
PA
86272007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8628
8629 * win32-low.c: Commit leftover changes from 2007-03-29.
8630
0c2ead7e
DJ
86312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8632
8633 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8634 fields short instead of int. Add explicit padding.
8635 (i387_cache_to_fsave): Remove unnecessary casts.
8636 (i387_fsave_to_cache): Doc fix.
8637 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8638
73725ff3
DJ
86392007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8640
8641 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8642 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8643
d99f33d8
PA
86442007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8645
8646 * configure.srv (arm*-*-mingw32ce*): Move near the other
8647 arm targets.
8648
68070c10
PA
86492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8650
2482afc6 8651 * configure.ac: Add errno checking.
68070c10
PA
8652 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8653 sys/file.h and malloc.h.
8654 (AC_CHECK_DECLS): Add perror.
8655 (srv_mingwce): Handle.
2482afc6 8656 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
8657 win32-i386-low.o to srv_tgtobj.
8658 (i[34567]86-*-mingw*): Likewise.
8659 (arm*-*-mingw32ce*): Add case.
8660 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8661 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8662 [__MINGW32CE__] (strerror): New function.
8663 [__MINGW32CE__] (errno): Define to GetLastError.
8664 [__MINGW32CE__] (COUNTOF): New macro.
8665 (remote_open): Remove extra close call.
8666 * mem-break.c (delete_breakpoint_at): New function.
8667 * mem-break.h (delete_breakpoint_at): Declare.
8668 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8669 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8670 [USE_WIN32API] (read, write): Add char* casts.
8671 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8672 * server.h: Include wincecompat.h on Windows CE.
8673 [HAVE_ERRNO_H]: Check.
8674 (perror): Declare if not declared.
8675 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8676 (perror_with_name): Remove errno declaration.
8677 * wincecompat.h: New.
8678 * wincecompat.c: New.
8679 * win32-low.h: New.
8680 * win32-arm-low.c: New.
8681 * win32-i386-low.c: New.
8682 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8683 (OUTMSG2): Make it safe.
8684 (_T): New macro.
8685 (COUNTOF): New macro.
8686 (NUM_REGS): Get it from the low target.
8687 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8688 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8689 (thread_rec): Let low target handle debug registers.
8690 (child_add_thread): Likewise.
8691 (child_init_thread_list): Likewise.
8692 (continue_one_thread): Likewise.
8693 (regptr): New.
8694 (do_child_fetch_inferior_registers): Move to ...
8695 * win32-i386-low.c: ... here, and rename to ...
8696 (do_fetch_inferior_registers): ... this.
889bf7c5 8697 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
8698 Go through the low target.
8699 (do_child_store_inferior_registers): Use regptr.
8700 (strwinerror): New function.
8701 (win32_create_inferior): Handle Windows CE.
8702 Use strwinerror instead of strerror on Windows error
8703 codes. Add program to the error output.
8704 Don't close the main thread handle on Windows CE.
8705 (win32_attach): Use coredll.dll on Windows CE.
8706 (win32_kill): Close current process and current
8707 thread handles.
8708 (win32_detach): Use coredll.dll on Windows CE.
8709 (win32_resume): Let low target handle debug registers, and
8710 step request.
8711 (handle_exception): Add/Remove initial breakpoint. Avoid
8712 non-existant WSTOPSIG on Windows CE.
8713 (win32_read_inferior_memory): Cast to remove warning.
8714 (win32_arch_string): Go through the low target.
8715 (initialize_low): Call set_breakpoint_data with the low
8716 target's breakpoint.
8717 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8718 FOP_REGNUM, mappings): Move to ...
8719 * win32-i386-low.c: ... here.
8720 * win32-low.c (win32_thread_info): Move to ...
8721 * win32-low.h: ... here.
8722 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8723 win32-arm-low.c and wincecompat.c.
8724 (all:): Add $EXEEXT.
8725 (install-only:): Likewise.
8726 (gdbserver:): Likewise.
8727 (gdbreplay:): Likewise.
8728 * config.in: Regenerate.
8729 * configure: Regenerate.
8730
41093d81
PA
87312007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8732
8733 * win32-low.c: Rename typedef thread_info to
8734 win32_thread_info throughout.
8735
544afa54
PA
87362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8737
8738 * win32-i386-low.c: Rename to ...
8739 * win32-low.c: ... this.
8740 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8741 * Makefile.in: Likewise.
8742
bce7165d
PA
87432007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8744
8745 * remote-utils.c (monitor_output): Constify msg parameter.
8746 * server.h (monitor_output): Likewise.
8747 * win32-i386-low.c (handle_output_debug_string): New.
8748 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8749 handle_output_debug_string.
8750 (get_child_debug_event): Likewise.
8751
506c7aa0
DJ
87522007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8753
8754 * server.c (main): Correct strtoul check.
8755
42c81e2a
DJ
87562007-03-27 Jon Ringle <jon@ringle.org>
8757
8758 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8759
9453113a
DJ
87602007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8761
8762 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8763
64a69107
DJ
87642007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8765
8766 * terminal.h: Check HAVE_SGTTY_H.
8767
87682007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
8769
8770 * remote-utils.c (remote_open): Print out the assigned port number.
8771
c74d0ad8
DJ
87722007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8773
8774 * remote-utils.c (monitor_output): New function.
8775 * server.c (debug_threads): Define here.
8776 (monitor_show_help): New function.
8777 (handle_query): Handle qRcmd.
8778 (main): Do not handle 'd' packet.
8779 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8780 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8781 of debug_threads.
8782
de7c3b4a
PA
87832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8784
8785 * Makefile.in (EXEEXT): New.
8786 (clean): Use $(EXEEXT).
8787
ef57601b
PA
87882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8789
8790 * target.h (target_ops): Rename send_signal to request_interrupt,
8791 and remove enum target_signal parameter.
8792 * linux-low.c (linux_request_interrupt): Rename from
8793 linux_send_signal, and always send SIGINT.
8794 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8795 and always send SIGINT.
8796 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8797 of send_signal.
8798 (input_interrupt): Likewise.
8799
820f2bda
PA
88002007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8801
8802 * server.c (get_features_xml): Check if target implemented
8803 arch_string.
8804 * win32-i386-low.c (win32_arch_string): New.
8805 (win32_target_ops): Add win32_arch_string as arch_string member.
8806
ab39bf24
UW
88072007-02-22 Markus Deuling <deuling@de.ibm.com>
8808
8809 * spu-low.c (spu_arch_string): New.
8810 (spu_target_ops): Add spu_arch_string.
8811
61ff6e04
DJ
88122007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8813
8814 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8815 * configure.ac: Do not check for terminal.h.
8816 * configure, config.in: Regenerated.
8817
fb1e4ffc
DJ
88182007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8819
8820 * Makefile.in (OBS): Add $(XML_BUILTIN).
8821 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8822 (clean): Update.
8823 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8824 (arm-with-iwmmxt.c): New.
8825 * config.in, configure: Regenerate.
8826 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8827 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8828 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8829 (arm*-*-linux*): Add iWMMXt and regset support.
8830 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8831 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8832 (arm_store_wmmxregset, target_regsets): New.
8833 * server.c (get_features_xml): Take annex argument. Check builtin
8834 XML documents.
8835 (handle_query): Handle multiple annexes.
8836
0f48aa01
DJ
88372007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8838
8839 * remote-utils.c [USE_WIN32API] (read, write): Define.
8840 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8841 write.
8842
23181151
DJ
88432007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8844
8845 * linux-i386-low.c (the_low_target): Set arch_string.
8846 * linux-x86-64-low.c (the_low_target): Likewise.
8847 * linux-low.c (linux_arch_string): New.
8848 (linux_target_ops): Add it.
8849 * linux-low.h (struct linux_target_ops): Add arch_string.
8850 * server.c (write_qxfer_response): Use const void * for DATA.
8851 (get_features_xml): New.
8852 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8853 * target.h (struct target_ops): Add arch_string method.
8854
9d606399
DJ
88552007-01-03 Denis Pilat <denis.pilat@st.com>
8856 Daniel Jacobowitz <dan@codesourcery.com>
8857
8858 * linux-low.c (linux_kill): Handle being called with no threads.
8859 * win32-i386-low.c (win32_kill): Likewise.
8860 (get_child_debug_event): Clear current_process_handle.
8861
88622006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
8863 Daniel Jacobowitz <dan@codesourcery.com>
8864
8865 * remote-utils.c (remote_open): Check the type of specified
8866 serial port devices before opening them.
8867 * server.c (main): Kill the inferior if an error occurs during
8868 the first remote_open.
8869
a5e13d24
DJ
88702006-12-05 Markus Deuling <deuling@de.ibm.com>
8871
8872 * README: Update supported targets.
8873
186947f7
DJ
88742006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8875
8876 * Makefile.in (clean): Remove reg-mips64.c.
8877 (reg-mips64.c, reg-mips64.o): New rules.
8878 * configure.srv: Handle mips64. Include regset support for mips.
8879 * linux-mips-low.c (union mips_register): New.
8880 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8881 (mips_breakpoint, mips_breakpoint_at): Use int.
8882 (mips_collect_register, mips_supply_register)
8883 (mips_collect_register_32bit, mips_supply_register_32bit)
8884 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8885 (mips_store_fpregset, target_regsets): New.
8886 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8887
a13e2c95
UW
88882006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8889
8890 * configure.srv: Add target "spu*-*-*".
8891 * Makefile.in (clean): Remove reg-spu.c.
8892 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8893 * spu-low.c: New file.
8894
cb7283db
DJ
88952006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8896
8897 * configure.ac: Correct td_thr_tls_get_addr test.
8898 * configure: Regenerated.
8899
89be2091
DJ
89002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8901
8902 * linux-low.c (linux_wait_for_event): Reformat. Use the
8903 pass_signals array.
8904 * remote-utils.c (decode_address_to_semicolon): New.
8905 * server.c (pass_signals, handle_general_set): New.
8906 (handle_query): Mention QPassSignals for qSupported.
8907 (main): Call handle_general_set.
8908 * server.h (pass_signals, decode_address_to_semicolon): New.
8909
000ef4f0
DJ
89102006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
8911
8912 * server.c (handle_query): Correct error handling for read_auxv.
8913
b7149293
UW
89142005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
8915
8916 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
8917 and srv_linux_thread_db to yes.
8918 * linux-s390-low.c (s390_fill_gregset): New function.
8919 (target_regsets): Define data structure.
8920
dae5f5cf
DJ
89212006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
8922
8923 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
8924 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
8925 * config.in, configure: Regenerated.
8926 * inferiors.c (gdb_id_to_thread): New function.
8927 (gdb_id_to_thread_id): Use it.
8928 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
8929 * linux-low.h (struct process_info): Add th member.
8930 (thread_db_get_tls_address): New prototype.
8931 * remote-utils.c (decode_address): Make non-static.
8932 * server.c (handle_query): Handle qGetTLSAddr.
8933 * server.h (gdb_id_to_thread, decode_address): New prototypes.
8934 * target.h (struct target_ops): Add get_tls_address.
8935 * thread-db.c (maybe_attach_thread): Save the thread handle.
8936 (thread_db_get_tls_address): New.
8937
32ca6d61
DJ
89382006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
8939
8940 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
8941 (linux_resume_one_process): Take a siginfo_t *. Update all
8942 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
8943 (struct pending_signals): Add a siginfo_t.
8944 (linux_wait_for_process): Always set last_status.
8945 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
8946 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
8947 * linux-low.h (struct process_info): Add last_status.
8948
5ffff7c1
DJ
89492006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
8950
8951 * remote-utils.c (try_rle): New function.
8952 (putpkt_binary): Use it.
8953
8695c747
DJ
89542006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
8955
8956 * Makefile.in (clean): Clean reg-x86-64-linux.c.
8957 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
8958 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
8959 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
8960 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
8961 point registers.
8962
290fadea
RS
89632006-08-08 Richard Sandiford <richard@codesourcery.com>
8964
8965 * server.c (terminal_fd): New variable.
8966 (old_foreground_pgrp): Likewise.
8967 (restore_old_foreground_pgrp): New function.
8968 (start_inferior): Record the terminal file descriptor in terminal_fd
8969 and its original foreground group in old_foreground_pgrp. Register
8970 restore_old_foreground_pgrp with atexit().
8971
9f2e1e63
DJ
89722006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8973
8974 * server.c (handle_query): Correct qPart to qXfer.
8975
b80864fb
DJ
89762006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8977
8978 * configure.ac: Check for more headers which are missing on
8979 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8980 * configure.srv: Add Cygwin and mingw32.
8981 * remote-utils.c: Don't include headers unconditionally which
8982 are missing on mingw32. Include <winsock.h> for mingw32.
8983 (remote_open): Adjust for mingw32 support. Flush
8984 standard error after writing to it.
8985 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8986 (unblock_async_io, enable_async_io, disable_async_io)
8987 (readchar, getpkt): Update for Winsock support.
8988 (prepare_resume_reply): Expect a protocol signal number.
8989 * server.c: Disable <sys/wait.h> on mingw32.
8990 (start_inferior): Adjust for mingw32 support. Flush
8991 standard error after writing to it.
8992 (attach_inferior): Likewise. Use protocol signal
8993 numbers.
8994 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8995 and names.
8996 * win32-i386-low.c: New file.
8997 * Makefile.in (XM_CLIBS): Set.
8998 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8999 (win32-i386-low.o): New dependency rule.
9000 * linux-low.c (linux_wait): Use target signal numbers.
9001 * target.h (struct target_ops): Doc fix.
9002 * server.h (target_signal_to_name): New prototype.
9003 * gdbreplay.c: Don't include headers unconditionally which
9004 are missing on mingw32. Include <winsock.h> for mingw32.
9005 (remote_close, remote_open): Adjust for Winsock support.
9006 * configure, config.in: Regenerated.
9007
0876f84a
DJ
90082006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9009
9010 * server.c (decode_xfer_read, write_qxfer_response): New.
9011 (handle_query): Take a packet length argument. Handle
9012 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9013 the qSupported response.
9014 (main): Update call to handle_query.
9015
01f9e8fa
DJ
90162006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9017
9018 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9019 (putpkt_binary): Renamed from putpkt and adjusted for binary
9020 data.
9021 (putpkt): New wrapper for putpkt_binary.
9022 (readchar): Don't mask off the high bit.
9023 (decode_X_packet): New function.
9024 * server.c (main): Call putpkt_binary if a handler sets the packet
9025 length. Save the length of the incoming packet. Handle 'X'.
9026 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9027
be2a5f71
DJ
90282006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9029
9030 * server.c (handle_query): Handle qSupported.
9031
ea025f5f
DJ
90322006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9033
9034 * remote-utils.c (all_symbols_looked_up): New variable.
9035 (look_up_one_symbol): Check it.
9036 * server.h (look_up_one_symbol): New declaration.
9037 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9038
9308fc88
DJ
90392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9040
9041 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9042 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9043 (PTRACE_GET_THREAD_AREA): Define.
9044 (ps_get_thread_area): New function.
9045
52fb6437
NS
90462006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9047
9048 * configure.srv (m68k*-*-uclinux*): New target.
9049 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9050 (linux_resume_one_process): Remove extraneous cast.
9051 (linux_read_offsets): New.
9052 (linux_target_op): Add linux_read_offsets on mmuless systems.
9053 * server.c (handle_query): Add qOffsets logic.
9054 * target.h (struct target_ops): Add read_offsets.
9055
21b0f40c
DJ
90562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9057
9058 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9059 (PTRACE_GET_THREAD_AREA): Define.
9060 (ps_get_thread_area): New function.
9061 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9062 (linux-x86-64-low.o): Update.
9063
0050a760
DJ
90642006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9065
9066 * configure.ac: Remove checks for prfpregset_t.
9067 * gdb_proc_service.h: New file.
9068 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9069 new "gdb_proc_service.h".
9070 * proc-service.c: Likewise.
9071 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9072 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9073 * Makefile.in (gdb_proc_service_h): Updated.
9074 * configure, config.in: Regenerated.
9075
b92a518e
DJ
90762006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9077
9078 * remote-utils.c (prepare_resume_reply): Move declaration
9079 of gdb_id_from_wait to the top of the block.
9080
545587ee
DJ
90812006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9082
9083 * linux-low.c (regsets_store_inferior_registers): Read the regset
9084 from the target before filling it.
9085
9db87ebd
DJ
90862006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9087
9088 * server.c (attach_inferior): Return SIGTRAP for a successful
9089 attach.
9090
dd24457d
DJ
90912006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9092
9093 * Makefile.in (OBS): Add version.o.
9094 (STAGESTUFF): Delete.
9095 (version.o): Add dependencies.
9096 (version.c): Replace rule.
9097 (clean): Remove version.c.
9098 * server.c (gdbserver_version): New.
9099 (gdbserver_usage): Use printf.
9100 (main): Handle --version and --help.
9101 * server.h (version, host_name): Add declarations.
9102
6f0f660e
EZ
91032005-12-23 Eli Zaretskii <eliz@gnu.org>
9104
889bf7c5
PA
9105 * linux-arm-low.c:
9106 * linux-arm-low.c:
9107 * inferiors.c:
9108 * i387-fp.h:
9109 * i387-fp.c:
9110 * gdbreplay.c:
9111 * regcache.c:
9112 * proc-service.c:
9113 * mem-break.h:
9114 * mem-break.c:
9115 * linux-x86-64-low.c:
9116 * linux-sh-low.c:
9117 * linux-s390-low.c:
9118 * linux-ppc64-low.c:
9119 * linux-ppc-low.c:
9120 * linux-mips-low.c:
9121 * linux-m68k-low.c:
9122 * linux-m32r-low.c:
9123 * linux-low.h:
9124 * linux-low.c:
9125 * linux-ia64-low.c:
9126 * linux-i386-low.c:
9127 * linux-crisv32-low.c:
9128 * thread-db.c:
9129 * terminal.h:
9130 * target.h:
9131 * target.c:
9132 * server.h:
9133 * server.c:
9134 * remote-utils.c:
9135 * regcache.h:
9136 * utils.c:
9137 * Makefile.in:
9138 * configure.ac:
6f0f660e
EZ
9139 * gdbserver.1: Add (C) after Copyright. Update the FSF
9140 address.
9141
9d1fb177
DJ
91422005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9143
9144 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9145 (arm_breakpoint_at): Recognize both breakpoints.
9146 (the_low_target): Use the correct breakpoint instruction.
9147
011a70c2
DJ
91482005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9149
9150 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9151 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9152 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9153 (the_low_target): Update.
9154
7fb85e41
AS
91552005-10-25 Andreas Schwab <schwab@suse.de>
9156
9157 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9158
9159 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9160 (ia64_num_regs): Reduce to 462.
9161
3db0444b
DJ
91622005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9163
9164 * acinclude.m4: Correct quoting.
9165 * aclocal.m4: Regenerated.
9166
9167 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9168 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9169 (thread_db_init): Call thread_db_err_str.
9170 * configure.ac: Check for TD_VERSION.
9171 * config.in, configure: Regenerated.
9172
bee0189a
DJ
91732005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9174
9175 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9176
e9d25b98
DJ
91772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9178
9179 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9180 is not available. Define HAVE_PTRACE_GETREGS if it is.
9181 * config.in, configure: Regenerated.
9182 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9183 * linux-i386-low.c, linux-m68k-low.c: Update to use
9184 HAVE_PTRACE_GETREGS.
9185 * linux-low.c (regsets_fetch_inferior_registers)
9186 (regsets_store_inferior_registers): Only return 0 if we processed
9187 GENERAL_REGS.
9188 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9189 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9190
a06660f7
DJ
91912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9192
9193 * inferiors.c (struct thread_info): Add gdb_id.
9194 (add_thread): Add gdb_id argument.
9195 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9196 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9197 calls to add_thread.
9198 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9199 * server.c (handle_query): Use thread_to_gdb_id.
9200 (handle_v_cont, main): Use gdb_id_to_thread_id.
9201 * server.h (add_thread): Update prototype.
9202 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9203 prototypes.
9204
5a1f5858
DJ
92052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9206
9207 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9208 left-padded registers.
9209 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9210 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9211
e122f1f5
SE
92122005-07-01 Steve Ellcey <sje@cup.hp.com>
9213
9214 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9215 * configure: Regenerate.
9216 * config.in: Regenerate.
9217 * server.h (NEED_DECLARATION_STRERROR):
9218 Replace with !HAVE_DECL_STRERROR.
9219
d592fa2f
DJ
92202005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9221
9222 * linux-low.c (linux_wait, linux_send_signal): Don't test
9223 an unsigned long variable for > 0 if it could be MAX_ULONG.
9224 * server.c (myresume): Likewise.
9225 * target.c (set_desired_inferior): Likewise.
9226
ccbd4912
MK
92272005-06-13 Mark Kettenis <kettenis@gnu.org>
9228
9229 * configure.ac: Simplify and improve check for socklen_t.
9230 * configure, config.in: Regenerate.
9231
f450004a
DJ
92322005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9233
9234 * acconfig.h: Remove.
9235 * configure.ac: Add a test for socklen_t. Use three-argument
9236 AC_DEFINE throughout.
9237 * config.in: Regenerated using autoheader 2.59.
9238 * configure: Regenerated.
9239
9240 * gdbreplay.c (socklen_t): Provide a default.
9241 (remote_open): Use socklen_t.
9242 * remote-utils.c (socklen_t): Provide a default.
9243 (remote_open): Use socklen_t.
9244 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9245 unsigned char.
9246
9247 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9248 char for buffers.
9249 * linux-low.c (linux_read_memory, linux_write_memory)
9250 (linux_read_auxv): Likewise.
9251 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9252 (check_mem_write): Likewise.
9253 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9254 Likewise.
9255 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9256 (registers_from_string, register_data): Likewise.
9257 * server.c (handle_query, main): Likewise.
9258 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9259 (decode_M_packet): Likewise.
9260 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9261 * target.h (struct target_ops): Update read_memory, write_memory,
9262 and read_auxv.
9263 (read_inferior_memory, write_inferior_memory): Update.
9264 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9265 to unsigned char *.
9266 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9267 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9268 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9269 linux-s390-low.c, linux-sh-low.c: Update for changes in
9270 read_inferior_memory and the_low_target->breakpoint.
9271
eee84df1
DJ
92722005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9273
9274 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9275 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9276 * configure.srv: Add powerpc64-*-linux*.
9277 * linux-ppc64-low.c: New file.
9278
45b134e5
OF
92792005-05-23 Orjan Friberg <orjanf@axis.com>
9280
9281 * linux-cris-low.c: New file with support for CRIS.
9282 * linux-crisv32-low.c: Ditto for CRISv32.
9283 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9284 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9285 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9286 reg-crisv32.o, and reg-crisv32.c to make rules.
9287 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9288 recognized targets.
9289
48d93c75
UW
92902005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9291
9292 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9293 of sizeof (PTRACE_XFER_TYPE).
9294 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9295
e013ee27
OF
92962005-05-12 Orjan Friberg <orjanf@axis.com>
9297
889bf7c5 9298 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9299 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9300 pointers for hardware watchpoint support.
9301 * linux-low.h (struct linux_target_ops): Ditto.
9302 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9303 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9304 to linux_target_ops.
9305 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9306 reply packet.
9307 * server.c (main): Recognize 'Z' and 'z' packets.
9308
b0ded00b
UW
93092005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9310
9311 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9312 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9313 (the_low_target): Add new members.
9314
8643e2ad
DJ
93152005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9316
9317 * proc-service.c (ps_lgetregs): Search all_processes instead of
9318 all_threads.
9319
fc620387
DJ
93202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9321
9322 * server.c (start_inferior): Change return type to int.
9323 (attach_inferior): Change sigptr to int *.
9324 (handle_v_cont, handle_v_requests): Change signal to int *.
9325 (main): Change signal to int.
9326
93272005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9328
9329 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9330 * configure.srv: Add m32r*-*-linux*.
9331 * linux-m32r-low.c: New file.
9332
e0e76420
DJ
93332005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9334
9335 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9336
a1928bad
DJ
93372005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9338
9339 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9340 Take unsigned long arguments for PIDs.
9341 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9342 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9343 (wait_for_sigstop, linux_resume_one_process)
9344 (regsets_fetch_inferior_registers, linux_send_signal)
9345 (linux_read_auxv): Likewise. Update the types of variables holding
9346 PIDs. Update format string specifiers.
9347 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9348 * remote-utils.c (prepare_resume_reply): Likewise.
9349 * server.c (cont_thread, general_thread, step_thread)
9350 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9351 unsigned long.
9352 (handle_query): Update format specifiers.
9353 (handle_v_cont, main): Use strtoul for thread IDs.
9354 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9355 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9356 (general_thread, step_thread, thread_from_wait)
9357 (old_thread_from_wait): Update.
9358 * target.h (struct thread_resume): Use unsigned long for THREAD.
9359 (struct target_ops): Use unsigned long for arguments to attach and
9360 thread_alive.
9361
dcdb98d2
DJ
93622005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9363
9364 * acinclude.m4: Include bfd/bfd.m4 directly.
9365 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9366 <agriffis@toolchain.org>.
9367 * aclocal.m4, configure: Regenerated.
9368
bec39cab
AC
93692005-01-07 Andrew Cagney <cagney@gnu.org>
9370
9371 * configure.ac: Rename configure.in, require autoconf 2.59.
9372 * configure: Re-generate.
9373
434c4c77
DJ
93742004-12-08 Daniel Jacobowitz <dan@debian.org>
9375
9376 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9377 LIBS when finished.
9378 * aclocal.m4: Regenerated.
9379 * configure: Regenerated.
9380
db1d3e1b
AS
93812004-11-21 Andreas Schwab <schwab@suse.de>
9382
9383 * linux-m68k-low.c (m68k_num_gregs): Define.
9384 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9385 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9386 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9387 (m68k_breakpoint_at): New. Add to the_low_target.
9388
9389 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9390 srv_linux_thread_db to yes.
9391
43360365
JB
93922004-10-20 Joel Brobecker <brobecker@gnat.com>
9393
9394 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9395 (ARCH_SET_FS): Likewise.
9396 (ARCH_GET_FS): Likewise.
9397 (ARCH_GET_GS): Likewise.
9398
fd500816
DJ
93992004-10-16 Daniel Jacobowitz <dan@debian.org>
9400
9401 * linux-i386-low.c (ps_get_thread_area): New.
9402 * linux-x86-64-low.c (ps_get_thread_area): New.
9403 * linux-low.c: Include <sys/syscall.h>.
9404 (linux_kill_one_process): Don't kill the first thread here.
9405 (linux_kill): Kill the first thread here.
9406 (kill_lwp): New function.
9407 (send_sigstop, linux_send_signal): Use it.
9408 * proc-service.c: Clean up #ifdefs.
9409 (fpregset_info): Delete.
9410 (ps_lgetregs): Update and enable implementation.
9411 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9412 implementations.
9413 * remote-utils.c (struct sym_cache, symbol_cache): New.
9414 (input_interrupt): Print a clearer message.
9415 (async_io_enabled): New variable.
9416 (enable_async_io, disable_async_io): Use it. Update comments.
9417 (look_up_one_symbol): Use the symbol cache.
9418 * thread-db.c (thread_db_look_up_symbols): New function.
9419 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9420
f6de3c42
DJ
94212004-10-16 Daniel Jacobowitz <dan@debian.org>
9422
9423 * configure.in: Test for -rdynamic.
9424 * configure: Regenerated.
9425 * Makefile (INTERNAL_LDFLAGS): New.
9426 (gdbserver, gdbreplay): Use it.
9427
2c0fc042
AC
94282004-09-02 Andrew Cagney <cagney@gnu.org>
9429
9430 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9431
075b3282
DJ
94322004-03-23 Daniel Jacobowitz <drow@mvista.com>
9433
9434 * linux-low.c (linux_wait): Clear all_processes list also.
9435
fa6a77dc
DJ
94362004-03-12 Daniel Jacobowitz <drow@mvista.com>
9437
9438 * linux-low.c: Include <errno.h>. Remove extern declaration of
9439 errno.
9440
6d782a97
DJ
94412004-03-12 Daniel Jacobowitz <drow@mvista.com>
9442
9443 * gdbreplay.c, server.h, utils.c: Update copyright years.
9444
3a7fb99b
DJ
94452004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9446
9447 * server.c (main): Print child status or termination signal from
9448 variable 'signal', not 'sig'.
9449
c3e735a6
DJ
94502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9451
9452 * linux-low.c (linux_read_memory): Change return type to
9453 int. Check for and return error from ptrace().
9454 * target.c (read_inferior_memory): Change return type to int. Pass
9455 back return status from the_target->read_memory().
9456 * target.h (struct target_ops): Adapt *read_memory() prototype.
9457 Update comment.
9458 (read_inferior_memory): Adapt prototype.
9459 * server.c (main): Return an error packet if
9460 read_inferior_memory() returns an error.
9461
a59d1c82
DJ
94622004-03-04 Daniel Jacobowitz <drow@mvista.com>
9463
9464 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9465 Unify with other clean targets.
9466
dc3f8883
DJ
94672004-02-29 Daniel Jacobowitz <drow@mvista.com>
9468
9469 * server.c (handle_v_cont): Call set_desired_inferior.
9470
89a208da
DJ
94712004-02-29 Daniel Jacobowitz <drow@mvista.com>
9472
9473 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9474
62ea82f5
DJ
94752004-02-29 Daniel Jacobowitz <drow@mvista.com>
9476
9477 * linux-low.c (linux_wait): Unblock async I/O.
9478 (linux_resume): Block and enable async I/O.
9479 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9480 * server.h (block_async_io, unblock_async_io): Add prototypes.
9481
6910d122
DJ
94822004-02-29 Daniel Jacobowitz <drow@mvista.com>
9483
9484 * remote-utils.c (remote_open): Print a status notice after
9485 opening a TCP port.
9486 * server.c (attach_inferior): Print a status notice after
9487 attaching.
9488
94892004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9490
9491 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9492
c89dc5d4
DJ
94932004-02-26 Daniel Jacobowitz <drow@mvista.com>
9494
9495 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9496 error packet.
9497 * server.c, target.h: Update copyright years.
9498
4b8dad4a
RM
94992004-02-25 Roland McGrath <roland@redhat.com>
9500
9501 * target.h (struct target_ops): New member `read_auxv'.
9502 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9503 * linux-low.c (linux_read_auxv): New function.
9504 (linux_target_ops): Initialize `read_auxv' member to that.
9505
d7446758
JB
95062004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9507
9508 Committed by Jim Blandy <jimb@redhat.com>.
9509
9510 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9511 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9512 instead of GPR_SIZE to distiguish s390 and s390x targets.
9513
5544ad89
DJ
95142004-01-31 Daniel Jacobowitz <drow@mvista.com>
9515
9516 * linux-low.c: Update copyright year.
9517 (check_removed_breakpoint): Clear pending_is_breakpoint.
9518 (linux_set_resume_request, linux_queue_one_thread)
9519 (resume_status_pending_p): New functions.
9520 (linux_continue_one_thread): Use process->resume.
9521 (linux_resume): Only resume threads if there are no pending events.
9522 * linux-low.h (struct process_info): Add resume request
9523 pointer.
9524
2a68b70e
DJ
95252004-01-30 Daniel Jacobowitz <drow@mvista.com>
9526
9527 * regcache.c (new_register_cache): Clear the allocated register
9528 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9529
64386c31
DJ
95302003-10-13 Daniel Jacobowitz <drow@mvista.com>
9531
9532 * linux-low.c (linux_resume): Take a struct thread_resume *
9533 argument.
9534 (linux_wait): Update call.
9535 (resume_ptr): New static variable.
9536 (linux_continue_one_thread): Renamed from
9537 linux_continue_one_process. Use resume_ptr.
9538 (linux_resume): Use linux_continue_one_thread.
9539 * server.c (handle_v_cont, handle_v_requests): New functions.
9540 (myresume): New function.
9541 (main): Handle 'v' case.
9542 * target.h (struct thread_resume): New type.
9543 (struct target_ops): Change argument of "resume" to struct
9544 thread_resume *.
9545 (myresume): Delete macro.
9546
c938e9b0
L
95472003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9548
9549 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9550 (uninstall): Support DESTDIR.
9551
7f313d07
BC
9552Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9553
9554 * configure.srv: Add xscale*linux copy of arm*linux entry.
9555
3b2fc2ea
DJ
95562003-07-24 Daniel Jacobowitz <drow@mvista.com>
9557
9558 * linux-arm-low.c (arm_reinsert_addr): New function.
9559 (the_low_target): Add arm_reinsert_addr.
9560
1c0a559e
MK
95612003-07-08 Mark Kettenis <kettenis@gnu.org>
9562
9563 * mem-break.c: Remove whitespace at end of file.
9564
43d5792c
DJ
95652003-06-28 Daniel Jacobowitz <drow@mvista.com>
9566
9567 * configure.in: Check whether we need to prototype strerror.
9568 * server.h: Optionally prototype strerror.
9569 * gdbreplay.c (perror_with_name): Use strerror.
9570 * linux-low.c (linux_attach_lwp): Use strerror.
9571 * utils.c (perror_with_name): Use strerror.
9572 * config.in, configure: Regenerated.
9573
c8a86edf
DJ
95742003-06-28 Daniel Jacobowitz <drow@mvista.com>
9575
9576 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9577 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9578
73d37363
DJ
95792003-06-20 Daniel Jacobowitz <drow@mvista.com>
9580
9581 * Makefile.in (SFILES): Update.
9582 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9583 low-sun3.c: Remove files.
9584
6ad8ae5c
DJ
95852003-06-17 Daniel Jacobowitz <drow@mvista.com>
9586
9587 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9588 (linux_detach_one_process, linux_detach): New functions.
9589 (linux_target_ops): Add linux_detach.
9590 * server.c (main): Handle 'D' packet.
9591 * target.h (struct target_ops): Add "detach" member.
9592 (detach_inferior): Define.
9593
1581182a
MK
95942003-06-13 Mark Kettenis <kettenis@gnu.org>
9595
9596 From Kelley Cook <kelleycook@wideopenwest.com>:
9597 * configure.srv: Accept i[34567]86 variants.
9598
e5379b03
DJ
95992003-06-05 Daniel Jacobowitz <drow@mvista.com>
9600
9601 * linux-low.c (linux_wait_for_event): Correct comment typos.
9602 (linux_resume_one_process): Call check_removed_breakpoint.
9603 (linux_send_signal): New function.
9604 (linux_target_ops): Add linux_send_signal.
9605 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9606 of kill.
9607 * target.h (struct target_ops): Add send_signal.
9608
2ff29de4
JB
96092003-05-29 Jim Blandy <jimb@redhat.com>
9610
9611 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9612 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9613 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9614 away part of the register's value.
9615
254787d4
DJ
96162003-03-26 Daniel Jacobowitz <drow@mvista.com>
9617
9618 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9619 (linux_wait_for_event, linux_init_signals): Likewise.
9620
94e10508
DJ
96212003-03-17 Daniel Jacobowitz <drow@mvista.com>
9622
9623 * configure.in: Check for stdlib.h.
9624 * configure: Regenerated.
9625 * config.in: Regenerated.
9626
4c0711e0
DJ
96272003-01-04 Andreas Schwab <schwab@suse.de>
9628
9629 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9630
ef66e766
AC
96312003-01-02 Andrew Cagney <ac131313@redhat.com>
9632
9633 * Makefile.in: Remove obsolete code.
9634
a1358604
DJ
96352002-11-20 Daniel Jacobowitz <drow@mvista.com>
9636
9637 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9638 defined(PT_FPR0_HI).
9639
23ce3b1c
DJ
96402002-11-17 Stuart Hughes <seh@zee2.com>
9641
9642 * linux-arm-low.c (arm_num_regs): Increase.
9643 (arm_regmap): Include status register.
9644
96452002-11-17 Daniel Jacobowitz <drow@mvista.com>
9646
9647 * linux-low.c (register_addr): Remove incorrect -1 check.
9648
a9fa9f7d
DJ
96492002-08-29 Daniel Jacobowitz <drow@mvista.com>
9650
9651 * linux-low.c (linux_create_inferior): Call setpgid. Return
9652 the new PID.
9653 (unstopped_p, linux_signal_pid): Remove.
9654 (linux_target_ops): Remove linux_signal_pid.
9655 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9656 global instead of target method.
9657 * target.h (struct target_ops): Remove signal_pid. Update comment
9658 for create_inferior.
9659 * server.c (signal_pid): New variable.
9660 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 9661 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
9662 (attach_inferior): Set signal_pid.
9663
17574093
DJ
96642002-08-23 Daniel Jacobowitz <drow@mvista.com>
9665
9666 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9667
96682002-08-20 Jim Blandy <jimb@redhat.com>
9669
9670 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9671 default for this.
9672
96732002-08-01 Andrew Cagney <cagney@redhat.com>
9674
9675 * Makefile.in: Make chill references obsolete.
9676
96772002-07-24 Kevin Buettner <kevinb@redhat.com>
9678
9679 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9680 * configure: Regenerate.
9681 * config.in: Regenerate.
9682
96832002-07-09 David O'Brien <obrien@FreeBSD.org>
9684
9685 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9686 (perror_with_name, remote_close, remote_open, expect, play): Static.
9687
96882002-07-04 Michal Ludvig <mludvig@suse.cz>
9689
4b8dad4a 9690 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
9691 byte offsets instead of an array of indexes.
9692 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9693
96942002-06-13 Daniel Jacobowitz <drow@mvista.com>
9695
9696 * regcache.c: Add comment.
9697
96982002-06-11 Daniel Jacobowitz <drow@mvista.com>
9699
9700 * thread-db.c: New file.
9701 * proc-service.c: New file.
9702 * acinclude.m4: New file.
9703 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9704 proc-service.o, and thread-db.o.
9705 (linux-low.o): Add USE_THREAD_DB.
9706 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9707 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9708 * aclocal.m4: Regenerated.
9709 * config.in: Regenerated.
9710 * configure: Regenerated.
9711 * configure.in: Check for proc_service.h, sys/procfs.h,
9712 thread_db.h, and linux/elf.h headrs.
9713 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9714 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9715 Check for -lthread_db and thread support.
9716 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9717 PowerPC, and SuperH.
9718 * i387-fp.c: Constify arguments.
9719 * i387-fp.h: Likewise.
9720 * inferiors.c: (struct thread_info): Renamed from
9721 `struct inferior_info'. Remove PID member. Use generic inferior
9722 list header. All uses updated.
9723 (inferiors, signal_pid): Removed.
9724 (all_threads): New variable.
9725 (get_thread): Define.
9726 (add_inferior_to_list): New function.
9727 (for_each_inferior): New function.
9728 (change_inferior_id): New function.
9729 (add_inferior): Removed.
9730 (remove_inferior): New function.
9731 (add_thread): New function.
9732 (free_one_thread): New function.
9733 (remove_thread): New function.
9734 (clear_inferiors): Use for_each_inferior and free_one_thread.
9735 (find_inferior): New function.
9736 (find_inferior_id): New function.
9737 (inferior_target_data): Update argument type.
9738 (set_inferior_target_data): Likewise.
9739 (inferior_regcache_data): Likewise.
9740 (set_inferior_regcache_data): Likewise.
9741 * linux-low.c (linux_bp_reinsert): Remove.
9742 (all_processes, stopping_threads, using_thrads)
9743 (struct pending_signals, debug_threads, pid_of): New.
9744 (inferior_pid): Replace with macro.
9745 (struct inferior_linux_data): Remove.
9746 (get_stop_pc, add_process): New functions.
9747 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9748 Use add_process and add_thread.
9749 (linux_attach_lwp): New function, based on old linux_attach. Use
9750 add_process and add_thread. Set stop_expected for new threads.
9751 (linux_attach): New function.
9752 (linux_kill_one_process): New function.
9753 (linux_kill): Kill all LWPs.
9754 (linux_thread_alive): Use find_inferior_id.
9755 (check_removed_breakpoints, status_pending_p): New functions.
9756 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9757 Update. Use WNOHANG. Wait for cloned processes also. Update process
9758 struct for the found process.
9759 (linux_wait_for_event): New function.
9760 (linux_wait): Use it. Support LWPs.
9761 (send_sigstop, wait_for_sigstop, stop_all_processes)
9762 (linux_resume_one_process, linux_continue_one_process): New functions.
9763 (linux_resume): Support LWPs.
9764 (REGISTER_RAW_SIZE): Remove.
9765 (fetch_register): Use register_size instead. Call supply_register.
9766 (usr_store_inferior_registers): Likewise. Call collect_register.
9767 Fix recursive case.
9768 (regsets_fetch_inferior_registers): Improve error message.
9769 (regsets_store_inferior_registers): Add debugging.
9770 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9771 (unstopped_p, linux_signal_pid): New functions.
9772 (linux_target_ops): Add linux_signal_pid.
9773 (linux_init_signals): New function.
9774 (initialize_low): Call it. Initialize using_threads.
9775 * regcache.c (inferior_regcache_data): Add valid
9776 flag.
9777 (get_regcache): Fetch registers lazily. Add fetch argument
9778 and update all callers.
9779 (regcache_invalidate_one, regcache_invalidate): New
9780 functions.
9781 (new_register_cache): Renamed from create_register_cache.
9782 Return the new regcache.
9783 (free_register_cache): Change argument to a void *.
9784 (registers_to_string, registers_from_string): Call get_regcache
9785 with fetch flag set.
9786 (register_data): Make static. Pass fetch flag to get_regcache.
9787 (supply_register): Call get_regcache with fetch flag clear.
9788 (collect_register): Call get_regcache with fetch flag set.
9789 (collect_register_as_string): New function.
9790 * regcache.h: Update.
9791 * remote-utils.c (putpkt): Flush after debug output and use
9792 stderr.
9793 Handle input interrupts while waiting for an ACK.
9794 (input_interrupt): Use signal_pid method.
9795 (getpkt): Flush after debug output and use stderr.
9796 (outreg): Use collect_register_as_string.
9797 (new_thread_notify, dead_thread_notify): New functions.
9798 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9799 and general_thread.
9800 (look_up_one_symbol): Flush after debug output.
9801 * server.c (step_thread, server_waiting): New variables.
9802 (start_inferior): Don't use signal_pid. Update call to mywait.
9803 (attach_inferior): Update call to mywait.
9804 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9805 (main): Don't fetch/store registers explicitly. Use
9806 set_desired_inferior. Support proposed ``Hs'' packet. Update
9807 calls to mywait.
9808 * server.h: Update.
9809 (struct inferior_list, struct_inferior_list_entry): New.
9810 * target.c (set_desired_inferior): New.
9811 (write_inferior_memory): Constify.
9812 (mywait): New function.
9813 * target.h: Update.
9814 (struct target_ops): New signal_pid method.
9815 (mywait): Removed macro, added prototype.
9816
9817 * linux-low.h (regset_func): Removed.
9818 (regset_fill_func, regset_store_func): New.
9819 (enum regset_type): New.
9820 (struct regset_info): Add type field. Use new operation types.
9821 (struct linux_target_ops): stop_pc renamed to get_pc.
9822 Add decr_pc_after_break and breakpoint_at.
9823 (get_process, get_thread_proess, get_process_thread)
9824 (strut process_info, all_processes, linux_attach_lwp)
9825 (thread_db_init): New.
9826
9827 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9828 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9829 (the_low_target): Add new members.
9830 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9831 (i386_store_fpxregset): Constify.
9832 (target_regsets): Add new kind identifier.
9833 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9834 (i386_set_pc): Add debugging.
9835 (i386_breakpoint_at): New function.
9836 (the_low_target): Add new members.
9837 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9838 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9839 (mips_breakpoint_at): New.
9840 (the_low_target): Add new members.
9841 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9842 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9843 (the_low_target): Add new members.
9844 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9845 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9846 (the_low_target): Add new members.
9847 * linux-x86-64-low.c (target_regsets): Add new kind
9848 identifier.
9849
98502002-05-15 Daniel Jacobowitz <drow@mvista.com>
9851
9852 From Martin Pool <mbp@samba.org>:
9853 * server.c (gdbserver_usage): New function.
9854 (main): Call it.
9855
98562002-05-14 Daniel Jacobowitz <drow@mvista.com>
9857
9858 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9859 stop_at -> stop_pc.
9860
98612002-05-04 Andrew Cagney <ac131313@redhat.com>
9862
9863 * Makefile.in: Remove obsolete code.
9864
98652002-04-24 Michal Ludvig <mludvig@suse.cz>
9866
9867 * linux-low.c (regsets_fetch_inferior_registers),
9868 (regsets_store_inferior_registers): Removed cast to int from
9869 ptrace() calls.
9870 * regcache.h: Added declaration of struct inferior_info.
9871
98722002-04-20 Daniel Jacobowitz <drow@mvista.com>
9873
9874 * inferiors.c (struct inferior_info): Add regcache_data.
9875 (add_inferior): Call create_register_cache.
9876 (clear_inferiors): Call free_register_cache.
9877 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9878 * regcache.c (struct inferior_regcache_data): New.
9879 (registers): Remove.
9880 (get_regcache): New function.
9881 (create_register_cache, free_register_cache): New functions.
9882 (set_register_cache): Don't initialize the register cache here.
9883 (registers_to_string, registers_from_string, register_data): Call
9884 get_regcache.
9885 * regcache.h: Add prototypes.
9886 * server.h: Likewise.
9887
98882002-04-20 Daniel Jacobowitz <drow@mvista.com>
9889
9890 * mem-break.c: New file.
9891 * mem-break.h: New file.
9892 * Makefile.in: Add mem-break.o rule; update server.h
9893 dependencies.
9894 * inferiors.c (struct inferior_info): Add target_data
9895 member.
9896 (clear_inferiors): Free target_data member if set.
9897 (inferior_target_data, set_inferior_target_data): New functions.
9898 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9899 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9900 * linux-low.c (linux_bp_reinsert): New variable.
9901 (struct inferior_linux_data): New.
9902 (linux_create_inferior): Use set_inferior_target_data.
9903 (linux_attach): Likewise. Call add_inferior.
9904 (linux_wait_for_one_inferior): New function.
9905 (linux_wait): Call it.
9906 (linux_write_memory): Add const.
9907 (initialize_low): Call set_breakpoint_data.
9908 * linux-low.h (struct linux_target_ops): Add breakpoint
9909 handling members.
9910 * server.c (attach_inferior): Remove extra add_inferior
9911 call.
9912 * server.h: Include mem-break.h. Update inferior.c
9913 prototypes.
9914 * target.c (read_inferior_memory)
9915 (write_inferior_memory): New functions.
9916 * target.h (read_inferior_memory)
9917 (write_inferior_memory): Change macros to prototypes.
9918 (struct target_ops): Update comments. Add const to write_memory
9919 definition.
9920
99212002-04-11 Daniel Jacobowitz <drow@mvista.com>
9922
9923 * linux-low.c (usr_store_inferior_registers): Support
9924 registers which are allowed to fail to store.
9925 * linux-low.h (linux_target_ops): Likewise.
9926 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
9927 (ppc_cannot_store_register): FPSCR may not be storable.
9928
99292002-04-09 Daniel Jacobowitz <drow@mvista.com>
9930
9931 * server.h: Include <string.h> if HAVE_STRING_H.
9932 * ChangeLog: Correct paths in last ChangeLog entry.
9933
99342002-04-09 Daniel Jacobowitz <drow@mvista.com>
9935
9936 * linux-low.h: Remove obsolete prototypes.
9937 (struct linux_target_ops): New.
9938 (extern the_low_target): New.
9939 * linux-low.c (num_regs, regmap): Remove declarations.
9940 (register_addr): Use the_low_target explicitly.
9941 (fetch_register): Likewise.
9942 (usr_fetch_inferior_registers): Likewise.
9943 (usr_store_inferior_registers): Likewise.
9944 * linux-arm-low.c (num_regs): Remove.
9945 (arm_num_regs): Define.
9946 (arm_regmap): Renamed from regmap, made static.
9947 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
9948 made static.
9949 (arm_cannot_store_register): Renamed from cannot_store_register,
9950 made static.
9951 (the_low_target): New.
9952 * linux-i386-low.c (num_regs): Remove.
9953 (i386_num_regs): Define.
9954 (i386_regmap): Renamed from regmap, made static.
9955 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
9956 made static.
9957 (i386_cannot_store_register): Renamed from cannot_store_register,
9958 made static.
9959 (the_low_target): New.
9960 * linux-ia64-low.c (num_regs): Remove.
9961 (ia64_num_regs): Define.
9962 (ia64_regmap): Renamed from regmap, made static.
9963 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9964 made static.
9965 (ia64_cannot_store_register): Renamed from cannot_store_register,
9966 made static.
9967 (the_low_target): New.
9968 * linux-m68k-low.c (num_regs): Remove.
9969 (m68k_num_regs): Define.
9970 (m68k_regmap): Renamed from regmap, made static.
9971 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9972 made static.
9973 (m68k_cannot_store_register): Renamed from cannot_store_register,
9974 made static.
9975 (the_low_target): New.
9976 * linux-mips-low.c (num_regs): Remove.
9977 (mips_num_regs): Define.
9978 (mips_regmap): Renamed from regmap, made static.
9979 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9980 made static.
9981 (mips_cannot_store_register): Renamed from cannot_store_register,
9982 made static.
9983 (the_low_target): New.
9984 * linux-ppc-low.c (num_regs): Remove.
9985 (ppc_num_regs): Define.
9986 (ppc_regmap): Renamed from regmap, made static.
9987 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9988 made static.
9989 (ppc_cannot_store_register): Renamed from cannot_store_register,
9990 made static.
9991 (the_low_target): New.
9992 * linux-s390-low.c (num_regs): Remove.
9993 (s390_num_regs): Define.
9994 (s390_regmap): Renamed from regmap, made static.
9995 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9996 made static.
9997 (s390_cannot_store_register): Renamed from cannot_store_register,
9998 made static.
9999 (the_low_target): New.
10000 * linux-sh-low.c (num_regs): Remove.
10001 (sh_num_regs): Define.
10002 (sh_regmap): Renamed from regmap, made static.
10003 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10004 made static.
10005 (sh_cannot_store_register): Renamed from cannot_store_register,
10006 made static.
10007 (the_low_target): New.
10008 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10009 (the_low_target): New.
10010
100112002-04-09 Daniel Jacobowitz <drow@mvista.com>
10012
10013 * Makefile.in: Add stamp-h target.
10014 * configure.in: Create stamp-h.
10015 * configure: Regenerated.
10016
100172002-04-09 Daniel Jacobowitz <drow@mvista.com>
10018
10019 * inferiors.c: New file.
10020 * target.c: New file.
10021 * target.h: New file.
10022 * Makefile.in: Add target.o and inferiors.o. Update
10023 dependencies.
10024 * linux-low.c (inferior_pid): New static variable,
10025 moved from server.c.
10026 (linux_create_inferior): Renamed from create_inferior.
10027 Call add_inferior. Return 0 on success instead of a PID.
10028 (linux_attach): Renamed from myattach.
10029 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10030 (linux_thread_alive): Renamed from mythread_alive.
10031 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10032 child dies.
10033 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10034 (regsets_store_inferior_registers): Correct error message.
10035 Add missing ``return 0''.
10036 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10037 (linux_store_registers): Renamed from store_inferior_registers.
10038 (linux_read_memory): Renamed from read_inferior_memory.
10039 (linux_write_memory): Renamed from write_inferior_memory.
10040 (linux_target_ops): New structure.
10041 (initialize_low): Call set_target_ops ().
10042 * remote-utils.c (unhexify): New function.
10043 (hexify): New function.
10044 (input_interrupt): Send signals to ``signal_pid''.
10045 * server.c (inferior_pid): Remove.
10046 (start_inferior): Update create_inferior call.
10047 (attach_inferior): Call add_inferior.
10048 (handle_query): New function.
10049 (main): Call handle_query for `q' packets.
10050 * server.h: Include "target.h". Remove obsolete prototypes.
10051 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10052
100532002-04-09 Daniel Jacobowitz <drow@mvista.com>
10054
10055 * Makefile.in: Add WARN_CFLAGS. Update configury
10056 dependencies.
10057 * configure.in: Check for <string.h>
10058 * configure: Regenerate.
10059 * config.in: Regenerate.
10060 * gdbreplay.c: Include needed system headers.
10061 (remote_open): Remove strchr prototype.
10062 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10063 * regcache.c (supply_register): Change buf argument to const void *.
10064 (supply_register_by_name): Likewise.
10065 (collect_register): Change buf argument to void *.
10066 (collect_register_by_name): Likewise.
10067 * regcache.h: Add missing prototypes.
10068 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10069 * server.c (handle_query): New function.
10070 (attached): New static variable, moved out of main.
10071 (main): Quiet longjmp clobber warnings.
10072 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10073 * utils.c (error): Remove NORETURN.
10074 (fatal): Likewise.
This page took 1.388073 seconds and 4 git commands to generate.