1 2014-08-29 Gary Benson <gbenson@redhat.com>
3 * config.in: Regenerate.
6 2014-08-29 Gary Benson <gbenson@redhat.com>
8 * Makefile.in (SFILES): Add common/cleanups.c.
10 (cleanups.o): New rule.
12 2014-08-29 Gary Benson <gbenson@redhat.com>
14 * utils.c (internal_vwarning): New function.
16 2014-08-28 Gary Benson <gbenson@redhat.com>
18 * utils.h (fatal): Remove declaration.
19 * utils.c (fatal): Remove function.
21 2014-08-28 Gary Benson <gbenson@redhat.com>
23 * tracepoint.c (gdb_agent_init): Replace fatal with
25 (initialize_tracepoint): Likewise.
27 2014-08-28 Gary Benson <gbenson@redhat.com>
29 * remote-utils.c (remote_prepare): Replace fatal with error.
31 2014-08-28 Gary Benson <gbenson@redhat.com>
33 * linux-low.c (linux_async): Replace fatal with warning.
35 (linux_start_non_stop): Return -1 if linux_async failed.
37 2014-08-28 Gary Benson <gbenson@redhat.com>
39 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
41 (i386_dr_low_get_addr): Remove vague comment.
42 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
45 2014-08-28 Gary Benson <gbenson@redhat.com>
47 * inferiors.c (get_thread_process): Replace check with gdb_assert.
48 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
50 (linux_resume_one_lwp): Likewise.
51 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
53 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
55 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
56 (init_register_cache): Replace fatal with gdb_assert_not_reached.
57 (find_register_by_name): Replace fatal with internal_error.
58 (find_regno): Likewise.
59 * tdesc.c (init_target_desc): Replace check with gdb_assert.
60 * thread-db.c (thread_db_create_event): Likewise.
61 (thread_db_load_search): Likewise.
62 (try_thread_db_load_1): Likewise.
63 * tracepoint.c (get_jump_space_head): Replace fatal with
65 (claim_trampoline_space): Likewise.
66 (have_fast_tracepoint_trampoline_buffer): Likewise.
67 (cmd_qtstart): Likewise.
68 (stop_tracing): Likewise.
69 (fast_tracepoint_collecting): Likewise.
70 (target_malloc): Likewise.
71 (download_tracepoint): Likewise.
72 (download_trace_state_variables): Replace check with gdb_assert.
73 (upload_fast_traceframes): Replace fatal with internal_error.
75 2014-08-19 Tom Tromey <tromey@redhat.com>
76 Gary Benson <gbenson@redhat.com>
78 * Makefile.in (SFILES): Add common/common-debug.c.
79 (OBS): Add common-debug.o.
80 (common-debug.o): New rule.
81 * debug.h (debug_printf): Don't declare.
82 * debug.c (debug_printf): Renamed and rewritten as...
83 (debug_vprintf): New function.
85 2014-08-19 Gary Benson <gbenson@redhat.com>
87 * utils.h: Do not include print-utils.h.
89 2014-08-19 Tom Tromey <tromey@redhat.com>
90 Gary Benson <gbenson@redhat.com>
92 * server.h: Add static assertion.
93 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
95 2014-08-19 Tom Tromey <tromey@redhat.com>
96 Gary Benson <gbenson@redhat.com>
98 * Makefile.in (SFILES): Add common/errors.c.
100 (IPA_OBS): Add errors-ipa.o.
101 (errors.o): New rule.
102 (errors-ipa.o): Likewise.
103 * utils.h (perror_with_name, error, warning): Don't declare.
104 * utils.c (warning): Renamed and rewritten as...
105 (vwarning): New function.
106 (error): Renamed and rewritten as...
107 (verror): New function.
108 (internal_error): Renamed and rewritten as...
109 (internal_verror): New function.
111 2014-08-07 Gary Benson <gbenson@redhat.com>
113 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
114 * configure: Regenerate.
115 * config.in: Likewise.
116 * server.h: Do not include errno.h.
117 * event-loop.c: Likewise.
118 * hostio-errno.c: Likewise.
119 * linux-low.c: Likewise.
120 * remote-utils.c: Likewise.
121 * spu-low.c: Likewise.
123 * gdbreplay.c: Unconditionally include errno.h.
125 2014-08-07 Gary Benson <gbenson@redhat.com>
127 * server.h: Do not include string.h.
128 * event-loop.c: Likewise.
129 * linux-low.c: Likewise.
130 * regcache.c: Likewise.
131 * remote-utils.c: Likewise.
132 * spu-low.c: Likewise.
135 2014-08-07 Gary Benson <gbenson@redhat.com>
137 * server.h: Do not include gdb_assert.h.
139 2014-08-07 Gary Benson <gbenson@redhat.com>
141 * server.h: Do not include common-utils.h.
143 2014-08-07 Gary Benson <gbenson@redhat.com>
145 * server.h: Do not include ptid.h.
148 2014-08-07 Gary Benson <gbenson@redhat.com>
150 * server.h: Do not include gdb_locale.h.
152 2014-08-07 Gary Benson <gbenson@redhat.com>
154 * server.h: Do not include gdb/signals.h.
155 * win32-low.c: Likewise.
157 2014-08-07 Gary Benson <gbenson@redhat.com>
159 * server.h: Do not include pathmax.h.
161 2014-08-07 Gary Benson <gbenson@redhat.com>
163 * server.h: Do not include libiberty.h.
164 * linux-bfin-low.c: Likewise.
166 2014-08-07 Gary Benson <gbenson@redhat.com>
168 * server.h: Do not include ansidecl.h.
170 2014-08-07 Gary Benson <gbenson@redhat.com>
172 * linux-x86-low.c: Do not include stddef.h.
173 * lynx-ppc-low.c: Likewise.
174 * tracepoint.c: Likewise.
176 2014-08-07 Gary Benson <gbenson@redhat.com>
178 * server.h: Do not include stdarg.h.
179 * nto-low.c: Likewise.
181 2014-08-07 Gary Benson <gbenson@redhat.com>
183 * server.h: Do not include stdlib.h.
184 * inferiors.c: Likewise.
185 * linux-low.c: Likewise.
186 * regcache.c: Likewise.
187 * spu-low.c: Likewise.
188 * tracepoint.c: Likewise.
191 2014-08-07 Gary Benson <gbenson@redhat.com>
193 * server.h: Do not include stdio.h.
194 * linux-low.c: Likewise.
195 * remote-utils.c: Likewise.
196 * spu-low.c: Likewise.
198 * wincecompat.c: Likewise.
200 2014-08-06 Gary Benson <gbenson@redhat.com>
202 * regcache.c (init_register_cache): Move conditionals inside if.
204 2014-08-06 Gary Benson <gbenson@redhat.com>
206 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
208 2014-07-31 Gary Benson <gbenson@redhat.com>
210 * ax.h: Do not include server.h.
211 * gdbthread.h: Likewise.
212 * lynx-low.h: Likewise.
215 2014-07-30 Gary Benson <gbenson@redhat.com>
217 * server.h: Include common-defs.h.
218 Do not include config.h or build-gnulib-gdbserver/config.h.
220 2014-07-30 Gary Benson <gbenson@redhat.com>
222 * hostio-errno.c: Move server.h to top of includes list.
223 * inferiors.c: Likewise.
224 * linux-x86-low.c: Likewise.
225 * notif.c: Include server.h.
227 2014-07-24 Tom Tromey <tromey@redhat.com>
228 Gary Benson <gbenson@redhat.com>
230 * server.h (CORE_ADDR): Now unsigned.
232 2014-07-16 Pedro Alves <palves@redhat.com>
234 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
236 2014-07-15 Pedro Alves <palves@redhat.com>
238 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
241 2014-07-11 Pedro Alves <palves@redhat.com>
243 * linux-low.c (kill_wait_lwp): New function, based on
244 kill_one_lwp_callback, but use my_waitpid directly.
245 (kill_one_lwp_callback, linux_kill): Use it.
247 2014-06-23 Pedro Alves <palves@redhat.com>
249 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
250 before setting DR0..DR3.
252 2014-06-20 Gary Benson <gbenson@redhat.com>
254 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
255 * configure: Regenerated.
256 * config.in: Likewise.
258 2014-06-20 Gary Benson <gbenson@redhat.com>
260 * Makefile.in (SFILES): Update locations for files moved
262 (object file files): Reordered.
264 2014-06-20 Gary Benson <gbenson@redhat.com>
266 * i386-low.h (i386_dr_low_can_set_addr): Removed.
267 (i386_dr_low_set_addr): Likewise.
268 (i386_dr_low_get_addr): Likewise.
269 (i386_dr_low_can_set_control): Likewise.
270 (i386_dr_low_set_control): Likewise.
271 (i386_dr_low_get_control): Likewise.
272 (i386_dr_low_get_status): Likewise.
273 (i386_get_debug_register_length): Likewise.
274 * linux-x86-low.c (i386_dr_low_set_addr):
275 Changed signature. Made static.
276 (i386_dr_low_get_addr): Likewise.
277 (i386_dr_low_set_control): Likewise.
278 (i386_dr_low_get_control): Likewise.
279 (i386_dr_low_get_status): Likewise.
280 (i386_dr_low): New global variable.
281 * win32-i386-low.c (i386_dr_low_set_addr):
282 Changed signature. Made static.
283 (i386_dr_low_get_addr): Likewise.
284 (i386_dr_low_set_control): Likewise.
285 (i386_dr_low_get_control): Likewise.
286 (i386_dr_low_get_status): Likewise.
287 (i386_dr_low): New global variable.
289 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
291 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
292 * Makefile.in (AR, AR_FLAGS): Define.
293 * configure: Regenerate.
295 2014-06-19 Gary Benson <gbenson@redhat.com>
297 * Makefile.in (i386-dregs.o): New rule.
298 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
299 * i386-low.c (target.h): Remove include.
300 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
301 (DR_CONTROL_SHIFT): Likewise.
302 (DR_CONTROL_SIZE): Likewise.
303 (DR_RW_EXECUTE): Likewise.
304 (DR_RW_WRITE): Likewise.
305 (DR_RW_READ): Likewise.
306 (DR_RW_IORW): Likewise.
307 (DR_LEN_1): Likewise.
308 (DR_LEN_2): Likewise.
309 (DR_LEN_4): Likewise.
310 (DR_LEN_8): Likewise.
311 (DR_LOCAL_ENABLE_SHIFT): Likewise.
312 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
313 (DR_ENABLE_SIZE): Likewise.
314 (DR_LOCAL_SLOWDOWN): Likewise.
315 (DR_GLOBAL_SLOWDOWN): Likewise.
316 (DR_CONTROL_RESERVED): Likewise.
317 (I386_DR_CONTROL_MASK): Likewise.
318 (I386_DR_VACANT): Likewise.
319 (I386_DR_LOCAL_ENABLE): Likewise.
320 (I386_DR_GLOBAL_ENABLE): Likewise.
321 (I386_DR_DISABLE): Likewise.
322 (I386_DR_SET_RW_LEN): Likewise.
323 (I386_DR_GET_RW_LEN): Likewise.
324 (I386_DR_WATCH_HIT): Likewise.
325 (i386_wp_op_t): Likewise.
326 (i386_show_dr): Likewise.
327 (i386_length_and_rw_bits): Likewise.
328 (i386_insert_aligned_watchpoint): Likewise.
329 (i386_remove_aligned_watchpoint): Likewise.
330 (i386_handle_nonaligned_watchpoint): Likewise.
331 i386_update_inferior_debug_regs(): Likewise.
332 (i386_dr_insert_watchpoint): Likewise.
333 (i386_dr_remove_watchpoint): Likewise.
334 (i386_dr_region_ok_for_watchpoint): Likewise.
335 (i386_dr_stopped_data_address): Likewise.
336 (i386_dr_stopped_by_watchpoint): Likewise.
338 2014-06-19 Gary Benson <gbenson@redhat.com>
340 * i386-low.c (i386_dr_show): Renamed to
341 i386_show_dr and made static. All uses updated.
342 (i386_dr_length_and_rw_bits): Renamed to
343 i386_length_and_rw_bits and made static.
345 (i386_dr_insert_aligned_watchpoint): Renamed to
346 i386_insert_aligned_watchpoint and made static.
348 (i386_dr_remove_aligned_watchpoint): Renamed to
349 i386_remove_aligned_watchpoint and made static.
351 (i386_dr_update_inferior_debug_regs): Renamed to
352 i386_update_inferior_debug_regs and made static.
355 2014-06-18 Gary Benson <gbenson@redhat.com>
357 * i386-low.h (i386_dr_low_can_set_addr): New macro.
358 (i386_dr_low_can_set_control): Likewise.
359 (i386_get_debug_register_length): Likewise.
360 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
361 (i386_dr_low_can_set_control): Likewise.
362 (i386_get_debug_register_length): Likewise.
364 2014-06-17 Gary Benson <gbenson@redhat.com>
366 * i386-low.h (i386-dregs.h): New include.
367 (DR_FIRSTADDR): Now in i386-dregs.h.
368 (DR_LASTADDR): Likewise.
369 (DR_NADDR): Likewise.
370 (DR_STATUS): Likewise.
371 (DR_CONTROL): Likewise.
372 (i386_debug_reg_state): Likewise.
373 (i386_dr_insert_watchpoint): Likewise.
374 (i386_dr_remove_watchpoint): Likewise.
375 (i386_dr_region_ok_for_watchpoint): Likewise.
376 (i386_dr_stopped_data_address): Likewise.
377 (i386_dr_stopped_by_watchpoint): Likewise.
378 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
380 2014-06-18 Gary Benson <gbenson@redhat.com>
382 * i386-low.h (i386_low_insert_watchpoint): Renamed to
383 i386_dr_insert_watchpoint.
384 (i386_low_remove_watchpoint): Renamed to
385 i386_dr_remove_watchpoint.
386 (i386_low_region_ok_for_watchpoint): Renamed to
387 i386_dr_region_ok_for_watchpoint.
388 (i386_low_stopped_data_address): Renamed to
389 i386_dr_stopped_data_address.
390 (i386_low_stopped_by_watchpoint): Renamed to
391 i386_dr_stopped_by_watchpoint.
392 * i386-low.c (i386_show_dr): Renamed to
393 i386_dr_show and made nonstatic. All uses updated.
394 (i386_length_and_rw_bits): Renamed to
395 i386_dr_length_and_rw_bits and made nonstatic.
397 (i386_insert_aligned_watchpoint): Renamed to
398 i386_dr_insert_aligned_watchpoint and made nonstatic.
400 (i386_remove_aligned_watchpoint): Renamed to
401 i386_dr_remove_aligned_watchpoint and made nonstatic.
403 (i386_update_inferior_debug_regs): Renamed to
404 i386_dr_update_inferior_debug_regs and made nonstatic.
406 (i386_low_insert_watchpoint): Renamed to
407 i386_dr_insert_watchpoint. All uses updated.
408 (i386_low_remove_watchpoint): Renamed to
409 i386_dr_remove_watchpoint. All uses updated.
410 (i386_low_region_ok_for_watchpoint): Renamed to
411 i386_dr_region_ok_for_watchpoint. All uses updated.
412 (i386_low_stopped_data_address): Renamed to
413 i386_dr_stopped_data_address. All uses updated.
414 (i386_low_stopped_by_watchpoint): Renamed to
415 i386_dr_stopped_by_watchpoint. All uses updated.
417 2014-06-18 Gary Benson <gbenson@redhat.com>
419 * i386-low.c (i386_dr_low_can_set_addr): New macro.
420 (i386_dr_low_can_set_control): Likewise.
421 (i386_insert_aligned_watchpoint): New check.
423 2014-06-18 Gary Benson <gbenson@redhat.com>
425 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
428 2014-06-18 Gary Benson <gbenson@redhat.com>
430 * i386-low.c (i386_length_and_rw_bits): Use internal_error
431 instead of fatal and error.
432 (i386_handle_nonaligned_watchpoint): Likewise.
434 2014-06-18 Gary Benson <gbenson@redhat.com>
436 * i386-low.c (i386_get_debug_register_length): New macro.
437 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
438 (i386_show_dr): Use debug_printf instead of fprintf. Use
439 phex to format values.
441 2014-06-18 Gary Benson <gbenson@redhat.com>
443 * i386-low.h: Comment changes.
444 * i386-low.c: Likewise.
446 2014-06-18 Gary Benson <gbenson@redhat.com>
448 * i386-low.c: Whitespace changes.
450 2014-06-12 Tom Tromey <tromey@redhat.com>
452 * utils.c (freeargv): Remove.
454 2014-06-12 Tom Tromey <tromey@redhat.com>
456 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
457 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
458 (parse_debug_format_options): Likewise.
459 (gdbserver_usage): Likewise.
460 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
461 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
462 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
464 ($(LIBGNU)): Depend on libiberty.
465 (all-lib): Recurse into all subdirs.
466 (install-only): Invoke "install" target in subdirs.
467 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
469 * configure: Rebuild.
470 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
471 for vasprintf, vsnprintf, or gettimeofday.
472 * configure.srv: Don't add safe-ctype.o or lbasename.o to
475 2014-06-05 Joel Brobecker <brobecker@adacore.com>
477 * development.sh: Delete.
478 * Makefile.in (config.status): Adjust dependency on development.sh.
479 * configure.ac: Adjust development.sh source call.
480 * configure: Regenerate.
482 2014-06-02 Pedro Alves <palves@redhat.com>
484 * ax.c (gdb_free_agent_expr): New function.
485 * ax.h (gdb_free_agent_expr): New declaration.
486 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
488 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
490 (clear_breakpoint_conditions_and_commands): New function.
491 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
492 (clear_breakpoint_conditions_and_commands): New declaration.
494 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
496 * linux-aarch64-low.c (asm/ptrace.h): Include.
498 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
500 Fix TLS access for -static -pthread.
501 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
502 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
503 (thread_db_load_search, try_thread_db_load_1): Initialize it.
505 2014-05-20 Pedro Alves <palves@redhat.com>
507 * linux-aarch64-low.c (aarch64_insert_point)
508 (aarch64_remove_point): No longer check whether the type is
509 supported here. Adjust to new interface.
510 (the_low_target): Install aarch64_supports_z_point_type as
511 supports_z_point_type method.
512 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
513 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
514 instead of a Z packet char. Adjust.
515 (arm_supports_z_point_type): New function.
516 (arm_insert_point, arm_remove_point): Adjust to new interface.
517 (the_low_target): Install arm_supports_z_point_type.
518 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
519 (cris_insert_point, cris_remove_point): Adjust to new interface.
520 Don't check whether the type is supported here.
521 (the_low_target): Install cris_supports_z_point_type.
522 * linux-low.c (linux_supports_z_point_type): New function.
523 (linux_insert_point, linux_remove_point): Adjust to new interface.
524 * linux-low.h (struct linux_target_ops) <insert_point,
525 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
526 raw_breakpoint pointer parameter.
527 <supports_z_point_type>: New method.
528 * linux-mips-low.c (mips_supports_z_point_type): New function.
529 (mips_insert_point, mips_remove_point): Adjust to new interface.
530 Use mips_supports_z_point_type.
531 (the_low_target): Install mips_supports_z_point_type.
532 * linux-ppc-low.c (the_low_target): Install NULL as
533 supports_z_point_type method.
534 * linux-s390-low.c (the_low_target): Install NULL as
535 supports_z_point_type method.
536 * linux-sparc-low.c (the_low_target): Install NULL as
537 supports_z_point_type method.
538 * linux-x86-low.c (x86_supports_z_point_type): New function.
539 (x86_insert_point): Adjust to new insert_point interface. Use
540 insert_memory_breakpoint. Adjust to new
541 i386_low_insert_watchpoint interface.
542 (x86_remove_point): Adjust to remove_point interface. Use
543 remove_memory_breakpoint. Adjust to new
544 i386_low_remove_watchpoint interface.
545 (the_low_target): Install x86_supports_z_point_type.
546 * lynx-low.c (lynx_target_ops): Install NULL as
547 supports_z_point_type callback.
548 * nto-low.c (nto_supports_z_point_type): New.
549 (nto_insert_point, nto_remove_point): Adjust to new interface.
550 (nto_target_ops): Install nto_supports_z_point_type.
551 * mem-break.c: Adjust intro comment.
552 (struct raw_breakpoint) <raw_type, size>: New fields.
553 <inserted>: Update comment.
554 <shlib_disabled>: Delete field.
555 (enum bkpt_type) <gdb_breakpoint>: Delete value.
556 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
557 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
558 (raw_bkpt_type_to_target_hw_bp_type): New function.
559 (find_enabled_raw_code_breakpoint_at): New function.
560 (find_raw_breakpoint_at): New type and size parameters. Use them.
561 (insert_memory_breakpoint): New function, based off
562 set_raw_breakpoint_at.
563 (remove_memory_breakpoint): New function.
564 (set_raw_breakpoint_at): Reimplement.
565 (set_breakpoint): New, based on set_breakpoint_at.
566 (set_breakpoint_at): Reimplement.
567 (delete_raw_breakpoint): Go through the_target->remove_point
568 instead of assuming memory breakpoints.
569 (find_gdb_breakpoint_at): Delete.
570 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
571 (find_gdb_breakpoint): New function.
572 (set_gdb_breakpoint_at): Delete.
573 (z_type_supported): New function.
574 (set_gdb_breakpoint_1): New function, loosely based off
575 set_gdb_breakpoint_at.
576 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
577 (delete_gdb_breakpoint_at): Delete.
578 (delete_gdb_breakpoint_1): New function, loosely based off
579 delete_gdb_breakpoint_at.
580 (delete_gdb_breakpoint): New function.
581 (clear_gdb_breakpoint_conditions): Rename to ...
582 (clear_breakpoint_conditions): ... this. Don't handle a NULL
584 (add_condition_to_breakpoint): Make static.
585 (add_breakpoint_condition): Take a struct breakpoint pointer
586 instead of an address. Adjust.
587 (gdb_condition_true_at_breakpoint): Rename to ...
588 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
590 (gdb_condition_true_at_breakpoint): Reimplement.
591 (add_breakpoint_commands): Take a struct breakpoint pointer
592 instead of an address. Adjust.
593 (gdb_no_commands_at_breakpoint): Rename to ...
594 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
595 parameter. Return true if no breakpoint was found. Change debug
597 (gdb_no_commands_at_breakpoint): Reimplement.
598 (run_breakpoint_commands): Rename to ...
599 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
600 and change return type to boolean.
601 (run_breakpoint_commands): New function.
602 (gdb_breakpoint_here): Also check for Z1 breakpoints.
603 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
604 breakpoint. Go through the_target->remove_point instead of
605 assuming memory breakpoint.
606 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
607 software and hardware breakpoints.
608 (reinsert_raw_breakpoint): Go through the_target->insert_point
609 instead of assuming memory breakpoint.
610 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
611 software and hardware breakpoints.
612 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
613 Check both software and hardware breakpoints.
614 (validate_inserted_breakpoint): Assert the breakpoint is a
615 software breakpoint. Set the inserted flag to -1 instead of
616 setting shlib_disabled.
617 (delete_disabled_breakpoints): Adjust.
618 (validate_breakpoints): Only validate software breakpoints.
619 Adjust to inserted flag change.
620 (check_mem_read, check_mem_write): Skip breakpoint types other
621 than software breakpoints. Adjust to inserted flag change.
622 * mem-break.h (enum raw_bkpt_type): New enum.
623 (raw_breakpoint, struct process_info): Forward declare.
624 (Z_packet_to_target_hw_bp_type): Delete declaration.
625 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
626 (set_gdb_breakpoint, delete_gdb_breakpoint)
627 (clear_breakpoint_conditions): New declarations.
628 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
629 (breakpoint_inserted_here): Update comment.
630 (add_breakpoint_condition, add_breakpoint_commands): Replace
631 address parameter with a breakpoint pointer parameter.
632 (gdb_breakpoint_here): Update comment.
633 (delete_gdb_breakpoint_at): Delete.
634 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
635 * server.c (process_point_options): Take a struct breakpoint
636 pointer instead of an address. Adjust.
637 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
638 delete_gdb_breakpoint.
639 * spu-low.c (spu_target_ops): Install NULL as
640 supports_z_point_type method.
641 * target.h: Include mem-break.h.
642 (struct target_ops) <prepare_to_access_memory>: Update comment.
643 <supports_z_point_type>: New field.
644 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
645 instead of a char. Also take a raw breakpoint pointer.
646 * win32-arm-low.c (the_low_target): Install NULL as
647 supports_z_point_type.
648 * win32-i386-low.c (i386_supports_z_point_type): New function.
649 (i386_insert_point, i386_remove_point): Adjust to new interface.
650 (the_low_target): Install i386_supports_z_point_type.
651 * win32-low.c (win32_supports_z_point_type): New function.
652 (win32_insert_point, win32_remove_point): Adjust to new interface.
653 (win32_target_ops): Install win32_supports_z_point_type.
654 * win32-low.h (struct win32_target_ops):
655 <supports_z_point_type>: New method.
656 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
657 instead of a char. Also take a raw breakpoint pointer.
659 2014-05-20 Pedro Alves <palves@redhat.com>
661 * mem-break.h: Include break-common.h.
662 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
663 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
664 (Z_packet_to_target_hw_bp_type): New declaration.
665 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
666 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
667 (Z_PACKET_ACCESS_WP): Delete macros.
668 (Z_packet_to_hw_type): Delete function.
669 * i386-low.h: Don't include break-common.h here.
670 (Z_packet_to_hw_type): Delete declaration.
671 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
672 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
673 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
674 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
675 * linux-aarch64-low.c: Don't include break-common.h here.
676 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
677 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
678 (Z_packet_to_target_hw_bp_type): Delete function.
679 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
681 (mips_insert_point, mips_remove_point): Use
682 Z_packet_to_target_hw_bp_type.
684 2014-05-20 Pedro Alves <palves@redhat.com>
686 * linux-aarch64-low.c: Include break-common.h.
687 (enum target_point_type): Delete.
688 (Z_packet_to_point_type): Rename to ...
689 (Z_packet_to_target_hw_bp_type): ... this, and return a
690 target_hw_bp_type instead.
691 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
692 instead of an enum target_point_type.
693 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
695 (aarch64_dr_state_insert_one_point)
696 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
697 (aarch64_handle_aligned_watchpoint)
698 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
699 Take an enum target_hw_bp_type instead of an enum
701 (aarch64_supports_z_point_type): New function.
702 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
703 use Z_packet_to_target_hw_bp_type.
705 2014-05-20 Joel Brobecker <brobecker@adacore.com>
707 * configure.ac: Only use -Werror by default when DEVELOPMENT
709 * configure: Regenerate.
711 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
713 Fix gdbserver qGetTLSAddr for x86_64 -m32.
714 * linux-x86-low.c (X86_64_USER_REGS): New.
715 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
717 2014-04-28 Yao Qi <yao@codesourcery.com>
719 * Makefile.in (i386-avx512.c): Fix the typo of generated file
722 2014-04-25 Pedro Alves <palves@redhat.com>
725 * linux-low.c (linux_attach_fail_reason_string): New function.
726 (linux_attach_lwp): Delete.
727 (linux_attach_lwp_1): Rename to ...
728 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
729 argument. Remove "initial" parameter. Return int instead of
730 void. Don't error or warn here.
731 (linux_attach): Adjust to call linux_attach_lwp. Call error on
732 failure to attach to the tgid. Call warning when failing to
734 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
735 argument. Remove "initial" parameter. Return int instead of
736 void. Don't error or warn here.
737 (linux_attach_fail_reason_string): New declaration.
738 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
739 interface change. Use linux_attach_fail_reason_string.
741 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
742 Walfred Tedeschi <walfred.tedeschi@intel.com>
744 * Makefile.in: Added rules to handle new files
745 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
746 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
747 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
748 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
749 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
750 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
752 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
753 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
754 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
756 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
757 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
758 i386/x32-avx512-linux.xml.
759 * i387-fp.c (num_avx512_k_registers): New constant for number
761 (num_avx512_zmmh_low_registers): New constant for number of
762 lower ZMM registers (0-15).
763 (num_avx512_zmmh_high_registers): New constant for number of
764 higher ZMM registers (16-31).
765 (num_avx512_ymmh_registers): New contant for number of higher
766 YMM registers (ymm16-31 added by avx521 on x86_64).
767 (num_avx512_xmm_registers): New constant for number of higher
768 XMM registers (xmm16-31 added by AVX512 on x86_64).
769 (struct i387_xsave): Add space for AVX512 registers.
770 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
771 Add code to handle AVX512 registers.
772 (i387_xsave_to_cache): Add code to handle AVX512 registers.
773 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
774 prototypei from generated file.
775 (tdesc_amd64_avx512_linux): Likewise.
776 (init_registers_x32_avx512_linux): Likewise.
777 (tdesc_x32_avx512_linux): Likewise.
778 (init_registers_i386_avx512_linux): Likewise.
779 (tdesc_i386_avx512_linux): Likewise.
780 (x86_64_regmap): Add AVX512 registers.
781 (x86_linux_read_description): Add code to handle AVX512 XSTATE
783 (initialize_low_arch): Add code to initialize AVX512 registers.
785 2014-04-23 Pedro Alves <palves@redhat.com>
787 * mem-break.c (find_gdb_breakpoint_at): Make static.
788 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
790 2014-04-23 Pedro Alves <palves@redhat.com>
792 * i386-low.c: Don't include break-common.h here.
793 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
794 prototype to take target_hw_bp_type as argument instead of a Z
796 * i386-low.h: Include break-common.h here.
797 (Z_packet_to_hw_type): Declare.
798 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
800 * linux-x86-low.c (x86_insert_point): Convert the packet number to
801 a target_hw_bp_type before calling i386_low_insert_watchpoint.
802 (x86_remove_point): Convert the packet number to a
803 target_hw_bp_type before calling i386_low_remove_watchpoint.
804 * win32-i386-low.c (i386_insert_point): Convert the packet number
805 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
806 (i386_remove_point): Convert the packet number to a
807 target_hw_bp_type before calling i386_low_remove_watchpoint.
809 2014-04-23 Pedro Alves <palves@redhat.com>
811 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
813 2014-04-10 Pedro Alves <palves@redhat.com>
815 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
816 Check if the condition or command is NULL before checking if the
817 breakpoint is known. On success, return true.
818 * mem-break.h (add_breakpoint_condition): Document return.
819 (add_breakpoint_commands): Add describing comment.
820 * server.c (skip_to_semicolon): New function.
821 (process_point_options): Use it.
823 2014-04-09 Pedro Alves <palves@redhat.com>
825 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
828 2014-02-27 Pedro Alves <palves@redhat.com>
831 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
833 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
835 (last_thread_of_process_p): Take a PID argument instead of a
837 (linux_wait_for_lwp): Delete.
838 (num_lwps, check_zombie_leaders, not_stopped_callback): New
840 (linux_low_filter_event): New function, party factored out from
841 linux_wait_for_event.
842 (linux_wait_for_event): Rename to ...
843 (linux_wait_for_event_filtered): ... this. Add new filter ptid
844 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
845 sigsuspend. Check for zombie leaders.
846 (linux_wait_for_event): Reimplement as wrapper around
847 linux_wait_for_event_filtered.
848 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
849 a normal or signal exit is seen, it's the whole process exiting.
850 (wait_for_sigstop): No longer a for_each_inferior callback.
851 Rewrite on top of linux_wait_for_event_filtered.
852 (stop_all_lwps): Call wait_for_sigstop directly.
853 * server.c (resume, handle_target_event): Handle
854 TARGET_WAITKIND_NO_RESUMED.
856 2014-02-26 Joel Brobecker <brobecker@adacore.com>
858 * win32-low.c (psapi_get_dll_name,
859 * win32_CreateToolhelp32Snapshot): Delete.
860 (win32_CreateToolhelp32Snapshot, win32_Module32First)
861 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
863 (handle_load_dll): Add function description.
864 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
866 2014-02-26 Joel Brobecker <brobecker@adacore.com>
868 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
870 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
871 base address when calling win32_add_one_solib.
872 (handle_load_dll): Delete local variable load_addr.
873 Remove 0x1000 offset applied to DLL base address when calling
875 (handle_unload_dll): Add comment.
877 2014-02-26 Joel Brobecker <brobecker@adacore.com>
879 * win32-low.c (win32_add_all_dlls): Renames
880 win32_ensure_ntdll_loaded. Rewrite function documentation.
881 Adjust implementation to always load all DLLs.
882 Add 0x1000 offset to DLL base address when calling
884 (child_initialization_done): New static global.
885 (do_initial_child_stuff): Set child_initialization_done to
886 zero during child initialization, and 1 after. Replace call
887 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
889 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
890 (handle_unload_dll): Add function documentation.
891 (get_child_debug_event): Ignore load and unload DLL events
892 during child initialization.
894 2014-02-20 Doug Evans <dje@google.com>
896 Remove global all_lwps.
897 * inferiors.h (ptid_of): Move here from linux-low.h.
898 (pid_of, lwpid_of): Ditto.
899 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
900 parameter is a struct thread_info * now.
901 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
902 directly. Pass &all_threads to find_inferior instead of &all_lwps.
903 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
905 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
906 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
907 * linux-arm-low.c (update_registers_callback): Update, "entry"
908 parameter is a struct thread_info * now.
909 Fetch lwpid from current_inferior directly.
910 (arm_insert_point): Pass &all_threads to find_inferior instead of
912 (arm_remove_point): Ditto.
913 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
914 (arm_prepare_to_resume): Fetch pid from thread.
915 (arm_read_description): Fetch lwpid from current_inferior directly.
916 * linux-low.c (all_lwps): Delete.
917 (delete_lwp): Delete call to remove_inferior.
918 (handle_extended_wait): Fetch lwpid from thread.
919 (add_lwp): Don't set lwp->entry.id. Remove call to
920 add_inferior_to_list.
921 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
922 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
923 (kill_one_lwp_callback): Ditto.
924 (linux_kill): Don't dereference NULL pointer.
925 Fetch ptid,lwpid from thread.
926 (get_detach_signal): Fetch ptid from thread.
927 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
928 Simplify call to regcache_invalidate_thread.
929 (delete_lwp_callback): Update, "entry" parameter is a
930 struct thread_info * now. Fetch pid from thread.
931 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
932 (status_pending_p_callback): Update, "entry" parameter is a
933 struct thread_info * now. Fetch ptid from thread.
934 (find_lwp_pid): Update, "entry" parameter is a
935 struct thread_info * now.
936 (linux_wait_for_lwp): Fetch pid from thread.
937 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
938 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
939 (enqueue_one_deferred_signal): Fetch lwpid from thread.
940 (dequeue_one_deferred_signal): Ditto.
941 (cancel_breakpoint): Fetch ptid from current_inferior.
942 (linux_wait_for_event): Pass &all_threads to find_inferior,
943 not &all_lwps. Fetch ptid, lwpid from thread.
944 (count_events_callback): Update, "entry" parameter is a
945 struct thread_info * now.
946 (select_singlestep_lwp_callback): Ditto.
947 (select_event_lwp_callback): Ditto.
948 (cancel_breakpoints_callback): Ditto.
949 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
951 (select_event_lwp): Ditto. Fetch ptid from event_thread.
952 (unsuspend_one_lwp): Update, "entry" parameter is a
953 struct thread_info * now.
954 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
956 (linux_stabilize_threads): Ditto. And for for_each_inferior.
957 Fetch lwpid from thread, not lwp.
958 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
959 Pass &all_threads to find_inferior, not &all_lwps.
960 (send_sigstop): Fetch lwpid from thread, not lwp.
961 (send_sigstop_callback): Update, "entry" parameter is a
962 struct thread_info * now.
963 (suspend_and_send_sigstop_callback): Ditto.
964 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
965 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
966 struct thread_info * now.
967 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
969 (lwp_running): Update, "entry" parameter is a
970 struct thread_info * now.
971 (stop_all_lwps): Fetch ptid from thread.
972 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
973 (linux_resume_one_lwp): Fetch lwpid from thread.
974 (linux_set_resume_request): Update, "entry" parameter is a
975 struct thread_info * now. Fetch pid, lwpid from thread.
976 (resume_status_pending_p): Update, "entry" parameter is a
977 struct thread_info * now.
978 (need_step_over_p): Ditto. Fetch lwpid from thread.
979 (start_step_over): Fetch lwpid from thread.
980 (linux_resume_one_thread): Update, "entry" parameter is a
981 struct thread_info * now. Fetch lwpid from thread.
982 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
983 (proceed_one_lwp): Update, "entry" parameter is a
984 struct thread_info * now. Fetch lwpid from thread.
985 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
986 struct thread_info * now.
987 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
988 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
989 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
991 (regsets_store_inferior_registers): Ditto.
992 (fetch_register, store_register): Ditto.
993 (linux_read_memory, linux_write_memory): Ditto.
994 (linux_request_interrupt): Ditto.
995 (linux_read_auxv): Ditto.
996 (linux_xfer_siginfo): Ditto.
997 (linux_qxfer_spu): Ditto.
998 (linux_qxfer_libraries_svr4): Ditto.
999 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1000 moved to inferiors.h.
1002 (get_thread_lwp): Update.
1003 (struct lwp_info): Delete member "entry". Simplify comment for
1006 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1007 current_inferior directly.
1008 (update_watch_registers_callback): Update, "entry" parameter is a
1009 struct thread_info * now. Fetch pid from thread.
1010 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1011 (mips_insert_point): Fetch lwpid from current_inferior.
1012 Pass &all_threads to find_inferior, not &all_lwps.
1013 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1014 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1016 (mips_stopped_data_address): Ditto.
1017 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1019 * linux-tile-low.c (tile_arch_setup): Ditto.
1020 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1021 (update_debug_registers_callback): Update, "entry" parameter is a
1022 struct thread_info * now. Fetch pid from thread.
1023 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1024 Pass &all_threads to find_inferior, not &all_lwps.
1025 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1026 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1027 Pass &all_threads to find_inferior, not &all_lwps.
1028 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1029 (i386_dr_low_get_status): Ditto.
1030 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1031 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1032 (x86_linux_read_description): Ditto.
1033 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1035 2014-02-20 Doug Evans <dje@google.com>
1037 * inferiors.c (get_first_inferior): Fix buglet.
1039 2014-02-19 Doug Evans <dje@google.com>
1041 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1042 * inferiors.c (add_thread): Change result type to struct thread_info *.
1043 All callers updated.
1044 (add_lwp): Call add_thread here instead of in callers.
1045 All callers updated.
1046 * linux-low.h (get_lwp_thread): Rewrite.
1047 (struct lwp_info): New member "thread".
1049 2014-02-19 Doug Evans <dje@google.com>
1051 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1052 All callers updated.
1054 2014-02-19 Doug Evans <dje@google.com>
1056 * inferiors.c (add_thread): Fix whitespace.
1058 2014-02-19 Doug Evans <dje@google.com>
1060 * dll.c (clear_dlls): Replace accessing list implemention details
1062 * gdbthread.h (get_first_thread): Declare.
1063 * inferiors.c (for_each_inferior_with_data): New function.
1064 (get_first_thread): New function.
1065 (find_thread_ptid): Simplify.
1066 (get_first_inferior): New function.
1067 (clear_list): Delete.
1068 (one_inferior_p): New function.
1069 (clear_inferior_list): New function.
1070 (clear_inferiors): Update.
1071 * inferiors.h (for_each_inferior_with_data): Declare.
1072 (clear_inferior_list): Declare.
1073 (one_inferior_p): Declare.
1074 (get_first_inferior): Declare.
1075 * linux-low.c (linux_wait_for_event): Replace accessing list
1076 implemention details with API function.
1077 * server.c (target_running): Ditto.
1078 (accumulate_file_name_length): New function.
1079 (emit_dll_description): New function.
1080 (handle_qxfer_libraries): Replace accessing list implemention
1081 details with API function.
1082 (handle_qxfer_threads_worker): New function.
1083 (handle_qxfer_threads_proper): Replace accessing list implemention
1084 details with API function.
1085 (handle_query): Ditto.
1086 (visit_actioned_threads_callback_ftype): New typedef.
1087 (visit_actioned_threads_data): New struct.
1088 (visit_actioned_threads): Rewrite to be find_inferior callback.
1089 (resume): Call find_inferior.
1090 (handle_status): Replace accessing list implemention
1091 details with API function.
1092 (process_serial_event): Replace accessing list implemention details
1094 * target.c (set_desired_inferior): Replace accessing list implemention
1095 details with API function.
1096 * tracepoint.c (same_process_p): New function.
1097 (gdb_agent_about_to_close): Replace accessing list implemention
1098 details with API function.
1099 * win32-low.c (child_delete_thread): Replace accessing list
1100 implemention details with API function.
1101 (match_dll_by_basename): New function.
1102 (dll_is_loaded_by_basename): New function.
1103 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1104 details call to dll_is_loaded_by_basename.
1106 2014-02-19 Doug Evans <dje@google.com>
1108 * dll.h (struct dll_info): Add comment.
1109 * gdbthread.h (struct thread_info): Add comment.
1110 (current_ptid): Simplify.
1111 * inferiors.c (add_process): Update.
1112 (remove_process): Update.
1113 * inferiors.h (struct process_info): Rename member "head" to "entry".
1114 * linux-low.c (delete_lwp): Update.
1116 (last_thread_of_process_p): Update.
1117 (kill_one_lwp_callback, linux_kill): Update.
1118 (status_pending_p_callback): Update.
1119 (wait_for_sigstop): Update. Simplify read of ptid.
1120 (start_step_over): Update.
1121 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1122 (get_lwp_thread): Update.
1123 (struct lwp_info): Rename member "head" to "entry".
1124 * regcache.h (inferior_list_entry): Delete.
1125 * server.c (kill_inferior_callback): Update.
1126 (detach_or_kill_inferior_callback): Update.
1127 (print_started_pid): Update.
1128 (print_attached_pid): Update.
1129 (process_serial_event): Simplify read of ptid.
1130 * thread-db.c (thread_db_create_event): Update.
1131 (thread_db_get_tls_address): Update.
1132 * win32-low.c (current_inferior_ptid): Simplify.
1134 2014-02-19 Tom Tromey <tromey@redhat.com>
1136 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1138 (target_supports_btrace): Update.
1140 2014-02-14 Yao Qi <yao@codesourcery.com>
1142 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1143 (rsp-low-ipa.o): New target.
1145 2014-02-12 Tom Tromey <tromey@redhat.com>
1147 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1148 convert_ascii_to_int.
1149 * regcache.c (registers_to_string): Likewise.
1150 * remote-utils.c (decode_M_packet): Likewise.
1151 * server.c (process_serial_event): Likewise.
1153 2014-02-12 Tom Tromey <tromey@redhat.com>
1155 * server.c (handle_query, handle_v_run): Use hex2bin, not
1157 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1159 2014-02-12 Tom Tromey <tromey@redhat.com>
1161 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1162 convert_int_to_ascii.
1163 * regcache.c (registers_to_string, collect_register_as_string):
1165 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1167 * server.c (process_serial_event): Likewise.
1168 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1169 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1171 2014-02-12 Tom Tromey <tromey@redhat.com>
1173 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1174 bin2hex, not hexify.
1175 * tracepoint.c (cmd_qtstatus): Likewise.
1177 2014-02-12 Tom Tromey <tromey@redhat.com>
1179 * remote-utils.c (monitor_output): Pass explicit length to
1182 2014-02-12 Tom Tromey <tromey@redhat.com>
1184 * tracepoint.c: Include rsp-low.h.
1185 * server.c: Include rsp-low.h.
1186 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1187 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1189 * remote-utils.c: Include rsp-low.h.
1190 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1191 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1192 (convert_int_to_ascii, convert_ascii_to_int): Move to
1194 * regcache.c: Include rsp-low.h.
1195 * ax.c: Include rsp-low.h.
1196 * Makefile.in (SFILES): Add common/rsp-low.c.
1197 (OBS): Add rsp-low.o.
1198 (rsp-low.o): New target.
1200 2014-02-12 Tom Tromey <tromey@redhat.com>
1202 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1203 Include print-utils.h.
1204 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1205 (plongest, thirty_two, phex_nz): Remove.
1206 * Makefile.in (SFILES): Add common/print-utils.c.
1207 (OBS): Add print-utils.o.
1208 (print-utils-ipa.o): New target.
1209 (print-utils.o): New target.
1210 (IPA_OBJS): Add print-utils-ipa.o.
1212 2014-02-06 Tom Tromey <tromey@redhat.com>
1214 * Makefile.in (SFILES): Fix indentation.
1216 2014-02-05 Doug Evans <dje@google.com>
1218 * linux-low.c (linux_wait_for_event): Improve comment.
1219 (linux_wait_1): Keep current_inferior in sync with event_child.
1221 2014-01-22 Doug Evans <dje@google.com>
1223 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1225 2014-01-22 Doug Evans <dje@google.com>
1227 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1228 * configure: Regenerate.
1229 * config.in: Regenerate.
1230 * Makefile.in (SFILES): Add debug.c.
1232 * debug.c: New file.
1233 * debug.h: New file.
1234 * linux-aarch64-low.c (*): Update all debugging printfs to use
1235 debug_printf instead of fprintf.
1236 * linux-arm-low.c (*): Ditto.
1237 * linux-cris-low.c (*): Ditto.
1238 * linux-crisv32-low.c (*): Ditto.
1239 * linux-m32r-low.c (*): Ditto.
1240 * linux-sparc-low.c (*): Ditto.
1241 * linux-x86.c (*): Ditto.
1242 * linux-low.c (*): Ditto.
1243 (linux_wait_1): Add calls to debug_enter, debug_exit.
1244 (linux_wait): Remove redundant debugging printf.
1245 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1246 (linux_resume, unstop_all_lwps): Ditto.
1247 * mem-break.c (*): Update all debugging printfs to use
1248 debug_printf instead of fprintf.
1249 * remote-utils.c (*): Ditto.
1250 * thread-db.c (*): Ditto.
1251 * server.c #include <ctype.h>, "gdb_vecs.h".
1252 (debug_threads): Moved to debug.c.
1253 (*): Update all debugging printfs to use debug_printf instead of
1255 (start_inferior): Replace call to fflush with call to debug_flush.
1256 (monitor_show_help): Mention set debug-format.
1257 (parse_debug_format_options): New function.
1258 (handle_monitor_command): Handle "monitor set debug-format".
1259 (gdbserver_usage): Mention --debug-format.
1260 (main): Parse --debug-format.
1261 * server.h (debug_threads): Declaration moved to debug.h.
1263 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1264 trace_debug_1 that uses debug_printf.
1265 (tracepoint_look_up_symbols): Update all debugging printfs to use
1266 debug_printf instead of fprintf.
1268 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1270 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1273 2014-01-17 Pedro Alves <palves@redhat.com>
1276 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1277 defined after including gdb_proc_service.h.
1279 2014-01-16 Doug Evans <dje@google.com>
1281 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1282 (match_dll): Use it.
1284 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1286 * target.h (target_ops) <read_btrace>: Change parameters and
1287 return type to allow error reporting.
1288 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1289 trace reading errors on.
1290 * linux-low.c (linux_low_read_btrace): Pass trace reading
1292 (linux_low_disable_btrace): New.
1294 2014-01-15 Doug Evans <dje@google.com>
1296 * inferiors.c (thread_id_to_gdb_id): Delete.
1297 * inferiors.h (thread_id_to_gdb_id): Delete.
1299 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1301 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1302 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1305 2014-01-08 Pedro Alves <palves@redhat.com>
1307 * server.c (handle_status): Don't discard previous queued stop
1308 replies or thread's pending status here.
1309 (main) <disconnection>: Do it here instead.
1311 2014-01-08 Pedro Alves <palves@redhat.com>
1313 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1314 * server.c (visit_actioned_threads, handle_pending_status): New
1316 (handle_v_cont): Factor out parts to ...
1317 (resume): ... this new function. If in all-stop, and a thread
1318 being resumed has a pending status, report it without actually
1320 (myresume): Adjust to use the new 'resume' function.
1321 (clear_pending_status_callback, set_pending_status_callback)
1322 (find_status_pending_thread_callback): New functions.
1323 (handle_status): Handle the case of multiple threads having
1324 interesting statuses to report. Report threads' real last signal
1325 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1326 with an interesting thread to report the status for, instead of
1327 always reporting the status of the first thread.
1329 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1331 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1332 * gdbreplay.c (gdbreplay_version): Likewise.
1334 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1336 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1337 iov.iov_len with the real length in use.
1339 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1341 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1342 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1343 for all targets that use win32-low.c.
1344 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1345 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1347 2013-12-13 Pedro Alves <palves@redhat.com>
1349 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1350 if equal to TARGET_WAITKIND_LOADED.
1351 * win32-low.c (cached_status): New static global.
1352 (win32_wait): Add declaration.
1353 (do_initial_child_stuff): Flush all initial pending debug events
1354 up to the initial breakpoint.
1355 (win32_wait): If CACHED_STATUS was set, return that instead
1356 of doing a real wait. Remove the code resuming the execution
1357 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1358 during the initial phase. Also remove the code changing
1359 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1360 TARGET_WAITKIND_STOPPED.
1362 2013-12-11 Yao Qi <yao@codesourcery.com>
1364 * notif.c (handle_notif_ack): Return 0 if no notification
1367 2013-11-20 Doug Evans <dje@google.com>
1369 * linux-low.c (linux_set_resume_request): Fix comment.
1371 2013-11-20 Doug Evans <dje@google.com>
1373 * linux-low.c (resume_status_pending_p): Tweak comment.
1375 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1377 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1378 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1379 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1380 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1381 (srv_amd64_regobj): Add amd64-mpx.o.
1382 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1383 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1384 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1385 * i387-fp.c (num_pl_bnd_register) Added constant.
1386 (num_pl_bnd_cfg_registers) Added constant.
1387 (struct i387_xsave) Added reserved area and MPX fields.
1388 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1389 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1391 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1392 (init_registers_amd64_mpx_linux): Declare new function.
1393 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1394 (x86_64_regmap): Add MPX registers.
1395 (x86_linux_read_description): Add MPX case.
1396 (initialize_low_arch): Initialize MPX targets.
1398 2013-11-18 Tom Tromey <tromey@redhat.com>
1400 * configure: Rebuild.
1401 * configure.ac: Don't check for stdlib.h.
1402 * gdbreplay.c: Unconditionally include stdlib.h.
1404 2013-11-18 Tom Tromey <tromey@redhat.com>
1406 * config.in: Rebuild.
1407 * configure: Rebuild.
1408 * configure.ac: Don't use AC_HEADER_DIRENT.
1410 2013-11-18 Tom Tromey <tromey@redhat.com>
1412 * server.h: Don't check HAVE_STRING_H.
1413 * gdbreplay.c: Don't check HAVE_STRING_H.
1414 * configure: Rebuild.
1416 2013-11-18 Tom Tromey <tromey@redhat.com>
1418 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1421 2013-11-08 Tom Tromey <tromey@redhat.com>
1423 * configure, config.in: Rebuild.
1424 * configure.ac: Remove unused configury.
1426 2013-11-08 Tom Tromey <tromey@redhat.com>
1428 * acinclude.m4: Include common.m4, codeset.m4.
1429 * configure, config.in: Rebuild.
1430 * configure.ac: Use GDB_AC_COMMON.
1432 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1434 * linux-s390-low.c (HWCAP_S390_TE): New define.
1435 (s390_arch_setup): Consider the TE field in the HWCAP for
1436 determining 'have_regset_tdb'.
1438 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1441 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1444 2013-10-02 Pedro Alves <palves@redhat.com>
1446 * server.c (process_serial_event): Don't output "GDBserver
1447 exiting" if GDB is connected through stdio.
1448 * target.c (mywait): Likewise, be silent if GDB is connected
1451 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1453 * lynx-low.c (lynx_add_threads_after_attach): New function.
1454 (lynx_attach): Remove call to add_thread. Add call to
1455 lynx_add_threads_after_attach instead.
1457 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1459 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1460 * config.in, configure: Regenerated.
1462 2013-09-18 Yao Qi <yao@codesourcery.com>
1465 * server.c (start_inferior): Clear 'resume_info'.
1467 2013-09-16 Jiong Wang <jiwang@tilera.com>
1469 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1472 2013-09-16 Jiong Wang <jiwang@tilera.com>
1474 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1475 linux-tile-low.o to srv_tgtobj.
1477 2013-09-16 Will Newton <will.newton@linaro.org>
1479 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1482 2013-09-06 Pedro Alves <palves@redhat.com>
1484 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1485 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1486 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1487 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1488 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1489 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1491 2013-09-06 Pedro Alves <palves@redhat.com>
1493 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1494 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1496 2013-09-06 Pedro Alves <palves@redhat.com>
1498 * linux-amd64-ipa.c: Include tracepoint.h.
1499 * linux-i386-ipa.c: Include tracepoint.h.
1501 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1503 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1504 (ps_get_thread_area): New function.
1506 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1508 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1509 (initialize_low_arch): Call init_registers_crisv32 rather than
1510 init_register_crisv32.
1512 2013-09-05 Pedro Alves <palves@redhat.com>
1514 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1516 * hostio.h: ... this new file.
1517 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1518 win32-low.c: Include hostio.h.
1520 2013-09-05 Pedro Alves <palves@redhat.com>
1522 * server.h (gdb_client_data, handler_func, callback_handler_func)
1523 (delete_file_handler, add_file_handler, append_callback_event)
1524 (delete_callback_event, start_event_loop, initialize_event_loop):
1525 Move to event-loop.h and include it.
1526 * event-loop.h: New file.
1528 2013-09-05 Pedro Alves <palves@redhat.com>
1530 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1531 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1532 (loaded_dll, unloaded_dll): Move to ...
1533 * dll.h: ... this new file.
1534 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1536 2013-09-05 Pedro Alves <palves@redhat.com>
1538 * server.h (current_process, get_thread_process, all_processes)
1539 (add_inferior_to_list, for_each_inferior, current_inferior)
1540 (remove_inferior, add_process, remove_process, find_process_pid)
1541 (have_started_inferiors_p, have_attached_inferiors_p)
1542 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1543 (clear_inferiors, find_inferior, find_inferior_id)
1544 (inferior_target_data, set_inferior_target_data)
1545 (inferior_regcache_data, set_inferior_regcache_data): Move to
1546 inferiors.h, and include it.
1547 * inferiors.h: New file.
1549 2013-09-05 Pedro Alves <palves@redhat.com>
1551 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1555 2013-09-05 Pedro Alves <palves@redhat.com>
1557 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1559 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1560 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1561 (handle_tracepoint_general_set, handle_tracepoint_query)
1562 (tracepoint_finished_step, tracepoint_was_hit)
1563 (release_while_stepping_state_list, current_traceframe)
1564 (in_readonly_region, traceframe_read_mem)
1565 (fetch_traceframe_registers, traceframe_read_sdata)
1566 (traceframe_read_info, struct fast_tpoint_collect_status)
1567 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1568 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1569 (supply_fast_tracepoint_registers)
1570 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1571 (ipa_tdesc, claim_trampoline_space)
1572 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1573 (agent_mem_read, agent_get_trace_state_variable_value)
1574 (agent_set_trace_state_variable_value, agent_tsv_read)
1575 (agent_mem_read_string, get_raw_reg_func_addr)
1576 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1577 * tracepoint.h: ... this new file.
1579 2013-09-05 Pedro Alves <palves@redhat.com>
1581 * server.h (perror_with_name, error, fatal, warning, paddress)
1582 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1584 * utils.h: New file.
1586 2013-09-05 Pedro Alves <palves@redhat.com>
1588 * server.h (remote_debug, noack_mode, transport_is_reliable)
1589 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1590 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1591 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1592 (write_enn, initialize_async_io, enable_async_io)
1593 (disable_async_io, check_remote_input_interrupt_request)
1594 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1595 (dead_thread_notify, prepare_resume_reply)
1596 (decode_address_to_semicolon, decode_address, decode_m_packet)
1597 (decode_M_packet, decode_X_packet, decode_xfer_write)
1598 (decode_search_memory_packet, unhexify, hexify)
1599 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1600 (look_up_one_symbol, relocate_instruction)
1601 (monitor_output): Move to remote-utils.h, and include it.
1602 * remote-utils.h: New file.
1604 2013-09-05 Pedro Alves <palves@redhat.com>
1606 * server.h (_): Delete.
1608 2013-09-02 Pedro Alves <palves@redhat.com>
1610 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1611 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1613 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1615 2013-09-02 Pierre Muller <muller@sourceware.org>
1617 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1618 or WriteProcessMemory complete successfully and handle
1619 ERROR_PARTIAL_COPY error.
1621 2013-09-02 Pedro Alves <palves@redhat.com>
1623 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1624 error instead of EIO.
1626 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1629 * linux-low.c: Include filestuff.h.
1630 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1631 * lynx-low.c: Include filestuff.h.
1632 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1633 * server.c: Include filestuff.h.
1634 (main): Call notice_open_fds.
1635 * spu-low.c: Include filestuff.h.
1636 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1638 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1640 * Makefile.in: Explain why ../target and ../nat are not
1641 listed as include file search paths.
1642 (linux-waitpid.o): New object file rule.
1643 * configure.srv (srv_native_linux_obj): New variable.
1644 Replace all occurrences of linux native object files with
1645 $srv_native_linux_obj.
1646 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1647 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1648 (linux_enable_event_reporting): Remove declaration.
1649 (my_waitpid): Moved to common/linux-waitpid.c.
1650 (linux_wait_for_event): Pass ptid when calling
1651 linux_enable_event_reporting.
1652 (linux_supports_tracefork_flag): Remove.
1653 (linux_enable_event_reporting): Likewise.
1654 (linux_tracefork_grandchild): Remove.
1655 (STACK_SIZE): Moved to common/linux-ptrace.c.
1656 (linux_tracefork_child): Remove.
1657 (linux_test_for_tracefork): Remove.
1658 (linux_look_up_symbols): Call linux_supports_traceclone.
1659 (initialize_low): Remove call to linux_test_for_tracefork.
1660 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1661 common/linux-ptrace.h.
1662 (PTRACE_TYPE_ARG4): Likewise.
1663 Include linux-ptrace.h.
1665 2013-08-21 Pedro Alves <palves@redhat.com>
1667 * config.in: Renegerate.
1669 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1671 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1672 (SFILES): Remove $(srcdir)/common/target-common.c and
1673 add $(srcdir)/target/waitstatus.c.
1674 (OBS): Remove target-common.o and add waitstatus.o.
1675 (server_h): Remove $(srcdir)/../common/target-common.h and
1676 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1677 and $(srcdir)/../target/waitstatus.h.
1678 (target-common.o): Remove.
1679 (waitstatus.o): New target object file.
1680 * target.h: Do not include target-common.h and
1681 include target/resume.h, target/wait.h and
1682 target/waitstatus.h.
1684 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1686 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1687 to PTRACE_TYPE_ARG3.
1688 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1689 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1691 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1692 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1694 2013-07-27 Jie Zhang <jie@codesourcery.com>
1695 Daniel Jacobowitz <dan@codesourcery.com>
1696 Yao Qi <yao@codesourcery.com>
1698 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1699 (mips-linux-watch.o): New rule.
1700 (mips_linux_watch_h): New variable.
1701 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1703 * linux-mips-low.c: Include mips-linux-watch.h.
1704 (struct arch_process_info, struct arch_lwp_info): New.
1705 (update_watch_registers_callback): New function.
1706 (mips_linux_new_process, mips_linux_new_thread) New functions.
1707 (mips_linux_prepare_to_resume, mips_insert_point): New
1709 (mips_remove_point, mips_stopped_by_watchpoint): New
1711 (rsp_bp_type_to_target_hw_bp_type): New function.
1712 (mips_stopped_data_address): New function.
1713 (the_low_target): Add watchpoint support functions.
1715 2013-07-27 Yao Qi <yao@codesourcery.com>
1717 * i386-low.c: Include break-common.h.
1718 (enum target_hw_bp_type): Remove.
1720 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1722 * Makefile.in (SFILES): /common/target-common.c.
1723 (OBS): Add target-common.o.
1724 (server_h): Add $(srcdir)/../common/target-common.h.
1725 (target-common.o): New target.
1726 * server.c (queue_stop_reply_callback): Free
1727 status string after use.
1728 * target.c (target_waitstatus_to_string): Remove.
1729 * target.h: Include target-common.h.
1730 (resume_kind): Likewise.
1731 (target_waitkind): Likewise.
1732 (target_waitstatus): Likewise.
1733 (TARGET_WNOHANG): Likewise.
1735 2013-07-04 Yao Qi <yao@codesourcery.com>
1737 * Makefile.in (host_alias): Use @host_noncanonical@.
1738 (target_alias): Use @target_noncanonical@.
1739 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1740 ACX_NONCANONICAL_HOST.
1741 * configure: Regenerated.
1744 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1746 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1747 * configure: Rebuild.
1748 * Makefile.in (version_host, version_target): Get from configure.
1749 (version.c): Use $(version_host) and $(version_target).
1751 2013-07-03 Pedro Alves <palves@redhat.com>
1753 * Makefile.in (config.status): Depend on development.sh.
1754 * acinclude.m4: Include libmcheck.m4.
1755 * configure: Regenerate.
1757 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1759 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1760 attribute inside the parentheses.
1761 (winapi_DebugSetProcessKillOnExit): Ditto.
1762 (winapi_DebugBreakProcess): Ditto.
1763 (winapi_GenerateConsoleCtrlEvent): Ditto.
1765 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1767 * notif.h (notif_event): Add a dummy member to avoid compiler
1770 2013-07-01 Pedro Alves <palves@redhat.com>
1772 * hostio.c (HOSTIO_PATH_MAX): Define.
1773 (require_filename, handle_open, handle_unlink, handle_readlink):
1776 2013-07-01 Pedro Alves <palves@redhat.com>
1778 * server.h: Include "pathmax.h".
1779 * linux-low.c: Don't include sys/param.h.
1780 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1782 * win32-low.c: Don't include sys/param.h.
1783 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1785 2013-07-01 Pedro Alves <palves@redhat.com>
1787 * event-loop.c: Don't check HAVE_UNISTD_H before including
1789 * gdbreplay.c: Likewise.
1790 * remote-utils.c: Likewise.
1791 * server.c: Likewise.
1792 * configure.ac: Don't check for unistd.h.
1793 * configure: Regenerate.
1795 2013-06-28 Tom Tromey <tromey@redhat.com>
1797 * Makefile.in (version.c): Use version.in, not
1800 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1802 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1803 * configure: Rebuild.
1804 * Makefile.in (version_host, version_target): Get from configure.
1805 (version.c): Use $(version_host) and $(version_target).
1807 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1809 Fix trace-status to output user name without trailing colon.
1810 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1812 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1814 Fix trace-status to output proper start-time and stop-time.
1815 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1816 output start time and stop time in hex as gdb expects.
1818 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1820 * tracepoint.c (build_traceframe_info_xml): Output trace state
1821 variables present in the trace buffer.
1823 2013-06-24 Tom Tromey <tromey@redhat.com>
1825 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1827 (version.o): Remove.
1828 * gdbreplay.c: Include version.h.
1829 (version, host_name): Don't declare.
1830 * server.h: Include version.h.
1831 (version, host_name): Don't declare.
1833 2013-06-12 Pedro Alves <palves@redhat.com>
1835 * linux-x86-low.c (linux_is_elf64): Delete global.
1836 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1837 with local linux_pid_exe_is_elf_64_file use.
1839 2013-06-11 Pedro Alves <palves@redhat.com>
1841 * linux-low.c (regset_disabled, disable_regset): New functions.
1842 (regsets_fetch_inferior_registers)
1843 (regsets_store_inferior_registers): Use them.
1844 (initialize_regsets_info); Don't allocate the disabled_regsets
1846 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1849 2013-06-11 Pedro Alves <palves@redhat.com>
1851 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1854 2013-06-11 Pedro Alves <palves@redhat.com>
1856 * linux-x86-low.c (initialize_low_arch): Call
1857 init_registers_x32_avx_linux.
1859 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1861 Fix compatibility with Android Bionic.
1862 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1865 2013-06-07 Pedro Alves <palves@redhat.com>
1868 * Makefile.in (OBS): Add tdesc.o.
1869 (IPA_OBJS): Add tdesc-ipa.o.
1870 (tdesc-ipa.o): New rule.
1871 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1873 * linux-low.c (new_inferior): Delete.
1874 (disabled_regsets, num_regsets): Delete.
1875 (linux_add_process): Adjust to set the new per-process
1877 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1878 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1879 was a stop. When calling arch_setup, switch the current inferior
1880 to the thread that got an event.
1881 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1882 (regsets_fetch_inferior_registers)
1883 (regsets_store_inferior_registers): New regsets_info parameter.
1885 (linux_register_in_regsets): New regs_info parameter. Adjust to
1887 (register_addr, fetch_register, store_register): New usrregs_info
1888 parameter. Adjust to use it.
1889 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1890 parameter regs_info. Adjust to use it.
1891 (linux_fetch_registers): Get the current inferior's regs_info, and
1893 (linux_store_registers): Ditto.
1894 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1895 (initialize_low): Don't initialize the target_regsets here. Call
1896 initialize_low_arch.
1897 * linux-low.h (target_regsets): Delete declaration.
1898 (struct regsets_info): New.
1899 (struct usrregs_info): New.
1900 (struct regs_info): New.
1901 (struct process_info_private) <new_inferior>: New field.
1902 (struct linux_target_ops): Delete the num_regs, regmap, and
1903 regset_bitmap fields. New field regs_info.
1904 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1905 * i387-fp.c (num_xmm_registers): Delete.
1906 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1907 calls to new interface.
1908 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1909 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1910 Infer the number of xmm registers from the regcache's target
1912 * i387-fp.h (num_xmm_registers): Delete.
1913 * inferiors.c (add_thread): Don't install the thread's regcache
1915 * proc-service.c (gregset_info): Fetch the current inferior's
1916 regs_info. Adjust to use it.
1917 * regcache.c: Include tdesc.h.
1918 (register_bytes, reg_defs, num_registers)
1919 (gdbserver_expedite_regs): Delete.
1920 (get_thread_regcache): If the thread doesn't have a regcache yet,
1921 create one, instead of aborting gdbserver.
1922 (regcache_invalidate_one): Rename to ...
1923 (regcache_invalidate_thread): ... this.
1924 (regcache_invalidate_one): New.
1925 (regcache_invalidate): Only invalidate registers of the current
1927 (init_register_cache): Add target_desc parameter, and use it.
1928 (new_register_cache): Ditto. Assert the target description has a
1929 non zero registers_size.
1930 (regcache_cpy): Add assertions. Adjust.
1931 (realloc_register_cache, set_register_cache): Delete.
1932 (registers_to_string, registers_from_string): Adjust.
1933 (find_register_by_name, find_regno, find_register_by_number)
1934 (register_cache_size): Add target_desc parameter, and use it.
1935 (free_register_cache_thread, free_register_cache_thread_one)
1936 (regcache_release, register_cache_size): New.
1937 (register_size): Add target_desc parameter, and use it.
1938 (register_data, supply_register, supply_register_zeroed)
1939 (supply_regblock, supply_register_by_name, collect_register)
1940 (collect_register_as_string, collect_register_by_name): Adjust.
1941 * regcache.h (struct target_desc): Forward declare.
1942 (struct regcache) <tdesc>: New field.
1943 (init_register_cache, new_register_cache): Add target_desc
1945 (regcache_invalidate_thread): Declare.
1946 (regcache_invalidate_one): Delete declaration.
1947 (regcache_release): Declare.
1948 (find_register_by_number, register_cache_size, register_size)
1949 (find_regno): Add target_desc parameter.
1950 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1952 * remote-utils.c: Include tdesc.h.
1953 (outreg, prepare_resume_reply): Adjust.
1954 * server.c: Include tdesc.h.
1955 (gdbserver_xmltarget): Delete declaration.
1956 (get_features_xml, process_serial_event): Adjust.
1957 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
1959 (struct process_info) <tdesc>: New field.
1960 (ipa_tdesc): Declare.
1961 * tdesc.c: New file.
1962 * tdesc.h: New file.
1963 * tracepoint.c: Include tdesc.h.
1964 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
1965 (get_context_regcache): Adjust to pass ipa_tdesc down.
1966 (do_action_at_tracepoint): Adjust to get the register cache size
1967 from the context regcache's description.
1968 (traceframe_walk_blocks): Adjust to get the register cache size
1969 from the current trace frame's description.
1970 (traceframe_get_pc): Adjust to get current trace frame's
1971 description and pass it down.
1972 (gdb_collect): Adjust to get the register cache size from the
1974 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
1975 (gdbserver_xmltarget): Delete.
1976 (initialize_low_tracepoint): Set the ipa's target description.
1977 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
1978 (initialize_low_tracepoint): Set the ipa's target description.
1979 * linux-x86-low.c: Include tdesc.h.
1980 [__x86_64__] (is_64bit_tdesc): New.
1981 (ps_get_thread_area, x86_get_thread_area): Use it.
1982 (i386_cannot_store_register): Rename to ...
1983 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
1984 (i386_cannot_fetch_register): Rename to ...
1985 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
1986 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
1988 (target_regsets): Rename to ...
1989 (x86_regsets): ... this.
1990 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
1992 (x86_siginfo_fixup): Use is_64bit_tdesc.
1993 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
1994 (tdesc_x32_avx_linux, tdesc_x32_linux)
1995 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
1997 (x86_linux_update_xmltarget): Delete.
1998 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
1999 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2000 (AMD64_LINUX_USER64_CS): New.
2001 (x86_linux_read_description): New, based on
2002 x86_linux_update_xmltarget.
2003 (same_process_callback): New.
2004 (x86_arch_setup_process_callback): New.
2005 (x86_linux_update_xmltarget): New.
2006 (x86_regsets_info): New.
2007 (amd64_linux_regs_info): New.
2008 (i386_linux_usrregs_info): New.
2009 (i386_linux_regs_info): New.
2010 (x86_linux_regs_info): New.
2011 (x86_arch_setup): Reimplement.
2012 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2013 (x86_emit_ops): Ditto.
2014 (the_low_target): Adjust. Install x86_linux_regs_info,
2015 x86_cannot_fetch_register, and x86_cannot_store_register.
2016 (initialize_low_arch): New.
2017 * linux-ia64-low.c (tdesc_ia64): Declare.
2018 (ia64_fetch_register): Adjust.
2019 (ia64_usrregs_info, regs_info): New globals.
2020 (ia64_regs_info): New function.
2021 (the_low_target): Adjust.
2022 (initialize_low_arch): New function.
2023 * linux-sparc-low.c (tdesc_sparc64): Declare.
2024 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2026 (sparc_arch_setup): New function.
2027 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2028 (the_low_target): Adjust.
2029 (initialize_low_arch): New function.
2030 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2031 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2032 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2033 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2034 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2035 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2036 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2037 (tdesc_powerpc_isa205_vsx64l): Declare.
2038 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2039 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2040 (ppc_set_pc, ppc_get_hwcap): Adjust.
2041 (ppc_usrregs_info): Forward declare.
2042 (!__powerpc64__) ppc_regmap_adjusted: New global.
2043 (ppc_arch_setup): Adjust to the current process'es target
2045 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2046 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2047 (ppc_store_evrregset): Adjust.
2048 (target_regsets): Rename to ...
2049 (ppc_regsets): ... this, and make static.
2050 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2051 (ppc_regs_info): New function.
2052 (the_low_target): Adjust.
2053 (initialize_low_arch): New function.
2054 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2055 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2056 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2057 (tdesc_s390x_linux64v2): Declare.
2058 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2059 (s390_fill_gregset, s390_store_last_break): Adjust.
2060 (target_regsets): Rename to ...
2061 (s390_regsets): ... this, and make static.
2062 (s390_get_pc, s390_set_pc): Adjust.
2063 (s390_get_hwcap): New target_desc parameter, and use it.
2064 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2065 (s390_arch_setup): Adjust to set the current process'es target
2066 description. Don't adjust the regmap.
2067 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2068 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2069 (regs_info_3264): New globals.
2070 (s390_regs_info): New function.
2071 (the_low_target): Adjust.
2072 (initialize_low_arch): New function.
2073 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2074 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2075 [__mips64] (init_registers_mips_linux)
2076 (init_registers_mips_dsp_linux): Delete defines.
2077 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2078 (have_dsp): New global.
2079 (mips_read_description): New, based on mips_arch_setup.
2080 (mips_arch_setup): Reimplement.
2081 (get_usrregs_info): New function.
2082 (mips_cannot_fetch_register, mips_cannot_store_register)
2083 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2084 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2085 (target_regsets): Rename to ...
2086 (mips_regsets): ... this, and make static.
2087 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2088 (dsp_regs_info, regs_info): New globals.
2089 (mips_regs_info): New function.
2090 (the_low_target): Adjust.
2091 (initialize_low_arch): New function.
2092 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2093 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2095 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2096 (arm_read_description): New, with bits factored from
2098 (arm_arch_setup): Reimplement.
2099 (target_regsets): Rename to ...
2100 (arm_regsets): ... this, and make static.
2101 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2102 (arm_regs_info): New function.
2103 (the_low_target): Adjust.
2104 (initialize_low_arch): New function.
2105 * linux-m68k-low.c (tdesc_m68k): Declare.
2106 (target_regsets): Rename to ...
2107 (m68k_regsets): ... this, and make static.
2108 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2109 (m68k_regs_info): New function.
2110 (m68k_arch_setup): New function.
2111 (the_low_target): Adjust.
2112 (initialize_low_arch): New function.
2113 * linux-sh-low.c (tdesc_sharch): Declare.
2114 (target_regsets): Rename to ...
2115 (sh_regsets): ... this, and make static.
2116 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2117 (sh_regs_info, sh_arch_setup): New functions.
2118 (the_low_target): Adjust.
2119 (initialize_low_arch): New function.
2120 * linux-bfin-low.c (tdesc_bfin): Declare.
2121 (bfin_arch_setup): New function.
2122 (bfin_usrregs_info, regs_info): New globals.
2123 (bfin_regs_info): New function.
2124 (the_low_target): Adjust.
2125 (initialize_low_arch): New function.
2126 * linux-cris-low.c (tdesc_cris): Declare.
2127 (cris_arch_setup): New function.
2128 (cris_usrregs_info, regs_info): New globals.
2129 (cris_regs_info): New function.
2130 (the_low_target): Adjust.
2131 (initialize_low_arch): New function.
2132 * linux-cris-low.c (tdesc_crisv32): Declare.
2133 (cris_arch_setup): New function.
2134 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2135 (cris_regs_info): New function.
2136 (the_low_target): Adjust.
2137 (initialize_low_arch): New function.
2138 * linux-m32r-low.c (tdesc_m32r): Declare.
2139 (m32r_arch_setup): New function.
2140 (m32r_usrregs_info, regs_info): New globals.
2141 (m32r_regs_info): Adjust.
2142 (initialize_low_arch): New function.
2143 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2144 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2145 (tic6x_usrregs_info): Forward declare.
2146 (tic6x_read_description): New function, based on ...
2147 (tic6x_arch_setup): ... this. Reimplement.
2148 (target_regsets): Rename to ...
2149 (tic6x_regsets): ... this, and make static.
2150 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2151 (tic6x_regs_info): New function.
2152 (the_low_target): Adjust.
2153 (initialize_low_arch): New function.
2154 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2155 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2156 (target_regsets): Rename to ...
2157 (xtensa_regsets): ... this, and make static.
2158 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2160 (xtensa_arch_setup, xtensa_regs_info): New functions.
2161 (the_low_target): Adjust.
2162 (initialize_low_arch): New function.
2163 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2164 (nios2_arch_setup): Set the current process'es tdesc.
2165 (target_regsets): Rename to ...
2166 (nios2_regsets): ... this.
2167 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2168 (nios2_regs_info): New function.
2169 (the_low_target): Adjust.
2170 (initialize_low_arch): New function.
2171 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2172 (aarch64_arch_setup): Set the current process'es tdesc.
2173 (target_regsets): Rename to ...
2174 (aarch64_regsets): ... this.
2175 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2176 (aarch64_regs_info): New function.
2177 (the_low_target): Adjust.
2178 (initialize_low_arch): New function.
2179 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2181 (target_regsets): Rename to ...
2182 (tile_regsets): ... this.
2183 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2184 (tile_regs_info): New function.
2185 (tile_arch_setup): Set the current process'es tdesc.
2186 (the_low_target): Adjust.
2187 (initialize_low_arch): New function.
2188 * spu-low.c (tdesc_spu): Declare.
2189 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2190 * win32-arm-low.c (tdesc_arm): Declare.
2191 (arm_arch_setup): New function.
2192 (the_low_target): Install arm_arch_setup instead of
2194 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2195 (init_windows_x86): Rename to ...
2196 (i386_arch_setup): ... this. Set `win32_tdesc'.
2197 (the_low_target): Adjust.
2198 * win32-low.c (win32_tdesc): New global.
2199 (child_add_thread): Don't create the thread cache here.
2200 (do_initial_child_stuff): Set the new process'es tdesc.
2201 * win32-low.h (struct target_desc): Forward declare.
2202 (win32_tdesc): Declare.
2203 * lynx-i386-low.c (tdesc_i386): Declare global.
2204 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2205 * lynx-low.c (lynx_tdesc): New global.
2206 (lynx_add_process): Set the new process'es tdesc.
2207 * lynx-low.h (struct target_desc): Forward declare.
2208 (lynx_tdesc): Declare global.
2209 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2210 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2211 * nto-low.c (nto_tdesc): New global.
2212 (do_attach): Set the new process'es tdesc.
2213 * nto-low.h (struct target_desc): Forward declare.
2214 (nto_tdesc): Declare.
2215 * nto-x86-low.c (tdesc_i386): Declare.
2216 (nto_x86_arch_setup): Set `nto_tdesc'.
2218 2013-06-04 Gary Benson <gbenson@redhat.com>
2220 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2221 to qSupported response when appropriate.
2222 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2223 with nonzero-length annex.
2224 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2225 arguments supplied in annex.
2227 2013-05-31 Doug Evans <dje@google.com>
2230 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2231 64 bits in 64-cross-32 environment.
2233 2013-05-28 Pedro Alves <palves@redhat.com>
2235 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2236 (aarch64-without-fpu.c): Delete rule.
2237 * configure.srv (aarch64*-*-linux*): Remove references to
2238 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2239 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2242 2013-05-24 Pedro Alves <palves@redhat.com>
2244 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2245 instead of strchr/decode_address. Error if the range isn't split
2246 with a ','. Don't assume there's be a ':' in the action.
2248 2013-05-23 Yao Qi <yao@codesourcery.com>
2249 Pedro Alves <palves@redhat.com>
2251 * linux-low.c (lwp_in_step_range): New function.
2252 (linux_wait_1): If the thread was range stepping and stopped
2253 outside the stepping range, report the stop to GDB. Otherwise,
2254 continue stepping. Add range stepping debug output.
2255 (linux_set_resume_request): Copy the step range from the resume
2257 (linux_supports_range_stepping): New.
2258 (linux_target_ops) <supports_range_stepping>: Set to
2259 linux_supports_range_stepping.
2260 * linux-low.h (struct linux_target_ops)
2261 <supports_range_stepping>: New field.
2262 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2263 * linux-x86-low.c (x86_supports_range_stepping): New.
2264 (the_low_target) <supports_range_stepping>: Set to
2265 x86_supports_range_stepping.
2266 * server.c (handle_v_cont): Handle 'r' action.
2267 (handle_v_requests): Append ";r" if the target supports range
2269 * target.h (struct thread_resume) <step_range_start,
2270 step_range_end>: New fields.
2271 (struct target_ops) <supports_range_stepping>:
2273 (target_supports_range_stepping): New macro.
2275 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2277 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2278 confusion in comment.
2280 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2282 * lynx-low.c (struct process_info_private): New type.
2283 (lynx_add_process): New function.
2284 (lynx_create_inferior, lynx_attach): Replace calls to
2285 add_process by calls to lynx_add_process.
2286 (lynx_resume): If PTID is null, then try using
2287 current_process()->private->last_wait_event_ptid.
2289 (lynx_clear_inferiors): Delete. The contents of that function
2290 has been inlined in lynx_mourn;
2291 (lynx_wait_1): Save the ptid in the process's private data.
2292 (lynx_mourn): Free the process' private data. Replace call
2293 to lynx_clear_inferiors by call to clear_inferiors.
2295 2013-05-17 Yao Qi <yao@codesourcery.com>
2297 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2300 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2302 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2303 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2304 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2305 PT_TEXT_END_ADDR guards. Update comments.
2306 (linux_target_op) <read_offsets>: Conditionally define to
2307 linux_read_offsets if the target is UCLIBC and if it defines
2308 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2310 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2311 Andrew Jenner <andrew@codesourcery.com>
2313 * Makefile.in (SFILES): Add linux-nios2-low.c.
2314 (clean): Add action to delete nios2-linux.c.
2315 (nios2-linux.c): New rule.
2316 * configure.srv: Add nios2*-*-linux*.
2317 * linux-nios2-low.c: New.
2319 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2321 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2323 2013-04-25 Hui Zhu <hui@codesourcery.com>
2326 * ax.c (ax_printf): Add fflush.
2328 2013-04-22 Tom Tromey <tromey@redhat.com>
2330 * Makefile.in (SFILES): Add filestuff.c.
2331 (OBS): Add filestuff.o.
2332 (filestuff.o): New target.
2333 * config.in, configure: Rebuild.
2334 * configure.ac: Check for fdwalk, pipe2.
2336 2013-04-17 Pedro Alves <palves@redhat.com>
2338 * configure.ac (USE_THREAD_DB): Delete variable.
2339 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2340 Don't AC_SUBST USE_THREAD_DB.
2341 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2342 * config.in, configure: Regenerate.
2344 2013-04-16 Pedro Alves <palves@redhat.com>
2346 * linux-low.h (struct lwp_info) <thread_known>: Move under
2347 the USE_THREAD_DB #ifdef.
2349 2013-04-16 Pedro Alves <palves@redhat.com>
2351 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2352 (linux-low.o): Delete rule.
2353 * linux-low.h: Always include "gdb_thread_db.h" instead of
2354 conditionally including thread_db.h.
2355 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2358 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2360 * Makefile.in (install-only): Fix make install regression.
2362 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2364 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2365 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2367 * gdbserver.1: Remove.
2369 2013-03-22 Pedro Alves <palves@redhat.com>
2371 * linux-low.c (handle_extended_wait): Don't call
2372 linux_enable_event_reporting.
2374 2013-03-15 Tony Theodore <tonyt@logyst.com>
2377 * Makefile.in (SHELL): Use @SHELL@.
2379 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2381 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2384 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2386 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2387 Remove extraneous NULL element.
2389 2013-03-13 Yao Qi <yao@codesourcery.com>
2391 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2392 'V' block in trace frame.
2394 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2396 * target.h (struct target_ops): Add btrace ops.
2397 (target_supports_btrace): New macro.
2398 (target_enable_btrace): New macro.
2399 (target_disable_btrace): New macro.
2400 (target_read_btrace): New macro.
2401 * gdbthread.h (struct thread_info): Add btrace field.
2402 * server.c: Include btrace-common.h.
2403 (handle_btrace_general_set): New function.
2404 (handle_btrace_enable): New function.
2405 (handle_btrace_disable): New function.
2406 (handle_general_set): Call handle_btrace_general_set.
2407 (handle_qxfer_btrace): New function.
2408 (struct qxfer qxfer_packets[]): Add btrace entry.
2409 * inferiors.c (remove_thread): Disable btrace.
2410 * linux-low: Include linux-btrace.h.
2411 (linux_low_enable_btrace): New function.
2412 (linux_low_read_btrace): New function.
2413 (linux_target_ops): Add btrace ops.
2414 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2415 Add srv_linux_btrace=yes.
2416 (x86_64-*-linux*): Add linux-btrace.o.
2417 Add srv_linux_btrace=yes.
2418 * configure.ac: Define HAVE_LINUX_BTRACE.
2419 * config.in: Regenerated.
2420 * configure: Regenerated.
2422 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2424 * server.c (handle_qxfer): Preserve error message if -3 is
2426 (qxfer): Document the -3 return value.
2428 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2430 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2431 (linux_btrace_h): New variable.
2432 (linux-btrace.o): New rule.
2434 2013-03-08 Stan Shebs <stan@codesourcery.com>
2435 Hafiz Abid Qadeer <abidh@codesourcery.com>
2437 * tracepoint.c (trace_buffer_size): New global.
2438 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2439 (init_trace_buffer): Change to one-argument function. Allocate
2440 trace buffer memory.
2441 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2442 handle QTBuffer:size packet.
2443 (cmd_bigqtbuffer_size): New function.
2444 (initialize_tracepoint): Call init_trace_buffer with
2445 DEFAULT_TRACE_BUFFER_SIZE.
2446 * server.c (handle_query): Add QTBuffer:size in the
2449 2013-03-07 Yao Qi <yao@codesourcery.com>
2451 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2452 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2454 (cmd_qtsp): Adjust condition. Do post increment.
2455 Set cur_action and cur_step_action back to 0.
2457 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2460 * linux-low.c (linux_write_memory): Return early success if LEN is
2463 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2465 * configure.srv: Add x86_64-*-cygwin* as target.
2467 2013-02-28 Tom Tromey <tromey@redhat.com>
2469 * configure.ac: Invoke AC_SYS_LARGEFILE.
2470 * configure, config.in: Rebuild.
2472 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2474 * win32-low.c: Throughout, fix format strings and casts of
2475 printf-like functions to avoid type related warnings on all
2477 (get_child_debug_event): Print dwDebugEventCode as hex since
2478 that's how it's usually documented.
2480 2013-02-28 Yao Qi <yao@codesourcery.com>
2482 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2485 2013-02-27 Jiong Wang <jiwang@tilera.com>
2487 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2488 (reg-tilegx32.c): New rule.
2489 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2490 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2491 different register info initializer according to elf class.
2492 (init_registers_tilgx32): New function. The tilegx32 register info
2494 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2495 (tile_store_gregset): Likewise.
2497 2013-02-27 Yao Qi <yao@codesourcery.com>
2499 * server.c (process_point_options): Print debug message when
2500 debug_threads is true.
2502 2013-02-26 Yao Qi <yao@codesourcery.com>
2504 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2506 2013-02-19 Pedro Alves <palves@redhat.com>
2507 Kai Tietz <ktietz@redhat.com>
2511 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2512 instead of strtoul to extract address from packet.
2513 (process_serial_event) <'z'>: Likewise.
2515 2013-02-18 Yao Qi <yao@codesourcery.com>
2517 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2519 2013-02-14 Pedro Alves <palves@redhat.com>
2523 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2524 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2526 2013-02-14 Pedro Alves <palves@redhat.com>
2528 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2530 2013-02-14 Pedro Alves <palves@redhat.com>
2532 * tracepoint.c (save_string): Delete.
2533 (add_tracepoint_action): Use savestring instead of save_string.
2535 2013-02-12 Pedro Alves <palves@redhat.com>
2537 * linux-xtensa-low.c: Ditto.
2538 * xtensa-xtregs.c: Ditto.
2540 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2542 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2545 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2547 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2548 aarch64_num_wp_regs and aarch64_num_bp_regs to
2549 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2551 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2553 * linux-aarch64-low.c (ps_get_thread_area): Replace
2554 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2556 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2557 Marcus Shawcroft <marcus.shawcroft@arm.com>
2558 Nigel Stephens <nigel.stephens@arm.com>
2559 Yufeng Zhang <yufeng.zhang@arm.com>
2561 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2562 (aarch64.c, aarch64-without-fpu.c): New targets.
2563 * configure.srv (aarch64*-*-linux*): New.
2564 * linux-aarch64-low.c: New file.
2566 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2568 * linux-low.c (handle_extended_wait, linux_create_inferior)
2569 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2570 (dequeue_one_deferred_signal, linux_resume_one_thread)
2571 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2572 (linux_tracefork_grandchild, linux_test_for_tracefork)
2573 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2574 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2575 where the argument is 0.
2577 2013-01-25 Yao Qi <yao@codesourcery.com>
2579 * event-loop.c: Include "queue.h".
2580 (gdb_event_p): New typedef.
2581 (struct gdb_event) <next_event>: Remove.
2582 (event_queue): Change to QUEUE(gdb_event_p).
2583 (async_queue_event): Remove.
2584 (gdb_event_xfree): New.
2585 (initialize_event_loop): New.
2586 (process_event): Use API from QUEUE.
2587 (wait_for_event): Likewise.
2588 * server.c (main): Call initialize_event_loop.
2589 * server.h (initialize_event_loop): Declare.
2591 2013-01-18 Yao Qi <yao@codesourcery.com>
2593 * ax.h (struct eval_agent_expr_context): New.
2594 (gdb_eval_agent_expr): Update declaration.
2595 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2596 TFRAME. Add new argument CTX.
2597 * server.h (struct eval_agent_expr_context): Declare.
2598 (agent_mem_read, agent_tsv_read): Update declaration.
2599 (agent_mem_read_string): Likewise.
2600 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2601 (add_traceframe_block): Add new argument TPOINT.
2602 Increase TPOINT->traceframe_usage.
2603 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2604 eval_tracepoint_agent_expr.
2605 (condition_true_at_tracepoint): Likewise.
2606 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2607 (agent_mem_read_string, agent_tsv_read): Likewise.
2609 2013-01-16 Yao Qi <yao@codesourcery.com>
2611 * linux-low.c (linux_resume_one_lwp): Don't check
2612 'lwp->bp_reinsert != 0'.
2614 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2615 Pedro Alves <palves@redhat.com>
2617 * lynx-low.c (ptrace_request_to_str): Define a temporary
2618 macro and use it to simplify this function's implementation.
2620 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2622 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2625 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2627 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2629 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2631 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2633 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2635 * lynx-low.c (lynx_resume): Use the resume_info parameter
2636 to determine the ptid for the lynx_ptrace call, unless
2637 it is equal to minus_one_ptid, in which case we use the
2638 ptid of the current_inferior.
2639 (lynx_wait_1): After having received a thread create/exit
2640 event, resume the inferior's execution using the signaling
2641 thread's ptid, rather than the old ptid.
2643 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2645 * lynx-low.c (lynx_resume): Delete variable ret.
2647 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2649 * gdbreplay.c (gdbreplay_version): Update copyright year.
2650 * server.c (gdbserver_version): Likewise.
2652 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2654 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2657 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2659 * lynx-low.c (ptrace_request_to_str): Add handling for
2662 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2664 * lynx-low.c (lynx_attach): Delete variable new_process.
2666 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2668 * lynx-low.c (lynx_create_inferior): Delete variable
2671 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2673 * lynx-low.c (ptrace_request_to_str): Do not handle
2674 PTRACE_GETTHREADLIST if this macro does not exist.
2676 2012-12-15 Yao Qi <yao@codesourcery.com>
2678 * Makefile.in (OBS): Add notif.o.
2679 * notif.c, notif.h: New.
2680 * server.c: Include "notif.h".
2681 (struct vstop_notif) <next>: Remove.
2683 (queue_stop_reply): Update.
2684 (push_event, send_next_stop_reply): Remove.
2685 (discard_queued_stop_replies): Update.
2686 (notif_stop): New variable.
2687 (handle_v_stopped): Remove.
2688 (handle_v_requests): Don't call handle_v_stopped. Call
2689 handle_ack_notif instead.
2690 (queue_stop_reply_callback): Call notif_event_enque instead
2691 of queue_stop_reply.
2692 (handle_status): Don't call send_next_stop_reply, call
2693 notif_write_event instead.
2694 (kill_inferior_callback): Likewise.
2695 (detach_or_kill_inferior_callback): Likewise.
2696 (main): Call initialize_notif.
2697 (process_serial_event): Call QUEUE_is_empty.
2698 (handle_target_event): Call notif_push instead of push event.
2699 * server.h (push_event): Remove declaration.
2701 2012-12-10 Tom Tromey <tromey@redhat.com>
2703 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2704 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2707 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2708 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2709 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2710 (amd64-linux-ipa.o, ax.o): Rewrite.
2711 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2712 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2713 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2714 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2715 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2716 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2717 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2718 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2719 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2720 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2721 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2722 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2723 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2724 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2725 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2726 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2727 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2728 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2729 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2730 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2731 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2732 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2733 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2734 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2735 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2736 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2737 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2738 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2739 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2740 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2741 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2742 (reg-tilegx.o): Remove.
2743 (all_object_files): New macro.
2744 Include .deps files.
2745 * aclocal.m4, configure: Rebuild.
2746 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2747 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2748 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2750 2012-12-05 Tom Tromey <tromey@redhat.com>
2753 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2755 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2757 * configure.ac: Check for linux/perf_event.h.
2758 * config.in: Regenerated.
2759 * configure: Regenerated.
2761 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2763 * hostio.c (handle_readlink): Decrease buffer size
2764 parameter passed to readlink by one byte.
2766 2012-11-26 Yao Qi <yao@codesourcery.com>
2768 * configure.ac (build_warnings): Append '-Wempty-body'.
2769 * configure: Regenerated.
2770 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2773 2012-11-15 Pierre Muller <muller@sourceware.org>
2775 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2776 * config.in: Regenerate.
2777 * configure: Regenerate.
2778 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2779 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2780 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2781 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2783 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2784 instead of <sys/wait.h> header.
2785 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2787 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2789 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2790 (various make rules): Remove -DGDBSERVER
2792 2012-11-09 Yao Qi <yao@codesourcery.com>
2794 * spu-low.c (current_ptid): Move it to ..
2795 * gdbthread.h: ... here. New.
2796 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2797 * server.c (myresume, process_serial_event): Likewise.
2798 * thread-db.c (thread_db_find_new_threads): Likewise.
2799 * tracepoint.c (run_inferior_command): Likewise.
2801 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2803 * server.c (handle_search_memory_1): Include access length in
2806 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2808 * linux-crisv32-low.c: Fix compile errors.
2810 2012-09-04 Yao Qi <yao@codesourcery.com>
2812 * tracepoint.c (cmd_qtsv): Adjust debug message.
2813 Don't check CUR_TPOINT.
2815 2012-08-28 Yao Qi <yao@codesourcery.com>
2817 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2818 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2819 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2820 Remove declarations of xmalloc, xreallloc, xstrdup and
2822 * Makefile.in (libiberty_h): New.
2823 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2824 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2826 2012-08-23 Yao Qi <yao@codesourcery.com>
2828 * server.h: Remove declaration of 'xsnprintf'.
2830 2012-08-22 Keith Seitz <keiths@redhat.com>
2832 * server.h: Include build-gnulib-gbserver/config.h.
2833 * gdbreplay.c: Likewise.
2835 2012-08-08 Doug Evans <dje@google.com>
2837 * Makefile.in (SFILES): Add gdb_vecs.c.
2838 (OBS): Add gdb_vecs.o.
2839 (gdb_vecs_h, host_defs_h): New variables.
2840 (thread-db.o): Add $(gdb_vecs_h) dependency.
2841 (gdb_vecs.o): New rule.
2842 * thread-db.c: #include "gdb_vecs.h".
2843 (thread_db_load_search): Use a vector to iterate over path elements.
2844 Handle text appearing after "$pdir".
2846 * configure.ac: Add check for strstr.
2847 * config.in: Regenerate.
2848 * configure: Regenerate.
2850 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2852 * hostio.c (handle_pread): If pread fails, fall back to attempting
2854 (handle_pwrite): Likewise for pwrite.
2856 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2858 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2859 between unsupported TYPE and unimplementable ADDR/LEN combination.
2860 (arm_insert_point): Act on new return value.
2862 2012-07-31 Pedro Alves <palves@redhat.com>
2864 * server.c (process_point_options): Only skip tokens if we find
2865 one that is unrecognized. Don't treat 'X' specially while
2866 skipping unrecognized tokens.
2868 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2870 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2871 to 4-byte-align HW breakpoint addresses for Thumb.
2873 2012-07-27 Yao Qi <yao@codesourcery.com>
2877 * server.h: Declare gdb_agent_about_to_close.
2878 * target.c (kill_inferior): Include "agent.h".
2879 New. Send command 'kill'.
2880 * target.h (kill_inferior): Removed macro.
2881 * tracepoint.c (gdb_agent_about_to_close): New.
2882 (gdb_agent_helper_thread): Handle command 'close'.
2883 Wait endlessly until the inferior stops.
2884 Install gdb_agent_remove_socket to atexit hook.
2885 (agent_socket_name): New static variable.
2886 (gdb_agent_socket_init): Replace local variable 'name' with
2887 'agent_socket_name'.
2888 (gdb_agent_remove_socket): New.
2890 2012-07-27 Yao Qi <yao@codesourcery.com>
2892 * server.c (process_point_options): Stop at 'X' when parsing.
2894 2012-07-19 Michael Eager <eager@eagercon.com>
2896 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2898 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2899 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2900 hardware breakpoint.
2902 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2904 * gdbserver/linux-low.c (initialize_low): Call
2905 linux_ptrace_init_warnings.
2907 2012-07-02 Doug Evans <dje@google.com>
2909 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2912 2012-07-02 Stan Shebs <stan@codesourcery.com>
2914 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2915 (ax.o): Add it to build rule.
2917 (OBS): Add format.o.
2918 (IPA_OBS): Add format.o.
2919 * server.c (handle_query): Claim support for breakpoint commands.
2920 (process_point_options): Add command case.
2921 (process_serial_event): Leave running if there are printfs in
2923 * mem-break.h (any_persistent_commands): Declare.
2924 (add_breakpoint_commands): Declare.
2925 (gdb_no_commands_at_breakpoint): Declare.
2926 (run_breakpoint_commands): Declare.
2927 * mem-break.c (struct point_command_list): New struct.
2928 (struct breakpoint): New field command_list.
2929 (any_persistent_commands): New function.
2930 (add_commands_to_breakpoint): New function.
2931 (add_breakpoint_commands): New function.
2932 (gdb_no_commands_at_breakpoint): New function.
2933 (run_breakpoint_commands): New function.
2934 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2936 * ax.c: Include format.h.
2937 (ax_printf): New function.
2938 (gdb_eval_agent_expr): Add printf opcode.
2940 2012-06-13 Yao Qi <yao@codesourcery.com>
2942 * server.c (start_inferior): Remove duplicated writes to fields
2943 'last_resume_kind' and 'last_status' of 'current_inferior'.
2945 2012-06-12 Yao Qi <yao@codesourcery.com>
2946 Pedro Alves <palves@redhat.com>
2948 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2950 * server.c (handle_v_cont): Extend comment.
2952 2012-06-11 Yao Qi <yao@codesourcery.com>
2954 * linux-low.c (linux_attach): Add 'static'.
2956 2012-06-06 Yao Qi <yao@codesourcery.com>
2958 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
2960 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2962 Fix gcc -flto compilation warning.
2963 * server.c (main): Make variable multi_mode and attach volatile.
2965 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2967 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
2968 if the platform doesn't know about it.
2970 2012-05-30 Jeff Kenton <jkenton@tilera.com>
2972 * Makefile.in (SFILES): Add linux-tile-low.c.
2973 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
2974 * configure.srv: Handle tilegx-*-linux*.
2975 * linux-tile-low.c: New file.
2977 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2979 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
2981 2012-05-24 Pedro Alves <palves@redhat.com>
2985 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2987 2012-05-24 Pedro Alves <palves@redhat.com>
2991 Replace target_signal with gdb_signal throughout.
2993 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
2995 * linux-low.c (linux_store_registers): Avoid the copying sequence
2996 when no data has been retrieved by ptrace.
2998 2012-05-22 Will Deacon <will.deacon@arm.com>
3000 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3001 Include asm/ptrace.h.
3002 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3005 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3007 * linux-low.c (linux_store_registers): Don't re-retrieve data
3008 with ptrace that has already been obtained from /proc. Always
3009 copy any data retrieved with ptrace to the buffer supplied.
3011 2012-05-11 Yao Qi <yao@codesourcery.com>
3012 Pedro Alves <palves@redhat.com>
3014 * linux-low.c (enum stopping_threads_kind): New.
3015 (stopping_threads): Change type to `enum stopping_threads_kind'.
3016 (handle_extended_wait): If stopping and suspending threads, leave
3017 the new_lwp suspended too.
3018 (linux_wait_for_event): Adjust.
3019 (stop_all_lwps): Set `stopping_threads' to
3020 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3021 whether we're suspending threads or just stopping them. Assert no
3024 2012-04-29 Yao Qi <yao@codesourcery.com>
3026 * server.h: Move some code to ...
3027 * gdbthread.h: ... here. New.
3028 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3029 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3030 (nto-low.o, win32-low.o): Likewise.
3031 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3032 * regcache.c, remote-utils.c, server.c: Likewise.
3033 * target.c, tracepoint.c, win32-low.c: Likewise.
3035 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3037 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3038 (PTRACE_ARG4_TYPE): Likewise.
3039 (PTRACE_XFER_TYPE): Likewise.
3040 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3041 ptrace to PTRACE_ARG3_TYPE.
3042 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3043 (PTRACE_ARG4_TYPE): Likewise.
3044 (PTRACE_XFER_TYPE): Likewise.
3045 (linux_detach_one_lwp): Cast fourth argument of
3046 ptrace to long then PTRACE_ARG4_TYPE.
3047 (regsets_fetch_inferior_registers): Cast third argument of
3048 ptrace to long then PTRACE_ARG3_TYPE.
3049 (regsets_store_inferior_registers): Likewise.
3051 2012-04-20 Pedro Alves <palves@redhat.com>
3053 * configure: Regenerate.
3055 2012-04-19 Pedro Alves <palves@redhat.com>
3057 * Makefile.in (GNULIB_BUILDDIR): New.
3058 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3059 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3060 (all, install-only, uninstall, clean-info, all-lib, clean): No
3061 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3062 (maintainer-clean realclean distclean): Use subdir_do.
3064 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3065 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3066 * acinclude.m4: Include acx_configure_dir.m4.
3067 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3068 calls. Call AC_PROG_RANLIB. Configure gnulib using
3071 (GNULIB_STDINT_H): Adjust.
3072 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3073 * gdbreplay.c: Include build-gnulib/config.h.
3074 * server.h: Likewise.
3075 * aclocal.m4: Regenerate.
3076 * config.in: Regenerate.
3077 * configure: Regenerate.
3079 2012-04-19 Pedro Alves <palves@redhat.com>
3081 * Makefile.in (LIBGNU, INCGNU): Adjust.
3082 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3083 (all, install-only, uninstall, clean-info, all-lib, clean)
3084 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3085 * configure.ac: Adjust AC_OUTPUT output.
3086 * aclocal.m4: Regenerate.
3087 * configure: Regenerate.
3089 2012-04-19 Pedro Alves <palves@redhat.com>
3091 * Makefile.in (generated_files): New.
3092 (server_h): Remove the explicit dependency on config.h, and depend
3093 on $generated_files.
3095 2012-04-19 Pedro Alves <palves@redhat.com>
3097 * Makefile.in (INCGNU): Add -Ignulib.
3099 2012-04-19 Pedro Alves <palves@redhat.com>
3101 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3102 (INCGNU): ... this, and spell out -I here.
3103 (GNULIB_LIB): Rename to ...
3105 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3107 2012-04-19 Pedro Alves <palves@redhat.com>
3109 * config.in: Regenerate.
3111 2012-04-19 Pedro Alves <palves@redhat.com>
3113 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3114 * server.h (memmem): Remove declaration.
3115 * config.in: Regenerate.
3116 * configure: Regenerate.
3118 2012-04-19 Yao Qi <yao@codesourcery.com>
3120 * Makefile.in (SFILES): Add common/vec.c.
3124 2012-04-19 Yao Qi <yao@codesourcery.com>
3126 * remote-utils.c (prepare_resume_reply): Replace with macro
3127 target_core_of_thread.
3128 * server.c (handle_qxfer_threads_proper): Likewise.
3129 * target.h (traget_core_of_thread): New macro.
3131 2012-04-18 Pedro Alves <palves@redhat.com>
3133 * aclocal.m4: Regenerate.
3134 * configure: Regenerate.
3136 2012-04-16 Yao Qi <yao@codesourcery.com>
3138 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3139 duplicated on address.
3141 2012-04-16 Yao Qi <yao@codesourcery.com>
3143 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3144 (struct tracepoint_action_ops) <send>: New field.
3145 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3146 (agent_expr_send, x_tracepoint_action_send): New.
3147 (l_tracepoint_action_send): New.
3148 (cmd_qtdp): Download and install tracepoint
3149 according to `use_agent'.
3150 (run_inferior_command): Add one more parameter `len'.
3152 (tracepoint_send_agent): New.
3153 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3155 2012-04-16 Yao Qi <yao@codesourcery.com>
3157 * tracepoint.c (download_tracepoints): Moved to ...
3158 (cmd_qtstart): ... here.
3160 2012-04-14 Yao Qi <yao@codesourcery.com>
3162 * tracepoint.c: Include inttypes.h.
3163 (struct collect_memory_action): Use sized types.
3164 (struct tracepoint): Likewise.
3165 (cmd_qtdp, stop_tracing): Update print specifiers.
3166 (cmd_qtp, response_tracepoint): Likewise.
3167 (collect_data_at_tracepoint): Likewise.
3168 (collect_data_at_step): Likewise.
3170 2012-04-14 Yao Qi <yao@codesourcery.com>
3172 Import gnulib module inttypes.
3173 * aclocal.m4, config.in, configure: Regenerated.
3175 2012-04-14 Yao Qi <yao@codesourcery.com>
3177 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3178 Makefile and config.status at last.
3180 2012-04-13 Yao Qi <yao@codesourcery.com>
3182 * tracepoint.c: Include stdint.h unconditionally.
3184 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3186 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3187 on BFD_HAVE_SYS_PROCFS_TYPE.
3188 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3189 * configure: Regenerate.
3190 * config.in: Likewise.
3192 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3194 * Makefile.in (clean): Also remove x32.c x32-linux.c
3195 x32-avx.c x32-avx-linux.c.
3196 (x32.o): New target.
3198 (x32-linux.o): Likewise.
3199 (x32-linux.c): Likewise.
3200 (x32-avx.o): Likewise.
3201 (x32-avx.c): Likewise.
3202 (x32-avx-linux.o): Likewise.
3203 (x32-avx-linux.c): Likewise.
3205 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3206 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3207 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3208 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3209 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3210 i386/x32-avx-linux.xml.
3212 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3213 (init_registers_x32_avx_linux): Likwise.
3214 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3215 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3217 2012-04-13 Pedro Alves <palves@redhat.com>
3219 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3220 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3221 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3222 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3225 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3227 * linux-x86-low.c (compat_x32_clock_t): New.
3228 (compat_x32_siginfo_t): Likewise.
3229 (compat_x32_siginfo_from_siginfo): Likewise.
3230 (siginfo_from_compat_x32_siginfo): Likewise.
3231 (linux_is_elf64): Likewise.
3232 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3233 and siginfo_from_compat_x32_siginfo for x32.
3234 (x86_arch_setup): Set linux_is_elf64.
3236 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3239 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3241 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3242 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3243 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3244 compatible with process.
3246 2012-04-12 Yao Qi <yao@codesourcery.com>
3248 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3249 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3250 (install-only, install-info, clean): Handle sub dir gnulib.
3251 (all-lib, am--refresh): New targets.
3252 (memmem.o): Remove target.
3253 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3254 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3255 (AC_REPLACE_FUNCS): Remove memmem.
3256 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3257 (AC_OUTPUT): Generate Makefile in gnulib/.
3258 * aclocal.m4, config.in, configure: Regenerated.
3260 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3262 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3264 2012-04-05 Pedro Alves <palves@redhat.com>
3266 -Werror=strict-aliasing
3268 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3271 2012-04-04 Pedro Alves <palves@redhat.com>
3273 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3274 (sparc_store_gregset_from_stack, sparc_store_gregset)
3275 (sparc_breakpoint_at): Fix formatting.
3277 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3279 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3281 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3282 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3283 * config.in: Regenerate.
3284 * configure: Likewise.
3286 2012-03-29 Pedro Alves <palves@redhat.com>
3288 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3289 Correct ptrace arguments.
3291 2012-03-28 Pedro Alves <palves@redhat.com>
3293 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3294 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3295 (IA64_FR1_REGNUM): New defines.
3296 (ia64_fetch_register): New.
3297 (the_low_target): Install it.
3298 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3300 * linux-low.c (linux_fetch_registers): Try the
3301 the_low_target.fetch_register hook first.
3303 * linux-arm-low.c (the_low_target): Adjust.
3304 * linux-bfin-low.c (the_low_target): Adjust.
3305 * linux-cris-low.c (the_low_target): Adjust.
3306 * linux-crisv32-low.c (the_low_target): Adjust.
3307 * linux-m32r-low.c (the_low_target): Adjust.
3308 * linux-m68k-low.c (the_low_target): Adjust.
3309 * linux-mips-low.c (the_low_target): Adjust.
3310 * linux-ppc-low.c (the_low_target): Adjust.
3311 * linux-s390-low.c (the_low_target): Adjust.
3312 * linux-sh-low.c (the_low_target): Adjust.
3313 * linux-sparc-low.c (the_low_target): Adjust.
3314 * linux-tic6x-low.c (the_low_target): Adjust.
3315 * linux-x86-low.c (the_low_target): Adjust.
3316 * linux-xtensa-low.c (the_low_target): Adjust.
3318 2012-03-26 Pedro Alves <palves@redhat.com>
3320 * server.c (handle_qxfer_libraries): Don't bail early if
3321 the_target->qxfer_libraries_svr4 is not NULL.
3323 2012-03-26 Pedro Alves <palves@redhat.com>
3325 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3327 2012-03-23 Pedro Alves <palves@redhat.com>
3329 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3330 "library-list-svr4" element's start tag when the the DSO list is
3333 2012-03-23 Pedro Alves <palves@redhat.com>
3335 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3336 a variable whose type size is the same as the inferior's pointer
3339 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3341 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3343 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3344 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3345 * linux-low.h: Include <signal.h>.
3346 (struct siginfo): Remove forward declaration.
3347 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3350 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3352 * .gitignore: Ignore more files.
3354 2012-03-19 Pedro Alves <palves@redhat.com>
3355 Jan Kratochvil <jan.kratochvil@redhat.com>
3357 * server.c (cont_thread, general_thread): Add describing comments.
3358 (start_inferior): Clear `cont_thread'.
3359 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3362 2012-03-15 Yao Qi <yao@codesourcery.com>
3364 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3366 (cmd_qtdp): ... here.
3368 2012-03-15 Yao Qi <yao@codesourcery.com>
3370 * tracepoint.c (struct tracepoint_action_ops): New.
3371 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3372 (m_tracepoint_action_download): New.
3373 (r_tracepoint_action_download): New.
3374 (x_tracepoint_action_download): New.
3375 (l_tracepoint_action_download): New.
3376 (add_tracepoint_action): Install `action->ops' according type.
3377 (download_tracepoint_1): Move code `download' function pointer
3378 of various tracepoint_action_ops.
3380 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3382 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3383 linux_ptrace_attach_warnings.
3385 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3387 * Makefile.in (linux-ptrace.o): New.
3388 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3389 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3390 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3391 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3392 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3394 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3396 2012-03-08 Yao Qi <yao@codesourcery.com>
3397 Pedro Alves <palves@redhat.com>
3399 Fix PR server/13392.
3400 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3402 * tracepoint.c (remove_tracepoint): New.
3403 (cmd_qtdp): Call remove_tracepoint when failed to install.
3405 2012-03-07 Pedro Alves <palves@redhat.com>
3407 * linux-low.c (get_detach_signal): New.
3408 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3409 Pass on pending signals to PTRACE_DETACH. Check the result of the
3411 * server.c (program_signals, program_signals_p): New.
3412 (handle_general_set): Handle QProgramSignals.
3413 * server.h (program_signals, program_signals_p): Declare.
3415 2012-03-05 Pedro Alves <palves@redhat.com>
3416 Jan Kratochvil <jan.kratochvil@redhat.com>
3418 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3421 2012-03-03 Yao Qi <yao@codesourcery.com>
3423 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3424 agent_look_up_symbols.
3426 2012-03-03 Yao Qi <yao@codesourcery.com>
3428 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3429 (linux-x86-low.o): Likewise.
3430 * server.h: Remove in_process_agent_loaded.
3431 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3435 2012-03-03 Yao Qi <yao@codesourcery.com>
3437 * tracepoint.c (gdb_agent_capability): New global.
3438 (in_process_agent_loaded_ust): Renamed to
3439 `in_process_agent_supports_ust'.
3441 (in_process_agent_supports_ust): Call agent_capability_check.
3442 (clear_installed_tracepoints): Assert that agent supports
3445 2012-03-03 Yao Qi <yao@codesourcery.com>
3447 * linux-low.c (linux_supports_agent): New.
3448 (linux_target_ops): Initialize field `supports_agent' with
3449 linux_supports_agent.
3450 * target.h (struct target_ops) <supports_agent>: New.
3451 (target_supports_agent): New macro.
3452 * server.c (handle_general_set): Handle packet 'QAgent'.
3453 (handle_query): Send `QAgent+'.
3454 * Makefile.in (server.o): Depends on agent.h.
3456 2012-03-03 Yao Qi <yao@codesourcery.com>
3458 * Makefile.in (OBS): Add agent.o.
3459 Add new rule for agent.o.
3460 Track dependence of tracepoint.c on agent.h.
3461 * tracepoint.c (run_inferior_command_1):
3462 (run_inferior_command): Call agent_run_command.
3463 (gdb_ust_connect_sync_socket): Deleted. Move it to
3465 (resume_thread, stop_thread): Likewise.
3466 (gdb_ust_socket_init): Renamed to ...
3467 (gdb_agent_socket_init): ... New.
3468 (gdb_ust_thread): Renamed to ...
3469 (gdb_agent_helper_thread): ... New.
3470 (gdb_ust_init): Move some code to ...
3471 (gdb_agent_init): ... here. New.
3472 [HAVE_UST]: Call gdb_ust_init.
3473 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3474 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3475 * config.in, configure: Regenerated.
3477 2012-03-02 Pedro Alves <palves@redhat.com>
3479 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3480 * linux-low.c (struct simple_pid_list): New.
3481 (stopped_pids): New a struct simple_pid_list pointer.
3482 (add_to_pid_list, pull_pid_from_list): New.
3483 (handle_extended_wait): Don't assume the first signal new children
3484 report is SIGSTOP. Adjust call to pull_pid_from_list.
3485 (linux_wait_for_lwp): Adjust.
3487 2012-03-02 Yao Qi <yao@codesourcery.com>
3489 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3492 2012-03-02 Yao Qi <yao@codesourcery.com>
3494 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3495 `stop_pc' and `tpoint'. Update caller.
3497 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3499 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3500 * linux-low.c (use_linux_regsets): New macro.
3501 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3502 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3503 (linux_register_in_regsets): New function.
3504 (usr_fetch_inferior_registers): Skip registers covered by
3506 (usr_store_inferior_registers): Likewise.
3507 (usr_fetch_inferior_registers): New macro.
3508 (usr_store_inferior_registers): Likewise.
3509 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3510 (linux_store_registers): Likewise.
3511 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3513 (init_registers_mips64_dsp_linux): Likewise.
3514 (init_registers_mips_linux): New macro.
3515 (init_registers_mips_dsp_linux): Likewise.
3516 (mips_dsp_num_regs): Likewise.
3517 (DSP_BASE, DSP_CONTROL): New fallback macros.
3518 (mips_base_regs): New macro.
3519 (mips_regmap): Use it. Fix the size.
3520 (mips_dsp_regmap): New variable.
3521 (mips_dsp_regset_bitmap): Likewise.
3522 (mips_arch_setup): New function.
3523 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3525 (mips_cannot_store_register): Likewise.
3526 (the_low_target): Update .arch_setup, .num_regs and .regmap
3527 initializers. Add .regset_bitmap initializer.
3528 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3530 * linux-bfin-low.c (the_low_target): Likewise.
3531 * linux-cris-low.c (the_low_target): Likewise.
3532 * linux-crisv32-low.c (the_low_target): Likewise.
3533 * linux-ia64-low.c (the_low_target): Likewise.
3534 * linux-m32r-low.c (the_low_target): Likewise.
3535 * linux-m68k-low.c (the_low_target): Likewise.
3536 * linux-ppc-low.c (the_low_target): Likewise.
3537 * linux-s390-low.c (the_low_target): Likewise.
3538 * linux-sh-low.c (the_low_target): Likewise.
3539 * linux-sparc-low.c (the_low_target): Likewise.
3540 * linux-tic6x-low.c (the_low_target): Likewise.
3541 * linux-x86-low.c (the_low_target): Likewise.
3542 * linux-xtensa-low.c (the_low_target): Likewise.
3543 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3544 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3545 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3547 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3548 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3550 2012-02-29 Yao Qi <yao@codesourcery.com>
3551 Pedro Alves <palves@redhat.com>
3553 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3554 `step_over_finished' is true.
3556 2012-02-27 Pedro Alves <palves@redhat.com>
3558 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3559 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3561 2012-02-27 Pedro Alves <palves@redhat.com>
3564 * linux-low.c (pid_is_stopped): New.
3565 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3567 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3569 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3572 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3574 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3576 2012-02-24 Luis Machado <lgustavo@codesourcery>
3578 * server.c (handle_query): Advertise support for target-side
3579 breakpoint condition evaluation.
3580 (process_point_options): New function.
3581 (process_serial_event): When inserting a breakpoint, check for
3582 a target-side condition that should be evaluated.
3584 * mem-break.c: Include regcache.h and ax.h.
3585 (point_cond_list_t): New data structure.
3586 (breakpoint) <cond_list>: New field.
3587 (find_gdb_breakpoint_at): Make non-static.
3588 (delete_gdb_breakpoint_at): Clear any target-side
3590 (clear_gdb_breakpoint_conditions): New function.
3591 (add_condition_to_breakpoint): Likewise.
3592 (add_breakpoint_condition): Likewise.
3593 (gdb_condition_true_at_breakpoint): Likewise.
3594 (gdb_breakpoint_here): Return result directly instead
3595 of going through a local variable.
3597 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3598 (clear_gdb_breakpoint_conditions): Likewise.
3599 (add_breakpoint_condition): Likewise.
3600 (gdb_condition_true_at_breakpoint): Likewise.
3602 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3603 (need_step_over_p): Take target-side breakpoint condition into
3606 2012-02-24 Luis Machado <lgustavo@codesourcery>
3608 * server.h: Include tracepoint.h.
3609 (agent_mem_read, agent_get_trace_state_variable_value,
3610 agent_set_trace_state_variable_value,
3611 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3612 get_set_tsv_func_addr): New prototypes.
3614 * ax.h: New include file.
3615 * ax.c: New source file.
3617 * tracepoint.c: Include ax.h.
3618 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3619 agent_expr, eval_result_type): Move to ax.h.
3620 (parse_agent_expr): Rename to ...
3621 (gdb_parse_agent_expr): ... this, make it non-static and move
3623 (unparse_agent_expr) Rename to ...
3624 (gdb_unparse_agent_expr): ... this, make it non-static and move
3626 (eval_agent_expr): Rename to ...
3627 (eval_tracepoint_agent_expr): ... this.
3628 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3629 forward declarations.
3630 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3631 (agent_get_trace_state_variable_value): New function.
3632 (agent_set_trace_state_variable_value): New function.
3633 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3634 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3635 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3636 (condition_true_at_tracepoint): Likewise.
3637 (parse_agent_expr): Rename to ...
3638 (gdb_parse_agent_expr): ... this and move to ax.c.
3639 (unparse_agent_expr): Rename to ...
3640 (gdb_unparse_agent_expr): ... this and move to ax.c.
3641 (gdb_agent_op_name): Move to ax.c.
3642 (eval_agent_expr): Rename to ...
3643 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3645 (eval_tracepoint_agent_expr): New function.
3646 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3648 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3650 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3651 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3652 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3653 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3654 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3655 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3656 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3657 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3658 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3659 (compile_bytecodes): Remove forward declaration.
3660 (is_goto_target): Move to ax.c.
3661 (compile_bytecodes): Move to ax.c and call
3662 agent_get_trace_state_variable_value (...) and
3663 agent_set_trace_state_variable_value (...).
3665 * Makefile.in: Update ax.c and IPA dependencies.
3667 2012-02-24 Pedro Alves <palves@redhat.com>
3669 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3670 (cmd_bigqtbuffer_circular): ... this. Only handle
3671 'QTBuffer:circular:'.
3672 (handle_tracepoint_general_set): Adjust.
3674 2012-02-16 Yao Qi <yao@codesourcery.com>
3676 * inferiors.c: Move code to ...
3677 * dll.c: .... here. New.
3678 * server.h: Declare clear_dlls.
3679 * Makefile.in (SFILES): Add dll.c.
3683 2012-02-11 Yao Qi <yao@codesourcery.com>
3685 * server.c: (handle_monitor_command): Add a new parameter
3687 (handle_query): Update caller.
3689 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3691 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3692 * configure, config.in: Regenerate.
3693 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3696 2012-02-02 Pedro Alves <palves@redhat.com>
3698 Try SIGKILL first, then PTRACE_KILL.
3699 * linux-low.c (linux_kill_one_lwp): New.
3700 (linux_kill_one_lwp): Rename to ...
3701 (kill_one_lwp_callback): ... this. Use the new
3704 2012-02-02 Pedro Alves <palves@redhat.com>
3706 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3709 2012-01-27 Pedro Alves <palves@redhat.com>
3711 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3712 (elf_64_file_p): Make static.
3713 (linux_pid_exe_is_elf_64_file): New.
3714 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3715 Delete declarations.
3716 (linux_pid_exe_is_elf_64_file): Declare.
3717 * linux-x86-low.c (x86_arch_setup): Use
3718 linux_pid_exe_is_elf_64_file.
3720 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3722 * linux-low.c (linux_wait_for_event_1): Rename to ...
3723 (linux_wait_for_event): ... here and merge it with former
3724 linux_wait_for_event - new variable wait_ptid, use it.
3725 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3727 2012-01-23 Pedro Alves <palves@redhat.com>
3729 * server.c (main): Avoid yet another case of infinite loop while
3730 detaching/killing after a longjmp.
3732 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3735 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3737 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3739 * hostio.c (handle_readlink): New function.
3740 (handle_vFile): Call it to handle "vFile:readlink" packets.
3742 2012-01-20 Pedro Alves <palves@redhat.com>
3743 Ulrich Weigand <ulrich.weigand@linaro.org>
3745 * server.c (handle_v_requests): Only support vAttach and vRun to
3746 start multiple processes when in extended protocol mode.
3748 2012-01-17 Pedro Alves <palves@redhat.com>
3750 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3751 memalign plus mprotect to allocate the scratch buffer.
3753 2012-01-13 Pedro Alves <palves@redhat.com>
3755 * server.c (attach_inferior): Clear `cont_thread'.
3757 2012-01-13 Pedro Alves <palves@redhat.com>
3759 * server.c (main): Avoid infinite loop while detaching/killing
3762 2012-01-09 Doug Evans <dje@google.com>
3764 * server.c (start_inferior): Set last_ptid in --wrapper case.
3766 2012-01-06 Yao Qi <yao@codesourcery.com>
3768 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3770 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3772 2012-01-04 Yao Qi <yao@codesourcery.com>
3774 * tracepoint.c (cmd_qtdp): Print debug message
3775 for static tracepoint.
3777 2012-01-04 Yao Qi <yao@codesourcery.com>
3779 * tracepoint.c (trace_vdebug): Differentiate debug message
3780 between gdbserver and IPA.
3782 2012-01-03 Yao Qi <yao@codesourcery.com>
3784 * tracepoint.c (tracepoint_was_hit): Don't collect for
3787 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3789 * terminal.h: Reformat copyright header.
3791 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3793 * server.c (gdbserver_version): Update copyright year.
3794 * gdbreplay.c (gdbreplay_version): Likewise.
3796 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3798 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3801 2011-12-18 Hui Zhu <teawater@gmail.com>
3802 * linux-low.c (linux_create_inferior): Save return value to ret.
3804 2011-12-18 Hui Zhu <teawater@gmail.com>
3806 * linux-low.c (linux_create_inferior): Save return value to ret.
3808 2011-12-16 Doug Evans <dje@google.com>
3810 * linux-low.c (linux_create_inferior): If stdio connection,
3811 redirect stdin from /dev/null, stdout to stderr.
3812 * remote-utils.c (remote_is_stdio): New static global.
3813 (remote_connection_is_stdio): New function.
3814 (remote_prepare): Handle stdio connection.
3815 (remote_open): Ditto.
3816 (remote_close): Don't close stdin for stdio connections.
3817 (read_prim,write_prim): New functions. Replace all calls to
3818 read/write to these.
3819 * server.c (main): Watch for "-" argument. Move call to
3820 remote_prepare before start_inferior.
3821 * server.h (STDIO_CONNECTION_NAME): New macro.
3822 (remote_connection_is_stdio): Declare.
3824 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3825 in debugging output.
3827 2011-12-15 Yao Qi <yao@codesourcery.com>
3829 * tracepoint.c: Include sys/syscall.h.
3830 (gdb_ust_thread): Remove preprocessor conditional.
3832 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3834 * linux-low.c (linux_detach_one_lwp): Call
3835 the_low_target.prepare_to_resume before detaching.
3837 2011-12-14 Yao Qi <yao@codesourcery.com>
3839 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3842 2011-12-14 Yao Qi <yao@codesourcery.com>
3844 * i386-low.c (i386_low_stopped_data_address): Initialize local
3847 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3851 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3852 DR_CONTROL unless necessary. Extend comments.
3853 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3854 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3856 2011-12-13 Yao Qi <yao@codesourcery.com>
3858 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3860 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3862 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3864 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3865 Print new debug message for such case.
3867 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3869 Fix overlapping memcpy.
3870 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3871 the read_inferior_memory transfer.
3872 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3873 write_inferior_memory transfer.
3874 (set_fast_tracepoint_jump): New variable buf. Use it for the
3875 read_inferior_memory and write_inferior_memory transfers.
3876 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3877 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3878 Use it for the write_inferior_memory transfer.
3879 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3882 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3884 * linux-low.c (fetch_register, store_register): Make code
3885 consistent, fix formatting.
3887 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3889 * linux-low.c (usr_store_inferior_registers): Factor out code
3890 to handle individual registers into...
3891 (store_register): ... this new function.
3893 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3895 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3896 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3897 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3898 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3899 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3900 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3901 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3902 (srv_xmlfiles): Add new XML files.
3904 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3906 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3907 (init_registers_s390_linux32v1): Add prototype.
3908 (init_registers_s390_linux32v2): Likewise.
3909 (init_registers_s390_linux64v1): Likewise.
3910 (init_registers_s390_linux64v2): Likewise.
3911 (init_registers_s390x_linux64v1): Likewise.
3912 (init_registers_s390x_linux64v2): Likewise.
3913 (s390_num_regs): Increment to 52.
3914 (s390_regmap): Add orig_r2 register.
3915 (s390_num_regs_3264): Increment to 68.
3916 (s390_regmap_3264): Add orig_r2 register.
3917 (s390_collect_ptrace_register): Handle orig_r2 register.
3918 (s390_supply_ptrace_register): Likewise.
3919 (s390_fill_last_break): New function.
3920 (s390_store_last_break): Likewise.
3921 (s390_fill_system_call): New function.
3922 (s390_store_system_call): Likewise.
3923 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3925 (s390_check_regset): New function.
3926 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3927 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3928 Update target_regsets for available register sets.
3930 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3931 Jan Kratochvil <jan.kratochvil@redhat.com>
3933 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3934 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3936 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3937 * linux-low.h (struct process_info_private): New member r_debug.
3938 * server.c (handle_qxfer_libraries): Call
3939 the_target->qxfer_libraries_svr4.
3940 (handle_qxfer_libraries_svr4): New function.
3941 (qxfer_packets): New entry "libraries-svr4".
3942 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3943 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3944 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3945 PACKET_qXfer_libraries_svr4.
3947 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3949 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3950 PSW address/mask between 8-byte and 16-byte formats.
3951 (s390_supply_ptrace_register): Likewise.
3952 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3953 basic addressing mode bit.
3955 2011-11-24 Stan Shebs <stan@codesourcery.com>
3957 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
3959 2011-11-17 Stan Shebs <stan@codesourcery.com>
3961 * tracepoint.c (struct tracepoint): New field traceframe_usage.
3962 (tracing_start_time): New global.
3963 (tracing_stop_time): New global.
3964 (tracing_user_name): New global.
3965 (tracing_notes): New global.
3966 (tracing_stop_note): New global.
3967 (cmd_qtstart): Set traceframe_usage, start_time.
3968 (stop_tracing): Set stop_time.
3969 (cmd_qtstatus): Report additional status.
3970 (cmd_qtp): New function.
3971 (handle_tracepoint_query): Call it.
3972 (cmd_qtnotes): New function.
3973 (handle_tracepoint_general_set): Call it.
3974 (get_timestamp): Rename from tsv_get_timestamp.
3976 2011-11-14 Stan Shebs <stan@codesourcery.com>
3977 Kwok Cheung Yeung <kcy@codesourcery.com>
3979 * linux-x86-low.c (small_jump_insn): New.
3980 (i386_install_fast_tracepoint_jump_pad): Add arguments for
3981 trampoline and error message, build a trampoline and issue a small
3982 jump instruction to it.
3983 (x86_install_fast_tracepoint_jump_pad): Add arguments for
3984 trampoline and error message.
3985 (x86_get_min_fast_tracepoint_insn_len): New.
3986 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
3987 * linux-low.h (struct linux_target_ops): Add arguments to
3988 install_fast_tracepoint_jump_pad operation, add new operation.
3989 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
3991 (linux_get_min_fast_tracepoint_insn_len): New function.
3992 (linux_target_op): Add new operation.
3993 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
3994 (gdb_trampoline_buffer_end): Ditto.
3995 (gdb_trampoline_buffer_error): Ditto.
3996 (struct ipa_sym_addresses): Add fields for new IPA variables.
3997 (symbol_list): Add entries for new IPA variables.
3998 (struct tracepoint): Add fields to hold the address range of the
3999 trampoline used by the tracepoint.
4000 (trampoline_buffer_head): New static variable.
4001 (trampoline_buffer_tail): Ditto.
4002 (claim_trampoline_space): New function.
4003 (have_fast_tracepoint_trampoline_buffer): New function.
4004 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4006 (install_fast_tracepoint): Ditto, also add error buffer argument.
4007 (cmd_qtminftpilen): New function.
4008 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4009 (fast_tracepoint_from_trampoline_address): New function.
4010 (fast_tracepoint_collecting): Handle trampoline as part of jump
4012 (set_trampoline_buffer_space): New function.
4013 (initialize_tracepoint): Initialize new IPA variables.
4014 * target.h (struct target_ops): Add arguments to
4015 install_fast_tracepoint_jump_pad operation, add new
4016 get_min_fast_tracepoint_insn_len operation.
4017 (target_get_min_fast_tracepoint_insn_len): New.
4018 (install_fast_tracepoint_jump_pad): Add arguments.
4019 * server.h (IPA_BUFSIZ): Define.
4020 * linux-i386-ipa.c: Include extra header files.
4021 (initialize_fast_tracepoint_trampoline_buffer): New function.
4022 (initialize_low_tracepoint): Call it.
4023 * server.h (set_trampoline_buffer_space): Declare.
4024 (claim_trampoline_space): Ditto.
4025 (have_fast_tracepoint_trampoline_buffer): Ditto.
4027 2011-11-14 Yao Qi <yao@codesourcery.com>
4029 * server.c (handle_query): Handle InstallInTrace for qSupported.
4030 * tracepoint.c (add_tracepoint): Sort list.
4031 (install_tracepoint, download_tracepoint): New.
4032 (cmd_qtdp): Call them to install and download tracepoints.
4033 (sort_tracepoints): Removed.
4034 (cmd_qtstart): Update.
4036 2011-11-14 Yao Qi <yao@codesourcery.com>
4038 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4039 * mem-break.h: Declare.
4040 * tracepoint.c (cmd_qtstart): Move some code to ...
4041 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4043 (download_tracepoints): Move some code to ...
4044 (download_tracepoint_1): ... here. New.
4046 2011-11-08 Yao Qi <yao@codesourcery.com>
4048 * remote-utils.c (relocate_instruction): A comment fix.
4050 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4052 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4053 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4054 dr_status_mirror and dr_control_mirror from debug_reg_state.
4055 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4056 (i386_initial_stuff): Remove use of deleted globals.
4057 (i386_get_thread_context, i386_set_thread_context,
4058 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4059 from debug_reg_state.
4061 2011-11-05 Yao Qi <yao@codesourcery.com>
4063 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4064 address as TPOINT's.
4066 2011-11-02 Stan Shebs <stan@codesourcery.com>
4068 * tracepoint.c (agent_mem_read_string): New function.
4069 (eval_agent_expr): Call it for tracenz.
4070 * server.c (handle_query): Report support for tracenz.
4072 2011-11-02 Yao Qi <yao@codesourcery.com>
4074 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4076 2011-11-02 Yao Qi <yao@codesourcery.com>
4078 * target.h: Fix a typo in comment.
4080 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4082 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4083 clobber the breakpoints' shadows with fast tracepoint jumps.
4084 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4085 * target.c (write_inferior_memory): Also pass MYADDR down to
4088 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4090 * configure.ac: Check support for personality routine.
4091 * configure: Regenerate.
4092 * config.in: Likewise.
4093 * linux-low.c: Include <sys/personality.h>.
4094 Define ADDR_NO_RANDOMIZE if necessary.
4095 (linux_create_inferior): Disable address space randomization when
4096 forking inferior, if requested.
4097 (linux_supports_disable_randomization): New function.
4098 (linux_target_ops): Install it.
4099 * server.h (disable_randomization): Declare.
4100 * server.c (disable_randomization): New global variable.
4101 (handle_general_set): Handle QDisableRandomization.
4102 (handle_query): Likewise for qSupported.
4103 (main): Support --disable-randomization and --no-disable-randomization
4104 command line arguments.
4105 * target.h (struct target_ops): Add supports_disable_randomization.
4106 (target_supports_disable_randomization): New macro.
4108 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4110 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4112 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4113 [!PT_GETDSBT] (target_loadmap): New definition.
4114 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4115 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4116 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4117 and PT_GETDSBT to LINUX_LOADMAP.
4118 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4119 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4121 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4123 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4124 (arm_linux_hwbp_cap): New static variable.
4125 (arm_linux_get_hwbp_cap): Replace by ...
4126 (arm_linux_init_hwbp_cap): ... this new function.
4127 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4128 (arm_linux_get_hw_watchpoint_count): Likewise.
4129 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4130 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4131 (arm_prepare_to_resume): Use perror_with_name instead of error.
4133 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4135 * linux-arm-low.c: Include <signal.h>.
4136 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4137 (struct arm_linux_hwbp_cap): New data type.
4138 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4139 (struct arm_linux_hw_breakpoint): New data type.
4140 (MAX_BPTS, MAX_WPTS): Define.
4141 (struct arch_process_info, struct arch_lwp_info): New data types.
4142 (arm_linux_get_hwbp_cap): New function.
4143 (arm_linux_get_hw_breakpoint_count): Likewise.
4144 (arm_linux_get_hw_watchpoint_count): Likewise.
4145 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4146 (arm_hwbp_control_initialize): Likewise.
4147 (arm_hwbp_control_is_enabled): Likewise.
4148 (arm_hwbp_control_is_initialized): Likewise.
4149 (arm_hwbp_control_disable): Likewise.
4150 (arm_linux_hw_breakpoint_equal): Likewise.
4151 (arm_linux_hw_point_initialize): Likewise.
4152 (struct update_registers_data): New data structure.
4153 (update_registers_callback: New function.
4154 (arm_insert_point): Likewise.
4155 (arm_remove_point): Likewise.
4156 (arm_stopped_by_watchpoint): Likewise.
4157 (arm_stopped_data_address): Likewise.
4158 (arm_new_process): Likewise.
4159 (arm_new_thread): Likewise.
4160 (arm_prepare_to_resume): Likewise.
4161 (the_low_target): Register arm_insert_point, arm_remove_point,
4162 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4163 arm_new_thread, and arm_prepare_to_resume.
4165 2011-09-15 Stan Shebs <stan@codesourcery.com>
4167 * server.h (struct emit_ops): Add compare-goto fields.
4168 * tracepoint.c (gdb_agent_op_sizes): New table.
4169 (emit_eq_goto): New function.
4170 (emit_ne_goto): New function.
4171 (emit_lt_goto): New function.
4172 (emit_le_goto): New function.
4173 (emit_gt_goto): New function.
4174 (emit_ge_goto): New function.
4175 (is_goto_target): New function.
4176 (compile_bytecodes): Recognize special cases of compare-goto
4177 combinations and call specialized emitters for them.
4178 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4179 (amd64_emit_ne_goto): New function.
4180 (amd64_emit_lt_goto): New function.
4181 (amd64_emit_le_goto): New function.
4182 (amd64_emit_gt_goto): New function.
4183 (amd64_emit_ge_goto): New function.
4184 (amd64_emit_ops): Add the new functions.
4185 (i386_emit_eq_goto): New function.
4186 (i386_emit_ne_goto): New function.
4187 (i386_emit_lt_goto): New function.
4188 (i386_emit_le_goto): New function.
4189 (i386_emit_gt_goto): New function.
4190 (i386_emit_ge_goto): New function.
4191 (i386_emit_ops): Add the new functions.
4193 2011-09-08 Stan Shebs <stan@codesourcery.com>
4195 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4196 (i386_emit_epilogue): Restore %ebx.
4198 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4200 * server.c (step_thread): Remove definition.
4201 (process_serial_event): Don't handle Hs.
4202 * server.h (step_thread): Remove declaration.
4203 * target.c (set_desired_inferior): Remove use of step_thread.
4205 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4207 * linux-low.c: Include linux-procfs.h.
4208 (linux_attach_lwp_1): Update comments.
4209 (linux_attach): Scan for existing threads when attaching to a
4210 process that is the tgid.
4211 * Makefile.in: Update dependencies.
4213 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4215 * configure.srv: Add linux-procfs.o dependencies.
4217 2011-08-14 Yao Qi <yao@codesourcery.com>
4219 * target.h (struct target_ops): Fix indent.
4220 * win32-low.c (win32_target_ops): Fix comment.
4222 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4223 Yao Qi <yao@codesourcery.com>
4225 * Makefile.in (clean): Remove tic6x-*.c files.
4226 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4227 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4228 (tic6x-c64xp-linux.c): Likewise.
4229 * configure.srv: Add support for tic6x-*-uclinux.
4230 * linux-tic6x-low.c: New.
4231 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4233 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4234 Yao Qi <yao@codesourcery.com>
4236 * target.h (struct target_ops): Add read_loadmap.
4237 * linux-low.c (struct target_loadseg): New type.
4238 (struct target_loadmap): New type.
4239 (linux_read_loadmap): New function.
4240 (linux_target_ops): Add linux_read_loadmap.
4241 * server.c (handle_query): Support qXfer:fdpic:read packet.
4242 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4245 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4247 * win32-low.c: Include <stdint.h>.
4249 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4251 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4252 to the inferior here.
4253 (i386_remove_aligned_watchpoint): Ditto.
4254 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4255 fit part of the watchpoint in the debug registers.
4256 (i386_update_inferior_debug_regs): New.
4257 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4258 registers, and only update the inferior on success.
4259 (i386_low_remove_watchpoint): Ditto.
4261 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4263 * linux-low.c (compare_ints, unique, list_threads, show_process,
4264 linux_core_of_thread): Delete.
4265 (linux_target_ops): Change linux_core_of_thread to
4266 linux_common_core_of_thread.
4267 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4268 * utils.c (malloc_failure): Change type of argument.
4269 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4270 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4271 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4272 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4273 (IPA_OBJS): Add common-utils-ipa.o.
4274 (ptid_h, linux_osdata_h): New macros.
4275 (server_h): Add common/common-utils.h, common/xml-utils.h,
4276 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4278 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4279 ptid.o, buffer.o): New rules.
4280 (linux-low.o): Add common/linux-osdata.h as a dependency.
4281 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4282 * configure.ac: Add AC_HEADER_DIRENT check.
4283 * config.in: Regenerate.
4284 * configure: Regenerate.
4285 * remote-utils.c (xml_escape_text): Delete.
4286 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4287 buffer_xml_printf): Move to common/buffer.c.
4288 * server.c (main): Remove call to initialize_inferiors.
4289 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4290 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4291 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4292 internal_error, gdb_assert, gdb_assert_fail): Delete.
4293 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4294 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4296 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4297 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4298 initialize_inferiors): Delete.
4300 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4302 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4305 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4307 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4309 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4311 2011-05-26 Yao Qi <yao@codesourcery.com>
4313 * Makefile.in (thread-db.o): Track dependence to
4314 common/gdb_thread_db.h.
4315 * thread-db.c: include gdb_thread_db.h from right place.
4317 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4319 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4320 __FILE__ and __LINE__ to internal_error.
4322 2011-05-13 Doug Evans <dje@google.com>
4324 * thread-db.c (try_thread_db_load_from_sdir): New function.
4325 (try_thread_db_load_from_dir): New function.
4326 (thread_db_load_search): Handle $sdir, ignore $pdir.
4327 Remove trying of system directories if search of
4328 libthread-db-search-path fails, that is now done via $sdir.
4330 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4332 * server.c (handle_query): Add EnableDisableTracepoints to the list
4333 of supported features.
4334 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4336 (cmd_qtenable_disable): New.
4337 (cmd_qtstart): Install tracepoints even if disabled.
4338 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4339 receiving a QTEnable or QTDisable packet.
4340 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4341 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4343 (gdb_probe): Skip data collection if static tracepoint is disabled.
4345 2011-05-10 Doug Evans <dje@google.com>
4347 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4349 2011-05-04 Doug Evans <dje@google.com>
4351 * linux-low.c (linux_join): Skip process lookup.
4352 * spu-low.c (spu_join): Ditto.
4353 * server.c (join_inferiors_callback): Delete.
4354 (process_serial_event): For 'D' packet (detach) call join_inferior
4357 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4359 * README: Don't mention xscale*-*-linux*.
4360 * configure.srv (xscale*-*-linux*): Don't handle target.
4362 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4364 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4366 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4367 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4368 (i386_emit_void_call_2): Likewise.
4370 2011-04-26 Yao Qi <yao@codesourcery.com>
4372 * linux-low.c: Move common macros to linux-ptrace.h.
4373 Include linux-ptrace.h.
4374 * Makefile.in (linux_ptrace_h): New.
4375 (linux-low.o): Depends on linux-ptrace.h.
4377 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4379 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4380 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4381 (remote_prepare): New function with most of the TCP code from ...
4382 (remote_open): ... here. Detect PORT here unconditionally. Move also
4383 setting transport_is_reliable.
4384 * server.c (run_once): New variable.
4385 (gdbserver_usage): Document it.
4386 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4387 the first run if RUN_ONCE.
4388 * server.h (run_once, remote_prepare): New declarations.
4390 2011-04-19 Tom Tromey <tromey@redhat.com>
4392 * win32-low.c (handle_load_dll): Remove duplicate "the".
4394 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4396 Remove support for old Cygwin 1.5 versions.
4397 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4398 function to avoid warning.
4399 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4402 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4404 * gdbserver/server.h (Macro _): Define it if not available.
4406 2011-03-14 Michael Snyder <msnyder@vmware.com>
4408 * hostio.c (handle_close): Remove unnecessary null test.
4410 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4412 * Makefile.in (maintainer-clean realclean distclean): Remove
4413 "make ... subdir_do" command.
4415 2011-03-10 Michael Snyder <msnyder@vmware.com>
4417 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4419 * server.c (handle_v_run): Free alloced buffer on early return.
4421 2011-03-09 Yao Qi <yao@codesourcery.com>
4424 2011-03-04 Yao Qi <yao@codesourcery.com>
4426 * Makefile.in: Remove GNU make feature --directory.
4428 2011-03-05 Yao Qi <yao@codesourcery.com>
4430 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4431 (subdir_do): New make target. Copied from gdb/Makefile.
4432 (maintainer-clean, realclean, distclean, clean): Call corresponding
4433 make targets in common/Makefile.
4435 2011-02-11 Yao Qi <yao@codesourcery.com>
4437 * configure.ac: Call AC_PROG_RANLIB.
4438 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4439 * configure: Regenerate.
4441 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4443 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4445 2011-03-06 Yao Qi <yao@codesourcery.com>
4447 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4449 2011-03-05 Yao Qi <yao@codesourcery.com>
4451 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4452 (subdir_do): New make target. Copied from gdb/Makefile.
4453 (maintainer-clean, realclean, distclean, clean): Call corresponding
4454 make targets in common/Makefile.
4456 2011-03-04 Yao Qi <yao@codesourcery.com>
4458 * Makefile.in: Remove GNU make feature --directory.
4460 2011-03-04 Michael Snyder <msnyder@vmware.com>
4462 * server.c (queue_stop_reply): Call xmalloc not malloc.
4464 2011-03-02 Michael Snyder <msnyder@vmware.com>
4466 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4468 2011-02-28 Michael Snyder <msnyder@vmware.com>
4470 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4471 (cmd_qtframe): Ditto.
4472 (cmd_qtbuffer): Ditto.
4473 (cmd_bigqtbuffer): Ditto.
4475 * utils.c (decimal2str): Initialize 'width' to nine, then
4478 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4480 * hostio.c (require_data): Free *data, not data.
4482 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4484 * hostio.c (require_data): Use free, not xfree.
4486 2011-02-27 Michael Snyder <msnyder@vmware.com>
4488 * server.c (handle_query): Discard unused value.
4490 * hostio.c (require_data): Free malloc memory before returning
4493 2011-02-26 Michael Snyder <msnyder@vmware.com>
4495 * linux-low.c (list_threads): Call closedir for dirent.
4497 2011-02-27 Michael Snyder <msnyder@vmware.com>
4499 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4500 a case statement falls through.
4502 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4504 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4507 2011-02-26 Michael Snyder <msnyder@vmware.com>
4509 * utils.c (decimal2str): Eliminate dead code and dead param.
4510 (pulongest): Drop dead param from call to decimal2str.
4513 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4515 Revert the following patch (not approved yet):
4516 2011-02-21 Hui Zhu <teawater@gmail.com>
4517 * tracepoint.c (tp_printf): New function.
4518 (eval_agent_expr): Handle gdb_agent_op_printf.
4520 2011-02-21 Hui Zhu <teawater@gmail.com>
4522 * tracepoint.c (tp_printf): New function.
4523 (eval_agent_expr): Handle gdb_agent_op_printf.
4525 2011-02-18 Tom Tromey <tromey@redhat.com>
4527 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4528 (tracepoint.o): Likewise.
4529 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4530 (gdb_agent_op_names): Likewise.
4532 2011-02-18 Tom Tromey <tromey@redhat.com>
4534 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4535 gdb_agent_op_rot>: New constants.
4536 (gdb_agent_op_names): Add pick and roll.
4537 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4540 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4542 * aclocal.m4: Regenerated with aclocal-1.11.1.
4544 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4546 * server.c (handle_qxfer_traceframe_info): New.
4547 (qxfer_packets): Register "traceframe-info".
4548 (handle_query): Report support for qXfer:traceframe-info:read+.
4549 * tracepoint.c (match_blocktype): New.
4550 (traceframe_find_block_type): Rename to ...
4551 (traceframe_walk_blocks): ... this. Add callback filter argument,
4553 (traceframe_find_block_type): New, reimplemented on top of
4554 traceframe_walk_blocks.
4555 (build_traceframe_info_xml): New.
4556 (traceframe_read_info): New.
4557 * server.h (traceframe_read_info): Declare.
4559 2011-02-11 Yao Qi <yao@codesourcery.com>
4561 * configure.ac: Call AC_PROG_RANLIB.
4562 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4563 * configure: Regenerate.
4565 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4567 * server.c (gdb_read_memory): Change return semantics to allow
4569 (handle_search_memory_1): Adjust.
4570 (process_serial_event) <'m' packet>: Handle partial transfers.
4571 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4573 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4575 * regcache.c (init_register_cache): Initialize
4576 regcache->register_status.
4577 (free_register_cache): Release regcache->register_status.
4578 (regcache_cpy): Copy register_status.
4579 (registers_to_string): Print 'x's for unavailable registers.
4580 (supply_register): Mark the register's status valid or
4581 unavailable, depending on whether a buffer was passed in or not.
4582 (supply_register_zeroed): New.
4583 (supply_regblock): Mark the registers' status valid or
4584 unavailable, depending on whether a buffer was passed in or not.
4585 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4586 (struct regcache): New `register_status' field.
4587 (supply_register_zeroed): Declare.
4588 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4589 supply_register_zeroed, rather than passing a NULL buffer to
4591 * tracepoint.c (fetch_traceframe_registers): Update comment.
4593 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4595 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4598 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4600 * server.h (decode_xfer_write): Change prototype.
4601 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4602 and don't extract the annex here.
4603 * server.c (decode_xfer_read): Remove `annex' parameter,
4604 and don't extract the annex here.
4606 (struct qxfer): New.
4607 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4608 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4609 (handle_qxfer_statictrace): New functions, abstracted out from
4610 handle_query, and made to use the struct qxfer interface.
4611 (handle_threads_qxfer_proper): Rename to ...
4612 (handle_qxfer_threads_proper): ... this.
4613 (handle_threads_qxfer): Rename to ...
4614 (handle_qxfer_threads): ... this. Adjust.
4615 (qxfer_packets): New array.
4616 (handle_qxfer): New function.
4617 (handle_query): Use handle_qxfer.
4619 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4621 * gdbreplay.c: Shorten lines of >= 80 columns.
4622 * linux-low.c: Ditto.
4623 * linux-ppc-low.c: Ditto.
4624 * linux-s390-low.c: Ditto.
4625 * linux-sparc-low.c: Ditto.
4626 * linux-x86-low.c: Ditto.
4627 * linux-xtensa-low.c: Ditto.
4628 * mem-break.c: Ditto.
4630 * regcache.h: Ditto.
4631 * remote-utils.c: Ditto.
4634 * thread-db.c: Ditto.
4635 * tracepoint.c: Ditto.
4637 * win32-low.h: Ditto.
4639 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4641 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4644 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4646 * server.c (gdbserver_version): Update copyright year in version
4648 * gdbreplay.c (gdbreplay_version): Ditto.
4650 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4652 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4653 * linux-bfin-low.c: New file.
4654 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4655 PT_DATA_ADDR for BFIN targets.
4656 * Makefile.in (SFILES): Add linux-bfin-low.c.
4657 (clean): Remove reg-bfin.c.
4658 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4659 * README: Mention supported Blackfin targets.
4661 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4663 * .gitignore: New file.
4665 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4667 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4669 2010-10-22 Jie Zhang <jie@codesourcery.com>
4671 * Makefile.in: Add FLAGS_TO_PASS variable.
4672 (install): Remove dependency of install-only and recursively
4673 invoke make for install-only.
4675 2010-10-04 Doug Evans <dje@google.com>
4677 * Makefile.in (uninstall): Use $(DESTDIR).
4679 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4683 * linux-x86-low.c (compat_siginfo_from_siginfo)
4684 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4685 si_code is < 0. Check for si_code == SI_TIMER before checking for
4688 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4690 * lynx-i386-low.c: New file.
4691 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4693 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4695 * lynx-low.c (ptrace_request_to_str): Remove handling for
4696 request values that have been removed in LynxOS 5.x.
4698 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4700 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4703 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4705 * configure.ac: Add --enable-inprocess-agent option.
4706 * configure: Rebuilt.
4708 2010-09-06 Yao Qi <yao@codesourcery.com>
4710 * linux-low.c (linux_kill): Remove unused variable.
4711 (linux_stabilize_threads): Likewise.
4712 * server.c (start_inferior): Likewise.
4713 (queue_stop_reply_callback): Likewise.
4714 * tracepoint.c (do_action_at_tracepoint): Likewise.
4716 2010-09-06 Yao Qi <yao@codesourcery.com>
4718 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4721 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4723 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4725 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4727 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4730 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4732 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4733 gdbserver/lynx-ppc-low.c: New files.
4734 * Makefile.in (lynx_low_h): New variable.
4735 (lynx-low.o, lynx-ppc-low.o): New rules.
4736 * configure.ac: On LynxOS, link with -lnetinet.
4737 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4738 * configure: regenerate.
4740 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4742 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4743 * configure.ac: Add check for vasprintf and vsnprintf.
4744 * configure, config.in: Regenerate.
4745 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4747 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4749 * gdbreplay.c: Move include of alloca.h up, next to include of
4751 * server.h: Add include of malloc.h.
4752 * mem-break.c: Remove include of malloc.h.
4753 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4755 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4757 * Makefile.in (memmem.o): Build with -Wno-error.
4759 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4761 * utils.c (xsnprintf): Make non-static.
4762 * server.h: Add xsnprintf declaration.
4763 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4764 replace calls to snprintf by calls to xsnprintf throughout.
4766 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4768 * configure.ac: Add configure check for alloca.
4769 * configure, config.in: Regenerate.
4770 * server.h: Include alloca.h if it exists.
4771 * gdbreplay.c: Include alloca.h if it exists.
4773 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4775 * linux-low.c (__SIGRTMIN): Define if not already defined.
4776 (linux_create_inferior): Check for __ANDROID__ rather than
4778 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4779 are already deferred.
4780 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4781 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4782 stopped and already has a pending signal to report.
4783 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4784 a pending signal to report or is moving out of a jump pad.
4785 (linux_init_signals): Check for __ANDROID__ rather than
4788 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4790 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4791 debug_threads check. Avoid a linear search when not doing debug
4794 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4796 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4797 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4798 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4799 (process_event): Change local fd's type to gdb_fildes_t.
4800 (create_file_handler): Adjust prototype.
4801 (delete_file_handler): Adjust prototype.
4802 (handle_file_event): Adjust prototype. Use pfildes.
4803 (create_file_event): Adjsut prototype.
4804 * remote-utils.c (remote_desc, listen_desc): Change type to
4806 * server.h: New gdb_fildes_t typedef.
4807 [USE_WIN32API]: Include winsock2.h.
4808 (delete_file_handler, add_file_handler): Adjust prototypes.
4810 * utils.c (pfildes): New.
4812 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4814 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4815 * configure: Regenerate.
4817 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4819 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4820 (linux_done_accessing_memory): ... this.
4821 (linux_target_ops): Adjust.
4822 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4823 * nto-low.c (nto_target_ops): Adjust comment.
4824 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4825 * spu-low.c (spu_target_ops): Adjust comment.
4826 * target.h (target_ops): Rename unprepare_to_access_memory field
4827 to done_accessing_memory.
4828 (unprepare_to_access_memory): Rename to ...
4829 (done_accessing_memory): ... this.
4831 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4833 * linux-low.c (linux_prepare_to_access_memory): New.
4834 (linux_unprepare_to_access_memory): New.
4835 (linux_target_ops): Install them.
4836 * server.c (read_memory): Rename to ...
4837 (gdb_read_memory): ... this. Use
4838 prepare_to_access_memory/prepare_to_access_memory.
4839 (write_memory): Rename to ...
4840 (gdb_write_memory): ... this. Use
4841 prepare_to_access_memory/prepare_to_access_memory.
4842 (handle_search_memory_1): Adjust.
4843 (process_serial_event): Adjust.
4844 * target.h (struct target_ops): New fields
4845 prepare_to_access_memory and unprepare_to_access_memory.
4846 (prepare_to_access_memory, unprepare_to_access_memory): New.
4847 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4848 prepare_to_access_memory/prepare_to_access_memory.
4849 * nto-low.c (nto_target_ops): Adjust.
4850 * spu-low.c (spu_target_ops): Adjust.
4851 * win32-low.c (win32_target_ops): Adjust.
4853 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4855 * Makefile.in (WARN_CFLAGS): Get it from configure.
4856 (WERROR_CFLAGS): New.
4857 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4858 * configure.ac: Introduce --enable-werror, which adds -Werror to
4859 the compiler command line. Enabled by default. Disable with
4860 --disable-werror. Add -Wdeclaration-after-statement
4861 Wpointer-arith and -Wformat-nonliteral to warning flags.
4862 * configure: Regenerate.
4864 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4866 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4868 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4870 * gdbreplay.c (remote_error): New.
4872 (expect): Use gdbchar. Check for error reading from GDB.
4873 Clarify sync error output.
4874 (play): Check for errors writing to GDB.
4875 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4876 * remote-utils.c (getpkt): Check for errors writing to the remote
4879 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4881 * linux-low.c (linux_wait_1): Move non-debugging code out of
4882 `debug_threads' control.
4884 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4886 * linux-low.c (linux_wait_1): Don't set last_status here.
4887 * server.c (push_event, queue_stop_reply_callback): Assert we're
4888 not pushing a TARGET_WAITKIND_IGNORE event.
4889 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4890 (myresume, handle_target_event): Set the thread's last_resume_kind
4891 and last_status from the target returned status.
4893 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4897 * linux-x86-low.c (update_debug_registers_callback): New.
4898 (i386_dr_low_set_addr): Use it.
4899 (i386_dr_low_get_addr): New.
4900 (i386_dr_low_set_control): Use update_debug_registers_callback.
4901 (i386_dr_low_get_control): New.
4902 (i386_dr_low_get_status): Adjust.
4903 * linux-low.c (linux_stop_lwp): New.
4904 * linux-low.h (linux_stop_lwp): Declare.
4906 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4907 argument instead of a i386_debug_reg_state.
4908 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4909 a i386_debug_reg_state.
4910 (i386_insert_aligned_watchpoint): Adjust.
4911 (i386_remove_aligned_watchpoint): Adjust.
4912 (i386_low_stopped_data_address): Read the debug registers from the
4913 inferior instead of from the mirrors.
4914 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4915 (i386_dr_low_get_addr): Declare.
4916 (i386_dr_low_get_control): Declare.
4917 (i386_dr_low_get_status): Change prototype.
4919 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4920 (i386_dr_low_get_addr): New.
4921 (i386_dr_low_get_control): New.
4922 (i386_dr_low_get_status): Adjust prototype. Return
4924 (i386_initial_stuff): Clear dr_status_mirror and
4926 (i386_get_thread_context): Adjust.
4927 (i386_set_thread_context): Adjust.
4928 (i386_thread_added): Adjust.
4930 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4932 * linux-low.h (linux_thread_area): Delete declaration.
4934 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4936 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4937 after its termination.
4939 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4941 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4942 (gdb_wants_all_stopped): Delete.
4943 (linux_wait_1): Don't call them.
4944 * server.c (handle_v_cont): Tag all threads as want-stopped.
4945 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4946 stopped as "client-wants-stopped".
4948 2010-07-31 Pedro Alves <pedro@codesourcery.com>
4950 * Makefile.in (signals_h): New.
4951 (server_h): Depend on it.
4952 (server.o): Don't depend on $(signals_def).
4953 (signals.o): Depend on $(signals_def).
4955 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
4957 * Makefile.in (signals_def): New.
4958 (server_h): Append include/gdb/signals.h and signals_def.
4959 (server.o): Append signals_def.
4961 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4963 * server.c (handle_target_event): Use target_signal_to_host for
4964 resume_info.sig initialization.
4965 * target.h (struct thread_resume) <sig>: New comment.
4967 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
4969 * server.c (handle_query): strcpy() the returned string from paddress()
4970 instead of sprintf().
4971 * utils.c (paddress): Return phex_nz().
4973 2010-07-07 Joel Brobecker <brobecker@adacore.com>
4975 * server.c (handle_v_cont): Call mourn_inferior if process
4977 (myresume): Likewise.
4979 2010-07-01 Pedro Alves <pedro@codesourcery.com>
4981 Static tracepoints, and integration with UST.
4983 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
4984 * mem-break.c (uninsert_all_breakpoints)
4985 (reinsert_all_breakpoints): New.
4986 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
4987 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
4988 (gdb_agent_ust_loaded, helper_thread_id)
4989 (gdb_agent_helper_thread_id): New macros.
4990 (struct ipa_sym_addresses): Add addr_ust_loaded,
4991 addr_helper_thread_id, addr_cmd_buf.
4992 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
4993 (in_process_agent_loaded_ust): New.
4994 (write_e_ust_not_loaded): New.
4995 (maybe_write_ipa_ust_not_loaded): New.
4996 (struct collect_static_trace_data_action): New.
4997 (enum tracepoint_type) <static_tracepoint>: New.
4998 (struct tracepoint) <handle>: Mention static tracepoints.
4999 (struct static_tracepoint_ctx): New.
5000 (CMD_BUF_SIZE): New.
5001 (add_tracepoint_action): Handle static tracepoint actions.
5002 (unprobe_marker_at): New.
5003 (clear_installed_tracepoints): Handle static tracepoints.
5004 (cmd_qtdp): Handle static tracepoints.
5005 (probe_marker_at): New.
5006 (cmd_qtstart): Handle static tracepoints.
5007 (response_tracepoint): Handle static tracepoints.
5008 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5009 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5010 (get_context_regcache): Handle static tracepoints.
5011 (do_action_at_tracepoint): Handle static tracepoint actions.
5012 (traceframe_find_block_type): Handle static trace data blocks.
5013 (traceframe_read_sdata): New.
5014 (download_tracepoints): Download static tracepoint actions.
5015 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5016 (GDB_PROBE_NAME): New.
5021 (ust_marker_to_static_tracepoint): New.
5023 (collect_ust_data_at_tracepoint): New.
5024 (gdb_ust_probe): New.
5025 (UNIX_PATH_MAX, SOCK_DIR): New.
5026 (gdb_ust_connect_sync_socket): New.
5027 (resume_thread, stop_thread): New.
5028 (run_inferior_command): New.
5029 (init_named_socket): New.
5030 (gdb_ust_socket_init): New.
5031 (cstr_to_hexstr): New.
5033 (first_marker, next_marker): New.
5034 (response_ust_marker): New.
5035 (cmd_qtfstm, cmd_qtsstm): New.
5036 (unprobe_marker_at, probe_marker_at): New.
5037 (cmd_qtstmat, gdb_ust_thread): New.
5038 (gdb_ust_init): New.
5039 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5040 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5042 (x86_64_st_collect_regmap): New.
5043 (X86_64_NUM_ST_COLLECT_GREGS): New.
5044 (AMD64_RIP_REGNUM): New.
5045 (supply_static_tracepoint_registers): New.
5046 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5048 (i386_st_collect_regmap): New.
5049 (i386_NUM_ST_COLLECT_GREGS): New.
5050 (supply_static_tracepoint_registers): New.
5051 * server.c (handle_query): Handle qXfer:statictrace:read.
5052 <qSupported>: Report support for StaticTracepoints, and
5053 qXfer:statictrace:read features.
5054 * server.h (traceframe_read_sdata)
5055 (supply_static_tracepoint_registers): Declare.
5056 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5057 (unpack_varlen_hex): Include in IPA build.
5058 * Makefile.in (ustlibs, ustinc): New.
5059 (IPA_OBJS): Add remote-utils-ipa.o.
5060 ($(IPA_LIB)): Link -ldl and -lpthread.
5062 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5063 * config.in, configure: Regenerate.
5065 2010-06-20 Ian Lance Taylor <iant@google.com>
5066 Pedro Alves <pedro@codesourcery.com>
5068 * linux-x86-low.c (always_true): Delete.
5069 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5070 trying to fool the compiler with always_true.
5072 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5074 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5075 conditions in gdbserver.
5077 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5079 * spu-low.c (spu_read_memory): Wrap around local store limit.
5080 (spu_write_memory): Likewise.
5082 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5084 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5085 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5087 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5089 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5090 uses with LONGEST uses.
5092 2010-06-14 Stan Shebs <stan@codesourcery.com>
5093 Pedro Alves <pedro@codesourcery.com>
5097 * linux-x86-low.c: Include limits.h.
5102 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5103 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5104 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5105 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5106 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5107 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5108 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5109 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5110 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5111 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5112 (amd64_emit_void_call_2): New.
5113 (amd64_emit_ops): New.
5114 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5115 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5116 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5117 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5118 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5119 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5120 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5121 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5122 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5123 (i386_emit_stack_adjust, i386_emit_int_call_1)
5124 (i386_emit_void_call_2): New.
5125 (i386_emit_ops): New.
5126 (x86_emit_ops): New.
5127 (the_low_target): Install x86_emit_ops.
5128 * server.h (struct emit_ops): New.
5129 (get_raw_reg_func_addr): Declare.
5130 (current_insn_ptr, emit_error): Declare.
5131 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5132 (set_trace_state_variable_value): New defines.
5133 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5134 addr_get_trace_state_variable_value and
5135 addr_set_trace_state_variable_value.
5136 (symbol_list): New fields for get_raw_reg,
5137 get_trace_state_variable_value and set_trace_state_variable_value.
5138 (condfn): New typedef.
5139 (struct tracepoint): New field `compiled_cond'.
5140 (do_action_at_tracepoint): Clear compiled_cond.
5141 (get_trace_state_variable_value, set_trace_state_variable_value):
5143 (condition_true_at_tracepoint): If there's a compiled condition,
5145 (current_insn_ptr, emit_error): New globals.
5146 (struct bytecode_address): New.
5147 (get_raw_reg_func_addr): New.
5148 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5149 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5150 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5151 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5152 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5153 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5154 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5155 (compile_tracepoint_condition, compile_bytecodes): New.
5156 * target.h (emit_ops): Forward declare.
5157 (struct target_ops): New field emit_ops.
5158 (target_emit_ops): New.
5159 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5160 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5161 * linux-low.c (linux_emit_ops): New.
5162 (linux_target_ops): Install it.
5163 * linux-low.h (struct linux_target_ops): New field emit_ops.
5165 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5167 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5168 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5170 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5171 Stan Shebs <stan@codesourcery.com>
5173 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5174 (all): Depend on $(extra_libraries).
5175 (install-only): Install the IPA.
5176 (IPA_OBJS, IPA_LIB): New.
5177 (clean): Remove the IPA lib.
5178 (IPAGENT_CFLAGS): New.
5179 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5180 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5181 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5182 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5183 * configure.ac: Check for atomic builtins support in the compiler.
5184 (IPA_DEPFILES, extra_libraries): Define.
5185 * configure.srv (ipa_obj): Add description.
5186 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5187 (i[34567]86-*-linux*): Set ipa_obj.
5188 (x86_64-*-linux*): Set ipa_obj.
5189 * linux-low.c (stabilizing_threads): New.
5190 (supports_fast_tracepoints): New.
5191 (linux_detach): Stabilize threads before detaching.
5192 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5193 the lwp is either not stabilizing, or is moving out of a jump pad.
5194 (linux_fast_tracepoint_collecting): New.
5195 (maybe_move_out_of_jump_pad): New.
5196 (enqueue_one_deferred_signal): New.
5197 (dequeue_one_deferred_signal): New.
5198 (linux_wait_for_event_1): If moving out of a jump pad, defer
5199 pending signals to later.
5200 (linux_stabilize_threads): New.
5201 (linux_wait_1): Check if threads need moving out of jump pads, and
5203 (stuck_in_jump_pad_callback): New.
5204 (move_out_of_jump_pad_callback): New.
5206 (linux_resume_one_lwp): Handle moving out of jump pads.
5207 (linux_set_resume_request): Dequeue deferred signals.
5208 (need_step_over_p): Also step over fast tracepoint jumps.
5209 (start_step_over): Also uninsert fast tracepoint jumps.
5210 (finish_step_over): Also reinsert fast tracepoint jumps.
5211 (linux_install_fast_tracepoint_jump): New.
5212 (linux_target_ops): Install linux_stabilize_threads and
5213 linux_install_fast_tracepoint_jump_pad.
5214 * linux-low.h (linux_target_ops) <get_thread_area,
5215 install_fast_tracepoint_jump_pad>: New fields.
5216 (struct lwp_info) <collecting_fast_tracepoint,
5217 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5218 (linux_get_thread_area): Declare.
5219 * linux-x86-low.c (jump_insn): New.
5220 (x86_get_thread_area): New.
5221 (append_insns): New.
5223 (amd64_install_fast_tracepoint_jump_pad): New.
5224 (i386_install_fast_tracepoint_jump_pad): New.
5225 (x86_install_fast_tracepoint_jump_pad): New.
5226 (the_low_target): Install x86_get_thread_area and
5227 x86_install_fast_tracepoint_jump_pad.
5228 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5229 (struct fast_tracepoint_jump): New.
5230 (fast_tracepoint_jump_insn): New.
5231 (fast_tracepoint_jump_shadow): New.
5232 (find_fast_tracepoint_jump_at): New.
5233 (fast_tracepoint_jump_here): New.
5234 (delete_fast_tracepoint_jump): New.
5235 (set_fast_tracepoint_jump): New.
5236 (uninsert_fast_tracepoint_jumps_at): New.
5237 (reinsert_fast_tracepoint_jumps_at): New.
5238 (set_breakpoint_at): Use write_inferior_memory.
5239 (uninsert_raw_breakpoint): Use write_inferior_memory.
5240 (check_mem_read): Mask out fast tracepoint jumps.
5241 (check_mem_write): Mask out fast tracepoint jumps.
5242 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5243 (set_fast_tracepoint_jump): Declare.
5244 (delete_fast_tracepoint_jump)
5245 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5246 (reinsert_fast_tracepoint_jumps_at): Declare.
5247 * regcache.c: Don't compile many functions when building the
5248 in-process agent library.
5249 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5250 the register buffer in the heap.
5251 (free_register_cache): If the register buffer isn't owned by the
5252 regcache, don't free it.
5253 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5254 pre-existing register caches.
5255 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5257 (convert_ascii_to_int): : Constify `from' parameter type.
5258 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5259 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5260 the needed buffer in-place.
5261 (relocate_instruction): New.
5262 * server.c (handle_query) <qSymbols>: If the target supports
5263 tracepoints, give it a chance of looking up symbols. Report
5264 support for fast tracepoints.
5265 (handle_status): Stabilize threads.
5266 (process_serial_event): Adjust.
5267 * server.h (struct fast_tracepoint_jump): Forward declare.
5268 (struct process_info) <fast_tracepoint_jumps>: New field.
5269 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5270 (decode_X_packet, decode_M_packet): Adjust.
5271 (relocate_instruction): Declare.
5272 (in_process_agent_loaded): Declare.
5273 (tracepoint_look_up_symbols): Declare.
5274 (struct fast_tpoint_collect_status): Declare.
5275 (fast_tracepoint_collecting): Declare.
5276 (force_unlock_trace_buffer): Declare.
5277 (handle_tracepoint_bkpts): Declare.
5278 (initialize_low_tracepoint)
5279 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5280 * target.h (struct target_ops) <stabilize_threads,
5281 install_fast_tracepoint_jump_pad>: New fields.
5282 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5283 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5284 [HAVE_STDINT_H]: Include stdint.h.
5285 (trace_debug_1): Rename to ...
5286 (trace_vdebug): ... this.
5287 (trace_debug): Rename to ...
5288 (trace_debug_1): ... this. Add `level' parameter.
5290 (ATTR_USED, ATTR_NOINLINE): New.
5291 (IP_AGENT_EXPORT): New.
5292 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5293 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5294 (about_to_request_buffer_space, trace_buffer_is_full)
5295 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5296 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5297 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5298 (traceframe_write_count, traceframes_created)
5299 (trace_state_variables)
5300 New renaming defines.
5301 (struct ipa_sym_addresses): New.
5302 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5304 (ipa_sym_addrs): New.
5305 (all_tracepoint_symbols_looked_up): New.
5306 (in_process_agent_loaded): New.
5307 (write_e_ipa_not_loaded): New.
5308 (maybe_write_ipa_not_loaded): New.
5309 (tracepoint_look_up_symbols): New.
5310 (debug_threads) [IN_PROCESS_AGENT]: New.
5311 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5312 (UNKNOWN_SIDE_EFFECTS): New.
5313 (stop_tracing): New.
5314 (flush_trace_buffer): New.
5315 (stop_tracing_bkpt): New.
5316 (flush_trace_buffer_bkpt): New.
5317 (read_inferior_integer): New.
5318 (read_inferior_uinteger): New.
5319 (read_inferior_data_pointer): New.
5320 (write_inferior_data_pointer): New.
5321 (write_inferior_integer): New.
5322 (write_inferior_uinteger): New.
5323 (struct collect_static_trace_data_action): Delete.
5324 (enum tracepoint_type): New.
5325 (struct tracepoint) <type>: New field `type'.
5326 <actions_str, step_actions, step_actions_str>: Only include in
5328 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5329 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5330 (tracepoints): Use IP_AGENT_EXPORT.
5331 (last_tracepoint): Don't include in the IPA.
5332 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5333 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5334 (alloced_trace_state_variables): New.
5335 (trace_state_variables): Use IP_AGENT_EXPORT.
5336 (traceframe_t): Delete unused variable.
5337 (circular_trace_buffer): Don't include in the IPA.
5338 (trace_buffer_start): Delete.
5339 (struct trace_buffer_control): New.
5340 (trace_buffer_free): Delete.
5341 (struct ipa_trace_buffer_control): New.
5342 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5343 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5345 (trace_buffer_ctrl): New.
5346 (TRACE_BUFFER_CTRL_CURR): New.
5347 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5348 Reimplement as macros.
5349 (trace_buffer_wrap): Delete.
5350 (traceframe_write_count, traceframe_read_count)
5351 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5352 (struct tracepoint_hit_ctx) <type>: New field.
5353 (struct fast_tracepoint_ctx): New.
5354 (memory_barrier): New.
5356 (record_tracepoint_error): Update atomically in the IPA.
5357 (clear_inferior_trace_buffer): New.
5358 (about_to_request_buffer_space): New.
5359 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5360 updating the same buffer.
5361 (add_tracepoint): Default the tracepoint's type to trap
5362 tracepoint, and orig_size to -1.
5363 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5365 (create_trace_state_variable): New parameter `gdb'. Handle it.
5366 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5367 (cmd_qtdp): Handle fast tracepoints.
5369 (max_jump_pad_size): New.
5370 (gdb_jump_pad_head): New.
5371 (get_jump_space_head): New.
5372 (claim_jump_space): New.
5373 (sort_tracepoints): New.
5374 (MAX_JUMP_SIZE): New.
5375 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5377 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5378 support. Upload fast traceframes, and delete internal IPA
5380 (stop_tracing_handler): New.
5381 (flush_trace_buffer_handler): New.
5382 (cmd_qtstop): Upload fast tracepoints.
5383 (response_tracepoint): Handle fast tracepoints.
5384 (tracepoint_finished_step): Upload fast traceframes. Set the
5385 tracepoint hit context's tracepoint type.
5386 (handle_tracepoint_bkpts): New.
5387 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5388 type. Add comment about fast tracepoints.
5389 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5390 non-existing action_str field.
5391 (get_context_regcache): Handle fast tracepoints.
5392 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5394 (fast_tracepoint_from_jump_pad_address): New.
5395 (fast_tracepoint_from_ipa_tpoint_address): New.
5396 (collecting_t): New.
5397 (force_unlock_trace_buffer): New.
5398 (fast_tracepoint_collecting): New.
5401 (write_inferior_data_ptr): New.
5402 (target_tp_heap): New.
5403 (target_malloc): New.
5404 (download_agent_expr): New.
5406 (download_tracepoints): New.
5407 (download_trace_state_variables): New.
5408 (upload_fast_traceframes): New.
5409 (IPA_FIRST_TRACEFRAME): New.
5410 (IPA_NEXT_TRACEFRAME_1): New.
5411 (IPA_NEXT_TRACEFRAME): New.
5412 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5413 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5414 (gdb_jump_pad_buffer_end): New.
5415 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5416 (initialize_tracepoint): Adjust.
5417 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5418 buffer. Initialize the low module.
5419 * utils.c (PREFIX, TOOLNAME): New.
5420 (malloc_failure): Use PREFIX.
5421 (error): In the IPA, an error causes an exit.
5422 (fatal, warning): Use PREFIX.
5423 (internal_error): Use TOOLNAME.
5424 (NUMCELLS): Increase to 10.
5425 * configure, config.in: Regenerate.
5427 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5429 * server.c (handle_query) <qSupported>: Do two passes over the
5430 qSupported string to avoid nesting strtok.
5432 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5434 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5436 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5438 * configure: Regenerate.
5439 * proc-service.list: New.
5441 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5443 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5446 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5448 * gdbreplay.c (remote_open): Check error return from socket() call by
5449 its equality to -1 not by it being negative.
5450 * remote-utils.c (remote_open): Likewise.
5452 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5454 * config.h: Regenerate.
5456 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5458 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5459 doesn't provide PTRACE_GET_THREAD_AREA.
5461 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5463 * linux-m68k-low.c: Include <asm/ptrace.h>
5464 (ps_get_thread_area): Implement.
5466 2010-05-03 Doug Evans <dje@google.com>
5468 * event-loop.c (struct callback_event): New struct.
5469 (callback_list): New global.
5470 (append_callback_event, delete_callback_event): New functions.
5471 (process_callback): New function.
5472 (start_event_loop): Call it.
5473 * remote-utils.c (NOT_SCHEDULED): Define.
5474 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5475 moved out of readchar.
5476 (readchar): Rewrite. Call reschedule before returning.
5477 (reset_readchar): New function.
5478 (remote_close): Call it.
5479 (process_remaining, reschedule): New functions.
5480 * server.h (callback_handler_func): New typedef.
5481 (append_callback_event, delete_callback_event): Declare.
5483 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5485 * proc-service.c (ps_pglobal_lookup): Use
5486 thread_db_look_up_one_symbol.
5487 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5488 parameter. Use it instead of all_symbols_looked_up.
5489 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5491 (all_symbols_looked_up): Don't declare.
5492 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5493 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5495 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5496 Set all_symbols_looked_up here.
5497 (thread_db_look_up_one_symbol): New.
5498 (thread_db_get_tls_address): Adjust.
5499 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5500 thread_db object on the heap, and tentatively set it in the
5502 (thread_db_init): Don't set all_symbols_looked_up here.
5503 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5505 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5507 * linux-low.c (linux_kill, linux_detach): Adjust.
5508 (status_pending_p_callback): Remove redundant statement. Check
5509 for !TARGET_WAITIKIND_IGNORE, instead of
5510 TARGET_WAITKIND_STOPPED.
5511 (handle_tracepoints): Make sure LWP is locked. Adjust.
5512 (linux_wait_for_event_1): Adjust.
5513 (linux_cancel_breakpoints): New.
5514 (unsuspend_one_lwp): New.
5515 (unsuspend_all_lwps): New.
5516 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5517 (send_sigstop_callback): Change return type to int, add new
5518 `except' parameter and handle it.
5519 (suspend_and_send_sigstop_callback): New.
5520 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5521 pass them down. If SUSPEND, also increment the lwp's suspend
5523 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5524 (need_step_over_p): Don't consider suspended LWPs.
5525 (start_step_over): Adjust.
5526 (proceed_one_lwp): Change return type to int, add new `except'
5527 parameter and handle it.
5528 (unsuspend_and_proceed_one_lwp): New.
5529 (proceed_all_lwps): Use find_inferior instead of
5531 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5532 also decrement the suspend count of LWPs. Pass `except' down,
5533 instead of hacking its suspend count.
5534 (linux_pause_all): Add `freeze' parameter. Adjust.
5535 (linux_unpause_all): New.
5536 (linux_target_ops): Install linux_unpause_all.
5537 * server.c (handle_status): Adjust.
5538 * target.h (struct target_ops): New fields `unpause_all' and
5539 `cancel_breakpoints'. Add new parameter to `pause_all'.
5540 (pause_all): Add new `freeze' parameter.
5542 (cancel_breakpoints): New.
5543 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5545 (cmd_qtstart): Pause threads.
5546 (stop_tracing): Pause threads, and cancel breakpoints.
5547 * win32-low.c (win32_target_ops): Adjust.
5549 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5551 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5552 the inferior right away from here...
5553 (linux_wait_1): ... to here, and adjust to check the thread's
5554 last_resume_kind instead of the lwp's step or stop_expected flags.
5556 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5558 * README: Use consistent `GDB' and `GDBserver' spellings.
5560 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5562 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5563 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5564 (linux_detach_one_lwp): Assume the lwp is stopped.
5565 (any_thread_of): Delete.
5566 (linux_detach): Stop all lwps here. Don't blindly delete all
5568 (delete_lwp_callback): New.
5569 (linux_mourn): Delete all lwps of the process that is gone.
5570 (linux_wait_1): Don't delete the last lwp of the process here.
5571 * mem-break.h (mark_breakpoints_out): Declare.
5572 * mem-break.c (mark_breakpoints_out): New.
5573 (free_all_breakpoints): Use it.
5574 * server.c (handle_target_event): If the process is gone, mark
5576 * thread-db.c (struct thread_db) <create_bp>: New field.
5577 (thread_db_enable_reporting): Fix prototype. Store a thread event
5578 breakpoint reference in the thread_db struct.
5579 (thread_db_load_search): Clear the thread_db object.
5580 (try_thread_db_load_1): Ditto.
5581 (switch_to_process): New.
5582 (disable_thread_event_reporting): Use it.
5583 (remove_thread_event_breakpoints): New.
5584 (thread_db_detach, thread_db_mourn): Use it.
5586 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5588 * linux-low.c (linux_enable_event_reporting): New.
5589 (linux_wait_for_event_1, handle_extended_wait): Use it.
5591 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5593 * linux-low.c (linux_kill_one_lwp, linux_kill)
5594 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5595 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5596 SIGSTOP even if the LWP is stopped.
5597 (send_sigstop_callback): New.
5598 (stop_all_lwps): Use send_sigstop_callback instead.
5599 (linux_resume_one_thread): Adjust.
5600 (proceed_one_lwp): Still proceed an LWP that the client has
5601 requested to stop, if we haven't reported it as stopped yet. Make
5602 sure that LWPs the client want stopped, have a pending SIGSTOP.
5604 2010-04-26 Doug Evans <dje@google.com>
5606 * server.c (handle_general_set): Make static.
5608 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5609 Print received char after testing for error/eof instead of before.
5610 (input_interrupt): Tweak comment.
5612 2010-04-23 Doug Evans <dje@google.com>
5614 * server.c (start_inferior): Print inferior argv if --debug.
5616 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5618 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5619 * nto-x86-low.c: Include server.h
5621 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5623 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5624 be consistent with other sources of this directory.
5625 (init_registers_amd64): Correct name of source file of this function
5628 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5630 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5633 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5635 * win32-i386-low.c: Add 64-bit support.
5636 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5637 (init_registers_amd64): Declare.
5638 (mappings): Add 64-bit version of array.
5639 (init_windows_x86): New function.
5640 (the_low_target): Change init_arch field to init_windows_x86.
5642 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5644 * win32-low.c: Adapt to support also 64-bit architecture.
5645 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5646 (get_image_name): Use SIZE_T type for local variable `done'.
5647 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5648 (toolhelp_get_dll_name): Idem.
5649 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5650 Use uintptr_t typecast to avoid warning.
5651 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5652 (handle_exception): Use phex_nz to avoid warning.
5653 (win32_wait): Remove unused local variable `process'.
5655 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5657 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5660 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5662 * configure.ac: Use `ws2_32' library for srv_mingw.
5663 * configure: Regenerate.
5664 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5665 * remote-utils.c: Likewise.
5667 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5669 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5670 if __x86_64__ is defined.
5672 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5674 * configure: Regenerate.
5676 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5678 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5679 * target.h (target_ops): New get_tib_address field.
5680 * win32-low.h (win32_thread_info): Add thread_local_base field.
5681 * win32-low.c (child_add_thread): Add tlb argument.
5682 Set thread_local_base field to TLB.
5683 (get_child_debug_event): Adapt to child_add_thread change.
5684 (win32_get_tib_address): New function.
5685 (win32_target_ops): Set get_tib_address field to
5686 win32_get_tib_address.
5687 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5689 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5691 * linux-low.c (linux_mourn): Also remove the process.
5692 * server.c (handle_target_event): Don't remove the process here.
5693 * nto-low.c (nto_mourn): New.
5694 (nto_target_ops): Install it.
5695 * spu-low.c (spu_mourn): New.
5696 (spu_target_ops): Install it.
5697 * win32-low.c (win32_mourn): New.
5698 (win32_target_ops): Install it.
5700 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5702 * server.h (buffer_xml_printf): Remove redundant `;'.
5704 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5706 * regcache.c (set_register_cache): Invalidate regcaches before
5707 changing the register cache layout.
5708 (regcache_invalidate_one): Allow a NULL regcache.
5709 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5710 regcaches before changing the register cache layout or the target
5713 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5715 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5716 variable warning on Linux/x86-64.
5718 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5720 GDBserver disconnected tracing support.
5722 * linux-low.c (linux_remove_process): Delete.
5723 (add_lwp): Don't set last_resume_kind here.
5724 (linux_kill): Use `mourn'.
5725 (linux_detach): Use `thread_db_detach', and `mourn'.
5727 (linux_attach_lwp_1): Adjust comment.
5728 (linux_attach): last_resume_kind moved the thread_info; adjust.
5729 (status_pending_p_callback): Adjust.
5730 (linux_wait_for_event_1): Adjust.
5731 (count_events_callback, select_singlestep_lwp_callback)
5732 (select_event_lwp_callback, cancel_breakpoints_callback)
5733 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5734 (proceed_one_lwp): Adjust.
5735 (linux_async): Add debug output.
5736 (linux_thread_stopped): New.
5737 (linux_pause_all): New.
5738 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5740 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5741 (thread_db_free): Delete declaration.
5742 (thread_db_detach, thread_db_mourn): Declare.
5743 * thread-db.c (thread_db_init): Use thread_db_mourn.
5744 (thread_db_free): Delete, split in two.
5745 (disable_thread_event_reporting): New.
5746 (thread_db_detach): New.
5747 (thread_db_mourn): New.
5749 * server.h (struct thread_info) <last_resume_kind>: New field.
5750 <attached>: Add comment.
5751 <gdb_detached>: New field.
5752 (handler_func): Change return type to int.
5753 (handle_serial_event, handle_target_event): Ditto.
5754 (gdb_connected): Declare.
5756 (disconnected_tracing): Declare.
5757 (stop_tracing): Declare.
5759 * server.c (handle_query) <qSupported>: Report support for
5760 disconnected tracing.
5761 (queue_stop_reply_callback): Account for running threads.
5762 (gdb_wants_thread_stopped): New.
5763 (gdb_wants_all_threads_stopped): New.
5764 (gdb_reattached_process): New.
5765 (handle_status): Clear the `gdb_detached' flag of all processes.
5766 In all-stop, stop all threads.
5767 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5768 (process_serial_event): If the remote connection breaks, or if an
5769 exit was forced with "monitor exit", force an event loop exit.
5770 Handle disconnected tracing on detach.
5771 (handle_serial_event): Adjust.
5772 (handle_target_event): If GDB isn't connected, forward events back
5773 to the inferior, unless the last process exited, in which case,
5774 exit gdbserver. Adjust interface.
5776 * remote-utils.c (remote_open): Don't block in accept. Instead
5777 register an event loop source on the listen socket file
5778 descriptor. Refactor bits into ...
5779 (listen_desc): ... this new global.
5780 (gdb_connected): ... this new function.
5781 (enable_async_notification): ... this new function.
5782 (handle_accept_event): ... this new function.
5783 (remote_close): Clear remote_desc.
5785 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5787 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5789 (mourn_inferior): Define.
5790 (target_process_qsupported): Avoid the dangling else problem.
5791 (thread_stopped): Define.
5792 (pause_all): Define.
5793 (target_waitstatus_to_string): Declare.
5794 * target.c (target_waitstatus_to_string): New.
5796 * tracepoint.c (tracing): Make extern.
5797 (disconnected_tracing): New.
5798 (stop_tracing): Make extern. Handle tracing stops due to GDB
5800 (cmd_qtdisconnected): New.
5801 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5802 (handle_tracepoint_general_set): Handle QTDisconnected.
5804 * event-loop.c (event_handler_func): Change return type to int.
5805 (process_event): Bail out if the event handler wants the event
5807 (handle_file_event): Ditto.
5808 (start_event_loop): Bail out if the event handler wants the event
5811 * nto-low.c (nto_target_ops): Adjust.
5812 * spu-low.c (spu_wait): Don't remove the process here.
5813 (spu_target_ops): Adjust.
5814 * win32-low.c (win32_wait): Don't remove the process here.
5815 (win32_target_ops): Adjust.
5817 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5819 * regcache.c (realloc_register_cache): Invalidate inferior's
5820 regcache before recreating it.
5822 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5824 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5826 2010-04-09 Stan Shebs <stan@codesourcery.com>
5827 Pedro Alves <pedro@codesourcery.com>
5829 * server.h (LONGEST): New.
5830 (struct thread_info) <while_stepping>: New field.
5831 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5833 (initialize_tracepoint, handle_tracepoint_general_set)
5834 (handle_tracepoint_query, tracepoint_finished_step)
5835 (tracepoint_was_hit, release_while_stepping_state_list):
5836 (current_traceframe): Declare.
5837 * server.c (handle_general_set): Handle tracepoint packets.
5839 (write_memory): New.
5840 (handle_search_memory_1): Use read_memory.
5841 (handle_query): Report support for conditional tracepoints, trace
5842 state variables, and tracepoint sources. Handle tracepoint
5844 (main): Initialize the tracepoints module.
5845 (process_serial_event): Handle traceframe reads/writes.
5847 * linux-low.c (handle_tracepoints): New.
5848 (linux_wait_1): Call it.
5849 (linux_resume_one_lwp): Handle while-stepping.
5850 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5851 (linux_target_ops): Install them.
5852 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5854 * linux-x86-low.c (x86_supports_tracepoints): New.
5855 (the_low_target). Install it.
5857 * mem-break.h (delete_breakpoint): Declare.
5858 * mem-break.c (delete_breakpoint): Make external.
5860 * target.h (struct target_ops): Add `supports_tracepoints',
5861 `read_pc', and `write_pc' fields.
5862 (target_supports_tracepoints): Define.
5863 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5866 * regcache.h (struct regcache) <registers_owned>: New field.
5867 (init_register_cache, regcache_cpy): Declare.
5868 (regcache_read_pc, regcache_write_pc): Declare.
5869 (register_cache_size): Declare.
5870 (supply_regblock): Declare.
5871 * regcache.c (init_register_cache): New.
5872 (new_register_cache): Use it.
5873 (regcache_cpy): New.
5874 (register_cache_size): New.
5875 (supply_regblock): New.
5876 (regcache_read_pc, regcache_write_pc): New.
5878 * tracepoint.c: New.
5880 * Makefile.in (OBS): Add tracepoint.o.
5881 (tracepoint.o): New rule.
5883 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5885 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5887 (i386-mmx.c): Likewise.
5888 (i386-mmx-linux.o): Likewise.
5889 (i386-mmx-linux.c): Likewise.
5891 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5892 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5893 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5894 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5896 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5897 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5898 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5900 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5902 * Makefile.in (clean): Updated.
5904 (i386-avx.c): Likewise.
5905 (i386-avx-linux.o): Likewise.
5906 (i386-avx-linux.c): Likewise.
5907 (amd64-avx.o): Likewise.
5908 (amd64-avx.c): Likewise.
5909 (amd64-avx-linux.o): Likewise.
5910 (amd64-avx-linux.c): Likewise.
5912 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5913 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5914 (srv_amd64_regobj): Add amd64-avx.o.
5915 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5916 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5917 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5918 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5919 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5920 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5921 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5923 * i387-fp.c: Include "i386-xstate.h".
5925 (i387_cache_to_xsave): Likewise.
5926 (i387_xsave_to_cache): Likewise.
5927 (x86_xcr0): Likewise.
5929 * i387-fp.h (i387_cache_to_xsave): Likewise.
5930 (i387_xsave_to_cache): Likewise.
5931 (x86_xcr0): Likewise.
5933 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5934 * linux-crisv32-low.c (target_regsets): Likewise.
5935 * linux-m68k-low.c (target_regsets): Likewise.
5936 * linux-mips-low.c (target_regsets): Likewise.
5937 * linux-ppc-low.c (target_regsets): Likewise.
5938 * linux-s390-low.c (target_regsets): Likewise.
5939 * linux-sh-low.c (target_regsets): Likewise.
5940 * linux-sparc-low.c (target_regsets): Likewise.
5941 * linux-xtensa-low.c (target_regsets): Likewise.
5943 * linux-low.c: Include <sys/uio.h>.
5944 (regsets_fetch_inferior_registers): Support nt_type.
5945 (regsets_store_inferior_registers): Likewise.
5946 (linux_process_qsupported): New.
5947 (linux_target_ops): Add linux_process_qsupported.
5949 * linux-low.h (regset_info): Add nt_type.
5950 (linux_target_ops): Add process_qsupported.
5952 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5954 (init_registers_i386_avx_linux): New.
5955 (init_registers_amd64_avx_linux): Likewise.
5956 (xmltarget_i386_linux_no_xml): Likewise.
5957 (xmltarget_amd64_linux_no_xml): Likewise.
5958 (PTRACE_GETREGSET): Likewise.
5959 (PTRACE_SETREGSET): Likewise.
5960 (x86_fill_xstateregset): Likewise.
5961 (x86_store_xstateregset): Likewise.
5962 (use_xml): Likewise.
5963 (x86_linux_update_xmltarget): Likewise.
5964 (x86_linux_process_qsupported): Likewise.
5965 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
5966 (x86_arch_setup): Don't call init_registers_amd64_linux nor
5967 init_registers_i386_linux here. Call
5968 x86_linux_update_xmltarget.
5969 (the_low_target): Add x86_linux_process_qsupported.
5971 * server.c (handle_query): Call target_process_qsupported.
5973 * target.h (target_ops): Add process_qsupported.
5974 (target_process_qsupported): New.
5976 2010-04-03 Pedro Alves <pedro@codesourcery.com>
5978 * inferiors.c (add_thread): Set last_status kind to
5979 TARGET_WAITKIND_IGNORE.
5980 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
5981 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
5982 (linux_wait_1): Move `thread' local definition to block that uses
5983 it. Don't NULL initialize `event_child'.
5984 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
5985 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
5986 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
5988 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5990 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
5991 an extended waitstatus, or by a watchpoint.
5992 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
5993 thread was stepping or has been stopped by a watchpoint.
5995 2010-04-01 Pedro Alves <pedro@codesourcery.com>
5997 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
5998 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
5999 of another, then delete the previous, and validate all
6001 (validate_inserted_breakpoint): New.
6002 (delete_disabled_breakpoints): New.
6003 (validate_breakpoints): New.
6004 (check_mem_read): Validate breakpoints before trusting their
6005 shadow. Delete disabled breakpoints.
6006 (check_mem_write): Validate breakpoints before trusting they
6007 should be inserted. Delete disabled breakpoints.
6008 * mem-break.h (validate_breakpoints):
6009 * server.c (handle_query): Validate breakpoints when we see a
6012 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6014 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6015 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6016 if we could tell there's a GDB breakpoint at stop_pc.
6017 (need_step_over_p): Don't do a step over if we find a GDB
6018 breakpoint at the resume PC.
6020 * mem-break.c (struct raw_breakpoint): New.
6021 (enum bkpt_type): New type `gdb_breakpoint'.
6022 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6023 fields. New field `raw'.
6024 (find_raw_breakpoint_at): New.
6025 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6027 (set_breakpoint_at): Adjust.
6028 (delete_raw_breakpoint): New.
6029 (release_breakpoint): New.
6030 (delete_breakpoint): Rename to...
6031 (delete_breakpoint_1): ... this. Add proc parameter. Use
6032 release_breakpoint. Return ENOENT.
6033 (delete_breakpoint): Reimplement.
6034 (find_breakpoint_at): Delete.
6035 (find_gdb_breakpoint_at): New.
6036 (delete_breakpoint_at): Delete.
6037 (set_gdb_breakpoint_at): New.
6038 (delete_gdb_breakpoint_at): New.
6039 (gdb_breakpoint_here): New.
6040 (set_reinsert_breakpoint): Use release_breakpoint.
6041 (uninsert_breakpoint): Rename to ...
6042 (uninsert_raw_breakpoint): ... this.
6043 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6044 (reinsert_raw_breakpoint): Change parameter type to
6046 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6048 (check_breakpoints): Adjust. Use release_breakpoint.
6049 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6050 (breakpoint_inserted_here): Ditto.
6051 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6052 Don't trust the breakpoint's shadow if it is not inserted.
6053 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6054 (delete_all_breakpoints): Adjust.
6055 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6056 use delete_breakpoint_1.
6058 * mem-break.h (breakpoints_supported): Delete declaration.
6059 (set_gdb_breakpoint_at): Declare.
6060 (gdb_breakpoint_here): Declare.
6061 (delete_breakpoint_at): Delete.
6062 (delete_gdb_breakpoint_at): Declare.
6064 * server.h (struct raw_breakpoint): Forward declare.
6065 (struct process_info): New field `raw_breakpoints'.
6067 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6070 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6072 * linux-low.c (status_pending_p_callback): Fix comment.
6073 (linux_wait_for_event_1): Move most of the internal breakpoint
6074 handling from here...
6075 (linux_wait_1): ... to here.
6076 (count_events_callback): New.
6077 (select_singlestep_lwp_callback): New.
6078 (select_event_lwp_callback): New.
6079 (cancel_breakpoints_callback): New.
6080 (select_event_lwp): New.
6081 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6082 priority to all LWPs that have had events that should be reported
6083 to the client. Cancel breakpoints when about to reporting the
6084 event to the client, not while stopping lwps. No longer cancel
6085 finished single-steps here.
6086 (cancel_finished_single_step): Delete.
6087 (cancel_finished_single_steps): Delete.
6089 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6091 * mem-break.c (enum bkpt_type): New.
6092 (struct breakpoint): New field `type'.
6093 (set_breakpoint_at): Change return type to struct breakpoint
6094 pointer. Set type to `other_breakpoint' by default.
6095 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6096 in the breakpoint list.
6097 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6098 (reinsert_breakpoint): Rename to ...
6099 (reinsert_raw_breakpoint): ... this.
6100 (reinsert_breakpoints_at): Adjust.
6101 * mem-break.h (struct breakpoint): Declare.
6102 (set_breakpoint_at): Change return type to struct breakpoint
6105 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6107 * server.c (handle_query): Assign, not compare.
6109 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6111 Teach linux gdbserver to step-over-breakpoints.
6113 * linux-low.c (can_hardware_single_step): New.
6114 (supports_breakpoints): New.
6115 (handle_extended_wait): If stopping threads, read the stop pc of
6118 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6119 low target doesn't support retrieving the PC.
6120 (add_lwp): Set last_resume_kind to resume_continue.
6121 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6122 (linux_attach): Don't clear stop_expected. Set the lwp's
6123 last_resume_kind to resume_stop.
6124 (linux_detach_one_lwp): Don't check for removed breakpoints.
6125 (check_removed_breakpoint): Delete.
6126 (status_pending_p): Rename to ...
6127 (status_pending_p_callback): ... this. Don't check for removed
6128 breakpoints. Don't consider threads that are stopped from GDB's
6130 (linux_wait_for_lwp): Always read the stop_pc here.
6131 (cancel_breakpoint): New.
6132 (step_over_bkpt): New global.
6133 (linux_wait_for_event_1): Implement stepping over breakpoints.
6134 (gdb_wants_lwp_stopped): New.
6135 (gdb_wants_all_stopped): New.
6136 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6137 single-step traps here. Store the thread's last reported target
6139 (send_sigstop): Don't clear stop_expected. Always set it,
6141 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6142 (cancel_finished_single_step): New.
6143 (cancel_finished_single_steps): New.
6144 (wait_for_sigstop): Don't cancel finished single-step traps here.
6145 (linux_resume_one_lwp): Don't check for removed breakpoints.
6146 Don't set `step' on non-hardware step archs.
6147 (linux_set_resume_request): Ignore resume_stop requests if already
6148 stopping or stopped. Set the lwp's last_resume_kind.
6149 (resume_status_pending_p): Don't check for removed breakpoints.
6150 (need_step_over_p): New.
6151 (start_step_over): New.
6152 (finish_step_over): New.
6153 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6154 requests. Clear the thread's last reported target waitstatus.
6155 Don't use the `suspended' flag. Don't consider pending breakpoints.
6156 (linux_resume): Start a step-over if necessary.
6157 (proceed_one_lwp): New.
6158 (proceed_all_lwps): New.
6159 (unstop_all_lwps): New.
6160 * linux-low.h (struct lwp_info): Rewrite comment for the
6161 `suspended' flag. Add the `stop_pc' field. Delete the
6162 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6163 Add `'last_resume_kind' and `need_step_over' fields.
6164 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6165 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6166 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6167 (set_raw_breakpoint_at): New.
6168 (set_breakpoint_at): Rewrite to use it.
6169 (reinsert_breakpoint_handler): Delete.
6170 (set_reinsert_breakpoint): New.
6171 (reinsert_breakpoint_by_bp): Delete.
6172 (delete_reinsert_breakpoints): New.
6173 (uninsert_breakpoint): Rewrite.
6174 (uninsert_breakpoints_at): New.
6175 (reinsert_breakpoint): Rewrite.
6176 (reinsert_breakpoints_at): New.
6177 (check_breakpoints): Rewrite.
6178 (breakpoint_here): New.
6179 (breakpoint_inserted_here): New.
6180 (check_mem_read): Adjust.
6181 * mem-break.h (breakpoints_supported, breakpoint_here)
6182 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6183 (reinsert_breakpoint_by_bp): Delete declaration.
6184 (delete_reinsert_breakpoints): Declare.
6185 (reinsert_breakpoint): Delete declaration.
6186 (reinsert_breakpoints_at): Declare.
6187 (uninsert_breakpoint): Delete declaration.
6188 (uninsert_breakpoints_at): Declare.
6189 (check_breakpoints): Adjust prototype.
6190 * server.h: Adjust include order.
6191 (struct thread_info): Declare here. Add a `last_status' field.
6193 2010-03-23 Michael Snyder <msnyder@vmware.com>
6195 * server.c (crc32): New function.
6196 (handle_query): Add handling for 'qCRC:' request.
6198 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6200 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6201 lwp had been stopped by a watchpoint.
6203 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6205 * server.h (internal_error): Declare.
6206 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6207 * utils.c (internal_error): New function.
6209 2010-03-15 Andreas Schwab <schwab@redhat.com>
6211 * configure.srv: Fix typo setting srv_regobj.
6213 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6215 * linux-low.c (fetch_register): Avoid passing a non string literal
6217 (usr_store_inferior_registers): Ditto.
6219 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6221 * linux-low.c (linux_write_memory): Bail out early if peeking
6224 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6226 * linux-low.h (struct lwp_info): New fields
6227 `stopped_by_watchpoint' and `stopped_data_address'.
6228 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6229 here, and cache them in the lwp object.
6230 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6232 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6234 (linux_stopped_by_watchpoint): Rewrite.
6235 (linux_stopped_data_address): Rewrite.
6237 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6239 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6240 switching the current inferior, not before.
6242 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6244 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6245 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6246 i386-linux.c and amd64-linux.c.
6247 (reg-i386.o): Removed.
6248 (reg-i386.c): Likewise.
6249 (reg-i386-linux.o): Likewise.
6250 (reg-i386-linux.c): Likewise.
6251 (reg-x86-64.o): Likewise.
6252 (reg-x86-64.c): Likewise.
6253 (reg-x86-64-linux.o): Likewise.
6254 (reg-x86-64-linux.c): Likewise.
6257 (i386-linux.o): Likewise.
6258 (i386-linux.c): Likewise.
6259 (amd64.o): Likewise.
6260 (amd64.c): Likewise.
6261 (amd64-linux.o): Likewise.
6262 (amd64-linux.c): Likewise.
6264 * configure.srv (srv_i386_regobj): New.
6265 (srv_i386_linux_regobj): Likewise.
6266 (srv_amd64_regobj): Likewise.
6267 (srv_amd64_linux_regobj): Likewise.
6268 (srv_i386_32bit_xmlfiles): Likewise.
6269 (srv_i386_64bit_xmlfiles): Likewise.
6270 (srv_i386_xmlfiles): Likewise.
6271 (srv_amd64_xmlfiles): Likewise.
6272 (srv_i386_linux_xmlfiles): Likewise.
6273 (srv_amd64_linux_xmlfiles): Likewise.
6274 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6275 srv_xmlfiles to $srv_i386_xmlfiles.
6276 (i[34567]86-*-mingw32ce*): Likewise.
6277 (i[34567]86-*-mingw*): Likewise.
6278 (i[34567]86-*-nto*): Likewise.
6279 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6280 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6281 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6282 (x86_64-*-linux*): Likewise.
6284 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6285 (init_registers_amd64_linux): New.
6286 (x86_arch_setup): Replace init_registers_x86_64_linux with
6287 init_registers_amd64_linux.
6289 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6291 * configure.ac: Check for libdl. If it is not available link against
6292 static libthread_db.
6293 * configure: Regenerate.
6295 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6299 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6300 handing a read watchpoint.
6301 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6303 2010-02-12 Doug Evans <dje@google.com>
6305 * linux-low.c (linux_supports_tracefork_flag): Document.
6306 (linux_look_up_symbols): Add comment.
6308 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6310 * regcache.c (supply_register): Clear regcache if buf is NULL.
6312 2010-02-02 Nicolas Roche <roche@sourceware.org>
6313 Joel Brobecker <brobecker@adacore.com>
6315 * inferiors.c (find_inferior): Add function documentation.
6316 (unloaded_dll): Handle the case where the unloaded dll has not
6317 been previously registered in the dll list.
6319 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6321 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6322 (thumb2_breakpoint): New.
6323 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6325 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6327 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6328 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6331 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6333 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6335 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6337 * linux-s390-low.c (s390_collect_ptrace_register)
6338 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6340 2010-01-21 Doug Evans <dje@google.com>
6342 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6343 (PTRACE_ARG4_TYPE): New macro.
6344 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6345 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6346 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6347 (usr_store_inferior_registers): Ditto.
6348 (linux_read_memory, linux_write_memory): Ditto.
6349 (linux_test_for_tracefork): Ditto.
6351 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6352 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6354 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6356 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6359 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6361 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6362 prototype to take a regcache. Adjust.
6364 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6366 * regcache.h (struct thread_info): Forward declare.
6367 (struct regcache): New.
6368 (new_register_cache): Adjust prototype.
6369 (get_thread_regcache): Declare.
6370 (free_register_cache): Adjust prototype.
6371 (registers_to_string, registers_from_string): Ditto.
6372 (supply_register, supply_register_by_name, collect_register)
6373 (collect_register_as_string, collect_register_by_name): Ditto.
6374 * regcache.c (struct inferior_regcache_data): Delete.
6375 (get_regcache): Rename to ...
6376 (get_thread_regcache): ... this. Adjust. Switch inferior before
6378 (regcache_invalidate_one): Adjust.
6379 (regcache_invalidate): Fix prototype.
6380 (new_register_cache): Return the new register cache.
6381 (free_register_cache): Change prototype.
6382 (realloc_register_cache): Adjust.
6383 (registers_to_string): Change prototype to take a regcache. Adjust.
6384 (registers_from_string): Ditto.
6385 (register_data): Ditto.
6386 (supply_register): Ditto.
6387 (supply_register_by_name): Ditto.
6388 (collect_register): Ditto.
6389 (collect_register_as_string): Ditto.
6390 (collect_register_by_name): Ditto.
6391 * server.c (process_serial_event): Adjust.
6392 * linux-low.h (regset_fill_func, regset_store_func): Change
6394 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6396 * linux-low.c (get_stop_pc): Adjust.
6397 (check_removed_breakpoint): Adjust.
6398 (linux_wait_for_event): Adjust.
6399 (linux_resume_one_lwp): Adjust.
6400 (fetch_register): Add regcache parameter. Adjust.
6401 (usr_store_inferior_registers): Ditto.
6402 (regsets_fetch_inferior_registers): Ditto.
6403 (regsets_store_inferior_registers): Ditto.
6404 (linux_fetch_registers, linux_store_registers): Ditto.
6405 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6407 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6409 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6410 prototype to take a regcache.
6411 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6412 * remote-utils.c (convert_ascii_to_int, outreg)
6413 (prepare_resume_reply): Change prototype to take a regcache.
6415 * target.h (struct target_ops) <fetch_registers, store_registers>:
6416 Change prototype to take a regcache.
6417 (fetch_inferior_registers, store_inferior_registers): Change
6418 prototype to take a regcache. Adjust.
6419 * proc-service.c (ps_lgetregs): Adjust.
6420 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6421 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6422 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6423 take a regcache. Adjust.
6424 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6425 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6426 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6427 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6428 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6429 (cris_cannot_fetch_register):
6430 (cris_breakpoint_at): Change prototype to take a regcache.
6432 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6433 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6434 to take a regcache. Adjust.
6435 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6437 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6438 take a regcache. Adjust.
6439 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6440 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6441 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6442 * linux-mips-low.c (mips_get_pc):
6443 (mips_set_pc): Change prototype to take a regcache. Adjust.
6444 (mips_reinsert_addr): Adjust.
6445 (mips_collect_register): Change prototype to take a regcache.
6447 (mips_supply_register):
6448 (mips_collect_register_32bit, mips_supply_register_32bit)
6449 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6450 (mips_store_fpregset): Ditto.
6451 * linux-ppc-low.c (ppc_supply_ptrace_register)
6452 (ppc_supply_ptrace_register): Ditto.
6453 (parse_spufs_run): Adjust.
6454 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6455 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6456 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6457 take a regcache. Adjust.
6458 * linux-s390-low.c (s390_collect_ptrace_register)
6459 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6460 (s390_set_pc): Change prototype to take a regcache. Adjust.
6461 (s390_arch_setup): Adjust.
6462 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6463 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6464 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6465 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6466 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6468 (sparc_breakpoint_at): Adjust.
6469 * linux-xtensa-low.c (xtensa_fill_gregset):
6470 (xtensa_store_gregset):
6471 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6472 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6473 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6474 prototype to take a regcache. Adjust.
6475 * win32-arm-low.c (arm_fetch_inferior_register)
6476 (arm_store_inferior_register): Change prototype to take a
6478 * win32-i386-low.c (i386_fetch_inferior_register)
6479 (i386_store_inferior_register): Change prototype to take a
6481 * win32-low.c (child_fetch_inferior_registers)
6482 (child_store_inferior_registers): Change prototype to take a
6484 (win32_wait): Adjust.
6485 (win32_fetch_inferior_registers): Change prototype to take a
6487 (win32_store_inferior_registers): Adjust.
6488 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6489 store_inferior_register>: Change prototype to take a regcache.
6491 2010-01-20 Doug Evans <dje@google.com>
6493 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6495 (linux_wait_for_event1, linux_init_signals): Ditto.
6496 (W_STOPCODE): Provide definition if missing.
6498 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6500 * linux-low.c (linux_core_of_thread): New.
6501 (compare_ints, show_process, list_threads): New.
6502 (linux_qxfer_osdata): Report threads and cores.
6503 (linux_target_op): Register linux_core_of_thread.
6504 * remote-utils.c (prepare_resume_reply): Report the core.
6505 (buffer_xml_printf): Support %d specifier.
6506 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6508 (handle_query): Handle qXfer:threads. Announce availability
6510 * target.h (struct target_ops): New field core_of_thread.
6512 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6514 * Makefile.in (clean): Remove new generated files.
6515 (reg-s390.o, reg-s390.c): Remove rules.
6516 (reg-s390x.o, reg-s390x.c): Likewise.
6517 (s390-linux32.o, s390-linux32.c): Add rules.
6518 (s390-linux64.o, s390-linux64.c): Likewise.
6519 (s390x-linux64.o, s390x-linux64.c): Likewise.
6520 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6521 * linux-s390-low.c: Include <elf.h>.
6522 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6523 (init_registers_s390): Remove prototype.
6524 (init_registers_s390x): Likewise.
6525 (init_registers_s390_linux32): Add prototype.
6526 (init_registers_s390_linux64): Likewise.
6527 (init_registers_s390x_linux64): Likewise.
6528 (s390_num_regs_3264): New define.
6529 (s390_regmap_3264): New global variable.
6530 (s390_cannot_fetch_register): Remove obsolete check.
6531 (s390_cannot_store_register): Likewise.
6532 (s390_collect_ptrace_register): Handle upper/lower register halves.
6533 (s390_supply_ptrace_register): Likewise.
6534 (s390_fill_gregset): Update to register number changes.
6535 (s390_get_hwcap): New routine.
6536 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6537 Install appropriate regmap and register set.
6539 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6541 * server.c (gdbserver_version): Update copyright year to 2010.
6542 * gdbreplay.c (gdbreplay_version): Likewise.
6544 2009-12-28 Doug Evans <dje@google.com>
6546 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6547 elf/external.h. Include <elf.h> instead but only if necessary.
6549 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6551 * linux-low.c (linux_remove_process): Remove `detaching'
6552 parameter. Don't release/detach from thread_db here.
6553 (linux_kill): Release/detach from thread_db here, ...
6554 (linux_detach): ... and here, before actually detaching.
6555 (linux_wait_1): ... and here, when a process exits.
6556 * thread-db.c (any_thread_of): New.
6557 (thread_db_free): Switch the current inferior to a thread of the
6560 2009-12-21 Doug Evans <dje@google.com>
6562 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6564 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6565 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6566 warning ifndef __NR_tkill. Move setting of errno there too.
6567 Delete unnecessary resetting of errno after syscall.
6568 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6570 * configure.ac: Check for dladdr.
6571 * config.in: Regenerate.
6572 * configure: Regenerate.
6573 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6574 (try_thread_db_load): Update.
6576 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6578 2009-12-18 Doug Evans <dje@google.com>
6580 * event-loop.c: Include unistd.h if it exists.
6582 * linux-low.c (my_waitpid): Move definition away from being in
6583 between linux_tracefork_child/linux_test_for_tracefork.
6585 * gdb_proc_service.h (psaddr_t): Fix type.
6586 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6587 signature to match glibc.
6589 2009-12-16 Doug Evans <dje@google.com>
6591 * linux-low.c (linux_read_memory): Fix argument to read.
6593 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6595 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6596 events, don't leave current_inferior pointing at null.
6598 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6600 * win32-low.c (LOG): Delete.
6601 (OUTMSG): Output to stderr.
6602 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6603 on compile time LOG macro.
6604 (win32_wait): Fix debug output.
6606 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6608 * win32-low.c (win32_add_one_solib): If the dll name is
6609 "ntdll.dll", prepend the system directory to the dll path.
6611 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6613 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6615 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6616 Vladimir Prus <vladimir@codesourcery.com>
6618 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6619 * configure.ac: Check for __mcoldfire__ and set
6620 gdb_cv_m68k_is_coldfire.
6621 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6622 reg-cf.o and reg-m68k.o.
6623 * configure: Regenerated.
6625 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6627 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6628 Pass it to thread_db_free.
6629 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6630 proper `detaching' argument to linux_remove_process.
6631 * linux-low.h (thread_db_free): Add `detaching' parameter.
6632 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6634 (thread_db_free): Add `detaching' parameter. Only
6635 call td_ta_clear_event if detaching from process.
6637 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6639 * thread-db.c (thread_db_free): Fix typo.
6641 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6644 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6646 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6648 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6649 with an i686 compiler.
6650 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6652 * configure: Rebuilt.
6654 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6658 * server.c (handle_search_memory_1): Correct read_addr initialization
6659 in loop for searching subsequent chunks.
6661 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6663 * configure.ac: New --with-libthread-db option.
6664 * thread-db.c: Allow direct dependence on libthread_db.
6665 (thread_db_free): Adjust.
6666 * config.in: Regenerate.
6667 * configure: Likewise.
6669 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6672 * thread-db.c (attach_thread): New function.
6673 (maybe_attach_thread): Return success/failure.
6674 (find_new_threads_callback): Adjust.
6675 (thread_db_find_new_threads): Loop until no new threads.
6677 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6679 * proc-service.c (ps_lgetregs): Formatting.
6681 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6683 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6684 * configure.ac: Adjust.
6685 * linux-low.h (struct process_info_private): Move members to struct
6687 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6688 * linux-low.c (linux_remove_process): Adjust.
6689 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6690 * server.c (handle_query): Move code ...
6691 (handle_monitor_command): ... here. New function.
6692 * target.h (struct target_ops): New member.
6693 * thread-db.c (struct thread_db): New.
6694 (libthread_db_search_path): New variable.
6695 (thread_db_create_event, thread_db_enable_reporting)
6696 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6697 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6698 (try_thread_db_load_1, dladdr_to_soname): New functions.
6699 (try_thread_db_load, thread_db_load_search): New functions.
6700 (thread_db_init): Search for libthread_db.
6701 (thread_db_free): New function.
6702 (thread_db_handle_monitor_command): Likewise.
6703 * config.in: Regenerate.
6704 * configure: Regenerate.
6706 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6708 * spu-low.c (spu_kill): Wait for inferior to terminate.
6709 Call clear_inferiors.
6710 (spu_detach): Call clear_inferiors.
6712 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6714 * aclocal.m4: Regenerate.
6715 * config.in: Likewise.
6716 * configure: Likewise.
6718 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6720 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6721 (parse_spufs_run): New function.
6722 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6723 (ppc_breakpoint_at): Handle SPU breakpoints.
6725 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6727 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6728 (SPUFS_MAGIC): Define.
6729 (spu_enumerate_spu_ids): New function.
6730 (linux_qxfer_spu): New function.
6731 (linux_target_ops): Install linux_qxfer_spu.
6733 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6735 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6736 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6737 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6738 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6739 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6740 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6741 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6742 (init_registers_powerpc_cell32l): Add prototype.
6743 (init_registers_powerpc_cell64l): Likewise.
6744 (ppc_arch_setup): Detect Cell/B.E. architecture.
6746 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6748 * Makefile.in (datarootdir): New variable.
6750 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6752 * linux-low.c (linux_write_memory): Update debugging output.
6753 * Makefile.in (clean): Add new descriptions.
6754 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6755 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6756 * configure.srv: Add new files for arm*-*-linux*.
6757 * linux-arm-low.c: Add new declarations.
6758 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6759 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6760 (HWCAP_VFPv3D16): New.
6761 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6762 instead of __IWMMXT__.
6763 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6764 (arm_arch_setup): New.
6765 (target_regsets): Remove #ifdef. Add VFP regset.
6766 (the_low_target): Use arm_arch_setup.
6768 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6770 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6771 the main thread again.
6773 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6775 Adding Neutrino gdbserver.
6776 * configure: Regenerated.
6777 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6778 * configure.srv (i[34567]86-*-nto*): New target.
6779 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6780 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6781 (nto_comctrl) [__QNX__]: New function.
6782 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6784 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6786 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6789 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6790 Pedro Alves <pedro@codesourcery.com>
6792 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6793 don't support CONTEXT_EXTENDED_REGISTERS.
6794 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6795 (the_low_target): Install them.
6796 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6797 failing with ERROR_PIPE_NOT_CONNECTED.
6799 2009-06-30 Doug Evans <dje@google.com>
6800 Pierre Muller <muller@ics.u-strasbg.fr>
6802 Add h/w watchpoint support to x86-linux, win32-i386.
6803 * Makefile.in (SFILES): Add i386-low.c
6804 (i386_low_h): Define.
6805 (i386-low.o): Add dependencies.
6806 (linux-x86-low.o): Add i386-low.h dependency.
6807 (win32-i386-low.o): Ditto.
6808 * i386-low.c: New file.
6809 * i386-low.h: New file.
6810 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6811 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6812 * linux-low.c (linux_add_process): Initialize arch_private.
6813 (linux_remove_process): Free arch_private.
6814 (add_lwp): Initialize arch_private.
6815 (delete_lwp): Free arch_private.
6816 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6818 * linux-low.h (process_info_private): New member arch_private.
6819 (lwp_info): New member arch_private.
6820 (linux_target_ops): New members new_process, new_thread,
6822 (ptid_of): New macro.
6823 * linux-x86-low.c: Include stddef.h, i386-low.h.
6824 (arch_process_info): New struct.
6825 (arch_lwp_info): New struct.
6826 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6827 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6828 (i386_dr_low_get_status): New function.
6829 (x86_insert_point, x86_remove_point): New functions.
6830 (x86_stopped_by_watchpoint): New function.
6831 (x86_stopped_data_address): New function.
6832 (x86_linux_new_process, x86_linux_new_thread): New functions.
6833 (x86_linux_prepare_to_resume): New function.
6834 (the_low_target): Add entries for insert_point, remove_point,
6835 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6837 * server.c (debug_hw_points): New global.
6838 (monitor_show_help): Document set debug-hw-points.
6839 (handle_query): Process "set debug-hw-points".
6840 * server.h (debug_hw_points): Declare.
6841 (paddress): Declare.
6842 * utils.c (NUMCELLS, CELLSIZE): New macros.
6843 (get_sell, xsnprintf, paddress): New functions.
6844 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6845 remove_point, stopped_by_watchpoint, stopped_data_address.
6846 * win32-i386-low.c: Include i386-low.h.
6847 (debug_reg_state): Replaces dr.
6848 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6849 (i386_dr_low_get_status): New function.
6850 (i386_insert_point, i386_remove_point): New functions.
6851 (i386_stopped_by_watchpoint): New function.
6852 (i386_stopped_data_address): New function.
6853 (i386_initial_stuff): Update.
6854 (get_thread_context,set_thread_context,i386_thread_added): Update.
6855 (the_low_target): Add entries for insert_point,
6856 remove_point, stopped_by_watchpoint, stopped_data_address.
6857 * win32-low.c (win32_insert_watchpoint): New function.
6858 (win32_remove_watchpoint): New function.
6859 (win32_stopped_by_watchpoint): New function.
6860 (win32_stopped_data_address): New function.
6861 (win32_target_ops): Add entries for insert_watchpoint,
6862 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6863 * win32-low.h (win32_target_ops): New members insert_point,
6864 remove_point, stopped_by_watchpoint, stopped_data_address.
6866 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6868 * server.c (process_serial_event): Re-return unsupported, not
6869 error, if the type isn't recognized. Re-allow supporting only
6870 insert or remove packets. Also call require_running for
6871 breakpoints. Add missing break statement to default case. Tidy.
6872 * target.h (struct target_ops): Rename insert_watchpoint to
6873 insert_point, and remove_watchpoint to remove_point.
6875 * linux-low.h (struct linux_target_ops): Likewise.
6876 * linux-low.c (linux_insert_watchpoint): Rename to ...
6877 (linux_insert_point): ... this. Adjust.
6878 (linux_remove_watchpoint): Rename to ...
6879 (linux_remove_point): ... this. Adjust.
6880 (linux_target_ops): Adjust.
6881 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6882 (cris_insert_point): ... this.
6883 (cris_remove_watchpoint): Rename to ...
6884 (cris_remove_point): ... this.
6885 (the_low_target): Adjust.
6887 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6889 * server.c (handle_v_kill): Pass signal_pid to
6890 kill_inferior if multi_process is zero.
6892 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6894 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6895 * target.h (target_ops): Comment for *_watchpoint to make it clear
6896 the functions can get types '0' and '1'.
6898 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6900 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6901 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6902 * regcache.c (get_regcache): Likewise.
6903 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6904 * win32-low.c (child_fetch_inferior_registers): Remove check for
6907 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6908 Pedro Alves <pedro@codesourcery.com>
6910 * target.h (struct target_ops) <supports_multi_process>: New
6912 (target_supports_multi_process): New.
6913 * server.c (handle_query): Even if GDB reports support, only
6914 enable multi-process if the target also supports it. Report
6915 multi-process support only if the target backend supports it.
6916 * linux-low.c (linux_supports_multi_process): New function.
6917 (linux_target_ops): Install it as target_supports_multi_process
6920 2009-05-24 Doug Evans <dje@google.com>
6922 Global renaming of find_thread_pid to find_thread_ptid.
6923 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6924 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6925 All callers updated.
6927 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6928 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6931 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6932 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6933 (linux_resume_one_lwp): Ditto.
6935 2009-05-23 Doug Evans <dje@google.com>
6937 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6938 from struct inferior_list_entry * to struct lwp_info *.
6939 All callers updated.
6941 2009-05-13 Doug Evans <dje@google.com>
6943 * linux-x86-low.c: Don't include assert.h.
6944 (x86_siginfo_fixup): Use fatal, not assert.
6945 (x86_arch_setup): Fix comment.
6947 2009-05-12 Doug Evans <dje@google.com>
6949 Biarch support for i386/amd64 gdbserver.
6950 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6951 Add linux-x86-low.c.
6952 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6953 (linux-x86-low.o): Add.
6954 * linux-x86-64-low.c: Delete.
6955 * linux-i386-low.c: Delete.
6956 * linux-x86-low.c: New file.
6957 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
6959 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
6961 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
6962 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
6963 (linux_child_pid_to_exec_file): New function.
6964 (elf_64_header_p, elf_64_file_p): New functions.
6965 (siginfo_fixup): New function.
6966 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
6967 give target a chance to convert layout.
6968 * linux-low.h (linux_target_ops): New member siginfo_fixup.
6969 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
6971 2009-05-07 Doug Evans <dje@google.com>
6973 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
6974 (regsets_store_inferior_registers): Ditto.
6976 2009-05-06 Pedro Alves <pedro@codesourcery.com>
6980 * linux-low.c (must_set_ptrace_flags): Delete.
6981 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
6983 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
6984 `lwp->must_set_ptrace_flags' instead.
6985 (linux_wait_for_event_1): Set ptrace options here.
6986 (linux_wait_1): ... not here.
6988 2009-04-30 Doug Evans <dje@google.com>
6990 * inferiors.c (started_inferior_callback): New function.
6991 (attached_inferior_callback): New function.
6992 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
6993 * server.c (print_started_pid, print_attached_pid): New functions.
6994 (detach_or_kill_for_exit): New function.
6995 (main): Call it instead of for_each_inferior (kill_inferior_callback).
6996 * server.h (have_started_inferiors_p): Declare.
6997 (have_attached_inferiors_p): Declare.
6999 * inferiors.c (remove_process): Fix memory leak, free process.
7000 * linux-low.c (linux_remove_process): New function.
7001 (linux_kill): Call it instead of remove_process.
7002 (linux_detach, linux_wait_1): Ditto.
7004 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7006 * configure.srv: Add x86 Windows CE target.
7008 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7010 * inferiors.c (get_thread_process): Make global.
7011 * server.h (get_thread_process): Add prototype.
7012 * thread-db.c (find_one_thread): Use get_thread_process
7013 instead of current_process.
7014 (thread_db_get_tls_address): Do not crash if called when
7015 thread layer is not yet initialized.
7017 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7019 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7020 * spu-low.c (current_tid): Rename to ...
7021 (current_ptid): ... this.
7022 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7023 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7024 ptid_get_lwp (current_ptid) instead of current_tid.
7025 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7026 instead of current_tid. Use find_process_pid to verify pid
7027 argument is valid. Pass proper argument to remove_process.
7028 (spu_thread_alive): Compare current_ptid instead of current_tid.
7029 (spu_resume): Likewise.
7031 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7033 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7036 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7038 Implement the multiprocess extensions, and add linux multiprocess
7041 * server.h (ULONGEST): Declare.
7042 (struct ptid, ptid_t): New.
7043 (minus_one_ptid, null_ptid): Declare.
7044 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7045 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7046 (struct inferior_list_entry): Change `id' type from unsigned from
7048 (struct sym_cache, struct breakpoint, struct
7049 process_info_private): Forward declare.
7050 (struct process_info): Declare.
7051 (current_process): Declare.
7052 (all_processes): Declare.
7053 (initialize_inferiors): Declare.
7054 (add_thread): Adjust to use ptid_t.
7055 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7056 (add_process, remove_process, find_thread_pid): Declare.
7057 (find_inferior_id): Adjust to use ptid_t.
7058 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7059 (multi_process): Declare.
7060 (push_event): Adjust to use ptid_t.
7061 (read_ptid, write_ptid): Declare.
7062 (prepare_resume_reply): Adjust to use ptid_t.
7063 (clear_symbol_cache): Declare.
7064 * inferiors.c (all_processes): New.
7065 (null_ptid, minus_one_ptid): New.
7066 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7067 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7068 (add_thread): Change unsigned long to ptid. Remove gdb_id
7070 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7071 (gdb_id_to_thread): Rename to ...
7072 (find_thread_pid): ... this. Change unsigned long to ptid.
7073 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7074 (loaded_dll, pull_pid_from_list): Adjust.
7075 (add_process, remove_process, find_process_pid)
7076 (get_thread_process, current_process, initialize_inferiors): New.
7077 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7078 (struct target_waitstatus) <related_pid>: Ditto.
7079 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7081 (struct target_ops) <join>: Add `pid' argument.
7082 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7083 (struct target_ops) <wait>: Add `ptid' field. Change return type
7085 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7086 (mywait): Add `ptid' argument. Change return type to ptid_t.
7087 (target_pid_to_str): Declare.
7088 * target.c (set_desired_inferior): Adjust to use ptids.
7089 (mywait): Add new `ptid' argument. Adjust.
7090 (target_pid_to_str): New.
7091 * mem-break.h (free_all_breakpoints): Declare.
7092 * mem-break.c (breakpoints): Delelete.
7093 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7094 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7095 to use per-process breakpoint list.
7096 (free_all_breakpoints): New.
7097 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7098 (symbol_cache, all_symbols_looked_up): Delete.
7100 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7102 (prepare_resume_reply): Change ptid argument's type from unsigned
7103 long to ptid_t. Adjust. Implement W;process and X;process.
7104 (free_sym_cache, clear_symbol_cache): New.
7105 (look_up_one_symbol): Adjust to per-process symbol cache. *
7106 * server.c (cont_thread, general_thread, step_thread): Change type
7109 (multi_process): New.
7110 (last_ptid): Change type to ptid_t.
7111 (struct vstop_notif) <ptid>: Change type to ptid_t.
7112 (queue_stop_reply, push_event): Change `ptid' argument's type to
7114 (discard_queued_stop_replies): Add `pid' argument.
7115 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7116 changes. Don't reference the `attached' global.
7117 (attach_inferior): Adjust to mywait interface changes.
7118 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7119 features. Handle and report "multiprocess+". Handle
7121 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7123 (handle_v_kill): New.
7124 (handle_v_stopped): Adjust to use target_pid_to_str.
7125 (handle_v_requests): Allow multiple attaches and runs when
7126 multiprocess extensions are in effect. Handle "vKill".
7127 (myresume): Adjust to use ptids.
7128 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7129 (handle_status): Adjust to discard_queued_stop_replies interface
7131 (first_thread_of, kill_inferior_callback)
7132 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7133 (main): Call initialize_inferiors. Adjust to use ptids, killing
7134 and detaching from all inferiors. Handle multiprocess packet
7136 * linux-low.h: Include gdb_proc_service.h.
7137 (struct process_info_private): New.
7138 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7139 <lwpid_of>: Use ptid_get_lwp.
7140 (get_lwp_thread): Adjust.
7141 (struct lwp_info): Add `dead' member.
7142 (find_lwp_pid): Declare.
7143 * linux-low.c (thread_db_active): Delete.
7144 (new_inferior): Adjust comment.
7145 (inferior_pid): Delete.
7146 (linux_add_process): New.
7147 (handle_extended_wait): Adjust.
7148 (add_lwp): Change unsigned long to ptid.
7149 (linux_create_inferior): Add process to processes table. Adjust
7150 to use ptids. Don't set new_inferior here.
7151 (linux_attach_lwp): Rename to ...
7152 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7153 it. Adjust to use ptids.
7154 (linux_attach_lwp): New.
7155 (linux_attach): Add process to processes table. Don't set
7157 (struct counter): New.
7158 (second_thread_of_pid_p, last_thread_of_process_p): New.
7159 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7161 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7162 processes. Remove process from process table.
7163 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7164 to multiple processes.
7165 (any_thread_of): New.
7166 (linux_detach): Add `pid' argument, and handle it. Remove process
7167 from processes table.
7168 (linux_join): Add `pid' argument. Handle it.
7169 (linux_thread_alive): Change unsighed long argument to ptid_t.
7170 Consider dead lwps as not being alive.
7171 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7172 threads we're not interested in.
7173 (same_lwp, find_lwp_pid): New.
7174 (linux_wait_for_lwp): Change `pid' argument's type from int to
7176 (linux_wait_for_event): Rename to ...
7177 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7178 from int to ptid_t. Adjust.
7179 (linux_wait_for_event): New.
7180 (linux_wait_1): Add `ptid' argument. Change return type to
7181 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7182 that exit from the process table.
7183 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7185 (mark_lwp_dead): New.
7186 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7187 stopping all threads, mark its main lwp as dead.
7188 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7190 (fetch_register, usr_store_inferior_registers)
7191 (regsets_fetch_inferior_registers)
7192 (regsets_store_inferior_registers, linux_read_memory)
7193 (linux_write_memory): Inline `inferior_pid'.
7194 (linux_look_up_symbols): Adjust to use per-process
7196 (linux_request_interrupt): Adjust to use ptids.
7197 (linux_read_auxv): Inline `inferior_pid'.
7198 (initialize_low): Don't reference thread_db_active.
7199 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7200 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7201 (ps_getpid): Return the pid of the current inferior.
7202 * thread-db.c (proc_handle, thread_agent): Delete.
7203 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7205 (find_one_thread): Change argument type to ptid_t. Adjust to
7207 (maybe_attach_thread): Adjust to per-process data and ptids.
7208 (thread_db_find_new_threads): Ditto.
7209 (thread_db_init): Ditto.
7210 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7211 processes table. Adjust to use ptids.
7212 (spu_kill, spu_detach): Adjust interface. Remove process from
7214 (spu_join, spu_thread_alive): Adjust interface.
7215 (spu_wait): Adjust interface. Remove process from processes
7216 table. Adjust to use ptids.
7217 * win32-low.c (current_inferior_tid): Delete.
7218 (current_inferior_ptid): New.
7219 (debug_event_ptid): New.
7220 (thread_rec): Take a ptid. Adjust.
7221 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7222 (child_delete_thread): Ditto.
7223 (do_initial_child_stuff): Add `attached' argument. Add process to
7225 (child_fetch_inferior_registers, child_store_inferior_registers):
7227 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7228 (win32_attach): Pass 1 to do_initial_child_stuff.
7229 (win32_kill): Adjust interface. Remove process from processes
7231 (win32_detach): Ditto.
7232 (win32_join): Adjust interface.
7233 (win32_thread_alive): Take a ptid.
7234 (win32_resume): Adjust to use ptids.
7235 (get_child_debug_event): Ditto.
7236 (win32_wait): Adjust interface. Remove exiting process from
7239 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7241 Non-stop mode support.
7243 * server.h (non_stop): Declare.
7244 (gdb_client_data, handler_func): Declare.
7245 (delete_file_handler, add_file_handler, start_event_loop):
7247 (handle_serial_event, handle_target_event, push_event)
7248 (putpkt_notif): Declare.
7249 * target.h (enum resume_kind): New.
7250 (struct thread_resume): Replace `step' field by `kind' field.
7251 (TARGET_WNOHANG): Define.
7252 (struct target_ops) <wait>: Add `options' argument.
7253 <supports_non_stop, async, start_non_stop>: New fields.
7254 (target_supports_non_stop, target_async): New.
7255 (start_non_stop): Declare.
7256 (mywait): Add `options' argument.
7257 * target.c (mywait): Add `options' argument. Print child exit
7259 (start_non_stop): New.
7260 * server.c (non_stop, own_buf, mem_buf): New globals.
7261 (struct vstop_notif): New.
7262 (notif_queue): New global.
7263 (queue_stop_reply, push_event, discard_queued_stop_replies)
7264 (send_next_stop_reply): New.
7265 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7267 (attach_inferior): In non-stop mode, don't wait for the target
7269 (handle_general_set): Handle QNonStop.
7270 (handle_query): When handling qC, return the current general
7271 thread, instead of the first thread of the list.
7272 (handle_query): If the backend supports non-stop mode, include
7273 QNonStop+ in the qSupported query response.
7274 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7276 (handle_v_attach, handle_v_run): Handle non-stop mode.
7277 (handle_v_stopped): New.
7278 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7279 (myresume): Adjust to use resume_kind. Handle non-stop.
7280 (queue_stop_reply_callback): New.
7281 (handle_status): Handle non-stop mode.
7282 (main): Clear non_stop flag on reconnection. Use the event-loop.
7283 Refactor serial protocol handling from here ...
7284 (process_serial_event): ... to this new function. When GDB
7285 selects any thread, select one here. In non-stop mode, wait until
7286 GDB acks all pending events before exiting.
7287 (handle_serial_event, handle_target_event): New.
7288 * remote-utils.c (remote_open): Install remote_desc in the event
7290 (remote_close): Remove remote_desc from the event loop.
7291 (putpkt_binary): Rename to...
7292 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7293 (putpkt_binary): New as wrapper around putpkt_binary_1.
7294 (putpkt_notif): New.
7295 (prepare_resume_reply): In non-stop mode, don't change the
7297 * event-loop.c: New.
7298 * Makefile.in (OBJ): Add event-loop.o.
7299 (event-loop.o): New rule.
7301 * linux-low.h (pid_of): Moved here.
7303 (get_lwp_thread): Use lwpid_of.
7304 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7305 * linux-low.c (pid_of): Delete.
7306 (inferior_pid): Use lwpid_of.
7307 (linux_event_pipe): New.
7308 (target_is_async_p): New.
7310 (handle_extended_wait): Use lwpid_of.
7311 (add_lwp): Don't set lwpid field.
7312 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7313 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7314 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7315 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7316 first. Adjust to linux_wait_for_event interface changes. Use
7318 (linux_detach): Don't delete the main lwp here.
7319 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7320 (status_pending_p): Don't consider explicitly suspended lwps.
7321 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7322 pointer. Add OPTIONS argument. Change return type to int. Use
7323 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7324 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7325 pointer. Add status pointer argument. Return a pid instead of a
7326 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7327 changes. In non-stop mode, don't switch to a random thread.
7328 (linux_wait): Rename to...
7329 (linux_wait_1): ... this. Add target_options argument, and handle
7330 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7331 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7332 clean exit and signal exit code. Don't stop all threads in
7333 non-stop mode. In all-stop mode, only stop all threads when
7334 reporting a stop to GDB. Handle explicit thread stop requests.
7335 (async_file_flush, async_file_mark): New.
7337 (send_sigstop): Use lwpid_of.
7338 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7339 interface changes. In non-stop mode, don't switch to a random
7341 (linux_resume_one_lwp): Use lwpid_of.
7342 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7343 (linux_resume_one_thread): ... this. Handle resume_stop. In
7344 non-stop mode, don't look for pending flag in all threads.
7345 (resume_status_pending_p): Don't consider explicitly suspended
7347 (my_waitpid): Reimplement. Emulate __WALL.
7348 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7350 (sigchld_handler, linux_supports_non_stop, linux_async)
7351 (linux_start_non_stop): New.
7352 (linux_target_ops): Register linux_supports_non_stop, linux_async
7353 and linux_start_non_stop.
7354 (initialize_low): Install SIGCHLD handler.
7355 * thread-db.c (thread_db_create_event, find_one_thread)
7356 (thread_db_get_tls_address): Use lwpid_of.
7357 * win32-low.c (win32_detach): Adjust to use resume_kind.
7358 (win32_wait): Add `options' argument.
7359 * spu-low.c (spu_resume): Adjust to use resume_kind.
7360 (spu_wait): Add `options' argument.
7362 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7364 Decouple target code from remote protocol.
7366 * target.h (enum target_waitkind): New.
7367 (struct target_waitstatus): New.
7368 (struct target_ops) <wait>: Return an unsigned long. Take a
7369 target_waitstatus pointer instead of a char pointer.
7371 * target.c (mywait): Change prototype to return an unsigned long.
7372 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7373 * server.h (thread_from_wait, old_thread_from_wait): Delete
7375 (prepare_resume_reply): Change prototype to take a
7377 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7378 (last_status, last_ptid): New.
7379 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7380 pid instead of a signal.
7381 (attach_inferior): Remove "status" and "signal" parameters.
7383 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7385 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7386 (handle_v_requests, myresume): Remove "status" and "signal"
7388 (handle_status): New.
7389 (main): Delete local `status'. Adjust.
7390 * remote-utils.c: Include target.h.
7391 (prepare_resume_reply): Change prototype to take a
7392 target_waitstatus. Adjust.
7394 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7396 * spu-low.c (spu_wait): Adjust.
7397 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7399 (win32_wait): Adjust.
7401 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7403 * target.h (struct thread_resume): Delete leave_stopped member.
7404 (struct target_ops): Add a `n' argument to the `resume' callback.
7405 * server.c (start_inferior): Adjust.
7406 (handle_v_cont, myresume): Adjust.
7407 * linux-low.c (check_removed_breakpoint): Adjust to resume
7408 interface change, and to removed leave_stopped field.
7409 (resume_ptr): Delete.
7410 (struct thread_resume_array): New.
7411 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7412 resume interface change.
7413 (linux_continue_one_thread, linux_queue_one_thread)
7414 (resume_status_pending_p): Check if the resume field is NULL
7415 instead of checking the leave_stopped member.
7416 (linux_resume): Adjust to the target resume interface change.
7417 * spu-low.c (spu_resume): Adjust to the target resume interface
7419 * win32-low.c (win32_detach, win32_resume): Ditto.
7421 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7423 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7425 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7427 (linux_continue_one_thread): Only preserve the stepping flag if
7428 there's a pending breakpoint.
7430 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7432 * server.c (main): After the inferior having exited, call
7433 remote_close before exiting gdbserver.
7435 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7437 Fix size of FPSCR in Power 7 processors.
7438 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7439 (PPC_FEATURE_HAS_DFP): New #define.
7440 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7443 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7445 * server.c (handle_query) Whitespace and formatting.
7447 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7449 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7450 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7451 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7452 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7453 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7454 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7455 Makefile.in, configure.ac: Fix whitespace throughout.
7456 * configure: Regenerate.
7458 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7460 * inferiors.c (find_inferior): Make it safe for the callback
7461 function to delete the currently iterated inferior.
7463 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7465 * Makefile.in (linuw_low_h): Move higher.
7466 (thread-db.o): Depend on $(linux_low_h).
7468 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7470 Rename "process" to "lwp" throughout.
7472 * linux-low.c (all_processes): Rename to...
7473 (all_lwps): ... this.
7474 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7475 (add_process): Rename to ...
7476 (add_lwp): ... this. Adjust.
7477 (linux_create_inferior): Adjust.
7478 (linux_attach_lwp): Adjust.
7479 (linux_attach): Adjust.
7480 (linux_kill_one_process): Rename to ...
7481 (linux_kill_one_lwp): ... this. Adjust.
7482 (linux_kill): Adjust.
7483 (linux_detach_one_process): Rename to ...
7484 (linux_detach_one_lwp): ... this. Adjust.
7485 (linux_detach): Adjust.
7486 (check_removed_breakpoint): Adjust.
7487 (status_pending_p): Adjust.
7488 (linux_wait_for_process): Rename to ...
7489 (linux_wait_for_lwp): ... this. Adjust.
7490 (linux_wait_for_event): Adjust.
7491 (send_sigstop): Adjust.
7492 (wait_for_sigstop): Adjust.
7493 (stop_all_processes): Rename to ...
7494 (stop_all_lwps): ... this.
7495 (linux_resume_one_process): Rename to ...
7496 (linux_resume_one_lwp): ... this. Adjust.
7497 (linux_set_resume_request, linux_continue_one_thread)
7498 (linux_queue_one_thread, resume_status_pending_p)
7499 (usr_store_inferior_registers, regsets_store_inferior_registers)
7500 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7502 * linux-low.h (get_process): Rename to ...
7503 (get_lwp): ... this. Adjust.
7504 (get_thread_process): Rename to ...
7505 (get_thread_lwp): ... this. Adjust.
7506 (get_process_thread): Rename to ...
7507 (get_lwp_thread): ... this. Adjust.
7508 (struct process_info): Rename to ...
7509 (struct lwp_info): ... this.
7510 (all_processes): Rename to ...
7511 (all_lwps): ... this.
7512 * proc-service.c (ps_lgetregs): Adjust.
7513 * thread-db.c (thread_db_create_event, find_one_thread)
7514 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7516 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7518 * server.c (handle_query): Handle "qAttached".
7520 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7522 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7523 GPLv3, update license URL.
7525 2009-03-01 Doug Evans <dje@google.com>
7527 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7528 (server_h): Add gdb_signals.h.
7529 (signals.o): Update.
7530 * server.h (target_signal_from_host,target_signal_to_host_p)
7531 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7533 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7535 * remote-utils.c (getpkt): Also generate remote-debug
7536 information if noack_mode is set.
7538 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7540 * server.c (handle_query): Report qXfer:siginfo:read and
7541 qXfer:siginfo:write as supported and handle them.
7542 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7543 * linux-low.c (linux_xfer_siginfo): New.
7544 (linux_target_ops): Set it.
7546 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7548 * server.c (gdbserver_usage): Mention --remote-debug.
7549 (main): Accept '--remote-debug' switch.
7551 2009-01-18 Doug Evans <dje@google.com>
7553 * regcache.c (new_register_cache): No need to check result of xcalloc.
7554 * server.c (handle_search_memory): Back out calls to xmalloc,
7555 result is checked and error is returned to user upon failure.
7556 (handle_query): Ditto. Add more checks for result of malloc.
7557 (handle_v_cont): Check result of malloc, report error back to
7559 (handle_v_run): Ditto. Call freeargv.
7560 * server.h (freeargv): Declare.
7561 * utils.c (freeargv): New fn.
7563 2009-01-15 Doug Evans <dje@google.com>
7565 * gdbreplay.c (perror_with_name): Make arg const char *.
7566 * server.h (target_signal_to_name): Make return type const char *.
7567 * thread-db.c (thread_db_err_str): Make return type const char *.
7568 * utils.c (perror_with_name): Make arg const char *.
7570 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7572 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7573 when handling a EXIT_PROCESS_DEBUG_EVENT.
7575 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7577 * gdbreplay.c (gdbreplay_version): Update copyright year.
7578 * server.c (gdbserver_version): Likewise.
7580 2009-01-05 Doug Evans <dje@google.com>
7582 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7583 (handle_extended_wait): Improve comment.
7585 2008-12-13 Doug Evans <dje@google.com>
7587 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7588 * server.h (ATTR_MALLOC): New macro.
7589 (xmalloc,xcalloc,xstrdup): Declare.
7590 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7591 * inferiors.c: Ditto.
7592 * linux-low.c: Ditto.
7593 * mem-break.c: Ditto.
7594 * regcache.c: Ditto.
7595 * remote-utils.c: Ditto.
7598 * win32-low.c: Ditto.
7600 2008-12-12 Doug Evans <dje@google.com>
7602 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7603 in debugging printf.
7605 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7607 2008-12-09 Doug Evans <dje@google.com>
7609 * linux-low.h (struct process_info): Delete member tid, unused.
7610 * thread-db.c (find_one_thread): Update.
7611 (maybe_attach_thread): Update.
7613 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7615 * target.h (struct target_ops): Add qxfer_osdata member.
7616 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7618 (linux_qxfer_osdata): New functions.
7619 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7621 * server.c (handle_query): Handle "qXfer:osdata:read:".
7622 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7623 (buffer_xml_printf): New functions.
7624 * server.h (struct buffer): New.
7625 (buffer_grow_str, buffer_grow_str0): New macros.
7626 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7627 (buffer_xml_printf): Declare.
7629 2008-11-24 Doug Evans <dje@google.com>
7631 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7633 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7635 * server.c (handle_v_run): Always use the supplied argument list.
7637 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7639 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7640 (xtensa_regmap_table): Add entry for scompare1.
7642 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7644 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7645 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7646 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7647 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7648 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7649 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7650 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7651 XML target descriptions.
7652 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7653 when inferior is running on an ISA 2.05 or later processor. Add
7654 special case to return offset for full 64-bit slot of FPSCR when
7657 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7659 * Makefile.in (SFILES, clean): Added sparc64 files.
7660 (reg-sparc64.o, reg-sparc64.c): New.
7661 * configure.srv (sparc*-*-linux*): New configuration.
7662 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7663 syscall arguments for SPARC.
7664 (regsets_store_inferior_registers): Likewise.
7665 * linux-sparc-low.c: New file.
7667 2008-10-21 Doug Evans <dje@google.com>
7669 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7670 (READLINE_DIR,READLINE_DEP): Delete.
7671 (INTERNAL_CFLAGS): Update.
7672 (LINTFLAGS): Update.
7674 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7676 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7677 whole argv from the last run, not just argv[0].
7679 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7681 * regcache.c (new_register_cache): Return NULL if the register
7682 cache size isn't known yet.
7683 (free_register_cache): Avoid dereferencing a NULL regcache.
7685 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7687 * configure.srv: Merge MIPS and MIPS64.
7689 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7691 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7693 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7695 * Makefile.in: Add required vsx dependencies.
7697 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7698 Declare init_registers_powerpc_vsx32l.
7699 Declare init_registers_powerpc_vsx64l.
7700 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7701 (ppc_arch_setup): Check for VSX in hwcap.
7702 (ppc_fill_vsxregset): New function.
7703 (ppc_store_vsxregset): New function.
7704 Add new VSX entry in regset_info target_regsets.
7706 * configure.srv: Add new VSX dependencies.
7708 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7710 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7711 (remote_open): Set or clear transport_is_reliable.
7712 (putpkt_binary): Don't expect acks in noack mode.
7713 (getpkt): Don't send ack/nac in noack mode.
7714 * server.c (handle_general_set): Handle QStartNoAckMode.
7715 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7717 (main): Reset noack_mode on every connection.
7718 * server.h (noack_mode): Declare.
7720 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7722 * Makefile.in (GDBREPLAY_OBS): New variable.
7723 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7725 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7726 Daniel Jacobowitz <dan@codesourcery.com>
7728 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7729 (usr_store_inferior_registers): Likewise.
7730 (regsets_store_inferior_registers): Likewise.
7732 2008-07-31 Rolf Jansen <rj@surtec.com>
7733 Pedro Alves <pedro@codesourcery.com>
7735 * configure.ac: Check for memmem declaration.
7736 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7737 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7738 (disable_packet_qfThreadInfo): Unconditionally compile.
7739 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7740 * configure, config.in: Regenerate.
7742 2008-07-28 Doug Kwan <dougkwan@google.com>
7744 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7745 (linux_write_memory): Remove declaration of errno.
7747 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7749 * linux-low.c (handle_extended_wait): Do not use "status"
7750 variable uninitialized.
7752 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7754 * server.c (handle_v_attach): Inhibit reporting dll changes.
7756 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7758 * remote-utils.c (prepare_resume_reply): If requested, don't
7759 output "thread:TID" in the T stop reply.
7761 * server.c (disable_packet_vCont, disable_packet_Tthread)
7762 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7763 (handle_query): If requested, disable support for qC, qfThreadInfo
7765 (handle_v_requests): If requested, disable support for vCont.
7766 (gdbserver_show_disableable): New.
7767 (main): Handle --disable-packet and --disable-packet=LIST.
7769 * server.h (disable_packet_vCont, disable_packet_Tthread)
7770 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7772 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7774 * server.c (gdbserver_usage): Mention --version.
7776 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7778 * Makefile.in (gdbreplay.o): New rule.
7780 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7782 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7783 message, not gdbserver.
7785 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7786 Nathan Sidwell <nathan@codesourcery.com>
7787 Joseph Myers <joseph@codesourcery.com>
7789 * acinclude.m4: Include ../../config/acx.m4.
7790 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7791 * configure, config.in: Regenerate.
7792 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7793 * server.c (gdbserver_version): Print PKGVERSION.
7794 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7795 (main): Adjust gdbserver_usage calls.
7796 * gdbreplay.c (version, host_name): Add declarations.
7797 (gdbreplay_version, gdbreplay_usage): New.
7798 (main): Accept --version and --help options.
7800 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7802 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7803 (arm_breakpoint_at): Handle Thumb.
7804 (the_low_target): Add comment.
7806 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7808 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7810 2008-05-09 Doug Evans <dje@google.com>
7812 * server.h (decode_search_memory_packet): Declare.
7813 * remote-utils.c (decode_search_memory_packet): New fn.
7814 * server.c (handle_search_memory_1): New fn.
7815 (handle_search_memory): New fn.
7816 (handle_query): Process qSearch:memory packets.
7818 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7820 * regcache.c (registers_length): Remove.
7821 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7822 full register packet.
7823 * regcache.h (registers_length): Remove prototype.
7824 * server.h (PBUFSIZ): Define to 16384.
7826 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7828 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7829 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7830 powerpc-64l.o, and powerpc-altivec64l.o.
7831 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7832 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7833 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7834 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7835 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7838 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7839 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7840 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7841 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7842 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7843 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7844 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7845 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7846 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7847 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7850 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7851 (init_registers_powerpc_32l): ... this new prototype.
7852 (init_registers_powerpc_32): Remove, replace by ...
7853 (init_registers_powerpc_altivec32l): ... this new prototype.
7854 (init_registers_powerpc_e500): Remove, replace by ...
7855 (init_registers_powerpc_e500l): ... this new prototype.
7856 (init_registers_ppc64): Remove, replace by ...
7857 (init_registers_powerpc_64l): ... this new prototype.
7858 (init_registers_powerpc_64): Remove, replace by ...
7859 (init_registers_powerpc_altivec64l): ... this new prototype.
7860 (ppc_num_regs): Set to 73.
7861 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7862 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7863 (ppc_cannot_store_register): Handle orig_r3 and trap.
7864 (ppc_arch_setup): Update init_registers_... calls.
7865 (ppc_fill_gregset): Handle orig_r3 and trap.
7867 * inferiors.c (clear_inferiors): Reset current_inferior.
7869 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7871 * acinclude.m4: Add override.m4.
7872 * configure: Regenerate.
7874 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7876 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7877 initial call to init_register_ppc64.
7879 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7881 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7882 single powerpc*-*-linux* case.
7883 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7885 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7887 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7888 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7890 * linux-ppc-low.c: Include <elf.h>.
7891 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7892 (ppc_hwcap): New global variable.
7893 (ppc_regmap): Remove __SPE__ #ifdef sections.
7894 (ppc_regmap_e500): New global variable.
7895 (ppc_cannot_store_register): Update __SPE__ special case.
7896 (ppc_get_hwcap): New function.
7897 (ppc_arch_setup): Use it to determine whether inferior supports
7898 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7899 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7900 Do not access registers if target does not support AltiVec.
7901 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7902 Do not access registers if target does not support SPE.
7903 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7905 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7907 * linux-low.c (disabled_regsets, num_regsets): New.
7908 (use_regsets_p): Delete.
7909 (linux_wait_for_process): Clear disabled_regsets.
7910 (regsets_fetch_inferior_registers): Check and set it.
7911 (regsets_store_inferior_registers): Likewise.
7912 (linux_fetch_registers, linux_store_registers): Do not use
7914 (initialize_low): Allocate disabled_regsets.
7916 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7918 * Makefile.in (LIBOBJS): New.
7920 (memmem.o): New rule.
7921 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7922 * configure: Regenerated.
7924 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7926 * server.c (handle_query): Never return "unsupported" for
7927 qXfer:features:read queries.
7929 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7931 * server.c (get_features_xml): Fix inverted condition.
7932 (handle_query): Always support qXfer:feature:read.
7934 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7936 * server.c (wrapper_argv): New.
7937 (start_inferior): Handle wrapper_argv. If set, expect an extra
7939 (gdbserver_usage): Document --wrapper.
7940 (main): Parse --wrapper.
7942 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7944 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7945 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7946 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7947 (ppc_set_pc): Likewise.
7948 (ppc_arch_setup): New function.
7949 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7950 of collect_register.
7951 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
7953 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7955 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
7956 instead of linux-ppc64-low.o.
7957 * linux-ppc64-low.c: Remove file.
7958 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
7959 (linux-ppc64-low.o): Remove rule.
7961 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
7962 (init_registers_powerpc_64): Likewise.
7963 (ppc_regmap): Conditionally define depending on __powerpc64__.
7964 (ppc_cannot_store_register): Do not special-case "fpscr" when
7965 compiled on __powerpc64__.
7966 (ppc_collect_ptrace_register): New function.
7967 (ppc_supply_ptrace_register): New function.
7968 (ppc_breakpoint): Change type to "unsigned int".
7969 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
7970 (the_low_target): Conditionally provide initializers for the
7971 arch_setup member depending on __powerpc64__. Install
7972 collect_ptrace_register and supply_ptrace_register members.
7974 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7976 * regcache.h (gdbserver_xmltarget): Add extern declaration.
7977 * server.c (gdbserver_xmltarget): Define.
7978 (get_features_xml): Use it to replace "target.xml" and arch_string.
7980 * configure.srv: Remove srv_xmltarget. Add XML files that were
7981 mentioned there to srv_xmlfiles instead. Remove conditional tests
7982 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
7983 srv_xmlfiles and srv_regobj to include all possible choices.
7984 * configure.ac (srv_xmltarget): Remove.
7985 (srv_xmlfiles): Do not add "target.xml".
7986 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
7987 checks for supplementary target information.
7988 * configure: Regenerate.
7989 * Makefile.in (XML_TARGET): Remove.
7990 (target.xml): Remove rule.
7991 (clean): Do not clean up target.xml.
7992 (.PRECIOUS): Do not mention target.xml.
7994 * target.h (struct target_ops): Remove arch_string member.
7995 * linux-low.c (linux_arch_string): Remove.
7996 (linux_target_ops): Remove arch_string initializer.
7997 * linux-low.h (struct linux_target_ops): Remove arch_string member.
7998 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
7999 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8000 * spu-low.c (spu_arch_string): Remove.
8001 (spu_target_ops): Remove arch_string initializer.
8002 * win32-low.c (win32_arch_string): Remove.
8003 (win32_target_ops): Remove arch_string initializer.
8004 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8005 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8006 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8008 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8010 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8011 by collect_ptrace_register and supply_ptrace_register hooks.
8012 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8013 instead of checking for the_low_target.left_pad_xfer.
8014 (usr_store_inferior_registers): Use collect_ptrace_register callback
8015 instead of checking for the_low_target.left_pad_xfer.
8017 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8018 (s390_supply_ptrace_register): Likewise.
8019 (s390_fill_gregset): Call s390_collect_ptrace_register.
8020 (the_low_target): Update.
8022 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8023 (ppc_supply_ptrace_register): Likewise.
8024 (the_low_target): Update.
8026 * linux-i386-low.c (the_low_target): Update.
8027 * linux-x86-64-low.c (the_low_target): Update.
8029 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8031 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8032 reg-s390.o and reg-s390x.o.
8034 * linux-low.c (new_inferior): New global variable.
8035 (linux_create_inferior, linux_attach): Set it.
8036 (linux_wait_for_process): Call the_low_target.arch_setup after the
8037 target has stopped for the first time.
8038 (initialize_low): Do not call the_low_target.arch_setup.
8040 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8041 (s390_set_pc): Likewise.
8042 (s390_arch_setup): New function.
8043 (the_low_target): Use s390_arch_setup as arch_setup routine.
8045 * regcache.c (realloc_register_cache): New function.
8046 (set_register_cache): Call it for each existing regcache.
8048 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8050 * server.h (init_registers): Remove prototype.
8052 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8053 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8054 instead of init_registers ().
8055 * linux-arm-low.c (init_registers_arm): Add prototype.
8056 (init_registers_arm_with_iwmmxt): Likewise.
8057 (the_low_target): Add initializer for arch_setup field.
8058 * linux-cris-low.c (init_registers_cris): Add prototype.
8059 (the_low_target): Add initializer for arch_setup field.
8060 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8061 (the_low_target): Add initializer for arch_setup field.
8062 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8063 (the_low_target): Add initializer for arch_setup field.
8064 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8065 (the_low_target): Add initializer for arch_setup field.
8066 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8067 (the_low_target): Add initializer for arch_setup field.
8068 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8069 (the_low_target): Add initializer for arch_setup field.
8070 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8071 (init_registers_mips64_linux): Likewise.
8072 (the_low_target): Add initializer for arch_setup field.
8073 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8074 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8075 (the_low_target): Add initializer for arch_setup field.
8076 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8077 (init_registers_powerpc_64): Likewise.
8078 (the_low_target): Add initializer for arch_setup field.
8079 * linux-s390-low.c (init_registers_s390): Add prototype.
8080 (init_registers_s390x): Likewise.
8081 (the_low_target): Add initializer for arch_setup field.
8082 * linux-sh-low.c (init_registers_sh): Add prototype.
8083 (the_low_target): Add initializer for arch_setup field.
8084 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8085 (the_low_target): Add initializer for arch_setup field.
8086 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8087 (the_low_target): Add initializer for arch_setup field.
8089 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8090 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8091 instead of init_registers ().
8092 * win32-arm-low.c (init_registers_arm): Add prototype.
8093 (the_low_target): Add initializer for arch_setup field.
8094 * win32-i386-low.c (init_registers_i386): Add prototype.
8095 (the_low_target): Add initializer for arch_setup field.
8097 * spu-low.c (init_registers_spu): Add prototype.
8098 (initialize_low): Call initialie_registers_spu () instead of
8099 initialize_registers ().
8101 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8103 * server.c (handle_v_requests): When handling the vRun and vAttach
8104 packets, if already debugging a process, don't kill it. Return an
8107 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8109 * server.c (handle_query): Correct length check.
8111 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8113 * win32-low.c (do_initial_child_stuff): Add process handle
8114 parameter. Set current_process_handle and current_process_id from the
8115 parameters. Clear globals.
8116 (win32_create_inferior): Don't set current_process_handle and
8117 current_process_id here. Instead pass them on the call to
8118 do_initial_child_stuff.
8119 (win32_attach): Likewise.
8120 (win32_clear_inferiors): New.
8121 (win32_kill): Don't close the current process handle or the
8122 current thread handle here. Instead call win32_clear_inferiors.
8123 (win32_detach): Don't open a new handle to the process. Call
8124 win32_clear_inferiors.
8125 (win32_join): Don't rely on current_process_handle; open a new
8126 handle using the process id.
8127 (win32_wait): Call win32_clear_inferiors when the inferior process
8130 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8132 * server.c (monitor_show_help): Add "exit".
8134 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8136 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8137 (clean): Add reg-xtensa.c.
8138 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8139 * configure.srv (xtensa*-*-linux*) New target.
8140 * linux-xtensa-low.c: New.
8141 * xtensa-xtregs.c: New.
8143 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8145 * hostio.c: Don't include errno.h.
8146 (errno_to_fileio_errno): Move to hostio-errno.
8147 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8148 error number outputting to the target->hostio_last_error callback.
8149 (hostio_packet_error): Use FILEIO_EINVAL directly.
8150 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8151 calls to hostio_error.
8152 * hostio-errno.c: New.
8153 * server.h (hostio_last_error_from_errno): Declare.
8154 * target.h (target_ops): Add hostio_last_error member.
8155 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8156 as hostio_last_error handler.
8157 * spu-low.c (spu_target_ops): Likewise.
8158 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8159 (wince_hostio_last_error): New functions.
8160 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8161 as hostio_last_error handler.
8162 (win32_target_ops) [!_WIN32_WCE]: Register
8163 hostio_last_error_from_errno as hostio_last_error handler.
8164 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8165 (hostio-errno.o): New rule.
8166 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8167 * configure.srv (srv_hostio_err_objs): New variable. Default to
8169 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8170 * configure: Regenerate.
8172 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8174 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8175 (linux_kill, linux_detach): Clean up the process list.
8176 * remote-utils.c (remote_open): Improve port number parsing.
8177 (putpkt_binary, input_interrupt): Only send interrupts if the target
8179 * server.c (extended_protocol): Make static.
8180 (attached): Define earlier.
8181 (exit_requested, response_needed, program_argv): New variables.
8182 (target_running): New.
8183 (start_inferior): Clear attached here.
8184 (attach_inferior): Set attached here.
8185 (require_running): Define.
8186 (handle_query): Use require_running and target_running. Implement
8188 (handle_v_attach, handle_v_run): New.
8189 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8190 (gdbserver_usage): Update.
8191 (main): Redo argument parsing. Handle --debug and --multi. Handle
8192 --attach along with other options or after the port. Save
8193 program_argv. Support no initial program. Resynchronize
8194 communication with GDB after an error. Handle "monitor exit".
8195 Use require_running and target_running. Always allow the extended
8196 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8197 restart in extended mode.
8198 * README: Refer to the GDB manual. Update --attach usage.
8200 2007-12-20 Andreas Schwab <schwab@suse.de>
8202 * linux-low.c (STACK_SIZE): Define.
8203 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8204 (linux_test_for_tracefork): Likewise.
8206 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8208 * linux-low.c (linux_wait_for_event): Update messages. Do not
8209 reinsert auto-delete breakpoints.
8210 * mem-break.c (struct breakpoint): Change return type of handler to
8212 (set_breakpoint_at): Update handler type.
8213 (reinsert_breakpoint_handler): Return 1 instead of calling
8215 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8217 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8218 * mem-break.h (set_breakpoint_at): Update handler type.
8219 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8220 * win32-low.c (auto_delete_breakpoint): New.
8221 (get_child_debug_event): Use it.
8223 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8225 * configure.ac: Check for pread and pwrite.
8226 * hostio.c (handle_pread): Fall back to lseek and read.
8227 (handle_pwrite): Fall back to lseek and write.
8228 * config.in, configure: Regenerated.
8230 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8232 * server.c (myresume): Add own_buf argument.
8233 (main): Update calls.
8235 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8237 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8238 * remote-utils.c (remote_open): Do not call disable_async_io.
8239 (block_async_io): Delete.
8240 (unblock_async_io): Make static.
8241 (initialize_async_io): New.
8242 * server.c (handle_v_cont): Handle async I/O here.
8243 (myresume): Likewise. Move other common resume tasks here...
8244 (main): ... from here. Call initialize_async_io. Disable async
8245 I/O before the main loop.
8246 * server.h (initialize_async_io): Declare.
8247 (block_async_io, unblock_async_io): Delete prototypes.
8248 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8250 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8252 * remote-utils.c (readchar): Allow binary data in received messages.
8254 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8256 * win32-low.c (attaching): New global.
8257 (win32_create_inferior): Clear the `attaching' global.
8258 (win32_attach): Set the `attaching' global.
8259 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8260 attaching. Only set a breakpoint at the entry point if not
8263 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8265 * server.c (main): Don't report dll events on the initial
8266 connection on attaches.
8268 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8270 * server.c (main): Relax numerical bases supported for the pid of
8271 the --attach command line argument.
8273 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8275 * win32-low.c (win32_attach): Call OpenProcess before
8276 DebugActiveProcess, not after. Add last error output to error
8279 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8281 * win32-low.c (win32_get_thread_context)
8282 (win32_set_thread_context): New functions.
8283 (thread_rec): Use win32_get_thread_context.
8284 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8285 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8288 2007-12-03 Leo Zayas
8289 Pedro Alves <pedro_alves@portugalmail.pt>
8291 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8293 (child_add_thread): Minor cleanup.
8294 (child_continue): Resume artificially suspended threads before
8295 calling ContinueDebugEvent.
8296 (suspend_one_thread): New.
8297 (fake_breakpoint_event): New.
8298 (get_child_debug_event): Change return type to int. Check here if
8299 gdb sent an interrupt request. If a soft interrupt was requested,
8300 fake a breakpoint event. Return 0 if there is no event to handle,
8302 (win32_wait): Don't check here if gdb sent an interrupt request.
8303 Ensure there is a valid event to handle.
8304 (win32_request_interrupt): Add soft interruption method as last
8307 2007-12-03 Leo Zayas
8308 Pedro Alves <pedro_alves@portugalmail.pt>
8310 * win32-low.h (win32_thread_info): Add descriptions to the
8311 structure members. Replace `suspend_count' counter by a
8313 * win32-low.c (thread_rec): Update condition of when to get the
8314 context from the inferior. Rely on ContextFlags being set if it
8315 has already been retrieved. Only suspend the inferior thread if
8316 we haven't already. Warn if that fails.
8317 (continue_one_thread): s/suspend_count/suspended/. Only call
8318 ResumeThread once. Warn if that fails.
8320 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8322 * win32-low.c (win32_wait): Don't read from the inferior when it
8325 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8327 * Makefile.in (win32_low_h): New variable.
8328 (win32-low.o): Add dependency on $(win32_low_h).
8329 (win32-arm-low.o, win32-i386-low.o): New rules.
8331 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8333 * hostio.c: Correct copyright year.
8335 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8337 * Makefile.in (OBS): Add hostio.o.
8338 (hostio.o): New rule.
8339 * server.h (handle_vFile): Declare.
8340 * hostio.c: New file.
8341 * server.c (handle_v_requests): Take packet_len and new_packet_len
8342 for binary packets. Call handle_vFile.
8343 (main): Update call to handle_v_requests.
8345 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8347 * linux-low.c: Include <sched.h>.
8349 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8351 * linux-low.c (linux_tracefork_grandchild): New.
8352 (linux_tracefork_child): Use clone.
8353 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8355 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8357 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8359 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8361 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8363 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8365 * inferiors.c (change_inferior_id): Delete.
8366 (add_pid_to_list, pull_pid_from_list): New.
8367 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8368 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8369 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8370 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8371 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8372 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8373 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8374 (using_threads): Always set to 1.
8375 (handle_extended_wait): New.
8376 (add_process): Do not set TID.
8377 (linux_create_inferior): Set must_set_ptrace_flags.
8378 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8379 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8380 (linux_thread_alive): Rename TID argument to LWPID.
8381 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8382 (linux_wait_for_event): Do not use TID or check using_threads. Update
8383 call to dead_thread_notify. Call handle_extended_wait.
8384 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8385 (send_sigstop): Delete sigstop_sent.
8386 (wait_for_sigstop): Avoid TID.
8387 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8388 (linux_test_for_tracefork): New.
8389 (linux_lookup_signals): Use thread_db_active and
8390 linux_supports_tracefork_flag.
8391 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8392 * linux-low.h (get_process_thread): Avoid TID.
8393 (struct process_ifo): Move thread_known and tid to the end. Remove
8395 (linux_attach_lwp, thread_db_init): Update prototypes.
8396 * server.h (change_inferior_id): Delete prototype.
8397 (add_pid_to_list, pull_pid_from_list): New prototypes.
8398 * thread-db.c (thread_db_use_events): New.
8399 (find_first_thread): Rename to...
8400 (find_one_thread): ...this. Update callers and messages. Do not
8401 call fatal. Check thread_db_use_events. Do not call
8402 change_inferior_id or new_thread_notify.
8403 (maybe_attach_thread): Update. Do not call new_thread_notify.
8404 (thread_db_init): Set thread_db_use_events. Check use_events.
8405 * utils.c (fatal, warning): Correct message prefix.
8407 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8409 * Makefile.in (clean): Remove new files.
8410 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8411 (powerpc-64.o, powerpc-64.c): New rules.
8412 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8413 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8415 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8417 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8418 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8419 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8420 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8421 (target_regsets): Add AltiVec and SPE register sets.
8422 * configure.ac: Check for AltiVec and SPE.
8423 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8424 (ppc_fill_vrregset, ppc_store_vrregset): New.
8425 (target_regsets): Add AltiVec register set.
8426 * configure: Regenerated.
8428 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8430 * linux-low.c (O_LARGEFILE): Define.
8431 (linux_read_memory): Use /proc/PID/mem.
8432 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8433 * configure, config.in: Regenerated.
8435 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8437 * linux-low.c (linux_wait_for_event): Do not pass signals while
8440 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8442 * win32-low.c (create_process): New.
8443 (win32_create_inferior): Use create_process instead of
8444 CreateProcess. If create_process failed retry appending an ".exe"
8445 suffix. Store the GetLastError result immediatelly after
8446 create_process calls and use it on the call to error.
8448 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8450 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8452 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8454 * configure.ac: Switch license to GPLv3.
8456 2007-08-01 Michael Snyder <msnyder@access-company.com>
8458 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8460 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8462 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8464 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8465 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8466 CloseToolhelp32Snapshot.
8467 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8468 CloseToolhelp32Snapshot.
8470 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8472 * server.c (main): Check for inferior exit before main loop.
8474 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8476 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8477 instead of on tmp_desc.
8479 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8480 Daniel Jacobowitz <dan@codesourcery.com>
8482 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8483 (add_thread): Minor cleanups.
8484 (clear_inferiors): Move lower in the file. Clear the DLL
8486 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8487 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8488 (xml_escape_text): New.
8489 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8491 (handle_v_cont): Report errors.
8492 (gdbserver_version): Update.
8493 (main): Correct size of own_buf. Do not report initial DLL events.
8494 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8495 (unloaded_dll, xml_escape_text): New.
8496 * win32-low.c (enum target_waitkind): Update comments.
8497 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8498 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8499 (win32_EnumProcessModules, win32_GetModuleInformation)
8500 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8501 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8502 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8503 (win32_Module32First, win32_Module32Next, load_toolhelp)
8504 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8505 (get_child_debug_event): Handle DLL events.
8506 (win32_wait): Likewise.
8508 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8510 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8511 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8513 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8515 * win32-low.c (handle_output_debug_string): Ignore event if not
8518 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8520 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8522 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8524 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8526 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8528 * inferiors.c (change_inferior_id): Add comment.
8529 * linux-low.c (check_removed_breakpoint): Add an early
8530 prototype. Improve debug output.
8531 (linux_attach): Doc update.
8532 (linux_detach_one_process, linux_detach): Clean up before releasing
8534 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8535 * linux-low.h (struct process_info): Doc improvement.
8536 * mem-break.c (delete_all_breakpoints): New.
8537 * mem-break.h (delete_all_breakpoints): New prototype.
8538 * thread-db.c (find_first_thread): New.
8539 (thread_db_create_event): Call it instead of
8540 thread_db_find_new_threads. Clean up unused variables.
8541 (maybe_attach_thread): Remove first thread handling.
8542 (thread_db_find_new_threads): Use find_first_thread.
8543 (thread_db_get_tls_address): Likewise.
8545 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8547 * thread-db.c (thread_db_find_new_threads): Add prototype.
8548 (thread_db_create_event): Check for the main thread before adding
8550 (maybe_attach_thread): Only enable event reporting if TID == 0.
8551 (thread_db_get_tls_address): Check for new threads.
8553 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8555 * linux-low.c (linux_create_inferior): Try execv before execvp.
8556 * spu-low.c (spu_create_inferior): Likewise.
8558 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8560 * linux-low.c (linux_create_inferior): Change execv to execvp.
8561 * spu-low.c (spu_create_inferior): Likewies.
8563 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8565 * Makefile.in (clean): Clean new files instead of deleted ones.
8566 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8567 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8569 * configure.srv: Specify XML files and new regformats for MIPS and
8571 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8572 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8573 an entry for the restart register.
8574 (mips_cannot_fetch_register, mips_cannot_store_register)
8575 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8576 register names to match the XML descriptions.
8577 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8578 restart register instead of $0.
8580 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8581 Markus Deuling <deuling@de.ibm.com>
8583 * remote-utils.c (decode_xfer_write): New function.
8584 * server.h (decode_xfer_write): Add prototype.
8585 * server.c (handle_query): Add PACKET_LEN argument. Support
8586 qXfer:spu:read and qXfer:spu:write packets.
8587 (main): Pass packet_len to handle_query.
8588 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8589 * target.h (target_ops): Add qxfer_spu.
8591 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8593 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8594 accessing non-seekable spufs files.
8596 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8598 * server.c (handle_query): Add reply for qC packet.
8600 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8601 Leo Zayas <lerele@champenstudios@com>
8603 * server.h (check_remote_input_interrupt_request): New function.
8604 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8605 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8606 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8607 (check_remote_input_interrupt_request): New function.
8608 * server.h (check_remote_input_interrupt_request): Declare.
8609 * win32-low.c (winapi_DebugBreakProcess,
8610 winapi_GenerateConsoleCtrlEvent): New typedefs.
8611 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8613 (win32_wait): Check for remote interrupt request
8614 with check_remote_input_interrupt_request.
8615 (win32_request_interrupt): New function.
8616 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8618 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8620 * win32-low.c (debug_registers_changed,
8621 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8622 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8623 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8624 (thread_rec): Get context using the low target.
8625 (child_add_thread): Call thread_added on the low target,
8626 which does the same thing.
8628 (do_initial_child_stuff): Remove debug registers references.
8629 Set context using the low target. Resume threads after
8630 setting the contexts.
8631 (child_continue): Remove dead variable. Remove debug
8632 registers references.
8633 (child_fetch_inferior_registers): Go through the low target.
8634 (do_child_store_inferior_registers): Remove.
8635 (child_store_inferior_registers): Go through the low target.
8636 (win32_resume): Remove debug registers references.
8637 Set context using the low target.
8638 (handle_exception): Change return type to void. Don't record
8639 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8640 first chance exception.
8641 (get_child_debug_event): Change return type to void. Remove
8642 goto loop. Always return after waiting for debug event.
8643 (win32_wait): Convert to switch statement. Handle spurious
8646 * win32-i386-low.c (debug_registers_changed,
8647 debug_registers_used): New.
8648 (initial_stuff): Rename to ...
8649 (i386_initial_stuff): ... this. Clear debug registers
8651 (store_debug_registers): Delete.
8652 (i386_get_thread_context): New.
8653 (load_debug_registers): Delete.
8654 (i386_set_thread_context): New.
8655 (i386_thread_added): New.
8656 (single_step): Rename to ...
8657 (i386_single_step): ... this.
8658 (do_fetch_inferior_registers): Rename to ...
8659 (i386_fetch_inferior_register): ... this.
8660 (i386_store_inferior_register): New.
8661 (the_low_target): Adapt to new interface.
8663 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8664 (arm_get_thread_context): New.
8665 (arm_set_thread_context): New.
8667 (do_fetch_inferior_registers): Rename to ...
8668 (arm_fetch_inferior_register): ... this.
8669 (arm_store_inferior_register): New.
8670 (arm_wince_breakpoint): Reimplement as unsigned long.
8671 (arm_wince_breakpoint_len): Define.
8672 (the_low_target): Adapt to new interface.
8674 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8675 load_debug_registers. Add get_thread_context, set_thread_context,
8676 thread_added and store_inferior_register. Rename
8677 fetch_inferior_registers to fetch_inferior_register.
8678 (regptr): Remove declaration.
8680 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8682 * linux-low.c (linux_detach): Change return type to int. Return 0.
8683 * spu-low.c (spu_detach): Likewise.
8685 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8687 * target.h (target_ops): Change return type of detach to int.
8689 (join_inferior): New.
8690 * server.c (main): Don't skip detach support on mingw32.
8691 If the inferior doesn't support detaching return error.
8692 Call join_inferior instead of using waitpid.
8693 * linux-low.c (linux_join): New.
8694 (linux_target_op): Add linux_join.
8695 * spu-low.c (spu_join): New.
8696 (spu_target_ops): Add spu_join.
8697 * win32-low.c (win32_detach): Adapt to new interface.
8698 Reopen current_process_handle before detaching. Issue a child
8699 resume before detaching.
8701 (win32_target_op): Add win32_join.
8703 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8705 * win32-low.c (win32-attach): Fix return value.
8706 * target.h (target_ops): Describe ATTACH return values.
8708 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8710 * win32-low.c (GETPROCADDRESS): Define.
8711 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8712 (winapi_DebugSetProcessKillOnExit): Likewise.
8713 (win32_create_inferior): Force usage of ansi CreateProcessA.
8714 (win32_attach): Use GETPROCADDRESS.
8715 (win32_detach): Likewise.
8717 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8719 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8721 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8723 * win32-low.c: Commit leftover changes from 2007-03-29.
8725 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8727 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8728 fields short instead of int. Add explicit padding.
8729 (i387_cache_to_fsave): Remove unnecessary casts.
8730 (i387_fsave_to_cache): Doc fix.
8731 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8733 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8735 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8736 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8738 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8740 * configure.srv (arm*-*-mingw32ce*): Move near the other
8743 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8745 * configure.ac: Add errno checking.
8746 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8747 sys/file.h and malloc.h.
8748 (AC_CHECK_DECLS): Add perror.
8749 (srv_mingwce): Handle.
8750 * configure.srv (i[34567]86-*-cygwin*): Add
8751 win32-i386-low.o to srv_tgtobj.
8752 (i[34567]86-*-mingw*): Likewise.
8753 (arm*-*-mingw32ce*): Add case.
8754 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8755 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8756 [__MINGW32CE__] (strerror): New function.
8757 [__MINGW32CE__] (errno): Define to GetLastError.
8758 [__MINGW32CE__] (COUNTOF): New macro.
8759 (remote_open): Remove extra close call.
8760 * mem-break.c (delete_breakpoint_at): New function.
8761 * mem-break.h (delete_breakpoint_at): Declare.
8762 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8763 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8764 [USE_WIN32API] (read, write): Add char* casts.
8765 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8766 * server.h: Include wincecompat.h on Windows CE.
8767 [HAVE_ERRNO_H]: Check.
8768 (perror): Declare if not declared.
8769 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8770 (perror_with_name): Remove errno declaration.
8771 * wincecompat.h: New.
8772 * wincecompat.c: New.
8774 * win32-arm-low.c: New.
8775 * win32-i386-low.c: New.
8776 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8777 (OUTMSG2): Make it safe.
8779 (COUNTOF): New macro.
8780 (NUM_REGS): Get it from the low target.
8781 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8782 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8783 (thread_rec): Let low target handle debug registers.
8784 (child_add_thread): Likewise.
8785 (child_init_thread_list): Likewise.
8786 (continue_one_thread): Likewise.
8788 (do_child_fetch_inferior_registers): Move to ...
8789 * win32-i386-low.c: ... here, and rename to ...
8790 (do_fetch_inferior_registers): ... this.
8791 * win32-low.c (child_fetch_inferior_registers):
8792 Go through the low target.
8793 (do_child_store_inferior_registers): Use regptr.
8794 (strwinerror): New function.
8795 (win32_create_inferior): Handle Windows CE.
8796 Use strwinerror instead of strerror on Windows error
8797 codes. Add program to the error output.
8798 Don't close the main thread handle on Windows CE.
8799 (win32_attach): Use coredll.dll on Windows CE.
8800 (win32_kill): Close current process and current
8802 (win32_detach): Use coredll.dll on Windows CE.
8803 (win32_resume): Let low target handle debug registers, and
8805 (handle_exception): Add/Remove initial breakpoint. Avoid
8806 non-existant WSTOPSIG on Windows CE.
8807 (win32_read_inferior_memory): Cast to remove warning.
8808 (win32_arch_string): Go through the low target.
8809 (initialize_low): Call set_breakpoint_data with the low
8810 target's breakpoint.
8811 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8812 FOP_REGNUM, mappings): Move to ...
8813 * win32-i386-low.c: ... here.
8814 * win32-low.c (win32_thread_info): Move to ...
8815 * win32-low.h: ... here.
8816 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8817 win32-arm-low.c and wincecompat.c.
8818 (all:): Add $EXEEXT.
8819 (install-only:): Likewise.
8820 (gdbserver:): Likewise.
8821 (gdbreplay:): Likewise.
8822 * config.in: Regenerate.
8823 * configure: Regenerate.
8825 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8827 * win32-low.c: Rename typedef thread_info to
8828 win32_thread_info throughout.
8830 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8832 * win32-i386-low.c: Rename to ...
8833 * win32-low.c: ... this.
8834 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8835 * Makefile.in: Likewise.
8837 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8839 * remote-utils.c (monitor_output): Constify msg parameter.
8840 * server.h (monitor_output): Likewise.
8841 * win32-i386-low.c (handle_output_debug_string): New.
8842 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8843 handle_output_debug_string.
8844 (get_child_debug_event): Likewise.
8846 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8848 * server.c (main): Correct strtoul check.
8850 2007-03-27 Jon Ringle <jon@ringle.org>
8852 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8854 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8856 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8858 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8860 * terminal.h: Check HAVE_SGTTY_H.
8862 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8864 * remote-utils.c (remote_open): Print out the assigned port number.
8866 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8868 * remote-utils.c (monitor_output): New function.
8869 * server.c (debug_threads): Define here.
8870 (monitor_show_help): New function.
8871 (handle_query): Handle qRcmd.
8872 (main): Do not handle 'd' packet.
8873 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8874 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8877 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8879 * Makefile.in (EXEEXT): New.
8880 (clean): Use $(EXEEXT).
8882 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8884 * target.h (target_ops): Rename send_signal to request_interrupt,
8885 and remove enum target_signal parameter.
8886 * linux-low.c (linux_request_interrupt): Rename from
8887 linux_send_signal, and always send SIGINT.
8888 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8889 and always send SIGINT.
8890 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8892 (input_interrupt): Likewise.
8894 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8896 * server.c (get_features_xml): Check if target implemented
8898 * win32-i386-low.c (win32_arch_string): New.
8899 (win32_target_ops): Add win32_arch_string as arch_string member.
8901 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8903 * spu-low.c (spu_arch_string): New.
8904 (spu_target_ops): Add spu_arch_string.
8906 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8908 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8909 * configure.ac: Do not check for terminal.h.
8910 * configure, config.in: Regenerated.
8912 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8914 * Makefile.in (OBS): Add $(XML_BUILTIN).
8915 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8917 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8918 (arm-with-iwmmxt.c): New.
8919 * config.in, configure: Regenerate.
8920 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8921 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8922 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8923 (arm*-*-linux*): Add iWMMXt and regset support.
8924 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8925 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8926 (arm_store_wmmxregset, target_regsets): New.
8927 * server.c (get_features_xml): Take annex argument. Check builtin
8929 (handle_query): Handle multiple annexes.
8931 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8933 * remote-utils.c [USE_WIN32API] (read, write): Define.
8934 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8937 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8939 * linux-i386-low.c (the_low_target): Set arch_string.
8940 * linux-x86-64-low.c (the_low_target): Likewise.
8941 * linux-low.c (linux_arch_string): New.
8942 (linux_target_ops): Add it.
8943 * linux-low.h (struct linux_target_ops): Add arch_string.
8944 * server.c (write_qxfer_response): Use const void * for DATA.
8945 (get_features_xml): New.
8946 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8947 * target.h (struct target_ops): Add arch_string method.
8949 2007-01-03 Denis Pilat <denis.pilat@st.com>
8950 Daniel Jacobowitz <dan@codesourcery.com>
8952 * linux-low.c (linux_kill): Handle being called with no threads.
8953 * win32-i386-low.c (win32_kill): Likewise.
8954 (get_child_debug_event): Clear current_process_handle.
8956 2006-12-30 Denis PILAT <denis.pilat@st.com>
8957 Daniel Jacobowitz <dan@codesourcery.com>
8959 * remote-utils.c (remote_open): Check the type of specified
8960 serial port devices before opening them.
8961 * server.c (main): Kill the inferior if an error occurs during
8962 the first remote_open.
8964 2006-12-05 Markus Deuling <deuling@de.ibm.com>
8966 * README: Update supported targets.
8968 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
8970 * Makefile.in (clean): Remove reg-mips64.c.
8971 (reg-mips64.c, reg-mips64.o): New rules.
8972 * configure.srv: Handle mips64. Include regset support for mips.
8973 * linux-mips-low.c (union mips_register): New.
8974 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
8975 (mips_breakpoint, mips_breakpoint_at): Use int.
8976 (mips_collect_register, mips_supply_register)
8977 (mips_collect_register_32bit, mips_supply_register_32bit)
8978 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8979 (mips_store_fpregset, target_regsets): New.
8980 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
8982 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
8984 * configure.srv: Add target "spu*-*-*".
8985 * Makefile.in (clean): Remove reg-spu.c.
8986 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
8987 * spu-low.c: New file.
8989 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8991 * configure.ac: Correct td_thr_tls_get_addr test.
8992 * configure: Regenerated.
8994 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
8996 * linux-low.c (linux_wait_for_event): Reformat. Use the
8998 * remote-utils.c (decode_address_to_semicolon): New.
8999 * server.c (pass_signals, handle_general_set): New.
9000 (handle_query): Mention QPassSignals for qSupported.
9001 (main): Call handle_general_set.
9002 * server.h (pass_signals, decode_address_to_semicolon): New.
9004 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9006 * server.c (handle_query): Correct error handling for read_auxv.
9008 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9010 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9011 and srv_linux_thread_db to yes.
9012 * linux-s390-low.c (s390_fill_gregset): New function.
9013 (target_regsets): Define data structure.
9015 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9017 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9018 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9019 * config.in, configure: Regenerated.
9020 * inferiors.c (gdb_id_to_thread): New function.
9021 (gdb_id_to_thread_id): Use it.
9022 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9023 * linux-low.h (struct process_info): Add th member.
9024 (thread_db_get_tls_address): New prototype.
9025 * remote-utils.c (decode_address): Make non-static.
9026 * server.c (handle_query): Handle qGetTLSAddr.
9027 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9028 * target.h (struct target_ops): Add get_tls_address.
9029 * thread-db.c (maybe_attach_thread): Save the thread handle.
9030 (thread_db_get_tls_address): New.
9032 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9034 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9035 (linux_resume_one_process): Take a siginfo_t *. Update all
9036 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9037 (struct pending_signals): Add a siginfo_t.
9038 (linux_wait_for_process): Always set last_status.
9039 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9040 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9041 * linux-low.h (struct process_info): Add last_status.
9043 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9045 * remote-utils.c (try_rle): New function.
9046 (putpkt_binary): Use it.
9048 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9050 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9051 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9052 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9053 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9054 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9057 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9059 * server.c (terminal_fd): New variable.
9060 (old_foreground_pgrp): Likewise.
9061 (restore_old_foreground_pgrp): New function.
9062 (start_inferior): Record the terminal file descriptor in terminal_fd
9063 and its original foreground group in old_foreground_pgrp. Register
9064 restore_old_foreground_pgrp with atexit().
9066 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9068 * server.c (handle_query): Correct qPart to qXfer.
9070 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9072 * configure.ac: Check for more headers which are missing on
9073 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9074 * configure.srv: Add Cygwin and mingw32.
9075 * remote-utils.c: Don't include headers unconditionally which
9076 are missing on mingw32. Include <winsock.h> for mingw32.
9077 (remote_open): Adjust for mingw32 support. Flush
9078 standard error after writing to it.
9079 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9080 (unblock_async_io, enable_async_io, disable_async_io)
9081 (readchar, getpkt): Update for Winsock support.
9082 (prepare_resume_reply): Expect a protocol signal number.
9083 * server.c: Disable <sys/wait.h> on mingw32.
9084 (start_inferior): Adjust for mingw32 support. Flush
9085 standard error after writing to it.
9086 (attach_inferior): Likewise. Use protocol signal
9088 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9090 * win32-i386-low.c: New file.
9091 * Makefile.in (XM_CLIBS): Set.
9092 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9093 (win32-i386-low.o): New dependency rule.
9094 * linux-low.c (linux_wait): Use target signal numbers.
9095 * target.h (struct target_ops): Doc fix.
9096 * server.h (target_signal_to_name): New prototype.
9097 * gdbreplay.c: Don't include headers unconditionally which
9098 are missing on mingw32. Include <winsock.h> for mingw32.
9099 (remote_close, remote_open): Adjust for Winsock support.
9100 * configure, config.in: Regenerated.
9102 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9104 * server.c (decode_xfer_read, write_qxfer_response): New.
9105 (handle_query): Take a packet length argument. Handle
9106 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9107 the qSupported response.
9108 (main): Update call to handle_query.
9110 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9112 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9113 (putpkt_binary): Renamed from putpkt and adjusted for binary
9115 (putpkt): New wrapper for putpkt_binary.
9116 (readchar): Don't mask off the high bit.
9117 (decode_X_packet): New function.
9118 * server.c (main): Call putpkt_binary if a handler sets the packet
9119 length. Save the length of the incoming packet. Handle 'X'.
9120 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9122 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9124 * server.c (handle_query): Handle qSupported.
9126 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9128 * remote-utils.c (all_symbols_looked_up): New variable.
9129 (look_up_one_symbol): Check it.
9130 * server.h (look_up_one_symbol): New declaration.
9131 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9133 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9135 * Makefile.in (linux-arm-low.o): Update dependencies.
9136 * linux-arm-low.c: Include "gdb_proc_service.h".
9137 (PTRACE_GET_THREAD_AREA): Define.
9138 (ps_get_thread_area): New function.
9140 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9142 * configure.srv (m68k*-*-uclinux*): New target.
9143 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9144 (linux_resume_one_process): Remove extraneous cast.
9145 (linux_read_offsets): New.
9146 (linux_target_op): Add linux_read_offsets on mmuless systems.
9147 * server.c (handle_query): Add qOffsets logic.
9148 * target.h (struct target_ops): Add read_offsets.
9150 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9152 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9153 (PTRACE_GET_THREAD_AREA): Define.
9154 (ps_get_thread_area): New function.
9155 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9156 (linux-x86-64-low.o): Update.
9158 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9160 * configure.ac: Remove checks for prfpregset_t.
9161 * gdb_proc_service.h: New file.
9162 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9163 new "gdb_proc_service.h".
9164 * proc-service.c: Likewise.
9165 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9166 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9167 * Makefile.in (gdb_proc_service_h): Updated.
9168 * configure, config.in: Regenerated.
9170 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9172 * remote-utils.c (prepare_resume_reply): Move declaration
9173 of gdb_id_from_wait to the top of the block.
9175 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9177 * linux-low.c (regsets_store_inferior_registers): Read the regset
9178 from the target before filling it.
9180 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9182 * server.c (attach_inferior): Return SIGTRAP for a successful
9185 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9187 * Makefile.in (OBS): Add version.o.
9188 (STAGESTUFF): Delete.
9189 (version.o): Add dependencies.
9190 (version.c): Replace rule.
9191 (clean): Remove version.c.
9192 * server.c (gdbserver_version): New.
9193 (gdbserver_usage): Use printf.
9194 (main): Handle --version and --help.
9195 * server.h (version, host_name): Add declarations.
9197 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9209 * linux-x86-64-low.c:
9212 * linux-ppc64-low.c:
9221 * linux-crisv32-low.c:
9233 * gdbserver.1: Add (C) after Copyright. Update the FSF
9236 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9238 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9239 (arm_breakpoint_at): Recognize both breakpoints.
9240 (the_low_target): Use the correct breakpoint instruction.
9242 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9244 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9245 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9246 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9247 (the_low_target): Update.
9249 2005-10-25 Andreas Schwab <schwab@suse.de>
9251 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9253 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9254 (ia64_num_regs): Reduce to 462.
9256 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9258 * acinclude.m4: Correct quoting.
9259 * aclocal.m4: Regenerated.
9261 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9262 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9263 (thread_db_init): Call thread_db_err_str.
9264 * configure.ac: Check for TD_VERSION.
9265 * config.in, configure: Regenerated.
9267 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9269 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9271 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9273 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9274 is not available. Define HAVE_PTRACE_GETREGS if it is.
9275 * config.in, configure: Regenerated.
9276 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9277 * linux-i386-low.c, linux-m68k-low.c: Update to use
9278 HAVE_PTRACE_GETREGS.
9279 * linux-low.c (regsets_fetch_inferior_registers)
9280 (regsets_store_inferior_registers): Only return 0 if we processed
9282 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9283 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9285 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9287 * inferiors.c (struct thread_info): Add gdb_id.
9288 (add_thread): Add gdb_id argument.
9289 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9290 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9291 calls to add_thread.
9292 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9293 * server.c (handle_query): Use thread_to_gdb_id.
9294 (handle_v_cont, main): Use gdb_id_to_thread_id.
9295 * server.h (add_thread): Update prototype.
9296 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9299 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9301 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9302 left-padded registers.
9303 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9304 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9306 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9308 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9309 * configure: Regenerate.
9310 * config.in: Regenerate.
9311 * server.h (NEED_DECLARATION_STRERROR):
9312 Replace with !HAVE_DECL_STRERROR.
9314 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9316 * linux-low.c (linux_wait, linux_send_signal): Don't test
9317 an unsigned long variable for > 0 if it could be MAX_ULONG.
9318 * server.c (myresume): Likewise.
9319 * target.c (set_desired_inferior): Likewise.
9321 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9323 * configure.ac: Simplify and improve check for socklen_t.
9324 * configure, config.in: Regenerate.
9326 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9328 * acconfig.h: Remove.
9329 * configure.ac: Add a test for socklen_t. Use three-argument
9330 AC_DEFINE throughout.
9331 * config.in: Regenerated using autoheader 2.59.
9332 * configure: Regenerated.
9334 * gdbreplay.c (socklen_t): Provide a default.
9335 (remote_open): Use socklen_t.
9336 * remote-utils.c (socklen_t): Provide a default.
9337 (remote_open): Use socklen_t.
9338 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9341 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9343 * linux-low.c (linux_read_memory, linux_write_memory)
9344 (linux_read_auxv): Likewise.
9345 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9346 (check_mem_write): Likewise.
9347 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9349 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9350 (registers_from_string, register_data): Likewise.
9351 * server.c (handle_query, main): Likewise.
9352 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9353 (decode_M_packet): Likewise.
9354 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9355 * target.h (struct target_ops): Update read_memory, write_memory,
9357 (read_inferior_memory, write_inferior_memory): Update.
9358 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9360 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9361 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9362 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9363 linux-s390-low.c, linux-sh-low.c: Update for changes in
9364 read_inferior_memory and the_low_target->breakpoint.
9366 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9368 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9369 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9370 * configure.srv: Add powerpc64-*-linux*.
9371 * linux-ppc64-low.c: New file.
9373 2005-05-23 Orjan Friberg <orjanf@axis.com>
9375 * linux-cris-low.c: New file with support for CRIS.
9376 * linux-crisv32-low.c: Ditto for CRISv32.
9377 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9378 (clean): Add reg-cris.c and reg-crisv32.c.
9379 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9380 reg-crisv32.o, and reg-crisv32.c to make rules.
9381 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9384 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9386 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9387 of sizeof (PTRACE_XFER_TYPE).
9388 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9390 2005-05-12 Orjan Friberg <orjanf@axis.com>
9392 * target.h (struct target_ops): Add insert_watchpoint,
9393 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9394 pointers for hardware watchpoint support.
9395 * linux-low.h (struct linux_target_ops): Ditto.
9396 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9397 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9398 to linux_target_ops.
9399 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9401 * server.c (main): Recognize 'Z' and 'z' packets.
9403 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9405 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9406 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9407 (the_low_target): Add new members.
9409 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9411 * proc-service.c (ps_lgetregs): Search all_processes instead of
9414 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9416 * server.c (start_inferior): Change return type to int.
9417 (attach_inferior): Change sigptr to int *.
9418 (handle_v_cont, handle_v_requests): Change signal to int *.
9419 (main): Change signal to int.
9421 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9423 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9424 * configure.srv: Add m32r*-*-linux*.
9425 * linux-m32r-low.c: New file.
9427 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9429 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9431 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9433 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9434 Take unsigned long arguments for PIDs.
9435 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9436 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9437 (wait_for_sigstop, linux_resume_one_process)
9438 (regsets_fetch_inferior_registers, linux_send_signal)
9439 (linux_read_auxv): Likewise. Update the types of variables holding
9440 PIDs. Update format string specifiers.
9441 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9442 * remote-utils.c (prepare_resume_reply): Likewise.
9443 * server.c (cont_thread, general_thread, step_thread)
9444 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9446 (handle_query): Update format specifiers.
9447 (handle_v_cont, main): Use strtoul for thread IDs.
9448 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9449 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9450 (general_thread, step_thread, thread_from_wait)
9451 (old_thread_from_wait): Update.
9452 * target.h (struct thread_resume): Use unsigned long for THREAD.
9453 (struct target_ops): Use unsigned long for arguments to attach and
9456 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9458 * acinclude.m4: Include bfd/bfd.m4 directly.
9459 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9460 <agriffis@toolchain.org>.
9461 * aclocal.m4, configure: Regenerated.
9463 2005-01-07 Andrew Cagney <cagney@gnu.org>
9465 * configure.ac: Rename configure.in, require autoconf 2.59.
9466 * configure: Re-generate.
9468 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9470 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9472 * aclocal.m4: Regenerated.
9473 * configure: Regenerated.
9475 2004-11-21 Andreas Schwab <schwab@suse.de>
9477 * linux-m68k-low.c (m68k_num_gregs): Define.
9478 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9479 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9480 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9481 (m68k_breakpoint_at): New. Add to the_low_target.
9483 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9484 srv_linux_thread_db to yes.
9486 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9488 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9489 (ARCH_SET_FS): Likewise.
9490 (ARCH_GET_FS): Likewise.
9491 (ARCH_GET_GS): Likewise.
9493 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9495 * linux-i386-low.c (ps_get_thread_area): New.
9496 * linux-x86-64-low.c (ps_get_thread_area): New.
9497 * linux-low.c: Include <sys/syscall.h>.
9498 (linux_kill_one_process): Don't kill the first thread here.
9499 (linux_kill): Kill the first thread here.
9500 (kill_lwp): New function.
9501 (send_sigstop, linux_send_signal): Use it.
9502 * proc-service.c: Clean up #ifdefs.
9503 (fpregset_info): Delete.
9504 (ps_lgetregs): Update and enable implementation.
9505 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9507 * remote-utils.c (struct sym_cache, symbol_cache): New.
9508 (input_interrupt): Print a clearer message.
9509 (async_io_enabled): New variable.
9510 (enable_async_io, disable_async_io): Use it. Update comments.
9511 (look_up_one_symbol): Use the symbol cache.
9512 * thread-db.c (thread_db_look_up_symbols): New function.
9513 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9515 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9517 * configure.in: Test for -rdynamic.
9518 * configure: Regenerated.
9519 * Makefile (INTERNAL_LDFLAGS): New.
9520 (gdbserver, gdbreplay): Use it.
9522 2004-09-02 Andrew Cagney <cagney@gnu.org>
9524 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9526 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9528 * linux-low.c (linux_wait): Clear all_processes list also.
9530 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9532 * linux-low.c: Include <errno.h>. Remove extern declaration of
9535 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9537 * gdbreplay.c, server.h, utils.c: Update copyright years.
9539 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9541 * server.c (main): Print child status or termination signal from
9542 variable 'signal', not 'sig'.
9544 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9546 * linux-low.c (linux_read_memory): Change return type to
9547 int. Check for and return error from ptrace().
9548 * target.c (read_inferior_memory): Change return type to int. Pass
9549 back return status from the_target->read_memory().
9550 * target.h (struct target_ops): Adapt *read_memory() prototype.
9552 (read_inferior_memory): Adapt prototype.
9553 * server.c (main): Return an error packet if
9554 read_inferior_memory() returns an error.
9556 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9558 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9559 Unify with other clean targets.
9561 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9563 * server.c (handle_v_cont): Call set_desired_inferior.
9565 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9567 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9569 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9571 * linux-low.c (linux_wait): Unblock async I/O.
9572 (linux_resume): Block and enable async I/O.
9573 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9574 * server.h (block_async_io, unblock_async_io): Add prototypes.
9576 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9578 * remote-utils.c (remote_open): Print a status notice after
9580 * server.c (attach_inferior): Print a status notice after
9583 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9585 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9587 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9589 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9591 * server.c, target.h: Update copyright years.
9593 2004-02-25 Roland McGrath <roland@redhat.com>
9595 * target.h (struct target_ops): New member `read_auxv'.
9596 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9597 * linux-low.c (linux_read_auxv): New function.
9598 (linux_target_ops): Initialize `read_auxv' member to that.
9600 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9602 Committed by Jim Blandy <jimb@redhat.com>.
9604 * linux-s390-low.c (s390_num_regs): Update.
9605 (s390_regmap): Remove control registers. Use __s390x__ predefine
9606 instead of GPR_SIZE to distiguish s390 and s390x targets.
9608 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9610 * linux-low.c: Update copyright year.
9611 (check_removed_breakpoint): Clear pending_is_breakpoint.
9612 (linux_set_resume_request, linux_queue_one_thread)
9613 (resume_status_pending_p): New functions.
9614 (linux_continue_one_thread): Use process->resume.
9615 (linux_resume): Only resume threads if there are no pending events.
9616 * linux-low.h (struct process_info): Add resume request
9619 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9621 * regcache.c (new_register_cache): Clear the allocated register
9622 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9624 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9626 * linux-low.c (linux_resume): Take a struct thread_resume *
9628 (linux_wait): Update call.
9629 (resume_ptr): New static variable.
9630 (linux_continue_one_thread): Renamed from
9631 linux_continue_one_process. Use resume_ptr.
9632 (linux_resume): Use linux_continue_one_thread.
9633 * server.c (handle_v_cont, handle_v_requests): New functions.
9634 (myresume): New function.
9635 (main): Handle 'v' case.
9636 * target.h (struct thread_resume): New type.
9637 (struct target_ops): Change argument of "resume" to struct
9639 (myresume): Delete macro.
9641 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9643 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9644 (uninstall): Support DESTDIR.
9646 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9648 * configure.srv: Add xscale*linux copy of arm*linux entry.
9650 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9652 * linux-arm-low.c (arm_reinsert_addr): New function.
9653 (the_low_target): Add arm_reinsert_addr.
9655 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9657 * mem-break.c: Remove whitespace at end of file.
9659 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9661 * configure.in: Check whether we need to prototype strerror.
9662 * server.h: Optionally prototype strerror.
9663 * gdbreplay.c (perror_with_name): Use strerror.
9664 * linux-low.c (linux_attach_lwp): Use strerror.
9665 * utils.c (perror_with_name): Use strerror.
9666 * config.in, configure: Regenerated.
9668 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9670 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9671 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9673 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9675 * Makefile.in (SFILES): Update.
9676 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9677 low-sun3.c: Remove files.
9679 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9681 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9682 (linux_detach_one_process, linux_detach): New functions.
9683 (linux_target_ops): Add linux_detach.
9684 * server.c (main): Handle 'D' packet.
9685 * target.h (struct target_ops): Add "detach" member.
9686 (detach_inferior): Define.
9688 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9690 From Kelley Cook <kelleycook@wideopenwest.com>:
9691 * configure.srv: Accept i[34567]86 variants.
9693 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9695 * linux-low.c (linux_wait_for_event): Correct comment typos.
9696 (linux_resume_one_process): Call check_removed_breakpoint.
9697 (linux_send_signal): New function.
9698 (linux_target_ops): Add linux_send_signal.
9699 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9701 * target.h (struct target_ops): Add send_signal.
9703 2003-05-29 Jim Blandy <jimb@redhat.com>
9705 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9706 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9707 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9708 away part of the register's value.
9710 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9712 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9713 (linux_wait_for_event, linux_init_signals): Likewise.
9715 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9717 * configure.in: Check for stdlib.h.
9718 * configure: Regenerated.
9719 * config.in: Regenerated.
9721 2003-01-04 Andreas Schwab <schwab@suse.de>
9723 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9725 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9727 * Makefile.in: Remove obsolete code.
9729 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9731 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9732 defined(PT_FPR0_HI).
9734 2002-11-17 Stuart Hughes <seh@zee2.com>
9736 * linux-arm-low.c (arm_num_regs): Increase.
9737 (arm_regmap): Include status register.
9739 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9741 * linux-low.c (register_addr): Remove incorrect -1 check.
9743 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9745 * linux-low.c (linux_create_inferior): Call setpgid. Return
9747 (unstopped_p, linux_signal_pid): Remove.
9748 (linux_target_ops): Remove linux_signal_pid.
9749 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9750 global instead of target method.
9751 * target.h (struct target_ops): Remove signal_pid. Update comment
9752 for create_inferior.
9753 * server.c (signal_pid): New variable.
9754 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9755 gdbserver. Set the child to be the foreground process group.
9756 (attach_inferior): Set signal_pid.
9758 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9760 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9762 2002-08-20 Jim Blandy <jimb@redhat.com>
9764 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9767 2002-08-01 Andrew Cagney <cagney@redhat.com>
9769 * Makefile.in: Make chill references obsolete.
9771 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9773 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9774 * configure: Regenerate.
9775 * config.in: Regenerate.
9777 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9779 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9780 (perror_with_name, remote_close, remote_open, expect, play): Static.
9782 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9784 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9785 byte offsets instead of an array of indexes.
9786 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9788 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9790 * regcache.c: Add comment.
9792 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9794 * thread-db.c: New file.
9795 * proc-service.c: New file.
9796 * acinclude.m4: New file.
9797 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9798 proc-service.o, and thread-db.o.
9799 (linux-low.o): Add USE_THREAD_DB.
9800 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9801 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9802 * aclocal.m4: Regenerated.
9803 * config.in: Regenerated.
9804 * configure: Regenerated.
9805 * configure.in: Check for proc_service.h, sys/procfs.h,
9806 thread_db.h, and linux/elf.h headrs.
9807 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9808 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9809 Check for -lthread_db and thread support.
9810 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9811 PowerPC, and SuperH.
9812 * i387-fp.c: Constify arguments.
9813 * i387-fp.h: Likewise.
9814 * inferiors.c: (struct thread_info): Renamed from
9815 `struct inferior_info'. Remove PID member. Use generic inferior
9816 list header. All uses updated.
9817 (inferiors, signal_pid): Removed.
9818 (all_threads): New variable.
9819 (get_thread): Define.
9820 (add_inferior_to_list): New function.
9821 (for_each_inferior): New function.
9822 (change_inferior_id): New function.
9823 (add_inferior): Removed.
9824 (remove_inferior): New function.
9825 (add_thread): New function.
9826 (free_one_thread): New function.
9827 (remove_thread): New function.
9828 (clear_inferiors): Use for_each_inferior and free_one_thread.
9829 (find_inferior): New function.
9830 (find_inferior_id): New function.
9831 (inferior_target_data): Update argument type.
9832 (set_inferior_target_data): Likewise.
9833 (inferior_regcache_data): Likewise.
9834 (set_inferior_regcache_data): Likewise.
9835 * linux-low.c (linux_bp_reinsert): Remove.
9836 (all_processes, stopping_threads, using_thrads)
9837 (struct pending_signals, debug_threads, pid_of): New.
9838 (inferior_pid): Replace with macro.
9839 (struct inferior_linux_data): Remove.
9840 (get_stop_pc, add_process): New functions.
9841 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9842 Use add_process and add_thread.
9843 (linux_attach_lwp): New function, based on old linux_attach. Use
9844 add_process and add_thread. Set stop_expected for new threads.
9845 (linux_attach): New function.
9846 (linux_kill_one_process): New function.
9847 (linux_kill): Kill all LWPs.
9848 (linux_thread_alive): Use find_inferior_id.
9849 (check_removed_breakpoints, status_pending_p): New functions.
9850 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9851 Update. Use WNOHANG. Wait for cloned processes also. Update process
9852 struct for the found process.
9853 (linux_wait_for_event): New function.
9854 (linux_wait): Use it. Support LWPs.
9855 (send_sigstop, wait_for_sigstop, stop_all_processes)
9856 (linux_resume_one_process, linux_continue_one_process): New functions.
9857 (linux_resume): Support LWPs.
9858 (REGISTER_RAW_SIZE): Remove.
9859 (fetch_register): Use register_size instead. Call supply_register.
9860 (usr_store_inferior_registers): Likewise. Call collect_register.
9862 (regsets_fetch_inferior_registers): Improve error message.
9863 (regsets_store_inferior_registers): Add debugging.
9864 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9865 (unstopped_p, linux_signal_pid): New functions.
9866 (linux_target_ops): Add linux_signal_pid.
9867 (linux_init_signals): New function.
9868 (initialize_low): Call it. Initialize using_threads.
9869 * regcache.c (inferior_regcache_data): Add valid
9871 (get_regcache): Fetch registers lazily. Add fetch argument
9872 and update all callers.
9873 (regcache_invalidate_one, regcache_invalidate): New
9875 (new_register_cache): Renamed from create_register_cache.
9876 Return the new regcache.
9877 (free_register_cache): Change argument to a void *.
9878 (registers_to_string, registers_from_string): Call get_regcache
9879 with fetch flag set.
9880 (register_data): Make static. Pass fetch flag to get_regcache.
9881 (supply_register): Call get_regcache with fetch flag clear.
9882 (collect_register): Call get_regcache with fetch flag set.
9883 (collect_register_as_string): New function.
9884 * regcache.h: Update.
9885 * remote-utils.c (putpkt): Flush after debug output and use
9887 Handle input interrupts while waiting for an ACK.
9888 (input_interrupt): Use signal_pid method.
9889 (getpkt): Flush after debug output and use stderr.
9890 (outreg): Use collect_register_as_string.
9891 (new_thread_notify, dead_thread_notify): New functions.
9892 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9894 (look_up_one_symbol): Flush after debug output.
9895 * server.c (step_thread, server_waiting): New variables.
9896 (start_inferior): Don't use signal_pid. Update call to mywait.
9897 (attach_inferior): Update call to mywait.
9898 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9899 (main): Don't fetch/store registers explicitly. Use
9900 set_desired_inferior. Support proposed ``Hs'' packet. Update
9903 (struct inferior_list, struct_inferior_list_entry): New.
9904 * target.c (set_desired_inferior): New.
9905 (write_inferior_memory): Constify.
9906 (mywait): New function.
9908 (struct target_ops): New signal_pid method.
9909 (mywait): Removed macro, added prototype.
9911 * linux-low.h (regset_func): Removed.
9912 (regset_fill_func, regset_store_func): New.
9913 (enum regset_type): New.
9914 (struct regset_info): Add type field. Use new operation types.
9915 (struct linux_target_ops): stop_pc renamed to get_pc.
9916 Add decr_pc_after_break and breakpoint_at.
9917 (get_process, get_thread_proess, get_process_thread)
9918 (strut process_info, all_processes, linux_attach_lwp)
9919 (thread_db_init): New.
9921 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9922 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9923 (the_low_target): Add new members.
9924 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9925 (i386_store_fpxregset): Constify.
9926 (target_regsets): Add new kind identifier.
9927 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9928 (i386_set_pc): Add debugging.
9929 (i386_breakpoint_at): New function.
9930 (the_low_target): Add new members.
9931 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9932 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9933 (mips_breakpoint_at): New.
9934 (the_low_target): Add new members.
9935 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9936 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9937 (the_low_target): Add new members.
9938 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9939 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9940 (the_low_target): Add new members.
9941 * linux-x86-64-low.c (target_regsets): Add new kind
9944 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9946 From Martin Pool <mbp@samba.org>:
9947 * server.c (gdbserver_usage): New function.
9950 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
9952 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9955 2002-05-04 Andrew Cagney <ac131313@redhat.com>
9957 * Makefile.in: Remove obsolete code.
9959 2002-04-24 Michal Ludvig <mludvig@suse.cz>
9961 * linux-low.c (regsets_fetch_inferior_registers),
9962 (regsets_store_inferior_registers): Removed cast to int from
9964 * regcache.h: Added declaration of struct inferior_info.
9966 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9968 * inferiors.c (struct inferior_info): Add regcache_data.
9969 (add_inferior): Call create_register_cache.
9970 (clear_inferiors): Call free_register_cache.
9971 (inferior_regcache_data, set_inferior_regcache_data): New functions.
9972 * regcache.c (struct inferior_regcache_data): New.
9973 (registers): Remove.
9974 (get_regcache): New function.
9975 (create_register_cache, free_register_cache): New functions.
9976 (set_register_cache): Don't initialize the register cache here.
9977 (registers_to_string, registers_from_string, register_data): Call
9979 * regcache.h: Add prototypes.
9980 * server.h: Likewise.
9982 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
9984 * mem-break.c: New file.
9985 * mem-break.h: New file.
9986 * Makefile.in: Add mem-break.o rule; update server.h
9988 * inferiors.c (struct inferior_info): Add target_data
9990 (clear_inferiors): Free target_data member if set.
9991 (inferior_target_data, set_inferior_target_data): New functions.
9992 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
9993 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
9994 * linux-low.c (linux_bp_reinsert): New variable.
9995 (struct inferior_linux_data): New.
9996 (linux_create_inferior): Use set_inferior_target_data.
9997 (linux_attach): Likewise. Call add_inferior.
9998 (linux_wait_for_one_inferior): New function.
9999 (linux_wait): Call it.
10000 (linux_write_memory): Add const.
10001 (initialize_low): Call set_breakpoint_data.
10002 * linux-low.h (struct linux_target_ops): Add breakpoint
10004 * server.c (attach_inferior): Remove extra add_inferior
10006 * server.h: Include mem-break.h. Update inferior.c
10008 * target.c (read_inferior_memory)
10009 (write_inferior_memory): New functions.
10010 * target.h (read_inferior_memory)
10011 (write_inferior_memory): Change macros to prototypes.
10012 (struct target_ops): Update comments. Add const to write_memory
10015 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10017 * linux-low.c (usr_store_inferior_registers): Support
10018 registers which are allowed to fail to store.
10019 * linux-low.h (linux_target_ops): Likewise.
10020 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10021 (ppc_cannot_store_register): FPSCR may not be storable.
10023 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10025 * server.h: Include <string.h> if HAVE_STRING_H.
10026 * ChangeLog: Correct paths in last ChangeLog entry.
10028 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10030 * linux-low.h: Remove obsolete prototypes.
10031 (struct linux_target_ops): New.
10032 (extern the_low_target): New.
10033 * linux-low.c (num_regs, regmap): Remove declarations.
10034 (register_addr): Use the_low_target explicitly.
10035 (fetch_register): Likewise.
10036 (usr_fetch_inferior_registers): Likewise.
10037 (usr_store_inferior_registers): Likewise.
10038 * linux-arm-low.c (num_regs): Remove.
10039 (arm_num_regs): Define.
10040 (arm_regmap): Renamed from regmap, made static.
10041 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10043 (arm_cannot_store_register): Renamed from cannot_store_register,
10045 (the_low_target): New.
10046 * linux-i386-low.c (num_regs): Remove.
10047 (i386_num_regs): Define.
10048 (i386_regmap): Renamed from regmap, made static.
10049 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10051 (i386_cannot_store_register): Renamed from cannot_store_register,
10053 (the_low_target): New.
10054 * linux-ia64-low.c (num_regs): Remove.
10055 (ia64_num_regs): Define.
10056 (ia64_regmap): Renamed from regmap, made static.
10057 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10059 (ia64_cannot_store_register): Renamed from cannot_store_register,
10061 (the_low_target): New.
10062 * linux-m68k-low.c (num_regs): Remove.
10063 (m68k_num_regs): Define.
10064 (m68k_regmap): Renamed from regmap, made static.
10065 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10067 (m68k_cannot_store_register): Renamed from cannot_store_register,
10069 (the_low_target): New.
10070 * linux-mips-low.c (num_regs): Remove.
10071 (mips_num_regs): Define.
10072 (mips_regmap): Renamed from regmap, made static.
10073 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10075 (mips_cannot_store_register): Renamed from cannot_store_register,
10077 (the_low_target): New.
10078 * linux-ppc-low.c (num_regs): Remove.
10079 (ppc_num_regs): Define.
10080 (ppc_regmap): Renamed from regmap, made static.
10081 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10083 (ppc_cannot_store_register): Renamed from cannot_store_register,
10085 (the_low_target): New.
10086 * linux-s390-low.c (num_regs): Remove.
10087 (s390_num_regs): Define.
10088 (s390_regmap): Renamed from regmap, made static.
10089 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10091 (s390_cannot_store_register): Renamed from cannot_store_register,
10093 (the_low_target): New.
10094 * linux-sh-low.c (num_regs): Remove.
10095 (sh_num_regs): Define.
10096 (sh_regmap): Renamed from regmap, made static.
10097 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10099 (sh_cannot_store_register): Renamed from cannot_store_register,
10101 (the_low_target): New.
10102 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10103 (the_low_target): New.
10105 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10107 * Makefile.in: Add stamp-h target.
10108 * configure.in: Create stamp-h.
10109 * configure: Regenerated.
10111 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10113 * inferiors.c: New file.
10114 * target.c: New file.
10115 * target.h: New file.
10116 * Makefile.in: Add target.o and inferiors.o. Update
10118 * linux-low.c (inferior_pid): New static variable,
10119 moved from server.c.
10120 (linux_create_inferior): Renamed from create_inferior.
10121 Call add_inferior. Return 0 on success instead of a PID.
10122 (linux_attach): Renamed from myattach.
10123 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10124 (linux_thread_alive): Renamed from mythread_alive.
10125 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10127 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10128 (regsets_store_inferior_registers): Correct error message.
10129 Add missing ``return 0''.
10130 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10131 (linux_store_registers): Renamed from store_inferior_registers.
10132 (linux_read_memory): Renamed from read_inferior_memory.
10133 (linux_write_memory): Renamed from write_inferior_memory.
10134 (linux_target_ops): New structure.
10135 (initialize_low): Call set_target_ops ().
10136 * remote-utils.c (unhexify): New function.
10137 (hexify): New function.
10138 (input_interrupt): Send signals to ``signal_pid''.
10139 * server.c (inferior_pid): Remove.
10140 (start_inferior): Update create_inferior call.
10141 (attach_inferior): Call add_inferior.
10142 (handle_query): New function.
10143 (main): Call handle_query for `q' packets.
10144 * server.h: Include "target.h". Remove obsolete prototypes.
10145 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10147 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10149 * Makefile.in: Add WARN_CFLAGS. Update configury
10151 * configure.in: Check for <string.h>
10152 * configure: Regenerate.
10153 * config.in: Regenerate.
10154 * gdbreplay.c: Include needed system headers.
10155 (remote_open): Remove strchr prototype.
10156 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10157 * regcache.c (supply_register): Change buf argument to const void *.
10158 (supply_register_by_name): Likewise.
10159 (collect_register): Change buf argument to void *.
10160 (collect_register_by_name): Likewise.
10161 * regcache.h: Add missing prototypes.
10162 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10163 * server.c (handle_query): New function.
10164 (attached): New static variable, moved out of main.
10165 (main): Quiet longjmp clobber warnings.
10166 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10167 * utils.c (error): Remove NORETURN.