1 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4 without a fill_function.
5 * linux-s390-low.c (s390_fill_last_break): Remove.
6 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7 (s390_arch_setup): Use regset's size instead of fill_function for
10 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
13 the regset's store function when ptrace returned an error.
14 * regcache.c (get_thread_regcache): Invalidate register cache
15 before fetching inferior's registers.
17 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
19 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
20 while-loop as for-loop.
21 (regsets_store_inferior_registers): Likewise.
23 2014-11-28 Yao Qi <yao@codesourcery.com>
25 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
26 * config.in, configure: Re-generate.
27 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
30 2014-11-21 Yao Qi <yao@codesourcery.com>
32 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
33 (AC_CHECK_HEADERS): Remove malloc.h.
34 * configure: Re-generated.
35 * config.in: Re-generated.
36 * server.h: Don't include alloca.h and malloc.h.
37 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
38 Don't include malloc.h.
40 2014-11-17 Joel Brobecker <brobecker@adacore.com>
42 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
43 corresponding ERRNO check in same block.
45 2014-11-12 Pedro Alves <palves@redhat.com>
47 * server.c (cont_thread): Update comment.
48 (start_inferior, attach_inferior): No longer clear cont_thread.
49 (handle_v_cont): No longer set cont_thread.
50 (captured_main): Clear cont_thread each time a GDB connects.
52 2014-11-12 Pedro Alves <palves@redhat.com>
54 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
55 thread, and don't resume all threads if the Hc thread has exited.
57 2014-11-12 Pedro Alves <palves@redhat.com>
59 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
60 the process group instead of to a specific LWP.
62 2014-10-15 Pedro Alves <palves@redhat.com>
65 * win32-arm-low.c (arm_set_thread_context): Remove current_event
67 (arm_set_thread_context): Delete.
68 (the_low_target): Adjust.
69 * win32-i386-low.c (debug_registers_changed)
70 (debug_registers_used): Delete.
71 (update_debug_registers_callback): New function.
72 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
73 needing to update their debug registers.
74 (win32_get_current_dr): New function.
75 (x86_dr_low_get_addr, x86_dr_low_get_control)
76 (x86_dr_low_get_status): Fetch the debug register from the thread
78 (i386_initial_stuff): Adjust.
79 (i386_get_thread_context): Remove current_event parameter. Don't
80 clear debug_registers_changed nor copy DR values to
82 (i386_set_thread_context): Delete.
83 (i386_prepare_to_resume): New function.
84 (i386_thread_added): Mark the thread as needing to update irs
86 (the_low_target): Remove i386_set_thread_context and install
87 i386_prepare_to_resume.
88 * win32-low.c (win32_get_thread_context): Adjust.
89 (win32_set_thread_context): Use SetThreadContext
91 (win32_prepare_to_resume): New function.
92 (win32_require_context): New function, factored out from ...
93 (thread_rec): ... this.
94 (continue_one_thread): Call win32_prepare_to_resume on each thread
95 we're about to continue.
96 (win32_resume): Call win32_prepare_to_resume on the event thread.
97 * win32-low.h (struct win32_thread_info)
98 <debug_registers_changed>: New field.
99 (struct win32_target_ops): Change prototype of set_thread_context,
100 delete set_thread_context and add prepare_to_resume.
101 (win32_require_context): New declaration.
103 2014-10-08 Gary Benson <gbenson@redhat.com>
105 * server.h: Do not include common-exceptions.h.
107 2014-10-08 Gary Benson <gbenson@redhat.com>
109 * server.h: Do not include cleanups.h.
111 2014-09-30 James Hogan <james.hogan@imgtec.com>
113 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
116 2014-09-23 Yao Qi <yao@codesourcery.com>
118 * linux-low.c (lp_status_maybe_breakpoint): New function.
119 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
120 (count_events_callback): Likewise.
121 (select_event_lwp_callback): Likewise.
122 (cancel_breakpoints_callback): Likewise.
124 2014-09-19 Don Breazeal <donb@codesourcery.com>
126 * linux-low.c (handle_extended_wait): Call
127 linux_ptrace_get_extended_event.
128 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
129 linux_is_extended_waitstatus.
131 2014-09-16 Joel Brobecker <brobecker@adacore.com>
133 * Makefile.in (CPPFLAGS): Define.
134 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
135 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
137 2014-09-16 Gary Benson <gbenson@redhat.com>
139 * inferiors.h (current_inferior): Renamed as...
140 (current_thread): New variable. All uses updated.
141 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
142 (maybe_move_out_of_jump_pad): Likewise.
143 (cancel_breakpoint): Likewise.
144 (linux_low_filter_event): Likewise.
145 (wait_for_sigstop): Likewise.
146 (linux_resume_one_lwp): Likewise.
147 (need_step_over_p): Likewise.
148 (start_step_over): Likewise.
149 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
150 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
151 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
152 and save_inferior as saved_thread.
153 * regcache.c (get_thread_regcache): Renamed saved_inferior as
155 (regcache_invalidate_thread): Likewise.
156 * remote-utils.c (prepare_resume_reply): Likewise.
157 * thread-db.c (thread_db_get_tls_address): Likewise.
158 (disable_thread_event_reporting): Likewise.
159 (remove_thread_event_breakpoints): Likewise.
160 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
162 * target.h (set_desired_inferior): Renamed as...
163 (set_desired_thread): New declaration. All uses updated.
164 * server.c (myresume): Updated comment to reference thread instead
166 (handle_serial_event): Likewise.
167 (handle_target_event): Likewise.
169 2014-09-12 Tom Tromey <tromey@redhat.com>
170 Gary Benson <gbenson@redhat.com>
172 * regcache.h: Include common-regcache.h.
173 (regcache_read_pc): Don't declare.
174 * regcache.c (get_thread_regcache_for_ptid): New function.
176 2014-09-11 Tom Tromey <tromey@redhat.com>
177 Gary Benson <gbenson@redhat.com>
179 * symbol.c: New file.
180 * Makefile.in (SFILES): Add symbol.c.
183 2014-09-11 Gary Benson <gbenson@redhat.com>
185 * target.c (target_stop_ptid, target_continue_ptid): New
188 2014-09-11 Tom Tromey <tromey@redhat.com>
189 Gary Benson <gbenson@redhat.com>
191 * target.h: Include target/target.h.
192 * target.c (target_read_memory, target_read_uint32)
193 (target_write_memory): New functions.
195 2014-09-11 Gary Benson <gbenson@redhat.com>
197 * server.h (debug_hw_points): Don't declare.
198 * server.c (debug_hw_points): Don't define. Replace all uses
199 with show_debug_regs.
200 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
201 all uses with show_debug_regs.
203 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
205 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
206 endianness into account.
207 (ppc_supply_ptrace_register): Likewise.
209 2014-09-03 James Hogan <james.hogan@imgtec.com>
211 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
212 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
214 2014-09-03 Gary Benson <gbenson@redhat.com>
216 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
217 ALL_DEBUG_ADDRESS_REGISTERS.
219 2014-09-02 Gary Benson <gbenson@redhat.com>
221 * i386-low.h: Renamed as...
222 * x86-low.h: New file. All type, function and variable name
223 prefixes changed from "i386_" to "x86_". All references updated.
224 * i386-low.c: Renamed as...
225 * x86-low.c: New file. All type, function and variable name
226 prefixes changed from "i386_" to "x86_". All references updated.
228 2014-09-02 Gary Benson <gbenson@redhat.com>
230 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
231 (x86_linux_new_thread): Likewise.
233 2014-08-29 Gary Benson <gbenson@redhat.com>
235 * server.h (setjmp.h): Do not include.
236 (toplevel): Do not declare.
237 (common-exceptions.h): Include.
238 (cleanups.h): Likewise.
239 * server.c (toplevel): Do not define.
240 (exit_code): New static global.
241 (detach_or_kill_for_exit_cleanup): New function.
242 (main): New function. Original main renamed to...
243 (captured_main): New function.
244 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
246 2014-08-29 Gary Benson <gbenson@redhat.com>
248 * Makefile.in (SFILES): Add common/common-exceptions.c.
249 (OBS): Add common-exceptions.o.
250 (common-exceptions.o): New rule.
251 * utils.c (prepare_to_throw_exception): New function.
253 2014-08-29 Gary Benson <gbenson@redhat.com>
255 * config.in: Regenerate.
256 * configure: Likewise.
258 2014-08-29 Gary Benson <gbenson@redhat.com>
260 * Makefile.in (SFILES): Add common/cleanups.c.
262 (cleanups.o): New rule.
264 2014-08-29 Gary Benson <gbenson@redhat.com>
266 * utils.c (internal_vwarning): New function.
268 2014-08-28 Gary Benson <gbenson@redhat.com>
270 * utils.h (fatal): Remove declaration.
271 * utils.c (fatal): Remove function.
273 2014-08-28 Gary Benson <gbenson@redhat.com>
275 * tracepoint.c (gdb_agent_init): Replace fatal with
277 (initialize_tracepoint): Likewise.
279 2014-08-28 Gary Benson <gbenson@redhat.com>
281 * remote-utils.c (remote_prepare): Replace fatal with error.
283 2014-08-28 Gary Benson <gbenson@redhat.com>
285 * linux-low.c (linux_async): Replace fatal with warning.
287 (linux_start_non_stop): Return -1 if linux_async failed.
289 2014-08-28 Gary Benson <gbenson@redhat.com>
291 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
293 (i386_dr_low_get_addr): Remove vague comment.
294 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
297 2014-08-28 Gary Benson <gbenson@redhat.com>
299 * inferiors.c (get_thread_process): Replace check with gdb_assert.
300 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
302 (linux_resume_one_lwp): Likewise.
303 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
305 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
307 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
308 (init_register_cache): Replace fatal with gdb_assert_not_reached.
309 (find_register_by_name): Replace fatal with internal_error.
310 (find_regno): Likewise.
311 * tdesc.c (init_target_desc): Replace check with gdb_assert.
312 * thread-db.c (thread_db_create_event): Likewise.
313 (thread_db_load_search): Likewise.
314 (try_thread_db_load_1): Likewise.
315 * tracepoint.c (get_jump_space_head): Replace fatal with
317 (claim_trampoline_space): Likewise.
318 (have_fast_tracepoint_trampoline_buffer): Likewise.
319 (cmd_qtstart): Likewise.
320 (stop_tracing): Likewise.
321 (fast_tracepoint_collecting): Likewise.
322 (target_malloc): Likewise.
323 (download_tracepoint): Likewise.
324 (download_trace_state_variables): Replace check with gdb_assert.
325 (upload_fast_traceframes): Replace fatal with internal_error.
327 2014-08-19 Tom Tromey <tromey@redhat.com>
328 Gary Benson <gbenson@redhat.com>
330 * Makefile.in (SFILES): Add common/common-debug.c.
331 (OBS): Add common-debug.o.
332 (common-debug.o): New rule.
333 * debug.h (debug_printf): Don't declare.
334 * debug.c (debug_printf): Renamed and rewritten as...
335 (debug_vprintf): New function.
337 2014-08-19 Gary Benson <gbenson@redhat.com>
339 * utils.h: Do not include print-utils.h.
341 2014-08-19 Tom Tromey <tromey@redhat.com>
342 Gary Benson <gbenson@redhat.com>
344 * server.h: Add static assertion.
345 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
347 2014-08-19 Tom Tromey <tromey@redhat.com>
348 Gary Benson <gbenson@redhat.com>
350 * Makefile.in (SFILES): Add common/errors.c.
352 (IPA_OBS): Add errors-ipa.o.
353 (errors.o): New rule.
354 (errors-ipa.o): Likewise.
355 * utils.h (perror_with_name, error, warning): Don't declare.
356 * utils.c (warning): Renamed and rewritten as...
357 (vwarning): New function.
358 (error): Renamed and rewritten as...
359 (verror): New function.
360 (internal_error): Renamed and rewritten as...
361 (internal_verror): New function.
363 2014-08-07 Gary Benson <gbenson@redhat.com>
365 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
366 * configure: Regenerate.
367 * config.in: Likewise.
368 * server.h: Do not include errno.h.
369 * event-loop.c: Likewise.
370 * hostio-errno.c: Likewise.
371 * linux-low.c: Likewise.
372 * remote-utils.c: Likewise.
373 * spu-low.c: Likewise.
375 * gdbreplay.c: Unconditionally include errno.h.
377 2014-08-07 Gary Benson <gbenson@redhat.com>
379 * server.h: Do not include string.h.
380 * event-loop.c: Likewise.
381 * linux-low.c: Likewise.
382 * regcache.c: Likewise.
383 * remote-utils.c: Likewise.
384 * spu-low.c: Likewise.
387 2014-08-07 Gary Benson <gbenson@redhat.com>
389 * server.h: Do not include gdb_assert.h.
391 2014-08-07 Gary Benson <gbenson@redhat.com>
393 * server.h: Do not include common-utils.h.
395 2014-08-07 Gary Benson <gbenson@redhat.com>
397 * server.h: Do not include ptid.h.
400 2014-08-07 Gary Benson <gbenson@redhat.com>
402 * server.h: Do not include gdb_locale.h.
404 2014-08-07 Gary Benson <gbenson@redhat.com>
406 * server.h: Do not include gdb/signals.h.
407 * win32-low.c: Likewise.
409 2014-08-07 Gary Benson <gbenson@redhat.com>
411 * server.h: Do not include pathmax.h.
413 2014-08-07 Gary Benson <gbenson@redhat.com>
415 * server.h: Do not include libiberty.h.
416 * linux-bfin-low.c: Likewise.
418 2014-08-07 Gary Benson <gbenson@redhat.com>
420 * server.h: Do not include ansidecl.h.
422 2014-08-07 Gary Benson <gbenson@redhat.com>
424 * linux-x86-low.c: Do not include stddef.h.
425 * lynx-ppc-low.c: Likewise.
426 * tracepoint.c: Likewise.
428 2014-08-07 Gary Benson <gbenson@redhat.com>
430 * server.h: Do not include stdarg.h.
431 * nto-low.c: Likewise.
433 2014-08-07 Gary Benson <gbenson@redhat.com>
435 * server.h: Do not include stdlib.h.
436 * inferiors.c: Likewise.
437 * linux-low.c: Likewise.
438 * regcache.c: Likewise.
439 * spu-low.c: Likewise.
440 * tracepoint.c: Likewise.
443 2014-08-07 Gary Benson <gbenson@redhat.com>
445 * server.h: Do not include stdio.h.
446 * linux-low.c: Likewise.
447 * remote-utils.c: Likewise.
448 * spu-low.c: Likewise.
450 * wincecompat.c: Likewise.
452 2014-08-06 Gary Benson <gbenson@redhat.com>
454 * regcache.c (init_register_cache): Move conditionals inside if.
456 2014-08-06 Gary Benson <gbenson@redhat.com>
458 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
460 2014-07-31 Gary Benson <gbenson@redhat.com>
462 * ax.h: Do not include server.h.
463 * gdbthread.h: Likewise.
464 * lynx-low.h: Likewise.
467 2014-07-30 Gary Benson <gbenson@redhat.com>
469 * server.h: Include common-defs.h.
470 Do not include config.h or build-gnulib-gdbserver/config.h.
472 2014-07-30 Gary Benson <gbenson@redhat.com>
474 * hostio-errno.c: Move server.h to top of includes list.
475 * inferiors.c: Likewise.
476 * linux-x86-low.c: Likewise.
477 * notif.c: Include server.h.
479 2014-07-24 Tom Tromey <tromey@redhat.com>
480 Gary Benson <gbenson@redhat.com>
482 * server.h (CORE_ADDR): Now unsigned.
484 2014-07-16 Pedro Alves <palves@redhat.com>
486 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
488 2014-07-15 Pedro Alves <palves@redhat.com>
490 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
493 2014-07-11 Pedro Alves <palves@redhat.com>
495 * linux-low.c (kill_wait_lwp): New function, based on
496 kill_one_lwp_callback, but use my_waitpid directly.
497 (kill_one_lwp_callback, linux_kill): Use it.
499 2014-06-23 Pedro Alves <palves@redhat.com>
501 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
502 before setting DR0..DR3.
504 2014-06-20 Gary Benson <gbenson@redhat.com>
506 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
507 * configure: Regenerated.
508 * config.in: Likewise.
510 2014-06-20 Gary Benson <gbenson@redhat.com>
512 * Makefile.in (SFILES): Update locations for files moved
514 (object file files): Reordered.
516 2014-06-20 Gary Benson <gbenson@redhat.com>
518 * i386-low.h (i386_dr_low_can_set_addr): Removed.
519 (i386_dr_low_set_addr): Likewise.
520 (i386_dr_low_get_addr): Likewise.
521 (i386_dr_low_can_set_control): Likewise.
522 (i386_dr_low_set_control): Likewise.
523 (i386_dr_low_get_control): Likewise.
524 (i386_dr_low_get_status): Likewise.
525 (i386_get_debug_register_length): Likewise.
526 * linux-x86-low.c (i386_dr_low_set_addr):
527 Changed signature. Made static.
528 (i386_dr_low_get_addr): Likewise.
529 (i386_dr_low_set_control): Likewise.
530 (i386_dr_low_get_control): Likewise.
531 (i386_dr_low_get_status): Likewise.
532 (i386_dr_low): New global variable.
533 * win32-i386-low.c (i386_dr_low_set_addr):
534 Changed signature. Made static.
535 (i386_dr_low_get_addr): Likewise.
536 (i386_dr_low_set_control): Likewise.
537 (i386_dr_low_get_control): Likewise.
538 (i386_dr_low_get_status): Likewise.
539 (i386_dr_low): New global variable.
541 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
543 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
544 * Makefile.in (AR, AR_FLAGS): Define.
545 * configure: Regenerate.
547 2014-06-19 Gary Benson <gbenson@redhat.com>
549 * Makefile.in (i386-dregs.o): New rule.
550 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
551 * i386-low.c (target.h): Remove include.
552 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
553 (DR_CONTROL_SHIFT): Likewise.
554 (DR_CONTROL_SIZE): Likewise.
555 (DR_RW_EXECUTE): Likewise.
556 (DR_RW_WRITE): Likewise.
557 (DR_RW_READ): Likewise.
558 (DR_RW_IORW): Likewise.
559 (DR_LEN_1): Likewise.
560 (DR_LEN_2): Likewise.
561 (DR_LEN_4): Likewise.
562 (DR_LEN_8): Likewise.
563 (DR_LOCAL_ENABLE_SHIFT): Likewise.
564 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
565 (DR_ENABLE_SIZE): Likewise.
566 (DR_LOCAL_SLOWDOWN): Likewise.
567 (DR_GLOBAL_SLOWDOWN): Likewise.
568 (DR_CONTROL_RESERVED): Likewise.
569 (I386_DR_CONTROL_MASK): Likewise.
570 (I386_DR_VACANT): Likewise.
571 (I386_DR_LOCAL_ENABLE): Likewise.
572 (I386_DR_GLOBAL_ENABLE): Likewise.
573 (I386_DR_DISABLE): Likewise.
574 (I386_DR_SET_RW_LEN): Likewise.
575 (I386_DR_GET_RW_LEN): Likewise.
576 (I386_DR_WATCH_HIT): Likewise.
577 (i386_wp_op_t): Likewise.
578 (i386_show_dr): Likewise.
579 (i386_length_and_rw_bits): Likewise.
580 (i386_insert_aligned_watchpoint): Likewise.
581 (i386_remove_aligned_watchpoint): Likewise.
582 (i386_handle_nonaligned_watchpoint): Likewise.
583 i386_update_inferior_debug_regs(): Likewise.
584 (i386_dr_insert_watchpoint): Likewise.
585 (i386_dr_remove_watchpoint): Likewise.
586 (i386_dr_region_ok_for_watchpoint): Likewise.
587 (i386_dr_stopped_data_address): Likewise.
588 (i386_dr_stopped_by_watchpoint): Likewise.
590 2014-06-19 Gary Benson <gbenson@redhat.com>
592 * i386-low.c (i386_dr_show): Renamed to
593 i386_show_dr and made static. All uses updated.
594 (i386_dr_length_and_rw_bits): Renamed to
595 i386_length_and_rw_bits and made static.
597 (i386_dr_insert_aligned_watchpoint): Renamed to
598 i386_insert_aligned_watchpoint and made static.
600 (i386_dr_remove_aligned_watchpoint): Renamed to
601 i386_remove_aligned_watchpoint and made static.
603 (i386_dr_update_inferior_debug_regs): Renamed to
604 i386_update_inferior_debug_regs and made static.
607 2014-06-18 Gary Benson <gbenson@redhat.com>
609 * i386-low.h (i386_dr_low_can_set_addr): New macro.
610 (i386_dr_low_can_set_control): Likewise.
611 (i386_get_debug_register_length): Likewise.
612 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
613 (i386_dr_low_can_set_control): Likewise.
614 (i386_get_debug_register_length): Likewise.
616 2014-06-17 Gary Benson <gbenson@redhat.com>
618 * i386-low.h (i386-dregs.h): New include.
619 (DR_FIRSTADDR): Now in i386-dregs.h.
620 (DR_LASTADDR): Likewise.
621 (DR_NADDR): Likewise.
622 (DR_STATUS): Likewise.
623 (DR_CONTROL): Likewise.
624 (i386_debug_reg_state): Likewise.
625 (i386_dr_insert_watchpoint): Likewise.
626 (i386_dr_remove_watchpoint): Likewise.
627 (i386_dr_region_ok_for_watchpoint): Likewise.
628 (i386_dr_stopped_data_address): Likewise.
629 (i386_dr_stopped_by_watchpoint): Likewise.
630 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
632 2014-06-18 Gary Benson <gbenson@redhat.com>
634 * i386-low.h (i386_low_insert_watchpoint): Renamed to
635 i386_dr_insert_watchpoint.
636 (i386_low_remove_watchpoint): Renamed to
637 i386_dr_remove_watchpoint.
638 (i386_low_region_ok_for_watchpoint): Renamed to
639 i386_dr_region_ok_for_watchpoint.
640 (i386_low_stopped_data_address): Renamed to
641 i386_dr_stopped_data_address.
642 (i386_low_stopped_by_watchpoint): Renamed to
643 i386_dr_stopped_by_watchpoint.
644 * i386-low.c (i386_show_dr): Renamed to
645 i386_dr_show and made nonstatic. All uses updated.
646 (i386_length_and_rw_bits): Renamed to
647 i386_dr_length_and_rw_bits and made nonstatic.
649 (i386_insert_aligned_watchpoint): Renamed to
650 i386_dr_insert_aligned_watchpoint and made nonstatic.
652 (i386_remove_aligned_watchpoint): Renamed to
653 i386_dr_remove_aligned_watchpoint and made nonstatic.
655 (i386_update_inferior_debug_regs): Renamed to
656 i386_dr_update_inferior_debug_regs and made nonstatic.
658 (i386_low_insert_watchpoint): Renamed to
659 i386_dr_insert_watchpoint. All uses updated.
660 (i386_low_remove_watchpoint): Renamed to
661 i386_dr_remove_watchpoint. All uses updated.
662 (i386_low_region_ok_for_watchpoint): Renamed to
663 i386_dr_region_ok_for_watchpoint. All uses updated.
664 (i386_low_stopped_data_address): Renamed to
665 i386_dr_stopped_data_address. All uses updated.
666 (i386_low_stopped_by_watchpoint): Renamed to
667 i386_dr_stopped_by_watchpoint. All uses updated.
669 2014-06-18 Gary Benson <gbenson@redhat.com>
671 * i386-low.c (i386_dr_low_can_set_addr): New macro.
672 (i386_dr_low_can_set_control): Likewise.
673 (i386_insert_aligned_watchpoint): New check.
675 2014-06-18 Gary Benson <gbenson@redhat.com>
677 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
680 2014-06-18 Gary Benson <gbenson@redhat.com>
682 * i386-low.c (i386_length_and_rw_bits): Use internal_error
683 instead of fatal and error.
684 (i386_handle_nonaligned_watchpoint): Likewise.
686 2014-06-18 Gary Benson <gbenson@redhat.com>
688 * i386-low.c (i386_get_debug_register_length): New macro.
689 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
690 (i386_show_dr): Use debug_printf instead of fprintf. Use
691 phex to format values.
693 2014-06-18 Gary Benson <gbenson@redhat.com>
695 * i386-low.h: Comment changes.
696 * i386-low.c: Likewise.
698 2014-06-18 Gary Benson <gbenson@redhat.com>
700 * i386-low.c: Whitespace changes.
702 2014-06-12 Tom Tromey <tromey@redhat.com>
704 * utils.c (freeargv): Remove.
706 2014-06-12 Tom Tromey <tromey@redhat.com>
708 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
709 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
710 (parse_debug_format_options): Likewise.
711 (gdbserver_usage): Likewise.
712 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
713 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
714 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
716 ($(LIBGNU)): Depend on libiberty.
717 (all-lib): Recurse into all subdirs.
718 (install-only): Invoke "install" target in subdirs.
719 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
721 * configure: Rebuild.
722 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
723 for vasprintf, vsnprintf, or gettimeofday.
724 * configure.srv: Don't add safe-ctype.o or lbasename.o to
727 2014-06-05 Joel Brobecker <brobecker@adacore.com>
729 * development.sh: Delete.
730 * Makefile.in (config.status): Adjust dependency on development.sh.
731 * configure.ac: Adjust development.sh source call.
732 * configure: Regenerate.
734 2014-06-02 Pedro Alves <palves@redhat.com>
736 * ax.c (gdb_free_agent_expr): New function.
737 * ax.h (gdb_free_agent_expr): New declaration.
738 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
740 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
742 (clear_breakpoint_conditions_and_commands): New function.
743 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
744 (clear_breakpoint_conditions_and_commands): New declaration.
746 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
748 * linux-aarch64-low.c (asm/ptrace.h): Include.
750 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
752 Fix TLS access for -static -pthread.
753 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
754 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
755 (thread_db_load_search, try_thread_db_load_1): Initialize it.
757 2014-05-20 Pedro Alves <palves@redhat.com>
759 * linux-aarch64-low.c (aarch64_insert_point)
760 (aarch64_remove_point): No longer check whether the type is
761 supported here. Adjust to new interface.
762 (the_low_target): Install aarch64_supports_z_point_type as
763 supports_z_point_type method.
764 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
765 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
766 instead of a Z packet char. Adjust.
767 (arm_supports_z_point_type): New function.
768 (arm_insert_point, arm_remove_point): Adjust to new interface.
769 (the_low_target): Install arm_supports_z_point_type.
770 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
771 (cris_insert_point, cris_remove_point): Adjust to new interface.
772 Don't check whether the type is supported here.
773 (the_low_target): Install cris_supports_z_point_type.
774 * linux-low.c (linux_supports_z_point_type): New function.
775 (linux_insert_point, linux_remove_point): Adjust to new interface.
776 * linux-low.h (struct linux_target_ops) <insert_point,
777 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
778 raw_breakpoint pointer parameter.
779 <supports_z_point_type>: New method.
780 * linux-mips-low.c (mips_supports_z_point_type): New function.
781 (mips_insert_point, mips_remove_point): Adjust to new interface.
782 Use mips_supports_z_point_type.
783 (the_low_target): Install mips_supports_z_point_type.
784 * linux-ppc-low.c (the_low_target): Install NULL as
785 supports_z_point_type method.
786 * linux-s390-low.c (the_low_target): Install NULL as
787 supports_z_point_type method.
788 * linux-sparc-low.c (the_low_target): Install NULL as
789 supports_z_point_type method.
790 * linux-x86-low.c (x86_supports_z_point_type): New function.
791 (x86_insert_point): Adjust to new insert_point interface. Use
792 insert_memory_breakpoint. Adjust to new
793 i386_low_insert_watchpoint interface.
794 (x86_remove_point): Adjust to remove_point interface. Use
795 remove_memory_breakpoint. Adjust to new
796 i386_low_remove_watchpoint interface.
797 (the_low_target): Install x86_supports_z_point_type.
798 * lynx-low.c (lynx_target_ops): Install NULL as
799 supports_z_point_type callback.
800 * nto-low.c (nto_supports_z_point_type): New.
801 (nto_insert_point, nto_remove_point): Adjust to new interface.
802 (nto_target_ops): Install nto_supports_z_point_type.
803 * mem-break.c: Adjust intro comment.
804 (struct raw_breakpoint) <raw_type, size>: New fields.
805 <inserted>: Update comment.
806 <shlib_disabled>: Delete field.
807 (enum bkpt_type) <gdb_breakpoint>: Delete value.
808 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
809 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
810 (raw_bkpt_type_to_target_hw_bp_type): New function.
811 (find_enabled_raw_code_breakpoint_at): New function.
812 (find_raw_breakpoint_at): New type and size parameters. Use them.
813 (insert_memory_breakpoint): New function, based off
814 set_raw_breakpoint_at.
815 (remove_memory_breakpoint): New function.
816 (set_raw_breakpoint_at): Reimplement.
817 (set_breakpoint): New, based on set_breakpoint_at.
818 (set_breakpoint_at): Reimplement.
819 (delete_raw_breakpoint): Go through the_target->remove_point
820 instead of assuming memory breakpoints.
821 (find_gdb_breakpoint_at): Delete.
822 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
823 (find_gdb_breakpoint): New function.
824 (set_gdb_breakpoint_at): Delete.
825 (z_type_supported): New function.
826 (set_gdb_breakpoint_1): New function, loosely based off
827 set_gdb_breakpoint_at.
828 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
829 (delete_gdb_breakpoint_at): Delete.
830 (delete_gdb_breakpoint_1): New function, loosely based off
831 delete_gdb_breakpoint_at.
832 (delete_gdb_breakpoint): New function.
833 (clear_gdb_breakpoint_conditions): Rename to ...
834 (clear_breakpoint_conditions): ... this. Don't handle a NULL
836 (add_condition_to_breakpoint): Make static.
837 (add_breakpoint_condition): Take a struct breakpoint pointer
838 instead of an address. Adjust.
839 (gdb_condition_true_at_breakpoint): Rename to ...
840 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
842 (gdb_condition_true_at_breakpoint): Reimplement.
843 (add_breakpoint_commands): Take a struct breakpoint pointer
844 instead of an address. Adjust.
845 (gdb_no_commands_at_breakpoint): Rename to ...
846 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
847 parameter. Return true if no breakpoint was found. Change debug
849 (gdb_no_commands_at_breakpoint): Reimplement.
850 (run_breakpoint_commands): Rename to ...
851 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
852 and change return type to boolean.
853 (run_breakpoint_commands): New function.
854 (gdb_breakpoint_here): Also check for Z1 breakpoints.
855 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
856 breakpoint. Go through the_target->remove_point instead of
857 assuming memory breakpoint.
858 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
859 software and hardware breakpoints.
860 (reinsert_raw_breakpoint): Go through the_target->insert_point
861 instead of assuming memory breakpoint.
862 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
863 software and hardware breakpoints.
864 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
865 Check both software and hardware breakpoints.
866 (validate_inserted_breakpoint): Assert the breakpoint is a
867 software breakpoint. Set the inserted flag to -1 instead of
868 setting shlib_disabled.
869 (delete_disabled_breakpoints): Adjust.
870 (validate_breakpoints): Only validate software breakpoints.
871 Adjust to inserted flag change.
872 (check_mem_read, check_mem_write): Skip breakpoint types other
873 than software breakpoints. Adjust to inserted flag change.
874 * mem-break.h (enum raw_bkpt_type): New enum.
875 (raw_breakpoint, struct process_info): Forward declare.
876 (Z_packet_to_target_hw_bp_type): Delete declaration.
877 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
878 (set_gdb_breakpoint, delete_gdb_breakpoint)
879 (clear_breakpoint_conditions): New declarations.
880 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
881 (breakpoint_inserted_here): Update comment.
882 (add_breakpoint_condition, add_breakpoint_commands): Replace
883 address parameter with a breakpoint pointer parameter.
884 (gdb_breakpoint_here): Update comment.
885 (delete_gdb_breakpoint_at): Delete.
886 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
887 * server.c (process_point_options): Take a struct breakpoint
888 pointer instead of an address. Adjust.
889 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
890 delete_gdb_breakpoint.
891 * spu-low.c (spu_target_ops): Install NULL as
892 supports_z_point_type method.
893 * target.h: Include mem-break.h.
894 (struct target_ops) <prepare_to_access_memory>: Update comment.
895 <supports_z_point_type>: New field.
896 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
897 instead of a char. Also take a raw breakpoint pointer.
898 * win32-arm-low.c (the_low_target): Install NULL as
899 supports_z_point_type.
900 * win32-i386-low.c (i386_supports_z_point_type): New function.
901 (i386_insert_point, i386_remove_point): Adjust to new interface.
902 (the_low_target): Install i386_supports_z_point_type.
903 * win32-low.c (win32_supports_z_point_type): New function.
904 (win32_insert_point, win32_remove_point): Adjust to new interface.
905 (win32_target_ops): Install win32_supports_z_point_type.
906 * win32-low.h (struct win32_target_ops):
907 <supports_z_point_type>: New method.
908 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
909 instead of a char. Also take a raw breakpoint pointer.
911 2014-05-20 Pedro Alves <palves@redhat.com>
913 * mem-break.h: Include break-common.h.
914 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
915 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
916 (Z_packet_to_target_hw_bp_type): New declaration.
917 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
918 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
919 (Z_PACKET_ACCESS_WP): Delete macros.
920 (Z_packet_to_hw_type): Delete function.
921 * i386-low.h: Don't include break-common.h here.
922 (Z_packet_to_hw_type): Delete declaration.
923 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
924 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
925 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
926 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
927 * linux-aarch64-low.c: Don't include break-common.h here.
928 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
929 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
930 (Z_packet_to_target_hw_bp_type): Delete function.
931 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
933 (mips_insert_point, mips_remove_point): Use
934 Z_packet_to_target_hw_bp_type.
936 2014-05-20 Pedro Alves <palves@redhat.com>
938 * linux-aarch64-low.c: Include break-common.h.
939 (enum target_point_type): Delete.
940 (Z_packet_to_point_type): Rename to ...
941 (Z_packet_to_target_hw_bp_type): ... this, and return a
942 target_hw_bp_type instead.
943 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
944 instead of an enum target_point_type.
945 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
947 (aarch64_dr_state_insert_one_point)
948 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
949 (aarch64_handle_aligned_watchpoint)
950 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
951 Take an enum target_hw_bp_type instead of an enum
953 (aarch64_supports_z_point_type): New function.
954 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
955 use Z_packet_to_target_hw_bp_type.
957 2014-05-20 Joel Brobecker <brobecker@adacore.com>
959 * configure.ac: Only use -Werror by default when DEVELOPMENT
961 * configure: Regenerate.
963 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
965 Fix gdbserver qGetTLSAddr for x86_64 -m32.
966 * linux-x86-low.c (X86_64_USER_REGS): New.
967 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
969 2014-04-28 Yao Qi <yao@codesourcery.com>
971 * Makefile.in (i386-avx512.c): Fix the typo of generated file
974 2014-04-25 Pedro Alves <palves@redhat.com>
977 * linux-low.c (linux_attach_fail_reason_string): New function.
978 (linux_attach_lwp): Delete.
979 (linux_attach_lwp_1): Rename to ...
980 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
981 argument. Remove "initial" parameter. Return int instead of
982 void. Don't error or warn here.
983 (linux_attach): Adjust to call linux_attach_lwp. Call error on
984 failure to attach to the tgid. Call warning when failing to
986 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
987 argument. Remove "initial" parameter. Return int instead of
988 void. Don't error or warn here.
989 (linux_attach_fail_reason_string): New declaration.
990 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
991 interface change. Use linux_attach_fail_reason_string.
993 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
994 Walfred Tedeschi <walfred.tedeschi@intel.com>
996 * Makefile.in: Added rules to handle new files
997 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
998 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
999 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1000 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1001 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1002 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1004 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1005 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1006 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1007 i386/x32-avx512.xml.
1008 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1009 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1010 i386/x32-avx512-linux.xml.
1011 * i387-fp.c (num_avx512_k_registers): New constant for number
1013 (num_avx512_zmmh_low_registers): New constant for number of
1014 lower ZMM registers (0-15).
1015 (num_avx512_zmmh_high_registers): New constant for number of
1016 higher ZMM registers (16-31).
1017 (num_avx512_ymmh_registers): New contant for number of higher
1018 YMM registers (ymm16-31 added by avx521 on x86_64).
1019 (num_avx512_xmm_registers): New constant for number of higher
1020 XMM registers (xmm16-31 added by AVX512 on x86_64).
1021 (struct i387_xsave): Add space for AVX512 registers.
1022 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1023 Add code to handle AVX512 registers.
1024 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1025 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1026 prototypei from generated file.
1027 (tdesc_amd64_avx512_linux): Likewise.
1028 (init_registers_x32_avx512_linux): Likewise.
1029 (tdesc_x32_avx512_linux): Likewise.
1030 (init_registers_i386_avx512_linux): Likewise.
1031 (tdesc_i386_avx512_linux): Likewise.
1032 (x86_64_regmap): Add AVX512 registers.
1033 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1035 (initialize_low_arch): Add code to initialize AVX512 registers.
1037 2014-04-23 Pedro Alves <palves@redhat.com>
1039 * mem-break.c (find_gdb_breakpoint_at): Make static.
1040 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1042 2014-04-23 Pedro Alves <palves@redhat.com>
1044 * i386-low.c: Don't include break-common.h here.
1045 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1046 prototype to take target_hw_bp_type as argument instead of a Z
1048 * i386-low.h: Include break-common.h here.
1049 (Z_packet_to_hw_type): Declare.
1050 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1052 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1053 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1054 (x86_remove_point): Convert the packet number to a
1055 target_hw_bp_type before calling i386_low_remove_watchpoint.
1056 * win32-i386-low.c (i386_insert_point): Convert the packet number
1057 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1058 (i386_remove_point): Convert the packet number to a
1059 target_hw_bp_type before calling i386_low_remove_watchpoint.
1061 2014-04-23 Pedro Alves <palves@redhat.com>
1063 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1065 2014-04-10 Pedro Alves <palves@redhat.com>
1067 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1068 Check if the condition or command is NULL before checking if the
1069 breakpoint is known. On success, return true.
1070 * mem-break.h (add_breakpoint_condition): Document return.
1071 (add_breakpoint_commands): Add describing comment.
1072 * server.c (skip_to_semicolon): New function.
1073 (process_point_options): Use it.
1075 2014-04-09 Pedro Alves <palves@redhat.com>
1077 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1080 2014-02-27 Pedro Alves <palves@redhat.com>
1083 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1085 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1087 (last_thread_of_process_p): Take a PID argument instead of a
1089 (linux_wait_for_lwp): Delete.
1090 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1092 (linux_low_filter_event): New function, party factored out from
1093 linux_wait_for_event.
1094 (linux_wait_for_event): Rename to ...
1095 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1096 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1097 sigsuspend. Check for zombie leaders.
1098 (linux_wait_for_event): Reimplement as wrapper around
1099 linux_wait_for_event_filtered.
1100 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1101 a normal or signal exit is seen, it's the whole process exiting.
1102 (wait_for_sigstop): No longer a for_each_inferior callback.
1103 Rewrite on top of linux_wait_for_event_filtered.
1104 (stop_all_lwps): Call wait_for_sigstop directly.
1105 * server.c (resume, handle_target_event): Handle
1106 TARGET_WAITKIND_NO_RESUMED.
1108 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1110 * win32-low.c (psapi_get_dll_name,
1111 * win32_CreateToolhelp32Snapshot): Delete.
1112 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1113 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1115 (handle_load_dll): Add function description.
1116 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1118 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1120 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1122 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1123 base address when calling win32_add_one_solib.
1124 (handle_load_dll): Delete local variable load_addr.
1125 Remove 0x1000 offset applied to DLL base address when calling
1126 win32_add_one_solib.
1127 (handle_unload_dll): Add comment.
1129 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1131 * win32-low.c (win32_add_all_dlls): Renames
1132 win32_ensure_ntdll_loaded. Rewrite function documentation.
1133 Adjust implementation to always load all DLLs.
1134 Add 0x1000 offset to DLL base address when calling
1135 win32_add_one_solib.
1136 (child_initialization_done): New static global.
1137 (do_initial_child_stuff): Set child_initialization_done to
1138 zero during child initialization, and 1 after. Replace call
1139 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1141 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1142 (handle_unload_dll): Add function documentation.
1143 (get_child_debug_event): Ignore load and unload DLL events
1144 during child initialization.
1146 2014-02-20 Doug Evans <dje@google.com>
1148 Remove global all_lwps.
1149 * inferiors.h (ptid_of): Move here from linux-low.h.
1150 (pid_of, lwpid_of): Ditto.
1151 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1152 parameter is a struct thread_info * now.
1153 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1154 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1155 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1157 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1158 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1159 * linux-arm-low.c (update_registers_callback): Update, "entry"
1160 parameter is a struct thread_info * now.
1161 Fetch lwpid from current_inferior directly.
1162 (arm_insert_point): Pass &all_threads to find_inferior instead of
1164 (arm_remove_point): Ditto.
1165 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1166 (arm_prepare_to_resume): Fetch pid from thread.
1167 (arm_read_description): Fetch lwpid from current_inferior directly.
1168 * linux-low.c (all_lwps): Delete.
1169 (delete_lwp): Delete call to remove_inferior.
1170 (handle_extended_wait): Fetch lwpid from thread.
1171 (add_lwp): Don't set lwp->entry.id. Remove call to
1172 add_inferior_to_list.
1173 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1174 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1175 (kill_one_lwp_callback): Ditto.
1176 (linux_kill): Don't dereference NULL pointer.
1177 Fetch ptid,lwpid from thread.
1178 (get_detach_signal): Fetch ptid from thread.
1179 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1180 Simplify call to regcache_invalidate_thread.
1181 (delete_lwp_callback): Update, "entry" parameter is a
1182 struct thread_info * now. Fetch pid from thread.
1183 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1184 (status_pending_p_callback): Update, "entry" parameter is a
1185 struct thread_info * now. Fetch ptid from thread.
1186 (find_lwp_pid): Update, "entry" parameter is a
1187 struct thread_info * now.
1188 (linux_wait_for_lwp): Fetch pid from thread.
1189 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1190 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1191 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1192 (dequeue_one_deferred_signal): Ditto.
1193 (cancel_breakpoint): Fetch ptid from current_inferior.
1194 (linux_wait_for_event): Pass &all_threads to find_inferior,
1195 not &all_lwps. Fetch ptid, lwpid from thread.
1196 (count_events_callback): Update, "entry" parameter is a
1197 struct thread_info * now.
1198 (select_singlestep_lwp_callback): Ditto.
1199 (select_event_lwp_callback): Ditto.
1200 (cancel_breakpoints_callback): Ditto.
1201 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1203 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1204 (unsuspend_one_lwp): Update, "entry" parameter is a
1205 struct thread_info * now.
1206 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1208 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1209 Fetch lwpid from thread, not lwp.
1210 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1211 Pass &all_threads to find_inferior, not &all_lwps.
1212 (send_sigstop): Fetch lwpid from thread, not lwp.
1213 (send_sigstop_callback): Update, "entry" parameter is a
1214 struct thread_info * now.
1215 (suspend_and_send_sigstop_callback): Ditto.
1216 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1217 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1218 struct thread_info * now.
1219 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1221 (lwp_running): Update, "entry" parameter is a
1222 struct thread_info * now.
1223 (stop_all_lwps): Fetch ptid from thread.
1224 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1225 (linux_resume_one_lwp): Fetch lwpid from thread.
1226 (linux_set_resume_request): Update, "entry" parameter is a
1227 struct thread_info * now. Fetch pid, lwpid from thread.
1228 (resume_status_pending_p): Update, "entry" parameter is a
1229 struct thread_info * now.
1230 (need_step_over_p): Ditto. Fetch lwpid from thread.
1231 (start_step_over): Fetch lwpid from thread.
1232 (linux_resume_one_thread): Update, "entry" parameter is a
1233 struct thread_info * now. Fetch lwpid from thread.
1234 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1235 (proceed_one_lwp): Update, "entry" parameter is a
1236 struct thread_info * now. Fetch lwpid from thread.
1237 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1238 struct thread_info * now.
1239 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1240 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1241 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1243 (regsets_store_inferior_registers): Ditto.
1244 (fetch_register, store_register): Ditto.
1245 (linux_read_memory, linux_write_memory): Ditto.
1246 (linux_request_interrupt): Ditto.
1247 (linux_read_auxv): Ditto.
1248 (linux_xfer_siginfo): Ditto.
1249 (linux_qxfer_spu): Ditto.
1250 (linux_qxfer_libraries_svr4): Ditto.
1251 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1252 moved to inferiors.h.
1254 (get_thread_lwp): Update.
1255 (struct lwp_info): Delete member "entry". Simplify comment for
1258 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1259 current_inferior directly.
1260 (update_watch_registers_callback): Update, "entry" parameter is a
1261 struct thread_info * now. Fetch pid from thread.
1262 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1263 (mips_insert_point): Fetch lwpid from current_inferior.
1264 Pass &all_threads to find_inferior, not &all_lwps.
1265 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1266 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1268 (mips_stopped_data_address): Ditto.
1269 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1271 * linux-tile-low.c (tile_arch_setup): Ditto.
1272 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1273 (update_debug_registers_callback): Update, "entry" parameter is a
1274 struct thread_info * now. Fetch pid from thread.
1275 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1276 Pass &all_threads to find_inferior, not &all_lwps.
1277 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1278 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1279 Pass &all_threads to find_inferior, not &all_lwps.
1280 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1281 (i386_dr_low_get_status): Ditto.
1282 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1283 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1284 (x86_linux_read_description): Ditto.
1285 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1287 2014-02-20 Doug Evans <dje@google.com>
1289 * inferiors.c (get_first_inferior): Fix buglet.
1291 2014-02-19 Doug Evans <dje@google.com>
1293 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1294 * inferiors.c (add_thread): Change result type to struct thread_info *.
1295 All callers updated.
1296 (add_lwp): Call add_thread here instead of in callers.
1297 All callers updated.
1298 * linux-low.h (get_lwp_thread): Rewrite.
1299 (struct lwp_info): New member "thread".
1301 2014-02-19 Doug Evans <dje@google.com>
1303 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1304 All callers updated.
1306 2014-02-19 Doug Evans <dje@google.com>
1308 * inferiors.c (add_thread): Fix whitespace.
1310 2014-02-19 Doug Evans <dje@google.com>
1312 * dll.c (clear_dlls): Replace accessing list implemention details
1314 * gdbthread.h (get_first_thread): Declare.
1315 * inferiors.c (for_each_inferior_with_data): New function.
1316 (get_first_thread): New function.
1317 (find_thread_ptid): Simplify.
1318 (get_first_inferior): New function.
1319 (clear_list): Delete.
1320 (one_inferior_p): New function.
1321 (clear_inferior_list): New function.
1322 (clear_inferiors): Update.
1323 * inferiors.h (for_each_inferior_with_data): Declare.
1324 (clear_inferior_list): Declare.
1325 (one_inferior_p): Declare.
1326 (get_first_inferior): Declare.
1327 * linux-low.c (linux_wait_for_event): Replace accessing list
1328 implemention details with API function.
1329 * server.c (target_running): Ditto.
1330 (accumulate_file_name_length): New function.
1331 (emit_dll_description): New function.
1332 (handle_qxfer_libraries): Replace accessing list implemention
1333 details with API function.
1334 (handle_qxfer_threads_worker): New function.
1335 (handle_qxfer_threads_proper): Replace accessing list implemention
1336 details with API function.
1337 (handle_query): Ditto.
1338 (visit_actioned_threads_callback_ftype): New typedef.
1339 (visit_actioned_threads_data): New struct.
1340 (visit_actioned_threads): Rewrite to be find_inferior callback.
1341 (resume): Call find_inferior.
1342 (handle_status): Replace accessing list implemention
1343 details with API function.
1344 (process_serial_event): Replace accessing list implemention details
1346 * target.c (set_desired_inferior): Replace accessing list implemention
1347 details with API function.
1348 * tracepoint.c (same_process_p): New function.
1349 (gdb_agent_about_to_close): Replace accessing list implemention
1350 details with API function.
1351 * win32-low.c (child_delete_thread): Replace accessing list
1352 implemention details with API function.
1353 (match_dll_by_basename): New function.
1354 (dll_is_loaded_by_basename): New function.
1355 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1356 details call to dll_is_loaded_by_basename.
1358 2014-02-19 Doug Evans <dje@google.com>
1360 * dll.h (struct dll_info): Add comment.
1361 * gdbthread.h (struct thread_info): Add comment.
1362 (current_ptid): Simplify.
1363 * inferiors.c (add_process): Update.
1364 (remove_process): Update.
1365 * inferiors.h (struct process_info): Rename member "head" to "entry".
1366 * linux-low.c (delete_lwp): Update.
1368 (last_thread_of_process_p): Update.
1369 (kill_one_lwp_callback, linux_kill): Update.
1370 (status_pending_p_callback): Update.
1371 (wait_for_sigstop): Update. Simplify read of ptid.
1372 (start_step_over): Update.
1373 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1374 (get_lwp_thread): Update.
1375 (struct lwp_info): Rename member "head" to "entry".
1376 * regcache.h (inferior_list_entry): Delete.
1377 * server.c (kill_inferior_callback): Update.
1378 (detach_or_kill_inferior_callback): Update.
1379 (print_started_pid): Update.
1380 (print_attached_pid): Update.
1381 (process_serial_event): Simplify read of ptid.
1382 * thread-db.c (thread_db_create_event): Update.
1383 (thread_db_get_tls_address): Update.
1384 * win32-low.c (current_inferior_ptid): Simplify.
1386 2014-02-19 Tom Tromey <tromey@redhat.com>
1388 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1390 (target_supports_btrace): Update.
1392 2014-02-14 Yao Qi <yao@codesourcery.com>
1394 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1395 (rsp-low-ipa.o): New target.
1397 2014-02-12 Tom Tromey <tromey@redhat.com>
1399 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1400 convert_ascii_to_int.
1401 * regcache.c (registers_to_string): Likewise.
1402 * remote-utils.c (decode_M_packet): Likewise.
1403 * server.c (process_serial_event): Likewise.
1405 2014-02-12 Tom Tromey <tromey@redhat.com>
1407 * server.c (handle_query, handle_v_run): Use hex2bin, not
1409 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1411 2014-02-12 Tom Tromey <tromey@redhat.com>
1413 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1414 convert_int_to_ascii.
1415 * regcache.c (registers_to_string, collect_register_as_string):
1417 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1419 * server.c (process_serial_event): Likewise.
1420 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1421 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1423 2014-02-12 Tom Tromey <tromey@redhat.com>
1425 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1426 bin2hex, not hexify.
1427 * tracepoint.c (cmd_qtstatus): Likewise.
1429 2014-02-12 Tom Tromey <tromey@redhat.com>
1431 * remote-utils.c (monitor_output): Pass explicit length to
1434 2014-02-12 Tom Tromey <tromey@redhat.com>
1436 * tracepoint.c: Include rsp-low.h.
1437 * server.c: Include rsp-low.h.
1438 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1439 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1441 * remote-utils.c: Include rsp-low.h.
1442 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1443 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1444 (convert_int_to_ascii, convert_ascii_to_int): Move to
1446 * regcache.c: Include rsp-low.h.
1447 * ax.c: Include rsp-low.h.
1448 * Makefile.in (SFILES): Add common/rsp-low.c.
1449 (OBS): Add rsp-low.o.
1450 (rsp-low.o): New target.
1452 2014-02-12 Tom Tromey <tromey@redhat.com>
1454 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1455 Include print-utils.h.
1456 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1457 (plongest, thirty_two, phex_nz): Remove.
1458 * Makefile.in (SFILES): Add common/print-utils.c.
1459 (OBS): Add print-utils.o.
1460 (print-utils-ipa.o): New target.
1461 (print-utils.o): New target.
1462 (IPA_OBJS): Add print-utils-ipa.o.
1464 2014-02-06 Tom Tromey <tromey@redhat.com>
1466 * Makefile.in (SFILES): Fix indentation.
1468 2014-02-05 Doug Evans <dje@google.com>
1470 * linux-low.c (linux_wait_for_event): Improve comment.
1471 (linux_wait_1): Keep current_inferior in sync with event_child.
1473 2014-01-22 Doug Evans <dje@google.com>
1475 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1477 2014-01-22 Doug Evans <dje@google.com>
1479 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1480 * configure: Regenerate.
1481 * config.in: Regenerate.
1482 * Makefile.in (SFILES): Add debug.c.
1484 * debug.c: New file.
1485 * debug.h: New file.
1486 * linux-aarch64-low.c (*): Update all debugging printfs to use
1487 debug_printf instead of fprintf.
1488 * linux-arm-low.c (*): Ditto.
1489 * linux-cris-low.c (*): Ditto.
1490 * linux-crisv32-low.c (*): Ditto.
1491 * linux-m32r-low.c (*): Ditto.
1492 * linux-sparc-low.c (*): Ditto.
1493 * linux-x86.c (*): Ditto.
1494 * linux-low.c (*): Ditto.
1495 (linux_wait_1): Add calls to debug_enter, debug_exit.
1496 (linux_wait): Remove redundant debugging printf.
1497 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1498 (linux_resume, unstop_all_lwps): Ditto.
1499 * mem-break.c (*): Update all debugging printfs to use
1500 debug_printf instead of fprintf.
1501 * remote-utils.c (*): Ditto.
1502 * thread-db.c (*): Ditto.
1503 * server.c #include <ctype.h>, "gdb_vecs.h".
1504 (debug_threads): Moved to debug.c.
1505 (*): Update all debugging printfs to use debug_printf instead of
1507 (start_inferior): Replace call to fflush with call to debug_flush.
1508 (monitor_show_help): Mention set debug-format.
1509 (parse_debug_format_options): New function.
1510 (handle_monitor_command): Handle "monitor set debug-format".
1511 (gdbserver_usage): Mention --debug-format.
1512 (main): Parse --debug-format.
1513 * server.h (debug_threads): Declaration moved to debug.h.
1515 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1516 trace_debug_1 that uses debug_printf.
1517 (tracepoint_look_up_symbols): Update all debugging printfs to use
1518 debug_printf instead of fprintf.
1520 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1522 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1525 2014-01-17 Pedro Alves <palves@redhat.com>
1528 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1529 defined after including gdb_proc_service.h.
1531 2014-01-16 Doug Evans <dje@google.com>
1533 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1534 (match_dll): Use it.
1536 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1538 * target.h (target_ops) <read_btrace>: Change parameters and
1539 return type to allow error reporting.
1540 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1541 trace reading errors on.
1542 * linux-low.c (linux_low_read_btrace): Pass trace reading
1544 (linux_low_disable_btrace): New.
1546 2014-01-15 Doug Evans <dje@google.com>
1548 * inferiors.c (thread_id_to_gdb_id): Delete.
1549 * inferiors.h (thread_id_to_gdb_id): Delete.
1551 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1553 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1554 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1557 2014-01-08 Pedro Alves <palves@redhat.com>
1559 * server.c (handle_status): Don't discard previous queued stop
1560 replies or thread's pending status here.
1561 (main) <disconnection>: Do it here instead.
1563 2014-01-08 Pedro Alves <palves@redhat.com>
1565 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1566 * server.c (visit_actioned_threads, handle_pending_status): New
1568 (handle_v_cont): Factor out parts to ...
1569 (resume): ... this new function. If in all-stop, and a thread
1570 being resumed has a pending status, report it without actually
1572 (myresume): Adjust to use the new 'resume' function.
1573 (clear_pending_status_callback, set_pending_status_callback)
1574 (find_status_pending_thread_callback): New functions.
1575 (handle_status): Handle the case of multiple threads having
1576 interesting statuses to report. Report threads' real last signal
1577 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1578 with an interesting thread to report the status for, instead of
1579 always reporting the status of the first thread.
1581 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1583 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1584 * gdbreplay.c (gdbreplay_version): Likewise.
1586 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1588 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1589 iov.iov_len with the real length in use.
1591 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1593 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1594 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1595 for all targets that use win32-low.c.
1596 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1597 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1599 2013-12-13 Pedro Alves <palves@redhat.com>
1601 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1602 if equal to TARGET_WAITKIND_LOADED.
1603 * win32-low.c (cached_status): New static global.
1604 (win32_wait): Add declaration.
1605 (do_initial_child_stuff): Flush all initial pending debug events
1606 up to the initial breakpoint.
1607 (win32_wait): If CACHED_STATUS was set, return that instead
1608 of doing a real wait. Remove the code resuming the execution
1609 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1610 during the initial phase. Also remove the code changing
1611 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1612 TARGET_WAITKIND_STOPPED.
1614 2013-12-11 Yao Qi <yao@codesourcery.com>
1616 * notif.c (handle_notif_ack): Return 0 if no notification
1619 2013-11-20 Doug Evans <dje@google.com>
1621 * linux-low.c (linux_set_resume_request): Fix comment.
1623 2013-11-20 Doug Evans <dje@google.com>
1625 * linux-low.c (resume_status_pending_p): Tweak comment.
1627 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1629 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1630 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1631 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1632 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1633 (srv_amd64_regobj): Add amd64-mpx.o.
1634 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1635 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1636 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1637 * i387-fp.c (num_pl_bnd_register) Added constant.
1638 (num_pl_bnd_cfg_registers) Added constant.
1639 (struct i387_xsave) Added reserved area and MPX fields.
1640 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1641 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1643 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1644 (init_registers_amd64_mpx_linux): Declare new function.
1645 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1646 (x86_64_regmap): Add MPX registers.
1647 (x86_linux_read_description): Add MPX case.
1648 (initialize_low_arch): Initialize MPX targets.
1650 2013-11-18 Tom Tromey <tromey@redhat.com>
1652 * configure: Rebuild.
1653 * configure.ac: Don't check for stdlib.h.
1654 * gdbreplay.c: Unconditionally include stdlib.h.
1656 2013-11-18 Tom Tromey <tromey@redhat.com>
1658 * config.in: Rebuild.
1659 * configure: Rebuild.
1660 * configure.ac: Don't use AC_HEADER_DIRENT.
1662 2013-11-18 Tom Tromey <tromey@redhat.com>
1664 * server.h: Don't check HAVE_STRING_H.
1665 * gdbreplay.c: Don't check HAVE_STRING_H.
1666 * configure: Rebuild.
1668 2013-11-18 Tom Tromey <tromey@redhat.com>
1670 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1673 2013-11-08 Tom Tromey <tromey@redhat.com>
1675 * configure, config.in: Rebuild.
1676 * configure.ac: Remove unused configury.
1678 2013-11-08 Tom Tromey <tromey@redhat.com>
1680 * acinclude.m4: Include common.m4, codeset.m4.
1681 * configure, config.in: Rebuild.
1682 * configure.ac: Use GDB_AC_COMMON.
1684 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1686 * linux-s390-low.c (HWCAP_S390_TE): New define.
1687 (s390_arch_setup): Consider the TE field in the HWCAP for
1688 determining 'have_regset_tdb'.
1690 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1693 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1696 2013-10-02 Pedro Alves <palves@redhat.com>
1698 * server.c (process_serial_event): Don't output "GDBserver
1699 exiting" if GDB is connected through stdio.
1700 * target.c (mywait): Likewise, be silent if GDB is connected
1703 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1705 * lynx-low.c (lynx_add_threads_after_attach): New function.
1706 (lynx_attach): Remove call to add_thread. Add call to
1707 lynx_add_threads_after_attach instead.
1709 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1711 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1712 * config.in, configure: Regenerated.
1714 2013-09-18 Yao Qi <yao@codesourcery.com>
1717 * server.c (start_inferior): Clear 'resume_info'.
1719 2013-09-16 Jiong Wang <jiwang@tilera.com>
1721 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1724 2013-09-16 Jiong Wang <jiwang@tilera.com>
1726 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1727 linux-tile-low.o to srv_tgtobj.
1729 2013-09-16 Will Newton <will.newton@linaro.org>
1731 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1734 2013-09-06 Pedro Alves <palves@redhat.com>
1736 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1737 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1738 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1739 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1740 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1741 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1743 2013-09-06 Pedro Alves <palves@redhat.com>
1745 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1746 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1748 2013-09-06 Pedro Alves <palves@redhat.com>
1750 * linux-amd64-ipa.c: Include tracepoint.h.
1751 * linux-i386-ipa.c: Include tracepoint.h.
1753 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1755 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1756 (ps_get_thread_area): New function.
1758 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1760 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1761 (initialize_low_arch): Call init_registers_crisv32 rather than
1762 init_register_crisv32.
1764 2013-09-05 Pedro Alves <palves@redhat.com>
1766 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1768 * hostio.h: ... this new file.
1769 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1770 win32-low.c: Include hostio.h.
1772 2013-09-05 Pedro Alves <palves@redhat.com>
1774 * server.h (gdb_client_data, handler_func, callback_handler_func)
1775 (delete_file_handler, add_file_handler, append_callback_event)
1776 (delete_callback_event, start_event_loop, initialize_event_loop):
1777 Move to event-loop.h and include it.
1778 * event-loop.h: New file.
1780 2013-09-05 Pedro Alves <palves@redhat.com>
1782 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1783 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1784 (loaded_dll, unloaded_dll): Move to ...
1785 * dll.h: ... this new file.
1786 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1788 2013-09-05 Pedro Alves <palves@redhat.com>
1790 * server.h (current_process, get_thread_process, all_processes)
1791 (add_inferior_to_list, for_each_inferior, current_inferior)
1792 (remove_inferior, add_process, remove_process, find_process_pid)
1793 (have_started_inferiors_p, have_attached_inferiors_p)
1794 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1795 (clear_inferiors, find_inferior, find_inferior_id)
1796 (inferior_target_data, set_inferior_target_data)
1797 (inferior_regcache_data, set_inferior_regcache_data): Move to
1798 inferiors.h, and include it.
1799 * inferiors.h: New file.
1801 2013-09-05 Pedro Alves <palves@redhat.com>
1803 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1807 2013-09-05 Pedro Alves <palves@redhat.com>
1809 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1811 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1812 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1813 (handle_tracepoint_general_set, handle_tracepoint_query)
1814 (tracepoint_finished_step, tracepoint_was_hit)
1815 (release_while_stepping_state_list, current_traceframe)
1816 (in_readonly_region, traceframe_read_mem)
1817 (fetch_traceframe_registers, traceframe_read_sdata)
1818 (traceframe_read_info, struct fast_tpoint_collect_status)
1819 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1820 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1821 (supply_fast_tracepoint_registers)
1822 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1823 (ipa_tdesc, claim_trampoline_space)
1824 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1825 (agent_mem_read, agent_get_trace_state_variable_value)
1826 (agent_set_trace_state_variable_value, agent_tsv_read)
1827 (agent_mem_read_string, get_raw_reg_func_addr)
1828 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1829 * tracepoint.h: ... this new file.
1831 2013-09-05 Pedro Alves <palves@redhat.com>
1833 * server.h (perror_with_name, error, fatal, warning, paddress)
1834 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1836 * utils.h: New file.
1838 2013-09-05 Pedro Alves <palves@redhat.com>
1840 * server.h (remote_debug, noack_mode, transport_is_reliable)
1841 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1842 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1843 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1844 (write_enn, initialize_async_io, enable_async_io)
1845 (disable_async_io, check_remote_input_interrupt_request)
1846 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1847 (dead_thread_notify, prepare_resume_reply)
1848 (decode_address_to_semicolon, decode_address, decode_m_packet)
1849 (decode_M_packet, decode_X_packet, decode_xfer_write)
1850 (decode_search_memory_packet, unhexify, hexify)
1851 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1852 (look_up_one_symbol, relocate_instruction)
1853 (monitor_output): Move to remote-utils.h, and include it.
1854 * remote-utils.h: New file.
1856 2013-09-05 Pedro Alves <palves@redhat.com>
1858 * server.h (_): Delete.
1860 2013-09-02 Pedro Alves <palves@redhat.com>
1862 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1863 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1865 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1867 2013-09-02 Pierre Muller <muller@sourceware.org>
1869 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1870 or WriteProcessMemory complete successfully and handle
1871 ERROR_PARTIAL_COPY error.
1873 2013-09-02 Pedro Alves <palves@redhat.com>
1875 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1876 error instead of EIO.
1878 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1881 * linux-low.c: Include filestuff.h.
1882 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1883 * lynx-low.c: Include filestuff.h.
1884 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1885 * server.c: Include filestuff.h.
1886 (main): Call notice_open_fds.
1887 * spu-low.c: Include filestuff.h.
1888 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1890 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1892 * Makefile.in: Explain why ../target and ../nat are not
1893 listed as include file search paths.
1894 (linux-waitpid.o): New object file rule.
1895 * configure.srv (srv_native_linux_obj): New variable.
1896 Replace all occurrences of linux native object files with
1897 $srv_native_linux_obj.
1898 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1899 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1900 (linux_enable_event_reporting): Remove declaration.
1901 (my_waitpid): Moved to common/linux-waitpid.c.
1902 (linux_wait_for_event): Pass ptid when calling
1903 linux_enable_event_reporting.
1904 (linux_supports_tracefork_flag): Remove.
1905 (linux_enable_event_reporting): Likewise.
1906 (linux_tracefork_grandchild): Remove.
1907 (STACK_SIZE): Moved to common/linux-ptrace.c.
1908 (linux_tracefork_child): Remove.
1909 (linux_test_for_tracefork): Remove.
1910 (linux_look_up_symbols): Call linux_supports_traceclone.
1911 (initialize_low): Remove call to linux_test_for_tracefork.
1912 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1913 common/linux-ptrace.h.
1914 (PTRACE_TYPE_ARG4): Likewise.
1915 Include linux-ptrace.h.
1917 2013-08-21 Pedro Alves <palves@redhat.com>
1919 * config.in: Renegerate.
1921 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1923 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1924 (SFILES): Remove $(srcdir)/common/target-common.c and
1925 add $(srcdir)/target/waitstatus.c.
1926 (OBS): Remove target-common.o and add waitstatus.o.
1927 (server_h): Remove $(srcdir)/../common/target-common.h and
1928 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1929 and $(srcdir)/../target/waitstatus.h.
1930 (target-common.o): Remove.
1931 (waitstatus.o): New target object file.
1932 * target.h: Do not include target-common.h and
1933 include target/resume.h, target/wait.h and
1934 target/waitstatus.h.
1936 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1938 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1939 to PTRACE_TYPE_ARG3.
1940 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1941 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1943 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1944 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1946 2013-07-27 Jie Zhang <jie@codesourcery.com>
1947 Daniel Jacobowitz <dan@codesourcery.com>
1948 Yao Qi <yao@codesourcery.com>
1950 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1951 (mips-linux-watch.o): New rule.
1952 (mips_linux_watch_h): New variable.
1953 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1955 * linux-mips-low.c: Include mips-linux-watch.h.
1956 (struct arch_process_info, struct arch_lwp_info): New.
1957 (update_watch_registers_callback): New function.
1958 (mips_linux_new_process, mips_linux_new_thread) New functions.
1959 (mips_linux_prepare_to_resume, mips_insert_point): New
1961 (mips_remove_point, mips_stopped_by_watchpoint): New
1963 (rsp_bp_type_to_target_hw_bp_type): New function.
1964 (mips_stopped_data_address): New function.
1965 (the_low_target): Add watchpoint support functions.
1967 2013-07-27 Yao Qi <yao@codesourcery.com>
1969 * i386-low.c: Include break-common.h.
1970 (enum target_hw_bp_type): Remove.
1972 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1974 * Makefile.in (SFILES): /common/target-common.c.
1975 (OBS): Add target-common.o.
1976 (server_h): Add $(srcdir)/../common/target-common.h.
1977 (target-common.o): New target.
1978 * server.c (queue_stop_reply_callback): Free
1979 status string after use.
1980 * target.c (target_waitstatus_to_string): Remove.
1981 * target.h: Include target-common.h.
1982 (resume_kind): Likewise.
1983 (target_waitkind): Likewise.
1984 (target_waitstatus): Likewise.
1985 (TARGET_WNOHANG): Likewise.
1987 2013-07-04 Yao Qi <yao@codesourcery.com>
1989 * Makefile.in (host_alias): Use @host_noncanonical@.
1990 (target_alias): Use @target_noncanonical@.
1991 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1992 ACX_NONCANONICAL_HOST.
1993 * configure: Regenerated.
1996 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1998 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1999 * configure: Rebuild.
2000 * Makefile.in (version_host, version_target): Get from configure.
2001 (version.c): Use $(version_host) and $(version_target).
2003 2013-07-03 Pedro Alves <palves@redhat.com>
2005 * Makefile.in (config.status): Depend on development.sh.
2006 * acinclude.m4: Include libmcheck.m4.
2007 * configure: Regenerate.
2009 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2011 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2012 attribute inside the parentheses.
2013 (winapi_DebugSetProcessKillOnExit): Ditto.
2014 (winapi_DebugBreakProcess): Ditto.
2015 (winapi_GenerateConsoleCtrlEvent): Ditto.
2017 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2019 * notif.h (notif_event): Add a dummy member to avoid compiler
2022 2013-07-01 Pedro Alves <palves@redhat.com>
2024 * hostio.c (HOSTIO_PATH_MAX): Define.
2025 (require_filename, handle_open, handle_unlink, handle_readlink):
2028 2013-07-01 Pedro Alves <palves@redhat.com>
2030 * server.h: Include "pathmax.h".
2031 * linux-low.c: Don't include sys/param.h.
2032 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2034 * win32-low.c: Don't include sys/param.h.
2035 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2037 2013-07-01 Pedro Alves <palves@redhat.com>
2039 * event-loop.c: Don't check HAVE_UNISTD_H before including
2041 * gdbreplay.c: Likewise.
2042 * remote-utils.c: Likewise.
2043 * server.c: Likewise.
2044 * configure.ac: Don't check for unistd.h.
2045 * configure: Regenerate.
2047 2013-06-28 Tom Tromey <tromey@redhat.com>
2049 * Makefile.in (version.c): Use version.in, not
2052 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2054 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2055 * configure: Rebuild.
2056 * Makefile.in (version_host, version_target): Get from configure.
2057 (version.c): Use $(version_host) and $(version_target).
2059 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2061 Fix trace-status to output user name without trailing colon.
2062 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2064 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2066 Fix trace-status to output proper start-time and stop-time.
2067 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2068 output start time and stop time in hex as gdb expects.
2070 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2072 * tracepoint.c (build_traceframe_info_xml): Output trace state
2073 variables present in the trace buffer.
2075 2013-06-24 Tom Tromey <tromey@redhat.com>
2077 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2079 (version.o): Remove.
2080 * gdbreplay.c: Include version.h.
2081 (version, host_name): Don't declare.
2082 * server.h: Include version.h.
2083 (version, host_name): Don't declare.
2085 2013-06-12 Pedro Alves <palves@redhat.com>
2087 * linux-x86-low.c (linux_is_elf64): Delete global.
2088 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2089 with local linux_pid_exe_is_elf_64_file use.
2091 2013-06-11 Pedro Alves <palves@redhat.com>
2093 * linux-low.c (regset_disabled, disable_regset): New functions.
2094 (regsets_fetch_inferior_registers)
2095 (regsets_store_inferior_registers): Use them.
2096 (initialize_regsets_info); Don't allocate the disabled_regsets
2098 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2101 2013-06-11 Pedro Alves <palves@redhat.com>
2103 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2106 2013-06-11 Pedro Alves <palves@redhat.com>
2108 * linux-x86-low.c (initialize_low_arch): Call
2109 init_registers_x32_avx_linux.
2111 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2113 Fix compatibility with Android Bionic.
2114 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2117 2013-06-07 Pedro Alves <palves@redhat.com>
2120 * Makefile.in (OBS): Add tdesc.o.
2121 (IPA_OBJS): Add tdesc-ipa.o.
2122 (tdesc-ipa.o): New rule.
2123 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2125 * linux-low.c (new_inferior): Delete.
2126 (disabled_regsets, num_regsets): Delete.
2127 (linux_add_process): Adjust to set the new per-process
2129 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2130 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2131 was a stop. When calling arch_setup, switch the current inferior
2132 to the thread that got an event.
2133 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2134 (regsets_fetch_inferior_registers)
2135 (regsets_store_inferior_registers): New regsets_info parameter.
2137 (linux_register_in_regsets): New regs_info parameter. Adjust to
2139 (register_addr, fetch_register, store_register): New usrregs_info
2140 parameter. Adjust to use it.
2141 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2142 parameter regs_info. Adjust to use it.
2143 (linux_fetch_registers): Get the current inferior's regs_info, and
2145 (linux_store_registers): Ditto.
2146 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2147 (initialize_low): Don't initialize the target_regsets here. Call
2148 initialize_low_arch.
2149 * linux-low.h (target_regsets): Delete declaration.
2150 (struct regsets_info): New.
2151 (struct usrregs_info): New.
2152 (struct regs_info): New.
2153 (struct process_info_private) <new_inferior>: New field.
2154 (struct linux_target_ops): Delete the num_regs, regmap, and
2155 regset_bitmap fields. New field regs_info.
2156 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2157 * i387-fp.c (num_xmm_registers): Delete.
2158 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2159 calls to new interface.
2160 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2161 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2162 Infer the number of xmm registers from the regcache's target
2164 * i387-fp.h (num_xmm_registers): Delete.
2165 * inferiors.c (add_thread): Don't install the thread's regcache
2167 * proc-service.c (gregset_info): Fetch the current inferior's
2168 regs_info. Adjust to use it.
2169 * regcache.c: Include tdesc.h.
2170 (register_bytes, reg_defs, num_registers)
2171 (gdbserver_expedite_regs): Delete.
2172 (get_thread_regcache): If the thread doesn't have a regcache yet,
2173 create one, instead of aborting gdbserver.
2174 (regcache_invalidate_one): Rename to ...
2175 (regcache_invalidate_thread): ... this.
2176 (regcache_invalidate_one): New.
2177 (regcache_invalidate): Only invalidate registers of the current
2179 (init_register_cache): Add target_desc parameter, and use it.
2180 (new_register_cache): Ditto. Assert the target description has a
2181 non zero registers_size.
2182 (regcache_cpy): Add assertions. Adjust.
2183 (realloc_register_cache, set_register_cache): Delete.
2184 (registers_to_string, registers_from_string): Adjust.
2185 (find_register_by_name, find_regno, find_register_by_number)
2186 (register_cache_size): Add target_desc parameter, and use it.
2187 (free_register_cache_thread, free_register_cache_thread_one)
2188 (regcache_release, register_cache_size): New.
2189 (register_size): Add target_desc parameter, and use it.
2190 (register_data, supply_register, supply_register_zeroed)
2191 (supply_regblock, supply_register_by_name, collect_register)
2192 (collect_register_as_string, collect_register_by_name): Adjust.
2193 * regcache.h (struct target_desc): Forward declare.
2194 (struct regcache) <tdesc>: New field.
2195 (init_register_cache, new_register_cache): Add target_desc
2197 (regcache_invalidate_thread): Declare.
2198 (regcache_invalidate_one): Delete declaration.
2199 (regcache_release): Declare.
2200 (find_register_by_number, register_cache_size, register_size)
2201 (find_regno): Add target_desc parameter.
2202 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2204 * remote-utils.c: Include tdesc.h.
2205 (outreg, prepare_resume_reply): Adjust.
2206 * server.c: Include tdesc.h.
2207 (gdbserver_xmltarget): Delete declaration.
2208 (get_features_xml, process_serial_event): Adjust.
2209 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2211 (struct process_info) <tdesc>: New field.
2212 (ipa_tdesc): Declare.
2213 * tdesc.c: New file.
2214 * tdesc.h: New file.
2215 * tracepoint.c: Include tdesc.h.
2216 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2217 (get_context_regcache): Adjust to pass ipa_tdesc down.
2218 (do_action_at_tracepoint): Adjust to get the register cache size
2219 from the context regcache's description.
2220 (traceframe_walk_blocks): Adjust to get the register cache size
2221 from the current trace frame's description.
2222 (traceframe_get_pc): Adjust to get current trace frame's
2223 description and pass it down.
2224 (gdb_collect): Adjust to get the register cache size from the
2226 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2227 (gdbserver_xmltarget): Delete.
2228 (initialize_low_tracepoint): Set the ipa's target description.
2229 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2230 (initialize_low_tracepoint): Set the ipa's target description.
2231 * linux-x86-low.c: Include tdesc.h.
2232 [__x86_64__] (is_64bit_tdesc): New.
2233 (ps_get_thread_area, x86_get_thread_area): Use it.
2234 (i386_cannot_store_register): Rename to ...
2235 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2236 (i386_cannot_fetch_register): Rename to ...
2237 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2238 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2240 (target_regsets): Rename to ...
2241 (x86_regsets): ... this.
2242 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2244 (x86_siginfo_fixup): Use is_64bit_tdesc.
2245 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2246 (tdesc_x32_avx_linux, tdesc_x32_linux)
2247 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2249 (x86_linux_update_xmltarget): Delete.
2250 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2251 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2252 (AMD64_LINUX_USER64_CS): New.
2253 (x86_linux_read_description): New, based on
2254 x86_linux_update_xmltarget.
2255 (same_process_callback): New.
2256 (x86_arch_setup_process_callback): New.
2257 (x86_linux_update_xmltarget): New.
2258 (x86_regsets_info): New.
2259 (amd64_linux_regs_info): New.
2260 (i386_linux_usrregs_info): New.
2261 (i386_linux_regs_info): New.
2262 (x86_linux_regs_info): New.
2263 (x86_arch_setup): Reimplement.
2264 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2265 (x86_emit_ops): Ditto.
2266 (the_low_target): Adjust. Install x86_linux_regs_info,
2267 x86_cannot_fetch_register, and x86_cannot_store_register.
2268 (initialize_low_arch): New.
2269 * linux-ia64-low.c (tdesc_ia64): Declare.
2270 (ia64_fetch_register): Adjust.
2271 (ia64_usrregs_info, regs_info): New globals.
2272 (ia64_regs_info): New function.
2273 (the_low_target): Adjust.
2274 (initialize_low_arch): New function.
2275 * linux-sparc-low.c (tdesc_sparc64): Declare.
2276 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2278 (sparc_arch_setup): New function.
2279 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2280 (the_low_target): Adjust.
2281 (initialize_low_arch): New function.
2282 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2283 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2284 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2285 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2286 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2287 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2288 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2289 (tdesc_powerpc_isa205_vsx64l): Declare.
2290 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2291 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2292 (ppc_set_pc, ppc_get_hwcap): Adjust.
2293 (ppc_usrregs_info): Forward declare.
2294 (!__powerpc64__) ppc_regmap_adjusted: New global.
2295 (ppc_arch_setup): Adjust to the current process'es target
2297 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2298 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2299 (ppc_store_evrregset): Adjust.
2300 (target_regsets): Rename to ...
2301 (ppc_regsets): ... this, and make static.
2302 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2303 (ppc_regs_info): New function.
2304 (the_low_target): Adjust.
2305 (initialize_low_arch): New function.
2306 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2307 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2308 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2309 (tdesc_s390x_linux64v2): Declare.
2310 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2311 (s390_fill_gregset, s390_store_last_break): Adjust.
2312 (target_regsets): Rename to ...
2313 (s390_regsets): ... this, and make static.
2314 (s390_get_pc, s390_set_pc): Adjust.
2315 (s390_get_hwcap): New target_desc parameter, and use it.
2316 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2317 (s390_arch_setup): Adjust to set the current process'es target
2318 description. Don't adjust the regmap.
2319 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2320 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2321 (regs_info_3264): New globals.
2322 (s390_regs_info): New function.
2323 (the_low_target): Adjust.
2324 (initialize_low_arch): New function.
2325 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2326 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2327 [__mips64] (init_registers_mips_linux)
2328 (init_registers_mips_dsp_linux): Delete defines.
2329 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2330 (have_dsp): New global.
2331 (mips_read_description): New, based on mips_arch_setup.
2332 (mips_arch_setup): Reimplement.
2333 (get_usrregs_info): New function.
2334 (mips_cannot_fetch_register, mips_cannot_store_register)
2335 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2336 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2337 (target_regsets): Rename to ...
2338 (mips_regsets): ... this, and make static.
2339 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2340 (dsp_regs_info, regs_info): New globals.
2341 (mips_regs_info): New function.
2342 (the_low_target): Adjust.
2343 (initialize_low_arch): New function.
2344 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2345 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2347 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2348 (arm_read_description): New, with bits factored from
2350 (arm_arch_setup): Reimplement.
2351 (target_regsets): Rename to ...
2352 (arm_regsets): ... this, and make static.
2353 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2354 (arm_regs_info): New function.
2355 (the_low_target): Adjust.
2356 (initialize_low_arch): New function.
2357 * linux-m68k-low.c (tdesc_m68k): Declare.
2358 (target_regsets): Rename to ...
2359 (m68k_regsets): ... this, and make static.
2360 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2361 (m68k_regs_info): New function.
2362 (m68k_arch_setup): New function.
2363 (the_low_target): Adjust.
2364 (initialize_low_arch): New function.
2365 * linux-sh-low.c (tdesc_sharch): Declare.
2366 (target_regsets): Rename to ...
2367 (sh_regsets): ... this, and make static.
2368 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2369 (sh_regs_info, sh_arch_setup): New functions.
2370 (the_low_target): Adjust.
2371 (initialize_low_arch): New function.
2372 * linux-bfin-low.c (tdesc_bfin): Declare.
2373 (bfin_arch_setup): New function.
2374 (bfin_usrregs_info, regs_info): New globals.
2375 (bfin_regs_info): New function.
2376 (the_low_target): Adjust.
2377 (initialize_low_arch): New function.
2378 * linux-cris-low.c (tdesc_cris): Declare.
2379 (cris_arch_setup): New function.
2380 (cris_usrregs_info, regs_info): New globals.
2381 (cris_regs_info): New function.
2382 (the_low_target): Adjust.
2383 (initialize_low_arch): New function.
2384 * linux-cris-low.c (tdesc_crisv32): Declare.
2385 (cris_arch_setup): New function.
2386 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2387 (cris_regs_info): New function.
2388 (the_low_target): Adjust.
2389 (initialize_low_arch): New function.
2390 * linux-m32r-low.c (tdesc_m32r): Declare.
2391 (m32r_arch_setup): New function.
2392 (m32r_usrregs_info, regs_info): New globals.
2393 (m32r_regs_info): Adjust.
2394 (initialize_low_arch): New function.
2395 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2396 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2397 (tic6x_usrregs_info): Forward declare.
2398 (tic6x_read_description): New function, based on ...
2399 (tic6x_arch_setup): ... this. Reimplement.
2400 (target_regsets): Rename to ...
2401 (tic6x_regsets): ... this, and make static.
2402 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2403 (tic6x_regs_info): New function.
2404 (the_low_target): Adjust.
2405 (initialize_low_arch): New function.
2406 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2407 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2408 (target_regsets): Rename to ...
2409 (xtensa_regsets): ... this, and make static.
2410 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2412 (xtensa_arch_setup, xtensa_regs_info): New functions.
2413 (the_low_target): Adjust.
2414 (initialize_low_arch): New function.
2415 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2416 (nios2_arch_setup): Set the current process'es tdesc.
2417 (target_regsets): Rename to ...
2418 (nios2_regsets): ... this.
2419 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2420 (nios2_regs_info): New function.
2421 (the_low_target): Adjust.
2422 (initialize_low_arch): New function.
2423 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2424 (aarch64_arch_setup): Set the current process'es tdesc.
2425 (target_regsets): Rename to ...
2426 (aarch64_regsets): ... this.
2427 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2428 (aarch64_regs_info): New function.
2429 (the_low_target): Adjust.
2430 (initialize_low_arch): New function.
2431 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2433 (target_regsets): Rename to ...
2434 (tile_regsets): ... this.
2435 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2436 (tile_regs_info): New function.
2437 (tile_arch_setup): Set the current process'es tdesc.
2438 (the_low_target): Adjust.
2439 (initialize_low_arch): New function.
2440 * spu-low.c (tdesc_spu): Declare.
2441 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2442 * win32-arm-low.c (tdesc_arm): Declare.
2443 (arm_arch_setup): New function.
2444 (the_low_target): Install arm_arch_setup instead of
2446 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2447 (init_windows_x86): Rename to ...
2448 (i386_arch_setup): ... this. Set `win32_tdesc'.
2449 (the_low_target): Adjust.
2450 * win32-low.c (win32_tdesc): New global.
2451 (child_add_thread): Don't create the thread cache here.
2452 (do_initial_child_stuff): Set the new process'es tdesc.
2453 * win32-low.h (struct target_desc): Forward declare.
2454 (win32_tdesc): Declare.
2455 * lynx-i386-low.c (tdesc_i386): Declare global.
2456 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2457 * lynx-low.c (lynx_tdesc): New global.
2458 (lynx_add_process): Set the new process'es tdesc.
2459 * lynx-low.h (struct target_desc): Forward declare.
2460 (lynx_tdesc): Declare global.
2461 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2462 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2463 * nto-low.c (nto_tdesc): New global.
2464 (do_attach): Set the new process'es tdesc.
2465 * nto-low.h (struct target_desc): Forward declare.
2466 (nto_tdesc): Declare.
2467 * nto-x86-low.c (tdesc_i386): Declare.
2468 (nto_x86_arch_setup): Set `nto_tdesc'.
2470 2013-06-04 Gary Benson <gbenson@redhat.com>
2472 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2473 to qSupported response when appropriate.
2474 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2475 with nonzero-length annex.
2476 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2477 arguments supplied in annex.
2479 2013-05-31 Doug Evans <dje@google.com>
2482 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2483 64 bits in 64-cross-32 environment.
2485 2013-05-28 Pedro Alves <palves@redhat.com>
2487 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2488 (aarch64-without-fpu.c): Delete rule.
2489 * configure.srv (aarch64*-*-linux*): Remove references to
2490 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2491 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2494 2013-05-24 Pedro Alves <palves@redhat.com>
2496 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2497 instead of strchr/decode_address. Error if the range isn't split
2498 with a ','. Don't assume there's be a ':' in the action.
2500 2013-05-23 Yao Qi <yao@codesourcery.com>
2501 Pedro Alves <palves@redhat.com>
2503 * linux-low.c (lwp_in_step_range): New function.
2504 (linux_wait_1): If the thread was range stepping and stopped
2505 outside the stepping range, report the stop to GDB. Otherwise,
2506 continue stepping. Add range stepping debug output.
2507 (linux_set_resume_request): Copy the step range from the resume
2509 (linux_supports_range_stepping): New.
2510 (linux_target_ops) <supports_range_stepping>: Set to
2511 linux_supports_range_stepping.
2512 * linux-low.h (struct linux_target_ops)
2513 <supports_range_stepping>: New field.
2514 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2515 * linux-x86-low.c (x86_supports_range_stepping): New.
2516 (the_low_target) <supports_range_stepping>: Set to
2517 x86_supports_range_stepping.
2518 * server.c (handle_v_cont): Handle 'r' action.
2519 (handle_v_requests): Append ";r" if the target supports range
2521 * target.h (struct thread_resume) <step_range_start,
2522 step_range_end>: New fields.
2523 (struct target_ops) <supports_range_stepping>:
2525 (target_supports_range_stepping): New macro.
2527 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2529 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2530 confusion in comment.
2532 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2534 * lynx-low.c (struct process_info_private): New type.
2535 (lynx_add_process): New function.
2536 (lynx_create_inferior, lynx_attach): Replace calls to
2537 add_process by calls to lynx_add_process.
2538 (lynx_resume): If PTID is null, then try using
2539 current_process()->private->last_wait_event_ptid.
2541 (lynx_clear_inferiors): Delete. The contents of that function
2542 has been inlined in lynx_mourn;
2543 (lynx_wait_1): Save the ptid in the process's private data.
2544 (lynx_mourn): Free the process' private data. Replace call
2545 to lynx_clear_inferiors by call to clear_inferiors.
2547 2013-05-17 Yao Qi <yao@codesourcery.com>
2549 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2552 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2554 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2555 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2556 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2557 PT_TEXT_END_ADDR guards. Update comments.
2558 (linux_target_op) <read_offsets>: Conditionally define to
2559 linux_read_offsets if the target is UCLIBC and if it defines
2560 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2562 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2563 Andrew Jenner <andrew@codesourcery.com>
2565 * Makefile.in (SFILES): Add linux-nios2-low.c.
2566 (clean): Add action to delete nios2-linux.c.
2567 (nios2-linux.c): New rule.
2568 * configure.srv: Add nios2*-*-linux*.
2569 * linux-nios2-low.c: New.
2571 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2573 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2575 2013-04-25 Hui Zhu <hui@codesourcery.com>
2578 * ax.c (ax_printf): Add fflush.
2580 2013-04-22 Tom Tromey <tromey@redhat.com>
2582 * Makefile.in (SFILES): Add filestuff.c.
2583 (OBS): Add filestuff.o.
2584 (filestuff.o): New target.
2585 * config.in, configure: Rebuild.
2586 * configure.ac: Check for fdwalk, pipe2.
2588 2013-04-17 Pedro Alves <palves@redhat.com>
2590 * configure.ac (USE_THREAD_DB): Delete variable.
2591 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2592 Don't AC_SUBST USE_THREAD_DB.
2593 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2594 * config.in, configure: Regenerate.
2596 2013-04-16 Pedro Alves <palves@redhat.com>
2598 * linux-low.h (struct lwp_info) <thread_known>: Move under
2599 the USE_THREAD_DB #ifdef.
2601 2013-04-16 Pedro Alves <palves@redhat.com>
2603 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2604 (linux-low.o): Delete rule.
2605 * linux-low.h: Always include "gdb_thread_db.h" instead of
2606 conditionally including thread_db.h.
2607 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2610 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2612 * Makefile.in (install-only): Fix make install regression.
2614 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2616 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2617 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2619 * gdbserver.1: Remove.
2621 2013-03-22 Pedro Alves <palves@redhat.com>
2623 * linux-low.c (handle_extended_wait): Don't call
2624 linux_enable_event_reporting.
2626 2013-03-15 Tony Theodore <tonyt@logyst.com>
2629 * Makefile.in (SHELL): Use @SHELL@.
2631 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2633 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2636 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2638 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2639 Remove extraneous NULL element.
2641 2013-03-13 Yao Qi <yao@codesourcery.com>
2643 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2644 'V' block in trace frame.
2646 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2648 * target.h (struct target_ops): Add btrace ops.
2649 (target_supports_btrace): New macro.
2650 (target_enable_btrace): New macro.
2651 (target_disable_btrace): New macro.
2652 (target_read_btrace): New macro.
2653 * gdbthread.h (struct thread_info): Add btrace field.
2654 * server.c: Include btrace-common.h.
2655 (handle_btrace_general_set): New function.
2656 (handle_btrace_enable): New function.
2657 (handle_btrace_disable): New function.
2658 (handle_general_set): Call handle_btrace_general_set.
2659 (handle_qxfer_btrace): New function.
2660 (struct qxfer qxfer_packets[]): Add btrace entry.
2661 * inferiors.c (remove_thread): Disable btrace.
2662 * linux-low: Include linux-btrace.h.
2663 (linux_low_enable_btrace): New function.
2664 (linux_low_read_btrace): New function.
2665 (linux_target_ops): Add btrace ops.
2666 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2667 Add srv_linux_btrace=yes.
2668 (x86_64-*-linux*): Add linux-btrace.o.
2669 Add srv_linux_btrace=yes.
2670 * configure.ac: Define HAVE_LINUX_BTRACE.
2671 * config.in: Regenerated.
2672 * configure: Regenerated.
2674 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2676 * server.c (handle_qxfer): Preserve error message if -3 is
2678 (qxfer): Document the -3 return value.
2680 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2682 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2683 (linux_btrace_h): New variable.
2684 (linux-btrace.o): New rule.
2686 2013-03-08 Stan Shebs <stan@codesourcery.com>
2687 Hafiz Abid Qadeer <abidh@codesourcery.com>
2689 * tracepoint.c (trace_buffer_size): New global.
2690 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2691 (init_trace_buffer): Change to one-argument function. Allocate
2692 trace buffer memory.
2693 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2694 handle QTBuffer:size packet.
2695 (cmd_bigqtbuffer_size): New function.
2696 (initialize_tracepoint): Call init_trace_buffer with
2697 DEFAULT_TRACE_BUFFER_SIZE.
2698 * server.c (handle_query): Add QTBuffer:size in the
2701 2013-03-07 Yao Qi <yao@codesourcery.com>
2703 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2704 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2706 (cmd_qtsp): Adjust condition. Do post increment.
2707 Set cur_action and cur_step_action back to 0.
2709 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2712 * linux-low.c (linux_write_memory): Return early success if LEN is
2715 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2717 * configure.srv: Add x86_64-*-cygwin* as target.
2719 2013-02-28 Tom Tromey <tromey@redhat.com>
2721 * configure.ac: Invoke AC_SYS_LARGEFILE.
2722 * configure, config.in: Rebuild.
2724 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2726 * win32-low.c: Throughout, fix format strings and casts of
2727 printf-like functions to avoid type related warnings on all
2729 (get_child_debug_event): Print dwDebugEventCode as hex since
2730 that's how it's usually documented.
2732 2013-02-28 Yao Qi <yao@codesourcery.com>
2734 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2737 2013-02-27 Jiong Wang <jiwang@tilera.com>
2739 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2740 (reg-tilegx32.c): New rule.
2741 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2742 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2743 different register info initializer according to elf class.
2744 (init_registers_tilgx32): New function. The tilegx32 register info
2746 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2747 (tile_store_gregset): Likewise.
2749 2013-02-27 Yao Qi <yao@codesourcery.com>
2751 * server.c (process_point_options): Print debug message when
2752 debug_threads is true.
2754 2013-02-26 Yao Qi <yao@codesourcery.com>
2756 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2758 2013-02-19 Pedro Alves <palves@redhat.com>
2759 Kai Tietz <ktietz@redhat.com>
2763 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2764 instead of strtoul to extract address from packet.
2765 (process_serial_event) <'z'>: Likewise.
2767 2013-02-18 Yao Qi <yao@codesourcery.com>
2769 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2771 2013-02-14 Pedro Alves <palves@redhat.com>
2775 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2776 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2778 2013-02-14 Pedro Alves <palves@redhat.com>
2780 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2782 2013-02-14 Pedro Alves <palves@redhat.com>
2784 * tracepoint.c (save_string): Delete.
2785 (add_tracepoint_action): Use savestring instead of save_string.
2787 2013-02-12 Pedro Alves <palves@redhat.com>
2789 * linux-xtensa-low.c: Ditto.
2790 * xtensa-xtregs.c: Ditto.
2792 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2794 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2797 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2799 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2800 aarch64_num_wp_regs and aarch64_num_bp_regs to
2801 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2803 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2805 * linux-aarch64-low.c (ps_get_thread_area): Replace
2806 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2808 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2809 Marcus Shawcroft <marcus.shawcroft@arm.com>
2810 Nigel Stephens <nigel.stephens@arm.com>
2811 Yufeng Zhang <yufeng.zhang@arm.com>
2813 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2814 (aarch64.c, aarch64-without-fpu.c): New targets.
2815 * configure.srv (aarch64*-*-linux*): New.
2816 * linux-aarch64-low.c: New file.
2818 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2820 * linux-low.c (handle_extended_wait, linux_create_inferior)
2821 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2822 (dequeue_one_deferred_signal, linux_resume_one_thread)
2823 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2824 (linux_tracefork_grandchild, linux_test_for_tracefork)
2825 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2826 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2827 where the argument is 0.
2829 2013-01-25 Yao Qi <yao@codesourcery.com>
2831 * event-loop.c: Include "queue.h".
2832 (gdb_event_p): New typedef.
2833 (struct gdb_event) <next_event>: Remove.
2834 (event_queue): Change to QUEUE(gdb_event_p).
2835 (async_queue_event): Remove.
2836 (gdb_event_xfree): New.
2837 (initialize_event_loop): New.
2838 (process_event): Use API from QUEUE.
2839 (wait_for_event): Likewise.
2840 * server.c (main): Call initialize_event_loop.
2841 * server.h (initialize_event_loop): Declare.
2843 2013-01-18 Yao Qi <yao@codesourcery.com>
2845 * ax.h (struct eval_agent_expr_context): New.
2846 (gdb_eval_agent_expr): Update declaration.
2847 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2848 TFRAME. Add new argument CTX.
2849 * server.h (struct eval_agent_expr_context): Declare.
2850 (agent_mem_read, agent_tsv_read): Update declaration.
2851 (agent_mem_read_string): Likewise.
2852 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2853 (add_traceframe_block): Add new argument TPOINT.
2854 Increase TPOINT->traceframe_usage.
2855 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2856 eval_tracepoint_agent_expr.
2857 (condition_true_at_tracepoint): Likewise.
2858 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2859 (agent_mem_read_string, agent_tsv_read): Likewise.
2861 2013-01-16 Yao Qi <yao@codesourcery.com>
2863 * linux-low.c (linux_resume_one_lwp): Don't check
2864 'lwp->bp_reinsert != 0'.
2866 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2867 Pedro Alves <palves@redhat.com>
2869 * lynx-low.c (ptrace_request_to_str): Define a temporary
2870 macro and use it to simplify this function's implementation.
2872 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2874 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2877 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2879 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2881 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2883 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2885 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2887 * lynx-low.c (lynx_resume): Use the resume_info parameter
2888 to determine the ptid for the lynx_ptrace call, unless
2889 it is equal to minus_one_ptid, in which case we use the
2890 ptid of the current_inferior.
2891 (lynx_wait_1): After having received a thread create/exit
2892 event, resume the inferior's execution using the signaling
2893 thread's ptid, rather than the old ptid.
2895 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2897 * lynx-low.c (lynx_resume): Delete variable ret.
2899 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2901 * gdbreplay.c (gdbreplay_version): Update copyright year.
2902 * server.c (gdbserver_version): Likewise.
2904 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2906 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2909 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2911 * lynx-low.c (ptrace_request_to_str): Add handling for
2914 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2916 * lynx-low.c (lynx_attach): Delete variable new_process.
2918 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2920 * lynx-low.c (lynx_create_inferior): Delete variable
2923 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2925 * lynx-low.c (ptrace_request_to_str): Do not handle
2926 PTRACE_GETTHREADLIST if this macro does not exist.
2928 2012-12-15 Yao Qi <yao@codesourcery.com>
2930 * Makefile.in (OBS): Add notif.o.
2931 * notif.c, notif.h: New.
2932 * server.c: Include "notif.h".
2933 (struct vstop_notif) <next>: Remove.
2935 (queue_stop_reply): Update.
2936 (push_event, send_next_stop_reply): Remove.
2937 (discard_queued_stop_replies): Update.
2938 (notif_stop): New variable.
2939 (handle_v_stopped): Remove.
2940 (handle_v_requests): Don't call handle_v_stopped. Call
2941 handle_ack_notif instead.
2942 (queue_stop_reply_callback): Call notif_event_enque instead
2943 of queue_stop_reply.
2944 (handle_status): Don't call send_next_stop_reply, call
2945 notif_write_event instead.
2946 (kill_inferior_callback): Likewise.
2947 (detach_or_kill_inferior_callback): Likewise.
2948 (main): Call initialize_notif.
2949 (process_serial_event): Call QUEUE_is_empty.
2950 (handle_target_event): Call notif_push instead of push event.
2951 * server.h (push_event): Remove declaration.
2953 2012-12-10 Tom Tromey <tromey@redhat.com>
2955 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2956 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2959 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2960 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2961 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2962 (amd64-linux-ipa.o, ax.o): Rewrite.
2963 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2964 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2965 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2966 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2967 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2968 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2969 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2970 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2971 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2972 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2973 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2974 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2975 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2976 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2977 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2978 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2979 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2980 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2981 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2982 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2983 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2984 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2985 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2986 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2987 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2988 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2989 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2990 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2991 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2992 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2993 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2994 (reg-tilegx.o): Remove.
2995 (all_object_files): New macro.
2996 Include .deps files.
2997 * aclocal.m4, configure: Rebuild.
2998 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2999 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3000 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3002 2012-12-05 Tom Tromey <tromey@redhat.com>
3005 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3007 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3009 * configure.ac: Check for linux/perf_event.h.
3010 * config.in: Regenerated.
3011 * configure: Regenerated.
3013 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3015 * hostio.c (handle_readlink): Decrease buffer size
3016 parameter passed to readlink by one byte.
3018 2012-11-26 Yao Qi <yao@codesourcery.com>
3020 * configure.ac (build_warnings): Append '-Wempty-body'.
3021 * configure: Regenerated.
3022 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3025 2012-11-15 Pierre Muller <muller@sourceware.org>
3027 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3028 * config.in: Regenerate.
3029 * configure: Regenerate.
3030 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3031 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3032 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3033 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3035 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3036 instead of <sys/wait.h> header.
3037 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3039 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3041 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3042 (various make rules): Remove -DGDBSERVER
3044 2012-11-09 Yao Qi <yao@codesourcery.com>
3046 * spu-low.c (current_ptid): Move it to ..
3047 * gdbthread.h: ... here. New.
3048 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3049 * server.c (myresume, process_serial_event): Likewise.
3050 * thread-db.c (thread_db_find_new_threads): Likewise.
3051 * tracepoint.c (run_inferior_command): Likewise.
3053 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3055 * server.c (handle_search_memory_1): Include access length in
3058 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3060 * linux-crisv32-low.c: Fix compile errors.
3062 2012-09-04 Yao Qi <yao@codesourcery.com>
3064 * tracepoint.c (cmd_qtsv): Adjust debug message.
3065 Don't check CUR_TPOINT.
3067 2012-08-28 Yao Qi <yao@codesourcery.com>
3069 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3070 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3071 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3072 Remove declarations of xmalloc, xreallloc, xstrdup and
3074 * Makefile.in (libiberty_h): New.
3075 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3076 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3078 2012-08-23 Yao Qi <yao@codesourcery.com>
3080 * server.h: Remove declaration of 'xsnprintf'.
3082 2012-08-22 Keith Seitz <keiths@redhat.com>
3084 * server.h: Include build-gnulib-gbserver/config.h.
3085 * gdbreplay.c: Likewise.
3087 2012-08-08 Doug Evans <dje@google.com>
3089 * Makefile.in (SFILES): Add gdb_vecs.c.
3090 (OBS): Add gdb_vecs.o.
3091 (gdb_vecs_h, host_defs_h): New variables.
3092 (thread-db.o): Add $(gdb_vecs_h) dependency.
3093 (gdb_vecs.o): New rule.
3094 * thread-db.c: #include "gdb_vecs.h".
3095 (thread_db_load_search): Use a vector to iterate over path elements.
3096 Handle text appearing after "$pdir".
3098 * configure.ac: Add check for strstr.
3099 * config.in: Regenerate.
3100 * configure: Regenerate.
3102 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3104 * hostio.c (handle_pread): If pread fails, fall back to attempting
3106 (handle_pwrite): Likewise for pwrite.
3108 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3110 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3111 between unsupported TYPE and unimplementable ADDR/LEN combination.
3112 (arm_insert_point): Act on new return value.
3114 2012-07-31 Pedro Alves <palves@redhat.com>
3116 * server.c (process_point_options): Only skip tokens if we find
3117 one that is unrecognized. Don't treat 'X' specially while
3118 skipping unrecognized tokens.
3120 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3122 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3123 to 4-byte-align HW breakpoint addresses for Thumb.
3125 2012-07-27 Yao Qi <yao@codesourcery.com>
3129 * server.h: Declare gdb_agent_about_to_close.
3130 * target.c (kill_inferior): Include "agent.h".
3131 New. Send command 'kill'.
3132 * target.h (kill_inferior): Removed macro.
3133 * tracepoint.c (gdb_agent_about_to_close): New.
3134 (gdb_agent_helper_thread): Handle command 'close'.
3135 Wait endlessly until the inferior stops.
3136 Install gdb_agent_remove_socket to atexit hook.
3137 (agent_socket_name): New static variable.
3138 (gdb_agent_socket_init): Replace local variable 'name' with
3139 'agent_socket_name'.
3140 (gdb_agent_remove_socket): New.
3142 2012-07-27 Yao Qi <yao@codesourcery.com>
3144 * server.c (process_point_options): Stop at 'X' when parsing.
3146 2012-07-19 Michael Eager <eager@eagercon.com>
3148 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3150 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3151 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3152 hardware breakpoint.
3154 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3156 * gdbserver/linux-low.c (initialize_low): Call
3157 linux_ptrace_init_warnings.
3159 2012-07-02 Doug Evans <dje@google.com>
3161 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3164 2012-07-02 Stan Shebs <stan@codesourcery.com>
3166 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3167 (ax.o): Add it to build rule.
3169 (OBS): Add format.o.
3170 (IPA_OBS): Add format.o.
3171 * server.c (handle_query): Claim support for breakpoint commands.
3172 (process_point_options): Add command case.
3173 (process_serial_event): Leave running if there are printfs in
3175 * mem-break.h (any_persistent_commands): Declare.
3176 (add_breakpoint_commands): Declare.
3177 (gdb_no_commands_at_breakpoint): Declare.
3178 (run_breakpoint_commands): Declare.
3179 * mem-break.c (struct point_command_list): New struct.
3180 (struct breakpoint): New field command_list.
3181 (any_persistent_commands): New function.
3182 (add_commands_to_breakpoint): New function.
3183 (add_breakpoint_commands): New function.
3184 (gdb_no_commands_at_breakpoint): New function.
3185 (run_breakpoint_commands): New function.
3186 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3188 * ax.c: Include format.h.
3189 (ax_printf): New function.
3190 (gdb_eval_agent_expr): Add printf opcode.
3192 2012-06-13 Yao Qi <yao@codesourcery.com>
3194 * server.c (start_inferior): Remove duplicated writes to fields
3195 'last_resume_kind' and 'last_status' of 'current_inferior'.
3197 2012-06-12 Yao Qi <yao@codesourcery.com>
3198 Pedro Alves <palves@redhat.com>
3200 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3202 * server.c (handle_v_cont): Extend comment.
3204 2012-06-11 Yao Qi <yao@codesourcery.com>
3206 * linux-low.c (linux_attach): Add 'static'.
3208 2012-06-06 Yao Qi <yao@codesourcery.com>
3210 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3212 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3214 Fix gcc -flto compilation warning.
3215 * server.c (main): Make variable multi_mode and attach volatile.
3217 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3219 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3220 if the platform doesn't know about it.
3222 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3224 * Makefile.in (SFILES): Add linux-tile-low.c.
3225 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3226 * configure.srv: Handle tilegx-*-linux*.
3227 * linux-tile-low.c: New file.
3229 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3231 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3233 2012-05-24 Pedro Alves <palves@redhat.com>
3237 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3239 2012-05-24 Pedro Alves <palves@redhat.com>
3243 Replace target_signal with gdb_signal throughout.
3245 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3247 * linux-low.c (linux_store_registers): Avoid the copying sequence
3248 when no data has been retrieved by ptrace.
3250 2012-05-22 Will Deacon <will.deacon@arm.com>
3252 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3253 Include asm/ptrace.h.
3254 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3257 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3259 * linux-low.c (linux_store_registers): Don't re-retrieve data
3260 with ptrace that has already been obtained from /proc. Always
3261 copy any data retrieved with ptrace to the buffer supplied.
3263 2012-05-11 Yao Qi <yao@codesourcery.com>
3264 Pedro Alves <palves@redhat.com>
3266 * linux-low.c (enum stopping_threads_kind): New.
3267 (stopping_threads): Change type to `enum stopping_threads_kind'.
3268 (handle_extended_wait): If stopping and suspending threads, leave
3269 the new_lwp suspended too.
3270 (linux_wait_for_event): Adjust.
3271 (stop_all_lwps): Set `stopping_threads' to
3272 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3273 whether we're suspending threads or just stopping them. Assert no
3276 2012-04-29 Yao Qi <yao@codesourcery.com>
3278 * server.h: Move some code to ...
3279 * gdbthread.h: ... here. New.
3280 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3281 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3282 (nto-low.o, win32-low.o): Likewise.
3283 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3284 * regcache.c, remote-utils.c, server.c: Likewise.
3285 * target.c, tracepoint.c, win32-low.c: Likewise.
3287 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3289 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3290 (PTRACE_ARG4_TYPE): Likewise.
3291 (PTRACE_XFER_TYPE): Likewise.
3292 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3293 ptrace to PTRACE_ARG3_TYPE.
3294 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3295 (PTRACE_ARG4_TYPE): Likewise.
3296 (PTRACE_XFER_TYPE): Likewise.
3297 (linux_detach_one_lwp): Cast fourth argument of
3298 ptrace to long then PTRACE_ARG4_TYPE.
3299 (regsets_fetch_inferior_registers): Cast third argument of
3300 ptrace to long then PTRACE_ARG3_TYPE.
3301 (regsets_store_inferior_registers): Likewise.
3303 2012-04-20 Pedro Alves <palves@redhat.com>
3305 * configure: Regenerate.
3307 2012-04-19 Pedro Alves <palves@redhat.com>
3309 * Makefile.in (GNULIB_BUILDDIR): New.
3310 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3311 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3312 (all, install-only, uninstall, clean-info, all-lib, clean): No
3313 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3314 (maintainer-clean realclean distclean): Use subdir_do.
3316 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3317 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3318 * acinclude.m4: Include acx_configure_dir.m4.
3319 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3320 calls. Call AC_PROG_RANLIB. Configure gnulib using
3323 (GNULIB_STDINT_H): Adjust.
3324 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3325 * gdbreplay.c: Include build-gnulib/config.h.
3326 * server.h: Likewise.
3327 * aclocal.m4: Regenerate.
3328 * config.in: Regenerate.
3329 * configure: Regenerate.
3331 2012-04-19 Pedro Alves <palves@redhat.com>
3333 * Makefile.in (LIBGNU, INCGNU): Adjust.
3334 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3335 (all, install-only, uninstall, clean-info, all-lib, clean)
3336 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3337 * configure.ac: Adjust AC_OUTPUT output.
3338 * aclocal.m4: Regenerate.
3339 * configure: Regenerate.
3341 2012-04-19 Pedro Alves <palves@redhat.com>
3343 * Makefile.in (generated_files): New.
3344 (server_h): Remove the explicit dependency on config.h, and depend
3345 on $generated_files.
3347 2012-04-19 Pedro Alves <palves@redhat.com>
3349 * Makefile.in (INCGNU): Add -Ignulib.
3351 2012-04-19 Pedro Alves <palves@redhat.com>
3353 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3354 (INCGNU): ... this, and spell out -I here.
3355 (GNULIB_LIB): Rename to ...
3357 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3359 2012-04-19 Pedro Alves <palves@redhat.com>
3361 * config.in: Regenerate.
3363 2012-04-19 Pedro Alves <palves@redhat.com>
3365 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3366 * server.h (memmem): Remove declaration.
3367 * config.in: Regenerate.
3368 * configure: Regenerate.
3370 2012-04-19 Yao Qi <yao@codesourcery.com>
3372 * Makefile.in (SFILES): Add common/vec.c.
3376 2012-04-19 Yao Qi <yao@codesourcery.com>
3378 * remote-utils.c (prepare_resume_reply): Replace with macro
3379 target_core_of_thread.
3380 * server.c (handle_qxfer_threads_proper): Likewise.
3381 * target.h (traget_core_of_thread): New macro.
3383 2012-04-18 Pedro Alves <palves@redhat.com>
3385 * aclocal.m4: Regenerate.
3386 * configure: Regenerate.
3388 2012-04-16 Yao Qi <yao@codesourcery.com>
3390 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3391 duplicated on address.
3393 2012-04-16 Yao Qi <yao@codesourcery.com>
3395 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3396 (struct tracepoint_action_ops) <send>: New field.
3397 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3398 (agent_expr_send, x_tracepoint_action_send): New.
3399 (l_tracepoint_action_send): New.
3400 (cmd_qtdp): Download and install tracepoint
3401 according to `use_agent'.
3402 (run_inferior_command): Add one more parameter `len'.
3404 (tracepoint_send_agent): New.
3405 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3407 2012-04-16 Yao Qi <yao@codesourcery.com>
3409 * tracepoint.c (download_tracepoints): Moved to ...
3410 (cmd_qtstart): ... here.
3412 2012-04-14 Yao Qi <yao@codesourcery.com>
3414 * tracepoint.c: Include inttypes.h.
3415 (struct collect_memory_action): Use sized types.
3416 (struct tracepoint): Likewise.
3417 (cmd_qtdp, stop_tracing): Update print specifiers.
3418 (cmd_qtp, response_tracepoint): Likewise.
3419 (collect_data_at_tracepoint): Likewise.
3420 (collect_data_at_step): Likewise.
3422 2012-04-14 Yao Qi <yao@codesourcery.com>
3424 Import gnulib module inttypes.
3425 * aclocal.m4, config.in, configure: Regenerated.
3427 2012-04-14 Yao Qi <yao@codesourcery.com>
3429 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3430 Makefile and config.status at last.
3432 2012-04-13 Yao Qi <yao@codesourcery.com>
3434 * tracepoint.c: Include stdint.h unconditionally.
3436 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3438 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3439 on BFD_HAVE_SYS_PROCFS_TYPE.
3440 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3441 * configure: Regenerate.
3442 * config.in: Likewise.
3444 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3446 * Makefile.in (clean): Also remove x32.c x32-linux.c
3447 x32-avx.c x32-avx-linux.c.
3448 (x32.o): New target.
3450 (x32-linux.o): Likewise.
3451 (x32-linux.c): Likewise.
3452 (x32-avx.o): Likewise.
3453 (x32-avx.c): Likewise.
3454 (x32-avx-linux.o): Likewise.
3455 (x32-avx-linux.c): Likewise.
3457 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3458 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3459 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3460 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3461 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3462 i386/x32-avx-linux.xml.
3464 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3465 (init_registers_x32_avx_linux): Likwise.
3466 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3467 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3469 2012-04-13 Pedro Alves <palves@redhat.com>
3471 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3472 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3473 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3474 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3477 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3479 * linux-x86-low.c (compat_x32_clock_t): New.
3480 (compat_x32_siginfo_t): Likewise.
3481 (compat_x32_siginfo_from_siginfo): Likewise.
3482 (siginfo_from_compat_x32_siginfo): Likewise.
3483 (linux_is_elf64): Likewise.
3484 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3485 and siginfo_from_compat_x32_siginfo for x32.
3486 (x86_arch_setup): Set linux_is_elf64.
3488 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3491 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3493 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3494 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3495 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3496 compatible with process.
3498 2012-04-12 Yao Qi <yao@codesourcery.com>
3500 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3501 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3502 (install-only, install-info, clean): Handle sub dir gnulib.
3503 (all-lib, am--refresh): New targets.
3504 (memmem.o): Remove target.
3505 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3506 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3507 (AC_REPLACE_FUNCS): Remove memmem.
3508 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3509 (AC_OUTPUT): Generate Makefile in gnulib/.
3510 * aclocal.m4, config.in, configure: Regenerated.
3512 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3514 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3516 2012-04-05 Pedro Alves <palves@redhat.com>
3518 -Werror=strict-aliasing
3520 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3523 2012-04-04 Pedro Alves <palves@redhat.com>
3525 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3526 (sparc_store_gregset_from_stack, sparc_store_gregset)
3527 (sparc_breakpoint_at): Fix formatting.
3529 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3531 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3533 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3534 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3535 * config.in: Regenerate.
3536 * configure: Likewise.
3538 2012-03-29 Pedro Alves <palves@redhat.com>
3540 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3541 Correct ptrace arguments.
3543 2012-03-28 Pedro Alves <palves@redhat.com>
3545 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3546 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3547 (IA64_FR1_REGNUM): New defines.
3548 (ia64_fetch_register): New.
3549 (the_low_target): Install it.
3550 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3552 * linux-low.c (linux_fetch_registers): Try the
3553 the_low_target.fetch_register hook first.
3555 * linux-arm-low.c (the_low_target): Adjust.
3556 * linux-bfin-low.c (the_low_target): Adjust.
3557 * linux-cris-low.c (the_low_target): Adjust.
3558 * linux-crisv32-low.c (the_low_target): Adjust.
3559 * linux-m32r-low.c (the_low_target): Adjust.
3560 * linux-m68k-low.c (the_low_target): Adjust.
3561 * linux-mips-low.c (the_low_target): Adjust.
3562 * linux-ppc-low.c (the_low_target): Adjust.
3563 * linux-s390-low.c (the_low_target): Adjust.
3564 * linux-sh-low.c (the_low_target): Adjust.
3565 * linux-sparc-low.c (the_low_target): Adjust.
3566 * linux-tic6x-low.c (the_low_target): Adjust.
3567 * linux-x86-low.c (the_low_target): Adjust.
3568 * linux-xtensa-low.c (the_low_target): Adjust.
3570 2012-03-26 Pedro Alves <palves@redhat.com>
3572 * server.c (handle_qxfer_libraries): Don't bail early if
3573 the_target->qxfer_libraries_svr4 is not NULL.
3575 2012-03-26 Pedro Alves <palves@redhat.com>
3577 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3579 2012-03-23 Pedro Alves <palves@redhat.com>
3581 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3582 "library-list-svr4" element's start tag when the the DSO list is
3585 2012-03-23 Pedro Alves <palves@redhat.com>
3587 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3588 a variable whose type size is the same as the inferior's pointer
3591 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3593 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3595 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3596 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3597 * linux-low.h: Include <signal.h>.
3598 (struct siginfo): Remove forward declaration.
3599 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3602 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3604 * .gitignore: Ignore more files.
3606 2012-03-19 Pedro Alves <palves@redhat.com>
3607 Jan Kratochvil <jan.kratochvil@redhat.com>
3609 * server.c (cont_thread, general_thread): Add describing comments.
3610 (start_inferior): Clear `cont_thread'.
3611 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3614 2012-03-15 Yao Qi <yao@codesourcery.com>
3616 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3618 (cmd_qtdp): ... here.
3620 2012-03-15 Yao Qi <yao@codesourcery.com>
3622 * tracepoint.c (struct tracepoint_action_ops): New.
3623 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3624 (m_tracepoint_action_download): New.
3625 (r_tracepoint_action_download): New.
3626 (x_tracepoint_action_download): New.
3627 (l_tracepoint_action_download): New.
3628 (add_tracepoint_action): Install `action->ops' according type.
3629 (download_tracepoint_1): Move code `download' function pointer
3630 of various tracepoint_action_ops.
3632 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3634 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3635 linux_ptrace_attach_warnings.
3637 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3639 * Makefile.in (linux-ptrace.o): New.
3640 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3641 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3642 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3643 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3644 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3646 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3648 2012-03-08 Yao Qi <yao@codesourcery.com>
3649 Pedro Alves <palves@redhat.com>
3651 Fix PR server/13392.
3652 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3654 * tracepoint.c (remove_tracepoint): New.
3655 (cmd_qtdp): Call remove_tracepoint when failed to install.
3657 2012-03-07 Pedro Alves <palves@redhat.com>
3659 * linux-low.c (get_detach_signal): New.
3660 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3661 Pass on pending signals to PTRACE_DETACH. Check the result of the
3663 * server.c (program_signals, program_signals_p): New.
3664 (handle_general_set): Handle QProgramSignals.
3665 * server.h (program_signals, program_signals_p): Declare.
3667 2012-03-05 Pedro Alves <palves@redhat.com>
3668 Jan Kratochvil <jan.kratochvil@redhat.com>
3670 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3673 2012-03-03 Yao Qi <yao@codesourcery.com>
3675 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3676 agent_look_up_symbols.
3678 2012-03-03 Yao Qi <yao@codesourcery.com>
3680 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3681 (linux-x86-low.o): Likewise.
3682 * server.h: Remove in_process_agent_loaded.
3683 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3687 2012-03-03 Yao Qi <yao@codesourcery.com>
3689 * tracepoint.c (gdb_agent_capability): New global.
3690 (in_process_agent_loaded_ust): Renamed to
3691 `in_process_agent_supports_ust'.
3693 (in_process_agent_supports_ust): Call agent_capability_check.
3694 (clear_installed_tracepoints): Assert that agent supports
3697 2012-03-03 Yao Qi <yao@codesourcery.com>
3699 * linux-low.c (linux_supports_agent): New.
3700 (linux_target_ops): Initialize field `supports_agent' with
3701 linux_supports_agent.
3702 * target.h (struct target_ops) <supports_agent>: New.
3703 (target_supports_agent): New macro.
3704 * server.c (handle_general_set): Handle packet 'QAgent'.
3705 (handle_query): Send `QAgent+'.
3706 * Makefile.in (server.o): Depends on agent.h.
3708 2012-03-03 Yao Qi <yao@codesourcery.com>
3710 * Makefile.in (OBS): Add agent.o.
3711 Add new rule for agent.o.
3712 Track dependence of tracepoint.c on agent.h.
3713 * tracepoint.c (run_inferior_command_1):
3714 (run_inferior_command): Call agent_run_command.
3715 (gdb_ust_connect_sync_socket): Deleted. Move it to
3717 (resume_thread, stop_thread): Likewise.
3718 (gdb_ust_socket_init): Renamed to ...
3719 (gdb_agent_socket_init): ... New.
3720 (gdb_ust_thread): Renamed to ...
3721 (gdb_agent_helper_thread): ... New.
3722 (gdb_ust_init): Move some code to ...
3723 (gdb_agent_init): ... here. New.
3724 [HAVE_UST]: Call gdb_ust_init.
3725 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3726 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3727 * config.in, configure: Regenerated.
3729 2012-03-02 Pedro Alves <palves@redhat.com>
3731 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3732 * linux-low.c (struct simple_pid_list): New.
3733 (stopped_pids): New a struct simple_pid_list pointer.
3734 (add_to_pid_list, pull_pid_from_list): New.
3735 (handle_extended_wait): Don't assume the first signal new children
3736 report is SIGSTOP. Adjust call to pull_pid_from_list.
3737 (linux_wait_for_lwp): Adjust.
3739 2012-03-02 Yao Qi <yao@codesourcery.com>
3741 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3744 2012-03-02 Yao Qi <yao@codesourcery.com>
3746 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3747 `stop_pc' and `tpoint'. Update caller.
3749 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3751 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3752 * linux-low.c (use_linux_regsets): New macro.
3753 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3754 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3755 (linux_register_in_regsets): New function.
3756 (usr_fetch_inferior_registers): Skip registers covered by
3758 (usr_store_inferior_registers): Likewise.
3759 (usr_fetch_inferior_registers): New macro.
3760 (usr_store_inferior_registers): Likewise.
3761 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3762 (linux_store_registers): Likewise.
3763 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3765 (init_registers_mips64_dsp_linux): Likewise.
3766 (init_registers_mips_linux): New macro.
3767 (init_registers_mips_dsp_linux): Likewise.
3768 (mips_dsp_num_regs): Likewise.
3769 (DSP_BASE, DSP_CONTROL): New fallback macros.
3770 (mips_base_regs): New macro.
3771 (mips_regmap): Use it. Fix the size.
3772 (mips_dsp_regmap): New variable.
3773 (mips_dsp_regset_bitmap): Likewise.
3774 (mips_arch_setup): New function.
3775 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3777 (mips_cannot_store_register): Likewise.
3778 (the_low_target): Update .arch_setup, .num_regs and .regmap
3779 initializers. Add .regset_bitmap initializer.
3780 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3782 * linux-bfin-low.c (the_low_target): Likewise.
3783 * linux-cris-low.c (the_low_target): Likewise.
3784 * linux-crisv32-low.c (the_low_target): Likewise.
3785 * linux-ia64-low.c (the_low_target): Likewise.
3786 * linux-m32r-low.c (the_low_target): Likewise.
3787 * linux-m68k-low.c (the_low_target): Likewise.
3788 * linux-ppc-low.c (the_low_target): Likewise.
3789 * linux-s390-low.c (the_low_target): Likewise.
3790 * linux-sh-low.c (the_low_target): Likewise.
3791 * linux-sparc-low.c (the_low_target): Likewise.
3792 * linux-tic6x-low.c (the_low_target): Likewise.
3793 * linux-x86-low.c (the_low_target): Likewise.
3794 * linux-xtensa-low.c (the_low_target): Likewise.
3795 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3796 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3797 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3799 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3800 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3802 2012-02-29 Yao Qi <yao@codesourcery.com>
3803 Pedro Alves <palves@redhat.com>
3805 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3806 `step_over_finished' is true.
3808 2012-02-27 Pedro Alves <palves@redhat.com>
3810 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3811 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3813 2012-02-27 Pedro Alves <palves@redhat.com>
3816 * linux-low.c (pid_is_stopped): New.
3817 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3819 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3821 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3824 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3826 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3828 2012-02-24 Luis Machado <lgustavo@codesourcery>
3830 * server.c (handle_query): Advertise support for target-side
3831 breakpoint condition evaluation.
3832 (process_point_options): New function.
3833 (process_serial_event): When inserting a breakpoint, check for
3834 a target-side condition that should be evaluated.
3836 * mem-break.c: Include regcache.h and ax.h.
3837 (point_cond_list_t): New data structure.
3838 (breakpoint) <cond_list>: New field.
3839 (find_gdb_breakpoint_at): Make non-static.
3840 (delete_gdb_breakpoint_at): Clear any target-side
3842 (clear_gdb_breakpoint_conditions): New function.
3843 (add_condition_to_breakpoint): Likewise.
3844 (add_breakpoint_condition): Likewise.
3845 (gdb_condition_true_at_breakpoint): Likewise.
3846 (gdb_breakpoint_here): Return result directly instead
3847 of going through a local variable.
3849 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3850 (clear_gdb_breakpoint_conditions): Likewise.
3851 (add_breakpoint_condition): Likewise.
3852 (gdb_condition_true_at_breakpoint): Likewise.
3854 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3855 (need_step_over_p): Take target-side breakpoint condition into
3858 2012-02-24 Luis Machado <lgustavo@codesourcery>
3860 * server.h: Include tracepoint.h.
3861 (agent_mem_read, agent_get_trace_state_variable_value,
3862 agent_set_trace_state_variable_value,
3863 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3864 get_set_tsv_func_addr): New prototypes.
3866 * ax.h: New include file.
3867 * ax.c: New source file.
3869 * tracepoint.c: Include ax.h.
3870 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3871 agent_expr, eval_result_type): Move to ax.h.
3872 (parse_agent_expr): Rename to ...
3873 (gdb_parse_agent_expr): ... this, make it non-static and move
3875 (unparse_agent_expr) Rename to ...
3876 (gdb_unparse_agent_expr): ... this, make it non-static and move
3878 (eval_agent_expr): Rename to ...
3879 (eval_tracepoint_agent_expr): ... this.
3880 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3881 forward declarations.
3882 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3883 (agent_get_trace_state_variable_value): New function.
3884 (agent_set_trace_state_variable_value): New function.
3885 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3886 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3887 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3888 (condition_true_at_tracepoint): Likewise.
3889 (parse_agent_expr): Rename to ...
3890 (gdb_parse_agent_expr): ... this and move to ax.c.
3891 (unparse_agent_expr): Rename to ...
3892 (gdb_unparse_agent_expr): ... this and move to ax.c.
3893 (gdb_agent_op_name): Move to ax.c.
3894 (eval_agent_expr): Rename to ...
3895 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3897 (eval_tracepoint_agent_expr): New function.
3898 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3900 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3902 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3903 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3904 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3905 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3906 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3907 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3908 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3909 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3910 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3911 (compile_bytecodes): Remove forward declaration.
3912 (is_goto_target): Move to ax.c.
3913 (compile_bytecodes): Move to ax.c and call
3914 agent_get_trace_state_variable_value (...) and
3915 agent_set_trace_state_variable_value (...).
3917 * Makefile.in: Update ax.c and IPA dependencies.
3919 2012-02-24 Pedro Alves <palves@redhat.com>
3921 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3922 (cmd_bigqtbuffer_circular): ... this. Only handle
3923 'QTBuffer:circular:'.
3924 (handle_tracepoint_general_set): Adjust.
3926 2012-02-16 Yao Qi <yao@codesourcery.com>
3928 * inferiors.c: Move code to ...
3929 * dll.c: .... here. New.
3930 * server.h: Declare clear_dlls.
3931 * Makefile.in (SFILES): Add dll.c.
3935 2012-02-11 Yao Qi <yao@codesourcery.com>
3937 * server.c: (handle_monitor_command): Add a new parameter
3939 (handle_query): Update caller.
3941 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3943 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3944 * configure, config.in: Regenerate.
3945 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3948 2012-02-02 Pedro Alves <palves@redhat.com>
3950 Try SIGKILL first, then PTRACE_KILL.
3951 * linux-low.c (linux_kill_one_lwp): New.
3952 (linux_kill_one_lwp): Rename to ...
3953 (kill_one_lwp_callback): ... this. Use the new
3956 2012-02-02 Pedro Alves <palves@redhat.com>
3958 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3961 2012-01-27 Pedro Alves <palves@redhat.com>
3963 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3964 (elf_64_file_p): Make static.
3965 (linux_pid_exe_is_elf_64_file): New.
3966 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3967 Delete declarations.
3968 (linux_pid_exe_is_elf_64_file): Declare.
3969 * linux-x86-low.c (x86_arch_setup): Use
3970 linux_pid_exe_is_elf_64_file.
3972 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3974 * linux-low.c (linux_wait_for_event_1): Rename to ...
3975 (linux_wait_for_event): ... here and merge it with former
3976 linux_wait_for_event - new variable wait_ptid, use it.
3977 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3979 2012-01-23 Pedro Alves <palves@redhat.com>
3981 * server.c (main): Avoid yet another case of infinite loop while
3982 detaching/killing after a longjmp.
3984 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3987 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3989 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3991 * hostio.c (handle_readlink): New function.
3992 (handle_vFile): Call it to handle "vFile:readlink" packets.
3994 2012-01-20 Pedro Alves <palves@redhat.com>
3995 Ulrich Weigand <ulrich.weigand@linaro.org>
3997 * server.c (handle_v_requests): Only support vAttach and vRun to
3998 start multiple processes when in extended protocol mode.
4000 2012-01-17 Pedro Alves <palves@redhat.com>
4002 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4003 memalign plus mprotect to allocate the scratch buffer.
4005 2012-01-13 Pedro Alves <palves@redhat.com>
4007 * server.c (attach_inferior): Clear `cont_thread'.
4009 2012-01-13 Pedro Alves <palves@redhat.com>
4011 * server.c (main): Avoid infinite loop while detaching/killing
4014 2012-01-09 Doug Evans <dje@google.com>
4016 * server.c (start_inferior): Set last_ptid in --wrapper case.
4018 2012-01-06 Yao Qi <yao@codesourcery.com>
4020 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4022 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4024 2012-01-04 Yao Qi <yao@codesourcery.com>
4026 * tracepoint.c (cmd_qtdp): Print debug message
4027 for static tracepoint.
4029 2012-01-04 Yao Qi <yao@codesourcery.com>
4031 * tracepoint.c (trace_vdebug): Differentiate debug message
4032 between gdbserver and IPA.
4034 2012-01-03 Yao Qi <yao@codesourcery.com>
4036 * tracepoint.c (tracepoint_was_hit): Don't collect for
4039 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4041 * terminal.h: Reformat copyright header.
4043 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4045 * server.c (gdbserver_version): Update copyright year.
4046 * gdbreplay.c (gdbreplay_version): Likewise.
4048 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4050 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4053 2011-12-18 Hui Zhu <teawater@gmail.com>
4054 * linux-low.c (linux_create_inferior): Save return value to ret.
4056 2011-12-18 Hui Zhu <teawater@gmail.com>
4058 * linux-low.c (linux_create_inferior): Save return value to ret.
4060 2011-12-16 Doug Evans <dje@google.com>
4062 * linux-low.c (linux_create_inferior): If stdio connection,
4063 redirect stdin from /dev/null, stdout to stderr.
4064 * remote-utils.c (remote_is_stdio): New static global.
4065 (remote_connection_is_stdio): New function.
4066 (remote_prepare): Handle stdio connection.
4067 (remote_open): Ditto.
4068 (remote_close): Don't close stdin for stdio connections.
4069 (read_prim,write_prim): New functions. Replace all calls to
4070 read/write to these.
4071 * server.c (main): Watch for "-" argument. Move call to
4072 remote_prepare before start_inferior.
4073 * server.h (STDIO_CONNECTION_NAME): New macro.
4074 (remote_connection_is_stdio): Declare.
4076 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4077 in debugging output.
4079 2011-12-15 Yao Qi <yao@codesourcery.com>
4081 * tracepoint.c: Include sys/syscall.h.
4082 (gdb_ust_thread): Remove preprocessor conditional.
4084 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4086 * linux-low.c (linux_detach_one_lwp): Call
4087 the_low_target.prepare_to_resume before detaching.
4089 2011-12-14 Yao Qi <yao@codesourcery.com>
4091 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4094 2011-12-14 Yao Qi <yao@codesourcery.com>
4096 * i386-low.c (i386_low_stopped_data_address): Initialize local
4099 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4103 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4104 DR_CONTROL unless necessary. Extend comments.
4105 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4106 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4108 2011-12-13 Yao Qi <yao@codesourcery.com>
4110 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4112 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4114 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4116 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4117 Print new debug message for such case.
4119 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4121 Fix overlapping memcpy.
4122 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4123 the read_inferior_memory transfer.
4124 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4125 write_inferior_memory transfer.
4126 (set_fast_tracepoint_jump): New variable buf. Use it for the
4127 read_inferior_memory and write_inferior_memory transfers.
4128 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4129 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4130 Use it for the write_inferior_memory transfer.
4131 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4134 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4136 * linux-low.c (fetch_register, store_register): Make code
4137 consistent, fix formatting.
4139 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4141 * linux-low.c (usr_store_inferior_registers): Factor out code
4142 to handle individual registers into...
4143 (store_register): ... this new function.
4145 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4147 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4148 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4149 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4150 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4151 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4152 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4153 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4154 (srv_xmlfiles): Add new XML files.
4156 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4158 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4159 (init_registers_s390_linux32v1): Add prototype.
4160 (init_registers_s390_linux32v2): Likewise.
4161 (init_registers_s390_linux64v1): Likewise.
4162 (init_registers_s390_linux64v2): Likewise.
4163 (init_registers_s390x_linux64v1): Likewise.
4164 (init_registers_s390x_linux64v2): Likewise.
4165 (s390_num_regs): Increment to 52.
4166 (s390_regmap): Add orig_r2 register.
4167 (s390_num_regs_3264): Increment to 68.
4168 (s390_regmap_3264): Add orig_r2 register.
4169 (s390_collect_ptrace_register): Handle orig_r2 register.
4170 (s390_supply_ptrace_register): Likewise.
4171 (s390_fill_last_break): New function.
4172 (s390_store_last_break): Likewise.
4173 (s390_fill_system_call): New function.
4174 (s390_store_system_call): Likewise.
4175 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4177 (s390_check_regset): New function.
4178 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4179 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4180 Update target_regsets for available register sets.
4182 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4183 Jan Kratochvil <jan.kratochvil@redhat.com>
4185 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4186 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4188 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4189 * linux-low.h (struct process_info_private): New member r_debug.
4190 * server.c (handle_qxfer_libraries): Call
4191 the_target->qxfer_libraries_svr4.
4192 (handle_qxfer_libraries_svr4): New function.
4193 (qxfer_packets): New entry "libraries-svr4".
4194 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4195 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4196 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4197 PACKET_qXfer_libraries_svr4.
4199 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4201 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4202 PSW address/mask between 8-byte and 16-byte formats.
4203 (s390_supply_ptrace_register): Likewise.
4204 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4205 basic addressing mode bit.
4207 2011-11-24 Stan Shebs <stan@codesourcery.com>
4209 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4211 2011-11-17 Stan Shebs <stan@codesourcery.com>
4213 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4214 (tracing_start_time): New global.
4215 (tracing_stop_time): New global.
4216 (tracing_user_name): New global.
4217 (tracing_notes): New global.
4218 (tracing_stop_note): New global.
4219 (cmd_qtstart): Set traceframe_usage, start_time.
4220 (stop_tracing): Set stop_time.
4221 (cmd_qtstatus): Report additional status.
4222 (cmd_qtp): New function.
4223 (handle_tracepoint_query): Call it.
4224 (cmd_qtnotes): New function.
4225 (handle_tracepoint_general_set): Call it.
4226 (get_timestamp): Rename from tsv_get_timestamp.
4228 2011-11-14 Stan Shebs <stan@codesourcery.com>
4229 Kwok Cheung Yeung <kcy@codesourcery.com>
4231 * linux-x86-low.c (small_jump_insn): New.
4232 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4233 trampoline and error message, build a trampoline and issue a small
4234 jump instruction to it.
4235 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4236 trampoline and error message.
4237 (x86_get_min_fast_tracepoint_insn_len): New.
4238 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4239 * linux-low.h (struct linux_target_ops): Add arguments to
4240 install_fast_tracepoint_jump_pad operation, add new operation.
4241 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4243 (linux_get_min_fast_tracepoint_insn_len): New function.
4244 (linux_target_op): Add new operation.
4245 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4246 (gdb_trampoline_buffer_end): Ditto.
4247 (gdb_trampoline_buffer_error): Ditto.
4248 (struct ipa_sym_addresses): Add fields for new IPA variables.
4249 (symbol_list): Add entries for new IPA variables.
4250 (struct tracepoint): Add fields to hold the address range of the
4251 trampoline used by the tracepoint.
4252 (trampoline_buffer_head): New static variable.
4253 (trampoline_buffer_tail): Ditto.
4254 (claim_trampoline_space): New function.
4255 (have_fast_tracepoint_trampoline_buffer): New function.
4256 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4258 (install_fast_tracepoint): Ditto, also add error buffer argument.
4259 (cmd_qtminftpilen): New function.
4260 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4261 (fast_tracepoint_from_trampoline_address): New function.
4262 (fast_tracepoint_collecting): Handle trampoline as part of jump
4264 (set_trampoline_buffer_space): New function.
4265 (initialize_tracepoint): Initialize new IPA variables.
4266 * target.h (struct target_ops): Add arguments to
4267 install_fast_tracepoint_jump_pad operation, add new
4268 get_min_fast_tracepoint_insn_len operation.
4269 (target_get_min_fast_tracepoint_insn_len): New.
4270 (install_fast_tracepoint_jump_pad): Add arguments.
4271 * server.h (IPA_BUFSIZ): Define.
4272 * linux-i386-ipa.c: Include extra header files.
4273 (initialize_fast_tracepoint_trampoline_buffer): New function.
4274 (initialize_low_tracepoint): Call it.
4275 * server.h (set_trampoline_buffer_space): Declare.
4276 (claim_trampoline_space): Ditto.
4277 (have_fast_tracepoint_trampoline_buffer): Ditto.
4279 2011-11-14 Yao Qi <yao@codesourcery.com>
4281 * server.c (handle_query): Handle InstallInTrace for qSupported.
4282 * tracepoint.c (add_tracepoint): Sort list.
4283 (install_tracepoint, download_tracepoint): New.
4284 (cmd_qtdp): Call them to install and download tracepoints.
4285 (sort_tracepoints): Removed.
4286 (cmd_qtstart): Update.
4288 2011-11-14 Yao Qi <yao@codesourcery.com>
4290 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4291 * mem-break.h: Declare.
4292 * tracepoint.c (cmd_qtstart): Move some code to ...
4293 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4295 (download_tracepoints): Move some code to ...
4296 (download_tracepoint_1): ... here. New.
4298 2011-11-08 Yao Qi <yao@codesourcery.com>
4300 * remote-utils.c (relocate_instruction): A comment fix.
4302 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4304 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4305 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4306 dr_status_mirror and dr_control_mirror from debug_reg_state.
4307 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4308 (i386_initial_stuff): Remove use of deleted globals.
4309 (i386_get_thread_context, i386_set_thread_context,
4310 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4311 from debug_reg_state.
4313 2011-11-05 Yao Qi <yao@codesourcery.com>
4315 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4316 address as TPOINT's.
4318 2011-11-02 Stan Shebs <stan@codesourcery.com>
4320 * tracepoint.c (agent_mem_read_string): New function.
4321 (eval_agent_expr): Call it for tracenz.
4322 * server.c (handle_query): Report support for tracenz.
4324 2011-11-02 Yao Qi <yao@codesourcery.com>
4326 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4328 2011-11-02 Yao Qi <yao@codesourcery.com>
4330 * target.h: Fix a typo in comment.
4332 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4334 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4335 clobber the breakpoints' shadows with fast tracepoint jumps.
4336 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4337 * target.c (write_inferior_memory): Also pass MYADDR down to
4340 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4342 * configure.ac: Check support for personality routine.
4343 * configure: Regenerate.
4344 * config.in: Likewise.
4345 * linux-low.c: Include <sys/personality.h>.
4346 Define ADDR_NO_RANDOMIZE if necessary.
4347 (linux_create_inferior): Disable address space randomization when
4348 forking inferior, if requested.
4349 (linux_supports_disable_randomization): New function.
4350 (linux_target_ops): Install it.
4351 * server.h (disable_randomization): Declare.
4352 * server.c (disable_randomization): New global variable.
4353 (handle_general_set): Handle QDisableRandomization.
4354 (handle_query): Likewise for qSupported.
4355 (main): Support --disable-randomization and --no-disable-randomization
4356 command line arguments.
4357 * target.h (struct target_ops): Add supports_disable_randomization.
4358 (target_supports_disable_randomization): New macro.
4360 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4362 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4364 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4365 [!PT_GETDSBT] (target_loadmap): New definition.
4366 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4367 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4368 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4369 and PT_GETDSBT to LINUX_LOADMAP.
4370 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4371 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4373 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4375 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4376 (arm_linux_hwbp_cap): New static variable.
4377 (arm_linux_get_hwbp_cap): Replace by ...
4378 (arm_linux_init_hwbp_cap): ... this new function.
4379 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4380 (arm_linux_get_hw_watchpoint_count): Likewise.
4381 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4382 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4383 (arm_prepare_to_resume): Use perror_with_name instead of error.
4385 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4387 * linux-arm-low.c: Include <signal.h>.
4388 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4389 (struct arm_linux_hwbp_cap): New data type.
4390 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4391 (struct arm_linux_hw_breakpoint): New data type.
4392 (MAX_BPTS, MAX_WPTS): Define.
4393 (struct arch_process_info, struct arch_lwp_info): New data types.
4394 (arm_linux_get_hwbp_cap): New function.
4395 (arm_linux_get_hw_breakpoint_count): Likewise.
4396 (arm_linux_get_hw_watchpoint_count): Likewise.
4397 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4398 (arm_hwbp_control_initialize): Likewise.
4399 (arm_hwbp_control_is_enabled): Likewise.
4400 (arm_hwbp_control_is_initialized): Likewise.
4401 (arm_hwbp_control_disable): Likewise.
4402 (arm_linux_hw_breakpoint_equal): Likewise.
4403 (arm_linux_hw_point_initialize): Likewise.
4404 (struct update_registers_data): New data structure.
4405 (update_registers_callback: New function.
4406 (arm_insert_point): Likewise.
4407 (arm_remove_point): Likewise.
4408 (arm_stopped_by_watchpoint): Likewise.
4409 (arm_stopped_data_address): Likewise.
4410 (arm_new_process): Likewise.
4411 (arm_new_thread): Likewise.
4412 (arm_prepare_to_resume): Likewise.
4413 (the_low_target): Register arm_insert_point, arm_remove_point,
4414 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4415 arm_new_thread, and arm_prepare_to_resume.
4417 2011-09-15 Stan Shebs <stan@codesourcery.com>
4419 * server.h (struct emit_ops): Add compare-goto fields.
4420 * tracepoint.c (gdb_agent_op_sizes): New table.
4421 (emit_eq_goto): New function.
4422 (emit_ne_goto): New function.
4423 (emit_lt_goto): New function.
4424 (emit_le_goto): New function.
4425 (emit_gt_goto): New function.
4426 (emit_ge_goto): New function.
4427 (is_goto_target): New function.
4428 (compile_bytecodes): Recognize special cases of compare-goto
4429 combinations and call specialized emitters for them.
4430 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4431 (amd64_emit_ne_goto): New function.
4432 (amd64_emit_lt_goto): New function.
4433 (amd64_emit_le_goto): New function.
4434 (amd64_emit_gt_goto): New function.
4435 (amd64_emit_ge_goto): New function.
4436 (amd64_emit_ops): Add the new functions.
4437 (i386_emit_eq_goto): New function.
4438 (i386_emit_ne_goto): New function.
4439 (i386_emit_lt_goto): New function.
4440 (i386_emit_le_goto): New function.
4441 (i386_emit_gt_goto): New function.
4442 (i386_emit_ge_goto): New function.
4443 (i386_emit_ops): Add the new functions.
4445 2011-09-08 Stan Shebs <stan@codesourcery.com>
4447 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4448 (i386_emit_epilogue): Restore %ebx.
4450 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4452 * server.c (step_thread): Remove definition.
4453 (process_serial_event): Don't handle Hs.
4454 * server.h (step_thread): Remove declaration.
4455 * target.c (set_desired_inferior): Remove use of step_thread.
4457 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4459 * linux-low.c: Include linux-procfs.h.
4460 (linux_attach_lwp_1): Update comments.
4461 (linux_attach): Scan for existing threads when attaching to a
4462 process that is the tgid.
4463 * Makefile.in: Update dependencies.
4465 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4467 * configure.srv: Add linux-procfs.o dependencies.
4469 2011-08-14 Yao Qi <yao@codesourcery.com>
4471 * target.h (struct target_ops): Fix indent.
4472 * win32-low.c (win32_target_ops): Fix comment.
4474 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4475 Yao Qi <yao@codesourcery.com>
4477 * Makefile.in (clean): Remove tic6x-*.c files.
4478 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4479 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4480 (tic6x-c64xp-linux.c): Likewise.
4481 * configure.srv: Add support for tic6x-*-uclinux.
4482 * linux-tic6x-low.c: New.
4483 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4485 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4486 Yao Qi <yao@codesourcery.com>
4488 * target.h (struct target_ops): Add read_loadmap.
4489 * linux-low.c (struct target_loadseg): New type.
4490 (struct target_loadmap): New type.
4491 (linux_read_loadmap): New function.
4492 (linux_target_ops): Add linux_read_loadmap.
4493 * server.c (handle_query): Support qXfer:fdpic:read packet.
4494 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4497 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4499 * win32-low.c: Include <stdint.h>.
4501 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4503 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4504 to the inferior here.
4505 (i386_remove_aligned_watchpoint): Ditto.
4506 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4507 fit part of the watchpoint in the debug registers.
4508 (i386_update_inferior_debug_regs): New.
4509 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4510 registers, and only update the inferior on success.
4511 (i386_low_remove_watchpoint): Ditto.
4513 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4515 * linux-low.c (compare_ints, unique, list_threads, show_process,
4516 linux_core_of_thread): Delete.
4517 (linux_target_ops): Change linux_core_of_thread to
4518 linux_common_core_of_thread.
4519 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4520 * utils.c (malloc_failure): Change type of argument.
4521 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4522 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4523 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4524 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4525 (IPA_OBJS): Add common-utils-ipa.o.
4526 (ptid_h, linux_osdata_h): New macros.
4527 (server_h): Add common/common-utils.h, common/xml-utils.h,
4528 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4530 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4531 ptid.o, buffer.o): New rules.
4532 (linux-low.o): Add common/linux-osdata.h as a dependency.
4533 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4534 * configure.ac: Add AC_HEADER_DIRENT check.
4535 * config.in: Regenerate.
4536 * configure: Regenerate.
4537 * remote-utils.c (xml_escape_text): Delete.
4538 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4539 buffer_xml_printf): Move to common/buffer.c.
4540 * server.c (main): Remove call to initialize_inferiors.
4541 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4542 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4543 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4544 internal_error, gdb_assert, gdb_assert_fail): Delete.
4545 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4546 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4548 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4549 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4550 initialize_inferiors): Delete.
4552 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4554 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4557 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4559 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4561 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4563 2011-05-26 Yao Qi <yao@codesourcery.com>
4565 * Makefile.in (thread-db.o): Track dependence to
4566 common/gdb_thread_db.h.
4567 * thread-db.c: include gdb_thread_db.h from right place.
4569 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4571 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4572 __FILE__ and __LINE__ to internal_error.
4574 2011-05-13 Doug Evans <dje@google.com>
4576 * thread-db.c (try_thread_db_load_from_sdir): New function.
4577 (try_thread_db_load_from_dir): New function.
4578 (thread_db_load_search): Handle $sdir, ignore $pdir.
4579 Remove trying of system directories if search of
4580 libthread-db-search-path fails, that is now done via $sdir.
4582 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4584 * server.c (handle_query): Add EnableDisableTracepoints to the list
4585 of supported features.
4586 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4588 (cmd_qtenable_disable): New.
4589 (cmd_qtstart): Install tracepoints even if disabled.
4590 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4591 receiving a QTEnable or QTDisable packet.
4592 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4593 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4595 (gdb_probe): Skip data collection if static tracepoint is disabled.
4597 2011-05-10 Doug Evans <dje@google.com>
4599 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4601 2011-05-04 Doug Evans <dje@google.com>
4603 * linux-low.c (linux_join): Skip process lookup.
4604 * spu-low.c (spu_join): Ditto.
4605 * server.c (join_inferiors_callback): Delete.
4606 (process_serial_event): For 'D' packet (detach) call join_inferior
4609 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4611 * README: Don't mention xscale*-*-linux*.
4612 * configure.srv (xscale*-*-linux*): Don't handle target.
4614 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4616 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4618 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4619 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4620 (i386_emit_void_call_2): Likewise.
4622 2011-04-26 Yao Qi <yao@codesourcery.com>
4624 * linux-low.c: Move common macros to linux-ptrace.h.
4625 Include linux-ptrace.h.
4626 * Makefile.in (linux_ptrace_h): New.
4627 (linux-low.o): Depends on linux-ptrace.h.
4629 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4631 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4632 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4633 (remote_prepare): New function with most of the TCP code from ...
4634 (remote_open): ... here. Detect PORT here unconditionally. Move also
4635 setting transport_is_reliable.
4636 * server.c (run_once): New variable.
4637 (gdbserver_usage): Document it.
4638 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4639 the first run if RUN_ONCE.
4640 * server.h (run_once, remote_prepare): New declarations.
4642 2011-04-19 Tom Tromey <tromey@redhat.com>
4644 * win32-low.c (handle_load_dll): Remove duplicate "the".
4646 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4648 Remove support for old Cygwin 1.5 versions.
4649 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4650 function to avoid warning.
4651 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4654 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4656 * gdbserver/server.h (Macro _): Define it if not available.
4658 2011-03-14 Michael Snyder <msnyder@vmware.com>
4660 * hostio.c (handle_close): Remove unnecessary null test.
4662 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4664 * Makefile.in (maintainer-clean realclean distclean): Remove
4665 "make ... subdir_do" command.
4667 2011-03-10 Michael Snyder <msnyder@vmware.com>
4669 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4671 * server.c (handle_v_run): Free alloced buffer on early return.
4673 2011-03-09 Yao Qi <yao@codesourcery.com>
4676 2011-03-04 Yao Qi <yao@codesourcery.com>
4678 * Makefile.in: Remove GNU make feature --directory.
4680 2011-03-05 Yao Qi <yao@codesourcery.com>
4682 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4683 (subdir_do): New make target. Copied from gdb/Makefile.
4684 (maintainer-clean, realclean, distclean, clean): Call corresponding
4685 make targets in common/Makefile.
4687 2011-02-11 Yao Qi <yao@codesourcery.com>
4689 * configure.ac: Call AC_PROG_RANLIB.
4690 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4691 * configure: Regenerate.
4693 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4695 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4697 2011-03-06 Yao Qi <yao@codesourcery.com>
4699 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4701 2011-03-05 Yao Qi <yao@codesourcery.com>
4703 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4704 (subdir_do): New make target. Copied from gdb/Makefile.
4705 (maintainer-clean, realclean, distclean, clean): Call corresponding
4706 make targets in common/Makefile.
4708 2011-03-04 Yao Qi <yao@codesourcery.com>
4710 * Makefile.in: Remove GNU make feature --directory.
4712 2011-03-04 Michael Snyder <msnyder@vmware.com>
4714 * server.c (queue_stop_reply): Call xmalloc not malloc.
4716 2011-03-02 Michael Snyder <msnyder@vmware.com>
4718 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4720 2011-02-28 Michael Snyder <msnyder@vmware.com>
4722 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4723 (cmd_qtframe): Ditto.
4724 (cmd_qtbuffer): Ditto.
4725 (cmd_bigqtbuffer): Ditto.
4727 * utils.c (decimal2str): Initialize 'width' to nine, then
4730 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4732 * hostio.c (require_data): Free *data, not data.
4734 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4736 * hostio.c (require_data): Use free, not xfree.
4738 2011-02-27 Michael Snyder <msnyder@vmware.com>
4740 * server.c (handle_query): Discard unused value.
4742 * hostio.c (require_data): Free malloc memory before returning
4745 2011-02-26 Michael Snyder <msnyder@vmware.com>
4747 * linux-low.c (list_threads): Call closedir for dirent.
4749 2011-02-27 Michael Snyder <msnyder@vmware.com>
4751 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4752 a case statement falls through.
4754 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4756 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4759 2011-02-26 Michael Snyder <msnyder@vmware.com>
4761 * utils.c (decimal2str): Eliminate dead code and dead param.
4762 (pulongest): Drop dead param from call to decimal2str.
4765 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4767 Revert the following patch (not approved yet):
4768 2011-02-21 Hui Zhu <teawater@gmail.com>
4769 * tracepoint.c (tp_printf): New function.
4770 (eval_agent_expr): Handle gdb_agent_op_printf.
4772 2011-02-21 Hui Zhu <teawater@gmail.com>
4774 * tracepoint.c (tp_printf): New function.
4775 (eval_agent_expr): Handle gdb_agent_op_printf.
4777 2011-02-18 Tom Tromey <tromey@redhat.com>
4779 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4780 (tracepoint.o): Likewise.
4781 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4782 (gdb_agent_op_names): Likewise.
4784 2011-02-18 Tom Tromey <tromey@redhat.com>
4786 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4787 gdb_agent_op_rot>: New constants.
4788 (gdb_agent_op_names): Add pick and roll.
4789 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4792 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4794 * aclocal.m4: Regenerated with aclocal-1.11.1.
4796 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4798 * server.c (handle_qxfer_traceframe_info): New.
4799 (qxfer_packets): Register "traceframe-info".
4800 (handle_query): Report support for qXfer:traceframe-info:read+.
4801 * tracepoint.c (match_blocktype): New.
4802 (traceframe_find_block_type): Rename to ...
4803 (traceframe_walk_blocks): ... this. Add callback filter argument,
4805 (traceframe_find_block_type): New, reimplemented on top of
4806 traceframe_walk_blocks.
4807 (build_traceframe_info_xml): New.
4808 (traceframe_read_info): New.
4809 * server.h (traceframe_read_info): Declare.
4811 2011-02-11 Yao Qi <yao@codesourcery.com>
4813 * configure.ac: Call AC_PROG_RANLIB.
4814 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4815 * configure: Regenerate.
4817 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4819 * server.c (gdb_read_memory): Change return semantics to allow
4821 (handle_search_memory_1): Adjust.
4822 (process_serial_event) <'m' packet>: Handle partial transfers.
4823 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4825 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4827 * regcache.c (init_register_cache): Initialize
4828 regcache->register_status.
4829 (free_register_cache): Release regcache->register_status.
4830 (regcache_cpy): Copy register_status.
4831 (registers_to_string): Print 'x's for unavailable registers.
4832 (supply_register): Mark the register's status valid or
4833 unavailable, depending on whether a buffer was passed in or not.
4834 (supply_register_zeroed): New.
4835 (supply_regblock): Mark the registers' status valid or
4836 unavailable, depending on whether a buffer was passed in or not.
4837 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4838 (struct regcache): New `register_status' field.
4839 (supply_register_zeroed): Declare.
4840 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4841 supply_register_zeroed, rather than passing a NULL buffer to
4843 * tracepoint.c (fetch_traceframe_registers): Update comment.
4845 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4847 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4850 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4852 * server.h (decode_xfer_write): Change prototype.
4853 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4854 and don't extract the annex here.
4855 * server.c (decode_xfer_read): Remove `annex' parameter,
4856 and don't extract the annex here.
4858 (struct qxfer): New.
4859 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4860 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4861 (handle_qxfer_statictrace): New functions, abstracted out from
4862 handle_query, and made to use the struct qxfer interface.
4863 (handle_threads_qxfer_proper): Rename to ...
4864 (handle_qxfer_threads_proper): ... this.
4865 (handle_threads_qxfer): Rename to ...
4866 (handle_qxfer_threads): ... this. Adjust.
4867 (qxfer_packets): New array.
4868 (handle_qxfer): New function.
4869 (handle_query): Use handle_qxfer.
4871 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4873 * gdbreplay.c: Shorten lines of >= 80 columns.
4874 * linux-low.c: Ditto.
4875 * linux-ppc-low.c: Ditto.
4876 * linux-s390-low.c: Ditto.
4877 * linux-sparc-low.c: Ditto.
4878 * linux-x86-low.c: Ditto.
4879 * linux-xtensa-low.c: Ditto.
4880 * mem-break.c: Ditto.
4882 * regcache.h: Ditto.
4883 * remote-utils.c: Ditto.
4886 * thread-db.c: Ditto.
4887 * tracepoint.c: Ditto.
4889 * win32-low.h: Ditto.
4891 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4893 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4896 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4898 * server.c (gdbserver_version): Update copyright year in version
4900 * gdbreplay.c (gdbreplay_version): Ditto.
4902 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4904 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4905 * linux-bfin-low.c: New file.
4906 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4907 PT_DATA_ADDR for BFIN targets.
4908 * Makefile.in (SFILES): Add linux-bfin-low.c.
4909 (clean): Remove reg-bfin.c.
4910 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4911 * README: Mention supported Blackfin targets.
4913 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4915 * .gitignore: New file.
4917 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4919 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4921 2010-10-22 Jie Zhang <jie@codesourcery.com>
4923 * Makefile.in: Add FLAGS_TO_PASS variable.
4924 (install): Remove dependency of install-only and recursively
4925 invoke make for install-only.
4927 2010-10-04 Doug Evans <dje@google.com>
4929 * Makefile.in (uninstall): Use $(DESTDIR).
4931 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4935 * linux-x86-low.c (compat_siginfo_from_siginfo)
4936 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4937 si_code is < 0. Check for si_code == SI_TIMER before checking for
4940 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4942 * lynx-i386-low.c: New file.
4943 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4945 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4947 * lynx-low.c (ptrace_request_to_str): Remove handling for
4948 request values that have been removed in LynxOS 5.x.
4950 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4952 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4955 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4957 * configure.ac: Add --enable-inprocess-agent option.
4958 * configure: Rebuilt.
4960 2010-09-06 Yao Qi <yao@codesourcery.com>
4962 * linux-low.c (linux_kill): Remove unused variable.
4963 (linux_stabilize_threads): Likewise.
4964 * server.c (start_inferior): Likewise.
4965 (queue_stop_reply_callback): Likewise.
4966 * tracepoint.c (do_action_at_tracepoint): Likewise.
4968 2010-09-06 Yao Qi <yao@codesourcery.com>
4970 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4973 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4975 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4977 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4979 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4982 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4984 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4985 gdbserver/lynx-ppc-low.c: New files.
4986 * Makefile.in (lynx_low_h): New variable.
4987 (lynx-low.o, lynx-ppc-low.o): New rules.
4988 * configure.ac: On LynxOS, link with -lnetinet.
4989 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4990 * configure: regenerate.
4992 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4994 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4995 * configure.ac: Add check for vasprintf and vsnprintf.
4996 * configure, config.in: Regenerate.
4997 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4999 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5001 * gdbreplay.c: Move include of alloca.h up, next to include of
5003 * server.h: Add include of malloc.h.
5004 * mem-break.c: Remove include of malloc.h.
5005 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5009 * Makefile.in (memmem.o): Build with -Wno-error.
5011 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5013 * utils.c (xsnprintf): Make non-static.
5014 * server.h: Add xsnprintf declaration.
5015 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5016 replace calls to snprintf by calls to xsnprintf throughout.
5018 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5020 * configure.ac: Add configure check for alloca.
5021 * configure, config.in: Regenerate.
5022 * server.h: Include alloca.h if it exists.
5023 * gdbreplay.c: Include alloca.h if it exists.
5025 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5027 * linux-low.c (__SIGRTMIN): Define if not already defined.
5028 (linux_create_inferior): Check for __ANDROID__ rather than
5030 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5031 are already deferred.
5032 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5033 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5034 stopped and already has a pending signal to report.
5035 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5036 a pending signal to report or is moving out of a jump pad.
5037 (linux_init_signals): Check for __ANDROID__ rather than
5040 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5042 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5043 debug_threads check. Avoid a linear search when not doing debug
5046 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5048 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5049 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5050 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5051 (process_event): Change local fd's type to gdb_fildes_t.
5052 (create_file_handler): Adjust prototype.
5053 (delete_file_handler): Adjust prototype.
5054 (handle_file_event): Adjust prototype. Use pfildes.
5055 (create_file_event): Adjsut prototype.
5056 * remote-utils.c (remote_desc, listen_desc): Change type to
5058 * server.h: New gdb_fildes_t typedef.
5059 [USE_WIN32API]: Include winsock2.h.
5060 (delete_file_handler, add_file_handler): Adjust prototypes.
5062 * utils.c (pfildes): New.
5064 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5066 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5067 * configure: Regenerate.
5069 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5071 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5072 (linux_done_accessing_memory): ... this.
5073 (linux_target_ops): Adjust.
5074 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5075 * nto-low.c (nto_target_ops): Adjust comment.
5076 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5077 * spu-low.c (spu_target_ops): Adjust comment.
5078 * target.h (target_ops): Rename unprepare_to_access_memory field
5079 to done_accessing_memory.
5080 (unprepare_to_access_memory): Rename to ...
5081 (done_accessing_memory): ... this.
5083 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5085 * linux-low.c (linux_prepare_to_access_memory): New.
5086 (linux_unprepare_to_access_memory): New.
5087 (linux_target_ops): Install them.
5088 * server.c (read_memory): Rename to ...
5089 (gdb_read_memory): ... this. Use
5090 prepare_to_access_memory/prepare_to_access_memory.
5091 (write_memory): Rename to ...
5092 (gdb_write_memory): ... this. Use
5093 prepare_to_access_memory/prepare_to_access_memory.
5094 (handle_search_memory_1): Adjust.
5095 (process_serial_event): Adjust.
5096 * target.h (struct target_ops): New fields
5097 prepare_to_access_memory and unprepare_to_access_memory.
5098 (prepare_to_access_memory, unprepare_to_access_memory): New.
5099 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5100 prepare_to_access_memory/prepare_to_access_memory.
5101 * nto-low.c (nto_target_ops): Adjust.
5102 * spu-low.c (spu_target_ops): Adjust.
5103 * win32-low.c (win32_target_ops): Adjust.
5105 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5107 * Makefile.in (WARN_CFLAGS): Get it from configure.
5108 (WERROR_CFLAGS): New.
5109 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5110 * configure.ac: Introduce --enable-werror, which adds -Werror to
5111 the compiler command line. Enabled by default. Disable with
5112 --disable-werror. Add -Wdeclaration-after-statement
5113 Wpointer-arith and -Wformat-nonliteral to warning flags.
5114 * configure: Regenerate.
5116 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5118 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5120 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5122 * gdbreplay.c (remote_error): New.
5124 (expect): Use gdbchar. Check for error reading from GDB.
5125 Clarify sync error output.
5126 (play): Check for errors writing to GDB.
5127 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5128 * remote-utils.c (getpkt): Check for errors writing to the remote
5131 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5133 * linux-low.c (linux_wait_1): Move non-debugging code out of
5134 `debug_threads' control.
5136 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5138 * linux-low.c (linux_wait_1): Don't set last_status here.
5139 * server.c (push_event, queue_stop_reply_callback): Assert we're
5140 not pushing a TARGET_WAITKIND_IGNORE event.
5141 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5142 (myresume, handle_target_event): Set the thread's last_resume_kind
5143 and last_status from the target returned status.
5145 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5149 * linux-x86-low.c (update_debug_registers_callback): New.
5150 (i386_dr_low_set_addr): Use it.
5151 (i386_dr_low_get_addr): New.
5152 (i386_dr_low_set_control): Use update_debug_registers_callback.
5153 (i386_dr_low_get_control): New.
5154 (i386_dr_low_get_status): Adjust.
5155 * linux-low.c (linux_stop_lwp): New.
5156 * linux-low.h (linux_stop_lwp): Declare.
5158 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5159 argument instead of a i386_debug_reg_state.
5160 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5161 a i386_debug_reg_state.
5162 (i386_insert_aligned_watchpoint): Adjust.
5163 (i386_remove_aligned_watchpoint): Adjust.
5164 (i386_low_stopped_data_address): Read the debug registers from the
5165 inferior instead of from the mirrors.
5166 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5167 (i386_dr_low_get_addr): Declare.
5168 (i386_dr_low_get_control): Declare.
5169 (i386_dr_low_get_status): Change prototype.
5171 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5172 (i386_dr_low_get_addr): New.
5173 (i386_dr_low_get_control): New.
5174 (i386_dr_low_get_status): Adjust prototype. Return
5176 (i386_initial_stuff): Clear dr_status_mirror and
5178 (i386_get_thread_context): Adjust.
5179 (i386_set_thread_context): Adjust.
5180 (i386_thread_added): Adjust.
5182 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5184 * linux-low.h (linux_thread_area): Delete declaration.
5186 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5188 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5189 after its termination.
5191 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5193 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5194 (gdb_wants_all_stopped): Delete.
5195 (linux_wait_1): Don't call them.
5196 * server.c (handle_v_cont): Tag all threads as want-stopped.
5197 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5198 stopped as "client-wants-stopped".
5200 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5202 * Makefile.in (signals_h): New.
5203 (server_h): Depend on it.
5204 (server.o): Don't depend on $(signals_def).
5205 (signals.o): Depend on $(signals_def).
5207 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5209 * Makefile.in (signals_def): New.
5210 (server_h): Append include/gdb/signals.h and signals_def.
5211 (server.o): Append signals_def.
5213 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5215 * server.c (handle_target_event): Use target_signal_to_host for
5216 resume_info.sig initialization.
5217 * target.h (struct thread_resume) <sig>: New comment.
5219 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5221 * server.c (handle_query): strcpy() the returned string from paddress()
5222 instead of sprintf().
5223 * utils.c (paddress): Return phex_nz().
5225 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5227 * server.c (handle_v_cont): Call mourn_inferior if process
5229 (myresume): Likewise.
5231 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5233 Static tracepoints, and integration with UST.
5235 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5236 * mem-break.c (uninsert_all_breakpoints)
5237 (reinsert_all_breakpoints): New.
5238 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5239 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5240 (gdb_agent_ust_loaded, helper_thread_id)
5241 (gdb_agent_helper_thread_id): New macros.
5242 (struct ipa_sym_addresses): Add addr_ust_loaded,
5243 addr_helper_thread_id, addr_cmd_buf.
5244 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5245 (in_process_agent_loaded_ust): New.
5246 (write_e_ust_not_loaded): New.
5247 (maybe_write_ipa_ust_not_loaded): New.
5248 (struct collect_static_trace_data_action): New.
5249 (enum tracepoint_type) <static_tracepoint>: New.
5250 (struct tracepoint) <handle>: Mention static tracepoints.
5251 (struct static_tracepoint_ctx): New.
5252 (CMD_BUF_SIZE): New.
5253 (add_tracepoint_action): Handle static tracepoint actions.
5254 (unprobe_marker_at): New.
5255 (clear_installed_tracepoints): Handle static tracepoints.
5256 (cmd_qtdp): Handle static tracepoints.
5257 (probe_marker_at): New.
5258 (cmd_qtstart): Handle static tracepoints.
5259 (response_tracepoint): Handle static tracepoints.
5260 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5261 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5262 (get_context_regcache): Handle static tracepoints.
5263 (do_action_at_tracepoint): Handle static tracepoint actions.
5264 (traceframe_find_block_type): Handle static trace data blocks.
5265 (traceframe_read_sdata): New.
5266 (download_tracepoints): Download static tracepoint actions.
5267 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5268 (GDB_PROBE_NAME): New.
5273 (ust_marker_to_static_tracepoint): New.
5275 (collect_ust_data_at_tracepoint): New.
5276 (gdb_ust_probe): New.
5277 (UNIX_PATH_MAX, SOCK_DIR): New.
5278 (gdb_ust_connect_sync_socket): New.
5279 (resume_thread, stop_thread): New.
5280 (run_inferior_command): New.
5281 (init_named_socket): New.
5282 (gdb_ust_socket_init): New.
5283 (cstr_to_hexstr): New.
5285 (first_marker, next_marker): New.
5286 (response_ust_marker): New.
5287 (cmd_qtfstm, cmd_qtsstm): New.
5288 (unprobe_marker_at, probe_marker_at): New.
5289 (cmd_qtstmat, gdb_ust_thread): New.
5290 (gdb_ust_init): New.
5291 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5292 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5294 (x86_64_st_collect_regmap): New.
5295 (X86_64_NUM_ST_COLLECT_GREGS): New.
5296 (AMD64_RIP_REGNUM): New.
5297 (supply_static_tracepoint_registers): New.
5298 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5300 (i386_st_collect_regmap): New.
5301 (i386_NUM_ST_COLLECT_GREGS): New.
5302 (supply_static_tracepoint_registers): New.
5303 * server.c (handle_query): Handle qXfer:statictrace:read.
5304 <qSupported>: Report support for StaticTracepoints, and
5305 qXfer:statictrace:read features.
5306 * server.h (traceframe_read_sdata)
5307 (supply_static_tracepoint_registers): Declare.
5308 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5309 (unpack_varlen_hex): Include in IPA build.
5310 * Makefile.in (ustlibs, ustinc): New.
5311 (IPA_OBJS): Add remote-utils-ipa.o.
5312 ($(IPA_LIB)): Link -ldl and -lpthread.
5314 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5315 * config.in, configure: Regenerate.
5317 2010-06-20 Ian Lance Taylor <iant@google.com>
5318 Pedro Alves <pedro@codesourcery.com>
5320 * linux-x86-low.c (always_true): Delete.
5321 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5322 trying to fool the compiler with always_true.
5324 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5326 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5327 conditions in gdbserver.
5329 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5331 * spu-low.c (spu_read_memory): Wrap around local store limit.
5332 (spu_write_memory): Likewise.
5334 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5336 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5337 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5339 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5341 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5342 uses with LONGEST uses.
5344 2010-06-14 Stan Shebs <stan@codesourcery.com>
5345 Pedro Alves <pedro@codesourcery.com>
5349 * linux-x86-low.c: Include limits.h.
5354 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5355 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5356 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5357 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5358 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5359 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5360 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5361 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5362 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5363 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5364 (amd64_emit_void_call_2): New.
5365 (amd64_emit_ops): New.
5366 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5367 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5368 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5369 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5370 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5371 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5372 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5373 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5374 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5375 (i386_emit_stack_adjust, i386_emit_int_call_1)
5376 (i386_emit_void_call_2): New.
5377 (i386_emit_ops): New.
5378 (x86_emit_ops): New.
5379 (the_low_target): Install x86_emit_ops.
5380 * server.h (struct emit_ops): New.
5381 (get_raw_reg_func_addr): Declare.
5382 (current_insn_ptr, emit_error): Declare.
5383 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5384 (set_trace_state_variable_value): New defines.
5385 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5386 addr_get_trace_state_variable_value and
5387 addr_set_trace_state_variable_value.
5388 (symbol_list): New fields for get_raw_reg,
5389 get_trace_state_variable_value and set_trace_state_variable_value.
5390 (condfn): New typedef.
5391 (struct tracepoint): New field `compiled_cond'.
5392 (do_action_at_tracepoint): Clear compiled_cond.
5393 (get_trace_state_variable_value, set_trace_state_variable_value):
5395 (condition_true_at_tracepoint): If there's a compiled condition,
5397 (current_insn_ptr, emit_error): New globals.
5398 (struct bytecode_address): New.
5399 (get_raw_reg_func_addr): New.
5400 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5401 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5402 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5403 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5404 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5405 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5406 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5407 (compile_tracepoint_condition, compile_bytecodes): New.
5408 * target.h (emit_ops): Forward declare.
5409 (struct target_ops): New field emit_ops.
5410 (target_emit_ops): New.
5411 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5412 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5413 * linux-low.c (linux_emit_ops): New.
5414 (linux_target_ops): Install it.
5415 * linux-low.h (struct linux_target_ops): New field emit_ops.
5417 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5419 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5420 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5422 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5423 Stan Shebs <stan@codesourcery.com>
5425 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5426 (all): Depend on $(extra_libraries).
5427 (install-only): Install the IPA.
5428 (IPA_OBJS, IPA_LIB): New.
5429 (clean): Remove the IPA lib.
5430 (IPAGENT_CFLAGS): New.
5431 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5432 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5433 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5434 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5435 * configure.ac: Check for atomic builtins support in the compiler.
5436 (IPA_DEPFILES, extra_libraries): Define.
5437 * configure.srv (ipa_obj): Add description.
5438 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5439 (i[34567]86-*-linux*): Set ipa_obj.
5440 (x86_64-*-linux*): Set ipa_obj.
5441 * linux-low.c (stabilizing_threads): New.
5442 (supports_fast_tracepoints): New.
5443 (linux_detach): Stabilize threads before detaching.
5444 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5445 the lwp is either not stabilizing, or is moving out of a jump pad.
5446 (linux_fast_tracepoint_collecting): New.
5447 (maybe_move_out_of_jump_pad): New.
5448 (enqueue_one_deferred_signal): New.
5449 (dequeue_one_deferred_signal): New.
5450 (linux_wait_for_event_1): If moving out of a jump pad, defer
5451 pending signals to later.
5452 (linux_stabilize_threads): New.
5453 (linux_wait_1): Check if threads need moving out of jump pads, and
5455 (stuck_in_jump_pad_callback): New.
5456 (move_out_of_jump_pad_callback): New.
5458 (linux_resume_one_lwp): Handle moving out of jump pads.
5459 (linux_set_resume_request): Dequeue deferred signals.
5460 (need_step_over_p): Also step over fast tracepoint jumps.
5461 (start_step_over): Also uninsert fast tracepoint jumps.
5462 (finish_step_over): Also reinsert fast tracepoint jumps.
5463 (linux_install_fast_tracepoint_jump): New.
5464 (linux_target_ops): Install linux_stabilize_threads and
5465 linux_install_fast_tracepoint_jump_pad.
5466 * linux-low.h (linux_target_ops) <get_thread_area,
5467 install_fast_tracepoint_jump_pad>: New fields.
5468 (struct lwp_info) <collecting_fast_tracepoint,
5469 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5470 (linux_get_thread_area): Declare.
5471 * linux-x86-low.c (jump_insn): New.
5472 (x86_get_thread_area): New.
5473 (append_insns): New.
5475 (amd64_install_fast_tracepoint_jump_pad): New.
5476 (i386_install_fast_tracepoint_jump_pad): New.
5477 (x86_install_fast_tracepoint_jump_pad): New.
5478 (the_low_target): Install x86_get_thread_area and
5479 x86_install_fast_tracepoint_jump_pad.
5480 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5481 (struct fast_tracepoint_jump): New.
5482 (fast_tracepoint_jump_insn): New.
5483 (fast_tracepoint_jump_shadow): New.
5484 (find_fast_tracepoint_jump_at): New.
5485 (fast_tracepoint_jump_here): New.
5486 (delete_fast_tracepoint_jump): New.
5487 (set_fast_tracepoint_jump): New.
5488 (uninsert_fast_tracepoint_jumps_at): New.
5489 (reinsert_fast_tracepoint_jumps_at): New.
5490 (set_breakpoint_at): Use write_inferior_memory.
5491 (uninsert_raw_breakpoint): Use write_inferior_memory.
5492 (check_mem_read): Mask out fast tracepoint jumps.
5493 (check_mem_write): Mask out fast tracepoint jumps.
5494 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5495 (set_fast_tracepoint_jump): Declare.
5496 (delete_fast_tracepoint_jump)
5497 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5498 (reinsert_fast_tracepoint_jumps_at): Declare.
5499 * regcache.c: Don't compile many functions when building the
5500 in-process agent library.
5501 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5502 the register buffer in the heap.
5503 (free_register_cache): If the register buffer isn't owned by the
5504 regcache, don't free it.
5505 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5506 pre-existing register caches.
5507 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5509 (convert_ascii_to_int): : Constify `from' parameter type.
5510 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5511 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5512 the needed buffer in-place.
5513 (relocate_instruction): New.
5514 * server.c (handle_query) <qSymbols>: If the target supports
5515 tracepoints, give it a chance of looking up symbols. Report
5516 support for fast tracepoints.
5517 (handle_status): Stabilize threads.
5518 (process_serial_event): Adjust.
5519 * server.h (struct fast_tracepoint_jump): Forward declare.
5520 (struct process_info) <fast_tracepoint_jumps>: New field.
5521 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5522 (decode_X_packet, decode_M_packet): Adjust.
5523 (relocate_instruction): Declare.
5524 (in_process_agent_loaded): Declare.
5525 (tracepoint_look_up_symbols): Declare.
5526 (struct fast_tpoint_collect_status): Declare.
5527 (fast_tracepoint_collecting): Declare.
5528 (force_unlock_trace_buffer): Declare.
5529 (handle_tracepoint_bkpts): Declare.
5530 (initialize_low_tracepoint)
5531 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5532 * target.h (struct target_ops) <stabilize_threads,
5533 install_fast_tracepoint_jump_pad>: New fields.
5534 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5535 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5536 [HAVE_STDINT_H]: Include stdint.h.
5537 (trace_debug_1): Rename to ...
5538 (trace_vdebug): ... this.
5539 (trace_debug): Rename to ...
5540 (trace_debug_1): ... this. Add `level' parameter.
5542 (ATTR_USED, ATTR_NOINLINE): New.
5543 (IP_AGENT_EXPORT): New.
5544 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5545 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5546 (about_to_request_buffer_space, trace_buffer_is_full)
5547 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5548 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5549 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5550 (traceframe_write_count, traceframes_created)
5551 (trace_state_variables)
5552 New renaming defines.
5553 (struct ipa_sym_addresses): New.
5554 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5556 (ipa_sym_addrs): New.
5557 (all_tracepoint_symbols_looked_up): New.
5558 (in_process_agent_loaded): New.
5559 (write_e_ipa_not_loaded): New.
5560 (maybe_write_ipa_not_loaded): New.
5561 (tracepoint_look_up_symbols): New.
5562 (debug_threads) [IN_PROCESS_AGENT]: New.
5563 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5564 (UNKNOWN_SIDE_EFFECTS): New.
5565 (stop_tracing): New.
5566 (flush_trace_buffer): New.
5567 (stop_tracing_bkpt): New.
5568 (flush_trace_buffer_bkpt): New.
5569 (read_inferior_integer): New.
5570 (read_inferior_uinteger): New.
5571 (read_inferior_data_pointer): New.
5572 (write_inferior_data_pointer): New.
5573 (write_inferior_integer): New.
5574 (write_inferior_uinteger): New.
5575 (struct collect_static_trace_data_action): Delete.
5576 (enum tracepoint_type): New.
5577 (struct tracepoint) <type>: New field `type'.
5578 <actions_str, step_actions, step_actions_str>: Only include in
5580 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5581 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5582 (tracepoints): Use IP_AGENT_EXPORT.
5583 (last_tracepoint): Don't include in the IPA.
5584 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5585 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5586 (alloced_trace_state_variables): New.
5587 (trace_state_variables): Use IP_AGENT_EXPORT.
5588 (traceframe_t): Delete unused variable.
5589 (circular_trace_buffer): Don't include in the IPA.
5590 (trace_buffer_start): Delete.
5591 (struct trace_buffer_control): New.
5592 (trace_buffer_free): Delete.
5593 (struct ipa_trace_buffer_control): New.
5594 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5595 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5597 (trace_buffer_ctrl): New.
5598 (TRACE_BUFFER_CTRL_CURR): New.
5599 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5600 Reimplement as macros.
5601 (trace_buffer_wrap): Delete.
5602 (traceframe_write_count, traceframe_read_count)
5603 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5604 (struct tracepoint_hit_ctx) <type>: New field.
5605 (struct fast_tracepoint_ctx): New.
5606 (memory_barrier): New.
5608 (record_tracepoint_error): Update atomically in the IPA.
5609 (clear_inferior_trace_buffer): New.
5610 (about_to_request_buffer_space): New.
5611 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5612 updating the same buffer.
5613 (add_tracepoint): Default the tracepoint's type to trap
5614 tracepoint, and orig_size to -1.
5615 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5617 (create_trace_state_variable): New parameter `gdb'. Handle it.
5618 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5619 (cmd_qtdp): Handle fast tracepoints.
5621 (max_jump_pad_size): New.
5622 (gdb_jump_pad_head): New.
5623 (get_jump_space_head): New.
5624 (claim_jump_space): New.
5625 (sort_tracepoints): New.
5626 (MAX_JUMP_SIZE): New.
5627 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5629 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5630 support. Upload fast traceframes, and delete internal IPA
5632 (stop_tracing_handler): New.
5633 (flush_trace_buffer_handler): New.
5634 (cmd_qtstop): Upload fast tracepoints.
5635 (response_tracepoint): Handle fast tracepoints.
5636 (tracepoint_finished_step): Upload fast traceframes. Set the
5637 tracepoint hit context's tracepoint type.
5638 (handle_tracepoint_bkpts): New.
5639 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5640 type. Add comment about fast tracepoints.
5641 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5642 non-existing action_str field.
5643 (get_context_regcache): Handle fast tracepoints.
5644 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5646 (fast_tracepoint_from_jump_pad_address): New.
5647 (fast_tracepoint_from_ipa_tpoint_address): New.
5648 (collecting_t): New.
5649 (force_unlock_trace_buffer): New.
5650 (fast_tracepoint_collecting): New.
5653 (write_inferior_data_ptr): New.
5654 (target_tp_heap): New.
5655 (target_malloc): New.
5656 (download_agent_expr): New.
5658 (download_tracepoints): New.
5659 (download_trace_state_variables): New.
5660 (upload_fast_traceframes): New.
5661 (IPA_FIRST_TRACEFRAME): New.
5662 (IPA_NEXT_TRACEFRAME_1): New.
5663 (IPA_NEXT_TRACEFRAME): New.
5664 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5665 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5666 (gdb_jump_pad_buffer_end): New.
5667 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5668 (initialize_tracepoint): Adjust.
5669 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5670 buffer. Initialize the low module.
5671 * utils.c (PREFIX, TOOLNAME): New.
5672 (malloc_failure): Use PREFIX.
5673 (error): In the IPA, an error causes an exit.
5674 (fatal, warning): Use PREFIX.
5675 (internal_error): Use TOOLNAME.
5676 (NUMCELLS): Increase to 10.
5677 * configure, config.in: Regenerate.
5679 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5681 * server.c (handle_query) <qSupported>: Do two passes over the
5682 qSupported string to avoid nesting strtok.
5684 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5686 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5688 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5690 * configure: Regenerate.
5691 * proc-service.list: New.
5693 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5695 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5698 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5700 * gdbreplay.c (remote_open): Check error return from socket() call by
5701 its equality to -1 not by it being negative.
5702 * remote-utils.c (remote_open): Likewise.
5704 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5706 * config.h: Regenerate.
5708 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5710 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5711 doesn't provide PTRACE_GET_THREAD_AREA.
5713 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5715 * linux-m68k-low.c: Include <asm/ptrace.h>
5716 (ps_get_thread_area): Implement.
5718 2010-05-03 Doug Evans <dje@google.com>
5720 * event-loop.c (struct callback_event): New struct.
5721 (callback_list): New global.
5722 (append_callback_event, delete_callback_event): New functions.
5723 (process_callback): New function.
5724 (start_event_loop): Call it.
5725 * remote-utils.c (NOT_SCHEDULED): Define.
5726 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5727 moved out of readchar.
5728 (readchar): Rewrite. Call reschedule before returning.
5729 (reset_readchar): New function.
5730 (remote_close): Call it.
5731 (process_remaining, reschedule): New functions.
5732 * server.h (callback_handler_func): New typedef.
5733 (append_callback_event, delete_callback_event): Declare.
5735 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5737 * proc-service.c (ps_pglobal_lookup): Use
5738 thread_db_look_up_one_symbol.
5739 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5740 parameter. Use it instead of all_symbols_looked_up.
5741 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5743 (all_symbols_looked_up): Don't declare.
5744 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5745 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5747 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5748 Set all_symbols_looked_up here.
5749 (thread_db_look_up_one_symbol): New.
5750 (thread_db_get_tls_address): Adjust.
5751 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5752 thread_db object on the heap, and tentatively set it in the
5754 (thread_db_init): Don't set all_symbols_looked_up here.
5755 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5757 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5759 * linux-low.c (linux_kill, linux_detach): Adjust.
5760 (status_pending_p_callback): Remove redundant statement. Check
5761 for !TARGET_WAITIKIND_IGNORE, instead of
5762 TARGET_WAITKIND_STOPPED.
5763 (handle_tracepoints): Make sure LWP is locked. Adjust.
5764 (linux_wait_for_event_1): Adjust.
5765 (linux_cancel_breakpoints): New.
5766 (unsuspend_one_lwp): New.
5767 (unsuspend_all_lwps): New.
5768 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5769 (send_sigstop_callback): Change return type to int, add new
5770 `except' parameter and handle it.
5771 (suspend_and_send_sigstop_callback): New.
5772 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5773 pass them down. If SUSPEND, also increment the lwp's suspend
5775 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5776 (need_step_over_p): Don't consider suspended LWPs.
5777 (start_step_over): Adjust.
5778 (proceed_one_lwp): Change return type to int, add new `except'
5779 parameter and handle it.
5780 (unsuspend_and_proceed_one_lwp): New.
5781 (proceed_all_lwps): Use find_inferior instead of
5783 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5784 also decrement the suspend count of LWPs. Pass `except' down,
5785 instead of hacking its suspend count.
5786 (linux_pause_all): Add `freeze' parameter. Adjust.
5787 (linux_unpause_all): New.
5788 (linux_target_ops): Install linux_unpause_all.
5789 * server.c (handle_status): Adjust.
5790 * target.h (struct target_ops): New fields `unpause_all' and
5791 `cancel_breakpoints'. Add new parameter to `pause_all'.
5792 (pause_all): Add new `freeze' parameter.
5794 (cancel_breakpoints): New.
5795 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5797 (cmd_qtstart): Pause threads.
5798 (stop_tracing): Pause threads, and cancel breakpoints.
5799 * win32-low.c (win32_target_ops): Adjust.
5801 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5803 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5804 the inferior right away from here...
5805 (linux_wait_1): ... to here, and adjust to check the thread's
5806 last_resume_kind instead of the lwp's step or stop_expected flags.
5808 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5810 * README: Use consistent `GDB' and `GDBserver' spellings.
5812 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5814 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5815 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5816 (linux_detach_one_lwp): Assume the lwp is stopped.
5817 (any_thread_of): Delete.
5818 (linux_detach): Stop all lwps here. Don't blindly delete all
5820 (delete_lwp_callback): New.
5821 (linux_mourn): Delete all lwps of the process that is gone.
5822 (linux_wait_1): Don't delete the last lwp of the process here.
5823 * mem-break.h (mark_breakpoints_out): Declare.
5824 * mem-break.c (mark_breakpoints_out): New.
5825 (free_all_breakpoints): Use it.
5826 * server.c (handle_target_event): If the process is gone, mark
5828 * thread-db.c (struct thread_db) <create_bp>: New field.
5829 (thread_db_enable_reporting): Fix prototype. Store a thread event
5830 breakpoint reference in the thread_db struct.
5831 (thread_db_load_search): Clear the thread_db object.
5832 (try_thread_db_load_1): Ditto.
5833 (switch_to_process): New.
5834 (disable_thread_event_reporting): Use it.
5835 (remove_thread_event_breakpoints): New.
5836 (thread_db_detach, thread_db_mourn): Use it.
5838 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5840 * linux-low.c (linux_enable_event_reporting): New.
5841 (linux_wait_for_event_1, handle_extended_wait): Use it.
5843 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5845 * linux-low.c (linux_kill_one_lwp, linux_kill)
5846 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5847 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5848 SIGSTOP even if the LWP is stopped.
5849 (send_sigstop_callback): New.
5850 (stop_all_lwps): Use send_sigstop_callback instead.
5851 (linux_resume_one_thread): Adjust.
5852 (proceed_one_lwp): Still proceed an LWP that the client has
5853 requested to stop, if we haven't reported it as stopped yet. Make
5854 sure that LWPs the client want stopped, have a pending SIGSTOP.
5856 2010-04-26 Doug Evans <dje@google.com>
5858 * server.c (handle_general_set): Make static.
5860 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5861 Print received char after testing for error/eof instead of before.
5862 (input_interrupt): Tweak comment.
5864 2010-04-23 Doug Evans <dje@google.com>
5866 * server.c (start_inferior): Print inferior argv if --debug.
5868 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5870 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5871 * nto-x86-low.c: Include server.h
5873 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5875 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5876 be consistent with other sources of this directory.
5877 (init_registers_amd64): Correct name of source file of this function
5880 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5882 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5885 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5887 * win32-i386-low.c: Add 64-bit support.
5888 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5889 (init_registers_amd64): Declare.
5890 (mappings): Add 64-bit version of array.
5891 (init_windows_x86): New function.
5892 (the_low_target): Change init_arch field to init_windows_x86.
5894 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5896 * win32-low.c: Adapt to support also 64-bit architecture.
5897 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5898 (get_image_name): Use SIZE_T type for local variable `done'.
5899 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5900 (toolhelp_get_dll_name): Idem.
5901 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5902 Use uintptr_t typecast to avoid warning.
5903 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5904 (handle_exception): Use phex_nz to avoid warning.
5905 (win32_wait): Remove unused local variable `process'.
5907 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5909 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5912 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5914 * configure.ac: Use `ws2_32' library for srv_mingw.
5915 * configure: Regenerate.
5916 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5917 * remote-utils.c: Likewise.
5919 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5921 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5922 if __x86_64__ is defined.
5924 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5926 * configure: Regenerate.
5928 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5930 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5931 * target.h (target_ops): New get_tib_address field.
5932 * win32-low.h (win32_thread_info): Add thread_local_base field.
5933 * win32-low.c (child_add_thread): Add tlb argument.
5934 Set thread_local_base field to TLB.
5935 (get_child_debug_event): Adapt to child_add_thread change.
5936 (win32_get_tib_address): New function.
5937 (win32_target_ops): Set get_tib_address field to
5938 win32_get_tib_address.
5939 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5941 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5943 * linux-low.c (linux_mourn): Also remove the process.
5944 * server.c (handle_target_event): Don't remove the process here.
5945 * nto-low.c (nto_mourn): New.
5946 (nto_target_ops): Install it.
5947 * spu-low.c (spu_mourn): New.
5948 (spu_target_ops): Install it.
5949 * win32-low.c (win32_mourn): New.
5950 (win32_target_ops): Install it.
5952 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5954 * server.h (buffer_xml_printf): Remove redundant `;'.
5956 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5958 * regcache.c (set_register_cache): Invalidate regcaches before
5959 changing the register cache layout.
5960 (regcache_invalidate_one): Allow a NULL regcache.
5961 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5962 regcaches before changing the register cache layout or the target
5965 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5967 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5968 variable warning on Linux/x86-64.
5970 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5972 GDBserver disconnected tracing support.
5974 * linux-low.c (linux_remove_process): Delete.
5975 (add_lwp): Don't set last_resume_kind here.
5976 (linux_kill): Use `mourn'.
5977 (linux_detach): Use `thread_db_detach', and `mourn'.
5979 (linux_attach_lwp_1): Adjust comment.
5980 (linux_attach): last_resume_kind moved the thread_info; adjust.
5981 (status_pending_p_callback): Adjust.
5982 (linux_wait_for_event_1): Adjust.
5983 (count_events_callback, select_singlestep_lwp_callback)
5984 (select_event_lwp_callback, cancel_breakpoints_callback)
5985 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5986 (proceed_one_lwp): Adjust.
5987 (linux_async): Add debug output.
5988 (linux_thread_stopped): New.
5989 (linux_pause_all): New.
5990 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5992 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5993 (thread_db_free): Delete declaration.
5994 (thread_db_detach, thread_db_mourn): Declare.
5995 * thread-db.c (thread_db_init): Use thread_db_mourn.
5996 (thread_db_free): Delete, split in two.
5997 (disable_thread_event_reporting): New.
5998 (thread_db_detach): New.
5999 (thread_db_mourn): New.
6001 * server.h (struct thread_info) <last_resume_kind>: New field.
6002 <attached>: Add comment.
6003 <gdb_detached>: New field.
6004 (handler_func): Change return type to int.
6005 (handle_serial_event, handle_target_event): Ditto.
6006 (gdb_connected): Declare.
6008 (disconnected_tracing): Declare.
6009 (stop_tracing): Declare.
6011 * server.c (handle_query) <qSupported>: Report support for
6012 disconnected tracing.
6013 (queue_stop_reply_callback): Account for running threads.
6014 (gdb_wants_thread_stopped): New.
6015 (gdb_wants_all_threads_stopped): New.
6016 (gdb_reattached_process): New.
6017 (handle_status): Clear the `gdb_detached' flag of all processes.
6018 In all-stop, stop all threads.
6019 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6020 (process_serial_event): If the remote connection breaks, or if an
6021 exit was forced with "monitor exit", force an event loop exit.
6022 Handle disconnected tracing on detach.
6023 (handle_serial_event): Adjust.
6024 (handle_target_event): If GDB isn't connected, forward events back
6025 to the inferior, unless the last process exited, in which case,
6026 exit gdbserver. Adjust interface.
6028 * remote-utils.c (remote_open): Don't block in accept. Instead
6029 register an event loop source on the listen socket file
6030 descriptor. Refactor bits into ...
6031 (listen_desc): ... this new global.
6032 (gdb_connected): ... this new function.
6033 (enable_async_notification): ... this new function.
6034 (handle_accept_event): ... this new function.
6035 (remote_close): Clear remote_desc.
6037 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6039 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6041 (mourn_inferior): Define.
6042 (target_process_qsupported): Avoid the dangling else problem.
6043 (thread_stopped): Define.
6044 (pause_all): Define.
6045 (target_waitstatus_to_string): Declare.
6046 * target.c (target_waitstatus_to_string): New.
6048 * tracepoint.c (tracing): Make extern.
6049 (disconnected_tracing): New.
6050 (stop_tracing): Make extern. Handle tracing stops due to GDB
6052 (cmd_qtdisconnected): New.
6053 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6054 (handle_tracepoint_general_set): Handle QTDisconnected.
6056 * event-loop.c (event_handler_func): Change return type to int.
6057 (process_event): Bail out if the event handler wants the event
6059 (handle_file_event): Ditto.
6060 (start_event_loop): Bail out if the event handler wants the event
6063 * nto-low.c (nto_target_ops): Adjust.
6064 * spu-low.c (spu_wait): Don't remove the process here.
6065 (spu_target_ops): Adjust.
6066 * win32-low.c (win32_wait): Don't remove the process here.
6067 (win32_target_ops): Adjust.
6069 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6071 * regcache.c (realloc_register_cache): Invalidate inferior's
6072 regcache before recreating it.
6074 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6076 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6078 2010-04-09 Stan Shebs <stan@codesourcery.com>
6079 Pedro Alves <pedro@codesourcery.com>
6081 * server.h (LONGEST): New.
6082 (struct thread_info) <while_stepping>: New field.
6083 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6085 (initialize_tracepoint, handle_tracepoint_general_set)
6086 (handle_tracepoint_query, tracepoint_finished_step)
6087 (tracepoint_was_hit, release_while_stepping_state_list):
6088 (current_traceframe): Declare.
6089 * server.c (handle_general_set): Handle tracepoint packets.
6091 (write_memory): New.
6092 (handle_search_memory_1): Use read_memory.
6093 (handle_query): Report support for conditional tracepoints, trace
6094 state variables, and tracepoint sources. Handle tracepoint
6096 (main): Initialize the tracepoints module.
6097 (process_serial_event): Handle traceframe reads/writes.
6099 * linux-low.c (handle_tracepoints): New.
6100 (linux_wait_1): Call it.
6101 (linux_resume_one_lwp): Handle while-stepping.
6102 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6103 (linux_target_ops): Install them.
6104 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6106 * linux-x86-low.c (x86_supports_tracepoints): New.
6107 (the_low_target). Install it.
6109 * mem-break.h (delete_breakpoint): Declare.
6110 * mem-break.c (delete_breakpoint): Make external.
6112 * target.h (struct target_ops): Add `supports_tracepoints',
6113 `read_pc', and `write_pc' fields.
6114 (target_supports_tracepoints): Define.
6115 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6118 * regcache.h (struct regcache) <registers_owned>: New field.
6119 (init_register_cache, regcache_cpy): Declare.
6120 (regcache_read_pc, regcache_write_pc): Declare.
6121 (register_cache_size): Declare.
6122 (supply_regblock): Declare.
6123 * regcache.c (init_register_cache): New.
6124 (new_register_cache): Use it.
6125 (regcache_cpy): New.
6126 (register_cache_size): New.
6127 (supply_regblock): New.
6128 (regcache_read_pc, regcache_write_pc): New.
6130 * tracepoint.c: New.
6132 * Makefile.in (OBS): Add tracepoint.o.
6133 (tracepoint.o): New rule.
6135 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6137 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6139 (i386-mmx.c): Likewise.
6140 (i386-mmx-linux.o): Likewise.
6141 (i386-mmx-linux.c): Likewise.
6143 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6144 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6145 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6146 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6148 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6149 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6150 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6152 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6154 * Makefile.in (clean): Updated.
6156 (i386-avx.c): Likewise.
6157 (i386-avx-linux.o): Likewise.
6158 (i386-avx-linux.c): Likewise.
6159 (amd64-avx.o): Likewise.
6160 (amd64-avx.c): Likewise.
6161 (amd64-avx-linux.o): Likewise.
6162 (amd64-avx-linux.c): Likewise.
6164 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6165 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6166 (srv_amd64_regobj): Add amd64-avx.o.
6167 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6168 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6169 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6170 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6171 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6172 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6173 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6175 * i387-fp.c: Include "i386-xstate.h".
6177 (i387_cache_to_xsave): Likewise.
6178 (i387_xsave_to_cache): Likewise.
6179 (x86_xcr0): Likewise.
6181 * i387-fp.h (i387_cache_to_xsave): Likewise.
6182 (i387_xsave_to_cache): Likewise.
6183 (x86_xcr0): Likewise.
6185 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6186 * linux-crisv32-low.c (target_regsets): Likewise.
6187 * linux-m68k-low.c (target_regsets): Likewise.
6188 * linux-mips-low.c (target_regsets): Likewise.
6189 * linux-ppc-low.c (target_regsets): Likewise.
6190 * linux-s390-low.c (target_regsets): Likewise.
6191 * linux-sh-low.c (target_regsets): Likewise.
6192 * linux-sparc-low.c (target_regsets): Likewise.
6193 * linux-xtensa-low.c (target_regsets): Likewise.
6195 * linux-low.c: Include <sys/uio.h>.
6196 (regsets_fetch_inferior_registers): Support nt_type.
6197 (regsets_store_inferior_registers): Likewise.
6198 (linux_process_qsupported): New.
6199 (linux_target_ops): Add linux_process_qsupported.
6201 * linux-low.h (regset_info): Add nt_type.
6202 (linux_target_ops): Add process_qsupported.
6204 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6206 (init_registers_i386_avx_linux): New.
6207 (init_registers_amd64_avx_linux): Likewise.
6208 (xmltarget_i386_linux_no_xml): Likewise.
6209 (xmltarget_amd64_linux_no_xml): Likewise.
6210 (PTRACE_GETREGSET): Likewise.
6211 (PTRACE_SETREGSET): Likewise.
6212 (x86_fill_xstateregset): Likewise.
6213 (x86_store_xstateregset): Likewise.
6214 (use_xml): Likewise.
6215 (x86_linux_update_xmltarget): Likewise.
6216 (x86_linux_process_qsupported): Likewise.
6217 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6218 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6219 init_registers_i386_linux here. Call
6220 x86_linux_update_xmltarget.
6221 (the_low_target): Add x86_linux_process_qsupported.
6223 * server.c (handle_query): Call target_process_qsupported.
6225 * target.h (target_ops): Add process_qsupported.
6226 (target_process_qsupported): New.
6228 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6230 * inferiors.c (add_thread): Set last_status kind to
6231 TARGET_WAITKIND_IGNORE.
6232 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6233 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6234 (linux_wait_1): Move `thread' local definition to block that uses
6235 it. Don't NULL initialize `event_child'.
6236 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6237 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6238 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6240 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6242 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6243 an extended waitstatus, or by a watchpoint.
6244 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6245 thread was stepping or has been stopped by a watchpoint.
6247 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6249 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6250 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6251 of another, then delete the previous, and validate all
6253 (validate_inserted_breakpoint): New.
6254 (delete_disabled_breakpoints): New.
6255 (validate_breakpoints): New.
6256 (check_mem_read): Validate breakpoints before trusting their
6257 shadow. Delete disabled breakpoints.
6258 (check_mem_write): Validate breakpoints before trusting they
6259 should be inserted. Delete disabled breakpoints.
6260 * mem-break.h (validate_breakpoints):
6261 * server.c (handle_query): Validate breakpoints when we see a
6264 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6266 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6267 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6268 if we could tell there's a GDB breakpoint at stop_pc.
6269 (need_step_over_p): Don't do a step over if we find a GDB
6270 breakpoint at the resume PC.
6272 * mem-break.c (struct raw_breakpoint): New.
6273 (enum bkpt_type): New type `gdb_breakpoint'.
6274 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6275 fields. New field `raw'.
6276 (find_raw_breakpoint_at): New.
6277 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6279 (set_breakpoint_at): Adjust.
6280 (delete_raw_breakpoint): New.
6281 (release_breakpoint): New.
6282 (delete_breakpoint): Rename to...
6283 (delete_breakpoint_1): ... this. Add proc parameter. Use
6284 release_breakpoint. Return ENOENT.
6285 (delete_breakpoint): Reimplement.
6286 (find_breakpoint_at): Delete.
6287 (find_gdb_breakpoint_at): New.
6288 (delete_breakpoint_at): Delete.
6289 (set_gdb_breakpoint_at): New.
6290 (delete_gdb_breakpoint_at): New.
6291 (gdb_breakpoint_here): New.
6292 (set_reinsert_breakpoint): Use release_breakpoint.
6293 (uninsert_breakpoint): Rename to ...
6294 (uninsert_raw_breakpoint): ... this.
6295 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6296 (reinsert_raw_breakpoint): Change parameter type to
6298 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6300 (check_breakpoints): Adjust. Use release_breakpoint.
6301 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6302 (breakpoint_inserted_here): Ditto.
6303 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6304 Don't trust the breakpoint's shadow if it is not inserted.
6305 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6306 (delete_all_breakpoints): Adjust.
6307 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6308 use delete_breakpoint_1.
6310 * mem-break.h (breakpoints_supported): Delete declaration.
6311 (set_gdb_breakpoint_at): Declare.
6312 (gdb_breakpoint_here): Declare.
6313 (delete_breakpoint_at): Delete.
6314 (delete_gdb_breakpoint_at): Declare.
6316 * server.h (struct raw_breakpoint): Forward declare.
6317 (struct process_info): New field `raw_breakpoints'.
6319 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6322 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6324 * linux-low.c (status_pending_p_callback): Fix comment.
6325 (linux_wait_for_event_1): Move most of the internal breakpoint
6326 handling from here...
6327 (linux_wait_1): ... to here.
6328 (count_events_callback): New.
6329 (select_singlestep_lwp_callback): New.
6330 (select_event_lwp_callback): New.
6331 (cancel_breakpoints_callback): New.
6332 (select_event_lwp): New.
6333 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6334 priority to all LWPs that have had events that should be reported
6335 to the client. Cancel breakpoints when about to reporting the
6336 event to the client, not while stopping lwps. No longer cancel
6337 finished single-steps here.
6338 (cancel_finished_single_step): Delete.
6339 (cancel_finished_single_steps): Delete.
6341 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6343 * mem-break.c (enum bkpt_type): New.
6344 (struct breakpoint): New field `type'.
6345 (set_breakpoint_at): Change return type to struct breakpoint
6346 pointer. Set type to `other_breakpoint' by default.
6347 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6348 in the breakpoint list.
6349 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6350 (reinsert_breakpoint): Rename to ...
6351 (reinsert_raw_breakpoint): ... this.
6352 (reinsert_breakpoints_at): Adjust.
6353 * mem-break.h (struct breakpoint): Declare.
6354 (set_breakpoint_at): Change return type to struct breakpoint
6357 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6359 * server.c (handle_query): Assign, not compare.
6361 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6363 Teach linux gdbserver to step-over-breakpoints.
6365 * linux-low.c (can_hardware_single_step): New.
6366 (supports_breakpoints): New.
6367 (handle_extended_wait): If stopping threads, read the stop pc of
6370 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6371 low target doesn't support retrieving the PC.
6372 (add_lwp): Set last_resume_kind to resume_continue.
6373 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6374 (linux_attach): Don't clear stop_expected. Set the lwp's
6375 last_resume_kind to resume_stop.
6376 (linux_detach_one_lwp): Don't check for removed breakpoints.
6377 (check_removed_breakpoint): Delete.
6378 (status_pending_p): Rename to ...
6379 (status_pending_p_callback): ... this. Don't check for removed
6380 breakpoints. Don't consider threads that are stopped from GDB's
6382 (linux_wait_for_lwp): Always read the stop_pc here.
6383 (cancel_breakpoint): New.
6384 (step_over_bkpt): New global.
6385 (linux_wait_for_event_1): Implement stepping over breakpoints.
6386 (gdb_wants_lwp_stopped): New.
6387 (gdb_wants_all_stopped): New.
6388 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6389 single-step traps here. Store the thread's last reported target
6391 (send_sigstop): Don't clear stop_expected. Always set it,
6393 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6394 (cancel_finished_single_step): New.
6395 (cancel_finished_single_steps): New.
6396 (wait_for_sigstop): Don't cancel finished single-step traps here.
6397 (linux_resume_one_lwp): Don't check for removed breakpoints.
6398 Don't set `step' on non-hardware step archs.
6399 (linux_set_resume_request): Ignore resume_stop requests if already
6400 stopping or stopped. Set the lwp's last_resume_kind.
6401 (resume_status_pending_p): Don't check for removed breakpoints.
6402 (need_step_over_p): New.
6403 (start_step_over): New.
6404 (finish_step_over): New.
6405 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6406 requests. Clear the thread's last reported target waitstatus.
6407 Don't use the `suspended' flag. Don't consider pending breakpoints.
6408 (linux_resume): Start a step-over if necessary.
6409 (proceed_one_lwp): New.
6410 (proceed_all_lwps): New.
6411 (unstop_all_lwps): New.
6412 * linux-low.h (struct lwp_info): Rewrite comment for the
6413 `suspended' flag. Add the `stop_pc' field. Delete the
6414 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6415 Add `'last_resume_kind' and `need_step_over' fields.
6416 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6417 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6418 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6419 (set_raw_breakpoint_at): New.
6420 (set_breakpoint_at): Rewrite to use it.
6421 (reinsert_breakpoint_handler): Delete.
6422 (set_reinsert_breakpoint): New.
6423 (reinsert_breakpoint_by_bp): Delete.
6424 (delete_reinsert_breakpoints): New.
6425 (uninsert_breakpoint): Rewrite.
6426 (uninsert_breakpoints_at): New.
6427 (reinsert_breakpoint): Rewrite.
6428 (reinsert_breakpoints_at): New.
6429 (check_breakpoints): Rewrite.
6430 (breakpoint_here): New.
6431 (breakpoint_inserted_here): New.
6432 (check_mem_read): Adjust.
6433 * mem-break.h (breakpoints_supported, breakpoint_here)
6434 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6435 (reinsert_breakpoint_by_bp): Delete declaration.
6436 (delete_reinsert_breakpoints): Declare.
6437 (reinsert_breakpoint): Delete declaration.
6438 (reinsert_breakpoints_at): Declare.
6439 (uninsert_breakpoint): Delete declaration.
6440 (uninsert_breakpoints_at): Declare.
6441 (check_breakpoints): Adjust prototype.
6442 * server.h: Adjust include order.
6443 (struct thread_info): Declare here. Add a `last_status' field.
6445 2010-03-23 Michael Snyder <msnyder@vmware.com>
6447 * server.c (crc32): New function.
6448 (handle_query): Add handling for 'qCRC:' request.
6450 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6452 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6453 lwp had been stopped by a watchpoint.
6455 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6457 * server.h (internal_error): Declare.
6458 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6459 * utils.c (internal_error): New function.
6461 2010-03-15 Andreas Schwab <schwab@redhat.com>
6463 * configure.srv: Fix typo setting srv_regobj.
6465 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6467 * linux-low.c (fetch_register): Avoid passing a non string literal
6469 (usr_store_inferior_registers): Ditto.
6471 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6473 * linux-low.c (linux_write_memory): Bail out early if peeking
6476 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6478 * linux-low.h (struct lwp_info): New fields
6479 `stopped_by_watchpoint' and `stopped_data_address'.
6480 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6481 here, and cache them in the lwp object.
6482 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6484 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6486 (linux_stopped_by_watchpoint): Rewrite.
6487 (linux_stopped_data_address): Rewrite.
6489 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6491 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6492 switching the current inferior, not before.
6494 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6496 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6497 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6498 i386-linux.c and amd64-linux.c.
6499 (reg-i386.o): Removed.
6500 (reg-i386.c): Likewise.
6501 (reg-i386-linux.o): Likewise.
6502 (reg-i386-linux.c): Likewise.
6503 (reg-x86-64.o): Likewise.
6504 (reg-x86-64.c): Likewise.
6505 (reg-x86-64-linux.o): Likewise.
6506 (reg-x86-64-linux.c): Likewise.
6509 (i386-linux.o): Likewise.
6510 (i386-linux.c): Likewise.
6511 (amd64.o): Likewise.
6512 (amd64.c): Likewise.
6513 (amd64-linux.o): Likewise.
6514 (amd64-linux.c): Likewise.
6516 * configure.srv (srv_i386_regobj): New.
6517 (srv_i386_linux_regobj): Likewise.
6518 (srv_amd64_regobj): Likewise.
6519 (srv_amd64_linux_regobj): Likewise.
6520 (srv_i386_32bit_xmlfiles): Likewise.
6521 (srv_i386_64bit_xmlfiles): Likewise.
6522 (srv_i386_xmlfiles): Likewise.
6523 (srv_amd64_xmlfiles): Likewise.
6524 (srv_i386_linux_xmlfiles): Likewise.
6525 (srv_amd64_linux_xmlfiles): Likewise.
6526 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6527 srv_xmlfiles to $srv_i386_xmlfiles.
6528 (i[34567]86-*-mingw32ce*): Likewise.
6529 (i[34567]86-*-mingw*): Likewise.
6530 (i[34567]86-*-nto*): Likewise.
6531 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6532 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6533 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6534 (x86_64-*-linux*): Likewise.
6536 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6537 (init_registers_amd64_linux): New.
6538 (x86_arch_setup): Replace init_registers_x86_64_linux with
6539 init_registers_amd64_linux.
6541 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6543 * configure.ac: Check for libdl. If it is not available link against
6544 static libthread_db.
6545 * configure: Regenerate.
6547 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6551 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6552 handing a read watchpoint.
6553 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6555 2010-02-12 Doug Evans <dje@google.com>
6557 * linux-low.c (linux_supports_tracefork_flag): Document.
6558 (linux_look_up_symbols): Add comment.
6560 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6562 * regcache.c (supply_register): Clear regcache if buf is NULL.
6564 2010-02-02 Nicolas Roche <roche@sourceware.org>
6565 Joel Brobecker <brobecker@adacore.com>
6567 * inferiors.c (find_inferior): Add function documentation.
6568 (unloaded_dll): Handle the case where the unloaded dll has not
6569 been previously registered in the dll list.
6571 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6573 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6574 (thumb2_breakpoint): New.
6575 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6577 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6579 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6580 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6583 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6585 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6587 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6589 * linux-s390-low.c (s390_collect_ptrace_register)
6590 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6592 2010-01-21 Doug Evans <dje@google.com>
6594 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6595 (PTRACE_ARG4_TYPE): New macro.
6596 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6597 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6598 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6599 (usr_store_inferior_registers): Ditto.
6600 (linux_read_memory, linux_write_memory): Ditto.
6601 (linux_test_for_tracefork): Ditto.
6603 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6604 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6606 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6608 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6611 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6613 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6614 prototype to take a regcache. Adjust.
6616 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6618 * regcache.h (struct thread_info): Forward declare.
6619 (struct regcache): New.
6620 (new_register_cache): Adjust prototype.
6621 (get_thread_regcache): Declare.
6622 (free_register_cache): Adjust prototype.
6623 (registers_to_string, registers_from_string): Ditto.
6624 (supply_register, supply_register_by_name, collect_register)
6625 (collect_register_as_string, collect_register_by_name): Ditto.
6626 * regcache.c (struct inferior_regcache_data): Delete.
6627 (get_regcache): Rename to ...
6628 (get_thread_regcache): ... this. Adjust. Switch inferior before
6630 (regcache_invalidate_one): Adjust.
6631 (regcache_invalidate): Fix prototype.
6632 (new_register_cache): Return the new register cache.
6633 (free_register_cache): Change prototype.
6634 (realloc_register_cache): Adjust.
6635 (registers_to_string): Change prototype to take a regcache. Adjust.
6636 (registers_from_string): Ditto.
6637 (register_data): Ditto.
6638 (supply_register): Ditto.
6639 (supply_register_by_name): Ditto.
6640 (collect_register): Ditto.
6641 (collect_register_as_string): Ditto.
6642 (collect_register_by_name): Ditto.
6643 * server.c (process_serial_event): Adjust.
6644 * linux-low.h (regset_fill_func, regset_store_func): Change
6646 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6648 * linux-low.c (get_stop_pc): Adjust.
6649 (check_removed_breakpoint): Adjust.
6650 (linux_wait_for_event): Adjust.
6651 (linux_resume_one_lwp): Adjust.
6652 (fetch_register): Add regcache parameter. Adjust.
6653 (usr_store_inferior_registers): Ditto.
6654 (regsets_fetch_inferior_registers): Ditto.
6655 (regsets_store_inferior_registers): Ditto.
6656 (linux_fetch_registers, linux_store_registers): Ditto.
6657 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6659 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6661 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6662 prototype to take a regcache.
6663 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6664 * remote-utils.c (convert_ascii_to_int, outreg)
6665 (prepare_resume_reply): Change prototype to take a regcache.
6667 * target.h (struct target_ops) <fetch_registers, store_registers>:
6668 Change prototype to take a regcache.
6669 (fetch_inferior_registers, store_inferior_registers): Change
6670 prototype to take a regcache. Adjust.
6671 * proc-service.c (ps_lgetregs): Adjust.
6672 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6673 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6674 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6675 take a regcache. Adjust.
6676 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6677 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6678 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6679 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6680 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6681 (cris_cannot_fetch_register):
6682 (cris_breakpoint_at): Change prototype to take a regcache.
6684 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6685 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6686 to take a regcache. Adjust.
6687 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6689 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6690 take a regcache. Adjust.
6691 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6692 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6693 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6694 * linux-mips-low.c (mips_get_pc):
6695 (mips_set_pc): Change prototype to take a regcache. Adjust.
6696 (mips_reinsert_addr): Adjust.
6697 (mips_collect_register): Change prototype to take a regcache.
6699 (mips_supply_register):
6700 (mips_collect_register_32bit, mips_supply_register_32bit)
6701 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6702 (mips_store_fpregset): Ditto.
6703 * linux-ppc-low.c (ppc_supply_ptrace_register)
6704 (ppc_supply_ptrace_register): Ditto.
6705 (parse_spufs_run): Adjust.
6706 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6707 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6708 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6709 take a regcache. Adjust.
6710 * linux-s390-low.c (s390_collect_ptrace_register)
6711 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6712 (s390_set_pc): Change prototype to take a regcache. Adjust.
6713 (s390_arch_setup): Adjust.
6714 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6715 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6716 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6717 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6718 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6720 (sparc_breakpoint_at): Adjust.
6721 * linux-xtensa-low.c (xtensa_fill_gregset):
6722 (xtensa_store_gregset):
6723 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6724 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6725 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6726 prototype to take a regcache. Adjust.
6727 * win32-arm-low.c (arm_fetch_inferior_register)
6728 (arm_store_inferior_register): Change prototype to take a
6730 * win32-i386-low.c (i386_fetch_inferior_register)
6731 (i386_store_inferior_register): Change prototype to take a
6733 * win32-low.c (child_fetch_inferior_registers)
6734 (child_store_inferior_registers): Change prototype to take a
6736 (win32_wait): Adjust.
6737 (win32_fetch_inferior_registers): Change prototype to take a
6739 (win32_store_inferior_registers): Adjust.
6740 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6741 store_inferior_register>: Change prototype to take a regcache.
6743 2010-01-20 Doug Evans <dje@google.com>
6745 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6747 (linux_wait_for_event1, linux_init_signals): Ditto.
6748 (W_STOPCODE): Provide definition if missing.
6750 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6752 * linux-low.c (linux_core_of_thread): New.
6753 (compare_ints, show_process, list_threads): New.
6754 (linux_qxfer_osdata): Report threads and cores.
6755 (linux_target_op): Register linux_core_of_thread.
6756 * remote-utils.c (prepare_resume_reply): Report the core.
6757 (buffer_xml_printf): Support %d specifier.
6758 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6760 (handle_query): Handle qXfer:threads. Announce availability
6762 * target.h (struct target_ops): New field core_of_thread.
6764 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6766 * Makefile.in (clean): Remove new generated files.
6767 (reg-s390.o, reg-s390.c): Remove rules.
6768 (reg-s390x.o, reg-s390x.c): Likewise.
6769 (s390-linux32.o, s390-linux32.c): Add rules.
6770 (s390-linux64.o, s390-linux64.c): Likewise.
6771 (s390x-linux64.o, s390x-linux64.c): Likewise.
6772 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6773 * linux-s390-low.c: Include <elf.h>.
6774 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6775 (init_registers_s390): Remove prototype.
6776 (init_registers_s390x): Likewise.
6777 (init_registers_s390_linux32): Add prototype.
6778 (init_registers_s390_linux64): Likewise.
6779 (init_registers_s390x_linux64): Likewise.
6780 (s390_num_regs_3264): New define.
6781 (s390_regmap_3264): New global variable.
6782 (s390_cannot_fetch_register): Remove obsolete check.
6783 (s390_cannot_store_register): Likewise.
6784 (s390_collect_ptrace_register): Handle upper/lower register halves.
6785 (s390_supply_ptrace_register): Likewise.
6786 (s390_fill_gregset): Update to register number changes.
6787 (s390_get_hwcap): New routine.
6788 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6789 Install appropriate regmap and register set.
6791 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6793 * server.c (gdbserver_version): Update copyright year to 2010.
6794 * gdbreplay.c (gdbreplay_version): Likewise.
6796 2009-12-28 Doug Evans <dje@google.com>
6798 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6799 elf/external.h. Include <elf.h> instead but only if necessary.
6801 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6803 * linux-low.c (linux_remove_process): Remove `detaching'
6804 parameter. Don't release/detach from thread_db here.
6805 (linux_kill): Release/detach from thread_db here, ...
6806 (linux_detach): ... and here, before actually detaching.
6807 (linux_wait_1): ... and here, when a process exits.
6808 * thread-db.c (any_thread_of): New.
6809 (thread_db_free): Switch the current inferior to a thread of the
6812 2009-12-21 Doug Evans <dje@google.com>
6814 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6816 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6817 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6818 warning ifndef __NR_tkill. Move setting of errno there too.
6819 Delete unnecessary resetting of errno after syscall.
6820 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6822 * configure.ac: Check for dladdr.
6823 * config.in: Regenerate.
6824 * configure: Regenerate.
6825 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6826 (try_thread_db_load): Update.
6828 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6830 2009-12-18 Doug Evans <dje@google.com>
6832 * event-loop.c: Include unistd.h if it exists.
6834 * linux-low.c (my_waitpid): Move definition away from being in
6835 between linux_tracefork_child/linux_test_for_tracefork.
6837 * gdb_proc_service.h (psaddr_t): Fix type.
6838 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6839 signature to match glibc.
6841 2009-12-16 Doug Evans <dje@google.com>
6843 * linux-low.c (linux_read_memory): Fix argument to read.
6845 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6847 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6848 events, don't leave current_inferior pointing at null.
6850 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6852 * win32-low.c (LOG): Delete.
6853 (OUTMSG): Output to stderr.
6854 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6855 on compile time LOG macro.
6856 (win32_wait): Fix debug output.
6858 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6860 * win32-low.c (win32_add_one_solib): If the dll name is
6861 "ntdll.dll", prepend the system directory to the dll path.
6863 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6865 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6867 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6868 Vladimir Prus <vladimir@codesourcery.com>
6870 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6871 * configure.ac: Check for __mcoldfire__ and set
6872 gdb_cv_m68k_is_coldfire.
6873 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6874 reg-cf.o and reg-m68k.o.
6875 * configure: Regenerated.
6877 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6879 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6880 Pass it to thread_db_free.
6881 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6882 proper `detaching' argument to linux_remove_process.
6883 * linux-low.h (thread_db_free): Add `detaching' parameter.
6884 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6886 (thread_db_free): Add `detaching' parameter. Only
6887 call td_ta_clear_event if detaching from process.
6889 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6891 * thread-db.c (thread_db_free): Fix typo.
6893 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6896 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6898 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6900 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6901 with an i686 compiler.
6902 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6904 * configure: Rebuilt.
6906 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6910 * server.c (handle_search_memory_1): Correct read_addr initialization
6911 in loop for searching subsequent chunks.
6913 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6915 * configure.ac: New --with-libthread-db option.
6916 * thread-db.c: Allow direct dependence on libthread_db.
6917 (thread_db_free): Adjust.
6918 * config.in: Regenerate.
6919 * configure: Likewise.
6921 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6924 * thread-db.c (attach_thread): New function.
6925 (maybe_attach_thread): Return success/failure.
6926 (find_new_threads_callback): Adjust.
6927 (thread_db_find_new_threads): Loop until no new threads.
6929 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6931 * proc-service.c (ps_lgetregs): Formatting.
6933 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6935 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6936 * configure.ac: Adjust.
6937 * linux-low.h (struct process_info_private): Move members to struct
6939 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6940 * linux-low.c (linux_remove_process): Adjust.
6941 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6942 * server.c (handle_query): Move code ...
6943 (handle_monitor_command): ... here. New function.
6944 * target.h (struct target_ops): New member.
6945 * thread-db.c (struct thread_db): New.
6946 (libthread_db_search_path): New variable.
6947 (thread_db_create_event, thread_db_enable_reporting)
6948 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6949 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6950 (try_thread_db_load_1, dladdr_to_soname): New functions.
6951 (try_thread_db_load, thread_db_load_search): New functions.
6952 (thread_db_init): Search for libthread_db.
6953 (thread_db_free): New function.
6954 (thread_db_handle_monitor_command): Likewise.
6955 * config.in: Regenerate.
6956 * configure: Regenerate.
6958 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6960 * spu-low.c (spu_kill): Wait for inferior to terminate.
6961 Call clear_inferiors.
6962 (spu_detach): Call clear_inferiors.
6964 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6966 * aclocal.m4: Regenerate.
6967 * config.in: Likewise.
6968 * configure: Likewise.
6970 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6972 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6973 (parse_spufs_run): New function.
6974 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6975 (ppc_breakpoint_at): Handle SPU breakpoints.
6977 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6979 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6980 (SPUFS_MAGIC): Define.
6981 (spu_enumerate_spu_ids): New function.
6982 (linux_qxfer_spu): New function.
6983 (linux_target_ops): Install linux_qxfer_spu.
6985 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6987 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6988 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6989 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6990 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6991 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6992 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6993 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6994 (init_registers_powerpc_cell32l): Add prototype.
6995 (init_registers_powerpc_cell64l): Likewise.
6996 (ppc_arch_setup): Detect Cell/B.E. architecture.
6998 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7000 * Makefile.in (datarootdir): New variable.
7002 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7004 * linux-low.c (linux_write_memory): Update debugging output.
7005 * Makefile.in (clean): Add new descriptions.
7006 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7007 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7008 * configure.srv: Add new files for arm*-*-linux*.
7009 * linux-arm-low.c: Add new declarations.
7010 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7011 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7012 (HWCAP_VFPv3D16): New.
7013 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7014 instead of __IWMMXT__.
7015 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7016 (arm_arch_setup): New.
7017 (target_regsets): Remove #ifdef. Add VFP regset.
7018 (the_low_target): Use arm_arch_setup.
7020 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7022 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7023 the main thread again.
7025 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7027 Adding Neutrino gdbserver.
7028 * configure: Regenerated.
7029 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7030 * configure.srv (i[34567]86-*-nto*): New target.
7031 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7032 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7033 (nto_comctrl) [__QNX__]: New function.
7034 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7036 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7038 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7041 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7042 Pedro Alves <pedro@codesourcery.com>
7044 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7045 don't support CONTEXT_EXTENDED_REGISTERS.
7046 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7047 (the_low_target): Install them.
7048 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7049 failing with ERROR_PIPE_NOT_CONNECTED.
7051 2009-06-30 Doug Evans <dje@google.com>
7052 Pierre Muller <muller@ics.u-strasbg.fr>
7054 Add h/w watchpoint support to x86-linux, win32-i386.
7055 * Makefile.in (SFILES): Add i386-low.c
7056 (i386_low_h): Define.
7057 (i386-low.o): Add dependencies.
7058 (linux-x86-low.o): Add i386-low.h dependency.
7059 (win32-i386-low.o): Ditto.
7060 * i386-low.c: New file.
7061 * i386-low.h: New file.
7062 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7063 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7064 * linux-low.c (linux_add_process): Initialize arch_private.
7065 (linux_remove_process): Free arch_private.
7066 (add_lwp): Initialize arch_private.
7067 (delete_lwp): Free arch_private.
7068 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7070 * linux-low.h (process_info_private): New member arch_private.
7071 (lwp_info): New member arch_private.
7072 (linux_target_ops): New members new_process, new_thread,
7074 (ptid_of): New macro.
7075 * linux-x86-low.c: Include stddef.h, i386-low.h.
7076 (arch_process_info): New struct.
7077 (arch_lwp_info): New struct.
7078 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7079 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7080 (i386_dr_low_get_status): New function.
7081 (x86_insert_point, x86_remove_point): New functions.
7082 (x86_stopped_by_watchpoint): New function.
7083 (x86_stopped_data_address): New function.
7084 (x86_linux_new_process, x86_linux_new_thread): New functions.
7085 (x86_linux_prepare_to_resume): New function.
7086 (the_low_target): Add entries for insert_point, remove_point,
7087 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7089 * server.c (debug_hw_points): New global.
7090 (monitor_show_help): Document set debug-hw-points.
7091 (handle_query): Process "set debug-hw-points".
7092 * server.h (debug_hw_points): Declare.
7093 (paddress): Declare.
7094 * utils.c (NUMCELLS, CELLSIZE): New macros.
7095 (get_sell, xsnprintf, paddress): New functions.
7096 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7097 remove_point, stopped_by_watchpoint, stopped_data_address.
7098 * win32-i386-low.c: Include i386-low.h.
7099 (debug_reg_state): Replaces dr.
7100 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7101 (i386_dr_low_get_status): New function.
7102 (i386_insert_point, i386_remove_point): New functions.
7103 (i386_stopped_by_watchpoint): New function.
7104 (i386_stopped_data_address): New function.
7105 (i386_initial_stuff): Update.
7106 (get_thread_context,set_thread_context,i386_thread_added): Update.
7107 (the_low_target): Add entries for insert_point,
7108 remove_point, stopped_by_watchpoint, stopped_data_address.
7109 * win32-low.c (win32_insert_watchpoint): New function.
7110 (win32_remove_watchpoint): New function.
7111 (win32_stopped_by_watchpoint): New function.
7112 (win32_stopped_data_address): New function.
7113 (win32_target_ops): Add entries for insert_watchpoint,
7114 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7115 * win32-low.h (win32_target_ops): New members insert_point,
7116 remove_point, stopped_by_watchpoint, stopped_data_address.
7118 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7120 * server.c (process_serial_event): Re-return unsupported, not
7121 error, if the type isn't recognized. Re-allow supporting only
7122 insert or remove packets. Also call require_running for
7123 breakpoints. Add missing break statement to default case. Tidy.
7124 * target.h (struct target_ops): Rename insert_watchpoint to
7125 insert_point, and remove_watchpoint to remove_point.
7127 * linux-low.h (struct linux_target_ops): Likewise.
7128 * linux-low.c (linux_insert_watchpoint): Rename to ...
7129 (linux_insert_point): ... this. Adjust.
7130 (linux_remove_watchpoint): Rename to ...
7131 (linux_remove_point): ... this. Adjust.
7132 (linux_target_ops): Adjust.
7133 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7134 (cris_insert_point): ... this.
7135 (cris_remove_watchpoint): Rename to ...
7136 (cris_remove_point): ... this.
7137 (the_low_target): Adjust.
7139 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7141 * server.c (handle_v_kill): Pass signal_pid to
7142 kill_inferior if multi_process is zero.
7144 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7146 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7147 * target.h (target_ops): Comment for *_watchpoint to make it clear
7148 the functions can get types '0' and '1'.
7150 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7152 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7153 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7154 * regcache.c (get_regcache): Likewise.
7155 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7156 * win32-low.c (child_fetch_inferior_registers): Remove check for
7159 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7160 Pedro Alves <pedro@codesourcery.com>
7162 * target.h (struct target_ops) <supports_multi_process>: New
7164 (target_supports_multi_process): New.
7165 * server.c (handle_query): Even if GDB reports support, only
7166 enable multi-process if the target also supports it. Report
7167 multi-process support only if the target backend supports it.
7168 * linux-low.c (linux_supports_multi_process): New function.
7169 (linux_target_ops): Install it as target_supports_multi_process
7172 2009-05-24 Doug Evans <dje@google.com>
7174 Global renaming of find_thread_pid to find_thread_ptid.
7175 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7176 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7177 All callers updated.
7179 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7180 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7183 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7184 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7185 (linux_resume_one_lwp): Ditto.
7187 2009-05-23 Doug Evans <dje@google.com>
7189 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7190 from struct inferior_list_entry * to struct lwp_info *.
7191 All callers updated.
7193 2009-05-13 Doug Evans <dje@google.com>
7195 * linux-x86-low.c: Don't include assert.h.
7196 (x86_siginfo_fixup): Use fatal, not assert.
7197 (x86_arch_setup): Fix comment.
7199 2009-05-12 Doug Evans <dje@google.com>
7201 Biarch support for i386/amd64 gdbserver.
7202 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7203 Add linux-x86-low.c.
7204 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7205 (linux-x86-low.o): Add.
7206 * linux-x86-64-low.c: Delete.
7207 * linux-i386-low.c: Delete.
7208 * linux-x86-low.c: New file.
7209 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7211 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7213 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7214 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7215 (linux_child_pid_to_exec_file): New function.
7216 (elf_64_header_p, elf_64_file_p): New functions.
7217 (siginfo_fixup): New function.
7218 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7219 give target a chance to convert layout.
7220 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7221 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7223 2009-05-07 Doug Evans <dje@google.com>
7225 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7226 (regsets_store_inferior_registers): Ditto.
7228 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7232 * linux-low.c (must_set_ptrace_flags): Delete.
7233 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7235 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7236 `lwp->must_set_ptrace_flags' instead.
7237 (linux_wait_for_event_1): Set ptrace options here.
7238 (linux_wait_1): ... not here.
7240 2009-04-30 Doug Evans <dje@google.com>
7242 * inferiors.c (started_inferior_callback): New function.
7243 (attached_inferior_callback): New function.
7244 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7245 * server.c (print_started_pid, print_attached_pid): New functions.
7246 (detach_or_kill_for_exit): New function.
7247 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7248 * server.h (have_started_inferiors_p): Declare.
7249 (have_attached_inferiors_p): Declare.
7251 * inferiors.c (remove_process): Fix memory leak, free process.
7252 * linux-low.c (linux_remove_process): New function.
7253 (linux_kill): Call it instead of remove_process.
7254 (linux_detach, linux_wait_1): Ditto.
7256 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7258 * configure.srv: Add x86 Windows CE target.
7260 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7262 * inferiors.c (get_thread_process): Make global.
7263 * server.h (get_thread_process): Add prototype.
7264 * thread-db.c (find_one_thread): Use get_thread_process
7265 instead of current_process.
7266 (thread_db_get_tls_address): Do not crash if called when
7267 thread layer is not yet initialized.
7269 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7271 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7272 * spu-low.c (current_tid): Rename to ...
7273 (current_ptid): ... this.
7274 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7275 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7276 ptid_get_lwp (current_ptid) instead of current_tid.
7277 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7278 instead of current_tid. Use find_process_pid to verify pid
7279 argument is valid. Pass proper argument to remove_process.
7280 (spu_thread_alive): Compare current_ptid instead of current_tid.
7281 (spu_resume): Likewise.
7283 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7285 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7288 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7290 Implement the multiprocess extensions, and add linux multiprocess
7293 * server.h (ULONGEST): Declare.
7294 (struct ptid, ptid_t): New.
7295 (minus_one_ptid, null_ptid): Declare.
7296 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7297 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7298 (struct inferior_list_entry): Change `id' type from unsigned from
7300 (struct sym_cache, struct breakpoint, struct
7301 process_info_private): Forward declare.
7302 (struct process_info): Declare.
7303 (current_process): Declare.
7304 (all_processes): Declare.
7305 (initialize_inferiors): Declare.
7306 (add_thread): Adjust to use ptid_t.
7307 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7308 (add_process, remove_process, find_thread_pid): Declare.
7309 (find_inferior_id): Adjust to use ptid_t.
7310 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7311 (multi_process): Declare.
7312 (push_event): Adjust to use ptid_t.
7313 (read_ptid, write_ptid): Declare.
7314 (prepare_resume_reply): Adjust to use ptid_t.
7315 (clear_symbol_cache): Declare.
7316 * inferiors.c (all_processes): New.
7317 (null_ptid, minus_one_ptid): New.
7318 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7319 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7320 (add_thread): Change unsigned long to ptid. Remove gdb_id
7322 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7323 (gdb_id_to_thread): Rename to ...
7324 (find_thread_pid): ... this. Change unsigned long to ptid.
7325 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7326 (loaded_dll, pull_pid_from_list): Adjust.
7327 (add_process, remove_process, find_process_pid)
7328 (get_thread_process, current_process, initialize_inferiors): New.
7329 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7330 (struct target_waitstatus) <related_pid>: Ditto.
7331 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7333 (struct target_ops) <join>: Add `pid' argument.
7334 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7335 (struct target_ops) <wait>: Add `ptid' field. Change return type
7337 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7338 (mywait): Add `ptid' argument. Change return type to ptid_t.
7339 (target_pid_to_str): Declare.
7340 * target.c (set_desired_inferior): Adjust to use ptids.
7341 (mywait): Add new `ptid' argument. Adjust.
7342 (target_pid_to_str): New.
7343 * mem-break.h (free_all_breakpoints): Declare.
7344 * mem-break.c (breakpoints): Delelete.
7345 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7346 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7347 to use per-process breakpoint list.
7348 (free_all_breakpoints): New.
7349 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7350 (symbol_cache, all_symbols_looked_up): Delete.
7352 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7354 (prepare_resume_reply): Change ptid argument's type from unsigned
7355 long to ptid_t. Adjust. Implement W;process and X;process.
7356 (free_sym_cache, clear_symbol_cache): New.
7357 (look_up_one_symbol): Adjust to per-process symbol cache. *
7358 * server.c (cont_thread, general_thread, step_thread): Change type
7361 (multi_process): New.
7362 (last_ptid): Change type to ptid_t.
7363 (struct vstop_notif) <ptid>: Change type to ptid_t.
7364 (queue_stop_reply, push_event): Change `ptid' argument's type to
7366 (discard_queued_stop_replies): Add `pid' argument.
7367 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7368 changes. Don't reference the `attached' global.
7369 (attach_inferior): Adjust to mywait interface changes.
7370 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7371 features. Handle and report "multiprocess+". Handle
7373 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7375 (handle_v_kill): New.
7376 (handle_v_stopped): Adjust to use target_pid_to_str.
7377 (handle_v_requests): Allow multiple attaches and runs when
7378 multiprocess extensions are in effect. Handle "vKill".
7379 (myresume): Adjust to use ptids.
7380 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7381 (handle_status): Adjust to discard_queued_stop_replies interface
7383 (first_thread_of, kill_inferior_callback)
7384 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7385 (main): Call initialize_inferiors. Adjust to use ptids, killing
7386 and detaching from all inferiors. Handle multiprocess packet
7388 * linux-low.h: Include gdb_proc_service.h.
7389 (struct process_info_private): New.
7390 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7391 <lwpid_of>: Use ptid_get_lwp.
7392 (get_lwp_thread): Adjust.
7393 (struct lwp_info): Add `dead' member.
7394 (find_lwp_pid): Declare.
7395 * linux-low.c (thread_db_active): Delete.
7396 (new_inferior): Adjust comment.
7397 (inferior_pid): Delete.
7398 (linux_add_process): New.
7399 (handle_extended_wait): Adjust.
7400 (add_lwp): Change unsigned long to ptid.
7401 (linux_create_inferior): Add process to processes table. Adjust
7402 to use ptids. Don't set new_inferior here.
7403 (linux_attach_lwp): Rename to ...
7404 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7405 it. Adjust to use ptids.
7406 (linux_attach_lwp): New.
7407 (linux_attach): Add process to processes table. Don't set
7409 (struct counter): New.
7410 (second_thread_of_pid_p, last_thread_of_process_p): New.
7411 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7413 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7414 processes. Remove process from process table.
7415 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7416 to multiple processes.
7417 (any_thread_of): New.
7418 (linux_detach): Add `pid' argument, and handle it. Remove process
7419 from processes table.
7420 (linux_join): Add `pid' argument. Handle it.
7421 (linux_thread_alive): Change unsighed long argument to ptid_t.
7422 Consider dead lwps as not being alive.
7423 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7424 threads we're not interested in.
7425 (same_lwp, find_lwp_pid): New.
7426 (linux_wait_for_lwp): Change `pid' argument's type from int to
7428 (linux_wait_for_event): Rename to ...
7429 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7430 from int to ptid_t. Adjust.
7431 (linux_wait_for_event): New.
7432 (linux_wait_1): Add `ptid' argument. Change return type to
7433 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7434 that exit from the process table.
7435 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7437 (mark_lwp_dead): New.
7438 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7439 stopping all threads, mark its main lwp as dead.
7440 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7442 (fetch_register, usr_store_inferior_registers)
7443 (regsets_fetch_inferior_registers)
7444 (regsets_store_inferior_registers, linux_read_memory)
7445 (linux_write_memory): Inline `inferior_pid'.
7446 (linux_look_up_symbols): Adjust to use per-process
7448 (linux_request_interrupt): Adjust to use ptids.
7449 (linux_read_auxv): Inline `inferior_pid'.
7450 (initialize_low): Don't reference thread_db_active.
7451 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7452 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7453 (ps_getpid): Return the pid of the current inferior.
7454 * thread-db.c (proc_handle, thread_agent): Delete.
7455 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7457 (find_one_thread): Change argument type to ptid_t. Adjust to
7459 (maybe_attach_thread): Adjust to per-process data and ptids.
7460 (thread_db_find_new_threads): Ditto.
7461 (thread_db_init): Ditto.
7462 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7463 processes table. Adjust to use ptids.
7464 (spu_kill, spu_detach): Adjust interface. Remove process from
7466 (spu_join, spu_thread_alive): Adjust interface.
7467 (spu_wait): Adjust interface. Remove process from processes
7468 table. Adjust to use ptids.
7469 * win32-low.c (current_inferior_tid): Delete.
7470 (current_inferior_ptid): New.
7471 (debug_event_ptid): New.
7472 (thread_rec): Take a ptid. Adjust.
7473 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7474 (child_delete_thread): Ditto.
7475 (do_initial_child_stuff): Add `attached' argument. Add process to
7477 (child_fetch_inferior_registers, child_store_inferior_registers):
7479 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7480 (win32_attach): Pass 1 to do_initial_child_stuff.
7481 (win32_kill): Adjust interface. Remove process from processes
7483 (win32_detach): Ditto.
7484 (win32_join): Adjust interface.
7485 (win32_thread_alive): Take a ptid.
7486 (win32_resume): Adjust to use ptids.
7487 (get_child_debug_event): Ditto.
7488 (win32_wait): Adjust interface. Remove exiting process from
7491 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7493 Non-stop mode support.
7495 * server.h (non_stop): Declare.
7496 (gdb_client_data, handler_func): Declare.
7497 (delete_file_handler, add_file_handler, start_event_loop):
7499 (handle_serial_event, handle_target_event, push_event)
7500 (putpkt_notif): Declare.
7501 * target.h (enum resume_kind): New.
7502 (struct thread_resume): Replace `step' field by `kind' field.
7503 (TARGET_WNOHANG): Define.
7504 (struct target_ops) <wait>: Add `options' argument.
7505 <supports_non_stop, async, start_non_stop>: New fields.
7506 (target_supports_non_stop, target_async): New.
7507 (start_non_stop): Declare.
7508 (mywait): Add `options' argument.
7509 * target.c (mywait): Add `options' argument. Print child exit
7511 (start_non_stop): New.
7512 * server.c (non_stop, own_buf, mem_buf): New globals.
7513 (struct vstop_notif): New.
7514 (notif_queue): New global.
7515 (queue_stop_reply, push_event, discard_queued_stop_replies)
7516 (send_next_stop_reply): New.
7517 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7519 (attach_inferior): In non-stop mode, don't wait for the target
7521 (handle_general_set): Handle QNonStop.
7522 (handle_query): When handling qC, return the current general
7523 thread, instead of the first thread of the list.
7524 (handle_query): If the backend supports non-stop mode, include
7525 QNonStop+ in the qSupported query response.
7526 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7528 (handle_v_attach, handle_v_run): Handle non-stop mode.
7529 (handle_v_stopped): New.
7530 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7531 (myresume): Adjust to use resume_kind. Handle non-stop.
7532 (queue_stop_reply_callback): New.
7533 (handle_status): Handle non-stop mode.
7534 (main): Clear non_stop flag on reconnection. Use the event-loop.
7535 Refactor serial protocol handling from here ...
7536 (process_serial_event): ... to this new function. When GDB
7537 selects any thread, select one here. In non-stop mode, wait until
7538 GDB acks all pending events before exiting.
7539 (handle_serial_event, handle_target_event): New.
7540 * remote-utils.c (remote_open): Install remote_desc in the event
7542 (remote_close): Remove remote_desc from the event loop.
7543 (putpkt_binary): Rename to...
7544 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7545 (putpkt_binary): New as wrapper around putpkt_binary_1.
7546 (putpkt_notif): New.
7547 (prepare_resume_reply): In non-stop mode, don't change the
7549 * event-loop.c: New.
7550 * Makefile.in (OBJ): Add event-loop.o.
7551 (event-loop.o): New rule.
7553 * linux-low.h (pid_of): Moved here.
7555 (get_lwp_thread): Use lwpid_of.
7556 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7557 * linux-low.c (pid_of): Delete.
7558 (inferior_pid): Use lwpid_of.
7559 (linux_event_pipe): New.
7560 (target_is_async_p): New.
7562 (handle_extended_wait): Use lwpid_of.
7563 (add_lwp): Don't set lwpid field.
7564 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7565 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7566 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7567 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7568 first. Adjust to linux_wait_for_event interface changes. Use
7570 (linux_detach): Don't delete the main lwp here.
7571 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7572 (status_pending_p): Don't consider explicitly suspended lwps.
7573 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7574 pointer. Add OPTIONS argument. Change return type to int. Use
7575 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7576 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7577 pointer. Add status pointer argument. Return a pid instead of a
7578 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7579 changes. In non-stop mode, don't switch to a random thread.
7580 (linux_wait): Rename to...
7581 (linux_wait_1): ... this. Add target_options argument, and handle
7582 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7583 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7584 clean exit and signal exit code. Don't stop all threads in
7585 non-stop mode. In all-stop mode, only stop all threads when
7586 reporting a stop to GDB. Handle explicit thread stop requests.
7587 (async_file_flush, async_file_mark): New.
7589 (send_sigstop): Use lwpid_of.
7590 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7591 interface changes. In non-stop mode, don't switch to a random
7593 (linux_resume_one_lwp): Use lwpid_of.
7594 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7595 (linux_resume_one_thread): ... this. Handle resume_stop. In
7596 non-stop mode, don't look for pending flag in all threads.
7597 (resume_status_pending_p): Don't consider explicitly suspended
7599 (my_waitpid): Reimplement. Emulate __WALL.
7600 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7602 (sigchld_handler, linux_supports_non_stop, linux_async)
7603 (linux_start_non_stop): New.
7604 (linux_target_ops): Register linux_supports_non_stop, linux_async
7605 and linux_start_non_stop.
7606 (initialize_low): Install SIGCHLD handler.
7607 * thread-db.c (thread_db_create_event, find_one_thread)
7608 (thread_db_get_tls_address): Use lwpid_of.
7609 * win32-low.c (win32_detach): Adjust to use resume_kind.
7610 (win32_wait): Add `options' argument.
7611 * spu-low.c (spu_resume): Adjust to use resume_kind.
7612 (spu_wait): Add `options' argument.
7614 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7616 Decouple target code from remote protocol.
7618 * target.h (enum target_waitkind): New.
7619 (struct target_waitstatus): New.
7620 (struct target_ops) <wait>: Return an unsigned long. Take a
7621 target_waitstatus pointer instead of a char pointer.
7623 * target.c (mywait): Change prototype to return an unsigned long.
7624 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7625 * server.h (thread_from_wait, old_thread_from_wait): Delete
7627 (prepare_resume_reply): Change prototype to take a
7629 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7630 (last_status, last_ptid): New.
7631 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7632 pid instead of a signal.
7633 (attach_inferior): Remove "status" and "signal" parameters.
7635 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7637 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7638 (handle_v_requests, myresume): Remove "status" and "signal"
7640 (handle_status): New.
7641 (main): Delete local `status'. Adjust.
7642 * remote-utils.c: Include target.h.
7643 (prepare_resume_reply): Change prototype to take a
7644 target_waitstatus. Adjust.
7646 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7648 * spu-low.c (spu_wait): Adjust.
7649 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7651 (win32_wait): Adjust.
7653 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7655 * target.h (struct thread_resume): Delete leave_stopped member.
7656 (struct target_ops): Add a `n' argument to the `resume' callback.
7657 * server.c (start_inferior): Adjust.
7658 (handle_v_cont, myresume): Adjust.
7659 * linux-low.c (check_removed_breakpoint): Adjust to resume
7660 interface change, and to removed leave_stopped field.
7661 (resume_ptr): Delete.
7662 (struct thread_resume_array): New.
7663 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7664 resume interface change.
7665 (linux_continue_one_thread, linux_queue_one_thread)
7666 (resume_status_pending_p): Check if the resume field is NULL
7667 instead of checking the leave_stopped member.
7668 (linux_resume): Adjust to the target resume interface change.
7669 * spu-low.c (spu_resume): Adjust to the target resume interface
7671 * win32-low.c (win32_detach, win32_resume): Ditto.
7673 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7675 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7677 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7679 (linux_continue_one_thread): Only preserve the stepping flag if
7680 there's a pending breakpoint.
7682 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7684 * server.c (main): After the inferior having exited, call
7685 remote_close before exiting gdbserver.
7687 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7689 Fix size of FPSCR in Power 7 processors.
7690 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7691 (PPC_FEATURE_HAS_DFP): New #define.
7692 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7695 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7697 * server.c (handle_query) Whitespace and formatting.
7699 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7701 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7702 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7703 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7704 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7705 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7706 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7707 Makefile.in, configure.ac: Fix whitespace throughout.
7708 * configure: Regenerate.
7710 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7712 * inferiors.c (find_inferior): Make it safe for the callback
7713 function to delete the currently iterated inferior.
7715 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7717 * Makefile.in (linuw_low_h): Move higher.
7718 (thread-db.o): Depend on $(linux_low_h).
7720 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7722 Rename "process" to "lwp" throughout.
7724 * linux-low.c (all_processes): Rename to...
7725 (all_lwps): ... this.
7726 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7727 (add_process): Rename to ...
7728 (add_lwp): ... this. Adjust.
7729 (linux_create_inferior): Adjust.
7730 (linux_attach_lwp): Adjust.
7731 (linux_attach): Adjust.
7732 (linux_kill_one_process): Rename to ...
7733 (linux_kill_one_lwp): ... this. Adjust.
7734 (linux_kill): Adjust.
7735 (linux_detach_one_process): Rename to ...
7736 (linux_detach_one_lwp): ... this. Adjust.
7737 (linux_detach): Adjust.
7738 (check_removed_breakpoint): Adjust.
7739 (status_pending_p): Adjust.
7740 (linux_wait_for_process): Rename to ...
7741 (linux_wait_for_lwp): ... this. Adjust.
7742 (linux_wait_for_event): Adjust.
7743 (send_sigstop): Adjust.
7744 (wait_for_sigstop): Adjust.
7745 (stop_all_processes): Rename to ...
7746 (stop_all_lwps): ... this.
7747 (linux_resume_one_process): Rename to ...
7748 (linux_resume_one_lwp): ... this. Adjust.
7749 (linux_set_resume_request, linux_continue_one_thread)
7750 (linux_queue_one_thread, resume_status_pending_p)
7751 (usr_store_inferior_registers, regsets_store_inferior_registers)
7752 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7754 * linux-low.h (get_process): Rename to ...
7755 (get_lwp): ... this. Adjust.
7756 (get_thread_process): Rename to ...
7757 (get_thread_lwp): ... this. Adjust.
7758 (get_process_thread): Rename to ...
7759 (get_lwp_thread): ... this. Adjust.
7760 (struct process_info): Rename to ...
7761 (struct lwp_info): ... this.
7762 (all_processes): Rename to ...
7763 (all_lwps): ... this.
7764 * proc-service.c (ps_lgetregs): Adjust.
7765 * thread-db.c (thread_db_create_event, find_one_thread)
7766 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7768 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7770 * server.c (handle_query): Handle "qAttached".
7772 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7774 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7775 GPLv3, update license URL.
7777 2009-03-01 Doug Evans <dje@google.com>
7779 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7780 (server_h): Add gdb_signals.h.
7781 (signals.o): Update.
7782 * server.h (target_signal_from_host,target_signal_to_host_p)
7783 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7785 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7787 * remote-utils.c (getpkt): Also generate remote-debug
7788 information if noack_mode is set.
7790 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7792 * server.c (handle_query): Report qXfer:siginfo:read and
7793 qXfer:siginfo:write as supported and handle them.
7794 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7795 * linux-low.c (linux_xfer_siginfo): New.
7796 (linux_target_ops): Set it.
7798 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7800 * server.c (gdbserver_usage): Mention --remote-debug.
7801 (main): Accept '--remote-debug' switch.
7803 2009-01-18 Doug Evans <dje@google.com>
7805 * regcache.c (new_register_cache): No need to check result of xcalloc.
7806 * server.c (handle_search_memory): Back out calls to xmalloc,
7807 result is checked and error is returned to user upon failure.
7808 (handle_query): Ditto. Add more checks for result of malloc.
7809 (handle_v_cont): Check result of malloc, report error back to
7811 (handle_v_run): Ditto. Call freeargv.
7812 * server.h (freeargv): Declare.
7813 * utils.c (freeargv): New fn.
7815 2009-01-15 Doug Evans <dje@google.com>
7817 * gdbreplay.c (perror_with_name): Make arg const char *.
7818 * server.h (target_signal_to_name): Make return type const char *.
7819 * thread-db.c (thread_db_err_str): Make return type const char *.
7820 * utils.c (perror_with_name): Make arg const char *.
7822 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7824 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7825 when handling a EXIT_PROCESS_DEBUG_EVENT.
7827 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7829 * gdbreplay.c (gdbreplay_version): Update copyright year.
7830 * server.c (gdbserver_version): Likewise.
7832 2009-01-05 Doug Evans <dje@google.com>
7834 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7835 (handle_extended_wait): Improve comment.
7837 2008-12-13 Doug Evans <dje@google.com>
7839 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7840 * server.h (ATTR_MALLOC): New macro.
7841 (xmalloc,xcalloc,xstrdup): Declare.
7842 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7843 * inferiors.c: Ditto.
7844 * linux-low.c: Ditto.
7845 * mem-break.c: Ditto.
7846 * regcache.c: Ditto.
7847 * remote-utils.c: Ditto.
7850 * win32-low.c: Ditto.
7852 2008-12-12 Doug Evans <dje@google.com>
7854 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7855 in debugging printf.
7857 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7859 2008-12-09 Doug Evans <dje@google.com>
7861 * linux-low.h (struct process_info): Delete member tid, unused.
7862 * thread-db.c (find_one_thread): Update.
7863 (maybe_attach_thread): Update.
7865 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7867 * target.h (struct target_ops): Add qxfer_osdata member.
7868 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7870 (linux_qxfer_osdata): New functions.
7871 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7873 * server.c (handle_query): Handle "qXfer:osdata:read:".
7874 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7875 (buffer_xml_printf): New functions.
7876 * server.h (struct buffer): New.
7877 (buffer_grow_str, buffer_grow_str0): New macros.
7878 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7879 (buffer_xml_printf): Declare.
7881 2008-11-24 Doug Evans <dje@google.com>
7883 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7885 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7887 * server.c (handle_v_run): Always use the supplied argument list.
7889 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7891 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7892 (xtensa_regmap_table): Add entry for scompare1.
7894 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7896 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7897 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7898 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7899 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7900 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7901 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7902 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7903 XML target descriptions.
7904 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7905 when inferior is running on an ISA 2.05 or later processor. Add
7906 special case to return offset for full 64-bit slot of FPSCR when
7909 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7911 * Makefile.in (SFILES, clean): Added sparc64 files.
7912 (reg-sparc64.o, reg-sparc64.c): New.
7913 * configure.srv (sparc*-*-linux*): New configuration.
7914 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7915 syscall arguments for SPARC.
7916 (regsets_store_inferior_registers): Likewise.
7917 * linux-sparc-low.c: New file.
7919 2008-10-21 Doug Evans <dje@google.com>
7921 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7922 (READLINE_DIR,READLINE_DEP): Delete.
7923 (INTERNAL_CFLAGS): Update.
7924 (LINTFLAGS): Update.
7926 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7928 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7929 whole argv from the last run, not just argv[0].
7931 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7933 * regcache.c (new_register_cache): Return NULL if the register
7934 cache size isn't known yet.
7935 (free_register_cache): Avoid dereferencing a NULL regcache.
7937 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7939 * configure.srv: Merge MIPS and MIPS64.
7941 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7943 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7945 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7947 * Makefile.in: Add required vsx dependencies.
7949 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7950 Declare init_registers_powerpc_vsx32l.
7951 Declare init_registers_powerpc_vsx64l.
7952 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7953 (ppc_arch_setup): Check for VSX in hwcap.
7954 (ppc_fill_vsxregset): New function.
7955 (ppc_store_vsxregset): New function.
7956 Add new VSX entry in regset_info target_regsets.
7958 * configure.srv: Add new VSX dependencies.
7960 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7962 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7963 (remote_open): Set or clear transport_is_reliable.
7964 (putpkt_binary): Don't expect acks in noack mode.
7965 (getpkt): Don't send ack/nac in noack mode.
7966 * server.c (handle_general_set): Handle QStartNoAckMode.
7967 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7969 (main): Reset noack_mode on every connection.
7970 * server.h (noack_mode): Declare.
7972 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7974 * Makefile.in (GDBREPLAY_OBS): New variable.
7975 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7977 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7978 Daniel Jacobowitz <dan@codesourcery.com>
7980 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7981 (usr_store_inferior_registers): Likewise.
7982 (regsets_store_inferior_registers): Likewise.
7984 2008-07-31 Rolf Jansen <rj@surtec.com>
7985 Pedro Alves <pedro@codesourcery.com>
7987 * configure.ac: Check for memmem declaration.
7988 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7989 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7990 (disable_packet_qfThreadInfo): Unconditionally compile.
7991 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7992 * configure, config.in: Regenerate.
7994 2008-07-28 Doug Kwan <dougkwan@google.com>
7996 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7997 (linux_write_memory): Remove declaration of errno.
7999 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8001 * linux-low.c (handle_extended_wait): Do not use "status"
8002 variable uninitialized.
8004 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8006 * server.c (handle_v_attach): Inhibit reporting dll changes.
8008 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8010 * remote-utils.c (prepare_resume_reply): If requested, don't
8011 output "thread:TID" in the T stop reply.
8013 * server.c (disable_packet_vCont, disable_packet_Tthread)
8014 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8015 (handle_query): If requested, disable support for qC, qfThreadInfo
8017 (handle_v_requests): If requested, disable support for vCont.
8018 (gdbserver_show_disableable): New.
8019 (main): Handle --disable-packet and --disable-packet=LIST.
8021 * server.h (disable_packet_vCont, disable_packet_Tthread)
8022 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8024 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8026 * server.c (gdbserver_usage): Mention --version.
8028 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8030 * Makefile.in (gdbreplay.o): New rule.
8032 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8034 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8035 message, not gdbserver.
8037 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8038 Nathan Sidwell <nathan@codesourcery.com>
8039 Joseph Myers <joseph@codesourcery.com>
8041 * acinclude.m4: Include ../../config/acx.m4.
8042 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8043 * configure, config.in: Regenerate.
8044 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8045 * server.c (gdbserver_version): Print PKGVERSION.
8046 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8047 (main): Adjust gdbserver_usage calls.
8048 * gdbreplay.c (version, host_name): Add declarations.
8049 (gdbreplay_version, gdbreplay_usage): New.
8050 (main): Accept --version and --help options.
8052 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8054 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8055 (arm_breakpoint_at): Handle Thumb.
8056 (the_low_target): Add comment.
8058 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8060 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8062 2008-05-09 Doug Evans <dje@google.com>
8064 * server.h (decode_search_memory_packet): Declare.
8065 * remote-utils.c (decode_search_memory_packet): New fn.
8066 * server.c (handle_search_memory_1): New fn.
8067 (handle_search_memory): New fn.
8068 (handle_query): Process qSearch:memory packets.
8070 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8072 * regcache.c (registers_length): Remove.
8073 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8074 full register packet.
8075 * regcache.h (registers_length): Remove prototype.
8076 * server.h (PBUFSIZ): Define to 16384.
8078 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8080 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8081 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8082 powerpc-64l.o, and powerpc-altivec64l.o.
8083 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8084 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8085 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8086 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8087 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8090 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8091 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8092 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8093 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8094 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8095 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8096 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8097 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8098 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8099 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8102 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8103 (init_registers_powerpc_32l): ... this new prototype.
8104 (init_registers_powerpc_32): Remove, replace by ...
8105 (init_registers_powerpc_altivec32l): ... this new prototype.
8106 (init_registers_powerpc_e500): Remove, replace by ...
8107 (init_registers_powerpc_e500l): ... this new prototype.
8108 (init_registers_ppc64): Remove, replace by ...
8109 (init_registers_powerpc_64l): ... this new prototype.
8110 (init_registers_powerpc_64): Remove, replace by ...
8111 (init_registers_powerpc_altivec64l): ... this new prototype.
8112 (ppc_num_regs): Set to 73.
8113 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8114 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8115 (ppc_cannot_store_register): Handle orig_r3 and trap.
8116 (ppc_arch_setup): Update init_registers_... calls.
8117 (ppc_fill_gregset): Handle orig_r3 and trap.
8119 * inferiors.c (clear_inferiors): Reset current_inferior.
8121 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8123 * acinclude.m4: Add override.m4.
8124 * configure: Regenerate.
8126 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8128 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8129 initial call to init_register_ppc64.
8131 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8133 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8134 single powerpc*-*-linux* case.
8135 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8137 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8139 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8140 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8142 * linux-ppc-low.c: Include <elf.h>.
8143 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8144 (ppc_hwcap): New global variable.
8145 (ppc_regmap): Remove __SPE__ #ifdef sections.
8146 (ppc_regmap_e500): New global variable.
8147 (ppc_cannot_store_register): Update __SPE__ special case.
8148 (ppc_get_hwcap): New function.
8149 (ppc_arch_setup): Use it to determine whether inferior supports
8150 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8151 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8152 Do not access registers if target does not support AltiVec.
8153 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8154 Do not access registers if target does not support SPE.
8155 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8157 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8159 * linux-low.c (disabled_regsets, num_regsets): New.
8160 (use_regsets_p): Delete.
8161 (linux_wait_for_process): Clear disabled_regsets.
8162 (regsets_fetch_inferior_registers): Check and set it.
8163 (regsets_store_inferior_registers): Likewise.
8164 (linux_fetch_registers, linux_store_registers): Do not use
8166 (initialize_low): Allocate disabled_regsets.
8168 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8170 * Makefile.in (LIBOBJS): New.
8172 (memmem.o): New rule.
8173 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8174 * configure: Regenerated.
8176 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8178 * server.c (handle_query): Never return "unsupported" for
8179 qXfer:features:read queries.
8181 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8183 * server.c (get_features_xml): Fix inverted condition.
8184 (handle_query): Always support qXfer:feature:read.
8186 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8188 * server.c (wrapper_argv): New.
8189 (start_inferior): Handle wrapper_argv. If set, expect an extra
8191 (gdbserver_usage): Document --wrapper.
8192 (main): Parse --wrapper.
8194 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8196 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8197 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8198 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8199 (ppc_set_pc): Likewise.
8200 (ppc_arch_setup): New function.
8201 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8202 of collect_register.
8203 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8205 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8207 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8208 instead of linux-ppc64-low.o.
8209 * linux-ppc64-low.c: Remove file.
8210 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8211 (linux-ppc64-low.o): Remove rule.
8213 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8214 (init_registers_powerpc_64): Likewise.
8215 (ppc_regmap): Conditionally define depending on __powerpc64__.
8216 (ppc_cannot_store_register): Do not special-case "fpscr" when
8217 compiled on __powerpc64__.
8218 (ppc_collect_ptrace_register): New function.
8219 (ppc_supply_ptrace_register): New function.
8220 (ppc_breakpoint): Change type to "unsigned int".
8221 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8222 (the_low_target): Conditionally provide initializers for the
8223 arch_setup member depending on __powerpc64__. Install
8224 collect_ptrace_register and supply_ptrace_register members.
8226 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8228 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8229 * server.c (gdbserver_xmltarget): Define.
8230 (get_features_xml): Use it to replace "target.xml" and arch_string.
8232 * configure.srv: Remove srv_xmltarget. Add XML files that were
8233 mentioned there to srv_xmlfiles instead. Remove conditional tests
8234 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8235 srv_xmlfiles and srv_regobj to include all possible choices.
8236 * configure.ac (srv_xmltarget): Remove.
8237 (srv_xmlfiles): Do not add "target.xml".
8238 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8239 checks for supplementary target information.
8240 * configure: Regenerate.
8241 * Makefile.in (XML_TARGET): Remove.
8242 (target.xml): Remove rule.
8243 (clean): Do not clean up target.xml.
8244 (.PRECIOUS): Do not mention target.xml.
8246 * target.h (struct target_ops): Remove arch_string member.
8247 * linux-low.c (linux_arch_string): Remove.
8248 (linux_target_ops): Remove arch_string initializer.
8249 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8250 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8251 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8252 * spu-low.c (spu_arch_string): Remove.
8253 (spu_target_ops): Remove arch_string initializer.
8254 * win32-low.c (win32_arch_string): Remove.
8255 (win32_target_ops): Remove arch_string initializer.
8256 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8257 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8258 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8260 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8262 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8263 by collect_ptrace_register and supply_ptrace_register hooks.
8264 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8265 instead of checking for the_low_target.left_pad_xfer.
8266 (usr_store_inferior_registers): Use collect_ptrace_register callback
8267 instead of checking for the_low_target.left_pad_xfer.
8269 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8270 (s390_supply_ptrace_register): Likewise.
8271 (s390_fill_gregset): Call s390_collect_ptrace_register.
8272 (the_low_target): Update.
8274 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8275 (ppc_supply_ptrace_register): Likewise.
8276 (the_low_target): Update.
8278 * linux-i386-low.c (the_low_target): Update.
8279 * linux-x86-64-low.c (the_low_target): Update.
8281 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8283 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8284 reg-s390.o and reg-s390x.o.
8286 * linux-low.c (new_inferior): New global variable.
8287 (linux_create_inferior, linux_attach): Set it.
8288 (linux_wait_for_process): Call the_low_target.arch_setup after the
8289 target has stopped for the first time.
8290 (initialize_low): Do not call the_low_target.arch_setup.
8292 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8293 (s390_set_pc): Likewise.
8294 (s390_arch_setup): New function.
8295 (the_low_target): Use s390_arch_setup as arch_setup routine.
8297 * regcache.c (realloc_register_cache): New function.
8298 (set_register_cache): Call it for each existing regcache.
8300 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8302 * server.h (init_registers): Remove prototype.
8304 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8305 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8306 instead of init_registers ().
8307 * linux-arm-low.c (init_registers_arm): Add prototype.
8308 (init_registers_arm_with_iwmmxt): Likewise.
8309 (the_low_target): Add initializer for arch_setup field.
8310 * linux-cris-low.c (init_registers_cris): Add prototype.
8311 (the_low_target): Add initializer for arch_setup field.
8312 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8313 (the_low_target): Add initializer for arch_setup field.
8314 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8315 (the_low_target): Add initializer for arch_setup field.
8316 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8317 (the_low_target): Add initializer for arch_setup field.
8318 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8319 (the_low_target): Add initializer for arch_setup field.
8320 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8321 (the_low_target): Add initializer for arch_setup field.
8322 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8323 (init_registers_mips64_linux): Likewise.
8324 (the_low_target): Add initializer for arch_setup field.
8325 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8326 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8327 (the_low_target): Add initializer for arch_setup field.
8328 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8329 (init_registers_powerpc_64): Likewise.
8330 (the_low_target): Add initializer for arch_setup field.
8331 * linux-s390-low.c (init_registers_s390): Add prototype.
8332 (init_registers_s390x): Likewise.
8333 (the_low_target): Add initializer for arch_setup field.
8334 * linux-sh-low.c (init_registers_sh): Add prototype.
8335 (the_low_target): Add initializer for arch_setup field.
8336 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8337 (the_low_target): Add initializer for arch_setup field.
8338 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8339 (the_low_target): Add initializer for arch_setup field.
8341 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8342 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8343 instead of init_registers ().
8344 * win32-arm-low.c (init_registers_arm): Add prototype.
8345 (the_low_target): Add initializer for arch_setup field.
8346 * win32-i386-low.c (init_registers_i386): Add prototype.
8347 (the_low_target): Add initializer for arch_setup field.
8349 * spu-low.c (init_registers_spu): Add prototype.
8350 (initialize_low): Call initialie_registers_spu () instead of
8351 initialize_registers ().
8353 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8355 * server.c (handle_v_requests): When handling the vRun and vAttach
8356 packets, if already debugging a process, don't kill it. Return an
8359 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8361 * server.c (handle_query): Correct length check.
8363 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8365 * win32-low.c (do_initial_child_stuff): Add process handle
8366 parameter. Set current_process_handle and current_process_id from the
8367 parameters. Clear globals.
8368 (win32_create_inferior): Don't set current_process_handle and
8369 current_process_id here. Instead pass them on the call to
8370 do_initial_child_stuff.
8371 (win32_attach): Likewise.
8372 (win32_clear_inferiors): New.
8373 (win32_kill): Don't close the current process handle or the
8374 current thread handle here. Instead call win32_clear_inferiors.
8375 (win32_detach): Don't open a new handle to the process. Call
8376 win32_clear_inferiors.
8377 (win32_join): Don't rely on current_process_handle; open a new
8378 handle using the process id.
8379 (win32_wait): Call win32_clear_inferiors when the inferior process
8382 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8384 * server.c (monitor_show_help): Add "exit".
8386 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8388 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8389 (clean): Add reg-xtensa.c.
8390 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8391 * configure.srv (xtensa*-*-linux*) New target.
8392 * linux-xtensa-low.c: New.
8393 * xtensa-xtregs.c: New.
8395 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8397 * hostio.c: Don't include errno.h.
8398 (errno_to_fileio_errno): Move to hostio-errno.
8399 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8400 error number outputting to the target->hostio_last_error callback.
8401 (hostio_packet_error): Use FILEIO_EINVAL directly.
8402 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8403 calls to hostio_error.
8404 * hostio-errno.c: New.
8405 * server.h (hostio_last_error_from_errno): Declare.
8406 * target.h (target_ops): Add hostio_last_error member.
8407 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8408 as hostio_last_error handler.
8409 * spu-low.c (spu_target_ops): Likewise.
8410 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8411 (wince_hostio_last_error): New functions.
8412 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8413 as hostio_last_error handler.
8414 (win32_target_ops) [!_WIN32_WCE]: Register
8415 hostio_last_error_from_errno as hostio_last_error handler.
8416 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8417 (hostio-errno.o): New rule.
8418 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8419 * configure.srv (srv_hostio_err_objs): New variable. Default to
8421 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8422 * configure: Regenerate.
8424 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8426 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8427 (linux_kill, linux_detach): Clean up the process list.
8428 * remote-utils.c (remote_open): Improve port number parsing.
8429 (putpkt_binary, input_interrupt): Only send interrupts if the target
8431 * server.c (extended_protocol): Make static.
8432 (attached): Define earlier.
8433 (exit_requested, response_needed, program_argv): New variables.
8434 (target_running): New.
8435 (start_inferior): Clear attached here.
8436 (attach_inferior): Set attached here.
8437 (require_running): Define.
8438 (handle_query): Use require_running and target_running. Implement
8440 (handle_v_attach, handle_v_run): New.
8441 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8442 (gdbserver_usage): Update.
8443 (main): Redo argument parsing. Handle --debug and --multi. Handle
8444 --attach along with other options or after the port. Save
8445 program_argv. Support no initial program. Resynchronize
8446 communication with GDB after an error. Handle "monitor exit".
8447 Use require_running and target_running. Always allow the extended
8448 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8449 restart in extended mode.
8450 * README: Refer to the GDB manual. Update --attach usage.
8452 2007-12-20 Andreas Schwab <schwab@suse.de>
8454 * linux-low.c (STACK_SIZE): Define.
8455 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8456 (linux_test_for_tracefork): Likewise.
8458 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8460 * linux-low.c (linux_wait_for_event): Update messages. Do not
8461 reinsert auto-delete breakpoints.
8462 * mem-break.c (struct breakpoint): Change return type of handler to
8464 (set_breakpoint_at): Update handler type.
8465 (reinsert_breakpoint_handler): Return 1 instead of calling
8467 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8469 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8470 * mem-break.h (set_breakpoint_at): Update handler type.
8471 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8472 * win32-low.c (auto_delete_breakpoint): New.
8473 (get_child_debug_event): Use it.
8475 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8477 * configure.ac: Check for pread and pwrite.
8478 * hostio.c (handle_pread): Fall back to lseek and read.
8479 (handle_pwrite): Fall back to lseek and write.
8480 * config.in, configure: Regenerated.
8482 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8484 * server.c (myresume): Add own_buf argument.
8485 (main): Update calls.
8487 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8489 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8490 * remote-utils.c (remote_open): Do not call disable_async_io.
8491 (block_async_io): Delete.
8492 (unblock_async_io): Make static.
8493 (initialize_async_io): New.
8494 * server.c (handle_v_cont): Handle async I/O here.
8495 (myresume): Likewise. Move other common resume tasks here...
8496 (main): ... from here. Call initialize_async_io. Disable async
8497 I/O before the main loop.
8498 * server.h (initialize_async_io): Declare.
8499 (block_async_io, unblock_async_io): Delete prototypes.
8500 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8502 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8504 * remote-utils.c (readchar): Allow binary data in received messages.
8506 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8508 * win32-low.c (attaching): New global.
8509 (win32_create_inferior): Clear the `attaching' global.
8510 (win32_attach): Set the `attaching' global.
8511 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8512 attaching. Only set a breakpoint at the entry point if not
8515 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8517 * server.c (main): Don't report dll events on the initial
8518 connection on attaches.
8520 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8522 * server.c (main): Relax numerical bases supported for the pid of
8523 the --attach command line argument.
8525 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8527 * win32-low.c (win32_attach): Call OpenProcess before
8528 DebugActiveProcess, not after. Add last error output to error
8531 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8533 * win32-low.c (win32_get_thread_context)
8534 (win32_set_thread_context): New functions.
8535 (thread_rec): Use win32_get_thread_context.
8536 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8537 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8540 2007-12-03 Leo Zayas
8541 Pedro Alves <pedro_alves@portugalmail.pt>
8543 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8545 (child_add_thread): Minor cleanup.
8546 (child_continue): Resume artificially suspended threads before
8547 calling ContinueDebugEvent.
8548 (suspend_one_thread): New.
8549 (fake_breakpoint_event): New.
8550 (get_child_debug_event): Change return type to int. Check here if
8551 gdb sent an interrupt request. If a soft interrupt was requested,
8552 fake a breakpoint event. Return 0 if there is no event to handle,
8554 (win32_wait): Don't check here if gdb sent an interrupt request.
8555 Ensure there is a valid event to handle.
8556 (win32_request_interrupt): Add soft interruption method as last
8559 2007-12-03 Leo Zayas
8560 Pedro Alves <pedro_alves@portugalmail.pt>
8562 * win32-low.h (win32_thread_info): Add descriptions to the
8563 structure members. Replace `suspend_count' counter by a
8565 * win32-low.c (thread_rec): Update condition of when to get the
8566 context from the inferior. Rely on ContextFlags being set if it
8567 has already been retrieved. Only suspend the inferior thread if
8568 we haven't already. Warn if that fails.
8569 (continue_one_thread): s/suspend_count/suspended/. Only call
8570 ResumeThread once. Warn if that fails.
8572 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8574 * win32-low.c (win32_wait): Don't read from the inferior when it
8577 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8579 * Makefile.in (win32_low_h): New variable.
8580 (win32-low.o): Add dependency on $(win32_low_h).
8581 (win32-arm-low.o, win32-i386-low.o): New rules.
8583 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8585 * hostio.c: Correct copyright year.
8587 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8589 * Makefile.in (OBS): Add hostio.o.
8590 (hostio.o): New rule.
8591 * server.h (handle_vFile): Declare.
8592 * hostio.c: New file.
8593 * server.c (handle_v_requests): Take packet_len and new_packet_len
8594 for binary packets. Call handle_vFile.
8595 (main): Update call to handle_v_requests.
8597 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8599 * linux-low.c: Include <sched.h>.
8601 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8603 * linux-low.c (linux_tracefork_grandchild): New.
8604 (linux_tracefork_child): Use clone.
8605 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8607 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8609 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8611 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8613 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8615 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8617 * inferiors.c (change_inferior_id): Delete.
8618 (add_pid_to_list, pull_pid_from_list): New.
8619 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8620 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8621 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8622 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8623 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8624 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8625 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8626 (using_threads): Always set to 1.
8627 (handle_extended_wait): New.
8628 (add_process): Do not set TID.
8629 (linux_create_inferior): Set must_set_ptrace_flags.
8630 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8631 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8632 (linux_thread_alive): Rename TID argument to LWPID.
8633 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8634 (linux_wait_for_event): Do not use TID or check using_threads. Update
8635 call to dead_thread_notify. Call handle_extended_wait.
8636 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8637 (send_sigstop): Delete sigstop_sent.
8638 (wait_for_sigstop): Avoid TID.
8639 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8640 (linux_test_for_tracefork): New.
8641 (linux_lookup_signals): Use thread_db_active and
8642 linux_supports_tracefork_flag.
8643 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8644 * linux-low.h (get_process_thread): Avoid TID.
8645 (struct process_ifo): Move thread_known and tid to the end. Remove
8647 (linux_attach_lwp, thread_db_init): Update prototypes.
8648 * server.h (change_inferior_id): Delete prototype.
8649 (add_pid_to_list, pull_pid_from_list): New prototypes.
8650 * thread-db.c (thread_db_use_events): New.
8651 (find_first_thread): Rename to...
8652 (find_one_thread): ...this. Update callers and messages. Do not
8653 call fatal. Check thread_db_use_events. Do not call
8654 change_inferior_id or new_thread_notify.
8655 (maybe_attach_thread): Update. Do not call new_thread_notify.
8656 (thread_db_init): Set thread_db_use_events. Check use_events.
8657 * utils.c (fatal, warning): Correct message prefix.
8659 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8661 * Makefile.in (clean): Remove new files.
8662 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8663 (powerpc-64.o, powerpc-64.c): New rules.
8664 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8665 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8667 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8669 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8670 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8671 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8672 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8673 (target_regsets): Add AltiVec and SPE register sets.
8674 * configure.ac: Check for AltiVec and SPE.
8675 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8676 (ppc_fill_vrregset, ppc_store_vrregset): New.
8677 (target_regsets): Add AltiVec register set.
8678 * configure: Regenerated.
8680 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8682 * linux-low.c (O_LARGEFILE): Define.
8683 (linux_read_memory): Use /proc/PID/mem.
8684 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8685 * configure, config.in: Regenerated.
8687 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8689 * linux-low.c (linux_wait_for_event): Do not pass signals while
8692 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8694 * win32-low.c (create_process): New.
8695 (win32_create_inferior): Use create_process instead of
8696 CreateProcess. If create_process failed retry appending an ".exe"
8697 suffix. Store the GetLastError result immediatelly after
8698 create_process calls and use it on the call to error.
8700 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8702 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8704 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8706 * configure.ac: Switch license to GPLv3.
8708 2007-08-01 Michael Snyder <msnyder@access-company.com>
8710 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8712 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8714 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8716 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8717 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8718 CloseToolhelp32Snapshot.
8719 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8720 CloseToolhelp32Snapshot.
8722 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8724 * server.c (main): Check for inferior exit before main loop.
8726 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8728 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8729 instead of on tmp_desc.
8731 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8732 Daniel Jacobowitz <dan@codesourcery.com>
8734 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8735 (add_thread): Minor cleanups.
8736 (clear_inferiors): Move lower in the file. Clear the DLL
8738 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8739 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8740 (xml_escape_text): New.
8741 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8743 (handle_v_cont): Report errors.
8744 (gdbserver_version): Update.
8745 (main): Correct size of own_buf. Do not report initial DLL events.
8746 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8747 (unloaded_dll, xml_escape_text): New.
8748 * win32-low.c (enum target_waitkind): Update comments.
8749 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8750 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8751 (win32_EnumProcessModules, win32_GetModuleInformation)
8752 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8753 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8754 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8755 (win32_Module32First, win32_Module32Next, load_toolhelp)
8756 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8757 (get_child_debug_event): Handle DLL events.
8758 (win32_wait): Likewise.
8760 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8762 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8763 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8765 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8767 * win32-low.c (handle_output_debug_string): Ignore event if not
8770 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8772 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8774 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8776 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8778 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8780 * inferiors.c (change_inferior_id): Add comment.
8781 * linux-low.c (check_removed_breakpoint): Add an early
8782 prototype. Improve debug output.
8783 (linux_attach): Doc update.
8784 (linux_detach_one_process, linux_detach): Clean up before releasing
8786 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8787 * linux-low.h (struct process_info): Doc improvement.
8788 * mem-break.c (delete_all_breakpoints): New.
8789 * mem-break.h (delete_all_breakpoints): New prototype.
8790 * thread-db.c (find_first_thread): New.
8791 (thread_db_create_event): Call it instead of
8792 thread_db_find_new_threads. Clean up unused variables.
8793 (maybe_attach_thread): Remove first thread handling.
8794 (thread_db_find_new_threads): Use find_first_thread.
8795 (thread_db_get_tls_address): Likewise.
8797 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8799 * thread-db.c (thread_db_find_new_threads): Add prototype.
8800 (thread_db_create_event): Check for the main thread before adding
8802 (maybe_attach_thread): Only enable event reporting if TID == 0.
8803 (thread_db_get_tls_address): Check for new threads.
8805 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8807 * linux-low.c (linux_create_inferior): Try execv before execvp.
8808 * spu-low.c (spu_create_inferior): Likewise.
8810 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8812 * linux-low.c (linux_create_inferior): Change execv to execvp.
8813 * spu-low.c (spu_create_inferior): Likewies.
8815 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8817 * Makefile.in (clean): Clean new files instead of deleted ones.
8818 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8819 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8821 * configure.srv: Specify XML files and new regformats for MIPS and
8823 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8824 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8825 an entry for the restart register.
8826 (mips_cannot_fetch_register, mips_cannot_store_register)
8827 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8828 register names to match the XML descriptions.
8829 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8830 restart register instead of $0.
8832 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8833 Markus Deuling <deuling@de.ibm.com>
8835 * remote-utils.c (decode_xfer_write): New function.
8836 * server.h (decode_xfer_write): Add prototype.
8837 * server.c (handle_query): Add PACKET_LEN argument. Support
8838 qXfer:spu:read and qXfer:spu:write packets.
8839 (main): Pass packet_len to handle_query.
8840 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8841 * target.h (target_ops): Add qxfer_spu.
8843 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8845 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8846 accessing non-seekable spufs files.
8848 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8850 * server.c (handle_query): Add reply for qC packet.
8852 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8853 Leo Zayas <lerele@champenstudios@com>
8855 * server.h (check_remote_input_interrupt_request): New function.
8856 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8857 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8858 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8859 (check_remote_input_interrupt_request): New function.
8860 * server.h (check_remote_input_interrupt_request): Declare.
8861 * win32-low.c (winapi_DebugBreakProcess,
8862 winapi_GenerateConsoleCtrlEvent): New typedefs.
8863 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8865 (win32_wait): Check for remote interrupt request
8866 with check_remote_input_interrupt_request.
8867 (win32_request_interrupt): New function.
8868 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8870 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8872 * win32-low.c (debug_registers_changed,
8873 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8874 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8875 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8876 (thread_rec): Get context using the low target.
8877 (child_add_thread): Call thread_added on the low target,
8878 which does the same thing.
8880 (do_initial_child_stuff): Remove debug registers references.
8881 Set context using the low target. Resume threads after
8882 setting the contexts.
8883 (child_continue): Remove dead variable. Remove debug
8884 registers references.
8885 (child_fetch_inferior_registers): Go through the low target.
8886 (do_child_store_inferior_registers): Remove.
8887 (child_store_inferior_registers): Go through the low target.
8888 (win32_resume): Remove debug registers references.
8889 Set context using the low target.
8890 (handle_exception): Change return type to void. Don't record
8891 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8892 first chance exception.
8893 (get_child_debug_event): Change return type to void. Remove
8894 goto loop. Always return after waiting for debug event.
8895 (win32_wait): Convert to switch statement. Handle spurious
8898 * win32-i386-low.c (debug_registers_changed,
8899 debug_registers_used): New.
8900 (initial_stuff): Rename to ...
8901 (i386_initial_stuff): ... this. Clear debug registers
8903 (store_debug_registers): Delete.
8904 (i386_get_thread_context): New.
8905 (load_debug_registers): Delete.
8906 (i386_set_thread_context): New.
8907 (i386_thread_added): New.
8908 (single_step): Rename to ...
8909 (i386_single_step): ... this.
8910 (do_fetch_inferior_registers): Rename to ...
8911 (i386_fetch_inferior_register): ... this.
8912 (i386_store_inferior_register): New.
8913 (the_low_target): Adapt to new interface.
8915 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8916 (arm_get_thread_context): New.
8917 (arm_set_thread_context): New.
8919 (do_fetch_inferior_registers): Rename to ...
8920 (arm_fetch_inferior_register): ... this.
8921 (arm_store_inferior_register): New.
8922 (arm_wince_breakpoint): Reimplement as unsigned long.
8923 (arm_wince_breakpoint_len): Define.
8924 (the_low_target): Adapt to new interface.
8926 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8927 load_debug_registers. Add get_thread_context, set_thread_context,
8928 thread_added and store_inferior_register. Rename
8929 fetch_inferior_registers to fetch_inferior_register.
8930 (regptr): Remove declaration.
8932 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8934 * linux-low.c (linux_detach): Change return type to int. Return 0.
8935 * spu-low.c (spu_detach): Likewise.
8937 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8939 * target.h (target_ops): Change return type of detach to int.
8941 (join_inferior): New.
8942 * server.c (main): Don't skip detach support on mingw32.
8943 If the inferior doesn't support detaching return error.
8944 Call join_inferior instead of using waitpid.
8945 * linux-low.c (linux_join): New.
8946 (linux_target_op): Add linux_join.
8947 * spu-low.c (spu_join): New.
8948 (spu_target_ops): Add spu_join.
8949 * win32-low.c (win32_detach): Adapt to new interface.
8950 Reopen current_process_handle before detaching. Issue a child
8951 resume before detaching.
8953 (win32_target_op): Add win32_join.
8955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8957 * win32-low.c (win32-attach): Fix return value.
8958 * target.h (target_ops): Describe ATTACH return values.
8960 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8962 * win32-low.c (GETPROCADDRESS): Define.
8963 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8964 (winapi_DebugSetProcessKillOnExit): Likewise.
8965 (win32_create_inferior): Force usage of ansi CreateProcessA.
8966 (win32_attach): Use GETPROCADDRESS.
8967 (win32_detach): Likewise.
8969 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8971 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8973 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8975 * win32-low.c: Commit leftover changes from 2007-03-29.
8977 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8979 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8980 fields short instead of int. Add explicit padding.
8981 (i387_cache_to_fsave): Remove unnecessary casts.
8982 (i387_fsave_to_cache): Doc fix.
8983 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8985 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8987 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8988 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8990 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8992 * configure.srv (arm*-*-mingw32ce*): Move near the other
8995 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8997 * configure.ac: Add errno checking.
8998 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8999 sys/file.h and malloc.h.
9000 (AC_CHECK_DECLS): Add perror.
9001 (srv_mingwce): Handle.
9002 * configure.srv (i[34567]86-*-cygwin*): Add
9003 win32-i386-low.o to srv_tgtobj.
9004 (i[34567]86-*-mingw*): Likewise.
9005 (arm*-*-mingw32ce*): Add case.
9006 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9007 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9008 [__MINGW32CE__] (strerror): New function.
9009 [__MINGW32CE__] (errno): Define to GetLastError.
9010 [__MINGW32CE__] (COUNTOF): New macro.
9011 (remote_open): Remove extra close call.
9012 * mem-break.c (delete_breakpoint_at): New function.
9013 * mem-break.h (delete_breakpoint_at): Declare.
9014 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9015 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9016 [USE_WIN32API] (read, write): Add char* casts.
9017 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9018 * server.h: Include wincecompat.h on Windows CE.
9019 [HAVE_ERRNO_H]: Check.
9020 (perror): Declare if not declared.
9021 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9022 (perror_with_name): Remove errno declaration.
9023 * wincecompat.h: New.
9024 * wincecompat.c: New.
9026 * win32-arm-low.c: New.
9027 * win32-i386-low.c: New.
9028 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9029 (OUTMSG2): Make it safe.
9031 (COUNTOF): New macro.
9032 (NUM_REGS): Get it from the low target.
9033 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9034 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9035 (thread_rec): Let low target handle debug registers.
9036 (child_add_thread): Likewise.
9037 (child_init_thread_list): Likewise.
9038 (continue_one_thread): Likewise.
9040 (do_child_fetch_inferior_registers): Move to ...
9041 * win32-i386-low.c: ... here, and rename to ...
9042 (do_fetch_inferior_registers): ... this.
9043 * win32-low.c (child_fetch_inferior_registers):
9044 Go through the low target.
9045 (do_child_store_inferior_registers): Use regptr.
9046 (strwinerror): New function.
9047 (win32_create_inferior): Handle Windows CE.
9048 Use strwinerror instead of strerror on Windows error
9049 codes. Add program to the error output.
9050 Don't close the main thread handle on Windows CE.
9051 (win32_attach): Use coredll.dll on Windows CE.
9052 (win32_kill): Close current process and current
9054 (win32_detach): Use coredll.dll on Windows CE.
9055 (win32_resume): Let low target handle debug registers, and
9057 (handle_exception): Add/Remove initial breakpoint. Avoid
9058 non-existant WSTOPSIG on Windows CE.
9059 (win32_read_inferior_memory): Cast to remove warning.
9060 (win32_arch_string): Go through the low target.
9061 (initialize_low): Call set_breakpoint_data with the low
9062 target's breakpoint.
9063 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9064 FOP_REGNUM, mappings): Move to ...
9065 * win32-i386-low.c: ... here.
9066 * win32-low.c (win32_thread_info): Move to ...
9067 * win32-low.h: ... here.
9068 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9069 win32-arm-low.c and wincecompat.c.
9070 (all:): Add $EXEEXT.
9071 (install-only:): Likewise.
9072 (gdbserver:): Likewise.
9073 (gdbreplay:): Likewise.
9074 * config.in: Regenerate.
9075 * configure: Regenerate.
9077 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9079 * win32-low.c: Rename typedef thread_info to
9080 win32_thread_info throughout.
9082 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9084 * win32-i386-low.c: Rename to ...
9085 * win32-low.c: ... this.
9086 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9087 * Makefile.in: Likewise.
9089 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9091 * remote-utils.c (monitor_output): Constify msg parameter.
9092 * server.h (monitor_output): Likewise.
9093 * win32-i386-low.c (handle_output_debug_string): New.
9094 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9095 handle_output_debug_string.
9096 (get_child_debug_event): Likewise.
9098 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9100 * server.c (main): Correct strtoul check.
9102 2007-03-27 Jon Ringle <jon@ringle.org>
9104 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9106 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9108 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9110 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9112 * terminal.h: Check HAVE_SGTTY_H.
9114 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9116 * remote-utils.c (remote_open): Print out the assigned port number.
9118 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9120 * remote-utils.c (monitor_output): New function.
9121 * server.c (debug_threads): Define here.
9122 (monitor_show_help): New function.
9123 (handle_query): Handle qRcmd.
9124 (main): Do not handle 'd' packet.
9125 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9126 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9129 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9131 * Makefile.in (EXEEXT): New.
9132 (clean): Use $(EXEEXT).
9134 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9136 * target.h (target_ops): Rename send_signal to request_interrupt,
9137 and remove enum target_signal parameter.
9138 * linux-low.c (linux_request_interrupt): Rename from
9139 linux_send_signal, and always send SIGINT.
9140 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9141 and always send SIGINT.
9142 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9144 (input_interrupt): Likewise.
9146 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9148 * server.c (get_features_xml): Check if target implemented
9150 * win32-i386-low.c (win32_arch_string): New.
9151 (win32_target_ops): Add win32_arch_string as arch_string member.
9153 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9155 * spu-low.c (spu_arch_string): New.
9156 (spu_target_ops): Add spu_arch_string.
9158 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9160 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9161 * configure.ac: Do not check for terminal.h.
9162 * configure, config.in: Regenerated.
9164 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9166 * Makefile.in (OBS): Add $(XML_BUILTIN).
9167 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9169 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9170 (arm-with-iwmmxt.c): New.
9171 * config.in, configure: Regenerate.
9172 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9173 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9174 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9175 (arm*-*-linux*): Add iWMMXt and regset support.
9176 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9177 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9178 (arm_store_wmmxregset, target_regsets): New.
9179 * server.c (get_features_xml): Take annex argument. Check builtin
9181 (handle_query): Handle multiple annexes.
9183 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9185 * remote-utils.c [USE_WIN32API] (read, write): Define.
9186 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9189 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9191 * linux-i386-low.c (the_low_target): Set arch_string.
9192 * linux-x86-64-low.c (the_low_target): Likewise.
9193 * linux-low.c (linux_arch_string): New.
9194 (linux_target_ops): Add it.
9195 * linux-low.h (struct linux_target_ops): Add arch_string.
9196 * server.c (write_qxfer_response): Use const void * for DATA.
9197 (get_features_xml): New.
9198 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9199 * target.h (struct target_ops): Add arch_string method.
9201 2007-01-03 Denis Pilat <denis.pilat@st.com>
9202 Daniel Jacobowitz <dan@codesourcery.com>
9204 * linux-low.c (linux_kill): Handle being called with no threads.
9205 * win32-i386-low.c (win32_kill): Likewise.
9206 (get_child_debug_event): Clear current_process_handle.
9208 2006-12-30 Denis PILAT <denis.pilat@st.com>
9209 Daniel Jacobowitz <dan@codesourcery.com>
9211 * remote-utils.c (remote_open): Check the type of specified
9212 serial port devices before opening them.
9213 * server.c (main): Kill the inferior if an error occurs during
9214 the first remote_open.
9216 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9218 * README: Update supported targets.
9220 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9222 * Makefile.in (clean): Remove reg-mips64.c.
9223 (reg-mips64.c, reg-mips64.o): New rules.
9224 * configure.srv: Handle mips64. Include regset support for mips.
9225 * linux-mips-low.c (union mips_register): New.
9226 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9227 (mips_breakpoint, mips_breakpoint_at): Use int.
9228 (mips_collect_register, mips_supply_register)
9229 (mips_collect_register_32bit, mips_supply_register_32bit)
9230 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9231 (mips_store_fpregset, target_regsets): New.
9232 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9234 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9236 * configure.srv: Add target "spu*-*-*".
9237 * Makefile.in (clean): Remove reg-spu.c.
9238 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9239 * spu-low.c: New file.
9241 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9243 * configure.ac: Correct td_thr_tls_get_addr test.
9244 * configure: Regenerated.
9246 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9248 * linux-low.c (linux_wait_for_event): Reformat. Use the
9250 * remote-utils.c (decode_address_to_semicolon): New.
9251 * server.c (pass_signals, handle_general_set): New.
9252 (handle_query): Mention QPassSignals for qSupported.
9253 (main): Call handle_general_set.
9254 * server.h (pass_signals, decode_address_to_semicolon): New.
9256 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9258 * server.c (handle_query): Correct error handling for read_auxv.
9260 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9262 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9263 and srv_linux_thread_db to yes.
9264 * linux-s390-low.c (s390_fill_gregset): New function.
9265 (target_regsets): Define data structure.
9267 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9269 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9270 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9271 * config.in, configure: Regenerated.
9272 * inferiors.c (gdb_id_to_thread): New function.
9273 (gdb_id_to_thread_id): Use it.
9274 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9275 * linux-low.h (struct process_info): Add th member.
9276 (thread_db_get_tls_address): New prototype.
9277 * remote-utils.c (decode_address): Make non-static.
9278 * server.c (handle_query): Handle qGetTLSAddr.
9279 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9280 * target.h (struct target_ops): Add get_tls_address.
9281 * thread-db.c (maybe_attach_thread): Save the thread handle.
9282 (thread_db_get_tls_address): New.
9284 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9286 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9287 (linux_resume_one_process): Take a siginfo_t *. Update all
9288 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9289 (struct pending_signals): Add a siginfo_t.
9290 (linux_wait_for_process): Always set last_status.
9291 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9292 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9293 * linux-low.h (struct process_info): Add last_status.
9295 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9297 * remote-utils.c (try_rle): New function.
9298 (putpkt_binary): Use it.
9300 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9302 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9303 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9304 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9305 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9306 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9309 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9311 * server.c (terminal_fd): New variable.
9312 (old_foreground_pgrp): Likewise.
9313 (restore_old_foreground_pgrp): New function.
9314 (start_inferior): Record the terminal file descriptor in terminal_fd
9315 and its original foreground group in old_foreground_pgrp. Register
9316 restore_old_foreground_pgrp with atexit().
9318 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9320 * server.c (handle_query): Correct qPart to qXfer.
9322 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9324 * configure.ac: Check for more headers which are missing on
9325 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9326 * configure.srv: Add Cygwin and mingw32.
9327 * remote-utils.c: Don't include headers unconditionally which
9328 are missing on mingw32. Include <winsock.h> for mingw32.
9329 (remote_open): Adjust for mingw32 support. Flush
9330 standard error after writing to it.
9331 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9332 (unblock_async_io, enable_async_io, disable_async_io)
9333 (readchar, getpkt): Update for Winsock support.
9334 (prepare_resume_reply): Expect a protocol signal number.
9335 * server.c: Disable <sys/wait.h> on mingw32.
9336 (start_inferior): Adjust for mingw32 support. Flush
9337 standard error after writing to it.
9338 (attach_inferior): Likewise. Use protocol signal
9340 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9342 * win32-i386-low.c: New file.
9343 * Makefile.in (XM_CLIBS): Set.
9344 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9345 (win32-i386-low.o): New dependency rule.
9346 * linux-low.c (linux_wait): Use target signal numbers.
9347 * target.h (struct target_ops): Doc fix.
9348 * server.h (target_signal_to_name): New prototype.
9349 * gdbreplay.c: Don't include headers unconditionally which
9350 are missing on mingw32. Include <winsock.h> for mingw32.
9351 (remote_close, remote_open): Adjust for Winsock support.
9352 * configure, config.in: Regenerated.
9354 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9356 * server.c (decode_xfer_read, write_qxfer_response): New.
9357 (handle_query): Take a packet length argument. Handle
9358 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9359 the qSupported response.
9360 (main): Update call to handle_query.
9362 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9364 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9365 (putpkt_binary): Renamed from putpkt and adjusted for binary
9367 (putpkt): New wrapper for putpkt_binary.
9368 (readchar): Don't mask off the high bit.
9369 (decode_X_packet): New function.
9370 * server.c (main): Call putpkt_binary if a handler sets the packet
9371 length. Save the length of the incoming packet. Handle 'X'.
9372 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9374 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9376 * server.c (handle_query): Handle qSupported.
9378 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9380 * remote-utils.c (all_symbols_looked_up): New variable.
9381 (look_up_one_symbol): Check it.
9382 * server.h (look_up_one_symbol): New declaration.
9383 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9385 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9387 * Makefile.in (linux-arm-low.o): Update dependencies.
9388 * linux-arm-low.c: Include "gdb_proc_service.h".
9389 (PTRACE_GET_THREAD_AREA): Define.
9390 (ps_get_thread_area): New function.
9392 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9394 * configure.srv (m68k*-*-uclinux*): New target.
9395 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9396 (linux_resume_one_process): Remove extraneous cast.
9397 (linux_read_offsets): New.
9398 (linux_target_op): Add linux_read_offsets on mmuless systems.
9399 * server.c (handle_query): Add qOffsets logic.
9400 * target.h (struct target_ops): Add read_offsets.
9402 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9404 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9405 (PTRACE_GET_THREAD_AREA): Define.
9406 (ps_get_thread_area): New function.
9407 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9408 (linux-x86-64-low.o): Update.
9410 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9412 * configure.ac: Remove checks for prfpregset_t.
9413 * gdb_proc_service.h: New file.
9414 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9415 new "gdb_proc_service.h".
9416 * proc-service.c: Likewise.
9417 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9418 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9419 * Makefile.in (gdb_proc_service_h): Updated.
9420 * configure, config.in: Regenerated.
9422 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9424 * remote-utils.c (prepare_resume_reply): Move declaration
9425 of gdb_id_from_wait to the top of the block.
9427 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9429 * linux-low.c (regsets_store_inferior_registers): Read the regset
9430 from the target before filling it.
9432 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9434 * server.c (attach_inferior): Return SIGTRAP for a successful
9437 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9439 * Makefile.in (OBS): Add version.o.
9440 (STAGESTUFF): Delete.
9441 (version.o): Add dependencies.
9442 (version.c): Replace rule.
9443 (clean): Remove version.c.
9444 * server.c (gdbserver_version): New.
9445 (gdbserver_usage): Use printf.
9446 (main): Handle --version and --help.
9447 * server.h (version, host_name): Add declarations.
9449 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9461 * linux-x86-64-low.c:
9464 * linux-ppc64-low.c:
9473 * linux-crisv32-low.c:
9485 * gdbserver.1: Add (C) after Copyright. Update the FSF
9488 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9490 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9491 (arm_breakpoint_at): Recognize both breakpoints.
9492 (the_low_target): Use the correct breakpoint instruction.
9494 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9496 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9497 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9498 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9499 (the_low_target): Update.
9501 2005-10-25 Andreas Schwab <schwab@suse.de>
9503 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9505 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9506 (ia64_num_regs): Reduce to 462.
9508 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9510 * acinclude.m4: Correct quoting.
9511 * aclocal.m4: Regenerated.
9513 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9514 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9515 (thread_db_init): Call thread_db_err_str.
9516 * configure.ac: Check for TD_VERSION.
9517 * config.in, configure: Regenerated.
9519 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9521 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9523 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9525 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9526 is not available. Define HAVE_PTRACE_GETREGS if it is.
9527 * config.in, configure: Regenerated.
9528 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9529 * linux-i386-low.c, linux-m68k-low.c: Update to use
9530 HAVE_PTRACE_GETREGS.
9531 * linux-low.c (regsets_fetch_inferior_registers)
9532 (regsets_store_inferior_registers): Only return 0 if we processed
9534 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9535 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9537 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9539 * inferiors.c (struct thread_info): Add gdb_id.
9540 (add_thread): Add gdb_id argument.
9541 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9542 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9543 calls to add_thread.
9544 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9545 * server.c (handle_query): Use thread_to_gdb_id.
9546 (handle_v_cont, main): Use gdb_id_to_thread_id.
9547 * server.h (add_thread): Update prototype.
9548 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9551 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9553 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9554 left-padded registers.
9555 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9556 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9558 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9560 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9561 * configure: Regenerate.
9562 * config.in: Regenerate.
9563 * server.h (NEED_DECLARATION_STRERROR):
9564 Replace with !HAVE_DECL_STRERROR.
9566 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9568 * linux-low.c (linux_wait, linux_send_signal): Don't test
9569 an unsigned long variable for > 0 if it could be MAX_ULONG.
9570 * server.c (myresume): Likewise.
9571 * target.c (set_desired_inferior): Likewise.
9573 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9575 * configure.ac: Simplify and improve check for socklen_t.
9576 * configure, config.in: Regenerate.
9578 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9580 * acconfig.h: Remove.
9581 * configure.ac: Add a test for socklen_t. Use three-argument
9582 AC_DEFINE throughout.
9583 * config.in: Regenerated using autoheader 2.59.
9584 * configure: Regenerated.
9586 * gdbreplay.c (socklen_t): Provide a default.
9587 (remote_open): Use socklen_t.
9588 * remote-utils.c (socklen_t): Provide a default.
9589 (remote_open): Use socklen_t.
9590 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9593 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9595 * linux-low.c (linux_read_memory, linux_write_memory)
9596 (linux_read_auxv): Likewise.
9597 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9598 (check_mem_write): Likewise.
9599 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9601 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9602 (registers_from_string, register_data): Likewise.
9603 * server.c (handle_query, main): Likewise.
9604 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9605 (decode_M_packet): Likewise.
9606 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9607 * target.h (struct target_ops): Update read_memory, write_memory,
9609 (read_inferior_memory, write_inferior_memory): Update.
9610 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9612 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9613 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9614 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9615 linux-s390-low.c, linux-sh-low.c: Update for changes in
9616 read_inferior_memory and the_low_target->breakpoint.
9618 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9620 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9621 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9622 * configure.srv: Add powerpc64-*-linux*.
9623 * linux-ppc64-low.c: New file.
9625 2005-05-23 Orjan Friberg <orjanf@axis.com>
9627 * linux-cris-low.c: New file with support for CRIS.
9628 * linux-crisv32-low.c: Ditto for CRISv32.
9629 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9630 (clean): Add reg-cris.c and reg-crisv32.c.
9631 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9632 reg-crisv32.o, and reg-crisv32.c to make rules.
9633 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9636 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9638 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9639 of sizeof (PTRACE_XFER_TYPE).
9640 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9642 2005-05-12 Orjan Friberg <orjanf@axis.com>
9644 * target.h (struct target_ops): Add insert_watchpoint,
9645 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9646 pointers for hardware watchpoint support.
9647 * linux-low.h (struct linux_target_ops): Ditto.
9648 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9649 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9650 to linux_target_ops.
9651 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9653 * server.c (main): Recognize 'Z' and 'z' packets.
9655 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9657 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9658 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9659 (the_low_target): Add new members.
9661 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9663 * proc-service.c (ps_lgetregs): Search all_processes instead of
9666 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9668 * server.c (start_inferior): Change return type to int.
9669 (attach_inferior): Change sigptr to int *.
9670 (handle_v_cont, handle_v_requests): Change signal to int *.
9671 (main): Change signal to int.
9673 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9675 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9676 * configure.srv: Add m32r*-*-linux*.
9677 * linux-m32r-low.c: New file.
9679 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9681 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9683 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9685 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9686 Take unsigned long arguments for PIDs.
9687 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9688 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9689 (wait_for_sigstop, linux_resume_one_process)
9690 (regsets_fetch_inferior_registers, linux_send_signal)
9691 (linux_read_auxv): Likewise. Update the types of variables holding
9692 PIDs. Update format string specifiers.
9693 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9694 * remote-utils.c (prepare_resume_reply): Likewise.
9695 * server.c (cont_thread, general_thread, step_thread)
9696 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9698 (handle_query): Update format specifiers.
9699 (handle_v_cont, main): Use strtoul for thread IDs.
9700 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9701 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9702 (general_thread, step_thread, thread_from_wait)
9703 (old_thread_from_wait): Update.
9704 * target.h (struct thread_resume): Use unsigned long for THREAD.
9705 (struct target_ops): Use unsigned long for arguments to attach and
9708 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9710 * acinclude.m4: Include bfd/bfd.m4 directly.
9711 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9712 <agriffis@toolchain.org>.
9713 * aclocal.m4, configure: Regenerated.
9715 2005-01-07 Andrew Cagney <cagney@gnu.org>
9717 * configure.ac: Rename configure.in, require autoconf 2.59.
9718 * configure: Re-generate.
9720 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9722 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9724 * aclocal.m4: Regenerated.
9725 * configure: Regenerated.
9727 2004-11-21 Andreas Schwab <schwab@suse.de>
9729 * linux-m68k-low.c (m68k_num_gregs): Define.
9730 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9731 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9732 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9733 (m68k_breakpoint_at): New. Add to the_low_target.
9735 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9736 srv_linux_thread_db to yes.
9738 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9740 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9741 (ARCH_SET_FS): Likewise.
9742 (ARCH_GET_FS): Likewise.
9743 (ARCH_GET_GS): Likewise.
9745 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9747 * linux-i386-low.c (ps_get_thread_area): New.
9748 * linux-x86-64-low.c (ps_get_thread_area): New.
9749 * linux-low.c: Include <sys/syscall.h>.
9750 (linux_kill_one_process): Don't kill the first thread here.
9751 (linux_kill): Kill the first thread here.
9752 (kill_lwp): New function.
9753 (send_sigstop, linux_send_signal): Use it.
9754 * proc-service.c: Clean up #ifdefs.
9755 (fpregset_info): Delete.
9756 (ps_lgetregs): Update and enable implementation.
9757 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9759 * remote-utils.c (struct sym_cache, symbol_cache): New.
9760 (input_interrupt): Print a clearer message.
9761 (async_io_enabled): New variable.
9762 (enable_async_io, disable_async_io): Use it. Update comments.
9763 (look_up_one_symbol): Use the symbol cache.
9764 * thread-db.c (thread_db_look_up_symbols): New function.
9765 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9767 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9769 * configure.in: Test for -rdynamic.
9770 * configure: Regenerated.
9771 * Makefile (INTERNAL_LDFLAGS): New.
9772 (gdbserver, gdbreplay): Use it.
9774 2004-09-02 Andrew Cagney <cagney@gnu.org>
9776 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9778 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9780 * linux-low.c (linux_wait): Clear all_processes list also.
9782 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9784 * linux-low.c: Include <errno.h>. Remove extern declaration of
9787 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9789 * gdbreplay.c, server.h, utils.c: Update copyright years.
9791 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9793 * server.c (main): Print child status or termination signal from
9794 variable 'signal', not 'sig'.
9796 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9798 * linux-low.c (linux_read_memory): Change return type to
9799 int. Check for and return error from ptrace().
9800 * target.c (read_inferior_memory): Change return type to int. Pass
9801 back return status from the_target->read_memory().
9802 * target.h (struct target_ops): Adapt *read_memory() prototype.
9804 (read_inferior_memory): Adapt prototype.
9805 * server.c (main): Return an error packet if
9806 read_inferior_memory() returns an error.
9808 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9810 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9811 Unify with other clean targets.
9813 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9815 * server.c (handle_v_cont): Call set_desired_inferior.
9817 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9819 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9821 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9823 * linux-low.c (linux_wait): Unblock async I/O.
9824 (linux_resume): Block and enable async I/O.
9825 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9826 * server.h (block_async_io, unblock_async_io): Add prototypes.
9828 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9830 * remote-utils.c (remote_open): Print a status notice after
9832 * server.c (attach_inferior): Print a status notice after
9835 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9837 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9839 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9841 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9843 * server.c, target.h: Update copyright years.
9845 2004-02-25 Roland McGrath <roland@redhat.com>
9847 * target.h (struct target_ops): New member `read_auxv'.
9848 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9849 * linux-low.c (linux_read_auxv): New function.
9850 (linux_target_ops): Initialize `read_auxv' member to that.
9852 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9854 Committed by Jim Blandy <jimb@redhat.com>.
9856 * linux-s390-low.c (s390_num_regs): Update.
9857 (s390_regmap): Remove control registers. Use __s390x__ predefine
9858 instead of GPR_SIZE to distiguish s390 and s390x targets.
9860 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9862 * linux-low.c: Update copyright year.
9863 (check_removed_breakpoint): Clear pending_is_breakpoint.
9864 (linux_set_resume_request, linux_queue_one_thread)
9865 (resume_status_pending_p): New functions.
9866 (linux_continue_one_thread): Use process->resume.
9867 (linux_resume): Only resume threads if there are no pending events.
9868 * linux-low.h (struct process_info): Add resume request
9871 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9873 * regcache.c (new_register_cache): Clear the allocated register
9874 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9876 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9878 * linux-low.c (linux_resume): Take a struct thread_resume *
9880 (linux_wait): Update call.
9881 (resume_ptr): New static variable.
9882 (linux_continue_one_thread): Renamed from
9883 linux_continue_one_process. Use resume_ptr.
9884 (linux_resume): Use linux_continue_one_thread.
9885 * server.c (handle_v_cont, handle_v_requests): New functions.
9886 (myresume): New function.
9887 (main): Handle 'v' case.
9888 * target.h (struct thread_resume): New type.
9889 (struct target_ops): Change argument of "resume" to struct
9891 (myresume): Delete macro.
9893 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9895 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9896 (uninstall): Support DESTDIR.
9898 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9900 * configure.srv: Add xscale*linux copy of arm*linux entry.
9902 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9904 * linux-arm-low.c (arm_reinsert_addr): New function.
9905 (the_low_target): Add arm_reinsert_addr.
9907 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9909 * mem-break.c: Remove whitespace at end of file.
9911 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9913 * configure.in: Check whether we need to prototype strerror.
9914 * server.h: Optionally prototype strerror.
9915 * gdbreplay.c (perror_with_name): Use strerror.
9916 * linux-low.c (linux_attach_lwp): Use strerror.
9917 * utils.c (perror_with_name): Use strerror.
9918 * config.in, configure: Regenerated.
9920 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9922 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9923 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9925 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9927 * Makefile.in (SFILES): Update.
9928 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9929 low-sun3.c: Remove files.
9931 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9933 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9934 (linux_detach_one_process, linux_detach): New functions.
9935 (linux_target_ops): Add linux_detach.
9936 * server.c (main): Handle 'D' packet.
9937 * target.h (struct target_ops): Add "detach" member.
9938 (detach_inferior): Define.
9940 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9942 From Kelley Cook <kelleycook@wideopenwest.com>:
9943 * configure.srv: Accept i[34567]86 variants.
9945 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9947 * linux-low.c (linux_wait_for_event): Correct comment typos.
9948 (linux_resume_one_process): Call check_removed_breakpoint.
9949 (linux_send_signal): New function.
9950 (linux_target_ops): Add linux_send_signal.
9951 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9953 * target.h (struct target_ops): Add send_signal.
9955 2003-05-29 Jim Blandy <jimb@redhat.com>
9957 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9958 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9959 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9960 away part of the register's value.
9962 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9964 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9965 (linux_wait_for_event, linux_init_signals): Likewise.
9967 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9969 * configure.in: Check for stdlib.h.
9970 * configure: Regenerated.
9971 * config.in: Regenerated.
9973 2003-01-04 Andreas Schwab <schwab@suse.de>
9975 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9977 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9979 * Makefile.in: Remove obsolete code.
9981 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9983 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9984 defined(PT_FPR0_HI).
9986 2002-11-17 Stuart Hughes <seh@zee2.com>
9988 * linux-arm-low.c (arm_num_regs): Increase.
9989 (arm_regmap): Include status register.
9991 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9993 * linux-low.c (register_addr): Remove incorrect -1 check.
9995 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9997 * linux-low.c (linux_create_inferior): Call setpgid. Return
9999 (unstopped_p, linux_signal_pid): Remove.
10000 (linux_target_ops): Remove linux_signal_pid.
10001 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10002 global instead of target method.
10003 * target.h (struct target_ops): Remove signal_pid. Update comment
10004 for create_inferior.
10005 * server.c (signal_pid): New variable.
10006 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10007 gdbserver. Set the child to be the foreground process group.
10008 (attach_inferior): Set signal_pid.
10010 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10012 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10014 2002-08-20 Jim Blandy <jimb@redhat.com>
10016 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10019 2002-08-01 Andrew Cagney <cagney@redhat.com>
10021 * Makefile.in: Make chill references obsolete.
10023 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10025 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10026 * configure: Regenerate.
10027 * config.in: Regenerate.
10029 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10031 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10032 (perror_with_name, remote_close, remote_open, expect, play): Static.
10034 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10036 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10037 byte offsets instead of an array of indexes.
10038 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10040 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10042 * regcache.c: Add comment.
10044 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10046 * thread-db.c: New file.
10047 * proc-service.c: New file.
10048 * acinclude.m4: New file.
10049 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10050 proc-service.o, and thread-db.o.
10051 (linux-low.o): Add USE_THREAD_DB.
10052 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10053 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10054 * aclocal.m4: Regenerated.
10055 * config.in: Regenerated.
10056 * configure: Regenerated.
10057 * configure.in: Check for proc_service.h, sys/procfs.h,
10058 thread_db.h, and linux/elf.h headrs.
10059 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10060 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10061 Check for -lthread_db and thread support.
10062 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10063 PowerPC, and SuperH.
10064 * i387-fp.c: Constify arguments.
10065 * i387-fp.h: Likewise.
10066 * inferiors.c: (struct thread_info): Renamed from
10067 `struct inferior_info'. Remove PID member. Use generic inferior
10068 list header. All uses updated.
10069 (inferiors, signal_pid): Removed.
10070 (all_threads): New variable.
10071 (get_thread): Define.
10072 (add_inferior_to_list): New function.
10073 (for_each_inferior): New function.
10074 (change_inferior_id): New function.
10075 (add_inferior): Removed.
10076 (remove_inferior): New function.
10077 (add_thread): New function.
10078 (free_one_thread): New function.
10079 (remove_thread): New function.
10080 (clear_inferiors): Use for_each_inferior and free_one_thread.
10081 (find_inferior): New function.
10082 (find_inferior_id): New function.
10083 (inferior_target_data): Update argument type.
10084 (set_inferior_target_data): Likewise.
10085 (inferior_regcache_data): Likewise.
10086 (set_inferior_regcache_data): Likewise.
10087 * linux-low.c (linux_bp_reinsert): Remove.
10088 (all_processes, stopping_threads, using_thrads)
10089 (struct pending_signals, debug_threads, pid_of): New.
10090 (inferior_pid): Replace with macro.
10091 (struct inferior_linux_data): Remove.
10092 (get_stop_pc, add_process): New functions.
10093 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10094 Use add_process and add_thread.
10095 (linux_attach_lwp): New function, based on old linux_attach. Use
10096 add_process and add_thread. Set stop_expected for new threads.
10097 (linux_attach): New function.
10098 (linux_kill_one_process): New function.
10099 (linux_kill): Kill all LWPs.
10100 (linux_thread_alive): Use find_inferior_id.
10101 (check_removed_breakpoints, status_pending_p): New functions.
10102 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10103 Update. Use WNOHANG. Wait for cloned processes also. Update process
10104 struct for the found process.
10105 (linux_wait_for_event): New function.
10106 (linux_wait): Use it. Support LWPs.
10107 (send_sigstop, wait_for_sigstop, stop_all_processes)
10108 (linux_resume_one_process, linux_continue_one_process): New functions.
10109 (linux_resume): Support LWPs.
10110 (REGISTER_RAW_SIZE): Remove.
10111 (fetch_register): Use register_size instead. Call supply_register.
10112 (usr_store_inferior_registers): Likewise. Call collect_register.
10113 Fix recursive case.
10114 (regsets_fetch_inferior_registers): Improve error message.
10115 (regsets_store_inferior_registers): Add debugging.
10116 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10117 (unstopped_p, linux_signal_pid): New functions.
10118 (linux_target_ops): Add linux_signal_pid.
10119 (linux_init_signals): New function.
10120 (initialize_low): Call it. Initialize using_threads.
10121 * regcache.c (inferior_regcache_data): Add valid
10123 (get_regcache): Fetch registers lazily. Add fetch argument
10124 and update all callers.
10125 (regcache_invalidate_one, regcache_invalidate): New
10127 (new_register_cache): Renamed from create_register_cache.
10128 Return the new regcache.
10129 (free_register_cache): Change argument to a void *.
10130 (registers_to_string, registers_from_string): Call get_regcache
10131 with fetch flag set.
10132 (register_data): Make static. Pass fetch flag to get_regcache.
10133 (supply_register): Call get_regcache with fetch flag clear.
10134 (collect_register): Call get_regcache with fetch flag set.
10135 (collect_register_as_string): New function.
10136 * regcache.h: Update.
10137 * remote-utils.c (putpkt): Flush after debug output and use
10139 Handle input interrupts while waiting for an ACK.
10140 (input_interrupt): Use signal_pid method.
10141 (getpkt): Flush after debug output and use stderr.
10142 (outreg): Use collect_register_as_string.
10143 (new_thread_notify, dead_thread_notify): New functions.
10144 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10145 and general_thread.
10146 (look_up_one_symbol): Flush after debug output.
10147 * server.c (step_thread, server_waiting): New variables.
10148 (start_inferior): Don't use signal_pid. Update call to mywait.
10149 (attach_inferior): Update call to mywait.
10150 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10151 (main): Don't fetch/store registers explicitly. Use
10152 set_desired_inferior. Support proposed ``Hs'' packet. Update
10154 * server.h: Update.
10155 (struct inferior_list, struct_inferior_list_entry): New.
10156 * target.c (set_desired_inferior): New.
10157 (write_inferior_memory): Constify.
10158 (mywait): New function.
10159 * target.h: Update.
10160 (struct target_ops): New signal_pid method.
10161 (mywait): Removed macro, added prototype.
10163 * linux-low.h (regset_func): Removed.
10164 (regset_fill_func, regset_store_func): New.
10165 (enum regset_type): New.
10166 (struct regset_info): Add type field. Use new operation types.
10167 (struct linux_target_ops): stop_pc renamed to get_pc.
10168 Add decr_pc_after_break and breakpoint_at.
10169 (get_process, get_thread_proess, get_process_thread)
10170 (strut process_info, all_processes, linux_attach_lwp)
10171 (thread_db_init): New.
10173 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10174 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10175 (the_low_target): Add new members.
10176 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10177 (i386_store_fpxregset): Constify.
10178 (target_regsets): Add new kind identifier.
10179 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10180 (i386_set_pc): Add debugging.
10181 (i386_breakpoint_at): New function.
10182 (the_low_target): Add new members.
10183 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10184 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10185 (mips_breakpoint_at): New.
10186 (the_low_target): Add new members.
10187 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10188 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10189 (the_low_target): Add new members.
10190 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10191 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10192 (the_low_target): Add new members.
10193 * linux-x86-64-low.c (target_regsets): Add new kind
10196 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10198 From Martin Pool <mbp@samba.org>:
10199 * server.c (gdbserver_usage): New function.
10202 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10204 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10205 stop_at -> stop_pc.
10207 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10209 * Makefile.in: Remove obsolete code.
10211 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10213 * linux-low.c (regsets_fetch_inferior_registers),
10214 (regsets_store_inferior_registers): Removed cast to int from
10216 * regcache.h: Added declaration of struct inferior_info.
10218 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10220 * inferiors.c (struct inferior_info): Add regcache_data.
10221 (add_inferior): Call create_register_cache.
10222 (clear_inferiors): Call free_register_cache.
10223 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10224 * regcache.c (struct inferior_regcache_data): New.
10225 (registers): Remove.
10226 (get_regcache): New function.
10227 (create_register_cache, free_register_cache): New functions.
10228 (set_register_cache): Don't initialize the register cache here.
10229 (registers_to_string, registers_from_string, register_data): Call
10231 * regcache.h: Add prototypes.
10232 * server.h: Likewise.
10234 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10236 * mem-break.c: New file.
10237 * mem-break.h: New file.
10238 * Makefile.in: Add mem-break.o rule; update server.h
10240 * inferiors.c (struct inferior_info): Add target_data
10242 (clear_inferiors): Free target_data member if set.
10243 (inferior_target_data, set_inferior_target_data): New functions.
10244 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10245 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10246 * linux-low.c (linux_bp_reinsert): New variable.
10247 (struct inferior_linux_data): New.
10248 (linux_create_inferior): Use set_inferior_target_data.
10249 (linux_attach): Likewise. Call add_inferior.
10250 (linux_wait_for_one_inferior): New function.
10251 (linux_wait): Call it.
10252 (linux_write_memory): Add const.
10253 (initialize_low): Call set_breakpoint_data.
10254 * linux-low.h (struct linux_target_ops): Add breakpoint
10256 * server.c (attach_inferior): Remove extra add_inferior
10258 * server.h: Include mem-break.h. Update inferior.c
10260 * target.c (read_inferior_memory)
10261 (write_inferior_memory): New functions.
10262 * target.h (read_inferior_memory)
10263 (write_inferior_memory): Change macros to prototypes.
10264 (struct target_ops): Update comments. Add const to write_memory
10267 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10269 * linux-low.c (usr_store_inferior_registers): Support
10270 registers which are allowed to fail to store.
10271 * linux-low.h (linux_target_ops): Likewise.
10272 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10273 (ppc_cannot_store_register): FPSCR may not be storable.
10275 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10277 * server.h: Include <string.h> if HAVE_STRING_H.
10278 * ChangeLog: Correct paths in last ChangeLog entry.
10280 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10282 * linux-low.h: Remove obsolete prototypes.
10283 (struct linux_target_ops): New.
10284 (extern the_low_target): New.
10285 * linux-low.c (num_regs, regmap): Remove declarations.
10286 (register_addr): Use the_low_target explicitly.
10287 (fetch_register): Likewise.
10288 (usr_fetch_inferior_registers): Likewise.
10289 (usr_store_inferior_registers): Likewise.
10290 * linux-arm-low.c (num_regs): Remove.
10291 (arm_num_regs): Define.
10292 (arm_regmap): Renamed from regmap, made static.
10293 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10295 (arm_cannot_store_register): Renamed from cannot_store_register,
10297 (the_low_target): New.
10298 * linux-i386-low.c (num_regs): Remove.
10299 (i386_num_regs): Define.
10300 (i386_regmap): Renamed from regmap, made static.
10301 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10303 (i386_cannot_store_register): Renamed from cannot_store_register,
10305 (the_low_target): New.
10306 * linux-ia64-low.c (num_regs): Remove.
10307 (ia64_num_regs): Define.
10308 (ia64_regmap): Renamed from regmap, made static.
10309 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10311 (ia64_cannot_store_register): Renamed from cannot_store_register,
10313 (the_low_target): New.
10314 * linux-m68k-low.c (num_regs): Remove.
10315 (m68k_num_regs): Define.
10316 (m68k_regmap): Renamed from regmap, made static.
10317 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10319 (m68k_cannot_store_register): Renamed from cannot_store_register,
10321 (the_low_target): New.
10322 * linux-mips-low.c (num_regs): Remove.
10323 (mips_num_regs): Define.
10324 (mips_regmap): Renamed from regmap, made static.
10325 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10327 (mips_cannot_store_register): Renamed from cannot_store_register,
10329 (the_low_target): New.
10330 * linux-ppc-low.c (num_regs): Remove.
10331 (ppc_num_regs): Define.
10332 (ppc_regmap): Renamed from regmap, made static.
10333 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10335 (ppc_cannot_store_register): Renamed from cannot_store_register,
10337 (the_low_target): New.
10338 * linux-s390-low.c (num_regs): Remove.
10339 (s390_num_regs): Define.
10340 (s390_regmap): Renamed from regmap, made static.
10341 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10343 (s390_cannot_store_register): Renamed from cannot_store_register,
10345 (the_low_target): New.
10346 * linux-sh-low.c (num_regs): Remove.
10347 (sh_num_regs): Define.
10348 (sh_regmap): Renamed from regmap, made static.
10349 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10351 (sh_cannot_store_register): Renamed from cannot_store_register,
10353 (the_low_target): New.
10354 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10355 (the_low_target): New.
10357 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10359 * Makefile.in: Add stamp-h target.
10360 * configure.in: Create stamp-h.
10361 * configure: Regenerated.
10363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10365 * inferiors.c: New file.
10366 * target.c: New file.
10367 * target.h: New file.
10368 * Makefile.in: Add target.o and inferiors.o. Update
10370 * linux-low.c (inferior_pid): New static variable,
10371 moved from server.c.
10372 (linux_create_inferior): Renamed from create_inferior.
10373 Call add_inferior. Return 0 on success instead of a PID.
10374 (linux_attach): Renamed from myattach.
10375 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10376 (linux_thread_alive): Renamed from mythread_alive.
10377 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10379 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10380 (regsets_store_inferior_registers): Correct error message.
10381 Add missing ``return 0''.
10382 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10383 (linux_store_registers): Renamed from store_inferior_registers.
10384 (linux_read_memory): Renamed from read_inferior_memory.
10385 (linux_write_memory): Renamed from write_inferior_memory.
10386 (linux_target_ops): New structure.
10387 (initialize_low): Call set_target_ops ().
10388 * remote-utils.c (unhexify): New function.
10389 (hexify): New function.
10390 (input_interrupt): Send signals to ``signal_pid''.
10391 * server.c (inferior_pid): Remove.
10392 (start_inferior): Update create_inferior call.
10393 (attach_inferior): Call add_inferior.
10394 (handle_query): New function.
10395 (main): Call handle_query for `q' packets.
10396 * server.h: Include "target.h". Remove obsolete prototypes.
10397 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10399 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10401 * Makefile.in: Add WARN_CFLAGS. Update configury
10403 * configure.in: Check for <string.h>
10404 * configure: Regenerate.
10405 * config.in: Regenerate.
10406 * gdbreplay.c: Include needed system headers.
10407 (remote_open): Remove strchr prototype.
10408 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10409 * regcache.c (supply_register): Change buf argument to const void *.
10410 (supply_register_by_name): Likewise.
10411 (collect_register): Change buf argument to void *.
10412 (collect_register_by_name): Likewise.
10413 * regcache.h: Add missing prototypes.
10414 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10415 * server.c (handle_query): New function.
10416 (attached): New static variable, moved out of main.
10417 (main): Quiet longjmp clobber warnings.
10418 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10419 * utils.c (error): Remove NORETURN.