1 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4 endianness into account.
5 (ppc_supply_ptrace_register): Likewise.
7 2014-09-03 James Hogan <james.hogan@imgtec.com>
9 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
10 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12 2014-09-03 Gary Benson <gbenson@redhat.com>
14 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
15 ALL_DEBUG_ADDRESS_REGISTERS.
17 2014-09-02 Gary Benson <gbenson@redhat.com>
19 * i386-low.h: Renamed as...
20 * x86-low.h: New file. All type, function and variable name
21 prefixes changed from "i386_" to "x86_". All references updated.
22 * i386-low.c: Renamed as...
23 * x86-low.c: New file. All type, function and variable name
24 prefixes changed from "i386_" to "x86_". All references updated.
26 2014-09-02 Gary Benson <gbenson@redhat.com>
28 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
29 (x86_linux_new_thread): Likewise.
31 2014-08-29 Gary Benson <gbenson@redhat.com>
33 * server.h (setjmp.h): Do not include.
34 (toplevel): Do not declare.
35 (common-exceptions.h): Include.
36 (cleanups.h): Likewise.
37 * server.c (toplevel): Do not define.
38 (exit_code): New static global.
39 (detach_or_kill_for_exit_cleanup): New function.
40 (main): New function. Original main renamed to...
41 (captured_main): New function.
42 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
44 2014-08-29 Gary Benson <gbenson@redhat.com>
46 * Makefile.in (SFILES): Add common/common-exceptions.c.
47 (OBS): Add common-exceptions.o.
48 (common-exceptions.o): New rule.
49 * utils.c (prepare_to_throw_exception): New function.
51 2014-08-29 Gary Benson <gbenson@redhat.com>
53 * config.in: Regenerate.
54 * configure: Likewise.
56 2014-08-29 Gary Benson <gbenson@redhat.com>
58 * Makefile.in (SFILES): Add common/cleanups.c.
60 (cleanups.o): New rule.
62 2014-08-29 Gary Benson <gbenson@redhat.com>
64 * utils.c (internal_vwarning): New function.
66 2014-08-28 Gary Benson <gbenson@redhat.com>
68 * utils.h (fatal): Remove declaration.
69 * utils.c (fatal): Remove function.
71 2014-08-28 Gary Benson <gbenson@redhat.com>
73 * tracepoint.c (gdb_agent_init): Replace fatal with
75 (initialize_tracepoint): Likewise.
77 2014-08-28 Gary Benson <gbenson@redhat.com>
79 * remote-utils.c (remote_prepare): Replace fatal with error.
81 2014-08-28 Gary Benson <gbenson@redhat.com>
83 * linux-low.c (linux_async): Replace fatal with warning.
85 (linux_start_non_stop): Return -1 if linux_async failed.
87 2014-08-28 Gary Benson <gbenson@redhat.com>
89 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
91 (i386_dr_low_get_addr): Remove vague comment.
92 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
95 2014-08-28 Gary Benson <gbenson@redhat.com>
97 * inferiors.c (get_thread_process): Replace check with gdb_assert.
98 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
100 (linux_resume_one_lwp): Likewise.
101 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
103 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
105 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
106 (init_register_cache): Replace fatal with gdb_assert_not_reached.
107 (find_register_by_name): Replace fatal with internal_error.
108 (find_regno): Likewise.
109 * tdesc.c (init_target_desc): Replace check with gdb_assert.
110 * thread-db.c (thread_db_create_event): Likewise.
111 (thread_db_load_search): Likewise.
112 (try_thread_db_load_1): Likewise.
113 * tracepoint.c (get_jump_space_head): Replace fatal with
115 (claim_trampoline_space): Likewise.
116 (have_fast_tracepoint_trampoline_buffer): Likewise.
117 (cmd_qtstart): Likewise.
118 (stop_tracing): Likewise.
119 (fast_tracepoint_collecting): Likewise.
120 (target_malloc): Likewise.
121 (download_tracepoint): Likewise.
122 (download_trace_state_variables): Replace check with gdb_assert.
123 (upload_fast_traceframes): Replace fatal with internal_error.
125 2014-08-19 Tom Tromey <tromey@redhat.com>
126 Gary Benson <gbenson@redhat.com>
128 * Makefile.in (SFILES): Add common/common-debug.c.
129 (OBS): Add common-debug.o.
130 (common-debug.o): New rule.
131 * debug.h (debug_printf): Don't declare.
132 * debug.c (debug_printf): Renamed and rewritten as...
133 (debug_vprintf): New function.
135 2014-08-19 Gary Benson <gbenson@redhat.com>
137 * utils.h: Do not include print-utils.h.
139 2014-08-19 Tom Tromey <tromey@redhat.com>
140 Gary Benson <gbenson@redhat.com>
142 * server.h: Add static assertion.
143 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
145 2014-08-19 Tom Tromey <tromey@redhat.com>
146 Gary Benson <gbenson@redhat.com>
148 * Makefile.in (SFILES): Add common/errors.c.
150 (IPA_OBS): Add errors-ipa.o.
151 (errors.o): New rule.
152 (errors-ipa.o): Likewise.
153 * utils.h (perror_with_name, error, warning): Don't declare.
154 * utils.c (warning): Renamed and rewritten as...
155 (vwarning): New function.
156 (error): Renamed and rewritten as...
157 (verror): New function.
158 (internal_error): Renamed and rewritten as...
159 (internal_verror): New function.
161 2014-08-07 Gary Benson <gbenson@redhat.com>
163 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
164 * configure: Regenerate.
165 * config.in: Likewise.
166 * server.h: Do not include errno.h.
167 * event-loop.c: Likewise.
168 * hostio-errno.c: Likewise.
169 * linux-low.c: Likewise.
170 * remote-utils.c: Likewise.
171 * spu-low.c: Likewise.
173 * gdbreplay.c: Unconditionally include errno.h.
175 2014-08-07 Gary Benson <gbenson@redhat.com>
177 * server.h: Do not include string.h.
178 * event-loop.c: Likewise.
179 * linux-low.c: Likewise.
180 * regcache.c: Likewise.
181 * remote-utils.c: Likewise.
182 * spu-low.c: Likewise.
185 2014-08-07 Gary Benson <gbenson@redhat.com>
187 * server.h: Do not include gdb_assert.h.
189 2014-08-07 Gary Benson <gbenson@redhat.com>
191 * server.h: Do not include common-utils.h.
193 2014-08-07 Gary Benson <gbenson@redhat.com>
195 * server.h: Do not include ptid.h.
198 2014-08-07 Gary Benson <gbenson@redhat.com>
200 * server.h: Do not include gdb_locale.h.
202 2014-08-07 Gary Benson <gbenson@redhat.com>
204 * server.h: Do not include gdb/signals.h.
205 * win32-low.c: Likewise.
207 2014-08-07 Gary Benson <gbenson@redhat.com>
209 * server.h: Do not include pathmax.h.
211 2014-08-07 Gary Benson <gbenson@redhat.com>
213 * server.h: Do not include libiberty.h.
214 * linux-bfin-low.c: Likewise.
216 2014-08-07 Gary Benson <gbenson@redhat.com>
218 * server.h: Do not include ansidecl.h.
220 2014-08-07 Gary Benson <gbenson@redhat.com>
222 * linux-x86-low.c: Do not include stddef.h.
223 * lynx-ppc-low.c: Likewise.
224 * tracepoint.c: Likewise.
226 2014-08-07 Gary Benson <gbenson@redhat.com>
228 * server.h: Do not include stdarg.h.
229 * nto-low.c: Likewise.
231 2014-08-07 Gary Benson <gbenson@redhat.com>
233 * server.h: Do not include stdlib.h.
234 * inferiors.c: Likewise.
235 * linux-low.c: Likewise.
236 * regcache.c: Likewise.
237 * spu-low.c: Likewise.
238 * tracepoint.c: Likewise.
241 2014-08-07 Gary Benson <gbenson@redhat.com>
243 * server.h: Do not include stdio.h.
244 * linux-low.c: Likewise.
245 * remote-utils.c: Likewise.
246 * spu-low.c: Likewise.
248 * wincecompat.c: Likewise.
250 2014-08-06 Gary Benson <gbenson@redhat.com>
252 * regcache.c (init_register_cache): Move conditionals inside if.
254 2014-08-06 Gary Benson <gbenson@redhat.com>
256 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
258 2014-07-31 Gary Benson <gbenson@redhat.com>
260 * ax.h: Do not include server.h.
261 * gdbthread.h: Likewise.
262 * lynx-low.h: Likewise.
265 2014-07-30 Gary Benson <gbenson@redhat.com>
267 * server.h: Include common-defs.h.
268 Do not include config.h or build-gnulib-gdbserver/config.h.
270 2014-07-30 Gary Benson <gbenson@redhat.com>
272 * hostio-errno.c: Move server.h to top of includes list.
273 * inferiors.c: Likewise.
274 * linux-x86-low.c: Likewise.
275 * notif.c: Include server.h.
277 2014-07-24 Tom Tromey <tromey@redhat.com>
278 Gary Benson <gbenson@redhat.com>
280 * server.h (CORE_ADDR): Now unsigned.
282 2014-07-16 Pedro Alves <palves@redhat.com>
284 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
286 2014-07-15 Pedro Alves <palves@redhat.com>
288 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
291 2014-07-11 Pedro Alves <palves@redhat.com>
293 * linux-low.c (kill_wait_lwp): New function, based on
294 kill_one_lwp_callback, but use my_waitpid directly.
295 (kill_one_lwp_callback, linux_kill): Use it.
297 2014-06-23 Pedro Alves <palves@redhat.com>
299 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
300 before setting DR0..DR3.
302 2014-06-20 Gary Benson <gbenson@redhat.com>
304 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
305 * configure: Regenerated.
306 * config.in: Likewise.
308 2014-06-20 Gary Benson <gbenson@redhat.com>
310 * Makefile.in (SFILES): Update locations for files moved
312 (object file files): Reordered.
314 2014-06-20 Gary Benson <gbenson@redhat.com>
316 * i386-low.h (i386_dr_low_can_set_addr): Removed.
317 (i386_dr_low_set_addr): Likewise.
318 (i386_dr_low_get_addr): Likewise.
319 (i386_dr_low_can_set_control): Likewise.
320 (i386_dr_low_set_control): Likewise.
321 (i386_dr_low_get_control): Likewise.
322 (i386_dr_low_get_status): Likewise.
323 (i386_get_debug_register_length): Likewise.
324 * linux-x86-low.c (i386_dr_low_set_addr):
325 Changed signature. Made static.
326 (i386_dr_low_get_addr): Likewise.
327 (i386_dr_low_set_control): Likewise.
328 (i386_dr_low_get_control): Likewise.
329 (i386_dr_low_get_status): Likewise.
330 (i386_dr_low): New global variable.
331 * win32-i386-low.c (i386_dr_low_set_addr):
332 Changed signature. Made static.
333 (i386_dr_low_get_addr): Likewise.
334 (i386_dr_low_set_control): Likewise.
335 (i386_dr_low_get_control): Likewise.
336 (i386_dr_low_get_status): Likewise.
337 (i386_dr_low): New global variable.
339 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
341 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
342 * Makefile.in (AR, AR_FLAGS): Define.
343 * configure: Regenerate.
345 2014-06-19 Gary Benson <gbenson@redhat.com>
347 * Makefile.in (i386-dregs.o): New rule.
348 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
349 * i386-low.c (target.h): Remove include.
350 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
351 (DR_CONTROL_SHIFT): Likewise.
352 (DR_CONTROL_SIZE): Likewise.
353 (DR_RW_EXECUTE): Likewise.
354 (DR_RW_WRITE): Likewise.
355 (DR_RW_READ): Likewise.
356 (DR_RW_IORW): Likewise.
357 (DR_LEN_1): Likewise.
358 (DR_LEN_2): Likewise.
359 (DR_LEN_4): Likewise.
360 (DR_LEN_8): Likewise.
361 (DR_LOCAL_ENABLE_SHIFT): Likewise.
362 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
363 (DR_ENABLE_SIZE): Likewise.
364 (DR_LOCAL_SLOWDOWN): Likewise.
365 (DR_GLOBAL_SLOWDOWN): Likewise.
366 (DR_CONTROL_RESERVED): Likewise.
367 (I386_DR_CONTROL_MASK): Likewise.
368 (I386_DR_VACANT): Likewise.
369 (I386_DR_LOCAL_ENABLE): Likewise.
370 (I386_DR_GLOBAL_ENABLE): Likewise.
371 (I386_DR_DISABLE): Likewise.
372 (I386_DR_SET_RW_LEN): Likewise.
373 (I386_DR_GET_RW_LEN): Likewise.
374 (I386_DR_WATCH_HIT): Likewise.
375 (i386_wp_op_t): Likewise.
376 (i386_show_dr): Likewise.
377 (i386_length_and_rw_bits): Likewise.
378 (i386_insert_aligned_watchpoint): Likewise.
379 (i386_remove_aligned_watchpoint): Likewise.
380 (i386_handle_nonaligned_watchpoint): Likewise.
381 i386_update_inferior_debug_regs(): Likewise.
382 (i386_dr_insert_watchpoint): Likewise.
383 (i386_dr_remove_watchpoint): Likewise.
384 (i386_dr_region_ok_for_watchpoint): Likewise.
385 (i386_dr_stopped_data_address): Likewise.
386 (i386_dr_stopped_by_watchpoint): Likewise.
388 2014-06-19 Gary Benson <gbenson@redhat.com>
390 * i386-low.c (i386_dr_show): Renamed to
391 i386_show_dr and made static. All uses updated.
392 (i386_dr_length_and_rw_bits): Renamed to
393 i386_length_and_rw_bits and made static.
395 (i386_dr_insert_aligned_watchpoint): Renamed to
396 i386_insert_aligned_watchpoint and made static.
398 (i386_dr_remove_aligned_watchpoint): Renamed to
399 i386_remove_aligned_watchpoint and made static.
401 (i386_dr_update_inferior_debug_regs): Renamed to
402 i386_update_inferior_debug_regs and made static.
405 2014-06-18 Gary Benson <gbenson@redhat.com>
407 * i386-low.h (i386_dr_low_can_set_addr): New macro.
408 (i386_dr_low_can_set_control): Likewise.
409 (i386_get_debug_register_length): Likewise.
410 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
411 (i386_dr_low_can_set_control): Likewise.
412 (i386_get_debug_register_length): Likewise.
414 2014-06-17 Gary Benson <gbenson@redhat.com>
416 * i386-low.h (i386-dregs.h): New include.
417 (DR_FIRSTADDR): Now in i386-dregs.h.
418 (DR_LASTADDR): Likewise.
419 (DR_NADDR): Likewise.
420 (DR_STATUS): Likewise.
421 (DR_CONTROL): Likewise.
422 (i386_debug_reg_state): Likewise.
423 (i386_dr_insert_watchpoint): Likewise.
424 (i386_dr_remove_watchpoint): Likewise.
425 (i386_dr_region_ok_for_watchpoint): Likewise.
426 (i386_dr_stopped_data_address): Likewise.
427 (i386_dr_stopped_by_watchpoint): Likewise.
428 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
430 2014-06-18 Gary Benson <gbenson@redhat.com>
432 * i386-low.h (i386_low_insert_watchpoint): Renamed to
433 i386_dr_insert_watchpoint.
434 (i386_low_remove_watchpoint): Renamed to
435 i386_dr_remove_watchpoint.
436 (i386_low_region_ok_for_watchpoint): Renamed to
437 i386_dr_region_ok_for_watchpoint.
438 (i386_low_stopped_data_address): Renamed to
439 i386_dr_stopped_data_address.
440 (i386_low_stopped_by_watchpoint): Renamed to
441 i386_dr_stopped_by_watchpoint.
442 * i386-low.c (i386_show_dr): Renamed to
443 i386_dr_show and made nonstatic. All uses updated.
444 (i386_length_and_rw_bits): Renamed to
445 i386_dr_length_and_rw_bits and made nonstatic.
447 (i386_insert_aligned_watchpoint): Renamed to
448 i386_dr_insert_aligned_watchpoint and made nonstatic.
450 (i386_remove_aligned_watchpoint): Renamed to
451 i386_dr_remove_aligned_watchpoint and made nonstatic.
453 (i386_update_inferior_debug_regs): Renamed to
454 i386_dr_update_inferior_debug_regs and made nonstatic.
456 (i386_low_insert_watchpoint): Renamed to
457 i386_dr_insert_watchpoint. All uses updated.
458 (i386_low_remove_watchpoint): Renamed to
459 i386_dr_remove_watchpoint. All uses updated.
460 (i386_low_region_ok_for_watchpoint): Renamed to
461 i386_dr_region_ok_for_watchpoint. All uses updated.
462 (i386_low_stopped_data_address): Renamed to
463 i386_dr_stopped_data_address. All uses updated.
464 (i386_low_stopped_by_watchpoint): Renamed to
465 i386_dr_stopped_by_watchpoint. All uses updated.
467 2014-06-18 Gary Benson <gbenson@redhat.com>
469 * i386-low.c (i386_dr_low_can_set_addr): New macro.
470 (i386_dr_low_can_set_control): Likewise.
471 (i386_insert_aligned_watchpoint): New check.
473 2014-06-18 Gary Benson <gbenson@redhat.com>
475 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
478 2014-06-18 Gary Benson <gbenson@redhat.com>
480 * i386-low.c (i386_length_and_rw_bits): Use internal_error
481 instead of fatal and error.
482 (i386_handle_nonaligned_watchpoint): Likewise.
484 2014-06-18 Gary Benson <gbenson@redhat.com>
486 * i386-low.c (i386_get_debug_register_length): New macro.
487 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
488 (i386_show_dr): Use debug_printf instead of fprintf. Use
489 phex to format values.
491 2014-06-18 Gary Benson <gbenson@redhat.com>
493 * i386-low.h: Comment changes.
494 * i386-low.c: Likewise.
496 2014-06-18 Gary Benson <gbenson@redhat.com>
498 * i386-low.c: Whitespace changes.
500 2014-06-12 Tom Tromey <tromey@redhat.com>
502 * utils.c (freeargv): Remove.
504 2014-06-12 Tom Tromey <tromey@redhat.com>
506 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
507 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
508 (parse_debug_format_options): Likewise.
509 (gdbserver_usage): Likewise.
510 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
511 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
512 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
514 ($(LIBGNU)): Depend on libiberty.
515 (all-lib): Recurse into all subdirs.
516 (install-only): Invoke "install" target in subdirs.
517 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
519 * configure: Rebuild.
520 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
521 for vasprintf, vsnprintf, or gettimeofday.
522 * configure.srv: Don't add safe-ctype.o or lbasename.o to
525 2014-06-05 Joel Brobecker <brobecker@adacore.com>
527 * development.sh: Delete.
528 * Makefile.in (config.status): Adjust dependency on development.sh.
529 * configure.ac: Adjust development.sh source call.
530 * configure: Regenerate.
532 2014-06-02 Pedro Alves <palves@redhat.com>
534 * ax.c (gdb_free_agent_expr): New function.
535 * ax.h (gdb_free_agent_expr): New declaration.
536 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
538 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
540 (clear_breakpoint_conditions_and_commands): New function.
541 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
542 (clear_breakpoint_conditions_and_commands): New declaration.
544 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
546 * linux-aarch64-low.c (asm/ptrace.h): Include.
548 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
550 Fix TLS access for -static -pthread.
551 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
552 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
553 (thread_db_load_search, try_thread_db_load_1): Initialize it.
555 2014-05-20 Pedro Alves <palves@redhat.com>
557 * linux-aarch64-low.c (aarch64_insert_point)
558 (aarch64_remove_point): No longer check whether the type is
559 supported here. Adjust to new interface.
560 (the_low_target): Install aarch64_supports_z_point_type as
561 supports_z_point_type method.
562 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
563 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
564 instead of a Z packet char. Adjust.
565 (arm_supports_z_point_type): New function.
566 (arm_insert_point, arm_remove_point): Adjust to new interface.
567 (the_low_target): Install arm_supports_z_point_type.
568 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
569 (cris_insert_point, cris_remove_point): Adjust to new interface.
570 Don't check whether the type is supported here.
571 (the_low_target): Install cris_supports_z_point_type.
572 * linux-low.c (linux_supports_z_point_type): New function.
573 (linux_insert_point, linux_remove_point): Adjust to new interface.
574 * linux-low.h (struct linux_target_ops) <insert_point,
575 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
576 raw_breakpoint pointer parameter.
577 <supports_z_point_type>: New method.
578 * linux-mips-low.c (mips_supports_z_point_type): New function.
579 (mips_insert_point, mips_remove_point): Adjust to new interface.
580 Use mips_supports_z_point_type.
581 (the_low_target): Install mips_supports_z_point_type.
582 * linux-ppc-low.c (the_low_target): Install NULL as
583 supports_z_point_type method.
584 * linux-s390-low.c (the_low_target): Install NULL as
585 supports_z_point_type method.
586 * linux-sparc-low.c (the_low_target): Install NULL as
587 supports_z_point_type method.
588 * linux-x86-low.c (x86_supports_z_point_type): New function.
589 (x86_insert_point): Adjust to new insert_point interface. Use
590 insert_memory_breakpoint. Adjust to new
591 i386_low_insert_watchpoint interface.
592 (x86_remove_point): Adjust to remove_point interface. Use
593 remove_memory_breakpoint. Adjust to new
594 i386_low_remove_watchpoint interface.
595 (the_low_target): Install x86_supports_z_point_type.
596 * lynx-low.c (lynx_target_ops): Install NULL as
597 supports_z_point_type callback.
598 * nto-low.c (nto_supports_z_point_type): New.
599 (nto_insert_point, nto_remove_point): Adjust to new interface.
600 (nto_target_ops): Install nto_supports_z_point_type.
601 * mem-break.c: Adjust intro comment.
602 (struct raw_breakpoint) <raw_type, size>: New fields.
603 <inserted>: Update comment.
604 <shlib_disabled>: Delete field.
605 (enum bkpt_type) <gdb_breakpoint>: Delete value.
606 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
607 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
608 (raw_bkpt_type_to_target_hw_bp_type): New function.
609 (find_enabled_raw_code_breakpoint_at): New function.
610 (find_raw_breakpoint_at): New type and size parameters. Use them.
611 (insert_memory_breakpoint): New function, based off
612 set_raw_breakpoint_at.
613 (remove_memory_breakpoint): New function.
614 (set_raw_breakpoint_at): Reimplement.
615 (set_breakpoint): New, based on set_breakpoint_at.
616 (set_breakpoint_at): Reimplement.
617 (delete_raw_breakpoint): Go through the_target->remove_point
618 instead of assuming memory breakpoints.
619 (find_gdb_breakpoint_at): Delete.
620 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
621 (find_gdb_breakpoint): New function.
622 (set_gdb_breakpoint_at): Delete.
623 (z_type_supported): New function.
624 (set_gdb_breakpoint_1): New function, loosely based off
625 set_gdb_breakpoint_at.
626 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
627 (delete_gdb_breakpoint_at): Delete.
628 (delete_gdb_breakpoint_1): New function, loosely based off
629 delete_gdb_breakpoint_at.
630 (delete_gdb_breakpoint): New function.
631 (clear_gdb_breakpoint_conditions): Rename to ...
632 (clear_breakpoint_conditions): ... this. Don't handle a NULL
634 (add_condition_to_breakpoint): Make static.
635 (add_breakpoint_condition): Take a struct breakpoint pointer
636 instead of an address. Adjust.
637 (gdb_condition_true_at_breakpoint): Rename to ...
638 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
640 (gdb_condition_true_at_breakpoint): Reimplement.
641 (add_breakpoint_commands): Take a struct breakpoint pointer
642 instead of an address. Adjust.
643 (gdb_no_commands_at_breakpoint): Rename to ...
644 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
645 parameter. Return true if no breakpoint was found. Change debug
647 (gdb_no_commands_at_breakpoint): Reimplement.
648 (run_breakpoint_commands): Rename to ...
649 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
650 and change return type to boolean.
651 (run_breakpoint_commands): New function.
652 (gdb_breakpoint_here): Also check for Z1 breakpoints.
653 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
654 breakpoint. Go through the_target->remove_point instead of
655 assuming memory breakpoint.
656 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
657 software and hardware breakpoints.
658 (reinsert_raw_breakpoint): Go through the_target->insert_point
659 instead of assuming memory breakpoint.
660 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
661 software and hardware breakpoints.
662 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
663 Check both software and hardware breakpoints.
664 (validate_inserted_breakpoint): Assert the breakpoint is a
665 software breakpoint. Set the inserted flag to -1 instead of
666 setting shlib_disabled.
667 (delete_disabled_breakpoints): Adjust.
668 (validate_breakpoints): Only validate software breakpoints.
669 Adjust to inserted flag change.
670 (check_mem_read, check_mem_write): Skip breakpoint types other
671 than software breakpoints. Adjust to inserted flag change.
672 * mem-break.h (enum raw_bkpt_type): New enum.
673 (raw_breakpoint, struct process_info): Forward declare.
674 (Z_packet_to_target_hw_bp_type): Delete declaration.
675 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
676 (set_gdb_breakpoint, delete_gdb_breakpoint)
677 (clear_breakpoint_conditions): New declarations.
678 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
679 (breakpoint_inserted_here): Update comment.
680 (add_breakpoint_condition, add_breakpoint_commands): Replace
681 address parameter with a breakpoint pointer parameter.
682 (gdb_breakpoint_here): Update comment.
683 (delete_gdb_breakpoint_at): Delete.
684 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
685 * server.c (process_point_options): Take a struct breakpoint
686 pointer instead of an address. Adjust.
687 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
688 delete_gdb_breakpoint.
689 * spu-low.c (spu_target_ops): Install NULL as
690 supports_z_point_type method.
691 * target.h: Include mem-break.h.
692 (struct target_ops) <prepare_to_access_memory>: Update comment.
693 <supports_z_point_type>: New field.
694 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
695 instead of a char. Also take a raw breakpoint pointer.
696 * win32-arm-low.c (the_low_target): Install NULL as
697 supports_z_point_type.
698 * win32-i386-low.c (i386_supports_z_point_type): New function.
699 (i386_insert_point, i386_remove_point): Adjust to new interface.
700 (the_low_target): Install i386_supports_z_point_type.
701 * win32-low.c (win32_supports_z_point_type): New function.
702 (win32_insert_point, win32_remove_point): Adjust to new interface.
703 (win32_target_ops): Install win32_supports_z_point_type.
704 * win32-low.h (struct win32_target_ops):
705 <supports_z_point_type>: New method.
706 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
707 instead of a char. Also take a raw breakpoint pointer.
709 2014-05-20 Pedro Alves <palves@redhat.com>
711 * mem-break.h: Include break-common.h.
712 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
713 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
714 (Z_packet_to_target_hw_bp_type): New declaration.
715 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
716 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
717 (Z_PACKET_ACCESS_WP): Delete macros.
718 (Z_packet_to_hw_type): Delete function.
719 * i386-low.h: Don't include break-common.h here.
720 (Z_packet_to_hw_type): Delete declaration.
721 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
722 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
723 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
724 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
725 * linux-aarch64-low.c: Don't include break-common.h here.
726 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
727 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
728 (Z_packet_to_target_hw_bp_type): Delete function.
729 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
731 (mips_insert_point, mips_remove_point): Use
732 Z_packet_to_target_hw_bp_type.
734 2014-05-20 Pedro Alves <palves@redhat.com>
736 * linux-aarch64-low.c: Include break-common.h.
737 (enum target_point_type): Delete.
738 (Z_packet_to_point_type): Rename to ...
739 (Z_packet_to_target_hw_bp_type): ... this, and return a
740 target_hw_bp_type instead.
741 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
742 instead of an enum target_point_type.
743 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
745 (aarch64_dr_state_insert_one_point)
746 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
747 (aarch64_handle_aligned_watchpoint)
748 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
749 Take an enum target_hw_bp_type instead of an enum
751 (aarch64_supports_z_point_type): New function.
752 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
753 use Z_packet_to_target_hw_bp_type.
755 2014-05-20 Joel Brobecker <brobecker@adacore.com>
757 * configure.ac: Only use -Werror by default when DEVELOPMENT
759 * configure: Regenerate.
761 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
763 Fix gdbserver qGetTLSAddr for x86_64 -m32.
764 * linux-x86-low.c (X86_64_USER_REGS): New.
765 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
767 2014-04-28 Yao Qi <yao@codesourcery.com>
769 * Makefile.in (i386-avx512.c): Fix the typo of generated file
772 2014-04-25 Pedro Alves <palves@redhat.com>
775 * linux-low.c (linux_attach_fail_reason_string): New function.
776 (linux_attach_lwp): Delete.
777 (linux_attach_lwp_1): Rename to ...
778 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
779 argument. Remove "initial" parameter. Return int instead of
780 void. Don't error or warn here.
781 (linux_attach): Adjust to call linux_attach_lwp. Call error on
782 failure to attach to the tgid. Call warning when failing to
784 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
785 argument. Remove "initial" parameter. Return int instead of
786 void. Don't error or warn here.
787 (linux_attach_fail_reason_string): New declaration.
788 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
789 interface change. Use linux_attach_fail_reason_string.
791 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
792 Walfred Tedeschi <walfred.tedeschi@intel.com>
794 * Makefile.in: Added rules to handle new files
795 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
796 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
797 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
798 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
799 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
800 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
802 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
803 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
804 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
806 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
807 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
808 i386/x32-avx512-linux.xml.
809 * i387-fp.c (num_avx512_k_registers): New constant for number
811 (num_avx512_zmmh_low_registers): New constant for number of
812 lower ZMM registers (0-15).
813 (num_avx512_zmmh_high_registers): New constant for number of
814 higher ZMM registers (16-31).
815 (num_avx512_ymmh_registers): New contant for number of higher
816 YMM registers (ymm16-31 added by avx521 on x86_64).
817 (num_avx512_xmm_registers): New constant for number of higher
818 XMM registers (xmm16-31 added by AVX512 on x86_64).
819 (struct i387_xsave): Add space for AVX512 registers.
820 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
821 Add code to handle AVX512 registers.
822 (i387_xsave_to_cache): Add code to handle AVX512 registers.
823 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
824 prototypei from generated file.
825 (tdesc_amd64_avx512_linux): Likewise.
826 (init_registers_x32_avx512_linux): Likewise.
827 (tdesc_x32_avx512_linux): Likewise.
828 (init_registers_i386_avx512_linux): Likewise.
829 (tdesc_i386_avx512_linux): Likewise.
830 (x86_64_regmap): Add AVX512 registers.
831 (x86_linux_read_description): Add code to handle AVX512 XSTATE
833 (initialize_low_arch): Add code to initialize AVX512 registers.
835 2014-04-23 Pedro Alves <palves@redhat.com>
837 * mem-break.c (find_gdb_breakpoint_at): Make static.
838 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
840 2014-04-23 Pedro Alves <palves@redhat.com>
842 * i386-low.c: Don't include break-common.h here.
843 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
844 prototype to take target_hw_bp_type as argument instead of a Z
846 * i386-low.h: Include break-common.h here.
847 (Z_packet_to_hw_type): Declare.
848 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
850 * linux-x86-low.c (x86_insert_point): Convert the packet number to
851 a target_hw_bp_type before calling i386_low_insert_watchpoint.
852 (x86_remove_point): Convert the packet number to a
853 target_hw_bp_type before calling i386_low_remove_watchpoint.
854 * win32-i386-low.c (i386_insert_point): Convert the packet number
855 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
856 (i386_remove_point): Convert the packet number to a
857 target_hw_bp_type before calling i386_low_remove_watchpoint.
859 2014-04-23 Pedro Alves <palves@redhat.com>
861 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
863 2014-04-10 Pedro Alves <palves@redhat.com>
865 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
866 Check if the condition or command is NULL before checking if the
867 breakpoint is known. On success, return true.
868 * mem-break.h (add_breakpoint_condition): Document return.
869 (add_breakpoint_commands): Add describing comment.
870 * server.c (skip_to_semicolon): New function.
871 (process_point_options): Use it.
873 2014-04-09 Pedro Alves <palves@redhat.com>
875 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
878 2014-02-27 Pedro Alves <palves@redhat.com>
881 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
883 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
885 (last_thread_of_process_p): Take a PID argument instead of a
887 (linux_wait_for_lwp): Delete.
888 (num_lwps, check_zombie_leaders, not_stopped_callback): New
890 (linux_low_filter_event): New function, party factored out from
891 linux_wait_for_event.
892 (linux_wait_for_event): Rename to ...
893 (linux_wait_for_event_filtered): ... this. Add new filter ptid
894 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
895 sigsuspend. Check for zombie leaders.
896 (linux_wait_for_event): Reimplement as wrapper around
897 linux_wait_for_event_filtered.
898 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
899 a normal or signal exit is seen, it's the whole process exiting.
900 (wait_for_sigstop): No longer a for_each_inferior callback.
901 Rewrite on top of linux_wait_for_event_filtered.
902 (stop_all_lwps): Call wait_for_sigstop directly.
903 * server.c (resume, handle_target_event): Handle
904 TARGET_WAITKIND_NO_RESUMED.
906 2014-02-26 Joel Brobecker <brobecker@adacore.com>
908 * win32-low.c (psapi_get_dll_name,
909 * win32_CreateToolhelp32Snapshot): Delete.
910 (win32_CreateToolhelp32Snapshot, win32_Module32First)
911 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
913 (handle_load_dll): Add function description.
914 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
916 2014-02-26 Joel Brobecker <brobecker@adacore.com>
918 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
920 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
921 base address when calling win32_add_one_solib.
922 (handle_load_dll): Delete local variable load_addr.
923 Remove 0x1000 offset applied to DLL base address when calling
925 (handle_unload_dll): Add comment.
927 2014-02-26 Joel Brobecker <brobecker@adacore.com>
929 * win32-low.c (win32_add_all_dlls): Renames
930 win32_ensure_ntdll_loaded. Rewrite function documentation.
931 Adjust implementation to always load all DLLs.
932 Add 0x1000 offset to DLL base address when calling
934 (child_initialization_done): New static global.
935 (do_initial_child_stuff): Set child_initialization_done to
936 zero during child initialization, and 1 after. Replace call
937 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
939 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
940 (handle_unload_dll): Add function documentation.
941 (get_child_debug_event): Ignore load and unload DLL events
942 during child initialization.
944 2014-02-20 Doug Evans <dje@google.com>
946 Remove global all_lwps.
947 * inferiors.h (ptid_of): Move here from linux-low.h.
948 (pid_of, lwpid_of): Ditto.
949 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
950 parameter is a struct thread_info * now.
951 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
952 directly. Pass &all_threads to find_inferior instead of &all_lwps.
953 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
955 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
956 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
957 * linux-arm-low.c (update_registers_callback): Update, "entry"
958 parameter is a struct thread_info * now.
959 Fetch lwpid from current_inferior directly.
960 (arm_insert_point): Pass &all_threads to find_inferior instead of
962 (arm_remove_point): Ditto.
963 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
964 (arm_prepare_to_resume): Fetch pid from thread.
965 (arm_read_description): Fetch lwpid from current_inferior directly.
966 * linux-low.c (all_lwps): Delete.
967 (delete_lwp): Delete call to remove_inferior.
968 (handle_extended_wait): Fetch lwpid from thread.
969 (add_lwp): Don't set lwp->entry.id. Remove call to
970 add_inferior_to_list.
971 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
972 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
973 (kill_one_lwp_callback): Ditto.
974 (linux_kill): Don't dereference NULL pointer.
975 Fetch ptid,lwpid from thread.
976 (get_detach_signal): Fetch ptid from thread.
977 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
978 Simplify call to regcache_invalidate_thread.
979 (delete_lwp_callback): Update, "entry" parameter is a
980 struct thread_info * now. Fetch pid from thread.
981 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
982 (status_pending_p_callback): Update, "entry" parameter is a
983 struct thread_info * now. Fetch ptid from thread.
984 (find_lwp_pid): Update, "entry" parameter is a
985 struct thread_info * now.
986 (linux_wait_for_lwp): Fetch pid from thread.
987 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
988 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
989 (enqueue_one_deferred_signal): Fetch lwpid from thread.
990 (dequeue_one_deferred_signal): Ditto.
991 (cancel_breakpoint): Fetch ptid from current_inferior.
992 (linux_wait_for_event): Pass &all_threads to find_inferior,
993 not &all_lwps. Fetch ptid, lwpid from thread.
994 (count_events_callback): Update, "entry" parameter is a
995 struct thread_info * now.
996 (select_singlestep_lwp_callback): Ditto.
997 (select_event_lwp_callback): Ditto.
998 (cancel_breakpoints_callback): Ditto.
999 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1001 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1002 (unsuspend_one_lwp): Update, "entry" parameter is a
1003 struct thread_info * now.
1004 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1006 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1007 Fetch lwpid from thread, not lwp.
1008 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1009 Pass &all_threads to find_inferior, not &all_lwps.
1010 (send_sigstop): Fetch lwpid from thread, not lwp.
1011 (send_sigstop_callback): Update, "entry" parameter is a
1012 struct thread_info * now.
1013 (suspend_and_send_sigstop_callback): Ditto.
1014 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1015 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1016 struct thread_info * now.
1017 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1019 (lwp_running): Update, "entry" parameter is a
1020 struct thread_info * now.
1021 (stop_all_lwps): Fetch ptid from thread.
1022 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1023 (linux_resume_one_lwp): Fetch lwpid from thread.
1024 (linux_set_resume_request): Update, "entry" parameter is a
1025 struct thread_info * now. Fetch pid, lwpid from thread.
1026 (resume_status_pending_p): Update, "entry" parameter is a
1027 struct thread_info * now.
1028 (need_step_over_p): Ditto. Fetch lwpid from thread.
1029 (start_step_over): Fetch lwpid from thread.
1030 (linux_resume_one_thread): Update, "entry" parameter is a
1031 struct thread_info * now. Fetch lwpid from thread.
1032 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1033 (proceed_one_lwp): Update, "entry" parameter is a
1034 struct thread_info * now. Fetch lwpid from thread.
1035 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1036 struct thread_info * now.
1037 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1038 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1039 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1041 (regsets_store_inferior_registers): Ditto.
1042 (fetch_register, store_register): Ditto.
1043 (linux_read_memory, linux_write_memory): Ditto.
1044 (linux_request_interrupt): Ditto.
1045 (linux_read_auxv): Ditto.
1046 (linux_xfer_siginfo): Ditto.
1047 (linux_qxfer_spu): Ditto.
1048 (linux_qxfer_libraries_svr4): Ditto.
1049 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1050 moved to inferiors.h.
1052 (get_thread_lwp): Update.
1053 (struct lwp_info): Delete member "entry". Simplify comment for
1056 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1057 current_inferior directly.
1058 (update_watch_registers_callback): Update, "entry" parameter is a
1059 struct thread_info * now. Fetch pid from thread.
1060 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1061 (mips_insert_point): Fetch lwpid from current_inferior.
1062 Pass &all_threads to find_inferior, not &all_lwps.
1063 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1064 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1066 (mips_stopped_data_address): Ditto.
1067 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1069 * linux-tile-low.c (tile_arch_setup): Ditto.
1070 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1071 (update_debug_registers_callback): Update, "entry" parameter is a
1072 struct thread_info * now. Fetch pid from thread.
1073 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1074 Pass &all_threads to find_inferior, not &all_lwps.
1075 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1076 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1077 Pass &all_threads to find_inferior, not &all_lwps.
1078 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1079 (i386_dr_low_get_status): Ditto.
1080 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1081 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1082 (x86_linux_read_description): Ditto.
1083 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1085 2014-02-20 Doug Evans <dje@google.com>
1087 * inferiors.c (get_first_inferior): Fix buglet.
1089 2014-02-19 Doug Evans <dje@google.com>
1091 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1092 * inferiors.c (add_thread): Change result type to struct thread_info *.
1093 All callers updated.
1094 (add_lwp): Call add_thread here instead of in callers.
1095 All callers updated.
1096 * linux-low.h (get_lwp_thread): Rewrite.
1097 (struct lwp_info): New member "thread".
1099 2014-02-19 Doug Evans <dje@google.com>
1101 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1102 All callers updated.
1104 2014-02-19 Doug Evans <dje@google.com>
1106 * inferiors.c (add_thread): Fix whitespace.
1108 2014-02-19 Doug Evans <dje@google.com>
1110 * dll.c (clear_dlls): Replace accessing list implemention details
1112 * gdbthread.h (get_first_thread): Declare.
1113 * inferiors.c (for_each_inferior_with_data): New function.
1114 (get_first_thread): New function.
1115 (find_thread_ptid): Simplify.
1116 (get_first_inferior): New function.
1117 (clear_list): Delete.
1118 (one_inferior_p): New function.
1119 (clear_inferior_list): New function.
1120 (clear_inferiors): Update.
1121 * inferiors.h (for_each_inferior_with_data): Declare.
1122 (clear_inferior_list): Declare.
1123 (one_inferior_p): Declare.
1124 (get_first_inferior): Declare.
1125 * linux-low.c (linux_wait_for_event): Replace accessing list
1126 implemention details with API function.
1127 * server.c (target_running): Ditto.
1128 (accumulate_file_name_length): New function.
1129 (emit_dll_description): New function.
1130 (handle_qxfer_libraries): Replace accessing list implemention
1131 details with API function.
1132 (handle_qxfer_threads_worker): New function.
1133 (handle_qxfer_threads_proper): Replace accessing list implemention
1134 details with API function.
1135 (handle_query): Ditto.
1136 (visit_actioned_threads_callback_ftype): New typedef.
1137 (visit_actioned_threads_data): New struct.
1138 (visit_actioned_threads): Rewrite to be find_inferior callback.
1139 (resume): Call find_inferior.
1140 (handle_status): Replace accessing list implemention
1141 details with API function.
1142 (process_serial_event): Replace accessing list implemention details
1144 * target.c (set_desired_inferior): Replace accessing list implemention
1145 details with API function.
1146 * tracepoint.c (same_process_p): New function.
1147 (gdb_agent_about_to_close): Replace accessing list implemention
1148 details with API function.
1149 * win32-low.c (child_delete_thread): Replace accessing list
1150 implemention details with API function.
1151 (match_dll_by_basename): New function.
1152 (dll_is_loaded_by_basename): New function.
1153 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1154 details call to dll_is_loaded_by_basename.
1156 2014-02-19 Doug Evans <dje@google.com>
1158 * dll.h (struct dll_info): Add comment.
1159 * gdbthread.h (struct thread_info): Add comment.
1160 (current_ptid): Simplify.
1161 * inferiors.c (add_process): Update.
1162 (remove_process): Update.
1163 * inferiors.h (struct process_info): Rename member "head" to "entry".
1164 * linux-low.c (delete_lwp): Update.
1166 (last_thread_of_process_p): Update.
1167 (kill_one_lwp_callback, linux_kill): Update.
1168 (status_pending_p_callback): Update.
1169 (wait_for_sigstop): Update. Simplify read of ptid.
1170 (start_step_over): Update.
1171 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1172 (get_lwp_thread): Update.
1173 (struct lwp_info): Rename member "head" to "entry".
1174 * regcache.h (inferior_list_entry): Delete.
1175 * server.c (kill_inferior_callback): Update.
1176 (detach_or_kill_inferior_callback): Update.
1177 (print_started_pid): Update.
1178 (print_attached_pid): Update.
1179 (process_serial_event): Simplify read of ptid.
1180 * thread-db.c (thread_db_create_event): Update.
1181 (thread_db_get_tls_address): Update.
1182 * win32-low.c (current_inferior_ptid): Simplify.
1184 2014-02-19 Tom Tromey <tromey@redhat.com>
1186 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1188 (target_supports_btrace): Update.
1190 2014-02-14 Yao Qi <yao@codesourcery.com>
1192 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1193 (rsp-low-ipa.o): New target.
1195 2014-02-12 Tom Tromey <tromey@redhat.com>
1197 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1198 convert_ascii_to_int.
1199 * regcache.c (registers_to_string): Likewise.
1200 * remote-utils.c (decode_M_packet): Likewise.
1201 * server.c (process_serial_event): Likewise.
1203 2014-02-12 Tom Tromey <tromey@redhat.com>
1205 * server.c (handle_query, handle_v_run): Use hex2bin, not
1207 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1209 2014-02-12 Tom Tromey <tromey@redhat.com>
1211 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1212 convert_int_to_ascii.
1213 * regcache.c (registers_to_string, collect_register_as_string):
1215 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1217 * server.c (process_serial_event): Likewise.
1218 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1219 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1221 2014-02-12 Tom Tromey <tromey@redhat.com>
1223 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1224 bin2hex, not hexify.
1225 * tracepoint.c (cmd_qtstatus): Likewise.
1227 2014-02-12 Tom Tromey <tromey@redhat.com>
1229 * remote-utils.c (monitor_output): Pass explicit length to
1232 2014-02-12 Tom Tromey <tromey@redhat.com>
1234 * tracepoint.c: Include rsp-low.h.
1235 * server.c: Include rsp-low.h.
1236 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1237 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1239 * remote-utils.c: Include rsp-low.h.
1240 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1241 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1242 (convert_int_to_ascii, convert_ascii_to_int): Move to
1244 * regcache.c: Include rsp-low.h.
1245 * ax.c: Include rsp-low.h.
1246 * Makefile.in (SFILES): Add common/rsp-low.c.
1247 (OBS): Add rsp-low.o.
1248 (rsp-low.o): New target.
1250 2014-02-12 Tom Tromey <tromey@redhat.com>
1252 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1253 Include print-utils.h.
1254 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1255 (plongest, thirty_two, phex_nz): Remove.
1256 * Makefile.in (SFILES): Add common/print-utils.c.
1257 (OBS): Add print-utils.o.
1258 (print-utils-ipa.o): New target.
1259 (print-utils.o): New target.
1260 (IPA_OBJS): Add print-utils-ipa.o.
1262 2014-02-06 Tom Tromey <tromey@redhat.com>
1264 * Makefile.in (SFILES): Fix indentation.
1266 2014-02-05 Doug Evans <dje@google.com>
1268 * linux-low.c (linux_wait_for_event): Improve comment.
1269 (linux_wait_1): Keep current_inferior in sync with event_child.
1271 2014-01-22 Doug Evans <dje@google.com>
1273 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1275 2014-01-22 Doug Evans <dje@google.com>
1277 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1278 * configure: Regenerate.
1279 * config.in: Regenerate.
1280 * Makefile.in (SFILES): Add debug.c.
1282 * debug.c: New file.
1283 * debug.h: New file.
1284 * linux-aarch64-low.c (*): Update all debugging printfs to use
1285 debug_printf instead of fprintf.
1286 * linux-arm-low.c (*): Ditto.
1287 * linux-cris-low.c (*): Ditto.
1288 * linux-crisv32-low.c (*): Ditto.
1289 * linux-m32r-low.c (*): Ditto.
1290 * linux-sparc-low.c (*): Ditto.
1291 * linux-x86.c (*): Ditto.
1292 * linux-low.c (*): Ditto.
1293 (linux_wait_1): Add calls to debug_enter, debug_exit.
1294 (linux_wait): Remove redundant debugging printf.
1295 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1296 (linux_resume, unstop_all_lwps): Ditto.
1297 * mem-break.c (*): Update all debugging printfs to use
1298 debug_printf instead of fprintf.
1299 * remote-utils.c (*): Ditto.
1300 * thread-db.c (*): Ditto.
1301 * server.c #include <ctype.h>, "gdb_vecs.h".
1302 (debug_threads): Moved to debug.c.
1303 (*): Update all debugging printfs to use debug_printf instead of
1305 (start_inferior): Replace call to fflush with call to debug_flush.
1306 (monitor_show_help): Mention set debug-format.
1307 (parse_debug_format_options): New function.
1308 (handle_monitor_command): Handle "monitor set debug-format".
1309 (gdbserver_usage): Mention --debug-format.
1310 (main): Parse --debug-format.
1311 * server.h (debug_threads): Declaration moved to debug.h.
1313 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1314 trace_debug_1 that uses debug_printf.
1315 (tracepoint_look_up_symbols): Update all debugging printfs to use
1316 debug_printf instead of fprintf.
1318 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1320 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1323 2014-01-17 Pedro Alves <palves@redhat.com>
1326 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1327 defined after including gdb_proc_service.h.
1329 2014-01-16 Doug Evans <dje@google.com>
1331 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1332 (match_dll): Use it.
1334 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1336 * target.h (target_ops) <read_btrace>: Change parameters and
1337 return type to allow error reporting.
1338 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1339 trace reading errors on.
1340 * linux-low.c (linux_low_read_btrace): Pass trace reading
1342 (linux_low_disable_btrace): New.
1344 2014-01-15 Doug Evans <dje@google.com>
1346 * inferiors.c (thread_id_to_gdb_id): Delete.
1347 * inferiors.h (thread_id_to_gdb_id): Delete.
1349 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1351 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1352 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1355 2014-01-08 Pedro Alves <palves@redhat.com>
1357 * server.c (handle_status): Don't discard previous queued stop
1358 replies or thread's pending status here.
1359 (main) <disconnection>: Do it here instead.
1361 2014-01-08 Pedro Alves <palves@redhat.com>
1363 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1364 * server.c (visit_actioned_threads, handle_pending_status): New
1366 (handle_v_cont): Factor out parts to ...
1367 (resume): ... this new function. If in all-stop, and a thread
1368 being resumed has a pending status, report it without actually
1370 (myresume): Adjust to use the new 'resume' function.
1371 (clear_pending_status_callback, set_pending_status_callback)
1372 (find_status_pending_thread_callback): New functions.
1373 (handle_status): Handle the case of multiple threads having
1374 interesting statuses to report. Report threads' real last signal
1375 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1376 with an interesting thread to report the status for, instead of
1377 always reporting the status of the first thread.
1379 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1381 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1382 * gdbreplay.c (gdbreplay_version): Likewise.
1384 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1386 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1387 iov.iov_len with the real length in use.
1389 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1391 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1392 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1393 for all targets that use win32-low.c.
1394 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1395 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1397 2013-12-13 Pedro Alves <palves@redhat.com>
1399 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1400 if equal to TARGET_WAITKIND_LOADED.
1401 * win32-low.c (cached_status): New static global.
1402 (win32_wait): Add declaration.
1403 (do_initial_child_stuff): Flush all initial pending debug events
1404 up to the initial breakpoint.
1405 (win32_wait): If CACHED_STATUS was set, return that instead
1406 of doing a real wait. Remove the code resuming the execution
1407 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1408 during the initial phase. Also remove the code changing
1409 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1410 TARGET_WAITKIND_STOPPED.
1412 2013-12-11 Yao Qi <yao@codesourcery.com>
1414 * notif.c (handle_notif_ack): Return 0 if no notification
1417 2013-11-20 Doug Evans <dje@google.com>
1419 * linux-low.c (linux_set_resume_request): Fix comment.
1421 2013-11-20 Doug Evans <dje@google.com>
1423 * linux-low.c (resume_status_pending_p): Tweak comment.
1425 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1427 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1428 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1429 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1430 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1431 (srv_amd64_regobj): Add amd64-mpx.o.
1432 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1433 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1434 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1435 * i387-fp.c (num_pl_bnd_register) Added constant.
1436 (num_pl_bnd_cfg_registers) Added constant.
1437 (struct i387_xsave) Added reserved area and MPX fields.
1438 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1439 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1441 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1442 (init_registers_amd64_mpx_linux): Declare new function.
1443 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1444 (x86_64_regmap): Add MPX registers.
1445 (x86_linux_read_description): Add MPX case.
1446 (initialize_low_arch): Initialize MPX targets.
1448 2013-11-18 Tom Tromey <tromey@redhat.com>
1450 * configure: Rebuild.
1451 * configure.ac: Don't check for stdlib.h.
1452 * gdbreplay.c: Unconditionally include stdlib.h.
1454 2013-11-18 Tom Tromey <tromey@redhat.com>
1456 * config.in: Rebuild.
1457 * configure: Rebuild.
1458 * configure.ac: Don't use AC_HEADER_DIRENT.
1460 2013-11-18 Tom Tromey <tromey@redhat.com>
1462 * server.h: Don't check HAVE_STRING_H.
1463 * gdbreplay.c: Don't check HAVE_STRING_H.
1464 * configure: Rebuild.
1466 2013-11-18 Tom Tromey <tromey@redhat.com>
1468 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1471 2013-11-08 Tom Tromey <tromey@redhat.com>
1473 * configure, config.in: Rebuild.
1474 * configure.ac: Remove unused configury.
1476 2013-11-08 Tom Tromey <tromey@redhat.com>
1478 * acinclude.m4: Include common.m4, codeset.m4.
1479 * configure, config.in: Rebuild.
1480 * configure.ac: Use GDB_AC_COMMON.
1482 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1484 * linux-s390-low.c (HWCAP_S390_TE): New define.
1485 (s390_arch_setup): Consider the TE field in the HWCAP for
1486 determining 'have_regset_tdb'.
1488 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1491 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1494 2013-10-02 Pedro Alves <palves@redhat.com>
1496 * server.c (process_serial_event): Don't output "GDBserver
1497 exiting" if GDB is connected through stdio.
1498 * target.c (mywait): Likewise, be silent if GDB is connected
1501 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1503 * lynx-low.c (lynx_add_threads_after_attach): New function.
1504 (lynx_attach): Remove call to add_thread. Add call to
1505 lynx_add_threads_after_attach instead.
1507 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1509 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1510 * config.in, configure: Regenerated.
1512 2013-09-18 Yao Qi <yao@codesourcery.com>
1515 * server.c (start_inferior): Clear 'resume_info'.
1517 2013-09-16 Jiong Wang <jiwang@tilera.com>
1519 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1522 2013-09-16 Jiong Wang <jiwang@tilera.com>
1524 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1525 linux-tile-low.o to srv_tgtobj.
1527 2013-09-16 Will Newton <will.newton@linaro.org>
1529 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1532 2013-09-06 Pedro Alves <palves@redhat.com>
1534 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1535 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1536 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1537 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1538 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1539 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1541 2013-09-06 Pedro Alves <palves@redhat.com>
1543 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1544 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1546 2013-09-06 Pedro Alves <palves@redhat.com>
1548 * linux-amd64-ipa.c: Include tracepoint.h.
1549 * linux-i386-ipa.c: Include tracepoint.h.
1551 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1553 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1554 (ps_get_thread_area): New function.
1556 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1558 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1559 (initialize_low_arch): Call init_registers_crisv32 rather than
1560 init_register_crisv32.
1562 2013-09-05 Pedro Alves <palves@redhat.com>
1564 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1566 * hostio.h: ... this new file.
1567 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1568 win32-low.c: Include hostio.h.
1570 2013-09-05 Pedro Alves <palves@redhat.com>
1572 * server.h (gdb_client_data, handler_func, callback_handler_func)
1573 (delete_file_handler, add_file_handler, append_callback_event)
1574 (delete_callback_event, start_event_loop, initialize_event_loop):
1575 Move to event-loop.h and include it.
1576 * event-loop.h: New file.
1578 2013-09-05 Pedro Alves <palves@redhat.com>
1580 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1581 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1582 (loaded_dll, unloaded_dll): Move to ...
1583 * dll.h: ... this new file.
1584 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1586 2013-09-05 Pedro Alves <palves@redhat.com>
1588 * server.h (current_process, get_thread_process, all_processes)
1589 (add_inferior_to_list, for_each_inferior, current_inferior)
1590 (remove_inferior, add_process, remove_process, find_process_pid)
1591 (have_started_inferiors_p, have_attached_inferiors_p)
1592 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1593 (clear_inferiors, find_inferior, find_inferior_id)
1594 (inferior_target_data, set_inferior_target_data)
1595 (inferior_regcache_data, set_inferior_regcache_data): Move to
1596 inferiors.h, and include it.
1597 * inferiors.h: New file.
1599 2013-09-05 Pedro Alves <palves@redhat.com>
1601 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1605 2013-09-05 Pedro Alves <palves@redhat.com>
1607 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1609 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1610 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1611 (handle_tracepoint_general_set, handle_tracepoint_query)
1612 (tracepoint_finished_step, tracepoint_was_hit)
1613 (release_while_stepping_state_list, current_traceframe)
1614 (in_readonly_region, traceframe_read_mem)
1615 (fetch_traceframe_registers, traceframe_read_sdata)
1616 (traceframe_read_info, struct fast_tpoint_collect_status)
1617 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1618 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1619 (supply_fast_tracepoint_registers)
1620 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1621 (ipa_tdesc, claim_trampoline_space)
1622 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1623 (agent_mem_read, agent_get_trace_state_variable_value)
1624 (agent_set_trace_state_variable_value, agent_tsv_read)
1625 (agent_mem_read_string, get_raw_reg_func_addr)
1626 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1627 * tracepoint.h: ... this new file.
1629 2013-09-05 Pedro Alves <palves@redhat.com>
1631 * server.h (perror_with_name, error, fatal, warning, paddress)
1632 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1634 * utils.h: New file.
1636 2013-09-05 Pedro Alves <palves@redhat.com>
1638 * server.h (remote_debug, noack_mode, transport_is_reliable)
1639 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1640 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1641 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1642 (write_enn, initialize_async_io, enable_async_io)
1643 (disable_async_io, check_remote_input_interrupt_request)
1644 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1645 (dead_thread_notify, prepare_resume_reply)
1646 (decode_address_to_semicolon, decode_address, decode_m_packet)
1647 (decode_M_packet, decode_X_packet, decode_xfer_write)
1648 (decode_search_memory_packet, unhexify, hexify)
1649 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1650 (look_up_one_symbol, relocate_instruction)
1651 (monitor_output): Move to remote-utils.h, and include it.
1652 * remote-utils.h: New file.
1654 2013-09-05 Pedro Alves <palves@redhat.com>
1656 * server.h (_): Delete.
1658 2013-09-02 Pedro Alves <palves@redhat.com>
1660 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1661 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1663 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1665 2013-09-02 Pierre Muller <muller@sourceware.org>
1667 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1668 or WriteProcessMemory complete successfully and handle
1669 ERROR_PARTIAL_COPY error.
1671 2013-09-02 Pedro Alves <palves@redhat.com>
1673 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1674 error instead of EIO.
1676 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1679 * linux-low.c: Include filestuff.h.
1680 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1681 * lynx-low.c: Include filestuff.h.
1682 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1683 * server.c: Include filestuff.h.
1684 (main): Call notice_open_fds.
1685 * spu-low.c: Include filestuff.h.
1686 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1688 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1690 * Makefile.in: Explain why ../target and ../nat are not
1691 listed as include file search paths.
1692 (linux-waitpid.o): New object file rule.
1693 * configure.srv (srv_native_linux_obj): New variable.
1694 Replace all occurrences of linux native object files with
1695 $srv_native_linux_obj.
1696 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1697 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1698 (linux_enable_event_reporting): Remove declaration.
1699 (my_waitpid): Moved to common/linux-waitpid.c.
1700 (linux_wait_for_event): Pass ptid when calling
1701 linux_enable_event_reporting.
1702 (linux_supports_tracefork_flag): Remove.
1703 (linux_enable_event_reporting): Likewise.
1704 (linux_tracefork_grandchild): Remove.
1705 (STACK_SIZE): Moved to common/linux-ptrace.c.
1706 (linux_tracefork_child): Remove.
1707 (linux_test_for_tracefork): Remove.
1708 (linux_look_up_symbols): Call linux_supports_traceclone.
1709 (initialize_low): Remove call to linux_test_for_tracefork.
1710 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1711 common/linux-ptrace.h.
1712 (PTRACE_TYPE_ARG4): Likewise.
1713 Include linux-ptrace.h.
1715 2013-08-21 Pedro Alves <palves@redhat.com>
1717 * config.in: Renegerate.
1719 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1721 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1722 (SFILES): Remove $(srcdir)/common/target-common.c and
1723 add $(srcdir)/target/waitstatus.c.
1724 (OBS): Remove target-common.o and add waitstatus.o.
1725 (server_h): Remove $(srcdir)/../common/target-common.h and
1726 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1727 and $(srcdir)/../target/waitstatus.h.
1728 (target-common.o): Remove.
1729 (waitstatus.o): New target object file.
1730 * target.h: Do not include target-common.h and
1731 include target/resume.h, target/wait.h and
1732 target/waitstatus.h.
1734 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1736 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1737 to PTRACE_TYPE_ARG3.
1738 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1739 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1741 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1742 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1744 2013-07-27 Jie Zhang <jie@codesourcery.com>
1745 Daniel Jacobowitz <dan@codesourcery.com>
1746 Yao Qi <yao@codesourcery.com>
1748 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1749 (mips-linux-watch.o): New rule.
1750 (mips_linux_watch_h): New variable.
1751 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1753 * linux-mips-low.c: Include mips-linux-watch.h.
1754 (struct arch_process_info, struct arch_lwp_info): New.
1755 (update_watch_registers_callback): New function.
1756 (mips_linux_new_process, mips_linux_new_thread) New functions.
1757 (mips_linux_prepare_to_resume, mips_insert_point): New
1759 (mips_remove_point, mips_stopped_by_watchpoint): New
1761 (rsp_bp_type_to_target_hw_bp_type): New function.
1762 (mips_stopped_data_address): New function.
1763 (the_low_target): Add watchpoint support functions.
1765 2013-07-27 Yao Qi <yao@codesourcery.com>
1767 * i386-low.c: Include break-common.h.
1768 (enum target_hw_bp_type): Remove.
1770 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1772 * Makefile.in (SFILES): /common/target-common.c.
1773 (OBS): Add target-common.o.
1774 (server_h): Add $(srcdir)/../common/target-common.h.
1775 (target-common.o): New target.
1776 * server.c (queue_stop_reply_callback): Free
1777 status string after use.
1778 * target.c (target_waitstatus_to_string): Remove.
1779 * target.h: Include target-common.h.
1780 (resume_kind): Likewise.
1781 (target_waitkind): Likewise.
1782 (target_waitstatus): Likewise.
1783 (TARGET_WNOHANG): Likewise.
1785 2013-07-04 Yao Qi <yao@codesourcery.com>
1787 * Makefile.in (host_alias): Use @host_noncanonical@.
1788 (target_alias): Use @target_noncanonical@.
1789 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1790 ACX_NONCANONICAL_HOST.
1791 * configure: Regenerated.
1794 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1796 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1797 * configure: Rebuild.
1798 * Makefile.in (version_host, version_target): Get from configure.
1799 (version.c): Use $(version_host) and $(version_target).
1801 2013-07-03 Pedro Alves <palves@redhat.com>
1803 * Makefile.in (config.status): Depend on development.sh.
1804 * acinclude.m4: Include libmcheck.m4.
1805 * configure: Regenerate.
1807 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1809 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1810 attribute inside the parentheses.
1811 (winapi_DebugSetProcessKillOnExit): Ditto.
1812 (winapi_DebugBreakProcess): Ditto.
1813 (winapi_GenerateConsoleCtrlEvent): Ditto.
1815 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1817 * notif.h (notif_event): Add a dummy member to avoid compiler
1820 2013-07-01 Pedro Alves <palves@redhat.com>
1822 * hostio.c (HOSTIO_PATH_MAX): Define.
1823 (require_filename, handle_open, handle_unlink, handle_readlink):
1826 2013-07-01 Pedro Alves <palves@redhat.com>
1828 * server.h: Include "pathmax.h".
1829 * linux-low.c: Don't include sys/param.h.
1830 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1832 * win32-low.c: Don't include sys/param.h.
1833 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1835 2013-07-01 Pedro Alves <palves@redhat.com>
1837 * event-loop.c: Don't check HAVE_UNISTD_H before including
1839 * gdbreplay.c: Likewise.
1840 * remote-utils.c: Likewise.
1841 * server.c: Likewise.
1842 * configure.ac: Don't check for unistd.h.
1843 * configure: Regenerate.
1845 2013-06-28 Tom Tromey <tromey@redhat.com>
1847 * Makefile.in (version.c): Use version.in, not
1850 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1852 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1853 * configure: Rebuild.
1854 * Makefile.in (version_host, version_target): Get from configure.
1855 (version.c): Use $(version_host) and $(version_target).
1857 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1859 Fix trace-status to output user name without trailing colon.
1860 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1862 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1864 Fix trace-status to output proper start-time and stop-time.
1865 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1866 output start time and stop time in hex as gdb expects.
1868 2013-06-26 Pedro Alves <pedro@codesourcery.com>
1870 * tracepoint.c (build_traceframe_info_xml): Output trace state
1871 variables present in the trace buffer.
1873 2013-06-24 Tom Tromey <tromey@redhat.com>
1875 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1877 (version.o): Remove.
1878 * gdbreplay.c: Include version.h.
1879 (version, host_name): Don't declare.
1880 * server.h: Include version.h.
1881 (version, host_name): Don't declare.
1883 2013-06-12 Pedro Alves <palves@redhat.com>
1885 * linux-x86-low.c (linux_is_elf64): Delete global.
1886 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1887 with local linux_pid_exe_is_elf_64_file use.
1889 2013-06-11 Pedro Alves <palves@redhat.com>
1891 * linux-low.c (regset_disabled, disable_regset): New functions.
1892 (regsets_fetch_inferior_registers)
1893 (regsets_store_inferior_registers): Use them.
1894 (initialize_regsets_info); Don't allocate the disabled_regsets
1896 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1899 2013-06-11 Pedro Alves <palves@redhat.com>
1901 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1904 2013-06-11 Pedro Alves <palves@redhat.com>
1906 * linux-x86-low.c (initialize_low_arch): Call
1907 init_registers_x32_avx_linux.
1909 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1911 Fix compatibility with Android Bionic.
1912 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1915 2013-06-07 Pedro Alves <palves@redhat.com>
1918 * Makefile.in (OBS): Add tdesc.o.
1919 (IPA_OBJS): Add tdesc-ipa.o.
1920 (tdesc-ipa.o): New rule.
1921 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1923 * linux-low.c (new_inferior): Delete.
1924 (disabled_regsets, num_regsets): Delete.
1925 (linux_add_process): Adjust to set the new per-process
1927 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1928 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1929 was a stop. When calling arch_setup, switch the current inferior
1930 to the thread that got an event.
1931 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1932 (regsets_fetch_inferior_registers)
1933 (regsets_store_inferior_registers): New regsets_info parameter.
1935 (linux_register_in_regsets): New regs_info parameter. Adjust to
1937 (register_addr, fetch_register, store_register): New usrregs_info
1938 parameter. Adjust to use it.
1939 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1940 parameter regs_info. Adjust to use it.
1941 (linux_fetch_registers): Get the current inferior's regs_info, and
1943 (linux_store_registers): Ditto.
1944 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1945 (initialize_low): Don't initialize the target_regsets here. Call
1946 initialize_low_arch.
1947 * linux-low.h (target_regsets): Delete declaration.
1948 (struct regsets_info): New.
1949 (struct usrregs_info): New.
1950 (struct regs_info): New.
1951 (struct process_info_private) <new_inferior>: New field.
1952 (struct linux_target_ops): Delete the num_regs, regmap, and
1953 regset_bitmap fields. New field regs_info.
1954 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1955 * i387-fp.c (num_xmm_registers): Delete.
1956 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1957 calls to new interface.
1958 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1959 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1960 Infer the number of xmm registers from the regcache's target
1962 * i387-fp.h (num_xmm_registers): Delete.
1963 * inferiors.c (add_thread): Don't install the thread's regcache
1965 * proc-service.c (gregset_info): Fetch the current inferior's
1966 regs_info. Adjust to use it.
1967 * regcache.c: Include tdesc.h.
1968 (register_bytes, reg_defs, num_registers)
1969 (gdbserver_expedite_regs): Delete.
1970 (get_thread_regcache): If the thread doesn't have a regcache yet,
1971 create one, instead of aborting gdbserver.
1972 (regcache_invalidate_one): Rename to ...
1973 (regcache_invalidate_thread): ... this.
1974 (regcache_invalidate_one): New.
1975 (regcache_invalidate): Only invalidate registers of the current
1977 (init_register_cache): Add target_desc parameter, and use it.
1978 (new_register_cache): Ditto. Assert the target description has a
1979 non zero registers_size.
1980 (regcache_cpy): Add assertions. Adjust.
1981 (realloc_register_cache, set_register_cache): Delete.
1982 (registers_to_string, registers_from_string): Adjust.
1983 (find_register_by_name, find_regno, find_register_by_number)
1984 (register_cache_size): Add target_desc parameter, and use it.
1985 (free_register_cache_thread, free_register_cache_thread_one)
1986 (regcache_release, register_cache_size): New.
1987 (register_size): Add target_desc parameter, and use it.
1988 (register_data, supply_register, supply_register_zeroed)
1989 (supply_regblock, supply_register_by_name, collect_register)
1990 (collect_register_as_string, collect_register_by_name): Adjust.
1991 * regcache.h (struct target_desc): Forward declare.
1992 (struct regcache) <tdesc>: New field.
1993 (init_register_cache, new_register_cache): Add target_desc
1995 (regcache_invalidate_thread): Declare.
1996 (regcache_invalidate_one): Delete declaration.
1997 (regcache_release): Declare.
1998 (find_register_by_number, register_cache_size, register_size)
1999 (find_regno): Add target_desc parameter.
2000 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2002 * remote-utils.c: Include tdesc.h.
2003 (outreg, prepare_resume_reply): Adjust.
2004 * server.c: Include tdesc.h.
2005 (gdbserver_xmltarget): Delete declaration.
2006 (get_features_xml, process_serial_event): Adjust.
2007 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2009 (struct process_info) <tdesc>: New field.
2010 (ipa_tdesc): Declare.
2011 * tdesc.c: New file.
2012 * tdesc.h: New file.
2013 * tracepoint.c: Include tdesc.h.
2014 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2015 (get_context_regcache): Adjust to pass ipa_tdesc down.
2016 (do_action_at_tracepoint): Adjust to get the register cache size
2017 from the context regcache's description.
2018 (traceframe_walk_blocks): Adjust to get the register cache size
2019 from the current trace frame's description.
2020 (traceframe_get_pc): Adjust to get current trace frame's
2021 description and pass it down.
2022 (gdb_collect): Adjust to get the register cache size from the
2024 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2025 (gdbserver_xmltarget): Delete.
2026 (initialize_low_tracepoint): Set the ipa's target description.
2027 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2028 (initialize_low_tracepoint): Set the ipa's target description.
2029 * linux-x86-low.c: Include tdesc.h.
2030 [__x86_64__] (is_64bit_tdesc): New.
2031 (ps_get_thread_area, x86_get_thread_area): Use it.
2032 (i386_cannot_store_register): Rename to ...
2033 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2034 (i386_cannot_fetch_register): Rename to ...
2035 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2036 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2038 (target_regsets): Rename to ...
2039 (x86_regsets): ... this.
2040 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2042 (x86_siginfo_fixup): Use is_64bit_tdesc.
2043 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2044 (tdesc_x32_avx_linux, tdesc_x32_linux)
2045 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2047 (x86_linux_update_xmltarget): Delete.
2048 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2049 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2050 (AMD64_LINUX_USER64_CS): New.
2051 (x86_linux_read_description): New, based on
2052 x86_linux_update_xmltarget.
2053 (same_process_callback): New.
2054 (x86_arch_setup_process_callback): New.
2055 (x86_linux_update_xmltarget): New.
2056 (x86_regsets_info): New.
2057 (amd64_linux_regs_info): New.
2058 (i386_linux_usrregs_info): New.
2059 (i386_linux_regs_info): New.
2060 (x86_linux_regs_info): New.
2061 (x86_arch_setup): Reimplement.
2062 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2063 (x86_emit_ops): Ditto.
2064 (the_low_target): Adjust. Install x86_linux_regs_info,
2065 x86_cannot_fetch_register, and x86_cannot_store_register.
2066 (initialize_low_arch): New.
2067 * linux-ia64-low.c (tdesc_ia64): Declare.
2068 (ia64_fetch_register): Adjust.
2069 (ia64_usrregs_info, regs_info): New globals.
2070 (ia64_regs_info): New function.
2071 (the_low_target): Adjust.
2072 (initialize_low_arch): New function.
2073 * linux-sparc-low.c (tdesc_sparc64): Declare.
2074 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2076 (sparc_arch_setup): New function.
2077 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2078 (the_low_target): Adjust.
2079 (initialize_low_arch): New function.
2080 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2081 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2082 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2083 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2084 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2085 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2086 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2087 (tdesc_powerpc_isa205_vsx64l): Declare.
2088 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2089 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2090 (ppc_set_pc, ppc_get_hwcap): Adjust.
2091 (ppc_usrregs_info): Forward declare.
2092 (!__powerpc64__) ppc_regmap_adjusted: New global.
2093 (ppc_arch_setup): Adjust to the current process'es target
2095 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2096 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2097 (ppc_store_evrregset): Adjust.
2098 (target_regsets): Rename to ...
2099 (ppc_regsets): ... this, and make static.
2100 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2101 (ppc_regs_info): New function.
2102 (the_low_target): Adjust.
2103 (initialize_low_arch): New function.
2104 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2105 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2106 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2107 (tdesc_s390x_linux64v2): Declare.
2108 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2109 (s390_fill_gregset, s390_store_last_break): Adjust.
2110 (target_regsets): Rename to ...
2111 (s390_regsets): ... this, and make static.
2112 (s390_get_pc, s390_set_pc): Adjust.
2113 (s390_get_hwcap): New target_desc parameter, and use it.
2114 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2115 (s390_arch_setup): Adjust to set the current process'es target
2116 description. Don't adjust the regmap.
2117 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2118 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2119 (regs_info_3264): New globals.
2120 (s390_regs_info): New function.
2121 (the_low_target): Adjust.
2122 (initialize_low_arch): New function.
2123 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2124 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2125 [__mips64] (init_registers_mips_linux)
2126 (init_registers_mips_dsp_linux): Delete defines.
2127 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2128 (have_dsp): New global.
2129 (mips_read_description): New, based on mips_arch_setup.
2130 (mips_arch_setup): Reimplement.
2131 (get_usrregs_info): New function.
2132 (mips_cannot_fetch_register, mips_cannot_store_register)
2133 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2134 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2135 (target_regsets): Rename to ...
2136 (mips_regsets): ... this, and make static.
2137 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2138 (dsp_regs_info, regs_info): New globals.
2139 (mips_regs_info): New function.
2140 (the_low_target): Adjust.
2141 (initialize_low_arch): New function.
2142 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2143 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2145 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2146 (arm_read_description): New, with bits factored from
2148 (arm_arch_setup): Reimplement.
2149 (target_regsets): Rename to ...
2150 (arm_regsets): ... this, and make static.
2151 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2152 (arm_regs_info): New function.
2153 (the_low_target): Adjust.
2154 (initialize_low_arch): New function.
2155 * linux-m68k-low.c (tdesc_m68k): Declare.
2156 (target_regsets): Rename to ...
2157 (m68k_regsets): ... this, and make static.
2158 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2159 (m68k_regs_info): New function.
2160 (m68k_arch_setup): New function.
2161 (the_low_target): Adjust.
2162 (initialize_low_arch): New function.
2163 * linux-sh-low.c (tdesc_sharch): Declare.
2164 (target_regsets): Rename to ...
2165 (sh_regsets): ... this, and make static.
2166 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2167 (sh_regs_info, sh_arch_setup): New functions.
2168 (the_low_target): Adjust.
2169 (initialize_low_arch): New function.
2170 * linux-bfin-low.c (tdesc_bfin): Declare.
2171 (bfin_arch_setup): New function.
2172 (bfin_usrregs_info, regs_info): New globals.
2173 (bfin_regs_info): New function.
2174 (the_low_target): Adjust.
2175 (initialize_low_arch): New function.
2176 * linux-cris-low.c (tdesc_cris): Declare.
2177 (cris_arch_setup): New function.
2178 (cris_usrregs_info, regs_info): New globals.
2179 (cris_regs_info): New function.
2180 (the_low_target): Adjust.
2181 (initialize_low_arch): New function.
2182 * linux-cris-low.c (tdesc_crisv32): Declare.
2183 (cris_arch_setup): New function.
2184 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2185 (cris_regs_info): New function.
2186 (the_low_target): Adjust.
2187 (initialize_low_arch): New function.
2188 * linux-m32r-low.c (tdesc_m32r): Declare.
2189 (m32r_arch_setup): New function.
2190 (m32r_usrregs_info, regs_info): New globals.
2191 (m32r_regs_info): Adjust.
2192 (initialize_low_arch): New function.
2193 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2194 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2195 (tic6x_usrregs_info): Forward declare.
2196 (tic6x_read_description): New function, based on ...
2197 (tic6x_arch_setup): ... this. Reimplement.
2198 (target_regsets): Rename to ...
2199 (tic6x_regsets): ... this, and make static.
2200 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2201 (tic6x_regs_info): New function.
2202 (the_low_target): Adjust.
2203 (initialize_low_arch): New function.
2204 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2205 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2206 (target_regsets): Rename to ...
2207 (xtensa_regsets): ... this, and make static.
2208 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2210 (xtensa_arch_setup, xtensa_regs_info): New functions.
2211 (the_low_target): Adjust.
2212 (initialize_low_arch): New function.
2213 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2214 (nios2_arch_setup): Set the current process'es tdesc.
2215 (target_regsets): Rename to ...
2216 (nios2_regsets): ... this.
2217 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2218 (nios2_regs_info): New function.
2219 (the_low_target): Adjust.
2220 (initialize_low_arch): New function.
2221 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2222 (aarch64_arch_setup): Set the current process'es tdesc.
2223 (target_regsets): Rename to ...
2224 (aarch64_regsets): ... this.
2225 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2226 (aarch64_regs_info): New function.
2227 (the_low_target): Adjust.
2228 (initialize_low_arch): New function.
2229 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2231 (target_regsets): Rename to ...
2232 (tile_regsets): ... this.
2233 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2234 (tile_regs_info): New function.
2235 (tile_arch_setup): Set the current process'es tdesc.
2236 (the_low_target): Adjust.
2237 (initialize_low_arch): New function.
2238 * spu-low.c (tdesc_spu): Declare.
2239 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2240 * win32-arm-low.c (tdesc_arm): Declare.
2241 (arm_arch_setup): New function.
2242 (the_low_target): Install arm_arch_setup instead of
2244 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2245 (init_windows_x86): Rename to ...
2246 (i386_arch_setup): ... this. Set `win32_tdesc'.
2247 (the_low_target): Adjust.
2248 * win32-low.c (win32_tdesc): New global.
2249 (child_add_thread): Don't create the thread cache here.
2250 (do_initial_child_stuff): Set the new process'es tdesc.
2251 * win32-low.h (struct target_desc): Forward declare.
2252 (win32_tdesc): Declare.
2253 * lynx-i386-low.c (tdesc_i386): Declare global.
2254 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2255 * lynx-low.c (lynx_tdesc): New global.
2256 (lynx_add_process): Set the new process'es tdesc.
2257 * lynx-low.h (struct target_desc): Forward declare.
2258 (lynx_tdesc): Declare global.
2259 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2260 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2261 * nto-low.c (nto_tdesc): New global.
2262 (do_attach): Set the new process'es tdesc.
2263 * nto-low.h (struct target_desc): Forward declare.
2264 (nto_tdesc): Declare.
2265 * nto-x86-low.c (tdesc_i386): Declare.
2266 (nto_x86_arch_setup): Set `nto_tdesc'.
2268 2013-06-04 Gary Benson <gbenson@redhat.com>
2270 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2271 to qSupported response when appropriate.
2272 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2273 with nonzero-length annex.
2274 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2275 arguments supplied in annex.
2277 2013-05-31 Doug Evans <dje@google.com>
2280 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2281 64 bits in 64-cross-32 environment.
2283 2013-05-28 Pedro Alves <palves@redhat.com>
2285 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2286 (aarch64-without-fpu.c): Delete rule.
2287 * configure.srv (aarch64*-*-linux*): Remove references to
2288 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2289 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2292 2013-05-24 Pedro Alves <palves@redhat.com>
2294 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2295 instead of strchr/decode_address. Error if the range isn't split
2296 with a ','. Don't assume there's be a ':' in the action.
2298 2013-05-23 Yao Qi <yao@codesourcery.com>
2299 Pedro Alves <palves@redhat.com>
2301 * linux-low.c (lwp_in_step_range): New function.
2302 (linux_wait_1): If the thread was range stepping and stopped
2303 outside the stepping range, report the stop to GDB. Otherwise,
2304 continue stepping. Add range stepping debug output.
2305 (linux_set_resume_request): Copy the step range from the resume
2307 (linux_supports_range_stepping): New.
2308 (linux_target_ops) <supports_range_stepping>: Set to
2309 linux_supports_range_stepping.
2310 * linux-low.h (struct linux_target_ops)
2311 <supports_range_stepping>: New field.
2312 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2313 * linux-x86-low.c (x86_supports_range_stepping): New.
2314 (the_low_target) <supports_range_stepping>: Set to
2315 x86_supports_range_stepping.
2316 * server.c (handle_v_cont): Handle 'r' action.
2317 (handle_v_requests): Append ";r" if the target supports range
2319 * target.h (struct thread_resume) <step_range_start,
2320 step_range_end>: New fields.
2321 (struct target_ops) <supports_range_stepping>:
2323 (target_supports_range_stepping): New macro.
2325 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2327 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2328 confusion in comment.
2330 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2332 * lynx-low.c (struct process_info_private): New type.
2333 (lynx_add_process): New function.
2334 (lynx_create_inferior, lynx_attach): Replace calls to
2335 add_process by calls to lynx_add_process.
2336 (lynx_resume): If PTID is null, then try using
2337 current_process()->private->last_wait_event_ptid.
2339 (lynx_clear_inferiors): Delete. The contents of that function
2340 has been inlined in lynx_mourn;
2341 (lynx_wait_1): Save the ptid in the process's private data.
2342 (lynx_mourn): Free the process' private data. Replace call
2343 to lynx_clear_inferiors by call to clear_inferiors.
2345 2013-05-17 Yao Qi <yao@codesourcery.com>
2347 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2350 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2352 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2353 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2354 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2355 PT_TEXT_END_ADDR guards. Update comments.
2356 (linux_target_op) <read_offsets>: Conditionally define to
2357 linux_read_offsets if the target is UCLIBC and if it defines
2358 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2360 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2361 Andrew Jenner <andrew@codesourcery.com>
2363 * Makefile.in (SFILES): Add linux-nios2-low.c.
2364 (clean): Add action to delete nios2-linux.c.
2365 (nios2-linux.c): New rule.
2366 * configure.srv: Add nios2*-*-linux*.
2367 * linux-nios2-low.c: New.
2369 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2371 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2373 2013-04-25 Hui Zhu <hui@codesourcery.com>
2376 * ax.c (ax_printf): Add fflush.
2378 2013-04-22 Tom Tromey <tromey@redhat.com>
2380 * Makefile.in (SFILES): Add filestuff.c.
2381 (OBS): Add filestuff.o.
2382 (filestuff.o): New target.
2383 * config.in, configure: Rebuild.
2384 * configure.ac: Check for fdwalk, pipe2.
2386 2013-04-17 Pedro Alves <palves@redhat.com>
2388 * configure.ac (USE_THREAD_DB): Delete variable.
2389 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2390 Don't AC_SUBST USE_THREAD_DB.
2391 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2392 * config.in, configure: Regenerate.
2394 2013-04-16 Pedro Alves <palves@redhat.com>
2396 * linux-low.h (struct lwp_info) <thread_known>: Move under
2397 the USE_THREAD_DB #ifdef.
2399 2013-04-16 Pedro Alves <palves@redhat.com>
2401 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2402 (linux-low.o): Delete rule.
2403 * linux-low.h: Always include "gdb_thread_db.h" instead of
2404 conditionally including thread_db.h.
2405 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2408 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2410 * Makefile.in (install-only): Fix make install regression.
2412 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2414 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2415 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2417 * gdbserver.1: Remove.
2419 2013-03-22 Pedro Alves <palves@redhat.com>
2421 * linux-low.c (handle_extended_wait): Don't call
2422 linux_enable_event_reporting.
2424 2013-03-15 Tony Theodore <tonyt@logyst.com>
2427 * Makefile.in (SHELL): Use @SHELL@.
2429 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2431 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2434 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2436 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2437 Remove extraneous NULL element.
2439 2013-03-13 Yao Qi <yao@codesourcery.com>
2441 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2442 'V' block in trace frame.
2444 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2446 * target.h (struct target_ops): Add btrace ops.
2447 (target_supports_btrace): New macro.
2448 (target_enable_btrace): New macro.
2449 (target_disable_btrace): New macro.
2450 (target_read_btrace): New macro.
2451 * gdbthread.h (struct thread_info): Add btrace field.
2452 * server.c: Include btrace-common.h.
2453 (handle_btrace_general_set): New function.
2454 (handle_btrace_enable): New function.
2455 (handle_btrace_disable): New function.
2456 (handle_general_set): Call handle_btrace_general_set.
2457 (handle_qxfer_btrace): New function.
2458 (struct qxfer qxfer_packets[]): Add btrace entry.
2459 * inferiors.c (remove_thread): Disable btrace.
2460 * linux-low: Include linux-btrace.h.
2461 (linux_low_enable_btrace): New function.
2462 (linux_low_read_btrace): New function.
2463 (linux_target_ops): Add btrace ops.
2464 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2465 Add srv_linux_btrace=yes.
2466 (x86_64-*-linux*): Add linux-btrace.o.
2467 Add srv_linux_btrace=yes.
2468 * configure.ac: Define HAVE_LINUX_BTRACE.
2469 * config.in: Regenerated.
2470 * configure: Regenerated.
2472 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2474 * server.c (handle_qxfer): Preserve error message if -3 is
2476 (qxfer): Document the -3 return value.
2478 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2480 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2481 (linux_btrace_h): New variable.
2482 (linux-btrace.o): New rule.
2484 2013-03-08 Stan Shebs <stan@codesourcery.com>
2485 Hafiz Abid Qadeer <abidh@codesourcery.com>
2487 * tracepoint.c (trace_buffer_size): New global.
2488 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2489 (init_trace_buffer): Change to one-argument function. Allocate
2490 trace buffer memory.
2491 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2492 handle QTBuffer:size packet.
2493 (cmd_bigqtbuffer_size): New function.
2494 (initialize_tracepoint): Call init_trace_buffer with
2495 DEFAULT_TRACE_BUFFER_SIZE.
2496 * server.c (handle_query): Add QTBuffer:size in the
2499 2013-03-07 Yao Qi <yao@codesourcery.com>
2501 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2502 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2504 (cmd_qtsp): Adjust condition. Do post increment.
2505 Set cur_action and cur_step_action back to 0.
2507 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2510 * linux-low.c (linux_write_memory): Return early success if LEN is
2513 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2515 * configure.srv: Add x86_64-*-cygwin* as target.
2517 2013-02-28 Tom Tromey <tromey@redhat.com>
2519 * configure.ac: Invoke AC_SYS_LARGEFILE.
2520 * configure, config.in: Rebuild.
2522 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2524 * win32-low.c: Throughout, fix format strings and casts of
2525 printf-like functions to avoid type related warnings on all
2527 (get_child_debug_event): Print dwDebugEventCode as hex since
2528 that's how it's usually documented.
2530 2013-02-28 Yao Qi <yao@codesourcery.com>
2532 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2535 2013-02-27 Jiong Wang <jiwang@tilera.com>
2537 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2538 (reg-tilegx32.c): New rule.
2539 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2540 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2541 different register info initializer according to elf class.
2542 (init_registers_tilgx32): New function. The tilegx32 register info
2544 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2545 (tile_store_gregset): Likewise.
2547 2013-02-27 Yao Qi <yao@codesourcery.com>
2549 * server.c (process_point_options): Print debug message when
2550 debug_threads is true.
2552 2013-02-26 Yao Qi <yao@codesourcery.com>
2554 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2556 2013-02-19 Pedro Alves <palves@redhat.com>
2557 Kai Tietz <ktietz@redhat.com>
2561 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2562 instead of strtoul to extract address from packet.
2563 (process_serial_event) <'z'>: Likewise.
2565 2013-02-18 Yao Qi <yao@codesourcery.com>
2567 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2569 2013-02-14 Pedro Alves <palves@redhat.com>
2573 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2574 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2576 2013-02-14 Pedro Alves <palves@redhat.com>
2578 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2580 2013-02-14 Pedro Alves <palves@redhat.com>
2582 * tracepoint.c (save_string): Delete.
2583 (add_tracepoint_action): Use savestring instead of save_string.
2585 2013-02-12 Pedro Alves <palves@redhat.com>
2587 * linux-xtensa-low.c: Ditto.
2588 * xtensa-xtregs.c: Ditto.
2590 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2592 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2595 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2597 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2598 aarch64_num_wp_regs and aarch64_num_bp_regs to
2599 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2601 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2603 * linux-aarch64-low.c (ps_get_thread_area): Replace
2604 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2606 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2607 Marcus Shawcroft <marcus.shawcroft@arm.com>
2608 Nigel Stephens <nigel.stephens@arm.com>
2609 Yufeng Zhang <yufeng.zhang@arm.com>
2611 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2612 (aarch64.c, aarch64-without-fpu.c): New targets.
2613 * configure.srv (aarch64*-*-linux*): New.
2614 * linux-aarch64-low.c: New file.
2616 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2618 * linux-low.c (handle_extended_wait, linux_create_inferior)
2619 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2620 (dequeue_one_deferred_signal, linux_resume_one_thread)
2621 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2622 (linux_tracefork_grandchild, linux_test_for_tracefork)
2623 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2624 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2625 where the argument is 0.
2627 2013-01-25 Yao Qi <yao@codesourcery.com>
2629 * event-loop.c: Include "queue.h".
2630 (gdb_event_p): New typedef.
2631 (struct gdb_event) <next_event>: Remove.
2632 (event_queue): Change to QUEUE(gdb_event_p).
2633 (async_queue_event): Remove.
2634 (gdb_event_xfree): New.
2635 (initialize_event_loop): New.
2636 (process_event): Use API from QUEUE.
2637 (wait_for_event): Likewise.
2638 * server.c (main): Call initialize_event_loop.
2639 * server.h (initialize_event_loop): Declare.
2641 2013-01-18 Yao Qi <yao@codesourcery.com>
2643 * ax.h (struct eval_agent_expr_context): New.
2644 (gdb_eval_agent_expr): Update declaration.
2645 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2646 TFRAME. Add new argument CTX.
2647 * server.h (struct eval_agent_expr_context): Declare.
2648 (agent_mem_read, agent_tsv_read): Update declaration.
2649 (agent_mem_read_string): Likewise.
2650 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2651 (add_traceframe_block): Add new argument TPOINT.
2652 Increase TPOINT->traceframe_usage.
2653 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2654 eval_tracepoint_agent_expr.
2655 (condition_true_at_tracepoint): Likewise.
2656 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2657 (agent_mem_read_string, agent_tsv_read): Likewise.
2659 2013-01-16 Yao Qi <yao@codesourcery.com>
2661 * linux-low.c (linux_resume_one_lwp): Don't check
2662 'lwp->bp_reinsert != 0'.
2664 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2665 Pedro Alves <palves@redhat.com>
2667 * lynx-low.c (ptrace_request_to_str): Define a temporary
2668 macro and use it to simplify this function's implementation.
2670 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2672 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2675 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2677 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2679 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2681 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2683 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2685 * lynx-low.c (lynx_resume): Use the resume_info parameter
2686 to determine the ptid for the lynx_ptrace call, unless
2687 it is equal to minus_one_ptid, in which case we use the
2688 ptid of the current_inferior.
2689 (lynx_wait_1): After having received a thread create/exit
2690 event, resume the inferior's execution using the signaling
2691 thread's ptid, rather than the old ptid.
2693 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2695 * lynx-low.c (lynx_resume): Delete variable ret.
2697 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2699 * gdbreplay.c (gdbreplay_version): Update copyright year.
2700 * server.c (gdbserver_version): Likewise.
2702 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2704 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2707 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2709 * lynx-low.c (ptrace_request_to_str): Add handling for
2712 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2714 * lynx-low.c (lynx_attach): Delete variable new_process.
2716 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2718 * lynx-low.c (lynx_create_inferior): Delete variable
2721 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2723 * lynx-low.c (ptrace_request_to_str): Do not handle
2724 PTRACE_GETTHREADLIST if this macro does not exist.
2726 2012-12-15 Yao Qi <yao@codesourcery.com>
2728 * Makefile.in (OBS): Add notif.o.
2729 * notif.c, notif.h: New.
2730 * server.c: Include "notif.h".
2731 (struct vstop_notif) <next>: Remove.
2733 (queue_stop_reply): Update.
2734 (push_event, send_next_stop_reply): Remove.
2735 (discard_queued_stop_replies): Update.
2736 (notif_stop): New variable.
2737 (handle_v_stopped): Remove.
2738 (handle_v_requests): Don't call handle_v_stopped. Call
2739 handle_ack_notif instead.
2740 (queue_stop_reply_callback): Call notif_event_enque instead
2741 of queue_stop_reply.
2742 (handle_status): Don't call send_next_stop_reply, call
2743 notif_write_event instead.
2744 (kill_inferior_callback): Likewise.
2745 (detach_or_kill_inferior_callback): Likewise.
2746 (main): Call initialize_notif.
2747 (process_serial_event): Call QUEUE_is_empty.
2748 (handle_target_event): Call notif_push instead of push event.
2749 * server.h (push_event): Remove declaration.
2751 2012-12-10 Tom Tromey <tromey@redhat.com>
2753 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2754 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2757 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2758 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2759 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2760 (amd64-linux-ipa.o, ax.o): Rewrite.
2761 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2762 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2763 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2764 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2765 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2766 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2767 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2768 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2769 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2770 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2771 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2772 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2773 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2774 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2775 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2776 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2777 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2778 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2779 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2780 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2781 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2782 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2783 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2784 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2785 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2786 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2787 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2788 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2789 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2790 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2791 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2792 (reg-tilegx.o): Remove.
2793 (all_object_files): New macro.
2794 Include .deps files.
2795 * aclocal.m4, configure: Rebuild.
2796 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2797 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2798 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2800 2012-12-05 Tom Tromey <tromey@redhat.com>
2803 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2805 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2807 * configure.ac: Check for linux/perf_event.h.
2808 * config.in: Regenerated.
2809 * configure: Regenerated.
2811 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2813 * hostio.c (handle_readlink): Decrease buffer size
2814 parameter passed to readlink by one byte.
2816 2012-11-26 Yao Qi <yao@codesourcery.com>
2818 * configure.ac (build_warnings): Append '-Wempty-body'.
2819 * configure: Regenerated.
2820 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2823 2012-11-15 Pierre Muller <muller@sourceware.org>
2825 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2826 * config.in: Regenerate.
2827 * configure: Regenerate.
2828 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2829 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2830 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2831 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2833 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2834 instead of <sys/wait.h> header.
2835 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2837 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
2839 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2840 (various make rules): Remove -DGDBSERVER
2842 2012-11-09 Yao Qi <yao@codesourcery.com>
2844 * spu-low.c (current_ptid): Move it to ..
2845 * gdbthread.h: ... here. New.
2846 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2847 * server.c (myresume, process_serial_event): Likewise.
2848 * thread-db.c (thread_db_find_new_threads): Likewise.
2849 * tracepoint.c (run_inferior_command): Likewise.
2851 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
2853 * server.c (handle_search_memory_1): Include access length in
2856 2012-09-05 Michael Brandt <michael.brandt@axis.com>
2858 * linux-crisv32-low.c: Fix compile errors.
2860 2012-09-04 Yao Qi <yao@codesourcery.com>
2862 * tracepoint.c (cmd_qtsv): Adjust debug message.
2863 Don't check CUR_TPOINT.
2865 2012-08-28 Yao Qi <yao@codesourcery.com>
2867 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2868 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2869 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2870 Remove declarations of xmalloc, xreallloc, xstrdup and
2872 * Makefile.in (libiberty_h): New.
2873 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2874 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2876 2012-08-23 Yao Qi <yao@codesourcery.com>
2878 * server.h: Remove declaration of 'xsnprintf'.
2880 2012-08-22 Keith Seitz <keiths@redhat.com>
2882 * server.h: Include build-gnulib-gbserver/config.h.
2883 * gdbreplay.c: Likewise.
2885 2012-08-08 Doug Evans <dje@google.com>
2887 * Makefile.in (SFILES): Add gdb_vecs.c.
2888 (OBS): Add gdb_vecs.o.
2889 (gdb_vecs_h, host_defs_h): New variables.
2890 (thread-db.o): Add $(gdb_vecs_h) dependency.
2891 (gdb_vecs.o): New rule.
2892 * thread-db.c: #include "gdb_vecs.h".
2893 (thread_db_load_search): Use a vector to iterate over path elements.
2894 Handle text appearing after "$pdir".
2896 * configure.ac: Add check for strstr.
2897 * config.in: Regenerate.
2898 * configure: Regenerate.
2900 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2902 * hostio.c (handle_pread): If pread fails, fall back to attempting
2904 (handle_pwrite): Likewise for pwrite.
2906 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2908 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2909 between unsupported TYPE and unimplementable ADDR/LEN combination.
2910 (arm_insert_point): Act on new return value.
2912 2012-07-31 Pedro Alves <palves@redhat.com>
2914 * server.c (process_point_options): Only skip tokens if we find
2915 one that is unrecognized. Don't treat 'X' specially while
2916 skipping unrecognized tokens.
2918 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2920 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2921 to 4-byte-align HW breakpoint addresses for Thumb.
2923 2012-07-27 Yao Qi <yao@codesourcery.com>
2927 * server.h: Declare gdb_agent_about_to_close.
2928 * target.c (kill_inferior): Include "agent.h".
2929 New. Send command 'kill'.
2930 * target.h (kill_inferior): Removed macro.
2931 * tracepoint.c (gdb_agent_about_to_close): New.
2932 (gdb_agent_helper_thread): Handle command 'close'.
2933 Wait endlessly until the inferior stops.
2934 Install gdb_agent_remove_socket to atexit hook.
2935 (agent_socket_name): New static variable.
2936 (gdb_agent_socket_init): Replace local variable 'name' with
2937 'agent_socket_name'.
2938 (gdb_agent_remove_socket): New.
2940 2012-07-27 Yao Qi <yao@codesourcery.com>
2942 * server.c (process_point_options): Stop at 'X' when parsing.
2944 2012-07-19 Michael Eager <eager@eagercon.com>
2946 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
2948 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2949 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2950 hardware breakpoint.
2952 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2954 * gdbserver/linux-low.c (initialize_low): Call
2955 linux_ptrace_init_warnings.
2957 2012-07-02 Doug Evans <dje@google.com>
2959 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2962 2012-07-02 Stan Shebs <stan@codesourcery.com>
2964 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2965 (ax.o): Add it to build rule.
2967 (OBS): Add format.o.
2968 (IPA_OBS): Add format.o.
2969 * server.c (handle_query): Claim support for breakpoint commands.
2970 (process_point_options): Add command case.
2971 (process_serial_event): Leave running if there are printfs in
2973 * mem-break.h (any_persistent_commands): Declare.
2974 (add_breakpoint_commands): Declare.
2975 (gdb_no_commands_at_breakpoint): Declare.
2976 (run_breakpoint_commands): Declare.
2977 * mem-break.c (struct point_command_list): New struct.
2978 (struct breakpoint): New field command_list.
2979 (any_persistent_commands): New function.
2980 (add_commands_to_breakpoint): New function.
2981 (add_breakpoint_commands): New function.
2982 (gdb_no_commands_at_breakpoint): New function.
2983 (run_breakpoint_commands): New function.
2984 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2986 * ax.c: Include format.h.
2987 (ax_printf): New function.
2988 (gdb_eval_agent_expr): Add printf opcode.
2990 2012-06-13 Yao Qi <yao@codesourcery.com>
2992 * server.c (start_inferior): Remove duplicated writes to fields
2993 'last_resume_kind' and 'last_status' of 'current_inferior'.
2995 2012-06-12 Yao Qi <yao@codesourcery.com>
2996 Pedro Alves <palves@redhat.com>
2998 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3000 * server.c (handle_v_cont): Extend comment.
3002 2012-06-11 Yao Qi <yao@codesourcery.com>
3004 * linux-low.c (linux_attach): Add 'static'.
3006 2012-06-06 Yao Qi <yao@codesourcery.com>
3008 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3010 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3012 Fix gcc -flto compilation warning.
3013 * server.c (main): Make variable multi_mode and attach volatile.
3015 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3017 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3018 if the platform doesn't know about it.
3020 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3022 * Makefile.in (SFILES): Add linux-tile-low.c.
3023 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3024 * configure.srv: Handle tilegx-*-linux*.
3025 * linux-tile-low.c: New file.
3027 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3029 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3031 2012-05-24 Pedro Alves <palves@redhat.com>
3035 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3037 2012-05-24 Pedro Alves <palves@redhat.com>
3041 Replace target_signal with gdb_signal throughout.
3043 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3045 * linux-low.c (linux_store_registers): Avoid the copying sequence
3046 when no data has been retrieved by ptrace.
3048 2012-05-22 Will Deacon <will.deacon@arm.com>
3050 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3051 Include asm/ptrace.h.
3052 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3055 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3057 * linux-low.c (linux_store_registers): Don't re-retrieve data
3058 with ptrace that has already been obtained from /proc. Always
3059 copy any data retrieved with ptrace to the buffer supplied.
3061 2012-05-11 Yao Qi <yao@codesourcery.com>
3062 Pedro Alves <palves@redhat.com>
3064 * linux-low.c (enum stopping_threads_kind): New.
3065 (stopping_threads): Change type to `enum stopping_threads_kind'.
3066 (handle_extended_wait): If stopping and suspending threads, leave
3067 the new_lwp suspended too.
3068 (linux_wait_for_event): Adjust.
3069 (stop_all_lwps): Set `stopping_threads' to
3070 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3071 whether we're suspending threads or just stopping them. Assert no
3074 2012-04-29 Yao Qi <yao@codesourcery.com>
3076 * server.h: Move some code to ...
3077 * gdbthread.h: ... here. New.
3078 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3079 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3080 (nto-low.o, win32-low.o): Likewise.
3081 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3082 * regcache.c, remote-utils.c, server.c: Likewise.
3083 * target.c, tracepoint.c, win32-low.c: Likewise.
3085 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3087 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3088 (PTRACE_ARG4_TYPE): Likewise.
3089 (PTRACE_XFER_TYPE): Likewise.
3090 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3091 ptrace to PTRACE_ARG3_TYPE.
3092 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3093 (PTRACE_ARG4_TYPE): Likewise.
3094 (PTRACE_XFER_TYPE): Likewise.
3095 (linux_detach_one_lwp): Cast fourth argument of
3096 ptrace to long then PTRACE_ARG4_TYPE.
3097 (regsets_fetch_inferior_registers): Cast third argument of
3098 ptrace to long then PTRACE_ARG3_TYPE.
3099 (regsets_store_inferior_registers): Likewise.
3101 2012-04-20 Pedro Alves <palves@redhat.com>
3103 * configure: Regenerate.
3105 2012-04-19 Pedro Alves <palves@redhat.com>
3107 * Makefile.in (GNULIB_BUILDDIR): New.
3108 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3109 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3110 (all, install-only, uninstall, clean-info, all-lib, clean): No
3111 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3112 (maintainer-clean realclean distclean): Use subdir_do.
3114 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3115 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3116 * acinclude.m4: Include acx_configure_dir.m4.
3117 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3118 calls. Call AC_PROG_RANLIB. Configure gnulib using
3121 (GNULIB_STDINT_H): Adjust.
3122 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3123 * gdbreplay.c: Include build-gnulib/config.h.
3124 * server.h: Likewise.
3125 * aclocal.m4: Regenerate.
3126 * config.in: Regenerate.
3127 * configure: Regenerate.
3129 2012-04-19 Pedro Alves <palves@redhat.com>
3131 * Makefile.in (LIBGNU, INCGNU): Adjust.
3132 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3133 (all, install-only, uninstall, clean-info, all-lib, clean)
3134 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3135 * configure.ac: Adjust AC_OUTPUT output.
3136 * aclocal.m4: Regenerate.
3137 * configure: Regenerate.
3139 2012-04-19 Pedro Alves <palves@redhat.com>
3141 * Makefile.in (generated_files): New.
3142 (server_h): Remove the explicit dependency on config.h, and depend
3143 on $generated_files.
3145 2012-04-19 Pedro Alves <palves@redhat.com>
3147 * Makefile.in (INCGNU): Add -Ignulib.
3149 2012-04-19 Pedro Alves <palves@redhat.com>
3151 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3152 (INCGNU): ... this, and spell out -I here.
3153 (GNULIB_LIB): Rename to ...
3155 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3157 2012-04-19 Pedro Alves <palves@redhat.com>
3159 * config.in: Regenerate.
3161 2012-04-19 Pedro Alves <palves@redhat.com>
3163 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3164 * server.h (memmem): Remove declaration.
3165 * config.in: Regenerate.
3166 * configure: Regenerate.
3168 2012-04-19 Yao Qi <yao@codesourcery.com>
3170 * Makefile.in (SFILES): Add common/vec.c.
3174 2012-04-19 Yao Qi <yao@codesourcery.com>
3176 * remote-utils.c (prepare_resume_reply): Replace with macro
3177 target_core_of_thread.
3178 * server.c (handle_qxfer_threads_proper): Likewise.
3179 * target.h (traget_core_of_thread): New macro.
3181 2012-04-18 Pedro Alves <palves@redhat.com>
3183 * aclocal.m4: Regenerate.
3184 * configure: Regenerate.
3186 2012-04-16 Yao Qi <yao@codesourcery.com>
3188 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3189 duplicated on address.
3191 2012-04-16 Yao Qi <yao@codesourcery.com>
3193 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3194 (struct tracepoint_action_ops) <send>: New field.
3195 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3196 (agent_expr_send, x_tracepoint_action_send): New.
3197 (l_tracepoint_action_send): New.
3198 (cmd_qtdp): Download and install tracepoint
3199 according to `use_agent'.
3200 (run_inferior_command): Add one more parameter `len'.
3202 (tracepoint_send_agent): New.
3203 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3205 2012-04-16 Yao Qi <yao@codesourcery.com>
3207 * tracepoint.c (download_tracepoints): Moved to ...
3208 (cmd_qtstart): ... here.
3210 2012-04-14 Yao Qi <yao@codesourcery.com>
3212 * tracepoint.c: Include inttypes.h.
3213 (struct collect_memory_action): Use sized types.
3214 (struct tracepoint): Likewise.
3215 (cmd_qtdp, stop_tracing): Update print specifiers.
3216 (cmd_qtp, response_tracepoint): Likewise.
3217 (collect_data_at_tracepoint): Likewise.
3218 (collect_data_at_step): Likewise.
3220 2012-04-14 Yao Qi <yao@codesourcery.com>
3222 Import gnulib module inttypes.
3223 * aclocal.m4, config.in, configure: Regenerated.
3225 2012-04-14 Yao Qi <yao@codesourcery.com>
3227 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3228 Makefile and config.status at last.
3230 2012-04-13 Yao Qi <yao@codesourcery.com>
3232 * tracepoint.c: Include stdint.h unconditionally.
3234 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3236 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3237 on BFD_HAVE_SYS_PROCFS_TYPE.
3238 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3239 * configure: Regenerate.
3240 * config.in: Likewise.
3242 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3244 * Makefile.in (clean): Also remove x32.c x32-linux.c
3245 x32-avx.c x32-avx-linux.c.
3246 (x32.o): New target.
3248 (x32-linux.o): Likewise.
3249 (x32-linux.c): Likewise.
3250 (x32-avx.o): Likewise.
3251 (x32-avx.c): Likewise.
3252 (x32-avx-linux.o): Likewise.
3253 (x32-avx-linux.c): Likewise.
3255 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3256 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3257 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3258 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3259 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3260 i386/x32-avx-linux.xml.
3262 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3263 (init_registers_x32_avx_linux): Likwise.
3264 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3265 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3267 2012-04-13 Pedro Alves <palves@redhat.com>
3269 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3270 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3271 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3272 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3275 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3277 * linux-x86-low.c (compat_x32_clock_t): New.
3278 (compat_x32_siginfo_t): Likewise.
3279 (compat_x32_siginfo_from_siginfo): Likewise.
3280 (siginfo_from_compat_x32_siginfo): Likewise.
3281 (linux_is_elf64): Likewise.
3282 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3283 and siginfo_from_compat_x32_siginfo for x32.
3284 (x86_arch_setup): Set linux_is_elf64.
3286 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3289 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3291 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3292 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3293 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3294 compatible with process.
3296 2012-04-12 Yao Qi <yao@codesourcery.com>
3298 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3299 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3300 (install-only, install-info, clean): Handle sub dir gnulib.
3301 (all-lib, am--refresh): New targets.
3302 (memmem.o): Remove target.
3303 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3304 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3305 (AC_REPLACE_FUNCS): Remove memmem.
3306 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3307 (AC_OUTPUT): Generate Makefile in gnulib/.
3308 * aclocal.m4, config.in, configure: Regenerated.
3310 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3312 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3314 2012-04-05 Pedro Alves <palves@redhat.com>
3316 -Werror=strict-aliasing
3318 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3321 2012-04-04 Pedro Alves <palves@redhat.com>
3323 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3324 (sparc_store_gregset_from_stack, sparc_store_gregset)
3325 (sparc_breakpoint_at): Fix formatting.
3327 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3329 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3331 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3332 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3333 * config.in: Regenerate.
3334 * configure: Likewise.
3336 2012-03-29 Pedro Alves <palves@redhat.com>
3338 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3339 Correct ptrace arguments.
3341 2012-03-28 Pedro Alves <palves@redhat.com>
3343 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3344 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3345 (IA64_FR1_REGNUM): New defines.
3346 (ia64_fetch_register): New.
3347 (the_low_target): Install it.
3348 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3350 * linux-low.c (linux_fetch_registers): Try the
3351 the_low_target.fetch_register hook first.
3353 * linux-arm-low.c (the_low_target): Adjust.
3354 * linux-bfin-low.c (the_low_target): Adjust.
3355 * linux-cris-low.c (the_low_target): Adjust.
3356 * linux-crisv32-low.c (the_low_target): Adjust.
3357 * linux-m32r-low.c (the_low_target): Adjust.
3358 * linux-m68k-low.c (the_low_target): Adjust.
3359 * linux-mips-low.c (the_low_target): Adjust.
3360 * linux-ppc-low.c (the_low_target): Adjust.
3361 * linux-s390-low.c (the_low_target): Adjust.
3362 * linux-sh-low.c (the_low_target): Adjust.
3363 * linux-sparc-low.c (the_low_target): Adjust.
3364 * linux-tic6x-low.c (the_low_target): Adjust.
3365 * linux-x86-low.c (the_low_target): Adjust.
3366 * linux-xtensa-low.c (the_low_target): Adjust.
3368 2012-03-26 Pedro Alves <palves@redhat.com>
3370 * server.c (handle_qxfer_libraries): Don't bail early if
3371 the_target->qxfer_libraries_svr4 is not NULL.
3373 2012-03-26 Pedro Alves <palves@redhat.com>
3375 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3377 2012-03-23 Pedro Alves <palves@redhat.com>
3379 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3380 "library-list-svr4" element's start tag when the the DSO list is
3383 2012-03-23 Pedro Alves <palves@redhat.com>
3385 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3386 a variable whose type size is the same as the inferior's pointer
3389 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3391 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3393 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3394 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3395 * linux-low.h: Include <signal.h>.
3396 (struct siginfo): Remove forward declaration.
3397 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3400 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3402 * .gitignore: Ignore more files.
3404 2012-03-19 Pedro Alves <palves@redhat.com>
3405 Jan Kratochvil <jan.kratochvil@redhat.com>
3407 * server.c (cont_thread, general_thread): Add describing comments.
3408 (start_inferior): Clear `cont_thread'.
3409 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3412 2012-03-15 Yao Qi <yao@codesourcery.com>
3414 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3416 (cmd_qtdp): ... here.
3418 2012-03-15 Yao Qi <yao@codesourcery.com>
3420 * tracepoint.c (struct tracepoint_action_ops): New.
3421 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3422 (m_tracepoint_action_download): New.
3423 (r_tracepoint_action_download): New.
3424 (x_tracepoint_action_download): New.
3425 (l_tracepoint_action_download): New.
3426 (add_tracepoint_action): Install `action->ops' according type.
3427 (download_tracepoint_1): Move code `download' function pointer
3428 of various tracepoint_action_ops.
3430 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3432 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3433 linux_ptrace_attach_warnings.
3435 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3437 * Makefile.in (linux-ptrace.o): New.
3438 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3439 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3440 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3441 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3442 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3444 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3446 2012-03-08 Yao Qi <yao@codesourcery.com>
3447 Pedro Alves <palves@redhat.com>
3449 Fix PR server/13392.
3450 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3452 * tracepoint.c (remove_tracepoint): New.
3453 (cmd_qtdp): Call remove_tracepoint when failed to install.
3455 2012-03-07 Pedro Alves <palves@redhat.com>
3457 * linux-low.c (get_detach_signal): New.
3458 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3459 Pass on pending signals to PTRACE_DETACH. Check the result of the
3461 * server.c (program_signals, program_signals_p): New.
3462 (handle_general_set): Handle QProgramSignals.
3463 * server.h (program_signals, program_signals_p): Declare.
3465 2012-03-05 Pedro Alves <palves@redhat.com>
3466 Jan Kratochvil <jan.kratochvil@redhat.com>
3468 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3471 2012-03-03 Yao Qi <yao@codesourcery.com>
3473 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3474 agent_look_up_symbols.
3476 2012-03-03 Yao Qi <yao@codesourcery.com>
3478 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3479 (linux-x86-low.o): Likewise.
3480 * server.h: Remove in_process_agent_loaded.
3481 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3485 2012-03-03 Yao Qi <yao@codesourcery.com>
3487 * tracepoint.c (gdb_agent_capability): New global.
3488 (in_process_agent_loaded_ust): Renamed to
3489 `in_process_agent_supports_ust'.
3491 (in_process_agent_supports_ust): Call agent_capability_check.
3492 (clear_installed_tracepoints): Assert that agent supports
3495 2012-03-03 Yao Qi <yao@codesourcery.com>
3497 * linux-low.c (linux_supports_agent): New.
3498 (linux_target_ops): Initialize field `supports_agent' with
3499 linux_supports_agent.
3500 * target.h (struct target_ops) <supports_agent>: New.
3501 (target_supports_agent): New macro.
3502 * server.c (handle_general_set): Handle packet 'QAgent'.
3503 (handle_query): Send `QAgent+'.
3504 * Makefile.in (server.o): Depends on agent.h.
3506 2012-03-03 Yao Qi <yao@codesourcery.com>
3508 * Makefile.in (OBS): Add agent.o.
3509 Add new rule for agent.o.
3510 Track dependence of tracepoint.c on agent.h.
3511 * tracepoint.c (run_inferior_command_1):
3512 (run_inferior_command): Call agent_run_command.
3513 (gdb_ust_connect_sync_socket): Deleted. Move it to
3515 (resume_thread, stop_thread): Likewise.
3516 (gdb_ust_socket_init): Renamed to ...
3517 (gdb_agent_socket_init): ... New.
3518 (gdb_ust_thread): Renamed to ...
3519 (gdb_agent_helper_thread): ... New.
3520 (gdb_ust_init): Move some code to ...
3521 (gdb_agent_init): ... here. New.
3522 [HAVE_UST]: Call gdb_ust_init.
3523 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3524 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3525 * config.in, configure: Regenerated.
3527 2012-03-02 Pedro Alves <palves@redhat.com>
3529 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3530 * linux-low.c (struct simple_pid_list): New.
3531 (stopped_pids): New a struct simple_pid_list pointer.
3532 (add_to_pid_list, pull_pid_from_list): New.
3533 (handle_extended_wait): Don't assume the first signal new children
3534 report is SIGSTOP. Adjust call to pull_pid_from_list.
3535 (linux_wait_for_lwp): Adjust.
3537 2012-03-02 Yao Qi <yao@codesourcery.com>
3539 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3542 2012-03-02 Yao Qi <yao@codesourcery.com>
3544 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3545 `stop_pc' and `tpoint'. Update caller.
3547 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3549 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3550 * linux-low.c (use_linux_regsets): New macro.
3551 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3552 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3553 (linux_register_in_regsets): New function.
3554 (usr_fetch_inferior_registers): Skip registers covered by
3556 (usr_store_inferior_registers): Likewise.
3557 (usr_fetch_inferior_registers): New macro.
3558 (usr_store_inferior_registers): Likewise.
3559 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3560 (linux_store_registers): Likewise.
3561 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3563 (init_registers_mips64_dsp_linux): Likewise.
3564 (init_registers_mips_linux): New macro.
3565 (init_registers_mips_dsp_linux): Likewise.
3566 (mips_dsp_num_regs): Likewise.
3567 (DSP_BASE, DSP_CONTROL): New fallback macros.
3568 (mips_base_regs): New macro.
3569 (mips_regmap): Use it. Fix the size.
3570 (mips_dsp_regmap): New variable.
3571 (mips_dsp_regset_bitmap): Likewise.
3572 (mips_arch_setup): New function.
3573 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3575 (mips_cannot_store_register): Likewise.
3576 (the_low_target): Update .arch_setup, .num_regs and .regmap
3577 initializers. Add .regset_bitmap initializer.
3578 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3580 * linux-bfin-low.c (the_low_target): Likewise.
3581 * linux-cris-low.c (the_low_target): Likewise.
3582 * linux-crisv32-low.c (the_low_target): Likewise.
3583 * linux-ia64-low.c (the_low_target): Likewise.
3584 * linux-m32r-low.c (the_low_target): Likewise.
3585 * linux-m68k-low.c (the_low_target): Likewise.
3586 * linux-ppc-low.c (the_low_target): Likewise.
3587 * linux-s390-low.c (the_low_target): Likewise.
3588 * linux-sh-low.c (the_low_target): Likewise.
3589 * linux-sparc-low.c (the_low_target): Likewise.
3590 * linux-tic6x-low.c (the_low_target): Likewise.
3591 * linux-x86-low.c (the_low_target): Likewise.
3592 * linux-xtensa-low.c (the_low_target): Likewise.
3593 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3594 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3595 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3597 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3598 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3600 2012-02-29 Yao Qi <yao@codesourcery.com>
3601 Pedro Alves <palves@redhat.com>
3603 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3604 `step_over_finished' is true.
3606 2012-02-27 Pedro Alves <palves@redhat.com>
3608 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3609 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3611 2012-02-27 Pedro Alves <palves@redhat.com>
3614 * linux-low.c (pid_is_stopped): New.
3615 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3617 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3619 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3622 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3624 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3626 2012-02-24 Luis Machado <lgustavo@codesourcery>
3628 * server.c (handle_query): Advertise support for target-side
3629 breakpoint condition evaluation.
3630 (process_point_options): New function.
3631 (process_serial_event): When inserting a breakpoint, check for
3632 a target-side condition that should be evaluated.
3634 * mem-break.c: Include regcache.h and ax.h.
3635 (point_cond_list_t): New data structure.
3636 (breakpoint) <cond_list>: New field.
3637 (find_gdb_breakpoint_at): Make non-static.
3638 (delete_gdb_breakpoint_at): Clear any target-side
3640 (clear_gdb_breakpoint_conditions): New function.
3641 (add_condition_to_breakpoint): Likewise.
3642 (add_breakpoint_condition): Likewise.
3643 (gdb_condition_true_at_breakpoint): Likewise.
3644 (gdb_breakpoint_here): Return result directly instead
3645 of going through a local variable.
3647 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3648 (clear_gdb_breakpoint_conditions): Likewise.
3649 (add_breakpoint_condition): Likewise.
3650 (gdb_condition_true_at_breakpoint): Likewise.
3652 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3653 (need_step_over_p): Take target-side breakpoint condition into
3656 2012-02-24 Luis Machado <lgustavo@codesourcery>
3658 * server.h: Include tracepoint.h.
3659 (agent_mem_read, agent_get_trace_state_variable_value,
3660 agent_set_trace_state_variable_value,
3661 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3662 get_set_tsv_func_addr): New prototypes.
3664 * ax.h: New include file.
3665 * ax.c: New source file.
3667 * tracepoint.c: Include ax.h.
3668 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3669 agent_expr, eval_result_type): Move to ax.h.
3670 (parse_agent_expr): Rename to ...
3671 (gdb_parse_agent_expr): ... this, make it non-static and move
3673 (unparse_agent_expr) Rename to ...
3674 (gdb_unparse_agent_expr): ... this, make it non-static and move
3676 (eval_agent_expr): Rename to ...
3677 (eval_tracepoint_agent_expr): ... this.
3678 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3679 forward declarations.
3680 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3681 (agent_get_trace_state_variable_value): New function.
3682 (agent_set_trace_state_variable_value): New function.
3683 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3684 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3685 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3686 (condition_true_at_tracepoint): Likewise.
3687 (parse_agent_expr): Rename to ...
3688 (gdb_parse_agent_expr): ... this and move to ax.c.
3689 (unparse_agent_expr): Rename to ...
3690 (gdb_unparse_agent_expr): ... this and move to ax.c.
3691 (gdb_agent_op_name): Move to ax.c.
3692 (eval_agent_expr): Rename to ...
3693 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3695 (eval_tracepoint_agent_expr): New function.
3696 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3698 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3700 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3701 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3702 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3703 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3704 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3705 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3706 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3707 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3708 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3709 (compile_bytecodes): Remove forward declaration.
3710 (is_goto_target): Move to ax.c.
3711 (compile_bytecodes): Move to ax.c and call
3712 agent_get_trace_state_variable_value (...) and
3713 agent_set_trace_state_variable_value (...).
3715 * Makefile.in: Update ax.c and IPA dependencies.
3717 2012-02-24 Pedro Alves <palves@redhat.com>
3719 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3720 (cmd_bigqtbuffer_circular): ... this. Only handle
3721 'QTBuffer:circular:'.
3722 (handle_tracepoint_general_set): Adjust.
3724 2012-02-16 Yao Qi <yao@codesourcery.com>
3726 * inferiors.c: Move code to ...
3727 * dll.c: .... here. New.
3728 * server.h: Declare clear_dlls.
3729 * Makefile.in (SFILES): Add dll.c.
3733 2012-02-11 Yao Qi <yao@codesourcery.com>
3735 * server.c: (handle_monitor_command): Add a new parameter
3737 (handle_query): Update caller.
3739 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3741 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3742 * configure, config.in: Regenerate.
3743 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3746 2012-02-02 Pedro Alves <palves@redhat.com>
3748 Try SIGKILL first, then PTRACE_KILL.
3749 * linux-low.c (linux_kill_one_lwp): New.
3750 (linux_kill_one_lwp): Rename to ...
3751 (kill_one_lwp_callback): ... this. Use the new
3754 2012-02-02 Pedro Alves <palves@redhat.com>
3756 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3759 2012-01-27 Pedro Alves <palves@redhat.com>
3761 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3762 (elf_64_file_p): Make static.
3763 (linux_pid_exe_is_elf_64_file): New.
3764 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3765 Delete declarations.
3766 (linux_pid_exe_is_elf_64_file): Declare.
3767 * linux-x86-low.c (x86_arch_setup): Use
3768 linux_pid_exe_is_elf_64_file.
3770 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3772 * linux-low.c (linux_wait_for_event_1): Rename to ...
3773 (linux_wait_for_event): ... here and merge it with former
3774 linux_wait_for_event - new variable wait_ptid, use it.
3775 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3777 2012-01-23 Pedro Alves <palves@redhat.com>
3779 * server.c (main): Avoid yet another case of infinite loop while
3780 detaching/killing after a longjmp.
3782 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3785 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3787 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3789 * hostio.c (handle_readlink): New function.
3790 (handle_vFile): Call it to handle "vFile:readlink" packets.
3792 2012-01-20 Pedro Alves <palves@redhat.com>
3793 Ulrich Weigand <ulrich.weigand@linaro.org>
3795 * server.c (handle_v_requests): Only support vAttach and vRun to
3796 start multiple processes when in extended protocol mode.
3798 2012-01-17 Pedro Alves <palves@redhat.com>
3800 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3801 memalign plus mprotect to allocate the scratch buffer.
3803 2012-01-13 Pedro Alves <palves@redhat.com>
3805 * server.c (attach_inferior): Clear `cont_thread'.
3807 2012-01-13 Pedro Alves <palves@redhat.com>
3809 * server.c (main): Avoid infinite loop while detaching/killing
3812 2012-01-09 Doug Evans <dje@google.com>
3814 * server.c (start_inferior): Set last_ptid in --wrapper case.
3816 2012-01-06 Yao Qi <yao@codesourcery.com>
3818 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3820 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3822 2012-01-04 Yao Qi <yao@codesourcery.com>
3824 * tracepoint.c (cmd_qtdp): Print debug message
3825 for static tracepoint.
3827 2012-01-04 Yao Qi <yao@codesourcery.com>
3829 * tracepoint.c (trace_vdebug): Differentiate debug message
3830 between gdbserver and IPA.
3832 2012-01-03 Yao Qi <yao@codesourcery.com>
3834 * tracepoint.c (tracepoint_was_hit): Don't collect for
3837 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3839 * terminal.h: Reformat copyright header.
3841 2012-01-02 Joel Brobecker <brobecker@adacore.com>
3843 * server.c (gdbserver_version): Update copyright year.
3844 * gdbreplay.c (gdbreplay_version): Likewise.
3846 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3848 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3851 2011-12-18 Hui Zhu <teawater@gmail.com>
3852 * linux-low.c (linux_create_inferior): Save return value to ret.
3854 2011-12-18 Hui Zhu <teawater@gmail.com>
3856 * linux-low.c (linux_create_inferior): Save return value to ret.
3858 2011-12-16 Doug Evans <dje@google.com>
3860 * linux-low.c (linux_create_inferior): If stdio connection,
3861 redirect stdin from /dev/null, stdout to stderr.
3862 * remote-utils.c (remote_is_stdio): New static global.
3863 (remote_connection_is_stdio): New function.
3864 (remote_prepare): Handle stdio connection.
3865 (remote_open): Ditto.
3866 (remote_close): Don't close stdin for stdio connections.
3867 (read_prim,write_prim): New functions. Replace all calls to
3868 read/write to these.
3869 * server.c (main): Watch for "-" argument. Move call to
3870 remote_prepare before start_inferior.
3871 * server.h (STDIO_CONNECTION_NAME): New macro.
3872 (remote_connection_is_stdio): Declare.
3874 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3875 in debugging output.
3877 2011-12-15 Yao Qi <yao@codesourcery.com>
3879 * tracepoint.c: Include sys/syscall.h.
3880 (gdb_ust_thread): Remove preprocessor conditional.
3882 2011-12-14 Pedro Alves <pedro@codesourcery.com>
3884 * linux-low.c (linux_detach_one_lwp): Call
3885 the_low_target.prepare_to_resume before detaching.
3887 2011-12-14 Yao Qi <yao@codesourcery.com>
3889 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3892 2011-12-14 Yao Qi <yao@codesourcery.com>
3894 * i386-low.c (i386_low_stopped_data_address): Initialize local
3897 2011-12-13 Pedro Alves <pedro@codesourcery.com>
3901 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3902 DR_CONTROL unless necessary. Extend comments.
3903 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3904 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3906 2011-12-13 Yao Qi <yao@codesourcery.com>
3908 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3910 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3912 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3914 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3915 Print new debug message for such case.
3917 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3919 Fix overlapping memcpy.
3920 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3921 the read_inferior_memory transfer.
3922 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3923 write_inferior_memory transfer.
3924 (set_fast_tracepoint_jump): New variable buf. Use it for the
3925 read_inferior_memory and write_inferior_memory transfers.
3926 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3927 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3928 Use it for the write_inferior_memory transfer.
3929 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3932 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3934 * linux-low.c (fetch_register, store_register): Make code
3935 consistent, fix formatting.
3937 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3939 * linux-low.c (usr_store_inferior_registers): Factor out code
3940 to handle individual registers into...
3941 (store_register): ... this new function.
3943 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3945 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3946 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3947 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3948 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3949 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3950 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3951 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3952 (srv_xmlfiles): Add new XML files.
3954 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3956 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3957 (init_registers_s390_linux32v1): Add prototype.
3958 (init_registers_s390_linux32v2): Likewise.
3959 (init_registers_s390_linux64v1): Likewise.
3960 (init_registers_s390_linux64v2): Likewise.
3961 (init_registers_s390x_linux64v1): Likewise.
3962 (init_registers_s390x_linux64v2): Likewise.
3963 (s390_num_regs): Increment to 52.
3964 (s390_regmap): Add orig_r2 register.
3965 (s390_num_regs_3264): Increment to 68.
3966 (s390_regmap_3264): Add orig_r2 register.
3967 (s390_collect_ptrace_register): Handle orig_r2 register.
3968 (s390_supply_ptrace_register): Likewise.
3969 (s390_fill_last_break): New function.
3970 (s390_store_last_break): Likewise.
3971 (s390_fill_system_call): New function.
3972 (s390_store_system_call): Likewise.
3973 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3975 (s390_check_regset): New function.
3976 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3977 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3978 Update target_regsets for available register sets.
3980 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3981 Jan Kratochvil <jan.kratochvil@redhat.com>
3983 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3984 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3986 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3987 * linux-low.h (struct process_info_private): New member r_debug.
3988 * server.c (handle_qxfer_libraries): Call
3989 the_target->qxfer_libraries_svr4.
3990 (handle_qxfer_libraries_svr4): New function.
3991 (qxfer_packets): New entry "libraries-svr4".
3992 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3993 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3994 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3995 PACKET_qXfer_libraries_svr4.
3997 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3999 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4000 PSW address/mask between 8-byte and 16-byte formats.
4001 (s390_supply_ptrace_register): Likewise.
4002 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4003 basic addressing mode bit.
4005 2011-11-24 Stan Shebs <stan@codesourcery.com>
4007 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4009 2011-11-17 Stan Shebs <stan@codesourcery.com>
4011 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4012 (tracing_start_time): New global.
4013 (tracing_stop_time): New global.
4014 (tracing_user_name): New global.
4015 (tracing_notes): New global.
4016 (tracing_stop_note): New global.
4017 (cmd_qtstart): Set traceframe_usage, start_time.
4018 (stop_tracing): Set stop_time.
4019 (cmd_qtstatus): Report additional status.
4020 (cmd_qtp): New function.
4021 (handle_tracepoint_query): Call it.
4022 (cmd_qtnotes): New function.
4023 (handle_tracepoint_general_set): Call it.
4024 (get_timestamp): Rename from tsv_get_timestamp.
4026 2011-11-14 Stan Shebs <stan@codesourcery.com>
4027 Kwok Cheung Yeung <kcy@codesourcery.com>
4029 * linux-x86-low.c (small_jump_insn): New.
4030 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4031 trampoline and error message, build a trampoline and issue a small
4032 jump instruction to it.
4033 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4034 trampoline and error message.
4035 (x86_get_min_fast_tracepoint_insn_len): New.
4036 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4037 * linux-low.h (struct linux_target_ops): Add arguments to
4038 install_fast_tracepoint_jump_pad operation, add new operation.
4039 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4041 (linux_get_min_fast_tracepoint_insn_len): New function.
4042 (linux_target_op): Add new operation.
4043 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4044 (gdb_trampoline_buffer_end): Ditto.
4045 (gdb_trampoline_buffer_error): Ditto.
4046 (struct ipa_sym_addresses): Add fields for new IPA variables.
4047 (symbol_list): Add entries for new IPA variables.
4048 (struct tracepoint): Add fields to hold the address range of the
4049 trampoline used by the tracepoint.
4050 (trampoline_buffer_head): New static variable.
4051 (trampoline_buffer_tail): Ditto.
4052 (claim_trampoline_space): New function.
4053 (have_fast_tracepoint_trampoline_buffer): New function.
4054 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4056 (install_fast_tracepoint): Ditto, also add error buffer argument.
4057 (cmd_qtminftpilen): New function.
4058 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4059 (fast_tracepoint_from_trampoline_address): New function.
4060 (fast_tracepoint_collecting): Handle trampoline as part of jump
4062 (set_trampoline_buffer_space): New function.
4063 (initialize_tracepoint): Initialize new IPA variables.
4064 * target.h (struct target_ops): Add arguments to
4065 install_fast_tracepoint_jump_pad operation, add new
4066 get_min_fast_tracepoint_insn_len operation.
4067 (target_get_min_fast_tracepoint_insn_len): New.
4068 (install_fast_tracepoint_jump_pad): Add arguments.
4069 * server.h (IPA_BUFSIZ): Define.
4070 * linux-i386-ipa.c: Include extra header files.
4071 (initialize_fast_tracepoint_trampoline_buffer): New function.
4072 (initialize_low_tracepoint): Call it.
4073 * server.h (set_trampoline_buffer_space): Declare.
4074 (claim_trampoline_space): Ditto.
4075 (have_fast_tracepoint_trampoline_buffer): Ditto.
4077 2011-11-14 Yao Qi <yao@codesourcery.com>
4079 * server.c (handle_query): Handle InstallInTrace for qSupported.
4080 * tracepoint.c (add_tracepoint): Sort list.
4081 (install_tracepoint, download_tracepoint): New.
4082 (cmd_qtdp): Call them to install and download tracepoints.
4083 (sort_tracepoints): Removed.
4084 (cmd_qtstart): Update.
4086 2011-11-14 Yao Qi <yao@codesourcery.com>
4088 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4089 * mem-break.h: Declare.
4090 * tracepoint.c (cmd_qtstart): Move some code to ...
4091 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4093 (download_tracepoints): Move some code to ...
4094 (download_tracepoint_1): ... here. New.
4096 2011-11-08 Yao Qi <yao@codesourcery.com>
4098 * remote-utils.c (relocate_instruction): A comment fix.
4100 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4102 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4103 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4104 dr_status_mirror and dr_control_mirror from debug_reg_state.
4105 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4106 (i386_initial_stuff): Remove use of deleted globals.
4107 (i386_get_thread_context, i386_set_thread_context,
4108 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4109 from debug_reg_state.
4111 2011-11-05 Yao Qi <yao@codesourcery.com>
4113 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4114 address as TPOINT's.
4116 2011-11-02 Stan Shebs <stan@codesourcery.com>
4118 * tracepoint.c (agent_mem_read_string): New function.
4119 (eval_agent_expr): Call it for tracenz.
4120 * server.c (handle_query): Report support for tracenz.
4122 2011-11-02 Yao Qi <yao@codesourcery.com>
4124 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4126 2011-11-02 Yao Qi <yao@codesourcery.com>
4128 * target.h: Fix a typo in comment.
4130 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4132 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4133 clobber the breakpoints' shadows with fast tracepoint jumps.
4134 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4135 * target.c (write_inferior_memory): Also pass MYADDR down to
4138 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4140 * configure.ac: Check support for personality routine.
4141 * configure: Regenerate.
4142 * config.in: Likewise.
4143 * linux-low.c: Include <sys/personality.h>.
4144 Define ADDR_NO_RANDOMIZE if necessary.
4145 (linux_create_inferior): Disable address space randomization when
4146 forking inferior, if requested.
4147 (linux_supports_disable_randomization): New function.
4148 (linux_target_ops): Install it.
4149 * server.h (disable_randomization): Declare.
4150 * server.c (disable_randomization): New global variable.
4151 (handle_general_set): Handle QDisableRandomization.
4152 (handle_query): Likewise for qSupported.
4153 (main): Support --disable-randomization and --no-disable-randomization
4154 command line arguments.
4155 * target.h (struct target_ops): Add supports_disable_randomization.
4156 (target_supports_disable_randomization): New macro.
4158 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4160 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4162 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4163 [!PT_GETDSBT] (target_loadmap): New definition.
4164 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4165 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4166 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4167 and PT_GETDSBT to LINUX_LOADMAP.
4168 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4169 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4171 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4173 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4174 (arm_linux_hwbp_cap): New static variable.
4175 (arm_linux_get_hwbp_cap): Replace by ...
4176 (arm_linux_init_hwbp_cap): ... this new function.
4177 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4178 (arm_linux_get_hw_watchpoint_count): Likewise.
4179 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4180 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4181 (arm_prepare_to_resume): Use perror_with_name instead of error.
4183 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4185 * linux-arm-low.c: Include <signal.h>.
4186 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4187 (struct arm_linux_hwbp_cap): New data type.
4188 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4189 (struct arm_linux_hw_breakpoint): New data type.
4190 (MAX_BPTS, MAX_WPTS): Define.
4191 (struct arch_process_info, struct arch_lwp_info): New data types.
4192 (arm_linux_get_hwbp_cap): New function.
4193 (arm_linux_get_hw_breakpoint_count): Likewise.
4194 (arm_linux_get_hw_watchpoint_count): Likewise.
4195 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4196 (arm_hwbp_control_initialize): Likewise.
4197 (arm_hwbp_control_is_enabled): Likewise.
4198 (arm_hwbp_control_is_initialized): Likewise.
4199 (arm_hwbp_control_disable): Likewise.
4200 (arm_linux_hw_breakpoint_equal): Likewise.
4201 (arm_linux_hw_point_initialize): Likewise.
4202 (struct update_registers_data): New data structure.
4203 (update_registers_callback: New function.
4204 (arm_insert_point): Likewise.
4205 (arm_remove_point): Likewise.
4206 (arm_stopped_by_watchpoint): Likewise.
4207 (arm_stopped_data_address): Likewise.
4208 (arm_new_process): Likewise.
4209 (arm_new_thread): Likewise.
4210 (arm_prepare_to_resume): Likewise.
4211 (the_low_target): Register arm_insert_point, arm_remove_point,
4212 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4213 arm_new_thread, and arm_prepare_to_resume.
4215 2011-09-15 Stan Shebs <stan@codesourcery.com>
4217 * server.h (struct emit_ops): Add compare-goto fields.
4218 * tracepoint.c (gdb_agent_op_sizes): New table.
4219 (emit_eq_goto): New function.
4220 (emit_ne_goto): New function.
4221 (emit_lt_goto): New function.
4222 (emit_le_goto): New function.
4223 (emit_gt_goto): New function.
4224 (emit_ge_goto): New function.
4225 (is_goto_target): New function.
4226 (compile_bytecodes): Recognize special cases of compare-goto
4227 combinations and call specialized emitters for them.
4228 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4229 (amd64_emit_ne_goto): New function.
4230 (amd64_emit_lt_goto): New function.
4231 (amd64_emit_le_goto): New function.
4232 (amd64_emit_gt_goto): New function.
4233 (amd64_emit_ge_goto): New function.
4234 (amd64_emit_ops): Add the new functions.
4235 (i386_emit_eq_goto): New function.
4236 (i386_emit_ne_goto): New function.
4237 (i386_emit_lt_goto): New function.
4238 (i386_emit_le_goto): New function.
4239 (i386_emit_gt_goto): New function.
4240 (i386_emit_ge_goto): New function.
4241 (i386_emit_ops): Add the new functions.
4243 2011-09-08 Stan Shebs <stan@codesourcery.com>
4245 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4246 (i386_emit_epilogue): Restore %ebx.
4248 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4250 * server.c (step_thread): Remove definition.
4251 (process_serial_event): Don't handle Hs.
4252 * server.h (step_thread): Remove declaration.
4253 * target.c (set_desired_inferior): Remove use of step_thread.
4255 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4257 * linux-low.c: Include linux-procfs.h.
4258 (linux_attach_lwp_1): Update comments.
4259 (linux_attach): Scan for existing threads when attaching to a
4260 process that is the tgid.
4261 * Makefile.in: Update dependencies.
4263 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4265 * configure.srv: Add linux-procfs.o dependencies.
4267 2011-08-14 Yao Qi <yao@codesourcery.com>
4269 * target.h (struct target_ops): Fix indent.
4270 * win32-low.c (win32_target_ops): Fix comment.
4272 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4273 Yao Qi <yao@codesourcery.com>
4275 * Makefile.in (clean): Remove tic6x-*.c files.
4276 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4277 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4278 (tic6x-c64xp-linux.c): Likewise.
4279 * configure.srv: Add support for tic6x-*-uclinux.
4280 * linux-tic6x-low.c: New.
4281 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4283 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4284 Yao Qi <yao@codesourcery.com>
4286 * target.h (struct target_ops): Add read_loadmap.
4287 * linux-low.c (struct target_loadseg): New type.
4288 (struct target_loadmap): New type.
4289 (linux_read_loadmap): New function.
4290 (linux_target_ops): Add linux_read_loadmap.
4291 * server.c (handle_query): Support qXfer:fdpic:read packet.
4292 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4295 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4297 * win32-low.c: Include <stdint.h>.
4299 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4301 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4302 to the inferior here.
4303 (i386_remove_aligned_watchpoint): Ditto.
4304 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4305 fit part of the watchpoint in the debug registers.
4306 (i386_update_inferior_debug_regs): New.
4307 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4308 registers, and only update the inferior on success.
4309 (i386_low_remove_watchpoint): Ditto.
4311 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4313 * linux-low.c (compare_ints, unique, list_threads, show_process,
4314 linux_core_of_thread): Delete.
4315 (linux_target_ops): Change linux_core_of_thread to
4316 linux_common_core_of_thread.
4317 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4318 * utils.c (malloc_failure): Change type of argument.
4319 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4320 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4321 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4322 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4323 (IPA_OBJS): Add common-utils-ipa.o.
4324 (ptid_h, linux_osdata_h): New macros.
4325 (server_h): Add common/common-utils.h, common/xml-utils.h,
4326 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4328 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4329 ptid.o, buffer.o): New rules.
4330 (linux-low.o): Add common/linux-osdata.h as a dependency.
4331 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4332 * configure.ac: Add AC_HEADER_DIRENT check.
4333 * config.in: Regenerate.
4334 * configure: Regenerate.
4335 * remote-utils.c (xml_escape_text): Delete.
4336 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4337 buffer_xml_printf): Move to common/buffer.c.
4338 * server.c (main): Remove call to initialize_inferiors.
4339 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4340 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4341 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4342 internal_error, gdb_assert, gdb_assert_fail): Delete.
4343 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4344 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4346 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4347 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4348 initialize_inferiors): Delete.
4350 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4352 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4355 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4357 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4359 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4361 2011-05-26 Yao Qi <yao@codesourcery.com>
4363 * Makefile.in (thread-db.o): Track dependence to
4364 common/gdb_thread_db.h.
4365 * thread-db.c: include gdb_thread_db.h from right place.
4367 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4369 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4370 __FILE__ and __LINE__ to internal_error.
4372 2011-05-13 Doug Evans <dje@google.com>
4374 * thread-db.c (try_thread_db_load_from_sdir): New function.
4375 (try_thread_db_load_from_dir): New function.
4376 (thread_db_load_search): Handle $sdir, ignore $pdir.
4377 Remove trying of system directories if search of
4378 libthread-db-search-path fails, that is now done via $sdir.
4380 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4382 * server.c (handle_query): Add EnableDisableTracepoints to the list
4383 of supported features.
4384 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4386 (cmd_qtenable_disable): New.
4387 (cmd_qtstart): Install tracepoints even if disabled.
4388 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4389 receiving a QTEnable or QTDisable packet.
4390 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4391 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4393 (gdb_probe): Skip data collection if static tracepoint is disabled.
4395 2011-05-10 Doug Evans <dje@google.com>
4397 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4399 2011-05-04 Doug Evans <dje@google.com>
4401 * linux-low.c (linux_join): Skip process lookup.
4402 * spu-low.c (spu_join): Ditto.
4403 * server.c (join_inferiors_callback): Delete.
4404 (process_serial_event): For 'D' packet (detach) call join_inferior
4407 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4409 * README: Don't mention xscale*-*-linux*.
4410 * configure.srv (xscale*-*-linux*): Don't handle target.
4412 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4414 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4416 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4417 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4418 (i386_emit_void_call_2): Likewise.
4420 2011-04-26 Yao Qi <yao@codesourcery.com>
4422 * linux-low.c: Move common macros to linux-ptrace.h.
4423 Include linux-ptrace.h.
4424 * Makefile.in (linux_ptrace_h): New.
4425 (linux-low.o): Depends on linux-ptrace.h.
4427 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4429 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4430 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4431 (remote_prepare): New function with most of the TCP code from ...
4432 (remote_open): ... here. Detect PORT here unconditionally. Move also
4433 setting transport_is_reliable.
4434 * server.c (run_once): New variable.
4435 (gdbserver_usage): Document it.
4436 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4437 the first run if RUN_ONCE.
4438 * server.h (run_once, remote_prepare): New declarations.
4440 2011-04-19 Tom Tromey <tromey@redhat.com>
4442 * win32-low.c (handle_load_dll): Remove duplicate "the".
4444 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4446 Remove support for old Cygwin 1.5 versions.
4447 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4448 function to avoid warning.
4449 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4452 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4454 * gdbserver/server.h (Macro _): Define it if not available.
4456 2011-03-14 Michael Snyder <msnyder@vmware.com>
4458 * hostio.c (handle_close): Remove unnecessary null test.
4460 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4462 * Makefile.in (maintainer-clean realclean distclean): Remove
4463 "make ... subdir_do" command.
4465 2011-03-10 Michael Snyder <msnyder@vmware.com>
4467 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4469 * server.c (handle_v_run): Free alloced buffer on early return.
4471 2011-03-09 Yao Qi <yao@codesourcery.com>
4474 2011-03-04 Yao Qi <yao@codesourcery.com>
4476 * Makefile.in: Remove GNU make feature --directory.
4478 2011-03-05 Yao Qi <yao@codesourcery.com>
4480 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4481 (subdir_do): New make target. Copied from gdb/Makefile.
4482 (maintainer-clean, realclean, distclean, clean): Call corresponding
4483 make targets in common/Makefile.
4485 2011-02-11 Yao Qi <yao@codesourcery.com>
4487 * configure.ac: Call AC_PROG_RANLIB.
4488 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4489 * configure: Regenerate.
4491 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4493 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4495 2011-03-06 Yao Qi <yao@codesourcery.com>
4497 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4499 2011-03-05 Yao Qi <yao@codesourcery.com>
4501 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4502 (subdir_do): New make target. Copied from gdb/Makefile.
4503 (maintainer-clean, realclean, distclean, clean): Call corresponding
4504 make targets in common/Makefile.
4506 2011-03-04 Yao Qi <yao@codesourcery.com>
4508 * Makefile.in: Remove GNU make feature --directory.
4510 2011-03-04 Michael Snyder <msnyder@vmware.com>
4512 * server.c (queue_stop_reply): Call xmalloc not malloc.
4514 2011-03-02 Michael Snyder <msnyder@vmware.com>
4516 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4518 2011-02-28 Michael Snyder <msnyder@vmware.com>
4520 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4521 (cmd_qtframe): Ditto.
4522 (cmd_qtbuffer): Ditto.
4523 (cmd_bigqtbuffer): Ditto.
4525 * utils.c (decimal2str): Initialize 'width' to nine, then
4528 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4530 * hostio.c (require_data): Free *data, not data.
4532 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4534 * hostio.c (require_data): Use free, not xfree.
4536 2011-02-27 Michael Snyder <msnyder@vmware.com>
4538 * server.c (handle_query): Discard unused value.
4540 * hostio.c (require_data): Free malloc memory before returning
4543 2011-02-26 Michael Snyder <msnyder@vmware.com>
4545 * linux-low.c (list_threads): Call closedir for dirent.
4547 2011-02-27 Michael Snyder <msnyder@vmware.com>
4549 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4550 a case statement falls through.
4552 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4554 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4557 2011-02-26 Michael Snyder <msnyder@vmware.com>
4559 * utils.c (decimal2str): Eliminate dead code and dead param.
4560 (pulongest): Drop dead param from call to decimal2str.
4563 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4565 Revert the following patch (not approved yet):
4566 2011-02-21 Hui Zhu <teawater@gmail.com>
4567 * tracepoint.c (tp_printf): New function.
4568 (eval_agent_expr): Handle gdb_agent_op_printf.
4570 2011-02-21 Hui Zhu <teawater@gmail.com>
4572 * tracepoint.c (tp_printf): New function.
4573 (eval_agent_expr): Handle gdb_agent_op_printf.
4575 2011-02-18 Tom Tromey <tromey@redhat.com>
4577 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4578 (tracepoint.o): Likewise.
4579 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4580 (gdb_agent_op_names): Likewise.
4582 2011-02-18 Tom Tromey <tromey@redhat.com>
4584 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4585 gdb_agent_op_rot>: New constants.
4586 (gdb_agent_op_names): Add pick and roll.
4587 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4590 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4592 * aclocal.m4: Regenerated with aclocal-1.11.1.
4594 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4596 * server.c (handle_qxfer_traceframe_info): New.
4597 (qxfer_packets): Register "traceframe-info".
4598 (handle_query): Report support for qXfer:traceframe-info:read+.
4599 * tracepoint.c (match_blocktype): New.
4600 (traceframe_find_block_type): Rename to ...
4601 (traceframe_walk_blocks): ... this. Add callback filter argument,
4603 (traceframe_find_block_type): New, reimplemented on top of
4604 traceframe_walk_blocks.
4605 (build_traceframe_info_xml): New.
4606 (traceframe_read_info): New.
4607 * server.h (traceframe_read_info): Declare.
4609 2011-02-11 Yao Qi <yao@codesourcery.com>
4611 * configure.ac: Call AC_PROG_RANLIB.
4612 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4613 * configure: Regenerate.
4615 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4617 * server.c (gdb_read_memory): Change return semantics to allow
4619 (handle_search_memory_1): Adjust.
4620 (process_serial_event) <'m' packet>: Handle partial transfers.
4621 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4623 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4625 * regcache.c (init_register_cache): Initialize
4626 regcache->register_status.
4627 (free_register_cache): Release regcache->register_status.
4628 (regcache_cpy): Copy register_status.
4629 (registers_to_string): Print 'x's for unavailable registers.
4630 (supply_register): Mark the register's status valid or
4631 unavailable, depending on whether a buffer was passed in or not.
4632 (supply_register_zeroed): New.
4633 (supply_regblock): Mark the registers' status valid or
4634 unavailable, depending on whether a buffer was passed in or not.
4635 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4636 (struct regcache): New `register_status' field.
4637 (supply_register_zeroed): Declare.
4638 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4639 supply_register_zeroed, rather than passing a NULL buffer to
4641 * tracepoint.c (fetch_traceframe_registers): Update comment.
4643 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4645 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4648 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4650 * server.h (decode_xfer_write): Change prototype.
4651 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4652 and don't extract the annex here.
4653 * server.c (decode_xfer_read): Remove `annex' parameter,
4654 and don't extract the annex here.
4656 (struct qxfer): New.
4657 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4658 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4659 (handle_qxfer_statictrace): New functions, abstracted out from
4660 handle_query, and made to use the struct qxfer interface.
4661 (handle_threads_qxfer_proper): Rename to ...
4662 (handle_qxfer_threads_proper): ... this.
4663 (handle_threads_qxfer): Rename to ...
4664 (handle_qxfer_threads): ... this. Adjust.
4665 (qxfer_packets): New array.
4666 (handle_qxfer): New function.
4667 (handle_query): Use handle_qxfer.
4669 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4671 * gdbreplay.c: Shorten lines of >= 80 columns.
4672 * linux-low.c: Ditto.
4673 * linux-ppc-low.c: Ditto.
4674 * linux-s390-low.c: Ditto.
4675 * linux-sparc-low.c: Ditto.
4676 * linux-x86-low.c: Ditto.
4677 * linux-xtensa-low.c: Ditto.
4678 * mem-break.c: Ditto.
4680 * regcache.h: Ditto.
4681 * remote-utils.c: Ditto.
4684 * thread-db.c: Ditto.
4685 * tracepoint.c: Ditto.
4687 * win32-low.h: Ditto.
4689 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4691 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4694 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4696 * server.c (gdbserver_version): Update copyright year in version
4698 * gdbreplay.c (gdbreplay_version): Ditto.
4700 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4702 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4703 * linux-bfin-low.c: New file.
4704 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4705 PT_DATA_ADDR for BFIN targets.
4706 * Makefile.in (SFILES): Add linux-bfin-low.c.
4707 (clean): Remove reg-bfin.c.
4708 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4709 * README: Mention supported Blackfin targets.
4711 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4713 * .gitignore: New file.
4715 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4717 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4719 2010-10-22 Jie Zhang <jie@codesourcery.com>
4721 * Makefile.in: Add FLAGS_TO_PASS variable.
4722 (install): Remove dependency of install-only and recursively
4723 invoke make for install-only.
4725 2010-10-04 Doug Evans <dje@google.com>
4727 * Makefile.in (uninstall): Use $(DESTDIR).
4729 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4733 * linux-x86-low.c (compat_siginfo_from_siginfo)
4734 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4735 si_code is < 0. Check for si_code == SI_TIMER before checking for
4738 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4740 * lynx-i386-low.c: New file.
4741 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4743 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4745 * lynx-low.c (ptrace_request_to_str): Remove handling for
4746 request values that have been removed in LynxOS 5.x.
4748 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4750 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4753 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4755 * configure.ac: Add --enable-inprocess-agent option.
4756 * configure: Rebuilt.
4758 2010-09-06 Yao Qi <yao@codesourcery.com>
4760 * linux-low.c (linux_kill): Remove unused variable.
4761 (linux_stabilize_threads): Likewise.
4762 * server.c (start_inferior): Likewise.
4763 (queue_stop_reply_callback): Likewise.
4764 * tracepoint.c (do_action_at_tracepoint): Likewise.
4766 2010-09-06 Yao Qi <yao@codesourcery.com>
4768 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4771 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4773 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4775 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4777 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4780 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4782 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4783 gdbserver/lynx-ppc-low.c: New files.
4784 * Makefile.in (lynx_low_h): New variable.
4785 (lynx-low.o, lynx-ppc-low.o): New rules.
4786 * configure.ac: On LynxOS, link with -lnetinet.
4787 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4788 * configure: regenerate.
4790 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4792 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4793 * configure.ac: Add check for vasprintf and vsnprintf.
4794 * configure, config.in: Regenerate.
4795 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4797 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4799 * gdbreplay.c: Move include of alloca.h up, next to include of
4801 * server.h: Add include of malloc.h.
4802 * mem-break.c: Remove include of malloc.h.
4803 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4805 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4807 * Makefile.in (memmem.o): Build with -Wno-error.
4809 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4811 * utils.c (xsnprintf): Make non-static.
4812 * server.h: Add xsnprintf declaration.
4813 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4814 replace calls to snprintf by calls to xsnprintf throughout.
4816 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4818 * configure.ac: Add configure check for alloca.
4819 * configure, config.in: Regenerate.
4820 * server.h: Include alloca.h if it exists.
4821 * gdbreplay.c: Include alloca.h if it exists.
4823 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4825 * linux-low.c (__SIGRTMIN): Define if not already defined.
4826 (linux_create_inferior): Check for __ANDROID__ rather than
4828 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4829 are already deferred.
4830 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4831 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4832 stopped and already has a pending signal to report.
4833 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4834 a pending signal to report or is moving out of a jump pad.
4835 (linux_init_signals): Check for __ANDROID__ rather than
4838 2010-08-28 Pedro Alves <pedro@codesourcery.com>
4840 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4841 debug_threads check. Avoid a linear search when not doing debug
4844 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4846 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4847 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4848 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4849 (process_event): Change local fd's type to gdb_fildes_t.
4850 (create_file_handler): Adjust prototype.
4851 (delete_file_handler): Adjust prototype.
4852 (handle_file_event): Adjust prototype. Use pfildes.
4853 (create_file_event): Adjsut prototype.
4854 * remote-utils.c (remote_desc, listen_desc): Change type to
4856 * server.h: New gdb_fildes_t typedef.
4857 [USE_WIN32API]: Include winsock2.h.
4858 (delete_file_handler, add_file_handler): Adjust prototypes.
4860 * utils.c (pfildes): New.
4862 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4864 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4865 * configure: Regenerate.
4867 2010-08-27 Pedro Alves <pedro@codesourcery.com>
4869 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4870 (linux_done_accessing_memory): ... this.
4871 (linux_target_ops): Adjust.
4872 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4873 * nto-low.c (nto_target_ops): Adjust comment.
4874 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4875 * spu-low.c (spu_target_ops): Adjust comment.
4876 * target.h (target_ops): Rename unprepare_to_access_memory field
4877 to done_accessing_memory.
4878 (unprepare_to_access_memory): Rename to ...
4879 (done_accessing_memory): ... this.
4881 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4883 * linux-low.c (linux_prepare_to_access_memory): New.
4884 (linux_unprepare_to_access_memory): New.
4885 (linux_target_ops): Install them.
4886 * server.c (read_memory): Rename to ...
4887 (gdb_read_memory): ... this. Use
4888 prepare_to_access_memory/prepare_to_access_memory.
4889 (write_memory): Rename to ...
4890 (gdb_write_memory): ... this. Use
4891 prepare_to_access_memory/prepare_to_access_memory.
4892 (handle_search_memory_1): Adjust.
4893 (process_serial_event): Adjust.
4894 * target.h (struct target_ops): New fields
4895 prepare_to_access_memory and unprepare_to_access_memory.
4896 (prepare_to_access_memory, unprepare_to_access_memory): New.
4897 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4898 prepare_to_access_memory/prepare_to_access_memory.
4899 * nto-low.c (nto_target_ops): Adjust.
4900 * spu-low.c (spu_target_ops): Adjust.
4901 * win32-low.c (win32_target_ops): Adjust.
4903 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4905 * Makefile.in (WARN_CFLAGS): Get it from configure.
4906 (WERROR_CFLAGS): New.
4907 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4908 * configure.ac: Introduce --enable-werror, which adds -Werror to
4909 the compiler command line. Enabled by default. Disable with
4910 --disable-werror. Add -Wdeclaration-after-statement
4911 Wpointer-arith and -Wformat-nonliteral to warning flags.
4912 * configure: Regenerate.
4914 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4916 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4918 2010-08-26 Pedro Alves <pedro@codesourcery.com>
4920 * gdbreplay.c (remote_error): New.
4922 (expect): Use gdbchar. Check for error reading from GDB.
4923 Clarify sync error output.
4924 (play): Check for errors writing to GDB.
4925 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4926 * remote-utils.c (getpkt): Check for errors writing to the remote
4929 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4931 * linux-low.c (linux_wait_1): Move non-debugging code out of
4932 `debug_threads' control.
4934 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4936 * linux-low.c (linux_wait_1): Don't set last_status here.
4937 * server.c (push_event, queue_stop_reply_callback): Assert we're
4938 not pushing a TARGET_WAITKIND_IGNORE event.
4939 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4940 (myresume, handle_target_event): Set the thread's last_resume_kind
4941 and last_status from the target returned status.
4943 2010-08-25 Pedro Alves <pedro@codesourcery.com>
4947 * linux-x86-low.c (update_debug_registers_callback): New.
4948 (i386_dr_low_set_addr): Use it.
4949 (i386_dr_low_get_addr): New.
4950 (i386_dr_low_set_control): Use update_debug_registers_callback.
4951 (i386_dr_low_get_control): New.
4952 (i386_dr_low_get_status): Adjust.
4953 * linux-low.c (linux_stop_lwp): New.
4954 * linux-low.h (linux_stop_lwp): Declare.
4956 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4957 argument instead of a i386_debug_reg_state.
4958 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4959 a i386_debug_reg_state.
4960 (i386_insert_aligned_watchpoint): Adjust.
4961 (i386_remove_aligned_watchpoint): Adjust.
4962 (i386_low_stopped_data_address): Read the debug registers from the
4963 inferior instead of from the mirrors.
4964 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4965 (i386_dr_low_get_addr): Declare.
4966 (i386_dr_low_get_control): Declare.
4967 (i386_dr_low_get_status): Change prototype.
4969 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4970 (i386_dr_low_get_addr): New.
4971 (i386_dr_low_get_control): New.
4972 (i386_dr_low_get_status): Adjust prototype. Return
4974 (i386_initial_stuff): Clear dr_status_mirror and
4976 (i386_get_thread_context): Adjust.
4977 (i386_set_thread_context): Adjust.
4978 (i386_thread_added): Adjust.
4980 2010-08-24 Pedro Alves <pedro@codesourcery.com>
4982 * linux-low.h (linux_thread_area): Delete declaration.
4984 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4986 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4987 after its termination.
4989 2010-08-09 Pedro Alves <pedro@codesourcery.com>
4991 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4992 (gdb_wants_all_stopped): Delete.
4993 (linux_wait_1): Don't call them.
4994 * server.c (handle_v_cont): Tag all threads as want-stopped.
4995 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4996 stopped as "client-wants-stopped".
4998 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5000 * Makefile.in (signals_h): New.
5001 (server_h): Depend on it.
5002 (server.o): Don't depend on $(signals_def).
5003 (signals.o): Depend on $(signals_def).
5005 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5007 * Makefile.in (signals_def): New.
5008 (server_h): Append include/gdb/signals.h and signals_def.
5009 (server.o): Append signals_def.
5011 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5013 * server.c (handle_target_event): Use target_signal_to_host for
5014 resume_info.sig initialization.
5015 * target.h (struct thread_resume) <sig>: New comment.
5017 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5019 * server.c (handle_query): strcpy() the returned string from paddress()
5020 instead of sprintf().
5021 * utils.c (paddress): Return phex_nz().
5023 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5025 * server.c (handle_v_cont): Call mourn_inferior if process
5027 (myresume): Likewise.
5029 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5031 Static tracepoints, and integration with UST.
5033 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5034 * mem-break.c (uninsert_all_breakpoints)
5035 (reinsert_all_breakpoints): New.
5036 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5037 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5038 (gdb_agent_ust_loaded, helper_thread_id)
5039 (gdb_agent_helper_thread_id): New macros.
5040 (struct ipa_sym_addresses): Add addr_ust_loaded,
5041 addr_helper_thread_id, addr_cmd_buf.
5042 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5043 (in_process_agent_loaded_ust): New.
5044 (write_e_ust_not_loaded): New.
5045 (maybe_write_ipa_ust_not_loaded): New.
5046 (struct collect_static_trace_data_action): New.
5047 (enum tracepoint_type) <static_tracepoint>: New.
5048 (struct tracepoint) <handle>: Mention static tracepoints.
5049 (struct static_tracepoint_ctx): New.
5050 (CMD_BUF_SIZE): New.
5051 (add_tracepoint_action): Handle static tracepoint actions.
5052 (unprobe_marker_at): New.
5053 (clear_installed_tracepoints): Handle static tracepoints.
5054 (cmd_qtdp): Handle static tracepoints.
5055 (probe_marker_at): New.
5056 (cmd_qtstart): Handle static tracepoints.
5057 (response_tracepoint): Handle static tracepoints.
5058 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5059 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5060 (get_context_regcache): Handle static tracepoints.
5061 (do_action_at_tracepoint): Handle static tracepoint actions.
5062 (traceframe_find_block_type): Handle static trace data blocks.
5063 (traceframe_read_sdata): New.
5064 (download_tracepoints): Download static tracepoint actions.
5065 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5066 (GDB_PROBE_NAME): New.
5071 (ust_marker_to_static_tracepoint): New.
5073 (collect_ust_data_at_tracepoint): New.
5074 (gdb_ust_probe): New.
5075 (UNIX_PATH_MAX, SOCK_DIR): New.
5076 (gdb_ust_connect_sync_socket): New.
5077 (resume_thread, stop_thread): New.
5078 (run_inferior_command): New.
5079 (init_named_socket): New.
5080 (gdb_ust_socket_init): New.
5081 (cstr_to_hexstr): New.
5083 (first_marker, next_marker): New.
5084 (response_ust_marker): New.
5085 (cmd_qtfstm, cmd_qtsstm): New.
5086 (unprobe_marker_at, probe_marker_at): New.
5087 (cmd_qtstmat, gdb_ust_thread): New.
5088 (gdb_ust_init): New.
5089 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5090 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5092 (x86_64_st_collect_regmap): New.
5093 (X86_64_NUM_ST_COLLECT_GREGS): New.
5094 (AMD64_RIP_REGNUM): New.
5095 (supply_static_tracepoint_registers): New.
5096 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5098 (i386_st_collect_regmap): New.
5099 (i386_NUM_ST_COLLECT_GREGS): New.
5100 (supply_static_tracepoint_registers): New.
5101 * server.c (handle_query): Handle qXfer:statictrace:read.
5102 <qSupported>: Report support for StaticTracepoints, and
5103 qXfer:statictrace:read features.
5104 * server.h (traceframe_read_sdata)
5105 (supply_static_tracepoint_registers): Declare.
5106 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5107 (unpack_varlen_hex): Include in IPA build.
5108 * Makefile.in (ustlibs, ustinc): New.
5109 (IPA_OBJS): Add remote-utils-ipa.o.
5110 ($(IPA_LIB)): Link -ldl and -lpthread.
5112 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5113 * config.in, configure: Regenerate.
5115 2010-06-20 Ian Lance Taylor <iant@google.com>
5116 Pedro Alves <pedro@codesourcery.com>
5118 * linux-x86-low.c (always_true): Delete.
5119 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5120 trying to fool the compiler with always_true.
5122 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5124 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5125 conditions in gdbserver.
5127 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5129 * spu-low.c (spu_read_memory): Wrap around local store limit.
5130 (spu_write_memory): Likewise.
5132 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5134 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5135 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5137 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5139 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5140 uses with LONGEST uses.
5142 2010-06-14 Stan Shebs <stan@codesourcery.com>
5143 Pedro Alves <pedro@codesourcery.com>
5147 * linux-x86-low.c: Include limits.h.
5152 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5153 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5154 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5155 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5156 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5157 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5158 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5159 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5160 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5161 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5162 (amd64_emit_void_call_2): New.
5163 (amd64_emit_ops): New.
5164 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5165 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5166 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5167 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5168 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5169 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5170 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5171 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5172 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5173 (i386_emit_stack_adjust, i386_emit_int_call_1)
5174 (i386_emit_void_call_2): New.
5175 (i386_emit_ops): New.
5176 (x86_emit_ops): New.
5177 (the_low_target): Install x86_emit_ops.
5178 * server.h (struct emit_ops): New.
5179 (get_raw_reg_func_addr): Declare.
5180 (current_insn_ptr, emit_error): Declare.
5181 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5182 (set_trace_state_variable_value): New defines.
5183 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5184 addr_get_trace_state_variable_value and
5185 addr_set_trace_state_variable_value.
5186 (symbol_list): New fields for get_raw_reg,
5187 get_trace_state_variable_value and set_trace_state_variable_value.
5188 (condfn): New typedef.
5189 (struct tracepoint): New field `compiled_cond'.
5190 (do_action_at_tracepoint): Clear compiled_cond.
5191 (get_trace_state_variable_value, set_trace_state_variable_value):
5193 (condition_true_at_tracepoint): If there's a compiled condition,
5195 (current_insn_ptr, emit_error): New globals.
5196 (struct bytecode_address): New.
5197 (get_raw_reg_func_addr): New.
5198 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5199 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5200 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5201 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5202 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5203 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5204 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5205 (compile_tracepoint_condition, compile_bytecodes): New.
5206 * target.h (emit_ops): Forward declare.
5207 (struct target_ops): New field emit_ops.
5208 (target_emit_ops): New.
5209 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5210 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5211 * linux-low.c (linux_emit_ops): New.
5212 (linux_target_ops): Install it.
5213 * linux-low.h (struct linux_target_ops): New field emit_ops.
5215 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5217 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5218 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5220 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5221 Stan Shebs <stan@codesourcery.com>
5223 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5224 (all): Depend on $(extra_libraries).
5225 (install-only): Install the IPA.
5226 (IPA_OBJS, IPA_LIB): New.
5227 (clean): Remove the IPA lib.
5228 (IPAGENT_CFLAGS): New.
5229 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5230 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5231 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5232 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5233 * configure.ac: Check for atomic builtins support in the compiler.
5234 (IPA_DEPFILES, extra_libraries): Define.
5235 * configure.srv (ipa_obj): Add description.
5236 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5237 (i[34567]86-*-linux*): Set ipa_obj.
5238 (x86_64-*-linux*): Set ipa_obj.
5239 * linux-low.c (stabilizing_threads): New.
5240 (supports_fast_tracepoints): New.
5241 (linux_detach): Stabilize threads before detaching.
5242 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5243 the lwp is either not stabilizing, or is moving out of a jump pad.
5244 (linux_fast_tracepoint_collecting): New.
5245 (maybe_move_out_of_jump_pad): New.
5246 (enqueue_one_deferred_signal): New.
5247 (dequeue_one_deferred_signal): New.
5248 (linux_wait_for_event_1): If moving out of a jump pad, defer
5249 pending signals to later.
5250 (linux_stabilize_threads): New.
5251 (linux_wait_1): Check if threads need moving out of jump pads, and
5253 (stuck_in_jump_pad_callback): New.
5254 (move_out_of_jump_pad_callback): New.
5256 (linux_resume_one_lwp): Handle moving out of jump pads.
5257 (linux_set_resume_request): Dequeue deferred signals.
5258 (need_step_over_p): Also step over fast tracepoint jumps.
5259 (start_step_over): Also uninsert fast tracepoint jumps.
5260 (finish_step_over): Also reinsert fast tracepoint jumps.
5261 (linux_install_fast_tracepoint_jump): New.
5262 (linux_target_ops): Install linux_stabilize_threads and
5263 linux_install_fast_tracepoint_jump_pad.
5264 * linux-low.h (linux_target_ops) <get_thread_area,
5265 install_fast_tracepoint_jump_pad>: New fields.
5266 (struct lwp_info) <collecting_fast_tracepoint,
5267 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5268 (linux_get_thread_area): Declare.
5269 * linux-x86-low.c (jump_insn): New.
5270 (x86_get_thread_area): New.
5271 (append_insns): New.
5273 (amd64_install_fast_tracepoint_jump_pad): New.
5274 (i386_install_fast_tracepoint_jump_pad): New.
5275 (x86_install_fast_tracepoint_jump_pad): New.
5276 (the_low_target): Install x86_get_thread_area and
5277 x86_install_fast_tracepoint_jump_pad.
5278 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5279 (struct fast_tracepoint_jump): New.
5280 (fast_tracepoint_jump_insn): New.
5281 (fast_tracepoint_jump_shadow): New.
5282 (find_fast_tracepoint_jump_at): New.
5283 (fast_tracepoint_jump_here): New.
5284 (delete_fast_tracepoint_jump): New.
5285 (set_fast_tracepoint_jump): New.
5286 (uninsert_fast_tracepoint_jumps_at): New.
5287 (reinsert_fast_tracepoint_jumps_at): New.
5288 (set_breakpoint_at): Use write_inferior_memory.
5289 (uninsert_raw_breakpoint): Use write_inferior_memory.
5290 (check_mem_read): Mask out fast tracepoint jumps.
5291 (check_mem_write): Mask out fast tracepoint jumps.
5292 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5293 (set_fast_tracepoint_jump): Declare.
5294 (delete_fast_tracepoint_jump)
5295 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5296 (reinsert_fast_tracepoint_jumps_at): Declare.
5297 * regcache.c: Don't compile many functions when building the
5298 in-process agent library.
5299 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5300 the register buffer in the heap.
5301 (free_register_cache): If the register buffer isn't owned by the
5302 regcache, don't free it.
5303 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5304 pre-existing register caches.
5305 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5307 (convert_ascii_to_int): : Constify `from' parameter type.
5308 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5309 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5310 the needed buffer in-place.
5311 (relocate_instruction): New.
5312 * server.c (handle_query) <qSymbols>: If the target supports
5313 tracepoints, give it a chance of looking up symbols. Report
5314 support for fast tracepoints.
5315 (handle_status): Stabilize threads.
5316 (process_serial_event): Adjust.
5317 * server.h (struct fast_tracepoint_jump): Forward declare.
5318 (struct process_info) <fast_tracepoint_jumps>: New field.
5319 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5320 (decode_X_packet, decode_M_packet): Adjust.
5321 (relocate_instruction): Declare.
5322 (in_process_agent_loaded): Declare.
5323 (tracepoint_look_up_symbols): Declare.
5324 (struct fast_tpoint_collect_status): Declare.
5325 (fast_tracepoint_collecting): Declare.
5326 (force_unlock_trace_buffer): Declare.
5327 (handle_tracepoint_bkpts): Declare.
5328 (initialize_low_tracepoint)
5329 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5330 * target.h (struct target_ops) <stabilize_threads,
5331 install_fast_tracepoint_jump_pad>: New fields.
5332 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5333 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5334 [HAVE_STDINT_H]: Include stdint.h.
5335 (trace_debug_1): Rename to ...
5336 (trace_vdebug): ... this.
5337 (trace_debug): Rename to ...
5338 (trace_debug_1): ... this. Add `level' parameter.
5340 (ATTR_USED, ATTR_NOINLINE): New.
5341 (IP_AGENT_EXPORT): New.
5342 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5343 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5344 (about_to_request_buffer_space, trace_buffer_is_full)
5345 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5346 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5347 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5348 (traceframe_write_count, traceframes_created)
5349 (trace_state_variables)
5350 New renaming defines.
5351 (struct ipa_sym_addresses): New.
5352 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5354 (ipa_sym_addrs): New.
5355 (all_tracepoint_symbols_looked_up): New.
5356 (in_process_agent_loaded): New.
5357 (write_e_ipa_not_loaded): New.
5358 (maybe_write_ipa_not_loaded): New.
5359 (tracepoint_look_up_symbols): New.
5360 (debug_threads) [IN_PROCESS_AGENT]: New.
5361 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5362 (UNKNOWN_SIDE_EFFECTS): New.
5363 (stop_tracing): New.
5364 (flush_trace_buffer): New.
5365 (stop_tracing_bkpt): New.
5366 (flush_trace_buffer_bkpt): New.
5367 (read_inferior_integer): New.
5368 (read_inferior_uinteger): New.
5369 (read_inferior_data_pointer): New.
5370 (write_inferior_data_pointer): New.
5371 (write_inferior_integer): New.
5372 (write_inferior_uinteger): New.
5373 (struct collect_static_trace_data_action): Delete.
5374 (enum tracepoint_type): New.
5375 (struct tracepoint) <type>: New field `type'.
5376 <actions_str, step_actions, step_actions_str>: Only include in
5378 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5379 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5380 (tracepoints): Use IP_AGENT_EXPORT.
5381 (last_tracepoint): Don't include in the IPA.
5382 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5383 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5384 (alloced_trace_state_variables): New.
5385 (trace_state_variables): Use IP_AGENT_EXPORT.
5386 (traceframe_t): Delete unused variable.
5387 (circular_trace_buffer): Don't include in the IPA.
5388 (trace_buffer_start): Delete.
5389 (struct trace_buffer_control): New.
5390 (trace_buffer_free): Delete.
5391 (struct ipa_trace_buffer_control): New.
5392 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5393 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5395 (trace_buffer_ctrl): New.
5396 (TRACE_BUFFER_CTRL_CURR): New.
5397 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5398 Reimplement as macros.
5399 (trace_buffer_wrap): Delete.
5400 (traceframe_write_count, traceframe_read_count)
5401 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5402 (struct tracepoint_hit_ctx) <type>: New field.
5403 (struct fast_tracepoint_ctx): New.
5404 (memory_barrier): New.
5406 (record_tracepoint_error): Update atomically in the IPA.
5407 (clear_inferior_trace_buffer): New.
5408 (about_to_request_buffer_space): New.
5409 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5410 updating the same buffer.
5411 (add_tracepoint): Default the tracepoint's type to trap
5412 tracepoint, and orig_size to -1.
5413 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5415 (create_trace_state_variable): New parameter `gdb'. Handle it.
5416 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5417 (cmd_qtdp): Handle fast tracepoints.
5419 (max_jump_pad_size): New.
5420 (gdb_jump_pad_head): New.
5421 (get_jump_space_head): New.
5422 (claim_jump_space): New.
5423 (sort_tracepoints): New.
5424 (MAX_JUMP_SIZE): New.
5425 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5427 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5428 support. Upload fast traceframes, and delete internal IPA
5430 (stop_tracing_handler): New.
5431 (flush_trace_buffer_handler): New.
5432 (cmd_qtstop): Upload fast tracepoints.
5433 (response_tracepoint): Handle fast tracepoints.
5434 (tracepoint_finished_step): Upload fast traceframes. Set the
5435 tracepoint hit context's tracepoint type.
5436 (handle_tracepoint_bkpts): New.
5437 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5438 type. Add comment about fast tracepoints.
5439 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5440 non-existing action_str field.
5441 (get_context_regcache): Handle fast tracepoints.
5442 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5444 (fast_tracepoint_from_jump_pad_address): New.
5445 (fast_tracepoint_from_ipa_tpoint_address): New.
5446 (collecting_t): New.
5447 (force_unlock_trace_buffer): New.
5448 (fast_tracepoint_collecting): New.
5451 (write_inferior_data_ptr): New.
5452 (target_tp_heap): New.
5453 (target_malloc): New.
5454 (download_agent_expr): New.
5456 (download_tracepoints): New.
5457 (download_trace_state_variables): New.
5458 (upload_fast_traceframes): New.
5459 (IPA_FIRST_TRACEFRAME): New.
5460 (IPA_NEXT_TRACEFRAME_1): New.
5461 (IPA_NEXT_TRACEFRAME): New.
5462 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5463 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5464 (gdb_jump_pad_buffer_end): New.
5465 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5466 (initialize_tracepoint): Adjust.
5467 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5468 buffer. Initialize the low module.
5469 * utils.c (PREFIX, TOOLNAME): New.
5470 (malloc_failure): Use PREFIX.
5471 (error): In the IPA, an error causes an exit.
5472 (fatal, warning): Use PREFIX.
5473 (internal_error): Use TOOLNAME.
5474 (NUMCELLS): Increase to 10.
5475 * configure, config.in: Regenerate.
5477 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5479 * server.c (handle_query) <qSupported>: Do two passes over the
5480 qSupported string to avoid nesting strtok.
5482 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5484 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5486 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5488 * configure: Regenerate.
5489 * proc-service.list: New.
5491 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5493 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5496 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5498 * gdbreplay.c (remote_open): Check error return from socket() call by
5499 its equality to -1 not by it being negative.
5500 * remote-utils.c (remote_open): Likewise.
5502 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5504 * config.h: Regenerate.
5506 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5508 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5509 doesn't provide PTRACE_GET_THREAD_AREA.
5511 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5513 * linux-m68k-low.c: Include <asm/ptrace.h>
5514 (ps_get_thread_area): Implement.
5516 2010-05-03 Doug Evans <dje@google.com>
5518 * event-loop.c (struct callback_event): New struct.
5519 (callback_list): New global.
5520 (append_callback_event, delete_callback_event): New functions.
5521 (process_callback): New function.
5522 (start_event_loop): Call it.
5523 * remote-utils.c (NOT_SCHEDULED): Define.
5524 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5525 moved out of readchar.
5526 (readchar): Rewrite. Call reschedule before returning.
5527 (reset_readchar): New function.
5528 (remote_close): Call it.
5529 (process_remaining, reschedule): New functions.
5530 * server.h (callback_handler_func): New typedef.
5531 (append_callback_event, delete_callback_event): Declare.
5533 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5535 * proc-service.c (ps_pglobal_lookup): Use
5536 thread_db_look_up_one_symbol.
5537 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5538 parameter. Use it instead of all_symbols_looked_up.
5539 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5541 (all_symbols_looked_up): Don't declare.
5542 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5543 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5545 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5546 Set all_symbols_looked_up here.
5547 (thread_db_look_up_one_symbol): New.
5548 (thread_db_get_tls_address): Adjust.
5549 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5550 thread_db object on the heap, and tentatively set it in the
5552 (thread_db_init): Don't set all_symbols_looked_up here.
5553 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5555 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5557 * linux-low.c (linux_kill, linux_detach): Adjust.
5558 (status_pending_p_callback): Remove redundant statement. Check
5559 for !TARGET_WAITIKIND_IGNORE, instead of
5560 TARGET_WAITKIND_STOPPED.
5561 (handle_tracepoints): Make sure LWP is locked. Adjust.
5562 (linux_wait_for_event_1): Adjust.
5563 (linux_cancel_breakpoints): New.
5564 (unsuspend_one_lwp): New.
5565 (unsuspend_all_lwps): New.
5566 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5567 (send_sigstop_callback): Change return type to int, add new
5568 `except' parameter and handle it.
5569 (suspend_and_send_sigstop_callback): New.
5570 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5571 pass them down. If SUSPEND, also increment the lwp's suspend
5573 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5574 (need_step_over_p): Don't consider suspended LWPs.
5575 (start_step_over): Adjust.
5576 (proceed_one_lwp): Change return type to int, add new `except'
5577 parameter and handle it.
5578 (unsuspend_and_proceed_one_lwp): New.
5579 (proceed_all_lwps): Use find_inferior instead of
5581 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5582 also decrement the suspend count of LWPs. Pass `except' down,
5583 instead of hacking its suspend count.
5584 (linux_pause_all): Add `freeze' parameter. Adjust.
5585 (linux_unpause_all): New.
5586 (linux_target_ops): Install linux_unpause_all.
5587 * server.c (handle_status): Adjust.
5588 * target.h (struct target_ops): New fields `unpause_all' and
5589 `cancel_breakpoints'. Add new parameter to `pause_all'.
5590 (pause_all): Add new `freeze' parameter.
5592 (cancel_breakpoints): New.
5593 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5595 (cmd_qtstart): Pause threads.
5596 (stop_tracing): Pause threads, and cancel breakpoints.
5597 * win32-low.c (win32_target_ops): Adjust.
5599 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5601 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5602 the inferior right away from here...
5603 (linux_wait_1): ... to here, and adjust to check the thread's
5604 last_resume_kind instead of the lwp's step or stop_expected flags.
5606 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5608 * README: Use consistent `GDB' and `GDBserver' spellings.
5610 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5612 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5613 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5614 (linux_detach_one_lwp): Assume the lwp is stopped.
5615 (any_thread_of): Delete.
5616 (linux_detach): Stop all lwps here. Don't blindly delete all
5618 (delete_lwp_callback): New.
5619 (linux_mourn): Delete all lwps of the process that is gone.
5620 (linux_wait_1): Don't delete the last lwp of the process here.
5621 * mem-break.h (mark_breakpoints_out): Declare.
5622 * mem-break.c (mark_breakpoints_out): New.
5623 (free_all_breakpoints): Use it.
5624 * server.c (handle_target_event): If the process is gone, mark
5626 * thread-db.c (struct thread_db) <create_bp>: New field.
5627 (thread_db_enable_reporting): Fix prototype. Store a thread event
5628 breakpoint reference in the thread_db struct.
5629 (thread_db_load_search): Clear the thread_db object.
5630 (try_thread_db_load_1): Ditto.
5631 (switch_to_process): New.
5632 (disable_thread_event_reporting): Use it.
5633 (remove_thread_event_breakpoints): New.
5634 (thread_db_detach, thread_db_mourn): Use it.
5636 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5638 * linux-low.c (linux_enable_event_reporting): New.
5639 (linux_wait_for_event_1, handle_extended_wait): Use it.
5641 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5643 * linux-low.c (linux_kill_one_lwp, linux_kill)
5644 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5645 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5646 SIGSTOP even if the LWP is stopped.
5647 (send_sigstop_callback): New.
5648 (stop_all_lwps): Use send_sigstop_callback instead.
5649 (linux_resume_one_thread): Adjust.
5650 (proceed_one_lwp): Still proceed an LWP that the client has
5651 requested to stop, if we haven't reported it as stopped yet. Make
5652 sure that LWPs the client want stopped, have a pending SIGSTOP.
5654 2010-04-26 Doug Evans <dje@google.com>
5656 * server.c (handle_general_set): Make static.
5658 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5659 Print received char after testing for error/eof instead of before.
5660 (input_interrupt): Tweak comment.
5662 2010-04-23 Doug Evans <dje@google.com>
5664 * server.c (start_inferior): Print inferior argv if --debug.
5666 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5668 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5669 * nto-x86-low.c: Include server.h
5671 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5673 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5674 be consistent with other sources of this directory.
5675 (init_registers_amd64): Correct name of source file of this function
5678 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5680 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5683 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5685 * win32-i386-low.c: Add 64-bit support.
5686 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5687 (init_registers_amd64): Declare.
5688 (mappings): Add 64-bit version of array.
5689 (init_windows_x86): New function.
5690 (the_low_target): Change init_arch field to init_windows_x86.
5692 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5694 * win32-low.c: Adapt to support also 64-bit architecture.
5695 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5696 (get_image_name): Use SIZE_T type for local variable `done'.
5697 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5698 (toolhelp_get_dll_name): Idem.
5699 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5700 Use uintptr_t typecast to avoid warning.
5701 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5702 (handle_exception): Use phex_nz to avoid warning.
5703 (win32_wait): Remove unused local variable `process'.
5705 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5707 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5710 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5712 * configure.ac: Use `ws2_32' library for srv_mingw.
5713 * configure: Regenerate.
5714 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5715 * remote-utils.c: Likewise.
5717 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5719 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5720 if __x86_64__ is defined.
5722 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5724 * configure: Regenerate.
5726 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5728 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5729 * target.h (target_ops): New get_tib_address field.
5730 * win32-low.h (win32_thread_info): Add thread_local_base field.
5731 * win32-low.c (child_add_thread): Add tlb argument.
5732 Set thread_local_base field to TLB.
5733 (get_child_debug_event): Adapt to child_add_thread change.
5734 (win32_get_tib_address): New function.
5735 (win32_target_ops): Set get_tib_address field to
5736 win32_get_tib_address.
5737 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5739 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5741 * linux-low.c (linux_mourn): Also remove the process.
5742 * server.c (handle_target_event): Don't remove the process here.
5743 * nto-low.c (nto_mourn): New.
5744 (nto_target_ops): Install it.
5745 * spu-low.c (spu_mourn): New.
5746 (spu_target_ops): Install it.
5747 * win32-low.c (win32_mourn): New.
5748 (win32_target_ops): Install it.
5750 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5752 * server.h (buffer_xml_printf): Remove redundant `;'.
5754 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5756 * regcache.c (set_register_cache): Invalidate regcaches before
5757 changing the register cache layout.
5758 (regcache_invalidate_one): Allow a NULL regcache.
5759 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5760 regcaches before changing the register cache layout or the target
5763 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5765 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5766 variable warning on Linux/x86-64.
5768 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5770 GDBserver disconnected tracing support.
5772 * linux-low.c (linux_remove_process): Delete.
5773 (add_lwp): Don't set last_resume_kind here.
5774 (linux_kill): Use `mourn'.
5775 (linux_detach): Use `thread_db_detach', and `mourn'.
5777 (linux_attach_lwp_1): Adjust comment.
5778 (linux_attach): last_resume_kind moved the thread_info; adjust.
5779 (status_pending_p_callback): Adjust.
5780 (linux_wait_for_event_1): Adjust.
5781 (count_events_callback, select_singlestep_lwp_callback)
5782 (select_event_lwp_callback, cancel_breakpoints_callback)
5783 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5784 (proceed_one_lwp): Adjust.
5785 (linux_async): Add debug output.
5786 (linux_thread_stopped): New.
5787 (linux_pause_all): New.
5788 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5790 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5791 (thread_db_free): Delete declaration.
5792 (thread_db_detach, thread_db_mourn): Declare.
5793 * thread-db.c (thread_db_init): Use thread_db_mourn.
5794 (thread_db_free): Delete, split in two.
5795 (disable_thread_event_reporting): New.
5796 (thread_db_detach): New.
5797 (thread_db_mourn): New.
5799 * server.h (struct thread_info) <last_resume_kind>: New field.
5800 <attached>: Add comment.
5801 <gdb_detached>: New field.
5802 (handler_func): Change return type to int.
5803 (handle_serial_event, handle_target_event): Ditto.
5804 (gdb_connected): Declare.
5806 (disconnected_tracing): Declare.
5807 (stop_tracing): Declare.
5809 * server.c (handle_query) <qSupported>: Report support for
5810 disconnected tracing.
5811 (queue_stop_reply_callback): Account for running threads.
5812 (gdb_wants_thread_stopped): New.
5813 (gdb_wants_all_threads_stopped): New.
5814 (gdb_reattached_process): New.
5815 (handle_status): Clear the `gdb_detached' flag of all processes.
5816 In all-stop, stop all threads.
5817 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5818 (process_serial_event): If the remote connection breaks, or if an
5819 exit was forced with "monitor exit", force an event loop exit.
5820 Handle disconnected tracing on detach.
5821 (handle_serial_event): Adjust.
5822 (handle_target_event): If GDB isn't connected, forward events back
5823 to the inferior, unless the last process exited, in which case,
5824 exit gdbserver. Adjust interface.
5826 * remote-utils.c (remote_open): Don't block in accept. Instead
5827 register an event loop source on the listen socket file
5828 descriptor. Refactor bits into ...
5829 (listen_desc): ... this new global.
5830 (gdb_connected): ... this new function.
5831 (enable_async_notification): ... this new function.
5832 (handle_accept_event): ... this new function.
5833 (remote_close): Clear remote_desc.
5835 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5837 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5839 (mourn_inferior): Define.
5840 (target_process_qsupported): Avoid the dangling else problem.
5841 (thread_stopped): Define.
5842 (pause_all): Define.
5843 (target_waitstatus_to_string): Declare.
5844 * target.c (target_waitstatus_to_string): New.
5846 * tracepoint.c (tracing): Make extern.
5847 (disconnected_tracing): New.
5848 (stop_tracing): Make extern. Handle tracing stops due to GDB
5850 (cmd_qtdisconnected): New.
5851 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5852 (handle_tracepoint_general_set): Handle QTDisconnected.
5854 * event-loop.c (event_handler_func): Change return type to int.
5855 (process_event): Bail out if the event handler wants the event
5857 (handle_file_event): Ditto.
5858 (start_event_loop): Bail out if the event handler wants the event
5861 * nto-low.c (nto_target_ops): Adjust.
5862 * spu-low.c (spu_wait): Don't remove the process here.
5863 (spu_target_ops): Adjust.
5864 * win32-low.c (win32_wait): Don't remove the process here.
5865 (win32_target_ops): Adjust.
5867 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5869 * regcache.c (realloc_register_cache): Invalidate inferior's
5870 regcache before recreating it.
5872 2010-04-09 Pedro Alves <pedro@codesourcery.com>
5874 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5876 2010-04-09 Stan Shebs <stan@codesourcery.com>
5877 Pedro Alves <pedro@codesourcery.com>
5879 * server.h (LONGEST): New.
5880 (struct thread_info) <while_stepping>: New field.
5881 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5883 (initialize_tracepoint, handle_tracepoint_general_set)
5884 (handle_tracepoint_query, tracepoint_finished_step)
5885 (tracepoint_was_hit, release_while_stepping_state_list):
5886 (current_traceframe): Declare.
5887 * server.c (handle_general_set): Handle tracepoint packets.
5889 (write_memory): New.
5890 (handle_search_memory_1): Use read_memory.
5891 (handle_query): Report support for conditional tracepoints, trace
5892 state variables, and tracepoint sources. Handle tracepoint
5894 (main): Initialize the tracepoints module.
5895 (process_serial_event): Handle traceframe reads/writes.
5897 * linux-low.c (handle_tracepoints): New.
5898 (linux_wait_1): Call it.
5899 (linux_resume_one_lwp): Handle while-stepping.
5900 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5901 (linux_target_ops): Install them.
5902 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5904 * linux-x86-low.c (x86_supports_tracepoints): New.
5905 (the_low_target). Install it.
5907 * mem-break.h (delete_breakpoint): Declare.
5908 * mem-break.c (delete_breakpoint): Make external.
5910 * target.h (struct target_ops): Add `supports_tracepoints',
5911 `read_pc', and `write_pc' fields.
5912 (target_supports_tracepoints): Define.
5913 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5916 * regcache.h (struct regcache) <registers_owned>: New field.
5917 (init_register_cache, regcache_cpy): Declare.
5918 (regcache_read_pc, regcache_write_pc): Declare.
5919 (register_cache_size): Declare.
5920 (supply_regblock): Declare.
5921 * regcache.c (init_register_cache): New.
5922 (new_register_cache): Use it.
5923 (regcache_cpy): New.
5924 (register_cache_size): New.
5925 (supply_regblock): New.
5926 (regcache_read_pc, regcache_write_pc): New.
5928 * tracepoint.c: New.
5930 * Makefile.in (OBS): Add tracepoint.o.
5931 (tracepoint.o): New rule.
5933 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5935 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5937 (i386-mmx.c): Likewise.
5938 (i386-mmx-linux.o): Likewise.
5939 (i386-mmx-linux.c): Likewise.
5941 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5942 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5943 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5944 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5946 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5947 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5948 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5950 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5952 * Makefile.in (clean): Updated.
5954 (i386-avx.c): Likewise.
5955 (i386-avx-linux.o): Likewise.
5956 (i386-avx-linux.c): Likewise.
5957 (amd64-avx.o): Likewise.
5958 (amd64-avx.c): Likewise.
5959 (amd64-avx-linux.o): Likewise.
5960 (amd64-avx-linux.c): Likewise.
5962 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5963 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5964 (srv_amd64_regobj): Add amd64-avx.o.
5965 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5966 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5967 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5968 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5969 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5970 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5971 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5973 * i387-fp.c: Include "i386-xstate.h".
5975 (i387_cache_to_xsave): Likewise.
5976 (i387_xsave_to_cache): Likewise.
5977 (x86_xcr0): Likewise.
5979 * i387-fp.h (i387_cache_to_xsave): Likewise.
5980 (i387_xsave_to_cache): Likewise.
5981 (x86_xcr0): Likewise.
5983 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5984 * linux-crisv32-low.c (target_regsets): Likewise.
5985 * linux-m68k-low.c (target_regsets): Likewise.
5986 * linux-mips-low.c (target_regsets): Likewise.
5987 * linux-ppc-low.c (target_regsets): Likewise.
5988 * linux-s390-low.c (target_regsets): Likewise.
5989 * linux-sh-low.c (target_regsets): Likewise.
5990 * linux-sparc-low.c (target_regsets): Likewise.
5991 * linux-xtensa-low.c (target_regsets): Likewise.
5993 * linux-low.c: Include <sys/uio.h>.
5994 (regsets_fetch_inferior_registers): Support nt_type.
5995 (regsets_store_inferior_registers): Likewise.
5996 (linux_process_qsupported): New.
5997 (linux_target_ops): Add linux_process_qsupported.
5999 * linux-low.h (regset_info): Add nt_type.
6000 (linux_target_ops): Add process_qsupported.
6002 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6004 (init_registers_i386_avx_linux): New.
6005 (init_registers_amd64_avx_linux): Likewise.
6006 (xmltarget_i386_linux_no_xml): Likewise.
6007 (xmltarget_amd64_linux_no_xml): Likewise.
6008 (PTRACE_GETREGSET): Likewise.
6009 (PTRACE_SETREGSET): Likewise.
6010 (x86_fill_xstateregset): Likewise.
6011 (x86_store_xstateregset): Likewise.
6012 (use_xml): Likewise.
6013 (x86_linux_update_xmltarget): Likewise.
6014 (x86_linux_process_qsupported): Likewise.
6015 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6016 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6017 init_registers_i386_linux here. Call
6018 x86_linux_update_xmltarget.
6019 (the_low_target): Add x86_linux_process_qsupported.
6021 * server.c (handle_query): Call target_process_qsupported.
6023 * target.h (target_ops): Add process_qsupported.
6024 (target_process_qsupported): New.
6026 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6028 * inferiors.c (add_thread): Set last_status kind to
6029 TARGET_WAITKIND_IGNORE.
6030 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6031 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6032 (linux_wait_1): Move `thread' local definition to block that uses
6033 it. Don't NULL initialize `event_child'.
6034 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6035 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6036 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6038 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6040 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6041 an extended waitstatus, or by a watchpoint.
6042 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6043 thread was stepping or has been stopped by a watchpoint.
6045 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6047 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6048 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6049 of another, then delete the previous, and validate all
6051 (validate_inserted_breakpoint): New.
6052 (delete_disabled_breakpoints): New.
6053 (validate_breakpoints): New.
6054 (check_mem_read): Validate breakpoints before trusting their
6055 shadow. Delete disabled breakpoints.
6056 (check_mem_write): Validate breakpoints before trusting they
6057 should be inserted. Delete disabled breakpoints.
6058 * mem-break.h (validate_breakpoints):
6059 * server.c (handle_query): Validate breakpoints when we see a
6062 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6064 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6065 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6066 if we could tell there's a GDB breakpoint at stop_pc.
6067 (need_step_over_p): Don't do a step over if we find a GDB
6068 breakpoint at the resume PC.
6070 * mem-break.c (struct raw_breakpoint): New.
6071 (enum bkpt_type): New type `gdb_breakpoint'.
6072 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6073 fields. New field `raw'.
6074 (find_raw_breakpoint_at): New.
6075 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6077 (set_breakpoint_at): Adjust.
6078 (delete_raw_breakpoint): New.
6079 (release_breakpoint): New.
6080 (delete_breakpoint): Rename to...
6081 (delete_breakpoint_1): ... this. Add proc parameter. Use
6082 release_breakpoint. Return ENOENT.
6083 (delete_breakpoint): Reimplement.
6084 (find_breakpoint_at): Delete.
6085 (find_gdb_breakpoint_at): New.
6086 (delete_breakpoint_at): Delete.
6087 (set_gdb_breakpoint_at): New.
6088 (delete_gdb_breakpoint_at): New.
6089 (gdb_breakpoint_here): New.
6090 (set_reinsert_breakpoint): Use release_breakpoint.
6091 (uninsert_breakpoint): Rename to ...
6092 (uninsert_raw_breakpoint): ... this.
6093 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6094 (reinsert_raw_breakpoint): Change parameter type to
6096 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6098 (check_breakpoints): Adjust. Use release_breakpoint.
6099 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6100 (breakpoint_inserted_here): Ditto.
6101 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6102 Don't trust the breakpoint's shadow if it is not inserted.
6103 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6104 (delete_all_breakpoints): Adjust.
6105 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6106 use delete_breakpoint_1.
6108 * mem-break.h (breakpoints_supported): Delete declaration.
6109 (set_gdb_breakpoint_at): Declare.
6110 (gdb_breakpoint_here): Declare.
6111 (delete_breakpoint_at): Delete.
6112 (delete_gdb_breakpoint_at): Declare.
6114 * server.h (struct raw_breakpoint): Forward declare.
6115 (struct process_info): New field `raw_breakpoints'.
6117 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6120 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6122 * linux-low.c (status_pending_p_callback): Fix comment.
6123 (linux_wait_for_event_1): Move most of the internal breakpoint
6124 handling from here...
6125 (linux_wait_1): ... to here.
6126 (count_events_callback): New.
6127 (select_singlestep_lwp_callback): New.
6128 (select_event_lwp_callback): New.
6129 (cancel_breakpoints_callback): New.
6130 (select_event_lwp): New.
6131 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6132 priority to all LWPs that have had events that should be reported
6133 to the client. Cancel breakpoints when about to reporting the
6134 event to the client, not while stopping lwps. No longer cancel
6135 finished single-steps here.
6136 (cancel_finished_single_step): Delete.
6137 (cancel_finished_single_steps): Delete.
6139 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6141 * mem-break.c (enum bkpt_type): New.
6142 (struct breakpoint): New field `type'.
6143 (set_breakpoint_at): Change return type to struct breakpoint
6144 pointer. Set type to `other_breakpoint' by default.
6145 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6146 in the breakpoint list.
6147 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6148 (reinsert_breakpoint): Rename to ...
6149 (reinsert_raw_breakpoint): ... this.
6150 (reinsert_breakpoints_at): Adjust.
6151 * mem-break.h (struct breakpoint): Declare.
6152 (set_breakpoint_at): Change return type to struct breakpoint
6155 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6157 * server.c (handle_query): Assign, not compare.
6159 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6161 Teach linux gdbserver to step-over-breakpoints.
6163 * linux-low.c (can_hardware_single_step): New.
6164 (supports_breakpoints): New.
6165 (handle_extended_wait): If stopping threads, read the stop pc of
6168 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6169 low target doesn't support retrieving the PC.
6170 (add_lwp): Set last_resume_kind to resume_continue.
6171 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6172 (linux_attach): Don't clear stop_expected. Set the lwp's
6173 last_resume_kind to resume_stop.
6174 (linux_detach_one_lwp): Don't check for removed breakpoints.
6175 (check_removed_breakpoint): Delete.
6176 (status_pending_p): Rename to ...
6177 (status_pending_p_callback): ... this. Don't check for removed
6178 breakpoints. Don't consider threads that are stopped from GDB's
6180 (linux_wait_for_lwp): Always read the stop_pc here.
6181 (cancel_breakpoint): New.
6182 (step_over_bkpt): New global.
6183 (linux_wait_for_event_1): Implement stepping over breakpoints.
6184 (gdb_wants_lwp_stopped): New.
6185 (gdb_wants_all_stopped): New.
6186 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6187 single-step traps here. Store the thread's last reported target
6189 (send_sigstop): Don't clear stop_expected. Always set it,
6191 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6192 (cancel_finished_single_step): New.
6193 (cancel_finished_single_steps): New.
6194 (wait_for_sigstop): Don't cancel finished single-step traps here.
6195 (linux_resume_one_lwp): Don't check for removed breakpoints.
6196 Don't set `step' on non-hardware step archs.
6197 (linux_set_resume_request): Ignore resume_stop requests if already
6198 stopping or stopped. Set the lwp's last_resume_kind.
6199 (resume_status_pending_p): Don't check for removed breakpoints.
6200 (need_step_over_p): New.
6201 (start_step_over): New.
6202 (finish_step_over): New.
6203 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6204 requests. Clear the thread's last reported target waitstatus.
6205 Don't use the `suspended' flag. Don't consider pending breakpoints.
6206 (linux_resume): Start a step-over if necessary.
6207 (proceed_one_lwp): New.
6208 (proceed_all_lwps): New.
6209 (unstop_all_lwps): New.
6210 * linux-low.h (struct lwp_info): Rewrite comment for the
6211 `suspended' flag. Add the `stop_pc' field. Delete the
6212 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6213 Add `'last_resume_kind' and `need_step_over' fields.
6214 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6215 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6216 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6217 (set_raw_breakpoint_at): New.
6218 (set_breakpoint_at): Rewrite to use it.
6219 (reinsert_breakpoint_handler): Delete.
6220 (set_reinsert_breakpoint): New.
6221 (reinsert_breakpoint_by_bp): Delete.
6222 (delete_reinsert_breakpoints): New.
6223 (uninsert_breakpoint): Rewrite.
6224 (uninsert_breakpoints_at): New.
6225 (reinsert_breakpoint): Rewrite.
6226 (reinsert_breakpoints_at): New.
6227 (check_breakpoints): Rewrite.
6228 (breakpoint_here): New.
6229 (breakpoint_inserted_here): New.
6230 (check_mem_read): Adjust.
6231 * mem-break.h (breakpoints_supported, breakpoint_here)
6232 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6233 (reinsert_breakpoint_by_bp): Delete declaration.
6234 (delete_reinsert_breakpoints): Declare.
6235 (reinsert_breakpoint): Delete declaration.
6236 (reinsert_breakpoints_at): Declare.
6237 (uninsert_breakpoint): Delete declaration.
6238 (uninsert_breakpoints_at): Declare.
6239 (check_breakpoints): Adjust prototype.
6240 * server.h: Adjust include order.
6241 (struct thread_info): Declare here. Add a `last_status' field.
6243 2010-03-23 Michael Snyder <msnyder@vmware.com>
6245 * server.c (crc32): New function.
6246 (handle_query): Add handling for 'qCRC:' request.
6248 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6250 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6251 lwp had been stopped by a watchpoint.
6253 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6255 * server.h (internal_error): Declare.
6256 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6257 * utils.c (internal_error): New function.
6259 2010-03-15 Andreas Schwab <schwab@redhat.com>
6261 * configure.srv: Fix typo setting srv_regobj.
6263 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6265 * linux-low.c (fetch_register): Avoid passing a non string literal
6267 (usr_store_inferior_registers): Ditto.
6269 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6271 * linux-low.c (linux_write_memory): Bail out early if peeking
6274 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6276 * linux-low.h (struct lwp_info): New fields
6277 `stopped_by_watchpoint' and `stopped_data_address'.
6278 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6279 here, and cache them in the lwp object.
6280 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6282 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6284 (linux_stopped_by_watchpoint): Rewrite.
6285 (linux_stopped_data_address): Rewrite.
6287 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6289 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6290 switching the current inferior, not before.
6292 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6294 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6295 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6296 i386-linux.c and amd64-linux.c.
6297 (reg-i386.o): Removed.
6298 (reg-i386.c): Likewise.
6299 (reg-i386-linux.o): Likewise.
6300 (reg-i386-linux.c): Likewise.
6301 (reg-x86-64.o): Likewise.
6302 (reg-x86-64.c): Likewise.
6303 (reg-x86-64-linux.o): Likewise.
6304 (reg-x86-64-linux.c): Likewise.
6307 (i386-linux.o): Likewise.
6308 (i386-linux.c): Likewise.
6309 (amd64.o): Likewise.
6310 (amd64.c): Likewise.
6311 (amd64-linux.o): Likewise.
6312 (amd64-linux.c): Likewise.
6314 * configure.srv (srv_i386_regobj): New.
6315 (srv_i386_linux_regobj): Likewise.
6316 (srv_amd64_regobj): Likewise.
6317 (srv_amd64_linux_regobj): Likewise.
6318 (srv_i386_32bit_xmlfiles): Likewise.
6319 (srv_i386_64bit_xmlfiles): Likewise.
6320 (srv_i386_xmlfiles): Likewise.
6321 (srv_amd64_xmlfiles): Likewise.
6322 (srv_i386_linux_xmlfiles): Likewise.
6323 (srv_amd64_linux_xmlfiles): Likewise.
6324 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6325 srv_xmlfiles to $srv_i386_xmlfiles.
6326 (i[34567]86-*-mingw32ce*): Likewise.
6327 (i[34567]86-*-mingw*): Likewise.
6328 (i[34567]86-*-nto*): Likewise.
6329 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6330 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6331 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6332 (x86_64-*-linux*): Likewise.
6334 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6335 (init_registers_amd64_linux): New.
6336 (x86_arch_setup): Replace init_registers_x86_64_linux with
6337 init_registers_amd64_linux.
6339 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6341 * configure.ac: Check for libdl. If it is not available link against
6342 static libthread_db.
6343 * configure: Regenerate.
6345 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6349 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6350 handing a read watchpoint.
6351 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6353 2010-02-12 Doug Evans <dje@google.com>
6355 * linux-low.c (linux_supports_tracefork_flag): Document.
6356 (linux_look_up_symbols): Add comment.
6358 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6360 * regcache.c (supply_register): Clear regcache if buf is NULL.
6362 2010-02-02 Nicolas Roche <roche@sourceware.org>
6363 Joel Brobecker <brobecker@adacore.com>
6365 * inferiors.c (find_inferior): Add function documentation.
6366 (unloaded_dll): Handle the case where the unloaded dll has not
6367 been previously registered in the dll list.
6369 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6371 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6372 (thumb2_breakpoint): New.
6373 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6375 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6377 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6378 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6381 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6383 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6385 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6387 * linux-s390-low.c (s390_collect_ptrace_register)
6388 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6390 2010-01-21 Doug Evans <dje@google.com>
6392 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6393 (PTRACE_ARG4_TYPE): New macro.
6394 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6395 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6396 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6397 (usr_store_inferior_registers): Ditto.
6398 (linux_read_memory, linux_write_memory): Ditto.
6399 (linux_test_for_tracefork): Ditto.
6401 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6402 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6404 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6406 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6409 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6411 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6412 prototype to take a regcache. Adjust.
6414 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6416 * regcache.h (struct thread_info): Forward declare.
6417 (struct regcache): New.
6418 (new_register_cache): Adjust prototype.
6419 (get_thread_regcache): Declare.
6420 (free_register_cache): Adjust prototype.
6421 (registers_to_string, registers_from_string): Ditto.
6422 (supply_register, supply_register_by_name, collect_register)
6423 (collect_register_as_string, collect_register_by_name): Ditto.
6424 * regcache.c (struct inferior_regcache_data): Delete.
6425 (get_regcache): Rename to ...
6426 (get_thread_regcache): ... this. Adjust. Switch inferior before
6428 (regcache_invalidate_one): Adjust.
6429 (regcache_invalidate): Fix prototype.
6430 (new_register_cache): Return the new register cache.
6431 (free_register_cache): Change prototype.
6432 (realloc_register_cache): Adjust.
6433 (registers_to_string): Change prototype to take a regcache. Adjust.
6434 (registers_from_string): Ditto.
6435 (register_data): Ditto.
6436 (supply_register): Ditto.
6437 (supply_register_by_name): Ditto.
6438 (collect_register): Ditto.
6439 (collect_register_as_string): Ditto.
6440 (collect_register_by_name): Ditto.
6441 * server.c (process_serial_event): Adjust.
6442 * linux-low.h (regset_fill_func, regset_store_func): Change
6444 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6446 * linux-low.c (get_stop_pc): Adjust.
6447 (check_removed_breakpoint): Adjust.
6448 (linux_wait_for_event): Adjust.
6449 (linux_resume_one_lwp): Adjust.
6450 (fetch_register): Add regcache parameter. Adjust.
6451 (usr_store_inferior_registers): Ditto.
6452 (regsets_fetch_inferior_registers): Ditto.
6453 (regsets_store_inferior_registers): Ditto.
6454 (linux_fetch_registers, linux_store_registers): Ditto.
6455 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6457 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6459 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6460 prototype to take a regcache.
6461 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6462 * remote-utils.c (convert_ascii_to_int, outreg)
6463 (prepare_resume_reply): Change prototype to take a regcache.
6465 * target.h (struct target_ops) <fetch_registers, store_registers>:
6466 Change prototype to take a regcache.
6467 (fetch_inferior_registers, store_inferior_registers): Change
6468 prototype to take a regcache. Adjust.
6469 * proc-service.c (ps_lgetregs): Adjust.
6470 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6471 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6472 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6473 take a regcache. Adjust.
6474 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6475 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6476 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6477 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6478 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6479 (cris_cannot_fetch_register):
6480 (cris_breakpoint_at): Change prototype to take a regcache.
6482 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6483 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6484 to take a regcache. Adjust.
6485 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6487 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6488 take a regcache. Adjust.
6489 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6490 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6491 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6492 * linux-mips-low.c (mips_get_pc):
6493 (mips_set_pc): Change prototype to take a regcache. Adjust.
6494 (mips_reinsert_addr): Adjust.
6495 (mips_collect_register): Change prototype to take a regcache.
6497 (mips_supply_register):
6498 (mips_collect_register_32bit, mips_supply_register_32bit)
6499 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6500 (mips_store_fpregset): Ditto.
6501 * linux-ppc-low.c (ppc_supply_ptrace_register)
6502 (ppc_supply_ptrace_register): Ditto.
6503 (parse_spufs_run): Adjust.
6504 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6505 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6506 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6507 take a regcache. Adjust.
6508 * linux-s390-low.c (s390_collect_ptrace_register)
6509 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6510 (s390_set_pc): Change prototype to take a regcache. Adjust.
6511 (s390_arch_setup): Adjust.
6512 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6513 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6514 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6515 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6516 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6518 (sparc_breakpoint_at): Adjust.
6519 * linux-xtensa-low.c (xtensa_fill_gregset):
6520 (xtensa_store_gregset):
6521 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6522 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6523 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6524 prototype to take a regcache. Adjust.
6525 * win32-arm-low.c (arm_fetch_inferior_register)
6526 (arm_store_inferior_register): Change prototype to take a
6528 * win32-i386-low.c (i386_fetch_inferior_register)
6529 (i386_store_inferior_register): Change prototype to take a
6531 * win32-low.c (child_fetch_inferior_registers)
6532 (child_store_inferior_registers): Change prototype to take a
6534 (win32_wait): Adjust.
6535 (win32_fetch_inferior_registers): Change prototype to take a
6537 (win32_store_inferior_registers): Adjust.
6538 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6539 store_inferior_register>: Change prototype to take a regcache.
6541 2010-01-20 Doug Evans <dje@google.com>
6543 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6545 (linux_wait_for_event1, linux_init_signals): Ditto.
6546 (W_STOPCODE): Provide definition if missing.
6548 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6550 * linux-low.c (linux_core_of_thread): New.
6551 (compare_ints, show_process, list_threads): New.
6552 (linux_qxfer_osdata): Report threads and cores.
6553 (linux_target_op): Register linux_core_of_thread.
6554 * remote-utils.c (prepare_resume_reply): Report the core.
6555 (buffer_xml_printf): Support %d specifier.
6556 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6558 (handle_query): Handle qXfer:threads. Announce availability
6560 * target.h (struct target_ops): New field core_of_thread.
6562 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6564 * Makefile.in (clean): Remove new generated files.
6565 (reg-s390.o, reg-s390.c): Remove rules.
6566 (reg-s390x.o, reg-s390x.c): Likewise.
6567 (s390-linux32.o, s390-linux32.c): Add rules.
6568 (s390-linux64.o, s390-linux64.c): Likewise.
6569 (s390x-linux64.o, s390x-linux64.c): Likewise.
6570 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6571 * linux-s390-low.c: Include <elf.h>.
6572 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6573 (init_registers_s390): Remove prototype.
6574 (init_registers_s390x): Likewise.
6575 (init_registers_s390_linux32): Add prototype.
6576 (init_registers_s390_linux64): Likewise.
6577 (init_registers_s390x_linux64): Likewise.
6578 (s390_num_regs_3264): New define.
6579 (s390_regmap_3264): New global variable.
6580 (s390_cannot_fetch_register): Remove obsolete check.
6581 (s390_cannot_store_register): Likewise.
6582 (s390_collect_ptrace_register): Handle upper/lower register halves.
6583 (s390_supply_ptrace_register): Likewise.
6584 (s390_fill_gregset): Update to register number changes.
6585 (s390_get_hwcap): New routine.
6586 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6587 Install appropriate regmap and register set.
6589 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6591 * server.c (gdbserver_version): Update copyright year to 2010.
6592 * gdbreplay.c (gdbreplay_version): Likewise.
6594 2009-12-28 Doug Evans <dje@google.com>
6596 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6597 elf/external.h. Include <elf.h> instead but only if necessary.
6599 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6601 * linux-low.c (linux_remove_process): Remove `detaching'
6602 parameter. Don't release/detach from thread_db here.
6603 (linux_kill): Release/detach from thread_db here, ...
6604 (linux_detach): ... and here, before actually detaching.
6605 (linux_wait_1): ... and here, when a process exits.
6606 * thread-db.c (any_thread_of): New.
6607 (thread_db_free): Switch the current inferior to a thread of the
6610 2009-12-21 Doug Evans <dje@google.com>
6612 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6614 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6615 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6616 warning ifndef __NR_tkill. Move setting of errno there too.
6617 Delete unnecessary resetting of errno after syscall.
6618 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6620 * configure.ac: Check for dladdr.
6621 * config.in: Regenerate.
6622 * configure: Regenerate.
6623 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6624 (try_thread_db_load): Update.
6626 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6628 2009-12-18 Doug Evans <dje@google.com>
6630 * event-loop.c: Include unistd.h if it exists.
6632 * linux-low.c (my_waitpid): Move definition away from being in
6633 between linux_tracefork_child/linux_test_for_tracefork.
6635 * gdb_proc_service.h (psaddr_t): Fix type.
6636 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6637 signature to match glibc.
6639 2009-12-16 Doug Evans <dje@google.com>
6641 * linux-low.c (linux_read_memory): Fix argument to read.
6643 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6645 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6646 events, don't leave current_inferior pointing at null.
6648 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6650 * win32-low.c (LOG): Delete.
6651 (OUTMSG): Output to stderr.
6652 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6653 on compile time LOG macro.
6654 (win32_wait): Fix debug output.
6656 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6658 * win32-low.c (win32_add_one_solib): If the dll name is
6659 "ntdll.dll", prepend the system directory to the dll path.
6661 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6663 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6665 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6666 Vladimir Prus <vladimir@codesourcery.com>
6668 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6669 * configure.ac: Check for __mcoldfire__ and set
6670 gdb_cv_m68k_is_coldfire.
6671 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6672 reg-cf.o and reg-m68k.o.
6673 * configure: Regenerated.
6675 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6677 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6678 Pass it to thread_db_free.
6679 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6680 proper `detaching' argument to linux_remove_process.
6681 * linux-low.h (thread_db_free): Add `detaching' parameter.
6682 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6684 (thread_db_free): Add `detaching' parameter. Only
6685 call td_ta_clear_event if detaching from process.
6687 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6689 * thread-db.c (thread_db_free): Fix typo.
6691 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6694 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6696 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6698 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6699 with an i686 compiler.
6700 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6702 * configure: Rebuilt.
6704 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6708 * server.c (handle_search_memory_1): Correct read_addr initialization
6709 in loop for searching subsequent chunks.
6711 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6713 * configure.ac: New --with-libthread-db option.
6714 * thread-db.c: Allow direct dependence on libthread_db.
6715 (thread_db_free): Adjust.
6716 * config.in: Regenerate.
6717 * configure: Likewise.
6719 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6722 * thread-db.c (attach_thread): New function.
6723 (maybe_attach_thread): Return success/failure.
6724 (find_new_threads_callback): Adjust.
6725 (thread_db_find_new_threads): Loop until no new threads.
6727 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6729 * proc-service.c (ps_lgetregs): Formatting.
6731 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6733 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6734 * configure.ac: Adjust.
6735 * linux-low.h (struct process_info_private): Move members to struct
6737 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6738 * linux-low.c (linux_remove_process): Adjust.
6739 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6740 * server.c (handle_query): Move code ...
6741 (handle_monitor_command): ... here. New function.
6742 * target.h (struct target_ops): New member.
6743 * thread-db.c (struct thread_db): New.
6744 (libthread_db_search_path): New variable.
6745 (thread_db_create_event, thread_db_enable_reporting)
6746 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6747 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6748 (try_thread_db_load_1, dladdr_to_soname): New functions.
6749 (try_thread_db_load, thread_db_load_search): New functions.
6750 (thread_db_init): Search for libthread_db.
6751 (thread_db_free): New function.
6752 (thread_db_handle_monitor_command): Likewise.
6753 * config.in: Regenerate.
6754 * configure: Regenerate.
6756 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6758 * spu-low.c (spu_kill): Wait for inferior to terminate.
6759 Call clear_inferiors.
6760 (spu_detach): Call clear_inferiors.
6762 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6764 * aclocal.m4: Regenerate.
6765 * config.in: Likewise.
6766 * configure: Likewise.
6768 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6770 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6771 (parse_spufs_run): New function.
6772 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6773 (ppc_breakpoint_at): Handle SPU breakpoints.
6775 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6777 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6778 (SPUFS_MAGIC): Define.
6779 (spu_enumerate_spu_ids): New function.
6780 (linux_qxfer_spu): New function.
6781 (linux_target_ops): Install linux_qxfer_spu.
6783 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6785 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6786 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6787 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6788 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6789 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6790 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6791 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6792 (init_registers_powerpc_cell32l): Add prototype.
6793 (init_registers_powerpc_cell64l): Likewise.
6794 (ppc_arch_setup): Detect Cell/B.E. architecture.
6796 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6798 * Makefile.in (datarootdir): New variable.
6800 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6802 * linux-low.c (linux_write_memory): Update debugging output.
6803 * Makefile.in (clean): Add new descriptions.
6804 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6805 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6806 * configure.srv: Add new files for arm*-*-linux*.
6807 * linux-arm-low.c: Add new declarations.
6808 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6809 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6810 (HWCAP_VFPv3D16): New.
6811 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6812 instead of __IWMMXT__.
6813 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6814 (arm_arch_setup): New.
6815 (target_regsets): Remove #ifdef. Add VFP regset.
6816 (the_low_target): Use arm_arch_setup.
6818 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6820 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6821 the main thread again.
6823 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6825 Adding Neutrino gdbserver.
6826 * configure: Regenerated.
6827 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6828 * configure.srv (i[34567]86-*-nto*): New target.
6829 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6830 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6831 (nto_comctrl) [__QNX__]: New function.
6832 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6834 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
6836 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6839 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6840 Pedro Alves <pedro@codesourcery.com>
6842 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6843 don't support CONTEXT_EXTENDED_REGISTERS.
6844 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6845 (the_low_target): Install them.
6846 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6847 failing with ERROR_PIPE_NOT_CONNECTED.
6849 2009-06-30 Doug Evans <dje@google.com>
6850 Pierre Muller <muller@ics.u-strasbg.fr>
6852 Add h/w watchpoint support to x86-linux, win32-i386.
6853 * Makefile.in (SFILES): Add i386-low.c
6854 (i386_low_h): Define.
6855 (i386-low.o): Add dependencies.
6856 (linux-x86-low.o): Add i386-low.h dependency.
6857 (win32-i386-low.o): Ditto.
6858 * i386-low.c: New file.
6859 * i386-low.h: New file.
6860 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6861 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6862 * linux-low.c (linux_add_process): Initialize arch_private.
6863 (linux_remove_process): Free arch_private.
6864 (add_lwp): Initialize arch_private.
6865 (delete_lwp): Free arch_private.
6866 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6868 * linux-low.h (process_info_private): New member arch_private.
6869 (lwp_info): New member arch_private.
6870 (linux_target_ops): New members new_process, new_thread,
6872 (ptid_of): New macro.
6873 * linux-x86-low.c: Include stddef.h, i386-low.h.
6874 (arch_process_info): New struct.
6875 (arch_lwp_info): New struct.
6876 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6877 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6878 (i386_dr_low_get_status): New function.
6879 (x86_insert_point, x86_remove_point): New functions.
6880 (x86_stopped_by_watchpoint): New function.
6881 (x86_stopped_data_address): New function.
6882 (x86_linux_new_process, x86_linux_new_thread): New functions.
6883 (x86_linux_prepare_to_resume): New function.
6884 (the_low_target): Add entries for insert_point, remove_point,
6885 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6887 * server.c (debug_hw_points): New global.
6888 (monitor_show_help): Document set debug-hw-points.
6889 (handle_query): Process "set debug-hw-points".
6890 * server.h (debug_hw_points): Declare.
6891 (paddress): Declare.
6892 * utils.c (NUMCELLS, CELLSIZE): New macros.
6893 (get_sell, xsnprintf, paddress): New functions.
6894 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6895 remove_point, stopped_by_watchpoint, stopped_data_address.
6896 * win32-i386-low.c: Include i386-low.h.
6897 (debug_reg_state): Replaces dr.
6898 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6899 (i386_dr_low_get_status): New function.
6900 (i386_insert_point, i386_remove_point): New functions.
6901 (i386_stopped_by_watchpoint): New function.
6902 (i386_stopped_data_address): New function.
6903 (i386_initial_stuff): Update.
6904 (get_thread_context,set_thread_context,i386_thread_added): Update.
6905 (the_low_target): Add entries for insert_point,
6906 remove_point, stopped_by_watchpoint, stopped_data_address.
6907 * win32-low.c (win32_insert_watchpoint): New function.
6908 (win32_remove_watchpoint): New function.
6909 (win32_stopped_by_watchpoint): New function.
6910 (win32_stopped_data_address): New function.
6911 (win32_target_ops): Add entries for insert_watchpoint,
6912 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6913 * win32-low.h (win32_target_ops): New members insert_point,
6914 remove_point, stopped_by_watchpoint, stopped_data_address.
6916 2009-06-25 Pedro Alves <pedro@codesourcery.com>
6918 * server.c (process_serial_event): Re-return unsupported, not
6919 error, if the type isn't recognized. Re-allow supporting only
6920 insert or remove packets. Also call require_running for
6921 breakpoints. Add missing break statement to default case. Tidy.
6922 * target.h (struct target_ops): Rename insert_watchpoint to
6923 insert_point, and remove_watchpoint to remove_point.
6925 * linux-low.h (struct linux_target_ops): Likewise.
6926 * linux-low.c (linux_insert_watchpoint): Rename to ...
6927 (linux_insert_point): ... this. Adjust.
6928 (linux_remove_watchpoint): Rename to ...
6929 (linux_remove_point): ... this. Adjust.
6930 (linux_target_ops): Adjust.
6931 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6932 (cris_insert_point): ... this.
6933 (cris_remove_watchpoint): Rename to ...
6934 (cris_remove_point): ... this.
6935 (the_low_target): Adjust.
6937 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6939 * server.c (handle_v_kill): Pass signal_pid to
6940 kill_inferior if multi_process is zero.
6942 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6944 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6945 * target.h (target_ops): Comment for *_watchpoint to make it clear
6946 the functions can get types '0' and '1'.
6948 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6950 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6951 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6952 * regcache.c (get_regcache): Likewise.
6953 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6954 * win32-low.c (child_fetch_inferior_registers): Remove check for
6957 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6958 Pedro Alves <pedro@codesourcery.com>
6960 * target.h (struct target_ops) <supports_multi_process>: New
6962 (target_supports_multi_process): New.
6963 * server.c (handle_query): Even if GDB reports support, only
6964 enable multi-process if the target also supports it. Report
6965 multi-process support only if the target backend supports it.
6966 * linux-low.c (linux_supports_multi_process): New function.
6967 (linux_target_ops): Install it as target_supports_multi_process
6970 2009-05-24 Doug Evans <dje@google.com>
6972 Global renaming of find_thread_pid to find_thread_ptid.
6973 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6974 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6975 All callers updated.
6977 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6978 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6981 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6982 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6983 (linux_resume_one_lwp): Ditto.
6985 2009-05-23 Doug Evans <dje@google.com>
6987 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6988 from struct inferior_list_entry * to struct lwp_info *.
6989 All callers updated.
6991 2009-05-13 Doug Evans <dje@google.com>
6993 * linux-x86-low.c: Don't include assert.h.
6994 (x86_siginfo_fixup): Use fatal, not assert.
6995 (x86_arch_setup): Fix comment.
6997 2009-05-12 Doug Evans <dje@google.com>
6999 Biarch support for i386/amd64 gdbserver.
7000 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7001 Add linux-x86-low.c.
7002 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7003 (linux-x86-low.o): Add.
7004 * linux-x86-64-low.c: Delete.
7005 * linux-i386-low.c: Delete.
7006 * linux-x86-low.c: New file.
7007 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7009 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7011 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7012 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7013 (linux_child_pid_to_exec_file): New function.
7014 (elf_64_header_p, elf_64_file_p): New functions.
7015 (siginfo_fixup): New function.
7016 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7017 give target a chance to convert layout.
7018 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7019 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7021 2009-05-07 Doug Evans <dje@google.com>
7023 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7024 (regsets_store_inferior_registers): Ditto.
7026 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7030 * linux-low.c (must_set_ptrace_flags): Delete.
7031 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7033 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7034 `lwp->must_set_ptrace_flags' instead.
7035 (linux_wait_for_event_1): Set ptrace options here.
7036 (linux_wait_1): ... not here.
7038 2009-04-30 Doug Evans <dje@google.com>
7040 * inferiors.c (started_inferior_callback): New function.
7041 (attached_inferior_callback): New function.
7042 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7043 * server.c (print_started_pid, print_attached_pid): New functions.
7044 (detach_or_kill_for_exit): New function.
7045 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7046 * server.h (have_started_inferiors_p): Declare.
7047 (have_attached_inferiors_p): Declare.
7049 * inferiors.c (remove_process): Fix memory leak, free process.
7050 * linux-low.c (linux_remove_process): New function.
7051 (linux_kill): Call it instead of remove_process.
7052 (linux_detach, linux_wait_1): Ditto.
7054 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7056 * configure.srv: Add x86 Windows CE target.
7058 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7060 * inferiors.c (get_thread_process): Make global.
7061 * server.h (get_thread_process): Add prototype.
7062 * thread-db.c (find_one_thread): Use get_thread_process
7063 instead of current_process.
7064 (thread_db_get_tls_address): Do not crash if called when
7065 thread layer is not yet initialized.
7067 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7069 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7070 * spu-low.c (current_tid): Rename to ...
7071 (current_ptid): ... this.
7072 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7073 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7074 ptid_get_lwp (current_ptid) instead of current_tid.
7075 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7076 instead of current_tid. Use find_process_pid to verify pid
7077 argument is valid. Pass proper argument to remove_process.
7078 (spu_thread_alive): Compare current_ptid instead of current_tid.
7079 (spu_resume): Likewise.
7081 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7083 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7086 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7088 Implement the multiprocess extensions, and add linux multiprocess
7091 * server.h (ULONGEST): Declare.
7092 (struct ptid, ptid_t): New.
7093 (minus_one_ptid, null_ptid): Declare.
7094 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7095 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7096 (struct inferior_list_entry): Change `id' type from unsigned from
7098 (struct sym_cache, struct breakpoint, struct
7099 process_info_private): Forward declare.
7100 (struct process_info): Declare.
7101 (current_process): Declare.
7102 (all_processes): Declare.
7103 (initialize_inferiors): Declare.
7104 (add_thread): Adjust to use ptid_t.
7105 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7106 (add_process, remove_process, find_thread_pid): Declare.
7107 (find_inferior_id): Adjust to use ptid_t.
7108 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7109 (multi_process): Declare.
7110 (push_event): Adjust to use ptid_t.
7111 (read_ptid, write_ptid): Declare.
7112 (prepare_resume_reply): Adjust to use ptid_t.
7113 (clear_symbol_cache): Declare.
7114 * inferiors.c (all_processes): New.
7115 (null_ptid, minus_one_ptid): New.
7116 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7117 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7118 (add_thread): Change unsigned long to ptid. Remove gdb_id
7120 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7121 (gdb_id_to_thread): Rename to ...
7122 (find_thread_pid): ... this. Change unsigned long to ptid.
7123 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7124 (loaded_dll, pull_pid_from_list): Adjust.
7125 (add_process, remove_process, find_process_pid)
7126 (get_thread_process, current_process, initialize_inferiors): New.
7127 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7128 (struct target_waitstatus) <related_pid>: Ditto.
7129 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7131 (struct target_ops) <join>: Add `pid' argument.
7132 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7133 (struct target_ops) <wait>: Add `ptid' field. Change return type
7135 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7136 (mywait): Add `ptid' argument. Change return type to ptid_t.
7137 (target_pid_to_str): Declare.
7138 * target.c (set_desired_inferior): Adjust to use ptids.
7139 (mywait): Add new `ptid' argument. Adjust.
7140 (target_pid_to_str): New.
7141 * mem-break.h (free_all_breakpoints): Declare.
7142 * mem-break.c (breakpoints): Delelete.
7143 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7144 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7145 to use per-process breakpoint list.
7146 (free_all_breakpoints): New.
7147 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7148 (symbol_cache, all_symbols_looked_up): Delete.
7150 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7152 (prepare_resume_reply): Change ptid argument's type from unsigned
7153 long to ptid_t. Adjust. Implement W;process and X;process.
7154 (free_sym_cache, clear_symbol_cache): New.
7155 (look_up_one_symbol): Adjust to per-process symbol cache. *
7156 * server.c (cont_thread, general_thread, step_thread): Change type
7159 (multi_process): New.
7160 (last_ptid): Change type to ptid_t.
7161 (struct vstop_notif) <ptid>: Change type to ptid_t.
7162 (queue_stop_reply, push_event): Change `ptid' argument's type to
7164 (discard_queued_stop_replies): Add `pid' argument.
7165 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7166 changes. Don't reference the `attached' global.
7167 (attach_inferior): Adjust to mywait interface changes.
7168 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7169 features. Handle and report "multiprocess+". Handle
7171 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7173 (handle_v_kill): New.
7174 (handle_v_stopped): Adjust to use target_pid_to_str.
7175 (handle_v_requests): Allow multiple attaches and runs when
7176 multiprocess extensions are in effect. Handle "vKill".
7177 (myresume): Adjust to use ptids.
7178 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7179 (handle_status): Adjust to discard_queued_stop_replies interface
7181 (first_thread_of, kill_inferior_callback)
7182 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7183 (main): Call initialize_inferiors. Adjust to use ptids, killing
7184 and detaching from all inferiors. Handle multiprocess packet
7186 * linux-low.h: Include gdb_proc_service.h.
7187 (struct process_info_private): New.
7188 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7189 <lwpid_of>: Use ptid_get_lwp.
7190 (get_lwp_thread): Adjust.
7191 (struct lwp_info): Add `dead' member.
7192 (find_lwp_pid): Declare.
7193 * linux-low.c (thread_db_active): Delete.
7194 (new_inferior): Adjust comment.
7195 (inferior_pid): Delete.
7196 (linux_add_process): New.
7197 (handle_extended_wait): Adjust.
7198 (add_lwp): Change unsigned long to ptid.
7199 (linux_create_inferior): Add process to processes table. Adjust
7200 to use ptids. Don't set new_inferior here.
7201 (linux_attach_lwp): Rename to ...
7202 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7203 it. Adjust to use ptids.
7204 (linux_attach_lwp): New.
7205 (linux_attach): Add process to processes table. Don't set
7207 (struct counter): New.
7208 (second_thread_of_pid_p, last_thread_of_process_p): New.
7209 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7211 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7212 processes. Remove process from process table.
7213 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7214 to multiple processes.
7215 (any_thread_of): New.
7216 (linux_detach): Add `pid' argument, and handle it. Remove process
7217 from processes table.
7218 (linux_join): Add `pid' argument. Handle it.
7219 (linux_thread_alive): Change unsighed long argument to ptid_t.
7220 Consider dead lwps as not being alive.
7221 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7222 threads we're not interested in.
7223 (same_lwp, find_lwp_pid): New.
7224 (linux_wait_for_lwp): Change `pid' argument's type from int to
7226 (linux_wait_for_event): Rename to ...
7227 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7228 from int to ptid_t. Adjust.
7229 (linux_wait_for_event): New.
7230 (linux_wait_1): Add `ptid' argument. Change return type to
7231 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7232 that exit from the process table.
7233 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7235 (mark_lwp_dead): New.
7236 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7237 stopping all threads, mark its main lwp as dead.
7238 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7240 (fetch_register, usr_store_inferior_registers)
7241 (regsets_fetch_inferior_registers)
7242 (regsets_store_inferior_registers, linux_read_memory)
7243 (linux_write_memory): Inline `inferior_pid'.
7244 (linux_look_up_symbols): Adjust to use per-process
7246 (linux_request_interrupt): Adjust to use ptids.
7247 (linux_read_auxv): Inline `inferior_pid'.
7248 (initialize_low): Don't reference thread_db_active.
7249 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7250 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7251 (ps_getpid): Return the pid of the current inferior.
7252 * thread-db.c (proc_handle, thread_agent): Delete.
7253 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7255 (find_one_thread): Change argument type to ptid_t. Adjust to
7257 (maybe_attach_thread): Adjust to per-process data and ptids.
7258 (thread_db_find_new_threads): Ditto.
7259 (thread_db_init): Ditto.
7260 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7261 processes table. Adjust to use ptids.
7262 (spu_kill, spu_detach): Adjust interface. Remove process from
7264 (spu_join, spu_thread_alive): Adjust interface.
7265 (spu_wait): Adjust interface. Remove process from processes
7266 table. Adjust to use ptids.
7267 * win32-low.c (current_inferior_tid): Delete.
7268 (current_inferior_ptid): New.
7269 (debug_event_ptid): New.
7270 (thread_rec): Take a ptid. Adjust.
7271 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7272 (child_delete_thread): Ditto.
7273 (do_initial_child_stuff): Add `attached' argument. Add process to
7275 (child_fetch_inferior_registers, child_store_inferior_registers):
7277 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7278 (win32_attach): Pass 1 to do_initial_child_stuff.
7279 (win32_kill): Adjust interface. Remove process from processes
7281 (win32_detach): Ditto.
7282 (win32_join): Adjust interface.
7283 (win32_thread_alive): Take a ptid.
7284 (win32_resume): Adjust to use ptids.
7285 (get_child_debug_event): Ditto.
7286 (win32_wait): Adjust interface. Remove exiting process from
7289 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7291 Non-stop mode support.
7293 * server.h (non_stop): Declare.
7294 (gdb_client_data, handler_func): Declare.
7295 (delete_file_handler, add_file_handler, start_event_loop):
7297 (handle_serial_event, handle_target_event, push_event)
7298 (putpkt_notif): Declare.
7299 * target.h (enum resume_kind): New.
7300 (struct thread_resume): Replace `step' field by `kind' field.
7301 (TARGET_WNOHANG): Define.
7302 (struct target_ops) <wait>: Add `options' argument.
7303 <supports_non_stop, async, start_non_stop>: New fields.
7304 (target_supports_non_stop, target_async): New.
7305 (start_non_stop): Declare.
7306 (mywait): Add `options' argument.
7307 * target.c (mywait): Add `options' argument. Print child exit
7309 (start_non_stop): New.
7310 * server.c (non_stop, own_buf, mem_buf): New globals.
7311 (struct vstop_notif): New.
7312 (notif_queue): New global.
7313 (queue_stop_reply, push_event, discard_queued_stop_replies)
7314 (send_next_stop_reply): New.
7315 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7317 (attach_inferior): In non-stop mode, don't wait for the target
7319 (handle_general_set): Handle QNonStop.
7320 (handle_query): When handling qC, return the current general
7321 thread, instead of the first thread of the list.
7322 (handle_query): If the backend supports non-stop mode, include
7323 QNonStop+ in the qSupported query response.
7324 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7326 (handle_v_attach, handle_v_run): Handle non-stop mode.
7327 (handle_v_stopped): New.
7328 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7329 (myresume): Adjust to use resume_kind. Handle non-stop.
7330 (queue_stop_reply_callback): New.
7331 (handle_status): Handle non-stop mode.
7332 (main): Clear non_stop flag on reconnection. Use the event-loop.
7333 Refactor serial protocol handling from here ...
7334 (process_serial_event): ... to this new function. When GDB
7335 selects any thread, select one here. In non-stop mode, wait until
7336 GDB acks all pending events before exiting.
7337 (handle_serial_event, handle_target_event): New.
7338 * remote-utils.c (remote_open): Install remote_desc in the event
7340 (remote_close): Remove remote_desc from the event loop.
7341 (putpkt_binary): Rename to...
7342 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7343 (putpkt_binary): New as wrapper around putpkt_binary_1.
7344 (putpkt_notif): New.
7345 (prepare_resume_reply): In non-stop mode, don't change the
7347 * event-loop.c: New.
7348 * Makefile.in (OBJ): Add event-loop.o.
7349 (event-loop.o): New rule.
7351 * linux-low.h (pid_of): Moved here.
7353 (get_lwp_thread): Use lwpid_of.
7354 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7355 * linux-low.c (pid_of): Delete.
7356 (inferior_pid): Use lwpid_of.
7357 (linux_event_pipe): New.
7358 (target_is_async_p): New.
7360 (handle_extended_wait): Use lwpid_of.
7361 (add_lwp): Don't set lwpid field.
7362 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7363 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7364 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7365 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7366 first. Adjust to linux_wait_for_event interface changes. Use
7368 (linux_detach): Don't delete the main lwp here.
7369 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7370 (status_pending_p): Don't consider explicitly suspended lwps.
7371 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7372 pointer. Add OPTIONS argument. Change return type to int. Use
7373 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7374 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7375 pointer. Add status pointer argument. Return a pid instead of a
7376 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7377 changes. In non-stop mode, don't switch to a random thread.
7378 (linux_wait): Rename to...
7379 (linux_wait_1): ... this. Add target_options argument, and handle
7380 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7381 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7382 clean exit and signal exit code. Don't stop all threads in
7383 non-stop mode. In all-stop mode, only stop all threads when
7384 reporting a stop to GDB. Handle explicit thread stop requests.
7385 (async_file_flush, async_file_mark): New.
7387 (send_sigstop): Use lwpid_of.
7388 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7389 interface changes. In non-stop mode, don't switch to a random
7391 (linux_resume_one_lwp): Use lwpid_of.
7392 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7393 (linux_resume_one_thread): ... this. Handle resume_stop. In
7394 non-stop mode, don't look for pending flag in all threads.
7395 (resume_status_pending_p): Don't consider explicitly suspended
7397 (my_waitpid): Reimplement. Emulate __WALL.
7398 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7400 (sigchld_handler, linux_supports_non_stop, linux_async)
7401 (linux_start_non_stop): New.
7402 (linux_target_ops): Register linux_supports_non_stop, linux_async
7403 and linux_start_non_stop.
7404 (initialize_low): Install SIGCHLD handler.
7405 * thread-db.c (thread_db_create_event, find_one_thread)
7406 (thread_db_get_tls_address): Use lwpid_of.
7407 * win32-low.c (win32_detach): Adjust to use resume_kind.
7408 (win32_wait): Add `options' argument.
7409 * spu-low.c (spu_resume): Adjust to use resume_kind.
7410 (spu_wait): Add `options' argument.
7412 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7414 Decouple target code from remote protocol.
7416 * target.h (enum target_waitkind): New.
7417 (struct target_waitstatus): New.
7418 (struct target_ops) <wait>: Return an unsigned long. Take a
7419 target_waitstatus pointer instead of a char pointer.
7421 * target.c (mywait): Change prototype to return an unsigned long.
7422 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7423 * server.h (thread_from_wait, old_thread_from_wait): Delete
7425 (prepare_resume_reply): Change prototype to take a
7427 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7428 (last_status, last_ptid): New.
7429 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7430 pid instead of a signal.
7431 (attach_inferior): Remove "status" and "signal" parameters.
7433 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7435 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7436 (handle_v_requests, myresume): Remove "status" and "signal"
7438 (handle_status): New.
7439 (main): Delete local `status'. Adjust.
7440 * remote-utils.c: Include target.h.
7441 (prepare_resume_reply): Change prototype to take a
7442 target_waitstatus. Adjust.
7444 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7446 * spu-low.c (spu_wait): Adjust.
7447 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7449 (win32_wait): Adjust.
7451 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7453 * target.h (struct thread_resume): Delete leave_stopped member.
7454 (struct target_ops): Add a `n' argument to the `resume' callback.
7455 * server.c (start_inferior): Adjust.
7456 (handle_v_cont, myresume): Adjust.
7457 * linux-low.c (check_removed_breakpoint): Adjust to resume
7458 interface change, and to removed leave_stopped field.
7459 (resume_ptr): Delete.
7460 (struct thread_resume_array): New.
7461 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7462 resume interface change.
7463 (linux_continue_one_thread, linux_queue_one_thread)
7464 (resume_status_pending_p): Check if the resume field is NULL
7465 instead of checking the leave_stopped member.
7466 (linux_resume): Adjust to the target resume interface change.
7467 * spu-low.c (spu_resume): Adjust to the target resume interface
7469 * win32-low.c (win32_detach, win32_resume): Ditto.
7471 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7473 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7475 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7477 (linux_continue_one_thread): Only preserve the stepping flag if
7478 there's a pending breakpoint.
7480 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7482 * server.c (main): After the inferior having exited, call
7483 remote_close before exiting gdbserver.
7485 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7487 Fix size of FPSCR in Power 7 processors.
7488 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7489 (PPC_FEATURE_HAS_DFP): New #define.
7490 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7493 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7495 * server.c (handle_query) Whitespace and formatting.
7497 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7499 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7500 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7501 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7502 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7503 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7504 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7505 Makefile.in, configure.ac: Fix whitespace throughout.
7506 * configure: Regenerate.
7508 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7510 * inferiors.c (find_inferior): Make it safe for the callback
7511 function to delete the currently iterated inferior.
7513 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7515 * Makefile.in (linuw_low_h): Move higher.
7516 (thread-db.o): Depend on $(linux_low_h).
7518 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7520 Rename "process" to "lwp" throughout.
7522 * linux-low.c (all_processes): Rename to...
7523 (all_lwps): ... this.
7524 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7525 (add_process): Rename to ...
7526 (add_lwp): ... this. Adjust.
7527 (linux_create_inferior): Adjust.
7528 (linux_attach_lwp): Adjust.
7529 (linux_attach): Adjust.
7530 (linux_kill_one_process): Rename to ...
7531 (linux_kill_one_lwp): ... this. Adjust.
7532 (linux_kill): Adjust.
7533 (linux_detach_one_process): Rename to ...
7534 (linux_detach_one_lwp): ... this. Adjust.
7535 (linux_detach): Adjust.
7536 (check_removed_breakpoint): Adjust.
7537 (status_pending_p): Adjust.
7538 (linux_wait_for_process): Rename to ...
7539 (linux_wait_for_lwp): ... this. Adjust.
7540 (linux_wait_for_event): Adjust.
7541 (send_sigstop): Adjust.
7542 (wait_for_sigstop): Adjust.
7543 (stop_all_processes): Rename to ...
7544 (stop_all_lwps): ... this.
7545 (linux_resume_one_process): Rename to ...
7546 (linux_resume_one_lwp): ... this. Adjust.
7547 (linux_set_resume_request, linux_continue_one_thread)
7548 (linux_queue_one_thread, resume_status_pending_p)
7549 (usr_store_inferior_registers, regsets_store_inferior_registers)
7550 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7552 * linux-low.h (get_process): Rename to ...
7553 (get_lwp): ... this. Adjust.
7554 (get_thread_process): Rename to ...
7555 (get_thread_lwp): ... this. Adjust.
7556 (get_process_thread): Rename to ...
7557 (get_lwp_thread): ... this. Adjust.
7558 (struct process_info): Rename to ...
7559 (struct lwp_info): ... this.
7560 (all_processes): Rename to ...
7561 (all_lwps): ... this.
7562 * proc-service.c (ps_lgetregs): Adjust.
7563 * thread-db.c (thread_db_create_event, find_one_thread)
7564 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7566 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7568 * server.c (handle_query): Handle "qAttached".
7570 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7572 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7573 GPLv3, update license URL.
7575 2009-03-01 Doug Evans <dje@google.com>
7577 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7578 (server_h): Add gdb_signals.h.
7579 (signals.o): Update.
7580 * server.h (target_signal_from_host,target_signal_to_host_p)
7581 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7583 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7585 * remote-utils.c (getpkt): Also generate remote-debug
7586 information if noack_mode is set.
7588 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7590 * server.c (handle_query): Report qXfer:siginfo:read and
7591 qXfer:siginfo:write as supported and handle them.
7592 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7593 * linux-low.c (linux_xfer_siginfo): New.
7594 (linux_target_ops): Set it.
7596 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7598 * server.c (gdbserver_usage): Mention --remote-debug.
7599 (main): Accept '--remote-debug' switch.
7601 2009-01-18 Doug Evans <dje@google.com>
7603 * regcache.c (new_register_cache): No need to check result of xcalloc.
7604 * server.c (handle_search_memory): Back out calls to xmalloc,
7605 result is checked and error is returned to user upon failure.
7606 (handle_query): Ditto. Add more checks for result of malloc.
7607 (handle_v_cont): Check result of malloc, report error back to
7609 (handle_v_run): Ditto. Call freeargv.
7610 * server.h (freeargv): Declare.
7611 * utils.c (freeargv): New fn.
7613 2009-01-15 Doug Evans <dje@google.com>
7615 * gdbreplay.c (perror_with_name): Make arg const char *.
7616 * server.h (target_signal_to_name): Make return type const char *.
7617 * thread-db.c (thread_db_err_str): Make return type const char *.
7618 * utils.c (perror_with_name): Make arg const char *.
7620 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7622 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7623 when handling a EXIT_PROCESS_DEBUG_EVENT.
7625 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7627 * gdbreplay.c (gdbreplay_version): Update copyright year.
7628 * server.c (gdbserver_version): Likewise.
7630 2009-01-05 Doug Evans <dje@google.com>
7632 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7633 (handle_extended_wait): Improve comment.
7635 2008-12-13 Doug Evans <dje@google.com>
7637 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7638 * server.h (ATTR_MALLOC): New macro.
7639 (xmalloc,xcalloc,xstrdup): Declare.
7640 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7641 * inferiors.c: Ditto.
7642 * linux-low.c: Ditto.
7643 * mem-break.c: Ditto.
7644 * regcache.c: Ditto.
7645 * remote-utils.c: Ditto.
7648 * win32-low.c: Ditto.
7650 2008-12-12 Doug Evans <dje@google.com>
7652 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7653 in debugging printf.
7655 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7657 2008-12-09 Doug Evans <dje@google.com>
7659 * linux-low.h (struct process_info): Delete member tid, unused.
7660 * thread-db.c (find_one_thread): Update.
7661 (maybe_attach_thread): Update.
7663 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7665 * target.h (struct target_ops): Add qxfer_osdata member.
7666 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7668 (linux_qxfer_osdata): New functions.
7669 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7671 * server.c (handle_query): Handle "qXfer:osdata:read:".
7672 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7673 (buffer_xml_printf): New functions.
7674 * server.h (struct buffer): New.
7675 (buffer_grow_str, buffer_grow_str0): New macros.
7676 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7677 (buffer_xml_printf): Declare.
7679 2008-11-24 Doug Evans <dje@google.com>
7681 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7683 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7685 * server.c (handle_v_run): Always use the supplied argument list.
7687 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7689 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7690 (xtensa_regmap_table): Add entry for scompare1.
7692 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7694 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7695 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7696 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7697 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7698 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7699 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7700 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7701 XML target descriptions.
7702 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7703 when inferior is running on an ISA 2.05 or later processor. Add
7704 special case to return offset for full 64-bit slot of FPSCR when
7707 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7709 * Makefile.in (SFILES, clean): Added sparc64 files.
7710 (reg-sparc64.o, reg-sparc64.c): New.
7711 * configure.srv (sparc*-*-linux*): New configuration.
7712 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7713 syscall arguments for SPARC.
7714 (regsets_store_inferior_registers): Likewise.
7715 * linux-sparc-low.c: New file.
7717 2008-10-21 Doug Evans <dje@google.com>
7719 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7720 (READLINE_DIR,READLINE_DEP): Delete.
7721 (INTERNAL_CFLAGS): Update.
7722 (LINTFLAGS): Update.
7724 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7726 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7727 whole argv from the last run, not just argv[0].
7729 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7731 * regcache.c (new_register_cache): Return NULL if the register
7732 cache size isn't known yet.
7733 (free_register_cache): Avoid dereferencing a NULL regcache.
7735 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7737 * configure.srv: Merge MIPS and MIPS64.
7739 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7741 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7743 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7745 * Makefile.in: Add required vsx dependencies.
7747 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7748 Declare init_registers_powerpc_vsx32l.
7749 Declare init_registers_powerpc_vsx64l.
7750 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7751 (ppc_arch_setup): Check for VSX in hwcap.
7752 (ppc_fill_vsxregset): New function.
7753 (ppc_store_vsxregset): New function.
7754 Add new VSX entry in regset_info target_regsets.
7756 * configure.srv: Add new VSX dependencies.
7758 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7760 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7761 (remote_open): Set or clear transport_is_reliable.
7762 (putpkt_binary): Don't expect acks in noack mode.
7763 (getpkt): Don't send ack/nac in noack mode.
7764 * server.c (handle_general_set): Handle QStartNoAckMode.
7765 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7767 (main): Reset noack_mode on every connection.
7768 * server.h (noack_mode): Declare.
7770 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7772 * Makefile.in (GDBREPLAY_OBS): New variable.
7773 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7775 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7776 Daniel Jacobowitz <dan@codesourcery.com>
7778 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7779 (usr_store_inferior_registers): Likewise.
7780 (regsets_store_inferior_registers): Likewise.
7782 2008-07-31 Rolf Jansen <rj@surtec.com>
7783 Pedro Alves <pedro@codesourcery.com>
7785 * configure.ac: Check for memmem declaration.
7786 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7787 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7788 (disable_packet_qfThreadInfo): Unconditionally compile.
7789 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7790 * configure, config.in: Regenerate.
7792 2008-07-28 Doug Kwan <dougkwan@google.com>
7794 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7795 (linux_write_memory): Remove declaration of errno.
7797 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7799 * linux-low.c (handle_extended_wait): Do not use "status"
7800 variable uninitialized.
7802 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7804 * server.c (handle_v_attach): Inhibit reporting dll changes.
7806 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7808 * remote-utils.c (prepare_resume_reply): If requested, don't
7809 output "thread:TID" in the T stop reply.
7811 * server.c (disable_packet_vCont, disable_packet_Tthread)
7812 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7813 (handle_query): If requested, disable support for qC, qfThreadInfo
7815 (handle_v_requests): If requested, disable support for vCont.
7816 (gdbserver_show_disableable): New.
7817 (main): Handle --disable-packet and --disable-packet=LIST.
7819 * server.h (disable_packet_vCont, disable_packet_Tthread)
7820 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7822 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7824 * server.c (gdbserver_usage): Mention --version.
7826 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7828 * Makefile.in (gdbreplay.o): New rule.
7830 2008-06-06 Joseph Myers <joseph@codesourcery.com>
7832 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7833 message, not gdbserver.
7835 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
7836 Nathan Sidwell <nathan@codesourcery.com>
7837 Joseph Myers <joseph@codesourcery.com>
7839 * acinclude.m4: Include ../../config/acx.m4.
7840 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7841 * configure, config.in: Regenerate.
7842 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7843 * server.c (gdbserver_version): Print PKGVERSION.
7844 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7845 (main): Adjust gdbserver_usage calls.
7846 * gdbreplay.c (version, host_name): Add declarations.
7847 (gdbreplay_version, gdbreplay_usage): New.
7848 (main): Accept --version and --help options.
7850 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7852 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7853 (arm_breakpoint_at): Handle Thumb.
7854 (the_low_target): Add comment.
7856 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7858 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7860 2008-05-09 Doug Evans <dje@google.com>
7862 * server.h (decode_search_memory_packet): Declare.
7863 * remote-utils.c (decode_search_memory_packet): New fn.
7864 * server.c (handle_search_memory_1): New fn.
7865 (handle_search_memory): New fn.
7866 (handle_query): Process qSearch:memory packets.
7868 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7870 * regcache.c (registers_length): Remove.
7871 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7872 full register packet.
7873 * regcache.h (registers_length): Remove prototype.
7874 * server.h (PBUFSIZ): Define to 16384.
7876 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7878 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7879 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7880 powerpc-64l.o, and powerpc-altivec64l.o.
7881 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7882 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7883 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7884 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7885 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7888 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7889 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7890 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7891 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7892 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7893 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7894 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7895 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7896 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7897 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7900 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7901 (init_registers_powerpc_32l): ... this new prototype.
7902 (init_registers_powerpc_32): Remove, replace by ...
7903 (init_registers_powerpc_altivec32l): ... this new prototype.
7904 (init_registers_powerpc_e500): Remove, replace by ...
7905 (init_registers_powerpc_e500l): ... this new prototype.
7906 (init_registers_ppc64): Remove, replace by ...
7907 (init_registers_powerpc_64l): ... this new prototype.
7908 (init_registers_powerpc_64): Remove, replace by ...
7909 (init_registers_powerpc_altivec64l): ... this new prototype.
7910 (ppc_num_regs): Set to 73.
7911 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7912 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7913 (ppc_cannot_store_register): Handle orig_r3 and trap.
7914 (ppc_arch_setup): Update init_registers_... calls.
7915 (ppc_fill_gregset): Handle orig_r3 and trap.
7917 * inferiors.c (clear_inferiors): Reset current_inferior.
7919 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
7921 * acinclude.m4: Add override.m4.
7922 * configure: Regenerate.
7924 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7926 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7927 initial call to init_register_ppc64.
7929 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7931 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7932 single powerpc*-*-linux* case.
7933 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7935 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7937 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
7938 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
7940 * linux-ppc-low.c: Include <elf.h>.
7941 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7942 (ppc_hwcap): New global variable.
7943 (ppc_regmap): Remove __SPE__ #ifdef sections.
7944 (ppc_regmap_e500): New global variable.
7945 (ppc_cannot_store_register): Update __SPE__ special case.
7946 (ppc_get_hwcap): New function.
7947 (ppc_arch_setup): Use it to determine whether inferior supports
7948 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7949 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7950 Do not access registers if target does not support AltiVec.
7951 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7952 Do not access registers if target does not support SPE.
7953 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7955 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7957 * linux-low.c (disabled_regsets, num_regsets): New.
7958 (use_regsets_p): Delete.
7959 (linux_wait_for_process): Clear disabled_regsets.
7960 (regsets_fetch_inferior_registers): Check and set it.
7961 (regsets_store_inferior_registers): Likewise.
7962 (linux_fetch_registers, linux_store_registers): Do not use
7964 (initialize_low): Allocate disabled_regsets.
7966 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7968 * Makefile.in (LIBOBJS): New.
7970 (memmem.o): New rule.
7971 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7972 * configure: Regenerated.
7974 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7976 * server.c (handle_query): Never return "unsupported" for
7977 qXfer:features:read queries.
7979 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7981 * server.c (get_features_xml): Fix inverted condition.
7982 (handle_query): Always support qXfer:feature:read.
7984 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7986 * server.c (wrapper_argv): New.
7987 (start_inferior): Handle wrapper_argv. If set, expect an extra
7989 (gdbserver_usage): Document --wrapper.
7990 (main): Parse --wrapper.
7992 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7994 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7995 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7996 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7997 (ppc_set_pc): Likewise.
7998 (ppc_arch_setup): New function.
7999 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8000 of collect_register.
8001 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8003 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8005 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8006 instead of linux-ppc64-low.o.
8007 * linux-ppc64-low.c: Remove file.
8008 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8009 (linux-ppc64-low.o): Remove rule.
8011 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8012 (init_registers_powerpc_64): Likewise.
8013 (ppc_regmap): Conditionally define depending on __powerpc64__.
8014 (ppc_cannot_store_register): Do not special-case "fpscr" when
8015 compiled on __powerpc64__.
8016 (ppc_collect_ptrace_register): New function.
8017 (ppc_supply_ptrace_register): New function.
8018 (ppc_breakpoint): Change type to "unsigned int".
8019 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8020 (the_low_target): Conditionally provide initializers for the
8021 arch_setup member depending on __powerpc64__. Install
8022 collect_ptrace_register and supply_ptrace_register members.
8024 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8026 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8027 * server.c (gdbserver_xmltarget): Define.
8028 (get_features_xml): Use it to replace "target.xml" and arch_string.
8030 * configure.srv: Remove srv_xmltarget. Add XML files that were
8031 mentioned there to srv_xmlfiles instead. Remove conditional tests
8032 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8033 srv_xmlfiles and srv_regobj to include all possible choices.
8034 * configure.ac (srv_xmltarget): Remove.
8035 (srv_xmlfiles): Do not add "target.xml".
8036 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8037 checks for supplementary target information.
8038 * configure: Regenerate.
8039 * Makefile.in (XML_TARGET): Remove.
8040 (target.xml): Remove rule.
8041 (clean): Do not clean up target.xml.
8042 (.PRECIOUS): Do not mention target.xml.
8044 * target.h (struct target_ops): Remove arch_string member.
8045 * linux-low.c (linux_arch_string): Remove.
8046 (linux_target_ops): Remove arch_string initializer.
8047 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8048 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8049 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8050 * spu-low.c (spu_arch_string): Remove.
8051 (spu_target_ops): Remove arch_string initializer.
8052 * win32-low.c (win32_arch_string): Remove.
8053 (win32_target_ops): Remove arch_string initializer.
8054 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8055 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8056 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8058 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8060 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8061 by collect_ptrace_register and supply_ptrace_register hooks.
8062 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8063 instead of checking for the_low_target.left_pad_xfer.
8064 (usr_store_inferior_registers): Use collect_ptrace_register callback
8065 instead of checking for the_low_target.left_pad_xfer.
8067 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8068 (s390_supply_ptrace_register): Likewise.
8069 (s390_fill_gregset): Call s390_collect_ptrace_register.
8070 (the_low_target): Update.
8072 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8073 (ppc_supply_ptrace_register): Likewise.
8074 (the_low_target): Update.
8076 * linux-i386-low.c (the_low_target): Update.
8077 * linux-x86-64-low.c (the_low_target): Update.
8079 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8081 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8082 reg-s390.o and reg-s390x.o.
8084 * linux-low.c (new_inferior): New global variable.
8085 (linux_create_inferior, linux_attach): Set it.
8086 (linux_wait_for_process): Call the_low_target.arch_setup after the
8087 target has stopped for the first time.
8088 (initialize_low): Do not call the_low_target.arch_setup.
8090 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8091 (s390_set_pc): Likewise.
8092 (s390_arch_setup): New function.
8093 (the_low_target): Use s390_arch_setup as arch_setup routine.
8095 * regcache.c (realloc_register_cache): New function.
8096 (set_register_cache): Call it for each existing regcache.
8098 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8100 * server.h (init_registers): Remove prototype.
8102 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8103 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8104 instead of init_registers ().
8105 * linux-arm-low.c (init_registers_arm): Add prototype.
8106 (init_registers_arm_with_iwmmxt): Likewise.
8107 (the_low_target): Add initializer for arch_setup field.
8108 * linux-cris-low.c (init_registers_cris): Add prototype.
8109 (the_low_target): Add initializer for arch_setup field.
8110 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8111 (the_low_target): Add initializer for arch_setup field.
8112 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8113 (the_low_target): Add initializer for arch_setup field.
8114 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8115 (the_low_target): Add initializer for arch_setup field.
8116 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8117 (the_low_target): Add initializer for arch_setup field.
8118 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8119 (the_low_target): Add initializer for arch_setup field.
8120 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8121 (init_registers_mips64_linux): Likewise.
8122 (the_low_target): Add initializer for arch_setup field.
8123 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8124 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8125 (the_low_target): Add initializer for arch_setup field.
8126 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8127 (init_registers_powerpc_64): Likewise.
8128 (the_low_target): Add initializer for arch_setup field.
8129 * linux-s390-low.c (init_registers_s390): Add prototype.
8130 (init_registers_s390x): Likewise.
8131 (the_low_target): Add initializer for arch_setup field.
8132 * linux-sh-low.c (init_registers_sh): Add prototype.
8133 (the_low_target): Add initializer for arch_setup field.
8134 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8135 (the_low_target): Add initializer for arch_setup field.
8136 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8137 (the_low_target): Add initializer for arch_setup field.
8139 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8140 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8141 instead of init_registers ().
8142 * win32-arm-low.c (init_registers_arm): Add prototype.
8143 (the_low_target): Add initializer for arch_setup field.
8144 * win32-i386-low.c (init_registers_i386): Add prototype.
8145 (the_low_target): Add initializer for arch_setup field.
8147 * spu-low.c (init_registers_spu): Add prototype.
8148 (initialize_low): Call initialie_registers_spu () instead of
8149 initialize_registers ().
8151 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8153 * server.c (handle_v_requests): When handling the vRun and vAttach
8154 packets, if already debugging a process, don't kill it. Return an
8157 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8159 * server.c (handle_query): Correct length check.
8161 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8163 * win32-low.c (do_initial_child_stuff): Add process handle
8164 parameter. Set current_process_handle and current_process_id from the
8165 parameters. Clear globals.
8166 (win32_create_inferior): Don't set current_process_handle and
8167 current_process_id here. Instead pass them on the call to
8168 do_initial_child_stuff.
8169 (win32_attach): Likewise.
8170 (win32_clear_inferiors): New.
8171 (win32_kill): Don't close the current process handle or the
8172 current thread handle here. Instead call win32_clear_inferiors.
8173 (win32_detach): Don't open a new handle to the process. Call
8174 win32_clear_inferiors.
8175 (win32_join): Don't rely on current_process_handle; open a new
8176 handle using the process id.
8177 (win32_wait): Call win32_clear_inferiors when the inferior process
8180 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8182 * server.c (monitor_show_help): Add "exit".
8184 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8186 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8187 (clean): Add reg-xtensa.c.
8188 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8189 * configure.srv (xtensa*-*-linux*) New target.
8190 * linux-xtensa-low.c: New.
8191 * xtensa-xtregs.c: New.
8193 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8195 * hostio.c: Don't include errno.h.
8196 (errno_to_fileio_errno): Move to hostio-errno.
8197 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8198 error number outputting to the target->hostio_last_error callback.
8199 (hostio_packet_error): Use FILEIO_EINVAL directly.
8200 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8201 calls to hostio_error.
8202 * hostio-errno.c: New.
8203 * server.h (hostio_last_error_from_errno): Declare.
8204 * target.h (target_ops): Add hostio_last_error member.
8205 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8206 as hostio_last_error handler.
8207 * spu-low.c (spu_target_ops): Likewise.
8208 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8209 (wince_hostio_last_error): New functions.
8210 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8211 as hostio_last_error handler.
8212 (win32_target_ops) [!_WIN32_WCE]: Register
8213 hostio_last_error_from_errno as hostio_last_error handler.
8214 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8215 (hostio-errno.o): New rule.
8216 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8217 * configure.srv (srv_hostio_err_objs): New variable. Default to
8219 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8220 * configure: Regenerate.
8222 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8224 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8225 (linux_kill, linux_detach): Clean up the process list.
8226 * remote-utils.c (remote_open): Improve port number parsing.
8227 (putpkt_binary, input_interrupt): Only send interrupts if the target
8229 * server.c (extended_protocol): Make static.
8230 (attached): Define earlier.
8231 (exit_requested, response_needed, program_argv): New variables.
8232 (target_running): New.
8233 (start_inferior): Clear attached here.
8234 (attach_inferior): Set attached here.
8235 (require_running): Define.
8236 (handle_query): Use require_running and target_running. Implement
8238 (handle_v_attach, handle_v_run): New.
8239 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8240 (gdbserver_usage): Update.
8241 (main): Redo argument parsing. Handle --debug and --multi. Handle
8242 --attach along with other options or after the port. Save
8243 program_argv. Support no initial program. Resynchronize
8244 communication with GDB after an error. Handle "monitor exit".
8245 Use require_running and target_running. Always allow the extended
8246 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8247 restart in extended mode.
8248 * README: Refer to the GDB manual. Update --attach usage.
8250 2007-12-20 Andreas Schwab <schwab@suse.de>
8252 * linux-low.c (STACK_SIZE): Define.
8253 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8254 (linux_test_for_tracefork): Likewise.
8256 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8258 * linux-low.c (linux_wait_for_event): Update messages. Do not
8259 reinsert auto-delete breakpoints.
8260 * mem-break.c (struct breakpoint): Change return type of handler to
8262 (set_breakpoint_at): Update handler type.
8263 (reinsert_breakpoint_handler): Return 1 instead of calling
8265 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8267 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8268 * mem-break.h (set_breakpoint_at): Update handler type.
8269 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8270 * win32-low.c (auto_delete_breakpoint): New.
8271 (get_child_debug_event): Use it.
8273 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8275 * configure.ac: Check for pread and pwrite.
8276 * hostio.c (handle_pread): Fall back to lseek and read.
8277 (handle_pwrite): Fall back to lseek and write.
8278 * config.in, configure: Regenerated.
8280 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8282 * server.c (myresume): Add own_buf argument.
8283 (main): Update calls.
8285 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8287 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8288 * remote-utils.c (remote_open): Do not call disable_async_io.
8289 (block_async_io): Delete.
8290 (unblock_async_io): Make static.
8291 (initialize_async_io): New.
8292 * server.c (handle_v_cont): Handle async I/O here.
8293 (myresume): Likewise. Move other common resume tasks here...
8294 (main): ... from here. Call initialize_async_io. Disable async
8295 I/O before the main loop.
8296 * server.h (initialize_async_io): Declare.
8297 (block_async_io, unblock_async_io): Delete prototypes.
8298 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8300 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8302 * remote-utils.c (readchar): Allow binary data in received messages.
8304 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8306 * win32-low.c (attaching): New global.
8307 (win32_create_inferior): Clear the `attaching' global.
8308 (win32_attach): Set the `attaching' global.
8309 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8310 attaching. Only set a breakpoint at the entry point if not
8313 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8315 * server.c (main): Don't report dll events on the initial
8316 connection on attaches.
8318 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8320 * server.c (main): Relax numerical bases supported for the pid of
8321 the --attach command line argument.
8323 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8325 * win32-low.c (win32_attach): Call OpenProcess before
8326 DebugActiveProcess, not after. Add last error output to error
8329 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8331 * win32-low.c (win32_get_thread_context)
8332 (win32_set_thread_context): New functions.
8333 (thread_rec): Use win32_get_thread_context.
8334 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8335 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8338 2007-12-03 Leo Zayas
8339 Pedro Alves <pedro_alves@portugalmail.pt>
8341 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8343 (child_add_thread): Minor cleanup.
8344 (child_continue): Resume artificially suspended threads before
8345 calling ContinueDebugEvent.
8346 (suspend_one_thread): New.
8347 (fake_breakpoint_event): New.
8348 (get_child_debug_event): Change return type to int. Check here if
8349 gdb sent an interrupt request. If a soft interrupt was requested,
8350 fake a breakpoint event. Return 0 if there is no event to handle,
8352 (win32_wait): Don't check here if gdb sent an interrupt request.
8353 Ensure there is a valid event to handle.
8354 (win32_request_interrupt): Add soft interruption method as last
8357 2007-12-03 Leo Zayas
8358 Pedro Alves <pedro_alves@portugalmail.pt>
8360 * win32-low.h (win32_thread_info): Add descriptions to the
8361 structure members. Replace `suspend_count' counter by a
8363 * win32-low.c (thread_rec): Update condition of when to get the
8364 context from the inferior. Rely on ContextFlags being set if it
8365 has already been retrieved. Only suspend the inferior thread if
8366 we haven't already. Warn if that fails.
8367 (continue_one_thread): s/suspend_count/suspended/. Only call
8368 ResumeThread once. Warn if that fails.
8370 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8372 * win32-low.c (win32_wait): Don't read from the inferior when it
8375 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8377 * Makefile.in (win32_low_h): New variable.
8378 (win32-low.o): Add dependency on $(win32_low_h).
8379 (win32-arm-low.o, win32-i386-low.o): New rules.
8381 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8383 * hostio.c: Correct copyright year.
8385 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8387 * Makefile.in (OBS): Add hostio.o.
8388 (hostio.o): New rule.
8389 * server.h (handle_vFile): Declare.
8390 * hostio.c: New file.
8391 * server.c (handle_v_requests): Take packet_len and new_packet_len
8392 for binary packets. Call handle_vFile.
8393 (main): Update call to handle_v_requests.
8395 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8397 * linux-low.c: Include <sched.h>.
8399 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8401 * linux-low.c (linux_tracefork_grandchild): New.
8402 (linux_tracefork_child): Use clone.
8403 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8405 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8407 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8409 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8411 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8413 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8415 * inferiors.c (change_inferior_id): Delete.
8416 (add_pid_to_list, pull_pid_from_list): New.
8417 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8418 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8419 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8420 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8421 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8422 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8423 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8424 (using_threads): Always set to 1.
8425 (handle_extended_wait): New.
8426 (add_process): Do not set TID.
8427 (linux_create_inferior): Set must_set_ptrace_flags.
8428 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8429 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8430 (linux_thread_alive): Rename TID argument to LWPID.
8431 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8432 (linux_wait_for_event): Do not use TID or check using_threads. Update
8433 call to dead_thread_notify. Call handle_extended_wait.
8434 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8435 (send_sigstop): Delete sigstop_sent.
8436 (wait_for_sigstop): Avoid TID.
8437 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8438 (linux_test_for_tracefork): New.
8439 (linux_lookup_signals): Use thread_db_active and
8440 linux_supports_tracefork_flag.
8441 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8442 * linux-low.h (get_process_thread): Avoid TID.
8443 (struct process_ifo): Move thread_known and tid to the end. Remove
8445 (linux_attach_lwp, thread_db_init): Update prototypes.
8446 * server.h (change_inferior_id): Delete prototype.
8447 (add_pid_to_list, pull_pid_from_list): New prototypes.
8448 * thread-db.c (thread_db_use_events): New.
8449 (find_first_thread): Rename to...
8450 (find_one_thread): ...this. Update callers and messages. Do not
8451 call fatal. Check thread_db_use_events. Do not call
8452 change_inferior_id or new_thread_notify.
8453 (maybe_attach_thread): Update. Do not call new_thread_notify.
8454 (thread_db_init): Set thread_db_use_events. Check use_events.
8455 * utils.c (fatal, warning): Correct message prefix.
8457 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8459 * Makefile.in (clean): Remove new files.
8460 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8461 (powerpc-64.o, powerpc-64.c): New rules.
8462 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8463 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8465 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8467 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8468 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8469 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8470 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8471 (target_regsets): Add AltiVec and SPE register sets.
8472 * configure.ac: Check for AltiVec and SPE.
8473 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8474 (ppc_fill_vrregset, ppc_store_vrregset): New.
8475 (target_regsets): Add AltiVec register set.
8476 * configure: Regenerated.
8478 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8480 * linux-low.c (O_LARGEFILE): Define.
8481 (linux_read_memory): Use /proc/PID/mem.
8482 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8483 * configure, config.in: Regenerated.
8485 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8487 * linux-low.c (linux_wait_for_event): Do not pass signals while
8490 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8492 * win32-low.c (create_process): New.
8493 (win32_create_inferior): Use create_process instead of
8494 CreateProcess. If create_process failed retry appending an ".exe"
8495 suffix. Store the GetLastError result immediatelly after
8496 create_process calls and use it on the call to error.
8498 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8500 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8502 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8504 * configure.ac: Switch license to GPLv3.
8506 2007-08-01 Michael Snyder <msnyder@access-company.com>
8508 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8510 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8512 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8514 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8515 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8516 CloseToolhelp32Snapshot.
8517 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8518 CloseToolhelp32Snapshot.
8520 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8522 * server.c (main): Check for inferior exit before main loop.
8524 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8526 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8527 instead of on tmp_desc.
8529 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8530 Daniel Jacobowitz <dan@codesourcery.com>
8532 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8533 (add_thread): Minor cleanups.
8534 (clear_inferiors): Move lower in the file. Clear the DLL
8536 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8537 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8538 (xml_escape_text): New.
8539 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8541 (handle_v_cont): Report errors.
8542 (gdbserver_version): Update.
8543 (main): Correct size of own_buf. Do not report initial DLL events.
8544 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8545 (unloaded_dll, xml_escape_text): New.
8546 * win32-low.c (enum target_waitkind): Update comments.
8547 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8548 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8549 (win32_EnumProcessModules, win32_GetModuleInformation)
8550 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8551 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8552 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8553 (win32_Module32First, win32_Module32Next, load_toolhelp)
8554 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8555 (get_child_debug_event): Handle DLL events.
8556 (win32_wait): Likewise.
8558 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8560 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8561 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8563 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8565 * win32-low.c (handle_output_debug_string): Ignore event if not
8568 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8570 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8572 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8574 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8576 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8578 * inferiors.c (change_inferior_id): Add comment.
8579 * linux-low.c (check_removed_breakpoint): Add an early
8580 prototype. Improve debug output.
8581 (linux_attach): Doc update.
8582 (linux_detach_one_process, linux_detach): Clean up before releasing
8584 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8585 * linux-low.h (struct process_info): Doc improvement.
8586 * mem-break.c (delete_all_breakpoints): New.
8587 * mem-break.h (delete_all_breakpoints): New prototype.
8588 * thread-db.c (find_first_thread): New.
8589 (thread_db_create_event): Call it instead of
8590 thread_db_find_new_threads. Clean up unused variables.
8591 (maybe_attach_thread): Remove first thread handling.
8592 (thread_db_find_new_threads): Use find_first_thread.
8593 (thread_db_get_tls_address): Likewise.
8595 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8597 * thread-db.c (thread_db_find_new_threads): Add prototype.
8598 (thread_db_create_event): Check for the main thread before adding
8600 (maybe_attach_thread): Only enable event reporting if TID == 0.
8601 (thread_db_get_tls_address): Check for new threads.
8603 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8605 * linux-low.c (linux_create_inferior): Try execv before execvp.
8606 * spu-low.c (spu_create_inferior): Likewise.
8608 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8610 * linux-low.c (linux_create_inferior): Change execv to execvp.
8611 * spu-low.c (spu_create_inferior): Likewies.
8613 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8615 * Makefile.in (clean): Clean new files instead of deleted ones.
8616 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8617 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8619 * configure.srv: Specify XML files and new regformats for MIPS and
8621 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8622 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8623 an entry for the restart register.
8624 (mips_cannot_fetch_register, mips_cannot_store_register)
8625 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8626 register names to match the XML descriptions.
8627 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8628 restart register instead of $0.
8630 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8631 Markus Deuling <deuling@de.ibm.com>
8633 * remote-utils.c (decode_xfer_write): New function.
8634 * server.h (decode_xfer_write): Add prototype.
8635 * server.c (handle_query): Add PACKET_LEN argument. Support
8636 qXfer:spu:read and qXfer:spu:write packets.
8637 (main): Pass packet_len to handle_query.
8638 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8639 * target.h (target_ops): Add qxfer_spu.
8641 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8643 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8644 accessing non-seekable spufs files.
8646 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8648 * server.c (handle_query): Add reply for qC packet.
8650 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8651 Leo Zayas <lerele@champenstudios@com>
8653 * server.h (check_remote_input_interrupt_request): New function.
8654 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8655 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8656 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8657 (check_remote_input_interrupt_request): New function.
8658 * server.h (check_remote_input_interrupt_request): Declare.
8659 * win32-low.c (winapi_DebugBreakProcess,
8660 winapi_GenerateConsoleCtrlEvent): New typedefs.
8661 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8663 (win32_wait): Check for remote interrupt request
8664 with check_remote_input_interrupt_request.
8665 (win32_request_interrupt): New function.
8666 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8668 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8670 * win32-low.c (debug_registers_changed,
8671 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8672 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8673 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8674 (thread_rec): Get context using the low target.
8675 (child_add_thread): Call thread_added on the low target,
8676 which does the same thing.
8678 (do_initial_child_stuff): Remove debug registers references.
8679 Set context using the low target. Resume threads after
8680 setting the contexts.
8681 (child_continue): Remove dead variable. Remove debug
8682 registers references.
8683 (child_fetch_inferior_registers): Go through the low target.
8684 (do_child_store_inferior_registers): Remove.
8685 (child_store_inferior_registers): Go through the low target.
8686 (win32_resume): Remove debug registers references.
8687 Set context using the low target.
8688 (handle_exception): Change return type to void. Don't record
8689 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8690 first chance exception.
8691 (get_child_debug_event): Change return type to void. Remove
8692 goto loop. Always return after waiting for debug event.
8693 (win32_wait): Convert to switch statement. Handle spurious
8696 * win32-i386-low.c (debug_registers_changed,
8697 debug_registers_used): New.
8698 (initial_stuff): Rename to ...
8699 (i386_initial_stuff): ... this. Clear debug registers
8701 (store_debug_registers): Delete.
8702 (i386_get_thread_context): New.
8703 (load_debug_registers): Delete.
8704 (i386_set_thread_context): New.
8705 (i386_thread_added): New.
8706 (single_step): Rename to ...
8707 (i386_single_step): ... this.
8708 (do_fetch_inferior_registers): Rename to ...
8709 (i386_fetch_inferior_register): ... this.
8710 (i386_store_inferior_register): New.
8711 (the_low_target): Adapt to new interface.
8713 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8714 (arm_get_thread_context): New.
8715 (arm_set_thread_context): New.
8717 (do_fetch_inferior_registers): Rename to ...
8718 (arm_fetch_inferior_register): ... this.
8719 (arm_store_inferior_register): New.
8720 (arm_wince_breakpoint): Reimplement as unsigned long.
8721 (arm_wince_breakpoint_len): Define.
8722 (the_low_target): Adapt to new interface.
8724 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8725 load_debug_registers. Add get_thread_context, set_thread_context,
8726 thread_added and store_inferior_register. Rename
8727 fetch_inferior_registers to fetch_inferior_register.
8728 (regptr): Remove declaration.
8730 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8732 * linux-low.c (linux_detach): Change return type to int. Return 0.
8733 * spu-low.c (spu_detach): Likewise.
8735 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8737 * target.h (target_ops): Change return type of detach to int.
8739 (join_inferior): New.
8740 * server.c (main): Don't skip detach support on mingw32.
8741 If the inferior doesn't support detaching return error.
8742 Call join_inferior instead of using waitpid.
8743 * linux-low.c (linux_join): New.
8744 (linux_target_op): Add linux_join.
8745 * spu-low.c (spu_join): New.
8746 (spu_target_ops): Add spu_join.
8747 * win32-low.c (win32_detach): Adapt to new interface.
8748 Reopen current_process_handle before detaching. Issue a child
8749 resume before detaching.
8751 (win32_target_op): Add win32_join.
8753 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8755 * win32-low.c (win32-attach): Fix return value.
8756 * target.h (target_ops): Describe ATTACH return values.
8758 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8760 * win32-low.c (GETPROCADDRESS): Define.
8761 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8762 (winapi_DebugSetProcessKillOnExit): Likewise.
8763 (win32_create_inferior): Force usage of ansi CreateProcessA.
8764 (win32_attach): Use GETPROCADDRESS.
8765 (win32_detach): Likewise.
8767 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8769 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8771 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8773 * win32-low.c: Commit leftover changes from 2007-03-29.
8775 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8777 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8778 fields short instead of int. Add explicit padding.
8779 (i387_cache_to_fsave): Remove unnecessary casts.
8780 (i387_fsave_to_cache): Doc fix.
8781 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8783 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8785 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8786 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8788 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8790 * configure.srv (arm*-*-mingw32ce*): Move near the other
8793 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8795 * configure.ac: Add errno checking.
8796 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8797 sys/file.h and malloc.h.
8798 (AC_CHECK_DECLS): Add perror.
8799 (srv_mingwce): Handle.
8800 * configure.srv (i[34567]86-*-cygwin*): Add
8801 win32-i386-low.o to srv_tgtobj.
8802 (i[34567]86-*-mingw*): Likewise.
8803 (arm*-*-mingw32ce*): Add case.
8804 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8805 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8806 [__MINGW32CE__] (strerror): New function.
8807 [__MINGW32CE__] (errno): Define to GetLastError.
8808 [__MINGW32CE__] (COUNTOF): New macro.
8809 (remote_open): Remove extra close call.
8810 * mem-break.c (delete_breakpoint_at): New function.
8811 * mem-break.h (delete_breakpoint_at): Declare.
8812 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8813 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8814 [USE_WIN32API] (read, write): Add char* casts.
8815 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8816 * server.h: Include wincecompat.h on Windows CE.
8817 [HAVE_ERRNO_H]: Check.
8818 (perror): Declare if not declared.
8819 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8820 (perror_with_name): Remove errno declaration.
8821 * wincecompat.h: New.
8822 * wincecompat.c: New.
8824 * win32-arm-low.c: New.
8825 * win32-i386-low.c: New.
8826 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8827 (OUTMSG2): Make it safe.
8829 (COUNTOF): New macro.
8830 (NUM_REGS): Get it from the low target.
8831 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8832 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8833 (thread_rec): Let low target handle debug registers.
8834 (child_add_thread): Likewise.
8835 (child_init_thread_list): Likewise.
8836 (continue_one_thread): Likewise.
8838 (do_child_fetch_inferior_registers): Move to ...
8839 * win32-i386-low.c: ... here, and rename to ...
8840 (do_fetch_inferior_registers): ... this.
8841 * win32-low.c (child_fetch_inferior_registers):
8842 Go through the low target.
8843 (do_child_store_inferior_registers): Use regptr.
8844 (strwinerror): New function.
8845 (win32_create_inferior): Handle Windows CE.
8846 Use strwinerror instead of strerror on Windows error
8847 codes. Add program to the error output.
8848 Don't close the main thread handle on Windows CE.
8849 (win32_attach): Use coredll.dll on Windows CE.
8850 (win32_kill): Close current process and current
8852 (win32_detach): Use coredll.dll on Windows CE.
8853 (win32_resume): Let low target handle debug registers, and
8855 (handle_exception): Add/Remove initial breakpoint. Avoid
8856 non-existant WSTOPSIG on Windows CE.
8857 (win32_read_inferior_memory): Cast to remove warning.
8858 (win32_arch_string): Go through the low target.
8859 (initialize_low): Call set_breakpoint_data with the low
8860 target's breakpoint.
8861 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8862 FOP_REGNUM, mappings): Move to ...
8863 * win32-i386-low.c: ... here.
8864 * win32-low.c (win32_thread_info): Move to ...
8865 * win32-low.h: ... here.
8866 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8867 win32-arm-low.c and wincecompat.c.
8868 (all:): Add $EXEEXT.
8869 (install-only:): Likewise.
8870 (gdbserver:): Likewise.
8871 (gdbreplay:): Likewise.
8872 * config.in: Regenerate.
8873 * configure: Regenerate.
8875 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8877 * win32-low.c: Rename typedef thread_info to
8878 win32_thread_info throughout.
8880 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8882 * win32-i386-low.c: Rename to ...
8883 * win32-low.c: ... this.
8884 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8885 * Makefile.in: Likewise.
8887 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8889 * remote-utils.c (monitor_output): Constify msg parameter.
8890 * server.h (monitor_output): Likewise.
8891 * win32-i386-low.c (handle_output_debug_string): New.
8892 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8893 handle_output_debug_string.
8894 (get_child_debug_event): Likewise.
8896 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8898 * server.c (main): Correct strtoul check.
8900 2007-03-27 Jon Ringle <jon@ringle.org>
8902 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8904 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8906 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8908 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8910 * terminal.h: Check HAVE_SGTTY_H.
8912 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
8914 * remote-utils.c (remote_open): Print out the assigned port number.
8916 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8918 * remote-utils.c (monitor_output): New function.
8919 * server.c (debug_threads): Define here.
8920 (monitor_show_help): New function.
8921 (handle_query): Handle qRcmd.
8922 (main): Do not handle 'd' packet.
8923 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8924 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8927 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8929 * Makefile.in (EXEEXT): New.
8930 (clean): Use $(EXEEXT).
8932 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8934 * target.h (target_ops): Rename send_signal to request_interrupt,
8935 and remove enum target_signal parameter.
8936 * linux-low.c (linux_request_interrupt): Rename from
8937 linux_send_signal, and always send SIGINT.
8938 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8939 and always send SIGINT.
8940 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8942 (input_interrupt): Likewise.
8944 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8946 * server.c (get_features_xml): Check if target implemented
8948 * win32-i386-low.c (win32_arch_string): New.
8949 (win32_target_ops): Add win32_arch_string as arch_string member.
8951 2007-02-22 Markus Deuling <deuling@de.ibm.com>
8953 * spu-low.c (spu_arch_string): New.
8954 (spu_target_ops): Add spu_arch_string.
8956 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8958 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8959 * configure.ac: Do not check for terminal.h.
8960 * configure, config.in: Regenerated.
8962 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8964 * Makefile.in (OBS): Add $(XML_BUILTIN).
8965 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8967 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8968 (arm-with-iwmmxt.c): New.
8969 * config.in, configure: Regenerate.
8970 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8971 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8972 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8973 (arm*-*-linux*): Add iWMMXt and regset support.
8974 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8975 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8976 (arm_store_wmmxregset, target_regsets): New.
8977 * server.c (get_features_xml): Take annex argument. Check builtin
8979 (handle_query): Handle multiple annexes.
8981 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8983 * remote-utils.c [USE_WIN32API] (read, write): Define.
8984 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8987 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8989 * linux-i386-low.c (the_low_target): Set arch_string.
8990 * linux-x86-64-low.c (the_low_target): Likewise.
8991 * linux-low.c (linux_arch_string): New.
8992 (linux_target_ops): Add it.
8993 * linux-low.h (struct linux_target_ops): Add arch_string.
8994 * server.c (write_qxfer_response): Use const void * for DATA.
8995 (get_features_xml): New.
8996 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8997 * target.h (struct target_ops): Add arch_string method.
8999 2007-01-03 Denis Pilat <denis.pilat@st.com>
9000 Daniel Jacobowitz <dan@codesourcery.com>
9002 * linux-low.c (linux_kill): Handle being called with no threads.
9003 * win32-i386-low.c (win32_kill): Likewise.
9004 (get_child_debug_event): Clear current_process_handle.
9006 2006-12-30 Denis PILAT <denis.pilat@st.com>
9007 Daniel Jacobowitz <dan@codesourcery.com>
9009 * remote-utils.c (remote_open): Check the type of specified
9010 serial port devices before opening them.
9011 * server.c (main): Kill the inferior if an error occurs during
9012 the first remote_open.
9014 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9016 * README: Update supported targets.
9018 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9020 * Makefile.in (clean): Remove reg-mips64.c.
9021 (reg-mips64.c, reg-mips64.o): New rules.
9022 * configure.srv: Handle mips64. Include regset support for mips.
9023 * linux-mips-low.c (union mips_register): New.
9024 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9025 (mips_breakpoint, mips_breakpoint_at): Use int.
9026 (mips_collect_register, mips_supply_register)
9027 (mips_collect_register_32bit, mips_supply_register_32bit)
9028 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9029 (mips_store_fpregset, target_regsets): New.
9030 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9032 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9034 * configure.srv: Add target "spu*-*-*".
9035 * Makefile.in (clean): Remove reg-spu.c.
9036 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9037 * spu-low.c: New file.
9039 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9041 * configure.ac: Correct td_thr_tls_get_addr test.
9042 * configure: Regenerated.
9044 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9046 * linux-low.c (linux_wait_for_event): Reformat. Use the
9048 * remote-utils.c (decode_address_to_semicolon): New.
9049 * server.c (pass_signals, handle_general_set): New.
9050 (handle_query): Mention QPassSignals for qSupported.
9051 (main): Call handle_general_set.
9052 * server.h (pass_signals, decode_address_to_semicolon): New.
9054 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9056 * server.c (handle_query): Correct error handling for read_auxv.
9058 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9060 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9061 and srv_linux_thread_db to yes.
9062 * linux-s390-low.c (s390_fill_gregset): New function.
9063 (target_regsets): Define data structure.
9065 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9067 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9068 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9069 * config.in, configure: Regenerated.
9070 * inferiors.c (gdb_id_to_thread): New function.
9071 (gdb_id_to_thread_id): Use it.
9072 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9073 * linux-low.h (struct process_info): Add th member.
9074 (thread_db_get_tls_address): New prototype.
9075 * remote-utils.c (decode_address): Make non-static.
9076 * server.c (handle_query): Handle qGetTLSAddr.
9077 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9078 * target.h (struct target_ops): Add get_tls_address.
9079 * thread-db.c (maybe_attach_thread): Save the thread handle.
9080 (thread_db_get_tls_address): New.
9082 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9084 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9085 (linux_resume_one_process): Take a siginfo_t *. Update all
9086 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9087 (struct pending_signals): Add a siginfo_t.
9088 (linux_wait_for_process): Always set last_status.
9089 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9090 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9091 * linux-low.h (struct process_info): Add last_status.
9093 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9095 * remote-utils.c (try_rle): New function.
9096 (putpkt_binary): Use it.
9098 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9100 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9101 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9102 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9103 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9104 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9107 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9109 * server.c (terminal_fd): New variable.
9110 (old_foreground_pgrp): Likewise.
9111 (restore_old_foreground_pgrp): New function.
9112 (start_inferior): Record the terminal file descriptor in terminal_fd
9113 and its original foreground group in old_foreground_pgrp. Register
9114 restore_old_foreground_pgrp with atexit().
9116 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9118 * server.c (handle_query): Correct qPart to qXfer.
9120 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9122 * configure.ac: Check for more headers which are missing on
9123 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9124 * configure.srv: Add Cygwin and mingw32.
9125 * remote-utils.c: Don't include headers unconditionally which
9126 are missing on mingw32. Include <winsock.h> for mingw32.
9127 (remote_open): Adjust for mingw32 support. Flush
9128 standard error after writing to it.
9129 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9130 (unblock_async_io, enable_async_io, disable_async_io)
9131 (readchar, getpkt): Update for Winsock support.
9132 (prepare_resume_reply): Expect a protocol signal number.
9133 * server.c: Disable <sys/wait.h> on mingw32.
9134 (start_inferior): Adjust for mingw32 support. Flush
9135 standard error after writing to it.
9136 (attach_inferior): Likewise. Use protocol signal
9138 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9140 * win32-i386-low.c: New file.
9141 * Makefile.in (XM_CLIBS): Set.
9142 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9143 (win32-i386-low.o): New dependency rule.
9144 * linux-low.c (linux_wait): Use target signal numbers.
9145 * target.h (struct target_ops): Doc fix.
9146 * server.h (target_signal_to_name): New prototype.
9147 * gdbreplay.c: Don't include headers unconditionally which
9148 are missing on mingw32. Include <winsock.h> for mingw32.
9149 (remote_close, remote_open): Adjust for Winsock support.
9150 * configure, config.in: Regenerated.
9152 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9154 * server.c (decode_xfer_read, write_qxfer_response): New.
9155 (handle_query): Take a packet length argument. Handle
9156 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9157 the qSupported response.
9158 (main): Update call to handle_query.
9160 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9162 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9163 (putpkt_binary): Renamed from putpkt and adjusted for binary
9165 (putpkt): New wrapper for putpkt_binary.
9166 (readchar): Don't mask off the high bit.
9167 (decode_X_packet): New function.
9168 * server.c (main): Call putpkt_binary if a handler sets the packet
9169 length. Save the length of the incoming packet. Handle 'X'.
9170 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9172 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9174 * server.c (handle_query): Handle qSupported.
9176 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9178 * remote-utils.c (all_symbols_looked_up): New variable.
9179 (look_up_one_symbol): Check it.
9180 * server.h (look_up_one_symbol): New declaration.
9181 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9183 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9185 * Makefile.in (linux-arm-low.o): Update dependencies.
9186 * linux-arm-low.c: Include "gdb_proc_service.h".
9187 (PTRACE_GET_THREAD_AREA): Define.
9188 (ps_get_thread_area): New function.
9190 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9192 * configure.srv (m68k*-*-uclinux*): New target.
9193 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9194 (linux_resume_one_process): Remove extraneous cast.
9195 (linux_read_offsets): New.
9196 (linux_target_op): Add linux_read_offsets on mmuless systems.
9197 * server.c (handle_query): Add qOffsets logic.
9198 * target.h (struct target_ops): Add read_offsets.
9200 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9202 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9203 (PTRACE_GET_THREAD_AREA): Define.
9204 (ps_get_thread_area): New function.
9205 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9206 (linux-x86-64-low.o): Update.
9208 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9210 * configure.ac: Remove checks for prfpregset_t.
9211 * gdb_proc_service.h: New file.
9212 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9213 new "gdb_proc_service.h".
9214 * proc-service.c: Likewise.
9215 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9216 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9217 * Makefile.in (gdb_proc_service_h): Updated.
9218 * configure, config.in: Regenerated.
9220 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9222 * remote-utils.c (prepare_resume_reply): Move declaration
9223 of gdb_id_from_wait to the top of the block.
9225 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9227 * linux-low.c (regsets_store_inferior_registers): Read the regset
9228 from the target before filling it.
9230 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9232 * server.c (attach_inferior): Return SIGTRAP for a successful
9235 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9237 * Makefile.in (OBS): Add version.o.
9238 (STAGESTUFF): Delete.
9239 (version.o): Add dependencies.
9240 (version.c): Replace rule.
9241 (clean): Remove version.c.
9242 * server.c (gdbserver_version): New.
9243 (gdbserver_usage): Use printf.
9244 (main): Handle --version and --help.
9245 * server.h (version, host_name): Add declarations.
9247 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9259 * linux-x86-64-low.c:
9262 * linux-ppc64-low.c:
9271 * linux-crisv32-low.c:
9283 * gdbserver.1: Add (C) after Copyright. Update the FSF
9286 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9288 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9289 (arm_breakpoint_at): Recognize both breakpoints.
9290 (the_low_target): Use the correct breakpoint instruction.
9292 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9294 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9295 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9296 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9297 (the_low_target): Update.
9299 2005-10-25 Andreas Schwab <schwab@suse.de>
9301 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9303 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9304 (ia64_num_regs): Reduce to 462.
9306 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9308 * acinclude.m4: Correct quoting.
9309 * aclocal.m4: Regenerated.
9311 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9312 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9313 (thread_db_init): Call thread_db_err_str.
9314 * configure.ac: Check for TD_VERSION.
9315 * config.in, configure: Regenerated.
9317 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9319 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9321 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9323 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9324 is not available. Define HAVE_PTRACE_GETREGS if it is.
9325 * config.in, configure: Regenerated.
9326 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9327 * linux-i386-low.c, linux-m68k-low.c: Update to use
9328 HAVE_PTRACE_GETREGS.
9329 * linux-low.c (regsets_fetch_inferior_registers)
9330 (regsets_store_inferior_registers): Only return 0 if we processed
9332 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9333 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9335 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9337 * inferiors.c (struct thread_info): Add gdb_id.
9338 (add_thread): Add gdb_id argument.
9339 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9340 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9341 calls to add_thread.
9342 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9343 * server.c (handle_query): Use thread_to_gdb_id.
9344 (handle_v_cont, main): Use gdb_id_to_thread_id.
9345 * server.h (add_thread): Update prototype.
9346 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9349 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9351 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9352 left-padded registers.
9353 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9354 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9356 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9358 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9359 * configure: Regenerate.
9360 * config.in: Regenerate.
9361 * server.h (NEED_DECLARATION_STRERROR):
9362 Replace with !HAVE_DECL_STRERROR.
9364 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9366 * linux-low.c (linux_wait, linux_send_signal): Don't test
9367 an unsigned long variable for > 0 if it could be MAX_ULONG.
9368 * server.c (myresume): Likewise.
9369 * target.c (set_desired_inferior): Likewise.
9371 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9373 * configure.ac: Simplify and improve check for socklen_t.
9374 * configure, config.in: Regenerate.
9376 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9378 * acconfig.h: Remove.
9379 * configure.ac: Add a test for socklen_t. Use three-argument
9380 AC_DEFINE throughout.
9381 * config.in: Regenerated using autoheader 2.59.
9382 * configure: Regenerated.
9384 * gdbreplay.c (socklen_t): Provide a default.
9385 (remote_open): Use socklen_t.
9386 * remote-utils.c (socklen_t): Provide a default.
9387 (remote_open): Use socklen_t.
9388 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9391 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9393 * linux-low.c (linux_read_memory, linux_write_memory)
9394 (linux_read_auxv): Likewise.
9395 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9396 (check_mem_write): Likewise.
9397 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9399 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9400 (registers_from_string, register_data): Likewise.
9401 * server.c (handle_query, main): Likewise.
9402 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9403 (decode_M_packet): Likewise.
9404 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9405 * target.h (struct target_ops): Update read_memory, write_memory,
9407 (read_inferior_memory, write_inferior_memory): Update.
9408 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9410 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9411 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9412 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9413 linux-s390-low.c, linux-sh-low.c: Update for changes in
9414 read_inferior_memory and the_low_target->breakpoint.
9416 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9418 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9419 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9420 * configure.srv: Add powerpc64-*-linux*.
9421 * linux-ppc64-low.c: New file.
9423 2005-05-23 Orjan Friberg <orjanf@axis.com>
9425 * linux-cris-low.c: New file with support for CRIS.
9426 * linux-crisv32-low.c: Ditto for CRISv32.
9427 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9428 (clean): Add reg-cris.c and reg-crisv32.c.
9429 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9430 reg-crisv32.o, and reg-crisv32.c to make rules.
9431 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9434 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9436 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9437 of sizeof (PTRACE_XFER_TYPE).
9438 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9440 2005-05-12 Orjan Friberg <orjanf@axis.com>
9442 * target.h (struct target_ops): Add insert_watchpoint,
9443 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9444 pointers for hardware watchpoint support.
9445 * linux-low.h (struct linux_target_ops): Ditto.
9446 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9447 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9448 to linux_target_ops.
9449 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9451 * server.c (main): Recognize 'Z' and 'z' packets.
9453 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9455 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9456 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9457 (the_low_target): Add new members.
9459 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9461 * proc-service.c (ps_lgetregs): Search all_processes instead of
9464 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9466 * server.c (start_inferior): Change return type to int.
9467 (attach_inferior): Change sigptr to int *.
9468 (handle_v_cont, handle_v_requests): Change signal to int *.
9469 (main): Change signal to int.
9471 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9473 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9474 * configure.srv: Add m32r*-*-linux*.
9475 * linux-m32r-low.c: New file.
9477 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9479 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9481 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9483 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9484 Take unsigned long arguments for PIDs.
9485 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9486 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9487 (wait_for_sigstop, linux_resume_one_process)
9488 (regsets_fetch_inferior_registers, linux_send_signal)
9489 (linux_read_auxv): Likewise. Update the types of variables holding
9490 PIDs. Update format string specifiers.
9491 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9492 * remote-utils.c (prepare_resume_reply): Likewise.
9493 * server.c (cont_thread, general_thread, step_thread)
9494 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9496 (handle_query): Update format specifiers.
9497 (handle_v_cont, main): Use strtoul for thread IDs.
9498 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9499 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9500 (general_thread, step_thread, thread_from_wait)
9501 (old_thread_from_wait): Update.
9502 * target.h (struct thread_resume): Use unsigned long for THREAD.
9503 (struct target_ops): Use unsigned long for arguments to attach and
9506 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9508 * acinclude.m4: Include bfd/bfd.m4 directly.
9509 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9510 <agriffis@toolchain.org>.
9511 * aclocal.m4, configure: Regenerated.
9513 2005-01-07 Andrew Cagney <cagney@gnu.org>
9515 * configure.ac: Rename configure.in, require autoconf 2.59.
9516 * configure: Re-generate.
9518 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9520 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9522 * aclocal.m4: Regenerated.
9523 * configure: Regenerated.
9525 2004-11-21 Andreas Schwab <schwab@suse.de>
9527 * linux-m68k-low.c (m68k_num_gregs): Define.
9528 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9529 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9530 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9531 (m68k_breakpoint_at): New. Add to the_low_target.
9533 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9534 srv_linux_thread_db to yes.
9536 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9538 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9539 (ARCH_SET_FS): Likewise.
9540 (ARCH_GET_FS): Likewise.
9541 (ARCH_GET_GS): Likewise.
9543 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9545 * linux-i386-low.c (ps_get_thread_area): New.
9546 * linux-x86-64-low.c (ps_get_thread_area): New.
9547 * linux-low.c: Include <sys/syscall.h>.
9548 (linux_kill_one_process): Don't kill the first thread here.
9549 (linux_kill): Kill the first thread here.
9550 (kill_lwp): New function.
9551 (send_sigstop, linux_send_signal): Use it.
9552 * proc-service.c: Clean up #ifdefs.
9553 (fpregset_info): Delete.
9554 (ps_lgetregs): Update and enable implementation.
9555 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9557 * remote-utils.c (struct sym_cache, symbol_cache): New.
9558 (input_interrupt): Print a clearer message.
9559 (async_io_enabled): New variable.
9560 (enable_async_io, disable_async_io): Use it. Update comments.
9561 (look_up_one_symbol): Use the symbol cache.
9562 * thread-db.c (thread_db_look_up_symbols): New function.
9563 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9565 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9567 * configure.in: Test for -rdynamic.
9568 * configure: Regenerated.
9569 * Makefile (INTERNAL_LDFLAGS): New.
9570 (gdbserver, gdbreplay): Use it.
9572 2004-09-02 Andrew Cagney <cagney@gnu.org>
9574 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9576 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9578 * linux-low.c (linux_wait): Clear all_processes list also.
9580 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9582 * linux-low.c: Include <errno.h>. Remove extern declaration of
9585 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9587 * gdbreplay.c, server.h, utils.c: Update copyright years.
9589 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9591 * server.c (main): Print child status or termination signal from
9592 variable 'signal', not 'sig'.
9594 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9596 * linux-low.c (linux_read_memory): Change return type to
9597 int. Check for and return error from ptrace().
9598 * target.c (read_inferior_memory): Change return type to int. Pass
9599 back return status from the_target->read_memory().
9600 * target.h (struct target_ops): Adapt *read_memory() prototype.
9602 (read_inferior_memory): Adapt prototype.
9603 * server.c (main): Return an error packet if
9604 read_inferior_memory() returns an error.
9606 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9608 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9609 Unify with other clean targets.
9611 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9613 * server.c (handle_v_cont): Call set_desired_inferior.
9615 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9617 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9619 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9621 * linux-low.c (linux_wait): Unblock async I/O.
9622 (linux_resume): Block and enable async I/O.
9623 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9624 * server.h (block_async_io, unblock_async_io): Add prototypes.
9626 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9628 * remote-utils.c (remote_open): Print a status notice after
9630 * server.c (attach_inferior): Print a status notice after
9633 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9635 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9637 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9639 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9641 * server.c, target.h: Update copyright years.
9643 2004-02-25 Roland McGrath <roland@redhat.com>
9645 * target.h (struct target_ops): New member `read_auxv'.
9646 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9647 * linux-low.c (linux_read_auxv): New function.
9648 (linux_target_ops): Initialize `read_auxv' member to that.
9650 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9652 Committed by Jim Blandy <jimb@redhat.com>.
9654 * linux-s390-low.c (s390_num_regs): Update.
9655 (s390_regmap): Remove control registers. Use __s390x__ predefine
9656 instead of GPR_SIZE to distiguish s390 and s390x targets.
9658 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9660 * linux-low.c: Update copyright year.
9661 (check_removed_breakpoint): Clear pending_is_breakpoint.
9662 (linux_set_resume_request, linux_queue_one_thread)
9663 (resume_status_pending_p): New functions.
9664 (linux_continue_one_thread): Use process->resume.
9665 (linux_resume): Only resume threads if there are no pending events.
9666 * linux-low.h (struct process_info): Add resume request
9669 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9671 * regcache.c (new_register_cache): Clear the allocated register
9672 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9674 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9676 * linux-low.c (linux_resume): Take a struct thread_resume *
9678 (linux_wait): Update call.
9679 (resume_ptr): New static variable.
9680 (linux_continue_one_thread): Renamed from
9681 linux_continue_one_process. Use resume_ptr.
9682 (linux_resume): Use linux_continue_one_thread.
9683 * server.c (handle_v_cont, handle_v_requests): New functions.
9684 (myresume): New function.
9685 (main): Handle 'v' case.
9686 * target.h (struct thread_resume): New type.
9687 (struct target_ops): Change argument of "resume" to struct
9689 (myresume): Delete macro.
9691 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9693 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9694 (uninstall): Support DESTDIR.
9696 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9698 * configure.srv: Add xscale*linux copy of arm*linux entry.
9700 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9702 * linux-arm-low.c (arm_reinsert_addr): New function.
9703 (the_low_target): Add arm_reinsert_addr.
9705 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9707 * mem-break.c: Remove whitespace at end of file.
9709 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9711 * configure.in: Check whether we need to prototype strerror.
9712 * server.h: Optionally prototype strerror.
9713 * gdbreplay.c (perror_with_name): Use strerror.
9714 * linux-low.c (linux_attach_lwp): Use strerror.
9715 * utils.c (perror_with_name): Use strerror.
9716 * config.in, configure: Regenerated.
9718 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9720 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9721 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9723 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9725 * Makefile.in (SFILES): Update.
9726 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9727 low-sun3.c: Remove files.
9729 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9731 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9732 (linux_detach_one_process, linux_detach): New functions.
9733 (linux_target_ops): Add linux_detach.
9734 * server.c (main): Handle 'D' packet.
9735 * target.h (struct target_ops): Add "detach" member.
9736 (detach_inferior): Define.
9738 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9740 From Kelley Cook <kelleycook@wideopenwest.com>:
9741 * configure.srv: Accept i[34567]86 variants.
9743 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9745 * linux-low.c (linux_wait_for_event): Correct comment typos.
9746 (linux_resume_one_process): Call check_removed_breakpoint.
9747 (linux_send_signal): New function.
9748 (linux_target_ops): Add linux_send_signal.
9749 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9751 * target.h (struct target_ops): Add send_signal.
9753 2003-05-29 Jim Blandy <jimb@redhat.com>
9755 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9756 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9757 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9758 away part of the register's value.
9760 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9762 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9763 (linux_wait_for_event, linux_init_signals): Likewise.
9765 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9767 * configure.in: Check for stdlib.h.
9768 * configure: Regenerated.
9769 * config.in: Regenerated.
9771 2003-01-04 Andreas Schwab <schwab@suse.de>
9773 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9775 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9777 * Makefile.in: Remove obsolete code.
9779 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9781 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9782 defined(PT_FPR0_HI).
9784 2002-11-17 Stuart Hughes <seh@zee2.com>
9786 * linux-arm-low.c (arm_num_regs): Increase.
9787 (arm_regmap): Include status register.
9789 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9791 * linux-low.c (register_addr): Remove incorrect -1 check.
9793 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9795 * linux-low.c (linux_create_inferior): Call setpgid. Return
9797 (unstopped_p, linux_signal_pid): Remove.
9798 (linux_target_ops): Remove linux_signal_pid.
9799 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9800 global instead of target method.
9801 * target.h (struct target_ops): Remove signal_pid. Update comment
9802 for create_inferior.
9803 * server.c (signal_pid): New variable.
9804 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9805 gdbserver. Set the child to be the foreground process group.
9806 (attach_inferior): Set signal_pid.
9808 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9810 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9812 2002-08-20 Jim Blandy <jimb@redhat.com>
9814 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9817 2002-08-01 Andrew Cagney <cagney@redhat.com>
9819 * Makefile.in: Make chill references obsolete.
9821 2002-07-24 Kevin Buettner <kevinb@redhat.com>
9823 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9824 * configure: Regenerate.
9825 * config.in: Regenerate.
9827 2002-07-09 David O'Brien <obrien@FreeBSD.org>
9829 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9830 (perror_with_name, remote_close, remote_open, expect, play): Static.
9832 2002-07-04 Michal Ludvig <mludvig@suse.cz>
9834 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
9835 byte offsets instead of an array of indexes.
9836 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9838 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
9840 * regcache.c: Add comment.
9842 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
9844 * thread-db.c: New file.
9845 * proc-service.c: New file.
9846 * acinclude.m4: New file.
9847 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9848 proc-service.o, and thread-db.o.
9849 (linux-low.o): Add USE_THREAD_DB.
9850 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9851 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9852 * aclocal.m4: Regenerated.
9853 * config.in: Regenerated.
9854 * configure: Regenerated.
9855 * configure.in: Check for proc_service.h, sys/procfs.h,
9856 thread_db.h, and linux/elf.h headrs.
9857 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9858 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9859 Check for -lthread_db and thread support.
9860 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9861 PowerPC, and SuperH.
9862 * i387-fp.c: Constify arguments.
9863 * i387-fp.h: Likewise.
9864 * inferiors.c: (struct thread_info): Renamed from
9865 `struct inferior_info'. Remove PID member. Use generic inferior
9866 list header. All uses updated.
9867 (inferiors, signal_pid): Removed.
9868 (all_threads): New variable.
9869 (get_thread): Define.
9870 (add_inferior_to_list): New function.
9871 (for_each_inferior): New function.
9872 (change_inferior_id): New function.
9873 (add_inferior): Removed.
9874 (remove_inferior): New function.
9875 (add_thread): New function.
9876 (free_one_thread): New function.
9877 (remove_thread): New function.
9878 (clear_inferiors): Use for_each_inferior and free_one_thread.
9879 (find_inferior): New function.
9880 (find_inferior_id): New function.
9881 (inferior_target_data): Update argument type.
9882 (set_inferior_target_data): Likewise.
9883 (inferior_regcache_data): Likewise.
9884 (set_inferior_regcache_data): Likewise.
9885 * linux-low.c (linux_bp_reinsert): Remove.
9886 (all_processes, stopping_threads, using_thrads)
9887 (struct pending_signals, debug_threads, pid_of): New.
9888 (inferior_pid): Replace with macro.
9889 (struct inferior_linux_data): Remove.
9890 (get_stop_pc, add_process): New functions.
9891 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9892 Use add_process and add_thread.
9893 (linux_attach_lwp): New function, based on old linux_attach. Use
9894 add_process and add_thread. Set stop_expected for new threads.
9895 (linux_attach): New function.
9896 (linux_kill_one_process): New function.
9897 (linux_kill): Kill all LWPs.
9898 (linux_thread_alive): Use find_inferior_id.
9899 (check_removed_breakpoints, status_pending_p): New functions.
9900 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9901 Update. Use WNOHANG. Wait for cloned processes also. Update process
9902 struct for the found process.
9903 (linux_wait_for_event): New function.
9904 (linux_wait): Use it. Support LWPs.
9905 (send_sigstop, wait_for_sigstop, stop_all_processes)
9906 (linux_resume_one_process, linux_continue_one_process): New functions.
9907 (linux_resume): Support LWPs.
9908 (REGISTER_RAW_SIZE): Remove.
9909 (fetch_register): Use register_size instead. Call supply_register.
9910 (usr_store_inferior_registers): Likewise. Call collect_register.
9912 (regsets_fetch_inferior_registers): Improve error message.
9913 (regsets_store_inferior_registers): Add debugging.
9914 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9915 (unstopped_p, linux_signal_pid): New functions.
9916 (linux_target_ops): Add linux_signal_pid.
9917 (linux_init_signals): New function.
9918 (initialize_low): Call it. Initialize using_threads.
9919 * regcache.c (inferior_regcache_data): Add valid
9921 (get_regcache): Fetch registers lazily. Add fetch argument
9922 and update all callers.
9923 (regcache_invalidate_one, regcache_invalidate): New
9925 (new_register_cache): Renamed from create_register_cache.
9926 Return the new regcache.
9927 (free_register_cache): Change argument to a void *.
9928 (registers_to_string, registers_from_string): Call get_regcache
9929 with fetch flag set.
9930 (register_data): Make static. Pass fetch flag to get_regcache.
9931 (supply_register): Call get_regcache with fetch flag clear.
9932 (collect_register): Call get_regcache with fetch flag set.
9933 (collect_register_as_string): New function.
9934 * regcache.h: Update.
9935 * remote-utils.c (putpkt): Flush after debug output and use
9937 Handle input interrupts while waiting for an ACK.
9938 (input_interrupt): Use signal_pid method.
9939 (getpkt): Flush after debug output and use stderr.
9940 (outreg): Use collect_register_as_string.
9941 (new_thread_notify, dead_thread_notify): New functions.
9942 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9944 (look_up_one_symbol): Flush after debug output.
9945 * server.c (step_thread, server_waiting): New variables.
9946 (start_inferior): Don't use signal_pid. Update call to mywait.
9947 (attach_inferior): Update call to mywait.
9948 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9949 (main): Don't fetch/store registers explicitly. Use
9950 set_desired_inferior. Support proposed ``Hs'' packet. Update
9953 (struct inferior_list, struct_inferior_list_entry): New.
9954 * target.c (set_desired_inferior): New.
9955 (write_inferior_memory): Constify.
9956 (mywait): New function.
9958 (struct target_ops): New signal_pid method.
9959 (mywait): Removed macro, added prototype.
9961 * linux-low.h (regset_func): Removed.
9962 (regset_fill_func, regset_store_func): New.
9963 (enum regset_type): New.
9964 (struct regset_info): Add type field. Use new operation types.
9965 (struct linux_target_ops): stop_pc renamed to get_pc.
9966 Add decr_pc_after_break and breakpoint_at.
9967 (get_process, get_thread_proess, get_process_thread)
9968 (strut process_info, all_processes, linux_attach_lwp)
9969 (thread_db_init): New.
9971 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9972 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9973 (the_low_target): Add new members.
9974 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9975 (i386_store_fpxregset): Constify.
9976 (target_regsets): Add new kind identifier.
9977 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9978 (i386_set_pc): Add debugging.
9979 (i386_breakpoint_at): New function.
9980 (the_low_target): Add new members.
9981 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9982 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9983 (mips_breakpoint_at): New.
9984 (the_low_target): Add new members.
9985 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9986 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9987 (the_low_target): Add new members.
9988 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9989 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9990 (the_low_target): Add new members.
9991 * linux-x86-64-low.c (target_regsets): Add new kind
9994 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
9996 From Martin Pool <mbp@samba.org>:
9997 * server.c (gdbserver_usage): New function.
10000 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10002 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10003 stop_at -> stop_pc.
10005 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10007 * Makefile.in: Remove obsolete code.
10009 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10011 * linux-low.c (regsets_fetch_inferior_registers),
10012 (regsets_store_inferior_registers): Removed cast to int from
10014 * regcache.h: Added declaration of struct inferior_info.
10016 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10018 * inferiors.c (struct inferior_info): Add regcache_data.
10019 (add_inferior): Call create_register_cache.
10020 (clear_inferiors): Call free_register_cache.
10021 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10022 * regcache.c (struct inferior_regcache_data): New.
10023 (registers): Remove.
10024 (get_regcache): New function.
10025 (create_register_cache, free_register_cache): New functions.
10026 (set_register_cache): Don't initialize the register cache here.
10027 (registers_to_string, registers_from_string, register_data): Call
10029 * regcache.h: Add prototypes.
10030 * server.h: Likewise.
10032 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10034 * mem-break.c: New file.
10035 * mem-break.h: New file.
10036 * Makefile.in: Add mem-break.o rule; update server.h
10038 * inferiors.c (struct inferior_info): Add target_data
10040 (clear_inferiors): Free target_data member if set.
10041 (inferior_target_data, set_inferior_target_data): New functions.
10042 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10043 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10044 * linux-low.c (linux_bp_reinsert): New variable.
10045 (struct inferior_linux_data): New.
10046 (linux_create_inferior): Use set_inferior_target_data.
10047 (linux_attach): Likewise. Call add_inferior.
10048 (linux_wait_for_one_inferior): New function.
10049 (linux_wait): Call it.
10050 (linux_write_memory): Add const.
10051 (initialize_low): Call set_breakpoint_data.
10052 * linux-low.h (struct linux_target_ops): Add breakpoint
10054 * server.c (attach_inferior): Remove extra add_inferior
10056 * server.h: Include mem-break.h. Update inferior.c
10058 * target.c (read_inferior_memory)
10059 (write_inferior_memory): New functions.
10060 * target.h (read_inferior_memory)
10061 (write_inferior_memory): Change macros to prototypes.
10062 (struct target_ops): Update comments. Add const to write_memory
10065 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10067 * linux-low.c (usr_store_inferior_registers): Support
10068 registers which are allowed to fail to store.
10069 * linux-low.h (linux_target_ops): Likewise.
10070 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10071 (ppc_cannot_store_register): FPSCR may not be storable.
10073 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10075 * server.h: Include <string.h> if HAVE_STRING_H.
10076 * ChangeLog: Correct paths in last ChangeLog entry.
10078 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10080 * linux-low.h: Remove obsolete prototypes.
10081 (struct linux_target_ops): New.
10082 (extern the_low_target): New.
10083 * linux-low.c (num_regs, regmap): Remove declarations.
10084 (register_addr): Use the_low_target explicitly.
10085 (fetch_register): Likewise.
10086 (usr_fetch_inferior_registers): Likewise.
10087 (usr_store_inferior_registers): Likewise.
10088 * linux-arm-low.c (num_regs): Remove.
10089 (arm_num_regs): Define.
10090 (arm_regmap): Renamed from regmap, made static.
10091 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10093 (arm_cannot_store_register): Renamed from cannot_store_register,
10095 (the_low_target): New.
10096 * linux-i386-low.c (num_regs): Remove.
10097 (i386_num_regs): Define.
10098 (i386_regmap): Renamed from regmap, made static.
10099 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10101 (i386_cannot_store_register): Renamed from cannot_store_register,
10103 (the_low_target): New.
10104 * linux-ia64-low.c (num_regs): Remove.
10105 (ia64_num_regs): Define.
10106 (ia64_regmap): Renamed from regmap, made static.
10107 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10109 (ia64_cannot_store_register): Renamed from cannot_store_register,
10111 (the_low_target): New.
10112 * linux-m68k-low.c (num_regs): Remove.
10113 (m68k_num_regs): Define.
10114 (m68k_regmap): Renamed from regmap, made static.
10115 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10117 (m68k_cannot_store_register): Renamed from cannot_store_register,
10119 (the_low_target): New.
10120 * linux-mips-low.c (num_regs): Remove.
10121 (mips_num_regs): Define.
10122 (mips_regmap): Renamed from regmap, made static.
10123 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10125 (mips_cannot_store_register): Renamed from cannot_store_register,
10127 (the_low_target): New.
10128 * linux-ppc-low.c (num_regs): Remove.
10129 (ppc_num_regs): Define.
10130 (ppc_regmap): Renamed from regmap, made static.
10131 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10133 (ppc_cannot_store_register): Renamed from cannot_store_register,
10135 (the_low_target): New.
10136 * linux-s390-low.c (num_regs): Remove.
10137 (s390_num_regs): Define.
10138 (s390_regmap): Renamed from regmap, made static.
10139 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10141 (s390_cannot_store_register): Renamed from cannot_store_register,
10143 (the_low_target): New.
10144 * linux-sh-low.c (num_regs): Remove.
10145 (sh_num_regs): Define.
10146 (sh_regmap): Renamed from regmap, made static.
10147 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10149 (sh_cannot_store_register): Renamed from cannot_store_register,
10151 (the_low_target): New.
10152 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10153 (the_low_target): New.
10155 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10157 * Makefile.in: Add stamp-h target.
10158 * configure.in: Create stamp-h.
10159 * configure: Regenerated.
10161 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10163 * inferiors.c: New file.
10164 * target.c: New file.
10165 * target.h: New file.
10166 * Makefile.in: Add target.o and inferiors.o. Update
10168 * linux-low.c (inferior_pid): New static variable,
10169 moved from server.c.
10170 (linux_create_inferior): Renamed from create_inferior.
10171 Call add_inferior. Return 0 on success instead of a PID.
10172 (linux_attach): Renamed from myattach.
10173 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10174 (linux_thread_alive): Renamed from mythread_alive.
10175 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10177 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10178 (regsets_store_inferior_registers): Correct error message.
10179 Add missing ``return 0''.
10180 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10181 (linux_store_registers): Renamed from store_inferior_registers.
10182 (linux_read_memory): Renamed from read_inferior_memory.
10183 (linux_write_memory): Renamed from write_inferior_memory.
10184 (linux_target_ops): New structure.
10185 (initialize_low): Call set_target_ops ().
10186 * remote-utils.c (unhexify): New function.
10187 (hexify): New function.
10188 (input_interrupt): Send signals to ``signal_pid''.
10189 * server.c (inferior_pid): Remove.
10190 (start_inferior): Update create_inferior call.
10191 (attach_inferior): Call add_inferior.
10192 (handle_query): New function.
10193 (main): Call handle_query for `q' packets.
10194 * server.h: Include "target.h". Remove obsolete prototypes.
10195 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10197 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10199 * Makefile.in: Add WARN_CFLAGS. Update configury
10201 * configure.in: Check for <string.h>
10202 * configure: Regenerate.
10203 * config.in: Regenerate.
10204 * gdbreplay.c: Include needed system headers.
10205 (remote_open): Remove strchr prototype.
10206 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10207 * regcache.c (supply_register): Change buf argument to const void *.
10208 (supply_register_by_name): Likewise.
10209 (collect_register): Change buf argument to void *.
10210 (collect_register_by_name): Likewise.
10211 * regcache.h: Add missing prototypes.
10212 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10213 * server.c (handle_query): New function.
10214 (attached): New static variable, moved out of main.
10215 (main): Quiet longjmp clobber warnings.
10216 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10217 * utils.c (error): Remove NORETURN.