1 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4 while-loop as for-loop.
5 (regsets_store_inferior_registers): Likewise.
7 2014-11-28 Yao Qi <yao@codesourcery.com>
9 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
10 * config.in, configure: Re-generate.
11 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
14 2014-11-21 Yao Qi <yao@codesourcery.com>
16 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
17 (AC_CHECK_HEADERS): Remove malloc.h.
18 * configure: Re-generated.
19 * config.in: Re-generated.
20 * server.h: Don't include alloca.h and malloc.h.
21 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
22 Don't include malloc.h.
24 2014-11-17 Joel Brobecker <brobecker@adacore.com>
26 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
27 corresponding ERRNO check in same block.
29 2014-11-12 Pedro Alves <palves@redhat.com>
31 * server.c (cont_thread): Update comment.
32 (start_inferior, attach_inferior): No longer clear cont_thread.
33 (handle_v_cont): No longer set cont_thread.
34 (captured_main): Clear cont_thread each time a GDB connects.
36 2014-11-12 Pedro Alves <palves@redhat.com>
38 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
39 thread, and don't resume all threads if the Hc thread has exited.
41 2014-11-12 Pedro Alves <palves@redhat.com>
43 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
44 the process group instead of to a specific LWP.
46 2014-10-15 Pedro Alves <palves@redhat.com>
49 * win32-arm-low.c (arm_set_thread_context): Remove current_event
51 (arm_set_thread_context): Delete.
52 (the_low_target): Adjust.
53 * win32-i386-low.c (debug_registers_changed)
54 (debug_registers_used): Delete.
55 (update_debug_registers_callback): New function.
56 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
57 needing to update their debug registers.
58 (win32_get_current_dr): New function.
59 (x86_dr_low_get_addr, x86_dr_low_get_control)
60 (x86_dr_low_get_status): Fetch the debug register from the thread
62 (i386_initial_stuff): Adjust.
63 (i386_get_thread_context): Remove current_event parameter. Don't
64 clear debug_registers_changed nor copy DR values to
66 (i386_set_thread_context): Delete.
67 (i386_prepare_to_resume): New function.
68 (i386_thread_added): Mark the thread as needing to update irs
70 (the_low_target): Remove i386_set_thread_context and install
71 i386_prepare_to_resume.
72 * win32-low.c (win32_get_thread_context): Adjust.
73 (win32_set_thread_context): Use SetThreadContext
75 (win32_prepare_to_resume): New function.
76 (win32_require_context): New function, factored out from ...
77 (thread_rec): ... this.
78 (continue_one_thread): Call win32_prepare_to_resume on each thread
79 we're about to continue.
80 (win32_resume): Call win32_prepare_to_resume on the event thread.
81 * win32-low.h (struct win32_thread_info)
82 <debug_registers_changed>: New field.
83 (struct win32_target_ops): Change prototype of set_thread_context,
84 delete set_thread_context and add prepare_to_resume.
85 (win32_require_context): New declaration.
87 2014-10-08 Gary Benson <gbenson@redhat.com>
89 * server.h: Do not include common-exceptions.h.
91 2014-10-08 Gary Benson <gbenson@redhat.com>
93 * server.h: Do not include cleanups.h.
95 2014-09-30 James Hogan <james.hogan@imgtec.com>
97 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
100 2014-09-23 Yao Qi <yao@codesourcery.com>
102 * linux-low.c (lp_status_maybe_breakpoint): New function.
103 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
104 (count_events_callback): Likewise.
105 (select_event_lwp_callback): Likewise.
106 (cancel_breakpoints_callback): Likewise.
108 2014-09-19 Don Breazeal <donb@codesourcery.com>
110 * linux-low.c (handle_extended_wait): Call
111 linux_ptrace_get_extended_event.
112 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
113 linux_is_extended_waitstatus.
115 2014-09-16 Joel Brobecker <brobecker@adacore.com>
117 * Makefile.in (CPPFLAGS): Define.
118 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
119 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
121 2014-09-16 Gary Benson <gbenson@redhat.com>
123 * inferiors.h (current_inferior): Renamed as...
124 (current_thread): New variable. All uses updated.
125 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
126 (maybe_move_out_of_jump_pad): Likewise.
127 (cancel_breakpoint): Likewise.
128 (linux_low_filter_event): Likewise.
129 (wait_for_sigstop): Likewise.
130 (linux_resume_one_lwp): Likewise.
131 (need_step_over_p): Likewise.
132 (start_step_over): Likewise.
133 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
134 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
135 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
136 and save_inferior as saved_thread.
137 * regcache.c (get_thread_regcache): Renamed saved_inferior as
139 (regcache_invalidate_thread): Likewise.
140 * remote-utils.c (prepare_resume_reply): Likewise.
141 * thread-db.c (thread_db_get_tls_address): Likewise.
142 (disable_thread_event_reporting): Likewise.
143 (remove_thread_event_breakpoints): Likewise.
144 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
146 * target.h (set_desired_inferior): Renamed as...
147 (set_desired_thread): New declaration. All uses updated.
148 * server.c (myresume): Updated comment to reference thread instead
150 (handle_serial_event): Likewise.
151 (handle_target_event): Likewise.
153 2014-09-12 Tom Tromey <tromey@redhat.com>
154 Gary Benson <gbenson@redhat.com>
156 * regcache.h: Include common-regcache.h.
157 (regcache_read_pc): Don't declare.
158 * regcache.c (get_thread_regcache_for_ptid): New function.
160 2014-09-11 Tom Tromey <tromey@redhat.com>
161 Gary Benson <gbenson@redhat.com>
163 * symbol.c: New file.
164 * Makefile.in (SFILES): Add symbol.c.
167 2014-09-11 Gary Benson <gbenson@redhat.com>
169 * target.c (target_stop_ptid, target_continue_ptid): New
172 2014-09-11 Tom Tromey <tromey@redhat.com>
173 Gary Benson <gbenson@redhat.com>
175 * target.h: Include target/target.h.
176 * target.c (target_read_memory, target_read_uint32)
177 (target_write_memory): New functions.
179 2014-09-11 Gary Benson <gbenson@redhat.com>
181 * server.h (debug_hw_points): Don't declare.
182 * server.c (debug_hw_points): Don't define. Replace all uses
183 with show_debug_regs.
184 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
185 all uses with show_debug_regs.
187 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
189 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
190 endianness into account.
191 (ppc_supply_ptrace_register): Likewise.
193 2014-09-03 James Hogan <james.hogan@imgtec.com>
195 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
196 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
198 2014-09-03 Gary Benson <gbenson@redhat.com>
200 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
201 ALL_DEBUG_ADDRESS_REGISTERS.
203 2014-09-02 Gary Benson <gbenson@redhat.com>
205 * i386-low.h: Renamed as...
206 * x86-low.h: New file. All type, function and variable name
207 prefixes changed from "i386_" to "x86_". All references updated.
208 * i386-low.c: Renamed as...
209 * x86-low.c: New file. All type, function and variable name
210 prefixes changed from "i386_" to "x86_". All references updated.
212 2014-09-02 Gary Benson <gbenson@redhat.com>
214 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
215 (x86_linux_new_thread): Likewise.
217 2014-08-29 Gary Benson <gbenson@redhat.com>
219 * server.h (setjmp.h): Do not include.
220 (toplevel): Do not declare.
221 (common-exceptions.h): Include.
222 (cleanups.h): Likewise.
223 * server.c (toplevel): Do not define.
224 (exit_code): New static global.
225 (detach_or_kill_for_exit_cleanup): New function.
226 (main): New function. Original main renamed to...
227 (captured_main): New function.
228 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
230 2014-08-29 Gary Benson <gbenson@redhat.com>
232 * Makefile.in (SFILES): Add common/common-exceptions.c.
233 (OBS): Add common-exceptions.o.
234 (common-exceptions.o): New rule.
235 * utils.c (prepare_to_throw_exception): New function.
237 2014-08-29 Gary Benson <gbenson@redhat.com>
239 * config.in: Regenerate.
240 * configure: Likewise.
242 2014-08-29 Gary Benson <gbenson@redhat.com>
244 * Makefile.in (SFILES): Add common/cleanups.c.
246 (cleanups.o): New rule.
248 2014-08-29 Gary Benson <gbenson@redhat.com>
250 * utils.c (internal_vwarning): New function.
252 2014-08-28 Gary Benson <gbenson@redhat.com>
254 * utils.h (fatal): Remove declaration.
255 * utils.c (fatal): Remove function.
257 2014-08-28 Gary Benson <gbenson@redhat.com>
259 * tracepoint.c (gdb_agent_init): Replace fatal with
261 (initialize_tracepoint): Likewise.
263 2014-08-28 Gary Benson <gbenson@redhat.com>
265 * remote-utils.c (remote_prepare): Replace fatal with error.
267 2014-08-28 Gary Benson <gbenson@redhat.com>
269 * linux-low.c (linux_async): Replace fatal with warning.
271 (linux_start_non_stop): Return -1 if linux_async failed.
273 2014-08-28 Gary Benson <gbenson@redhat.com>
275 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
277 (i386_dr_low_get_addr): Remove vague comment.
278 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
281 2014-08-28 Gary Benson <gbenson@redhat.com>
283 * inferiors.c (get_thread_process): Replace check with gdb_assert.
284 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
286 (linux_resume_one_lwp): Likewise.
287 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
289 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
291 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
292 (init_register_cache): Replace fatal with gdb_assert_not_reached.
293 (find_register_by_name): Replace fatal with internal_error.
294 (find_regno): Likewise.
295 * tdesc.c (init_target_desc): Replace check with gdb_assert.
296 * thread-db.c (thread_db_create_event): Likewise.
297 (thread_db_load_search): Likewise.
298 (try_thread_db_load_1): Likewise.
299 * tracepoint.c (get_jump_space_head): Replace fatal with
301 (claim_trampoline_space): Likewise.
302 (have_fast_tracepoint_trampoline_buffer): Likewise.
303 (cmd_qtstart): Likewise.
304 (stop_tracing): Likewise.
305 (fast_tracepoint_collecting): Likewise.
306 (target_malloc): Likewise.
307 (download_tracepoint): Likewise.
308 (download_trace_state_variables): Replace check with gdb_assert.
309 (upload_fast_traceframes): Replace fatal with internal_error.
311 2014-08-19 Tom Tromey <tromey@redhat.com>
312 Gary Benson <gbenson@redhat.com>
314 * Makefile.in (SFILES): Add common/common-debug.c.
315 (OBS): Add common-debug.o.
316 (common-debug.o): New rule.
317 * debug.h (debug_printf): Don't declare.
318 * debug.c (debug_printf): Renamed and rewritten as...
319 (debug_vprintf): New function.
321 2014-08-19 Gary Benson <gbenson@redhat.com>
323 * utils.h: Do not include print-utils.h.
325 2014-08-19 Tom Tromey <tromey@redhat.com>
326 Gary Benson <gbenson@redhat.com>
328 * server.h: Add static assertion.
329 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
331 2014-08-19 Tom Tromey <tromey@redhat.com>
332 Gary Benson <gbenson@redhat.com>
334 * Makefile.in (SFILES): Add common/errors.c.
336 (IPA_OBS): Add errors-ipa.o.
337 (errors.o): New rule.
338 (errors-ipa.o): Likewise.
339 * utils.h (perror_with_name, error, warning): Don't declare.
340 * utils.c (warning): Renamed and rewritten as...
341 (vwarning): New function.
342 (error): Renamed and rewritten as...
343 (verror): New function.
344 (internal_error): Renamed and rewritten as...
345 (internal_verror): New function.
347 2014-08-07 Gary Benson <gbenson@redhat.com>
349 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
350 * configure: Regenerate.
351 * config.in: Likewise.
352 * server.h: Do not include errno.h.
353 * event-loop.c: Likewise.
354 * hostio-errno.c: Likewise.
355 * linux-low.c: Likewise.
356 * remote-utils.c: Likewise.
357 * spu-low.c: Likewise.
359 * gdbreplay.c: Unconditionally include errno.h.
361 2014-08-07 Gary Benson <gbenson@redhat.com>
363 * server.h: Do not include string.h.
364 * event-loop.c: Likewise.
365 * linux-low.c: Likewise.
366 * regcache.c: Likewise.
367 * remote-utils.c: Likewise.
368 * spu-low.c: Likewise.
371 2014-08-07 Gary Benson <gbenson@redhat.com>
373 * server.h: Do not include gdb_assert.h.
375 2014-08-07 Gary Benson <gbenson@redhat.com>
377 * server.h: Do not include common-utils.h.
379 2014-08-07 Gary Benson <gbenson@redhat.com>
381 * server.h: Do not include ptid.h.
384 2014-08-07 Gary Benson <gbenson@redhat.com>
386 * server.h: Do not include gdb_locale.h.
388 2014-08-07 Gary Benson <gbenson@redhat.com>
390 * server.h: Do not include gdb/signals.h.
391 * win32-low.c: Likewise.
393 2014-08-07 Gary Benson <gbenson@redhat.com>
395 * server.h: Do not include pathmax.h.
397 2014-08-07 Gary Benson <gbenson@redhat.com>
399 * server.h: Do not include libiberty.h.
400 * linux-bfin-low.c: Likewise.
402 2014-08-07 Gary Benson <gbenson@redhat.com>
404 * server.h: Do not include ansidecl.h.
406 2014-08-07 Gary Benson <gbenson@redhat.com>
408 * linux-x86-low.c: Do not include stddef.h.
409 * lynx-ppc-low.c: Likewise.
410 * tracepoint.c: Likewise.
412 2014-08-07 Gary Benson <gbenson@redhat.com>
414 * server.h: Do not include stdarg.h.
415 * nto-low.c: Likewise.
417 2014-08-07 Gary Benson <gbenson@redhat.com>
419 * server.h: Do not include stdlib.h.
420 * inferiors.c: Likewise.
421 * linux-low.c: Likewise.
422 * regcache.c: Likewise.
423 * spu-low.c: Likewise.
424 * tracepoint.c: Likewise.
427 2014-08-07 Gary Benson <gbenson@redhat.com>
429 * server.h: Do not include stdio.h.
430 * linux-low.c: Likewise.
431 * remote-utils.c: Likewise.
432 * spu-low.c: Likewise.
434 * wincecompat.c: Likewise.
436 2014-08-06 Gary Benson <gbenson@redhat.com>
438 * regcache.c (init_register_cache): Move conditionals inside if.
440 2014-08-06 Gary Benson <gbenson@redhat.com>
442 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
444 2014-07-31 Gary Benson <gbenson@redhat.com>
446 * ax.h: Do not include server.h.
447 * gdbthread.h: Likewise.
448 * lynx-low.h: Likewise.
451 2014-07-30 Gary Benson <gbenson@redhat.com>
453 * server.h: Include common-defs.h.
454 Do not include config.h or build-gnulib-gdbserver/config.h.
456 2014-07-30 Gary Benson <gbenson@redhat.com>
458 * hostio-errno.c: Move server.h to top of includes list.
459 * inferiors.c: Likewise.
460 * linux-x86-low.c: Likewise.
461 * notif.c: Include server.h.
463 2014-07-24 Tom Tromey <tromey@redhat.com>
464 Gary Benson <gbenson@redhat.com>
466 * server.h (CORE_ADDR): Now unsigned.
468 2014-07-16 Pedro Alves <palves@redhat.com>
470 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
472 2014-07-15 Pedro Alves <palves@redhat.com>
474 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
477 2014-07-11 Pedro Alves <palves@redhat.com>
479 * linux-low.c (kill_wait_lwp): New function, based on
480 kill_one_lwp_callback, but use my_waitpid directly.
481 (kill_one_lwp_callback, linux_kill): Use it.
483 2014-06-23 Pedro Alves <palves@redhat.com>
485 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
486 before setting DR0..DR3.
488 2014-06-20 Gary Benson <gbenson@redhat.com>
490 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
491 * configure: Regenerated.
492 * config.in: Likewise.
494 2014-06-20 Gary Benson <gbenson@redhat.com>
496 * Makefile.in (SFILES): Update locations for files moved
498 (object file files): Reordered.
500 2014-06-20 Gary Benson <gbenson@redhat.com>
502 * i386-low.h (i386_dr_low_can_set_addr): Removed.
503 (i386_dr_low_set_addr): Likewise.
504 (i386_dr_low_get_addr): Likewise.
505 (i386_dr_low_can_set_control): Likewise.
506 (i386_dr_low_set_control): Likewise.
507 (i386_dr_low_get_control): Likewise.
508 (i386_dr_low_get_status): Likewise.
509 (i386_get_debug_register_length): Likewise.
510 * linux-x86-low.c (i386_dr_low_set_addr):
511 Changed signature. Made static.
512 (i386_dr_low_get_addr): Likewise.
513 (i386_dr_low_set_control): Likewise.
514 (i386_dr_low_get_control): Likewise.
515 (i386_dr_low_get_status): Likewise.
516 (i386_dr_low): New global variable.
517 * win32-i386-low.c (i386_dr_low_set_addr):
518 Changed signature. Made static.
519 (i386_dr_low_get_addr): Likewise.
520 (i386_dr_low_set_control): Likewise.
521 (i386_dr_low_get_control): Likewise.
522 (i386_dr_low_get_status): Likewise.
523 (i386_dr_low): New global variable.
525 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
527 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
528 * Makefile.in (AR, AR_FLAGS): Define.
529 * configure: Regenerate.
531 2014-06-19 Gary Benson <gbenson@redhat.com>
533 * Makefile.in (i386-dregs.o): New rule.
534 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
535 * i386-low.c (target.h): Remove include.
536 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
537 (DR_CONTROL_SHIFT): Likewise.
538 (DR_CONTROL_SIZE): Likewise.
539 (DR_RW_EXECUTE): Likewise.
540 (DR_RW_WRITE): Likewise.
541 (DR_RW_READ): Likewise.
542 (DR_RW_IORW): Likewise.
543 (DR_LEN_1): Likewise.
544 (DR_LEN_2): Likewise.
545 (DR_LEN_4): Likewise.
546 (DR_LEN_8): Likewise.
547 (DR_LOCAL_ENABLE_SHIFT): Likewise.
548 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
549 (DR_ENABLE_SIZE): Likewise.
550 (DR_LOCAL_SLOWDOWN): Likewise.
551 (DR_GLOBAL_SLOWDOWN): Likewise.
552 (DR_CONTROL_RESERVED): Likewise.
553 (I386_DR_CONTROL_MASK): Likewise.
554 (I386_DR_VACANT): Likewise.
555 (I386_DR_LOCAL_ENABLE): Likewise.
556 (I386_DR_GLOBAL_ENABLE): Likewise.
557 (I386_DR_DISABLE): Likewise.
558 (I386_DR_SET_RW_LEN): Likewise.
559 (I386_DR_GET_RW_LEN): Likewise.
560 (I386_DR_WATCH_HIT): Likewise.
561 (i386_wp_op_t): Likewise.
562 (i386_show_dr): Likewise.
563 (i386_length_and_rw_bits): Likewise.
564 (i386_insert_aligned_watchpoint): Likewise.
565 (i386_remove_aligned_watchpoint): Likewise.
566 (i386_handle_nonaligned_watchpoint): Likewise.
567 i386_update_inferior_debug_regs(): Likewise.
568 (i386_dr_insert_watchpoint): Likewise.
569 (i386_dr_remove_watchpoint): Likewise.
570 (i386_dr_region_ok_for_watchpoint): Likewise.
571 (i386_dr_stopped_data_address): Likewise.
572 (i386_dr_stopped_by_watchpoint): Likewise.
574 2014-06-19 Gary Benson <gbenson@redhat.com>
576 * i386-low.c (i386_dr_show): Renamed to
577 i386_show_dr and made static. All uses updated.
578 (i386_dr_length_and_rw_bits): Renamed to
579 i386_length_and_rw_bits and made static.
581 (i386_dr_insert_aligned_watchpoint): Renamed to
582 i386_insert_aligned_watchpoint and made static.
584 (i386_dr_remove_aligned_watchpoint): Renamed to
585 i386_remove_aligned_watchpoint and made static.
587 (i386_dr_update_inferior_debug_regs): Renamed to
588 i386_update_inferior_debug_regs and made static.
591 2014-06-18 Gary Benson <gbenson@redhat.com>
593 * i386-low.h (i386_dr_low_can_set_addr): New macro.
594 (i386_dr_low_can_set_control): Likewise.
595 (i386_get_debug_register_length): Likewise.
596 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
597 (i386_dr_low_can_set_control): Likewise.
598 (i386_get_debug_register_length): Likewise.
600 2014-06-17 Gary Benson <gbenson@redhat.com>
602 * i386-low.h (i386-dregs.h): New include.
603 (DR_FIRSTADDR): Now in i386-dregs.h.
604 (DR_LASTADDR): Likewise.
605 (DR_NADDR): Likewise.
606 (DR_STATUS): Likewise.
607 (DR_CONTROL): Likewise.
608 (i386_debug_reg_state): Likewise.
609 (i386_dr_insert_watchpoint): Likewise.
610 (i386_dr_remove_watchpoint): Likewise.
611 (i386_dr_region_ok_for_watchpoint): Likewise.
612 (i386_dr_stopped_data_address): Likewise.
613 (i386_dr_stopped_by_watchpoint): Likewise.
614 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
616 2014-06-18 Gary Benson <gbenson@redhat.com>
618 * i386-low.h (i386_low_insert_watchpoint): Renamed to
619 i386_dr_insert_watchpoint.
620 (i386_low_remove_watchpoint): Renamed to
621 i386_dr_remove_watchpoint.
622 (i386_low_region_ok_for_watchpoint): Renamed to
623 i386_dr_region_ok_for_watchpoint.
624 (i386_low_stopped_data_address): Renamed to
625 i386_dr_stopped_data_address.
626 (i386_low_stopped_by_watchpoint): Renamed to
627 i386_dr_stopped_by_watchpoint.
628 * i386-low.c (i386_show_dr): Renamed to
629 i386_dr_show and made nonstatic. All uses updated.
630 (i386_length_and_rw_bits): Renamed to
631 i386_dr_length_and_rw_bits and made nonstatic.
633 (i386_insert_aligned_watchpoint): Renamed to
634 i386_dr_insert_aligned_watchpoint and made nonstatic.
636 (i386_remove_aligned_watchpoint): Renamed to
637 i386_dr_remove_aligned_watchpoint and made nonstatic.
639 (i386_update_inferior_debug_regs): Renamed to
640 i386_dr_update_inferior_debug_regs and made nonstatic.
642 (i386_low_insert_watchpoint): Renamed to
643 i386_dr_insert_watchpoint. All uses updated.
644 (i386_low_remove_watchpoint): Renamed to
645 i386_dr_remove_watchpoint. All uses updated.
646 (i386_low_region_ok_for_watchpoint): Renamed to
647 i386_dr_region_ok_for_watchpoint. All uses updated.
648 (i386_low_stopped_data_address): Renamed to
649 i386_dr_stopped_data_address. All uses updated.
650 (i386_low_stopped_by_watchpoint): Renamed to
651 i386_dr_stopped_by_watchpoint. All uses updated.
653 2014-06-18 Gary Benson <gbenson@redhat.com>
655 * i386-low.c (i386_dr_low_can_set_addr): New macro.
656 (i386_dr_low_can_set_control): Likewise.
657 (i386_insert_aligned_watchpoint): New check.
659 2014-06-18 Gary Benson <gbenson@redhat.com>
661 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
664 2014-06-18 Gary Benson <gbenson@redhat.com>
666 * i386-low.c (i386_length_and_rw_bits): Use internal_error
667 instead of fatal and error.
668 (i386_handle_nonaligned_watchpoint): Likewise.
670 2014-06-18 Gary Benson <gbenson@redhat.com>
672 * i386-low.c (i386_get_debug_register_length): New macro.
673 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
674 (i386_show_dr): Use debug_printf instead of fprintf. Use
675 phex to format values.
677 2014-06-18 Gary Benson <gbenson@redhat.com>
679 * i386-low.h: Comment changes.
680 * i386-low.c: Likewise.
682 2014-06-18 Gary Benson <gbenson@redhat.com>
684 * i386-low.c: Whitespace changes.
686 2014-06-12 Tom Tromey <tromey@redhat.com>
688 * utils.c (freeargv): Remove.
690 2014-06-12 Tom Tromey <tromey@redhat.com>
692 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
693 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
694 (parse_debug_format_options): Likewise.
695 (gdbserver_usage): Likewise.
696 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
697 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
698 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
700 ($(LIBGNU)): Depend on libiberty.
701 (all-lib): Recurse into all subdirs.
702 (install-only): Invoke "install" target in subdirs.
703 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
705 * configure: Rebuild.
706 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
707 for vasprintf, vsnprintf, or gettimeofday.
708 * configure.srv: Don't add safe-ctype.o or lbasename.o to
711 2014-06-05 Joel Brobecker <brobecker@adacore.com>
713 * development.sh: Delete.
714 * Makefile.in (config.status): Adjust dependency on development.sh.
715 * configure.ac: Adjust development.sh source call.
716 * configure: Regenerate.
718 2014-06-02 Pedro Alves <palves@redhat.com>
720 * ax.c (gdb_free_agent_expr): New function.
721 * ax.h (gdb_free_agent_expr): New declaration.
722 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
724 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
726 (clear_breakpoint_conditions_and_commands): New function.
727 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
728 (clear_breakpoint_conditions_and_commands): New declaration.
730 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
732 * linux-aarch64-low.c (asm/ptrace.h): Include.
734 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
736 Fix TLS access for -static -pthread.
737 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
738 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
739 (thread_db_load_search, try_thread_db_load_1): Initialize it.
741 2014-05-20 Pedro Alves <palves@redhat.com>
743 * linux-aarch64-low.c (aarch64_insert_point)
744 (aarch64_remove_point): No longer check whether the type is
745 supported here. Adjust to new interface.
746 (the_low_target): Install aarch64_supports_z_point_type as
747 supports_z_point_type method.
748 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
749 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
750 instead of a Z packet char. Adjust.
751 (arm_supports_z_point_type): New function.
752 (arm_insert_point, arm_remove_point): Adjust to new interface.
753 (the_low_target): Install arm_supports_z_point_type.
754 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
755 (cris_insert_point, cris_remove_point): Adjust to new interface.
756 Don't check whether the type is supported here.
757 (the_low_target): Install cris_supports_z_point_type.
758 * linux-low.c (linux_supports_z_point_type): New function.
759 (linux_insert_point, linux_remove_point): Adjust to new interface.
760 * linux-low.h (struct linux_target_ops) <insert_point,
761 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
762 raw_breakpoint pointer parameter.
763 <supports_z_point_type>: New method.
764 * linux-mips-low.c (mips_supports_z_point_type): New function.
765 (mips_insert_point, mips_remove_point): Adjust to new interface.
766 Use mips_supports_z_point_type.
767 (the_low_target): Install mips_supports_z_point_type.
768 * linux-ppc-low.c (the_low_target): Install NULL as
769 supports_z_point_type method.
770 * linux-s390-low.c (the_low_target): Install NULL as
771 supports_z_point_type method.
772 * linux-sparc-low.c (the_low_target): Install NULL as
773 supports_z_point_type method.
774 * linux-x86-low.c (x86_supports_z_point_type): New function.
775 (x86_insert_point): Adjust to new insert_point interface. Use
776 insert_memory_breakpoint. Adjust to new
777 i386_low_insert_watchpoint interface.
778 (x86_remove_point): Adjust to remove_point interface. Use
779 remove_memory_breakpoint. Adjust to new
780 i386_low_remove_watchpoint interface.
781 (the_low_target): Install x86_supports_z_point_type.
782 * lynx-low.c (lynx_target_ops): Install NULL as
783 supports_z_point_type callback.
784 * nto-low.c (nto_supports_z_point_type): New.
785 (nto_insert_point, nto_remove_point): Adjust to new interface.
786 (nto_target_ops): Install nto_supports_z_point_type.
787 * mem-break.c: Adjust intro comment.
788 (struct raw_breakpoint) <raw_type, size>: New fields.
789 <inserted>: Update comment.
790 <shlib_disabled>: Delete field.
791 (enum bkpt_type) <gdb_breakpoint>: Delete value.
792 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
793 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
794 (raw_bkpt_type_to_target_hw_bp_type): New function.
795 (find_enabled_raw_code_breakpoint_at): New function.
796 (find_raw_breakpoint_at): New type and size parameters. Use them.
797 (insert_memory_breakpoint): New function, based off
798 set_raw_breakpoint_at.
799 (remove_memory_breakpoint): New function.
800 (set_raw_breakpoint_at): Reimplement.
801 (set_breakpoint): New, based on set_breakpoint_at.
802 (set_breakpoint_at): Reimplement.
803 (delete_raw_breakpoint): Go through the_target->remove_point
804 instead of assuming memory breakpoints.
805 (find_gdb_breakpoint_at): Delete.
806 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
807 (find_gdb_breakpoint): New function.
808 (set_gdb_breakpoint_at): Delete.
809 (z_type_supported): New function.
810 (set_gdb_breakpoint_1): New function, loosely based off
811 set_gdb_breakpoint_at.
812 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
813 (delete_gdb_breakpoint_at): Delete.
814 (delete_gdb_breakpoint_1): New function, loosely based off
815 delete_gdb_breakpoint_at.
816 (delete_gdb_breakpoint): New function.
817 (clear_gdb_breakpoint_conditions): Rename to ...
818 (clear_breakpoint_conditions): ... this. Don't handle a NULL
820 (add_condition_to_breakpoint): Make static.
821 (add_breakpoint_condition): Take a struct breakpoint pointer
822 instead of an address. Adjust.
823 (gdb_condition_true_at_breakpoint): Rename to ...
824 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
826 (gdb_condition_true_at_breakpoint): Reimplement.
827 (add_breakpoint_commands): Take a struct breakpoint pointer
828 instead of an address. Adjust.
829 (gdb_no_commands_at_breakpoint): Rename to ...
830 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
831 parameter. Return true if no breakpoint was found. Change debug
833 (gdb_no_commands_at_breakpoint): Reimplement.
834 (run_breakpoint_commands): Rename to ...
835 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
836 and change return type to boolean.
837 (run_breakpoint_commands): New function.
838 (gdb_breakpoint_here): Also check for Z1 breakpoints.
839 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
840 breakpoint. Go through the_target->remove_point instead of
841 assuming memory breakpoint.
842 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
843 software and hardware breakpoints.
844 (reinsert_raw_breakpoint): Go through the_target->insert_point
845 instead of assuming memory breakpoint.
846 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
847 software and hardware breakpoints.
848 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
849 Check both software and hardware breakpoints.
850 (validate_inserted_breakpoint): Assert the breakpoint is a
851 software breakpoint. Set the inserted flag to -1 instead of
852 setting shlib_disabled.
853 (delete_disabled_breakpoints): Adjust.
854 (validate_breakpoints): Only validate software breakpoints.
855 Adjust to inserted flag change.
856 (check_mem_read, check_mem_write): Skip breakpoint types other
857 than software breakpoints. Adjust to inserted flag change.
858 * mem-break.h (enum raw_bkpt_type): New enum.
859 (raw_breakpoint, struct process_info): Forward declare.
860 (Z_packet_to_target_hw_bp_type): Delete declaration.
861 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
862 (set_gdb_breakpoint, delete_gdb_breakpoint)
863 (clear_breakpoint_conditions): New declarations.
864 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
865 (breakpoint_inserted_here): Update comment.
866 (add_breakpoint_condition, add_breakpoint_commands): Replace
867 address parameter with a breakpoint pointer parameter.
868 (gdb_breakpoint_here): Update comment.
869 (delete_gdb_breakpoint_at): Delete.
870 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
871 * server.c (process_point_options): Take a struct breakpoint
872 pointer instead of an address. Adjust.
873 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
874 delete_gdb_breakpoint.
875 * spu-low.c (spu_target_ops): Install NULL as
876 supports_z_point_type method.
877 * target.h: Include mem-break.h.
878 (struct target_ops) <prepare_to_access_memory>: Update comment.
879 <supports_z_point_type>: New field.
880 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
881 instead of a char. Also take a raw breakpoint pointer.
882 * win32-arm-low.c (the_low_target): Install NULL as
883 supports_z_point_type.
884 * win32-i386-low.c (i386_supports_z_point_type): New function.
885 (i386_insert_point, i386_remove_point): Adjust to new interface.
886 (the_low_target): Install i386_supports_z_point_type.
887 * win32-low.c (win32_supports_z_point_type): New function.
888 (win32_insert_point, win32_remove_point): Adjust to new interface.
889 (win32_target_ops): Install win32_supports_z_point_type.
890 * win32-low.h (struct win32_target_ops):
891 <supports_z_point_type>: New method.
892 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
893 instead of a char. Also take a raw breakpoint pointer.
895 2014-05-20 Pedro Alves <palves@redhat.com>
897 * mem-break.h: Include break-common.h.
898 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
899 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
900 (Z_packet_to_target_hw_bp_type): New declaration.
901 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
902 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
903 (Z_PACKET_ACCESS_WP): Delete macros.
904 (Z_packet_to_hw_type): Delete function.
905 * i386-low.h: Don't include break-common.h here.
906 (Z_packet_to_hw_type): Delete declaration.
907 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
908 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
909 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
910 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
911 * linux-aarch64-low.c: Don't include break-common.h here.
912 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
913 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
914 (Z_packet_to_target_hw_bp_type): Delete function.
915 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
917 (mips_insert_point, mips_remove_point): Use
918 Z_packet_to_target_hw_bp_type.
920 2014-05-20 Pedro Alves <palves@redhat.com>
922 * linux-aarch64-low.c: Include break-common.h.
923 (enum target_point_type): Delete.
924 (Z_packet_to_point_type): Rename to ...
925 (Z_packet_to_target_hw_bp_type): ... this, and return a
926 target_hw_bp_type instead.
927 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
928 instead of an enum target_point_type.
929 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
931 (aarch64_dr_state_insert_one_point)
932 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
933 (aarch64_handle_aligned_watchpoint)
934 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
935 Take an enum target_hw_bp_type instead of an enum
937 (aarch64_supports_z_point_type): New function.
938 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
939 use Z_packet_to_target_hw_bp_type.
941 2014-05-20 Joel Brobecker <brobecker@adacore.com>
943 * configure.ac: Only use -Werror by default when DEVELOPMENT
945 * configure: Regenerate.
947 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
949 Fix gdbserver qGetTLSAddr for x86_64 -m32.
950 * linux-x86-low.c (X86_64_USER_REGS): New.
951 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
953 2014-04-28 Yao Qi <yao@codesourcery.com>
955 * Makefile.in (i386-avx512.c): Fix the typo of generated file
958 2014-04-25 Pedro Alves <palves@redhat.com>
961 * linux-low.c (linux_attach_fail_reason_string): New function.
962 (linux_attach_lwp): Delete.
963 (linux_attach_lwp_1): Rename to ...
964 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
965 argument. Remove "initial" parameter. Return int instead of
966 void. Don't error or warn here.
967 (linux_attach): Adjust to call linux_attach_lwp. Call error on
968 failure to attach to the tgid. Call warning when failing to
970 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
971 argument. Remove "initial" parameter. Return int instead of
972 void. Don't error or warn here.
973 (linux_attach_fail_reason_string): New declaration.
974 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
975 interface change. Use linux_attach_fail_reason_string.
977 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
978 Walfred Tedeschi <walfred.tedeschi@intel.com>
980 * Makefile.in: Added rules to handle new files
981 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
982 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
983 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
984 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
985 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
986 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
988 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
989 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
990 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
992 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
993 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
994 i386/x32-avx512-linux.xml.
995 * i387-fp.c (num_avx512_k_registers): New constant for number
997 (num_avx512_zmmh_low_registers): New constant for number of
998 lower ZMM registers (0-15).
999 (num_avx512_zmmh_high_registers): New constant for number of
1000 higher ZMM registers (16-31).
1001 (num_avx512_ymmh_registers): New contant for number of higher
1002 YMM registers (ymm16-31 added by avx521 on x86_64).
1003 (num_avx512_xmm_registers): New constant for number of higher
1004 XMM registers (xmm16-31 added by AVX512 on x86_64).
1005 (struct i387_xsave): Add space for AVX512 registers.
1006 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1007 Add code to handle AVX512 registers.
1008 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1009 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1010 prototypei from generated file.
1011 (tdesc_amd64_avx512_linux): Likewise.
1012 (init_registers_x32_avx512_linux): Likewise.
1013 (tdesc_x32_avx512_linux): Likewise.
1014 (init_registers_i386_avx512_linux): Likewise.
1015 (tdesc_i386_avx512_linux): Likewise.
1016 (x86_64_regmap): Add AVX512 registers.
1017 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1019 (initialize_low_arch): Add code to initialize AVX512 registers.
1021 2014-04-23 Pedro Alves <palves@redhat.com>
1023 * mem-break.c (find_gdb_breakpoint_at): Make static.
1024 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1026 2014-04-23 Pedro Alves <palves@redhat.com>
1028 * i386-low.c: Don't include break-common.h here.
1029 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1030 prototype to take target_hw_bp_type as argument instead of a Z
1032 * i386-low.h: Include break-common.h here.
1033 (Z_packet_to_hw_type): Declare.
1034 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1036 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1037 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1038 (x86_remove_point): Convert the packet number to a
1039 target_hw_bp_type before calling i386_low_remove_watchpoint.
1040 * win32-i386-low.c (i386_insert_point): Convert the packet number
1041 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1042 (i386_remove_point): Convert the packet number to a
1043 target_hw_bp_type before calling i386_low_remove_watchpoint.
1045 2014-04-23 Pedro Alves <palves@redhat.com>
1047 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1049 2014-04-10 Pedro Alves <palves@redhat.com>
1051 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1052 Check if the condition or command is NULL before checking if the
1053 breakpoint is known. On success, return true.
1054 * mem-break.h (add_breakpoint_condition): Document return.
1055 (add_breakpoint_commands): Add describing comment.
1056 * server.c (skip_to_semicolon): New function.
1057 (process_point_options): Use it.
1059 2014-04-09 Pedro Alves <palves@redhat.com>
1061 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1064 2014-02-27 Pedro Alves <palves@redhat.com>
1067 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1069 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1071 (last_thread_of_process_p): Take a PID argument instead of a
1073 (linux_wait_for_lwp): Delete.
1074 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1076 (linux_low_filter_event): New function, party factored out from
1077 linux_wait_for_event.
1078 (linux_wait_for_event): Rename to ...
1079 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1080 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1081 sigsuspend. Check for zombie leaders.
1082 (linux_wait_for_event): Reimplement as wrapper around
1083 linux_wait_for_event_filtered.
1084 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1085 a normal or signal exit is seen, it's the whole process exiting.
1086 (wait_for_sigstop): No longer a for_each_inferior callback.
1087 Rewrite on top of linux_wait_for_event_filtered.
1088 (stop_all_lwps): Call wait_for_sigstop directly.
1089 * server.c (resume, handle_target_event): Handle
1090 TARGET_WAITKIND_NO_RESUMED.
1092 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1094 * win32-low.c (psapi_get_dll_name,
1095 * win32_CreateToolhelp32Snapshot): Delete.
1096 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1097 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1099 (handle_load_dll): Add function description.
1100 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1102 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1104 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1106 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1107 base address when calling win32_add_one_solib.
1108 (handle_load_dll): Delete local variable load_addr.
1109 Remove 0x1000 offset applied to DLL base address when calling
1110 win32_add_one_solib.
1111 (handle_unload_dll): Add comment.
1113 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1115 * win32-low.c (win32_add_all_dlls): Renames
1116 win32_ensure_ntdll_loaded. Rewrite function documentation.
1117 Adjust implementation to always load all DLLs.
1118 Add 0x1000 offset to DLL base address when calling
1119 win32_add_one_solib.
1120 (child_initialization_done): New static global.
1121 (do_initial_child_stuff): Set child_initialization_done to
1122 zero during child initialization, and 1 after. Replace call
1123 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1125 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1126 (handle_unload_dll): Add function documentation.
1127 (get_child_debug_event): Ignore load and unload DLL events
1128 during child initialization.
1130 2014-02-20 Doug Evans <dje@google.com>
1132 Remove global all_lwps.
1133 * inferiors.h (ptid_of): Move here from linux-low.h.
1134 (pid_of, lwpid_of): Ditto.
1135 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1136 parameter is a struct thread_info * now.
1137 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1138 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1139 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1141 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1142 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1143 * linux-arm-low.c (update_registers_callback): Update, "entry"
1144 parameter is a struct thread_info * now.
1145 Fetch lwpid from current_inferior directly.
1146 (arm_insert_point): Pass &all_threads to find_inferior instead of
1148 (arm_remove_point): Ditto.
1149 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1150 (arm_prepare_to_resume): Fetch pid from thread.
1151 (arm_read_description): Fetch lwpid from current_inferior directly.
1152 * linux-low.c (all_lwps): Delete.
1153 (delete_lwp): Delete call to remove_inferior.
1154 (handle_extended_wait): Fetch lwpid from thread.
1155 (add_lwp): Don't set lwp->entry.id. Remove call to
1156 add_inferior_to_list.
1157 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1158 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1159 (kill_one_lwp_callback): Ditto.
1160 (linux_kill): Don't dereference NULL pointer.
1161 Fetch ptid,lwpid from thread.
1162 (get_detach_signal): Fetch ptid from thread.
1163 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1164 Simplify call to regcache_invalidate_thread.
1165 (delete_lwp_callback): Update, "entry" parameter is a
1166 struct thread_info * now. Fetch pid from thread.
1167 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1168 (status_pending_p_callback): Update, "entry" parameter is a
1169 struct thread_info * now. Fetch ptid from thread.
1170 (find_lwp_pid): Update, "entry" parameter is a
1171 struct thread_info * now.
1172 (linux_wait_for_lwp): Fetch pid from thread.
1173 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1174 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1175 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1176 (dequeue_one_deferred_signal): Ditto.
1177 (cancel_breakpoint): Fetch ptid from current_inferior.
1178 (linux_wait_for_event): Pass &all_threads to find_inferior,
1179 not &all_lwps. Fetch ptid, lwpid from thread.
1180 (count_events_callback): Update, "entry" parameter is a
1181 struct thread_info * now.
1182 (select_singlestep_lwp_callback): Ditto.
1183 (select_event_lwp_callback): Ditto.
1184 (cancel_breakpoints_callback): Ditto.
1185 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1187 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1188 (unsuspend_one_lwp): Update, "entry" parameter is a
1189 struct thread_info * now.
1190 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1192 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1193 Fetch lwpid from thread, not lwp.
1194 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1195 Pass &all_threads to find_inferior, not &all_lwps.
1196 (send_sigstop): Fetch lwpid from thread, not lwp.
1197 (send_sigstop_callback): Update, "entry" parameter is a
1198 struct thread_info * now.
1199 (suspend_and_send_sigstop_callback): Ditto.
1200 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1201 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1202 struct thread_info * now.
1203 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1205 (lwp_running): Update, "entry" parameter is a
1206 struct thread_info * now.
1207 (stop_all_lwps): Fetch ptid from thread.
1208 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1209 (linux_resume_one_lwp): Fetch lwpid from thread.
1210 (linux_set_resume_request): Update, "entry" parameter is a
1211 struct thread_info * now. Fetch pid, lwpid from thread.
1212 (resume_status_pending_p): Update, "entry" parameter is a
1213 struct thread_info * now.
1214 (need_step_over_p): Ditto. Fetch lwpid from thread.
1215 (start_step_over): Fetch lwpid from thread.
1216 (linux_resume_one_thread): Update, "entry" parameter is a
1217 struct thread_info * now. Fetch lwpid from thread.
1218 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1219 (proceed_one_lwp): Update, "entry" parameter is a
1220 struct thread_info * now. Fetch lwpid from thread.
1221 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1222 struct thread_info * now.
1223 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1224 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1225 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1227 (regsets_store_inferior_registers): Ditto.
1228 (fetch_register, store_register): Ditto.
1229 (linux_read_memory, linux_write_memory): Ditto.
1230 (linux_request_interrupt): Ditto.
1231 (linux_read_auxv): Ditto.
1232 (linux_xfer_siginfo): Ditto.
1233 (linux_qxfer_spu): Ditto.
1234 (linux_qxfer_libraries_svr4): Ditto.
1235 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1236 moved to inferiors.h.
1238 (get_thread_lwp): Update.
1239 (struct lwp_info): Delete member "entry". Simplify comment for
1242 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1243 current_inferior directly.
1244 (update_watch_registers_callback): Update, "entry" parameter is a
1245 struct thread_info * now. Fetch pid from thread.
1246 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1247 (mips_insert_point): Fetch lwpid from current_inferior.
1248 Pass &all_threads to find_inferior, not &all_lwps.
1249 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1250 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1252 (mips_stopped_data_address): Ditto.
1253 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1255 * linux-tile-low.c (tile_arch_setup): Ditto.
1256 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1257 (update_debug_registers_callback): Update, "entry" parameter is a
1258 struct thread_info * now. Fetch pid from thread.
1259 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1260 Pass &all_threads to find_inferior, not &all_lwps.
1261 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1262 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1263 Pass &all_threads to find_inferior, not &all_lwps.
1264 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1265 (i386_dr_low_get_status): Ditto.
1266 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1267 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1268 (x86_linux_read_description): Ditto.
1269 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1271 2014-02-20 Doug Evans <dje@google.com>
1273 * inferiors.c (get_first_inferior): Fix buglet.
1275 2014-02-19 Doug Evans <dje@google.com>
1277 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1278 * inferiors.c (add_thread): Change result type to struct thread_info *.
1279 All callers updated.
1280 (add_lwp): Call add_thread here instead of in callers.
1281 All callers updated.
1282 * linux-low.h (get_lwp_thread): Rewrite.
1283 (struct lwp_info): New member "thread".
1285 2014-02-19 Doug Evans <dje@google.com>
1287 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1288 All callers updated.
1290 2014-02-19 Doug Evans <dje@google.com>
1292 * inferiors.c (add_thread): Fix whitespace.
1294 2014-02-19 Doug Evans <dje@google.com>
1296 * dll.c (clear_dlls): Replace accessing list implemention details
1298 * gdbthread.h (get_first_thread): Declare.
1299 * inferiors.c (for_each_inferior_with_data): New function.
1300 (get_first_thread): New function.
1301 (find_thread_ptid): Simplify.
1302 (get_first_inferior): New function.
1303 (clear_list): Delete.
1304 (one_inferior_p): New function.
1305 (clear_inferior_list): New function.
1306 (clear_inferiors): Update.
1307 * inferiors.h (for_each_inferior_with_data): Declare.
1308 (clear_inferior_list): Declare.
1309 (one_inferior_p): Declare.
1310 (get_first_inferior): Declare.
1311 * linux-low.c (linux_wait_for_event): Replace accessing list
1312 implemention details with API function.
1313 * server.c (target_running): Ditto.
1314 (accumulate_file_name_length): New function.
1315 (emit_dll_description): New function.
1316 (handle_qxfer_libraries): Replace accessing list implemention
1317 details with API function.
1318 (handle_qxfer_threads_worker): New function.
1319 (handle_qxfer_threads_proper): Replace accessing list implemention
1320 details with API function.
1321 (handle_query): Ditto.
1322 (visit_actioned_threads_callback_ftype): New typedef.
1323 (visit_actioned_threads_data): New struct.
1324 (visit_actioned_threads): Rewrite to be find_inferior callback.
1325 (resume): Call find_inferior.
1326 (handle_status): Replace accessing list implemention
1327 details with API function.
1328 (process_serial_event): Replace accessing list implemention details
1330 * target.c (set_desired_inferior): Replace accessing list implemention
1331 details with API function.
1332 * tracepoint.c (same_process_p): New function.
1333 (gdb_agent_about_to_close): Replace accessing list implemention
1334 details with API function.
1335 * win32-low.c (child_delete_thread): Replace accessing list
1336 implemention details with API function.
1337 (match_dll_by_basename): New function.
1338 (dll_is_loaded_by_basename): New function.
1339 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1340 details call to dll_is_loaded_by_basename.
1342 2014-02-19 Doug Evans <dje@google.com>
1344 * dll.h (struct dll_info): Add comment.
1345 * gdbthread.h (struct thread_info): Add comment.
1346 (current_ptid): Simplify.
1347 * inferiors.c (add_process): Update.
1348 (remove_process): Update.
1349 * inferiors.h (struct process_info): Rename member "head" to "entry".
1350 * linux-low.c (delete_lwp): Update.
1352 (last_thread_of_process_p): Update.
1353 (kill_one_lwp_callback, linux_kill): Update.
1354 (status_pending_p_callback): Update.
1355 (wait_for_sigstop): Update. Simplify read of ptid.
1356 (start_step_over): Update.
1357 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1358 (get_lwp_thread): Update.
1359 (struct lwp_info): Rename member "head" to "entry".
1360 * regcache.h (inferior_list_entry): Delete.
1361 * server.c (kill_inferior_callback): Update.
1362 (detach_or_kill_inferior_callback): Update.
1363 (print_started_pid): Update.
1364 (print_attached_pid): Update.
1365 (process_serial_event): Simplify read of ptid.
1366 * thread-db.c (thread_db_create_event): Update.
1367 (thread_db_get_tls_address): Update.
1368 * win32-low.c (current_inferior_ptid): Simplify.
1370 2014-02-19 Tom Tromey <tromey@redhat.com>
1372 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1374 (target_supports_btrace): Update.
1376 2014-02-14 Yao Qi <yao@codesourcery.com>
1378 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1379 (rsp-low-ipa.o): New target.
1381 2014-02-12 Tom Tromey <tromey@redhat.com>
1383 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1384 convert_ascii_to_int.
1385 * regcache.c (registers_to_string): Likewise.
1386 * remote-utils.c (decode_M_packet): Likewise.
1387 * server.c (process_serial_event): Likewise.
1389 2014-02-12 Tom Tromey <tromey@redhat.com>
1391 * server.c (handle_query, handle_v_run): Use hex2bin, not
1393 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1395 2014-02-12 Tom Tromey <tromey@redhat.com>
1397 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1398 convert_int_to_ascii.
1399 * regcache.c (registers_to_string, collect_register_as_string):
1401 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1403 * server.c (process_serial_event): Likewise.
1404 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1405 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1407 2014-02-12 Tom Tromey <tromey@redhat.com>
1409 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1410 bin2hex, not hexify.
1411 * tracepoint.c (cmd_qtstatus): Likewise.
1413 2014-02-12 Tom Tromey <tromey@redhat.com>
1415 * remote-utils.c (monitor_output): Pass explicit length to
1418 2014-02-12 Tom Tromey <tromey@redhat.com>
1420 * tracepoint.c: Include rsp-low.h.
1421 * server.c: Include rsp-low.h.
1422 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1423 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1425 * remote-utils.c: Include rsp-low.h.
1426 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1427 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1428 (convert_int_to_ascii, convert_ascii_to_int): Move to
1430 * regcache.c: Include rsp-low.h.
1431 * ax.c: Include rsp-low.h.
1432 * Makefile.in (SFILES): Add common/rsp-low.c.
1433 (OBS): Add rsp-low.o.
1434 (rsp-low.o): New target.
1436 2014-02-12 Tom Tromey <tromey@redhat.com>
1438 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1439 Include print-utils.h.
1440 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1441 (plongest, thirty_two, phex_nz): Remove.
1442 * Makefile.in (SFILES): Add common/print-utils.c.
1443 (OBS): Add print-utils.o.
1444 (print-utils-ipa.o): New target.
1445 (print-utils.o): New target.
1446 (IPA_OBJS): Add print-utils-ipa.o.
1448 2014-02-06 Tom Tromey <tromey@redhat.com>
1450 * Makefile.in (SFILES): Fix indentation.
1452 2014-02-05 Doug Evans <dje@google.com>
1454 * linux-low.c (linux_wait_for_event): Improve comment.
1455 (linux_wait_1): Keep current_inferior in sync with event_child.
1457 2014-01-22 Doug Evans <dje@google.com>
1459 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1461 2014-01-22 Doug Evans <dje@google.com>
1463 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1464 * configure: Regenerate.
1465 * config.in: Regenerate.
1466 * Makefile.in (SFILES): Add debug.c.
1468 * debug.c: New file.
1469 * debug.h: New file.
1470 * linux-aarch64-low.c (*): Update all debugging printfs to use
1471 debug_printf instead of fprintf.
1472 * linux-arm-low.c (*): Ditto.
1473 * linux-cris-low.c (*): Ditto.
1474 * linux-crisv32-low.c (*): Ditto.
1475 * linux-m32r-low.c (*): Ditto.
1476 * linux-sparc-low.c (*): Ditto.
1477 * linux-x86.c (*): Ditto.
1478 * linux-low.c (*): Ditto.
1479 (linux_wait_1): Add calls to debug_enter, debug_exit.
1480 (linux_wait): Remove redundant debugging printf.
1481 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1482 (linux_resume, unstop_all_lwps): Ditto.
1483 * mem-break.c (*): Update all debugging printfs to use
1484 debug_printf instead of fprintf.
1485 * remote-utils.c (*): Ditto.
1486 * thread-db.c (*): Ditto.
1487 * server.c #include <ctype.h>, "gdb_vecs.h".
1488 (debug_threads): Moved to debug.c.
1489 (*): Update all debugging printfs to use debug_printf instead of
1491 (start_inferior): Replace call to fflush with call to debug_flush.
1492 (monitor_show_help): Mention set debug-format.
1493 (parse_debug_format_options): New function.
1494 (handle_monitor_command): Handle "monitor set debug-format".
1495 (gdbserver_usage): Mention --debug-format.
1496 (main): Parse --debug-format.
1497 * server.h (debug_threads): Declaration moved to debug.h.
1499 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1500 trace_debug_1 that uses debug_printf.
1501 (tracepoint_look_up_symbols): Update all debugging printfs to use
1502 debug_printf instead of fprintf.
1504 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1506 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1509 2014-01-17 Pedro Alves <palves@redhat.com>
1512 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1513 defined after including gdb_proc_service.h.
1515 2014-01-16 Doug Evans <dje@google.com>
1517 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1518 (match_dll): Use it.
1520 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1522 * target.h (target_ops) <read_btrace>: Change parameters and
1523 return type to allow error reporting.
1524 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1525 trace reading errors on.
1526 * linux-low.c (linux_low_read_btrace): Pass trace reading
1528 (linux_low_disable_btrace): New.
1530 2014-01-15 Doug Evans <dje@google.com>
1532 * inferiors.c (thread_id_to_gdb_id): Delete.
1533 * inferiors.h (thread_id_to_gdb_id): Delete.
1535 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1537 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1538 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1541 2014-01-08 Pedro Alves <palves@redhat.com>
1543 * server.c (handle_status): Don't discard previous queued stop
1544 replies or thread's pending status here.
1545 (main) <disconnection>: Do it here instead.
1547 2014-01-08 Pedro Alves <palves@redhat.com>
1549 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1550 * server.c (visit_actioned_threads, handle_pending_status): New
1552 (handle_v_cont): Factor out parts to ...
1553 (resume): ... this new function. If in all-stop, and a thread
1554 being resumed has a pending status, report it without actually
1556 (myresume): Adjust to use the new 'resume' function.
1557 (clear_pending_status_callback, set_pending_status_callback)
1558 (find_status_pending_thread_callback): New functions.
1559 (handle_status): Handle the case of multiple threads having
1560 interesting statuses to report. Report threads' real last signal
1561 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1562 with an interesting thread to report the status for, instead of
1563 always reporting the status of the first thread.
1565 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1567 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1568 * gdbreplay.c (gdbreplay_version): Likewise.
1570 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1572 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1573 iov.iov_len with the real length in use.
1575 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1577 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1578 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1579 for all targets that use win32-low.c.
1580 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1581 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1583 2013-12-13 Pedro Alves <palves@redhat.com>
1585 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1586 if equal to TARGET_WAITKIND_LOADED.
1587 * win32-low.c (cached_status): New static global.
1588 (win32_wait): Add declaration.
1589 (do_initial_child_stuff): Flush all initial pending debug events
1590 up to the initial breakpoint.
1591 (win32_wait): If CACHED_STATUS was set, return that instead
1592 of doing a real wait. Remove the code resuming the execution
1593 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1594 during the initial phase. Also remove the code changing
1595 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1596 TARGET_WAITKIND_STOPPED.
1598 2013-12-11 Yao Qi <yao@codesourcery.com>
1600 * notif.c (handle_notif_ack): Return 0 if no notification
1603 2013-11-20 Doug Evans <dje@google.com>
1605 * linux-low.c (linux_set_resume_request): Fix comment.
1607 2013-11-20 Doug Evans <dje@google.com>
1609 * linux-low.c (resume_status_pending_p): Tweak comment.
1611 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1613 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1614 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1615 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1616 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1617 (srv_amd64_regobj): Add amd64-mpx.o.
1618 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1619 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1620 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1621 * i387-fp.c (num_pl_bnd_register) Added constant.
1622 (num_pl_bnd_cfg_registers) Added constant.
1623 (struct i387_xsave) Added reserved area and MPX fields.
1624 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1625 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1627 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1628 (init_registers_amd64_mpx_linux): Declare new function.
1629 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1630 (x86_64_regmap): Add MPX registers.
1631 (x86_linux_read_description): Add MPX case.
1632 (initialize_low_arch): Initialize MPX targets.
1634 2013-11-18 Tom Tromey <tromey@redhat.com>
1636 * configure: Rebuild.
1637 * configure.ac: Don't check for stdlib.h.
1638 * gdbreplay.c: Unconditionally include stdlib.h.
1640 2013-11-18 Tom Tromey <tromey@redhat.com>
1642 * config.in: Rebuild.
1643 * configure: Rebuild.
1644 * configure.ac: Don't use AC_HEADER_DIRENT.
1646 2013-11-18 Tom Tromey <tromey@redhat.com>
1648 * server.h: Don't check HAVE_STRING_H.
1649 * gdbreplay.c: Don't check HAVE_STRING_H.
1650 * configure: Rebuild.
1652 2013-11-18 Tom Tromey <tromey@redhat.com>
1654 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1657 2013-11-08 Tom Tromey <tromey@redhat.com>
1659 * configure, config.in: Rebuild.
1660 * configure.ac: Remove unused configury.
1662 2013-11-08 Tom Tromey <tromey@redhat.com>
1664 * acinclude.m4: Include common.m4, codeset.m4.
1665 * configure, config.in: Rebuild.
1666 * configure.ac: Use GDB_AC_COMMON.
1668 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1670 * linux-s390-low.c (HWCAP_S390_TE): New define.
1671 (s390_arch_setup): Consider the TE field in the HWCAP for
1672 determining 'have_regset_tdb'.
1674 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1677 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1680 2013-10-02 Pedro Alves <palves@redhat.com>
1682 * server.c (process_serial_event): Don't output "GDBserver
1683 exiting" if GDB is connected through stdio.
1684 * target.c (mywait): Likewise, be silent if GDB is connected
1687 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1689 * lynx-low.c (lynx_add_threads_after_attach): New function.
1690 (lynx_attach): Remove call to add_thread. Add call to
1691 lynx_add_threads_after_attach instead.
1693 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1695 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1696 * config.in, configure: Regenerated.
1698 2013-09-18 Yao Qi <yao@codesourcery.com>
1701 * server.c (start_inferior): Clear 'resume_info'.
1703 2013-09-16 Jiong Wang <jiwang@tilera.com>
1705 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1708 2013-09-16 Jiong Wang <jiwang@tilera.com>
1710 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1711 linux-tile-low.o to srv_tgtobj.
1713 2013-09-16 Will Newton <will.newton@linaro.org>
1715 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1718 2013-09-06 Pedro Alves <palves@redhat.com>
1720 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1721 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1722 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1723 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1724 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1725 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1727 2013-09-06 Pedro Alves <palves@redhat.com>
1729 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1730 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1732 2013-09-06 Pedro Alves <palves@redhat.com>
1734 * linux-amd64-ipa.c: Include tracepoint.h.
1735 * linux-i386-ipa.c: Include tracepoint.h.
1737 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1739 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1740 (ps_get_thread_area): New function.
1742 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1744 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1745 (initialize_low_arch): Call init_registers_crisv32 rather than
1746 init_register_crisv32.
1748 2013-09-05 Pedro Alves <palves@redhat.com>
1750 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1752 * hostio.h: ... this new file.
1753 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1754 win32-low.c: Include hostio.h.
1756 2013-09-05 Pedro Alves <palves@redhat.com>
1758 * server.h (gdb_client_data, handler_func, callback_handler_func)
1759 (delete_file_handler, add_file_handler, append_callback_event)
1760 (delete_callback_event, start_event_loop, initialize_event_loop):
1761 Move to event-loop.h and include it.
1762 * event-loop.h: New file.
1764 2013-09-05 Pedro Alves <palves@redhat.com>
1766 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1767 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1768 (loaded_dll, unloaded_dll): Move to ...
1769 * dll.h: ... this new file.
1770 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1772 2013-09-05 Pedro Alves <palves@redhat.com>
1774 * server.h (current_process, get_thread_process, all_processes)
1775 (add_inferior_to_list, for_each_inferior, current_inferior)
1776 (remove_inferior, add_process, remove_process, find_process_pid)
1777 (have_started_inferiors_p, have_attached_inferiors_p)
1778 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1779 (clear_inferiors, find_inferior, find_inferior_id)
1780 (inferior_target_data, set_inferior_target_data)
1781 (inferior_regcache_data, set_inferior_regcache_data): Move to
1782 inferiors.h, and include it.
1783 * inferiors.h: New file.
1785 2013-09-05 Pedro Alves <palves@redhat.com>
1787 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1791 2013-09-05 Pedro Alves <palves@redhat.com>
1793 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1795 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1796 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1797 (handle_tracepoint_general_set, handle_tracepoint_query)
1798 (tracepoint_finished_step, tracepoint_was_hit)
1799 (release_while_stepping_state_list, current_traceframe)
1800 (in_readonly_region, traceframe_read_mem)
1801 (fetch_traceframe_registers, traceframe_read_sdata)
1802 (traceframe_read_info, struct fast_tpoint_collect_status)
1803 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1804 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1805 (supply_fast_tracepoint_registers)
1806 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1807 (ipa_tdesc, claim_trampoline_space)
1808 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1809 (agent_mem_read, agent_get_trace_state_variable_value)
1810 (agent_set_trace_state_variable_value, agent_tsv_read)
1811 (agent_mem_read_string, get_raw_reg_func_addr)
1812 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1813 * tracepoint.h: ... this new file.
1815 2013-09-05 Pedro Alves <palves@redhat.com>
1817 * server.h (perror_with_name, error, fatal, warning, paddress)
1818 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1820 * utils.h: New file.
1822 2013-09-05 Pedro Alves <palves@redhat.com>
1824 * server.h (remote_debug, noack_mode, transport_is_reliable)
1825 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1826 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1827 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1828 (write_enn, initialize_async_io, enable_async_io)
1829 (disable_async_io, check_remote_input_interrupt_request)
1830 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1831 (dead_thread_notify, prepare_resume_reply)
1832 (decode_address_to_semicolon, decode_address, decode_m_packet)
1833 (decode_M_packet, decode_X_packet, decode_xfer_write)
1834 (decode_search_memory_packet, unhexify, hexify)
1835 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1836 (look_up_one_symbol, relocate_instruction)
1837 (monitor_output): Move to remote-utils.h, and include it.
1838 * remote-utils.h: New file.
1840 2013-09-05 Pedro Alves <palves@redhat.com>
1842 * server.h (_): Delete.
1844 2013-09-02 Pedro Alves <palves@redhat.com>
1846 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1847 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1849 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1851 2013-09-02 Pierre Muller <muller@sourceware.org>
1853 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1854 or WriteProcessMemory complete successfully and handle
1855 ERROR_PARTIAL_COPY error.
1857 2013-09-02 Pedro Alves <palves@redhat.com>
1859 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1860 error instead of EIO.
1862 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1865 * linux-low.c: Include filestuff.h.
1866 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1867 * lynx-low.c: Include filestuff.h.
1868 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1869 * server.c: Include filestuff.h.
1870 (main): Call notice_open_fds.
1871 * spu-low.c: Include filestuff.h.
1872 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1874 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1876 * Makefile.in: Explain why ../target and ../nat are not
1877 listed as include file search paths.
1878 (linux-waitpid.o): New object file rule.
1879 * configure.srv (srv_native_linux_obj): New variable.
1880 Replace all occurrences of linux native object files with
1881 $srv_native_linux_obj.
1882 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1883 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1884 (linux_enable_event_reporting): Remove declaration.
1885 (my_waitpid): Moved to common/linux-waitpid.c.
1886 (linux_wait_for_event): Pass ptid when calling
1887 linux_enable_event_reporting.
1888 (linux_supports_tracefork_flag): Remove.
1889 (linux_enable_event_reporting): Likewise.
1890 (linux_tracefork_grandchild): Remove.
1891 (STACK_SIZE): Moved to common/linux-ptrace.c.
1892 (linux_tracefork_child): Remove.
1893 (linux_test_for_tracefork): Remove.
1894 (linux_look_up_symbols): Call linux_supports_traceclone.
1895 (initialize_low): Remove call to linux_test_for_tracefork.
1896 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1897 common/linux-ptrace.h.
1898 (PTRACE_TYPE_ARG4): Likewise.
1899 Include linux-ptrace.h.
1901 2013-08-21 Pedro Alves <palves@redhat.com>
1903 * config.in: Renegerate.
1905 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1907 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1908 (SFILES): Remove $(srcdir)/common/target-common.c and
1909 add $(srcdir)/target/waitstatus.c.
1910 (OBS): Remove target-common.o and add waitstatus.o.
1911 (server_h): Remove $(srcdir)/../common/target-common.h and
1912 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1913 and $(srcdir)/../target/waitstatus.h.
1914 (target-common.o): Remove.
1915 (waitstatus.o): New target object file.
1916 * target.h: Do not include target-common.h and
1917 include target/resume.h, target/wait.h and
1918 target/waitstatus.h.
1920 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1922 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1923 to PTRACE_TYPE_ARG3.
1924 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1925 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1927 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1928 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1930 2013-07-27 Jie Zhang <jie@codesourcery.com>
1931 Daniel Jacobowitz <dan@codesourcery.com>
1932 Yao Qi <yao@codesourcery.com>
1934 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1935 (mips-linux-watch.o): New rule.
1936 (mips_linux_watch_h): New variable.
1937 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1939 * linux-mips-low.c: Include mips-linux-watch.h.
1940 (struct arch_process_info, struct arch_lwp_info): New.
1941 (update_watch_registers_callback): New function.
1942 (mips_linux_new_process, mips_linux_new_thread) New functions.
1943 (mips_linux_prepare_to_resume, mips_insert_point): New
1945 (mips_remove_point, mips_stopped_by_watchpoint): New
1947 (rsp_bp_type_to_target_hw_bp_type): New function.
1948 (mips_stopped_data_address): New function.
1949 (the_low_target): Add watchpoint support functions.
1951 2013-07-27 Yao Qi <yao@codesourcery.com>
1953 * i386-low.c: Include break-common.h.
1954 (enum target_hw_bp_type): Remove.
1956 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
1958 * Makefile.in (SFILES): /common/target-common.c.
1959 (OBS): Add target-common.o.
1960 (server_h): Add $(srcdir)/../common/target-common.h.
1961 (target-common.o): New target.
1962 * server.c (queue_stop_reply_callback): Free
1963 status string after use.
1964 * target.c (target_waitstatus_to_string): Remove.
1965 * target.h: Include target-common.h.
1966 (resume_kind): Likewise.
1967 (target_waitkind): Likewise.
1968 (target_waitstatus): Likewise.
1969 (TARGET_WNOHANG): Likewise.
1971 2013-07-04 Yao Qi <yao@codesourcery.com>
1973 * Makefile.in (host_alias): Use @host_noncanonical@.
1974 (target_alias): Use @target_noncanonical@.
1975 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1976 ACX_NONCANONICAL_HOST.
1977 * configure: Regenerated.
1980 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1982 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1983 * configure: Rebuild.
1984 * Makefile.in (version_host, version_target): Get from configure.
1985 (version.c): Use $(version_host) and $(version_target).
1987 2013-07-03 Pedro Alves <palves@redhat.com>
1989 * Makefile.in (config.status): Depend on development.sh.
1990 * acinclude.m4: Include libmcheck.m4.
1991 * configure: Regenerate.
1993 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1995 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1996 attribute inside the parentheses.
1997 (winapi_DebugSetProcessKillOnExit): Ditto.
1998 (winapi_DebugBreakProcess): Ditto.
1999 (winapi_GenerateConsoleCtrlEvent): Ditto.
2001 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2003 * notif.h (notif_event): Add a dummy member to avoid compiler
2006 2013-07-01 Pedro Alves <palves@redhat.com>
2008 * hostio.c (HOSTIO_PATH_MAX): Define.
2009 (require_filename, handle_open, handle_unlink, handle_readlink):
2012 2013-07-01 Pedro Alves <palves@redhat.com>
2014 * server.h: Include "pathmax.h".
2015 * linux-low.c: Don't include sys/param.h.
2016 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2018 * win32-low.c: Don't include sys/param.h.
2019 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2021 2013-07-01 Pedro Alves <palves@redhat.com>
2023 * event-loop.c: Don't check HAVE_UNISTD_H before including
2025 * gdbreplay.c: Likewise.
2026 * remote-utils.c: Likewise.
2027 * server.c: Likewise.
2028 * configure.ac: Don't check for unistd.h.
2029 * configure: Regenerate.
2031 2013-06-28 Tom Tromey <tromey@redhat.com>
2033 * Makefile.in (version.c): Use version.in, not
2036 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2038 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2039 * configure: Rebuild.
2040 * Makefile.in (version_host, version_target): Get from configure.
2041 (version.c): Use $(version_host) and $(version_target).
2043 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2045 Fix trace-status to output user name without trailing colon.
2046 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2048 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2050 Fix trace-status to output proper start-time and stop-time.
2051 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2052 output start time and stop time in hex as gdb expects.
2054 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2056 * tracepoint.c (build_traceframe_info_xml): Output trace state
2057 variables present in the trace buffer.
2059 2013-06-24 Tom Tromey <tromey@redhat.com>
2061 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2063 (version.o): Remove.
2064 * gdbreplay.c: Include version.h.
2065 (version, host_name): Don't declare.
2066 * server.h: Include version.h.
2067 (version, host_name): Don't declare.
2069 2013-06-12 Pedro Alves <palves@redhat.com>
2071 * linux-x86-low.c (linux_is_elf64): Delete global.
2072 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2073 with local linux_pid_exe_is_elf_64_file use.
2075 2013-06-11 Pedro Alves <palves@redhat.com>
2077 * linux-low.c (regset_disabled, disable_regset): New functions.
2078 (regsets_fetch_inferior_registers)
2079 (regsets_store_inferior_registers): Use them.
2080 (initialize_regsets_info); Don't allocate the disabled_regsets
2082 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2085 2013-06-11 Pedro Alves <palves@redhat.com>
2087 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2090 2013-06-11 Pedro Alves <palves@redhat.com>
2092 * linux-x86-low.c (initialize_low_arch): Call
2093 init_registers_x32_avx_linux.
2095 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2097 Fix compatibility with Android Bionic.
2098 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2101 2013-06-07 Pedro Alves <palves@redhat.com>
2104 * Makefile.in (OBS): Add tdesc.o.
2105 (IPA_OBJS): Add tdesc-ipa.o.
2106 (tdesc-ipa.o): New rule.
2107 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2109 * linux-low.c (new_inferior): Delete.
2110 (disabled_regsets, num_regsets): Delete.
2111 (linux_add_process): Adjust to set the new per-process
2113 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2114 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2115 was a stop. When calling arch_setup, switch the current inferior
2116 to the thread that got an event.
2117 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2118 (regsets_fetch_inferior_registers)
2119 (regsets_store_inferior_registers): New regsets_info parameter.
2121 (linux_register_in_regsets): New regs_info parameter. Adjust to
2123 (register_addr, fetch_register, store_register): New usrregs_info
2124 parameter. Adjust to use it.
2125 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2126 parameter regs_info. Adjust to use it.
2127 (linux_fetch_registers): Get the current inferior's regs_info, and
2129 (linux_store_registers): Ditto.
2130 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2131 (initialize_low): Don't initialize the target_regsets here. Call
2132 initialize_low_arch.
2133 * linux-low.h (target_regsets): Delete declaration.
2134 (struct regsets_info): New.
2135 (struct usrregs_info): New.
2136 (struct regs_info): New.
2137 (struct process_info_private) <new_inferior>: New field.
2138 (struct linux_target_ops): Delete the num_regs, regmap, and
2139 regset_bitmap fields. New field regs_info.
2140 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2141 * i387-fp.c (num_xmm_registers): Delete.
2142 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2143 calls to new interface.
2144 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2145 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2146 Infer the number of xmm registers from the regcache's target
2148 * i387-fp.h (num_xmm_registers): Delete.
2149 * inferiors.c (add_thread): Don't install the thread's regcache
2151 * proc-service.c (gregset_info): Fetch the current inferior's
2152 regs_info. Adjust to use it.
2153 * regcache.c: Include tdesc.h.
2154 (register_bytes, reg_defs, num_registers)
2155 (gdbserver_expedite_regs): Delete.
2156 (get_thread_regcache): If the thread doesn't have a regcache yet,
2157 create one, instead of aborting gdbserver.
2158 (regcache_invalidate_one): Rename to ...
2159 (regcache_invalidate_thread): ... this.
2160 (regcache_invalidate_one): New.
2161 (regcache_invalidate): Only invalidate registers of the current
2163 (init_register_cache): Add target_desc parameter, and use it.
2164 (new_register_cache): Ditto. Assert the target description has a
2165 non zero registers_size.
2166 (regcache_cpy): Add assertions. Adjust.
2167 (realloc_register_cache, set_register_cache): Delete.
2168 (registers_to_string, registers_from_string): Adjust.
2169 (find_register_by_name, find_regno, find_register_by_number)
2170 (register_cache_size): Add target_desc parameter, and use it.
2171 (free_register_cache_thread, free_register_cache_thread_one)
2172 (regcache_release, register_cache_size): New.
2173 (register_size): Add target_desc parameter, and use it.
2174 (register_data, supply_register, supply_register_zeroed)
2175 (supply_regblock, supply_register_by_name, collect_register)
2176 (collect_register_as_string, collect_register_by_name): Adjust.
2177 * regcache.h (struct target_desc): Forward declare.
2178 (struct regcache) <tdesc>: New field.
2179 (init_register_cache, new_register_cache): Add target_desc
2181 (regcache_invalidate_thread): Declare.
2182 (regcache_invalidate_one): Delete declaration.
2183 (regcache_release): Declare.
2184 (find_register_by_number, register_cache_size, register_size)
2185 (find_regno): Add target_desc parameter.
2186 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2188 * remote-utils.c: Include tdesc.h.
2189 (outreg, prepare_resume_reply): Adjust.
2190 * server.c: Include tdesc.h.
2191 (gdbserver_xmltarget): Delete declaration.
2192 (get_features_xml, process_serial_event): Adjust.
2193 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2195 (struct process_info) <tdesc>: New field.
2196 (ipa_tdesc): Declare.
2197 * tdesc.c: New file.
2198 * tdesc.h: New file.
2199 * tracepoint.c: Include tdesc.h.
2200 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2201 (get_context_regcache): Adjust to pass ipa_tdesc down.
2202 (do_action_at_tracepoint): Adjust to get the register cache size
2203 from the context regcache's description.
2204 (traceframe_walk_blocks): Adjust to get the register cache size
2205 from the current trace frame's description.
2206 (traceframe_get_pc): Adjust to get current trace frame's
2207 description and pass it down.
2208 (gdb_collect): Adjust to get the register cache size from the
2210 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2211 (gdbserver_xmltarget): Delete.
2212 (initialize_low_tracepoint): Set the ipa's target description.
2213 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2214 (initialize_low_tracepoint): Set the ipa's target description.
2215 * linux-x86-low.c: Include tdesc.h.
2216 [__x86_64__] (is_64bit_tdesc): New.
2217 (ps_get_thread_area, x86_get_thread_area): Use it.
2218 (i386_cannot_store_register): Rename to ...
2219 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2220 (i386_cannot_fetch_register): Rename to ...
2221 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2222 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2224 (target_regsets): Rename to ...
2225 (x86_regsets): ... this.
2226 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2228 (x86_siginfo_fixup): Use is_64bit_tdesc.
2229 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2230 (tdesc_x32_avx_linux, tdesc_x32_linux)
2231 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2233 (x86_linux_update_xmltarget): Delete.
2234 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2235 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2236 (AMD64_LINUX_USER64_CS): New.
2237 (x86_linux_read_description): New, based on
2238 x86_linux_update_xmltarget.
2239 (same_process_callback): New.
2240 (x86_arch_setup_process_callback): New.
2241 (x86_linux_update_xmltarget): New.
2242 (x86_regsets_info): New.
2243 (amd64_linux_regs_info): New.
2244 (i386_linux_usrregs_info): New.
2245 (i386_linux_regs_info): New.
2246 (x86_linux_regs_info): New.
2247 (x86_arch_setup): Reimplement.
2248 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2249 (x86_emit_ops): Ditto.
2250 (the_low_target): Adjust. Install x86_linux_regs_info,
2251 x86_cannot_fetch_register, and x86_cannot_store_register.
2252 (initialize_low_arch): New.
2253 * linux-ia64-low.c (tdesc_ia64): Declare.
2254 (ia64_fetch_register): Adjust.
2255 (ia64_usrregs_info, regs_info): New globals.
2256 (ia64_regs_info): New function.
2257 (the_low_target): Adjust.
2258 (initialize_low_arch): New function.
2259 * linux-sparc-low.c (tdesc_sparc64): Declare.
2260 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2262 (sparc_arch_setup): New function.
2263 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2264 (the_low_target): Adjust.
2265 (initialize_low_arch): New function.
2266 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2267 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2268 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2269 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2270 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2271 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2272 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2273 (tdesc_powerpc_isa205_vsx64l): Declare.
2274 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2275 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2276 (ppc_set_pc, ppc_get_hwcap): Adjust.
2277 (ppc_usrregs_info): Forward declare.
2278 (!__powerpc64__) ppc_regmap_adjusted: New global.
2279 (ppc_arch_setup): Adjust to the current process'es target
2281 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2282 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2283 (ppc_store_evrregset): Adjust.
2284 (target_regsets): Rename to ...
2285 (ppc_regsets): ... this, and make static.
2286 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2287 (ppc_regs_info): New function.
2288 (the_low_target): Adjust.
2289 (initialize_low_arch): New function.
2290 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2291 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2292 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2293 (tdesc_s390x_linux64v2): Declare.
2294 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2295 (s390_fill_gregset, s390_store_last_break): Adjust.
2296 (target_regsets): Rename to ...
2297 (s390_regsets): ... this, and make static.
2298 (s390_get_pc, s390_set_pc): Adjust.
2299 (s390_get_hwcap): New target_desc parameter, and use it.
2300 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2301 (s390_arch_setup): Adjust to set the current process'es target
2302 description. Don't adjust the regmap.
2303 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2304 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2305 (regs_info_3264): New globals.
2306 (s390_regs_info): New function.
2307 (the_low_target): Adjust.
2308 (initialize_low_arch): New function.
2309 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2310 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2311 [__mips64] (init_registers_mips_linux)
2312 (init_registers_mips_dsp_linux): Delete defines.
2313 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2314 (have_dsp): New global.
2315 (mips_read_description): New, based on mips_arch_setup.
2316 (mips_arch_setup): Reimplement.
2317 (get_usrregs_info): New function.
2318 (mips_cannot_fetch_register, mips_cannot_store_register)
2319 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2320 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2321 (target_regsets): Rename to ...
2322 (mips_regsets): ... this, and make static.
2323 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2324 (dsp_regs_info, regs_info): New globals.
2325 (mips_regs_info): New function.
2326 (the_low_target): Adjust.
2327 (initialize_low_arch): New function.
2328 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2329 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2331 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2332 (arm_read_description): New, with bits factored from
2334 (arm_arch_setup): Reimplement.
2335 (target_regsets): Rename to ...
2336 (arm_regsets): ... this, and make static.
2337 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2338 (arm_regs_info): New function.
2339 (the_low_target): Adjust.
2340 (initialize_low_arch): New function.
2341 * linux-m68k-low.c (tdesc_m68k): Declare.
2342 (target_regsets): Rename to ...
2343 (m68k_regsets): ... this, and make static.
2344 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2345 (m68k_regs_info): New function.
2346 (m68k_arch_setup): New function.
2347 (the_low_target): Adjust.
2348 (initialize_low_arch): New function.
2349 * linux-sh-low.c (tdesc_sharch): Declare.
2350 (target_regsets): Rename to ...
2351 (sh_regsets): ... this, and make static.
2352 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2353 (sh_regs_info, sh_arch_setup): New functions.
2354 (the_low_target): Adjust.
2355 (initialize_low_arch): New function.
2356 * linux-bfin-low.c (tdesc_bfin): Declare.
2357 (bfin_arch_setup): New function.
2358 (bfin_usrregs_info, regs_info): New globals.
2359 (bfin_regs_info): New function.
2360 (the_low_target): Adjust.
2361 (initialize_low_arch): New function.
2362 * linux-cris-low.c (tdesc_cris): Declare.
2363 (cris_arch_setup): New function.
2364 (cris_usrregs_info, regs_info): New globals.
2365 (cris_regs_info): New function.
2366 (the_low_target): Adjust.
2367 (initialize_low_arch): New function.
2368 * linux-cris-low.c (tdesc_crisv32): Declare.
2369 (cris_arch_setup): New function.
2370 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2371 (cris_regs_info): New function.
2372 (the_low_target): Adjust.
2373 (initialize_low_arch): New function.
2374 * linux-m32r-low.c (tdesc_m32r): Declare.
2375 (m32r_arch_setup): New function.
2376 (m32r_usrregs_info, regs_info): New globals.
2377 (m32r_regs_info): Adjust.
2378 (initialize_low_arch): New function.
2379 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2380 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2381 (tic6x_usrregs_info): Forward declare.
2382 (tic6x_read_description): New function, based on ...
2383 (tic6x_arch_setup): ... this. Reimplement.
2384 (target_regsets): Rename to ...
2385 (tic6x_regsets): ... this, and make static.
2386 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2387 (tic6x_regs_info): New function.
2388 (the_low_target): Adjust.
2389 (initialize_low_arch): New function.
2390 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2391 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2392 (target_regsets): Rename to ...
2393 (xtensa_regsets): ... this, and make static.
2394 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2396 (xtensa_arch_setup, xtensa_regs_info): New functions.
2397 (the_low_target): Adjust.
2398 (initialize_low_arch): New function.
2399 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2400 (nios2_arch_setup): Set the current process'es tdesc.
2401 (target_regsets): Rename to ...
2402 (nios2_regsets): ... this.
2403 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2404 (nios2_regs_info): New function.
2405 (the_low_target): Adjust.
2406 (initialize_low_arch): New function.
2407 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2408 (aarch64_arch_setup): Set the current process'es tdesc.
2409 (target_regsets): Rename to ...
2410 (aarch64_regsets): ... this.
2411 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2412 (aarch64_regs_info): New function.
2413 (the_low_target): Adjust.
2414 (initialize_low_arch): New function.
2415 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2417 (target_regsets): Rename to ...
2418 (tile_regsets): ... this.
2419 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2420 (tile_regs_info): New function.
2421 (tile_arch_setup): Set the current process'es tdesc.
2422 (the_low_target): Adjust.
2423 (initialize_low_arch): New function.
2424 * spu-low.c (tdesc_spu): Declare.
2425 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2426 * win32-arm-low.c (tdesc_arm): Declare.
2427 (arm_arch_setup): New function.
2428 (the_low_target): Install arm_arch_setup instead of
2430 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2431 (init_windows_x86): Rename to ...
2432 (i386_arch_setup): ... this. Set `win32_tdesc'.
2433 (the_low_target): Adjust.
2434 * win32-low.c (win32_tdesc): New global.
2435 (child_add_thread): Don't create the thread cache here.
2436 (do_initial_child_stuff): Set the new process'es tdesc.
2437 * win32-low.h (struct target_desc): Forward declare.
2438 (win32_tdesc): Declare.
2439 * lynx-i386-low.c (tdesc_i386): Declare global.
2440 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2441 * lynx-low.c (lynx_tdesc): New global.
2442 (lynx_add_process): Set the new process'es tdesc.
2443 * lynx-low.h (struct target_desc): Forward declare.
2444 (lynx_tdesc): Declare global.
2445 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2446 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2447 * nto-low.c (nto_tdesc): New global.
2448 (do_attach): Set the new process'es tdesc.
2449 * nto-low.h (struct target_desc): Forward declare.
2450 (nto_tdesc): Declare.
2451 * nto-x86-low.c (tdesc_i386): Declare.
2452 (nto_x86_arch_setup): Set `nto_tdesc'.
2454 2013-06-04 Gary Benson <gbenson@redhat.com>
2456 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2457 to qSupported response when appropriate.
2458 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2459 with nonzero-length annex.
2460 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2461 arguments supplied in annex.
2463 2013-05-31 Doug Evans <dje@google.com>
2466 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2467 64 bits in 64-cross-32 environment.
2469 2013-05-28 Pedro Alves <palves@redhat.com>
2471 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2472 (aarch64-without-fpu.c): Delete rule.
2473 * configure.srv (aarch64*-*-linux*): Remove references to
2474 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2475 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2478 2013-05-24 Pedro Alves <palves@redhat.com>
2480 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2481 instead of strchr/decode_address. Error if the range isn't split
2482 with a ','. Don't assume there's be a ':' in the action.
2484 2013-05-23 Yao Qi <yao@codesourcery.com>
2485 Pedro Alves <palves@redhat.com>
2487 * linux-low.c (lwp_in_step_range): New function.
2488 (linux_wait_1): If the thread was range stepping and stopped
2489 outside the stepping range, report the stop to GDB. Otherwise,
2490 continue stepping. Add range stepping debug output.
2491 (linux_set_resume_request): Copy the step range from the resume
2493 (linux_supports_range_stepping): New.
2494 (linux_target_ops) <supports_range_stepping>: Set to
2495 linux_supports_range_stepping.
2496 * linux-low.h (struct linux_target_ops)
2497 <supports_range_stepping>: New field.
2498 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2499 * linux-x86-low.c (x86_supports_range_stepping): New.
2500 (the_low_target) <supports_range_stepping>: Set to
2501 x86_supports_range_stepping.
2502 * server.c (handle_v_cont): Handle 'r' action.
2503 (handle_v_requests): Append ";r" if the target supports range
2505 * target.h (struct thread_resume) <step_range_start,
2506 step_range_end>: New fields.
2507 (struct target_ops) <supports_range_stepping>:
2509 (target_supports_range_stepping): New macro.
2511 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2513 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2514 confusion in comment.
2516 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2518 * lynx-low.c (struct process_info_private): New type.
2519 (lynx_add_process): New function.
2520 (lynx_create_inferior, lynx_attach): Replace calls to
2521 add_process by calls to lynx_add_process.
2522 (lynx_resume): If PTID is null, then try using
2523 current_process()->private->last_wait_event_ptid.
2525 (lynx_clear_inferiors): Delete. The contents of that function
2526 has been inlined in lynx_mourn;
2527 (lynx_wait_1): Save the ptid in the process's private data.
2528 (lynx_mourn): Free the process' private data. Replace call
2529 to lynx_clear_inferiors by call to clear_inferiors.
2531 2013-05-17 Yao Qi <yao@codesourcery.com>
2533 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2536 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2538 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2539 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2540 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2541 PT_TEXT_END_ADDR guards. Update comments.
2542 (linux_target_op) <read_offsets>: Conditionally define to
2543 linux_read_offsets if the target is UCLIBC and if it defines
2544 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2546 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2547 Andrew Jenner <andrew@codesourcery.com>
2549 * Makefile.in (SFILES): Add linux-nios2-low.c.
2550 (clean): Add action to delete nios2-linux.c.
2551 (nios2-linux.c): New rule.
2552 * configure.srv: Add nios2*-*-linux*.
2553 * linux-nios2-low.c: New.
2555 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2557 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2559 2013-04-25 Hui Zhu <hui@codesourcery.com>
2562 * ax.c (ax_printf): Add fflush.
2564 2013-04-22 Tom Tromey <tromey@redhat.com>
2566 * Makefile.in (SFILES): Add filestuff.c.
2567 (OBS): Add filestuff.o.
2568 (filestuff.o): New target.
2569 * config.in, configure: Rebuild.
2570 * configure.ac: Check for fdwalk, pipe2.
2572 2013-04-17 Pedro Alves <palves@redhat.com>
2574 * configure.ac (USE_THREAD_DB): Delete variable.
2575 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2576 Don't AC_SUBST USE_THREAD_DB.
2577 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2578 * config.in, configure: Regenerate.
2580 2013-04-16 Pedro Alves <palves@redhat.com>
2582 * linux-low.h (struct lwp_info) <thread_known>: Move under
2583 the USE_THREAD_DB #ifdef.
2585 2013-04-16 Pedro Alves <palves@redhat.com>
2587 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2588 (linux-low.o): Delete rule.
2589 * linux-low.h: Always include "gdb_thread_db.h" instead of
2590 conditionally including thread_db.h.
2591 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2594 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2596 * Makefile.in (install-only): Fix make install regression.
2598 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2600 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2601 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2603 * gdbserver.1: Remove.
2605 2013-03-22 Pedro Alves <palves@redhat.com>
2607 * linux-low.c (handle_extended_wait): Don't call
2608 linux_enable_event_reporting.
2610 2013-03-15 Tony Theodore <tonyt@logyst.com>
2613 * Makefile.in (SHELL): Use @SHELL@.
2615 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2617 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2620 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2622 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2623 Remove extraneous NULL element.
2625 2013-03-13 Yao Qi <yao@codesourcery.com>
2627 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2628 'V' block in trace frame.
2630 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2632 * target.h (struct target_ops): Add btrace ops.
2633 (target_supports_btrace): New macro.
2634 (target_enable_btrace): New macro.
2635 (target_disable_btrace): New macro.
2636 (target_read_btrace): New macro.
2637 * gdbthread.h (struct thread_info): Add btrace field.
2638 * server.c: Include btrace-common.h.
2639 (handle_btrace_general_set): New function.
2640 (handle_btrace_enable): New function.
2641 (handle_btrace_disable): New function.
2642 (handle_general_set): Call handle_btrace_general_set.
2643 (handle_qxfer_btrace): New function.
2644 (struct qxfer qxfer_packets[]): Add btrace entry.
2645 * inferiors.c (remove_thread): Disable btrace.
2646 * linux-low: Include linux-btrace.h.
2647 (linux_low_enable_btrace): New function.
2648 (linux_low_read_btrace): New function.
2649 (linux_target_ops): Add btrace ops.
2650 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2651 Add srv_linux_btrace=yes.
2652 (x86_64-*-linux*): Add linux-btrace.o.
2653 Add srv_linux_btrace=yes.
2654 * configure.ac: Define HAVE_LINUX_BTRACE.
2655 * config.in: Regenerated.
2656 * configure: Regenerated.
2658 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2660 * server.c (handle_qxfer): Preserve error message if -3 is
2662 (qxfer): Document the -3 return value.
2664 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2666 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2667 (linux_btrace_h): New variable.
2668 (linux-btrace.o): New rule.
2670 2013-03-08 Stan Shebs <stan@codesourcery.com>
2671 Hafiz Abid Qadeer <abidh@codesourcery.com>
2673 * tracepoint.c (trace_buffer_size): New global.
2674 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2675 (init_trace_buffer): Change to one-argument function. Allocate
2676 trace buffer memory.
2677 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2678 handle QTBuffer:size packet.
2679 (cmd_bigqtbuffer_size): New function.
2680 (initialize_tracepoint): Call init_trace_buffer with
2681 DEFAULT_TRACE_BUFFER_SIZE.
2682 * server.c (handle_query): Add QTBuffer:size in the
2685 2013-03-07 Yao Qi <yao@codesourcery.com>
2687 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2688 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2690 (cmd_qtsp): Adjust condition. Do post increment.
2691 Set cur_action and cur_step_action back to 0.
2693 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2696 * linux-low.c (linux_write_memory): Return early success if LEN is
2699 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2701 * configure.srv: Add x86_64-*-cygwin* as target.
2703 2013-02-28 Tom Tromey <tromey@redhat.com>
2705 * configure.ac: Invoke AC_SYS_LARGEFILE.
2706 * configure, config.in: Rebuild.
2708 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2710 * win32-low.c: Throughout, fix format strings and casts of
2711 printf-like functions to avoid type related warnings on all
2713 (get_child_debug_event): Print dwDebugEventCode as hex since
2714 that's how it's usually documented.
2716 2013-02-28 Yao Qi <yao@codesourcery.com>
2718 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2721 2013-02-27 Jiong Wang <jiwang@tilera.com>
2723 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2724 (reg-tilegx32.c): New rule.
2725 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2726 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2727 different register info initializer according to elf class.
2728 (init_registers_tilgx32): New function. The tilegx32 register info
2730 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2731 (tile_store_gregset): Likewise.
2733 2013-02-27 Yao Qi <yao@codesourcery.com>
2735 * server.c (process_point_options): Print debug message when
2736 debug_threads is true.
2738 2013-02-26 Yao Qi <yao@codesourcery.com>
2740 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2742 2013-02-19 Pedro Alves <palves@redhat.com>
2743 Kai Tietz <ktietz@redhat.com>
2747 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2748 instead of strtoul to extract address from packet.
2749 (process_serial_event) <'z'>: Likewise.
2751 2013-02-18 Yao Qi <yao@codesourcery.com>
2753 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2755 2013-02-14 Pedro Alves <palves@redhat.com>
2759 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2760 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2762 2013-02-14 Pedro Alves <palves@redhat.com>
2764 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2766 2013-02-14 Pedro Alves <palves@redhat.com>
2768 * tracepoint.c (save_string): Delete.
2769 (add_tracepoint_action): Use savestring instead of save_string.
2771 2013-02-12 Pedro Alves <palves@redhat.com>
2773 * linux-xtensa-low.c: Ditto.
2774 * xtensa-xtregs.c: Ditto.
2776 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2778 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2781 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2783 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2784 aarch64_num_wp_regs and aarch64_num_bp_regs to
2785 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2787 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2789 * linux-aarch64-low.c (ps_get_thread_area): Replace
2790 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2792 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2793 Marcus Shawcroft <marcus.shawcroft@arm.com>
2794 Nigel Stephens <nigel.stephens@arm.com>
2795 Yufeng Zhang <yufeng.zhang@arm.com>
2797 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2798 (aarch64.c, aarch64-without-fpu.c): New targets.
2799 * configure.srv (aarch64*-*-linux*): New.
2800 * linux-aarch64-low.c: New file.
2802 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2804 * linux-low.c (handle_extended_wait, linux_create_inferior)
2805 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2806 (dequeue_one_deferred_signal, linux_resume_one_thread)
2807 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2808 (linux_tracefork_grandchild, linux_test_for_tracefork)
2809 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2810 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2811 where the argument is 0.
2813 2013-01-25 Yao Qi <yao@codesourcery.com>
2815 * event-loop.c: Include "queue.h".
2816 (gdb_event_p): New typedef.
2817 (struct gdb_event) <next_event>: Remove.
2818 (event_queue): Change to QUEUE(gdb_event_p).
2819 (async_queue_event): Remove.
2820 (gdb_event_xfree): New.
2821 (initialize_event_loop): New.
2822 (process_event): Use API from QUEUE.
2823 (wait_for_event): Likewise.
2824 * server.c (main): Call initialize_event_loop.
2825 * server.h (initialize_event_loop): Declare.
2827 2013-01-18 Yao Qi <yao@codesourcery.com>
2829 * ax.h (struct eval_agent_expr_context): New.
2830 (gdb_eval_agent_expr): Update declaration.
2831 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2832 TFRAME. Add new argument CTX.
2833 * server.h (struct eval_agent_expr_context): Declare.
2834 (agent_mem_read, agent_tsv_read): Update declaration.
2835 (agent_mem_read_string): Likewise.
2836 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2837 (add_traceframe_block): Add new argument TPOINT.
2838 Increase TPOINT->traceframe_usage.
2839 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2840 eval_tracepoint_agent_expr.
2841 (condition_true_at_tracepoint): Likewise.
2842 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2843 (agent_mem_read_string, agent_tsv_read): Likewise.
2845 2013-01-16 Yao Qi <yao@codesourcery.com>
2847 * linux-low.c (linux_resume_one_lwp): Don't check
2848 'lwp->bp_reinsert != 0'.
2850 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2851 Pedro Alves <palves@redhat.com>
2853 * lynx-low.c (ptrace_request_to_str): Define a temporary
2854 macro and use it to simplify this function's implementation.
2856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2858 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2861 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2863 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2865 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2867 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2869 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2871 * lynx-low.c (lynx_resume): Use the resume_info parameter
2872 to determine the ptid for the lynx_ptrace call, unless
2873 it is equal to minus_one_ptid, in which case we use the
2874 ptid of the current_inferior.
2875 (lynx_wait_1): After having received a thread create/exit
2876 event, resume the inferior's execution using the signaling
2877 thread's ptid, rather than the old ptid.
2879 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2881 * lynx-low.c (lynx_resume): Delete variable ret.
2883 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2885 * gdbreplay.c (gdbreplay_version): Update copyright year.
2886 * server.c (gdbserver_version): Likewise.
2888 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2890 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2893 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2895 * lynx-low.c (ptrace_request_to_str): Add handling for
2898 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2900 * lynx-low.c (lynx_attach): Delete variable new_process.
2902 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2904 * lynx-low.c (lynx_create_inferior): Delete variable
2907 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2909 * lynx-low.c (ptrace_request_to_str): Do not handle
2910 PTRACE_GETTHREADLIST if this macro does not exist.
2912 2012-12-15 Yao Qi <yao@codesourcery.com>
2914 * Makefile.in (OBS): Add notif.o.
2915 * notif.c, notif.h: New.
2916 * server.c: Include "notif.h".
2917 (struct vstop_notif) <next>: Remove.
2919 (queue_stop_reply): Update.
2920 (push_event, send_next_stop_reply): Remove.
2921 (discard_queued_stop_replies): Update.
2922 (notif_stop): New variable.
2923 (handle_v_stopped): Remove.
2924 (handle_v_requests): Don't call handle_v_stopped. Call
2925 handle_ack_notif instead.
2926 (queue_stop_reply_callback): Call notif_event_enque instead
2927 of queue_stop_reply.
2928 (handle_status): Don't call send_next_stop_reply, call
2929 notif_write_event instead.
2930 (kill_inferior_callback): Likewise.
2931 (detach_or_kill_inferior_callback): Likewise.
2932 (main): Call initialize_notif.
2933 (process_serial_event): Call QUEUE_is_empty.
2934 (handle_target_event): Call notif_push instead of push event.
2935 * server.h (push_event): Remove declaration.
2937 2012-12-10 Tom Tromey <tromey@redhat.com>
2939 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2940 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2943 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2944 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2945 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2946 (amd64-linux-ipa.o, ax.o): Rewrite.
2947 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2948 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2949 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2950 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2951 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2952 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2953 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2954 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2955 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2956 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2957 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2958 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2959 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2960 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2961 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2962 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2963 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2964 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2965 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2966 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2967 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2968 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2969 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2970 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2971 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2972 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2973 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2974 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2975 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2976 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2977 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2978 (reg-tilegx.o): Remove.
2979 (all_object_files): New macro.
2980 Include .deps files.
2981 * aclocal.m4, configure: Rebuild.
2982 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2983 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2984 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2986 2012-12-05 Tom Tromey <tromey@redhat.com>
2989 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2991 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
2993 * configure.ac: Check for linux/perf_event.h.
2994 * config.in: Regenerated.
2995 * configure: Regenerated.
2997 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2999 * hostio.c (handle_readlink): Decrease buffer size
3000 parameter passed to readlink by one byte.
3002 2012-11-26 Yao Qi <yao@codesourcery.com>
3004 * configure.ac (build_warnings): Append '-Wempty-body'.
3005 * configure: Regenerated.
3006 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3009 2012-11-15 Pierre Muller <muller@sourceware.org>
3011 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3012 * config.in: Regenerate.
3013 * configure: Regenerate.
3014 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3015 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3016 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3017 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3019 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3020 instead of <sys/wait.h> header.
3021 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3023 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3025 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3026 (various make rules): Remove -DGDBSERVER
3028 2012-11-09 Yao Qi <yao@codesourcery.com>
3030 * spu-low.c (current_ptid): Move it to ..
3031 * gdbthread.h: ... here. New.
3032 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3033 * server.c (myresume, process_serial_event): Likewise.
3034 * thread-db.c (thread_db_find_new_threads): Likewise.
3035 * tracepoint.c (run_inferior_command): Likewise.
3037 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3039 * server.c (handle_search_memory_1): Include access length in
3042 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3044 * linux-crisv32-low.c: Fix compile errors.
3046 2012-09-04 Yao Qi <yao@codesourcery.com>
3048 * tracepoint.c (cmd_qtsv): Adjust debug message.
3049 Don't check CUR_TPOINT.
3051 2012-08-28 Yao Qi <yao@codesourcery.com>
3053 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3054 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3055 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3056 Remove declarations of xmalloc, xreallloc, xstrdup and
3058 * Makefile.in (libiberty_h): New.
3059 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3060 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3062 2012-08-23 Yao Qi <yao@codesourcery.com>
3064 * server.h: Remove declaration of 'xsnprintf'.
3066 2012-08-22 Keith Seitz <keiths@redhat.com>
3068 * server.h: Include build-gnulib-gbserver/config.h.
3069 * gdbreplay.c: Likewise.
3071 2012-08-08 Doug Evans <dje@google.com>
3073 * Makefile.in (SFILES): Add gdb_vecs.c.
3074 (OBS): Add gdb_vecs.o.
3075 (gdb_vecs_h, host_defs_h): New variables.
3076 (thread-db.o): Add $(gdb_vecs_h) dependency.
3077 (gdb_vecs.o): New rule.
3078 * thread-db.c: #include "gdb_vecs.h".
3079 (thread_db_load_search): Use a vector to iterate over path elements.
3080 Handle text appearing after "$pdir".
3082 * configure.ac: Add check for strstr.
3083 * config.in: Regenerate.
3084 * configure: Regenerate.
3086 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3088 * hostio.c (handle_pread): If pread fails, fall back to attempting
3090 (handle_pwrite): Likewise for pwrite.
3092 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3094 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3095 between unsupported TYPE and unimplementable ADDR/LEN combination.
3096 (arm_insert_point): Act on new return value.
3098 2012-07-31 Pedro Alves <palves@redhat.com>
3100 * server.c (process_point_options): Only skip tokens if we find
3101 one that is unrecognized. Don't treat 'X' specially while
3102 skipping unrecognized tokens.
3104 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3106 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3107 to 4-byte-align HW breakpoint addresses for Thumb.
3109 2012-07-27 Yao Qi <yao@codesourcery.com>
3113 * server.h: Declare gdb_agent_about_to_close.
3114 * target.c (kill_inferior): Include "agent.h".
3115 New. Send command 'kill'.
3116 * target.h (kill_inferior): Removed macro.
3117 * tracepoint.c (gdb_agent_about_to_close): New.
3118 (gdb_agent_helper_thread): Handle command 'close'.
3119 Wait endlessly until the inferior stops.
3120 Install gdb_agent_remove_socket to atexit hook.
3121 (agent_socket_name): New static variable.
3122 (gdb_agent_socket_init): Replace local variable 'name' with
3123 'agent_socket_name'.
3124 (gdb_agent_remove_socket): New.
3126 2012-07-27 Yao Qi <yao@codesourcery.com>
3128 * server.c (process_point_options): Stop at 'X' when parsing.
3130 2012-07-19 Michael Eager <eager@eagercon.com>
3132 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3134 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3135 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3136 hardware breakpoint.
3138 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3140 * gdbserver/linux-low.c (initialize_low): Call
3141 linux_ptrace_init_warnings.
3143 2012-07-02 Doug Evans <dje@google.com>
3145 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3148 2012-07-02 Stan Shebs <stan@codesourcery.com>
3150 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3151 (ax.o): Add it to build rule.
3153 (OBS): Add format.o.
3154 (IPA_OBS): Add format.o.
3155 * server.c (handle_query): Claim support for breakpoint commands.
3156 (process_point_options): Add command case.
3157 (process_serial_event): Leave running if there are printfs in
3159 * mem-break.h (any_persistent_commands): Declare.
3160 (add_breakpoint_commands): Declare.
3161 (gdb_no_commands_at_breakpoint): Declare.
3162 (run_breakpoint_commands): Declare.
3163 * mem-break.c (struct point_command_list): New struct.
3164 (struct breakpoint): New field command_list.
3165 (any_persistent_commands): New function.
3166 (add_commands_to_breakpoint): New function.
3167 (add_breakpoint_commands): New function.
3168 (gdb_no_commands_at_breakpoint): New function.
3169 (run_breakpoint_commands): New function.
3170 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3172 * ax.c: Include format.h.
3173 (ax_printf): New function.
3174 (gdb_eval_agent_expr): Add printf opcode.
3176 2012-06-13 Yao Qi <yao@codesourcery.com>
3178 * server.c (start_inferior): Remove duplicated writes to fields
3179 'last_resume_kind' and 'last_status' of 'current_inferior'.
3181 2012-06-12 Yao Qi <yao@codesourcery.com>
3182 Pedro Alves <palves@redhat.com>
3184 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3186 * server.c (handle_v_cont): Extend comment.
3188 2012-06-11 Yao Qi <yao@codesourcery.com>
3190 * linux-low.c (linux_attach): Add 'static'.
3192 2012-06-06 Yao Qi <yao@codesourcery.com>
3194 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3196 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3198 Fix gcc -flto compilation warning.
3199 * server.c (main): Make variable multi_mode and attach volatile.
3201 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3203 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3204 if the platform doesn't know about it.
3206 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3208 * Makefile.in (SFILES): Add linux-tile-low.c.
3209 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3210 * configure.srv: Handle tilegx-*-linux*.
3211 * linux-tile-low.c: New file.
3213 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3215 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3217 2012-05-24 Pedro Alves <palves@redhat.com>
3221 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3223 2012-05-24 Pedro Alves <palves@redhat.com>
3227 Replace target_signal with gdb_signal throughout.
3229 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3231 * linux-low.c (linux_store_registers): Avoid the copying sequence
3232 when no data has been retrieved by ptrace.
3234 2012-05-22 Will Deacon <will.deacon@arm.com>
3236 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3237 Include asm/ptrace.h.
3238 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3241 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3243 * linux-low.c (linux_store_registers): Don't re-retrieve data
3244 with ptrace that has already been obtained from /proc. Always
3245 copy any data retrieved with ptrace to the buffer supplied.
3247 2012-05-11 Yao Qi <yao@codesourcery.com>
3248 Pedro Alves <palves@redhat.com>
3250 * linux-low.c (enum stopping_threads_kind): New.
3251 (stopping_threads): Change type to `enum stopping_threads_kind'.
3252 (handle_extended_wait): If stopping and suspending threads, leave
3253 the new_lwp suspended too.
3254 (linux_wait_for_event): Adjust.
3255 (stop_all_lwps): Set `stopping_threads' to
3256 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3257 whether we're suspending threads or just stopping them. Assert no
3260 2012-04-29 Yao Qi <yao@codesourcery.com>
3262 * server.h: Move some code to ...
3263 * gdbthread.h: ... here. New.
3264 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3265 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3266 (nto-low.o, win32-low.o): Likewise.
3267 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3268 * regcache.c, remote-utils.c, server.c: Likewise.
3269 * target.c, tracepoint.c, win32-low.c: Likewise.
3271 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3273 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3274 (PTRACE_ARG4_TYPE): Likewise.
3275 (PTRACE_XFER_TYPE): Likewise.
3276 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3277 ptrace to PTRACE_ARG3_TYPE.
3278 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3279 (PTRACE_ARG4_TYPE): Likewise.
3280 (PTRACE_XFER_TYPE): Likewise.
3281 (linux_detach_one_lwp): Cast fourth argument of
3282 ptrace to long then PTRACE_ARG4_TYPE.
3283 (regsets_fetch_inferior_registers): Cast third argument of
3284 ptrace to long then PTRACE_ARG3_TYPE.
3285 (regsets_store_inferior_registers): Likewise.
3287 2012-04-20 Pedro Alves <palves@redhat.com>
3289 * configure: Regenerate.
3291 2012-04-19 Pedro Alves <palves@redhat.com>
3293 * Makefile.in (GNULIB_BUILDDIR): New.
3294 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3295 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3296 (all, install-only, uninstall, clean-info, all-lib, clean): No
3297 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3298 (maintainer-clean realclean distclean): Use subdir_do.
3300 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3301 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3302 * acinclude.m4: Include acx_configure_dir.m4.
3303 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3304 calls. Call AC_PROG_RANLIB. Configure gnulib using
3307 (GNULIB_STDINT_H): Adjust.
3308 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3309 * gdbreplay.c: Include build-gnulib/config.h.
3310 * server.h: Likewise.
3311 * aclocal.m4: Regenerate.
3312 * config.in: Regenerate.
3313 * configure: Regenerate.
3315 2012-04-19 Pedro Alves <palves@redhat.com>
3317 * Makefile.in (LIBGNU, INCGNU): Adjust.
3318 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3319 (all, install-only, uninstall, clean-info, all-lib, clean)
3320 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3321 * configure.ac: Adjust AC_OUTPUT output.
3322 * aclocal.m4: Regenerate.
3323 * configure: Regenerate.
3325 2012-04-19 Pedro Alves <palves@redhat.com>
3327 * Makefile.in (generated_files): New.
3328 (server_h): Remove the explicit dependency on config.h, and depend
3329 on $generated_files.
3331 2012-04-19 Pedro Alves <palves@redhat.com>
3333 * Makefile.in (INCGNU): Add -Ignulib.
3335 2012-04-19 Pedro Alves <palves@redhat.com>
3337 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3338 (INCGNU): ... this, and spell out -I here.
3339 (GNULIB_LIB): Rename to ...
3341 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3343 2012-04-19 Pedro Alves <palves@redhat.com>
3345 * config.in: Regenerate.
3347 2012-04-19 Pedro Alves <palves@redhat.com>
3349 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3350 * server.h (memmem): Remove declaration.
3351 * config.in: Regenerate.
3352 * configure: Regenerate.
3354 2012-04-19 Yao Qi <yao@codesourcery.com>
3356 * Makefile.in (SFILES): Add common/vec.c.
3360 2012-04-19 Yao Qi <yao@codesourcery.com>
3362 * remote-utils.c (prepare_resume_reply): Replace with macro
3363 target_core_of_thread.
3364 * server.c (handle_qxfer_threads_proper): Likewise.
3365 * target.h (traget_core_of_thread): New macro.
3367 2012-04-18 Pedro Alves <palves@redhat.com>
3369 * aclocal.m4: Regenerate.
3370 * configure: Regenerate.
3372 2012-04-16 Yao Qi <yao@codesourcery.com>
3374 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3375 duplicated on address.
3377 2012-04-16 Yao Qi <yao@codesourcery.com>
3379 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3380 (struct tracepoint_action_ops) <send>: New field.
3381 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3382 (agent_expr_send, x_tracepoint_action_send): New.
3383 (l_tracepoint_action_send): New.
3384 (cmd_qtdp): Download and install tracepoint
3385 according to `use_agent'.
3386 (run_inferior_command): Add one more parameter `len'.
3388 (tracepoint_send_agent): New.
3389 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3391 2012-04-16 Yao Qi <yao@codesourcery.com>
3393 * tracepoint.c (download_tracepoints): Moved to ...
3394 (cmd_qtstart): ... here.
3396 2012-04-14 Yao Qi <yao@codesourcery.com>
3398 * tracepoint.c: Include inttypes.h.
3399 (struct collect_memory_action): Use sized types.
3400 (struct tracepoint): Likewise.
3401 (cmd_qtdp, stop_tracing): Update print specifiers.
3402 (cmd_qtp, response_tracepoint): Likewise.
3403 (collect_data_at_tracepoint): Likewise.
3404 (collect_data_at_step): Likewise.
3406 2012-04-14 Yao Qi <yao@codesourcery.com>
3408 Import gnulib module inttypes.
3409 * aclocal.m4, config.in, configure: Regenerated.
3411 2012-04-14 Yao Qi <yao@codesourcery.com>
3413 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3414 Makefile and config.status at last.
3416 2012-04-13 Yao Qi <yao@codesourcery.com>
3418 * tracepoint.c: Include stdint.h unconditionally.
3420 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3422 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3423 on BFD_HAVE_SYS_PROCFS_TYPE.
3424 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3425 * configure: Regenerate.
3426 * config.in: Likewise.
3428 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3430 * Makefile.in (clean): Also remove x32.c x32-linux.c
3431 x32-avx.c x32-avx-linux.c.
3432 (x32.o): New target.
3434 (x32-linux.o): Likewise.
3435 (x32-linux.c): Likewise.
3436 (x32-avx.o): Likewise.
3437 (x32-avx.c): Likewise.
3438 (x32-avx-linux.o): Likewise.
3439 (x32-avx-linux.c): Likewise.
3441 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3442 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3443 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3444 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3445 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3446 i386/x32-avx-linux.xml.
3448 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3449 (init_registers_x32_avx_linux): Likwise.
3450 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3451 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3453 2012-04-13 Pedro Alves <palves@redhat.com>
3455 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3456 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3457 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3458 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3461 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3463 * linux-x86-low.c (compat_x32_clock_t): New.
3464 (compat_x32_siginfo_t): Likewise.
3465 (compat_x32_siginfo_from_siginfo): Likewise.
3466 (siginfo_from_compat_x32_siginfo): Likewise.
3467 (linux_is_elf64): Likewise.
3468 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3469 and siginfo_from_compat_x32_siginfo for x32.
3470 (x86_arch_setup): Set linux_is_elf64.
3472 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3475 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3477 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3478 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3479 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3480 compatible with process.
3482 2012-04-12 Yao Qi <yao@codesourcery.com>
3484 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3485 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3486 (install-only, install-info, clean): Handle sub dir gnulib.
3487 (all-lib, am--refresh): New targets.
3488 (memmem.o): Remove target.
3489 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3490 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3491 (AC_REPLACE_FUNCS): Remove memmem.
3492 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3493 (AC_OUTPUT): Generate Makefile in gnulib/.
3494 * aclocal.m4, config.in, configure: Regenerated.
3496 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3498 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3500 2012-04-05 Pedro Alves <palves@redhat.com>
3502 -Werror=strict-aliasing
3504 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3507 2012-04-04 Pedro Alves <palves@redhat.com>
3509 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3510 (sparc_store_gregset_from_stack, sparc_store_gregset)
3511 (sparc_breakpoint_at): Fix formatting.
3513 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3515 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3517 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3518 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3519 * config.in: Regenerate.
3520 * configure: Likewise.
3522 2012-03-29 Pedro Alves <palves@redhat.com>
3524 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3525 Correct ptrace arguments.
3527 2012-03-28 Pedro Alves <palves@redhat.com>
3529 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3530 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3531 (IA64_FR1_REGNUM): New defines.
3532 (ia64_fetch_register): New.
3533 (the_low_target): Install it.
3534 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3536 * linux-low.c (linux_fetch_registers): Try the
3537 the_low_target.fetch_register hook first.
3539 * linux-arm-low.c (the_low_target): Adjust.
3540 * linux-bfin-low.c (the_low_target): Adjust.
3541 * linux-cris-low.c (the_low_target): Adjust.
3542 * linux-crisv32-low.c (the_low_target): Adjust.
3543 * linux-m32r-low.c (the_low_target): Adjust.
3544 * linux-m68k-low.c (the_low_target): Adjust.
3545 * linux-mips-low.c (the_low_target): Adjust.
3546 * linux-ppc-low.c (the_low_target): Adjust.
3547 * linux-s390-low.c (the_low_target): Adjust.
3548 * linux-sh-low.c (the_low_target): Adjust.
3549 * linux-sparc-low.c (the_low_target): Adjust.
3550 * linux-tic6x-low.c (the_low_target): Adjust.
3551 * linux-x86-low.c (the_low_target): Adjust.
3552 * linux-xtensa-low.c (the_low_target): Adjust.
3554 2012-03-26 Pedro Alves <palves@redhat.com>
3556 * server.c (handle_qxfer_libraries): Don't bail early if
3557 the_target->qxfer_libraries_svr4 is not NULL.
3559 2012-03-26 Pedro Alves <palves@redhat.com>
3561 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3563 2012-03-23 Pedro Alves <palves@redhat.com>
3565 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3566 "library-list-svr4" element's start tag when the the DSO list is
3569 2012-03-23 Pedro Alves <palves@redhat.com>
3571 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3572 a variable whose type size is the same as the inferior's pointer
3575 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3577 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3579 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3580 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3581 * linux-low.h: Include <signal.h>.
3582 (struct siginfo): Remove forward declaration.
3583 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3586 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3588 * .gitignore: Ignore more files.
3590 2012-03-19 Pedro Alves <palves@redhat.com>
3591 Jan Kratochvil <jan.kratochvil@redhat.com>
3593 * server.c (cont_thread, general_thread): Add describing comments.
3594 (start_inferior): Clear `cont_thread'.
3595 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3598 2012-03-15 Yao Qi <yao@codesourcery.com>
3600 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3602 (cmd_qtdp): ... here.
3604 2012-03-15 Yao Qi <yao@codesourcery.com>
3606 * tracepoint.c (struct tracepoint_action_ops): New.
3607 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3608 (m_tracepoint_action_download): New.
3609 (r_tracepoint_action_download): New.
3610 (x_tracepoint_action_download): New.
3611 (l_tracepoint_action_download): New.
3612 (add_tracepoint_action): Install `action->ops' according type.
3613 (download_tracepoint_1): Move code `download' function pointer
3614 of various tracepoint_action_ops.
3616 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3618 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3619 linux_ptrace_attach_warnings.
3621 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3623 * Makefile.in (linux-ptrace.o): New.
3624 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3625 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3626 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3627 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3628 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3630 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3632 2012-03-08 Yao Qi <yao@codesourcery.com>
3633 Pedro Alves <palves@redhat.com>
3635 Fix PR server/13392.
3636 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3638 * tracepoint.c (remove_tracepoint): New.
3639 (cmd_qtdp): Call remove_tracepoint when failed to install.
3641 2012-03-07 Pedro Alves <palves@redhat.com>
3643 * linux-low.c (get_detach_signal): New.
3644 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3645 Pass on pending signals to PTRACE_DETACH. Check the result of the
3647 * server.c (program_signals, program_signals_p): New.
3648 (handle_general_set): Handle QProgramSignals.
3649 * server.h (program_signals, program_signals_p): Declare.
3651 2012-03-05 Pedro Alves <palves@redhat.com>
3652 Jan Kratochvil <jan.kratochvil@redhat.com>
3654 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3657 2012-03-03 Yao Qi <yao@codesourcery.com>
3659 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3660 agent_look_up_symbols.
3662 2012-03-03 Yao Qi <yao@codesourcery.com>
3664 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3665 (linux-x86-low.o): Likewise.
3666 * server.h: Remove in_process_agent_loaded.
3667 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3671 2012-03-03 Yao Qi <yao@codesourcery.com>
3673 * tracepoint.c (gdb_agent_capability): New global.
3674 (in_process_agent_loaded_ust): Renamed to
3675 `in_process_agent_supports_ust'.
3677 (in_process_agent_supports_ust): Call agent_capability_check.
3678 (clear_installed_tracepoints): Assert that agent supports
3681 2012-03-03 Yao Qi <yao@codesourcery.com>
3683 * linux-low.c (linux_supports_agent): New.
3684 (linux_target_ops): Initialize field `supports_agent' with
3685 linux_supports_agent.
3686 * target.h (struct target_ops) <supports_agent>: New.
3687 (target_supports_agent): New macro.
3688 * server.c (handle_general_set): Handle packet 'QAgent'.
3689 (handle_query): Send `QAgent+'.
3690 * Makefile.in (server.o): Depends on agent.h.
3692 2012-03-03 Yao Qi <yao@codesourcery.com>
3694 * Makefile.in (OBS): Add agent.o.
3695 Add new rule for agent.o.
3696 Track dependence of tracepoint.c on agent.h.
3697 * tracepoint.c (run_inferior_command_1):
3698 (run_inferior_command): Call agent_run_command.
3699 (gdb_ust_connect_sync_socket): Deleted. Move it to
3701 (resume_thread, stop_thread): Likewise.
3702 (gdb_ust_socket_init): Renamed to ...
3703 (gdb_agent_socket_init): ... New.
3704 (gdb_ust_thread): Renamed to ...
3705 (gdb_agent_helper_thread): ... New.
3706 (gdb_ust_init): Move some code to ...
3707 (gdb_agent_init): ... here. New.
3708 [HAVE_UST]: Call gdb_ust_init.
3709 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3710 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3711 * config.in, configure: Regenerated.
3713 2012-03-02 Pedro Alves <palves@redhat.com>
3715 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3716 * linux-low.c (struct simple_pid_list): New.
3717 (stopped_pids): New a struct simple_pid_list pointer.
3718 (add_to_pid_list, pull_pid_from_list): New.
3719 (handle_extended_wait): Don't assume the first signal new children
3720 report is SIGSTOP. Adjust call to pull_pid_from_list.
3721 (linux_wait_for_lwp): Adjust.
3723 2012-03-02 Yao Qi <yao@codesourcery.com>
3725 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3728 2012-03-02 Yao Qi <yao@codesourcery.com>
3730 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3731 `stop_pc' and `tpoint'. Update caller.
3733 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3735 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3736 * linux-low.c (use_linux_regsets): New macro.
3737 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3738 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3739 (linux_register_in_regsets): New function.
3740 (usr_fetch_inferior_registers): Skip registers covered by
3742 (usr_store_inferior_registers): Likewise.
3743 (usr_fetch_inferior_registers): New macro.
3744 (usr_store_inferior_registers): Likewise.
3745 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3746 (linux_store_registers): Likewise.
3747 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3749 (init_registers_mips64_dsp_linux): Likewise.
3750 (init_registers_mips_linux): New macro.
3751 (init_registers_mips_dsp_linux): Likewise.
3752 (mips_dsp_num_regs): Likewise.
3753 (DSP_BASE, DSP_CONTROL): New fallback macros.
3754 (mips_base_regs): New macro.
3755 (mips_regmap): Use it. Fix the size.
3756 (mips_dsp_regmap): New variable.
3757 (mips_dsp_regset_bitmap): Likewise.
3758 (mips_arch_setup): New function.
3759 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3761 (mips_cannot_store_register): Likewise.
3762 (the_low_target): Update .arch_setup, .num_regs and .regmap
3763 initializers. Add .regset_bitmap initializer.
3764 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3766 * linux-bfin-low.c (the_low_target): Likewise.
3767 * linux-cris-low.c (the_low_target): Likewise.
3768 * linux-crisv32-low.c (the_low_target): Likewise.
3769 * linux-ia64-low.c (the_low_target): Likewise.
3770 * linux-m32r-low.c (the_low_target): Likewise.
3771 * linux-m68k-low.c (the_low_target): Likewise.
3772 * linux-ppc-low.c (the_low_target): Likewise.
3773 * linux-s390-low.c (the_low_target): Likewise.
3774 * linux-sh-low.c (the_low_target): Likewise.
3775 * linux-sparc-low.c (the_low_target): Likewise.
3776 * linux-tic6x-low.c (the_low_target): Likewise.
3777 * linux-x86-low.c (the_low_target): Likewise.
3778 * linux-xtensa-low.c (the_low_target): Likewise.
3779 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3780 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3781 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3783 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3784 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3786 2012-02-29 Yao Qi <yao@codesourcery.com>
3787 Pedro Alves <palves@redhat.com>
3789 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3790 `step_over_finished' is true.
3792 2012-02-27 Pedro Alves <palves@redhat.com>
3794 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3795 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3797 2012-02-27 Pedro Alves <palves@redhat.com>
3800 * linux-low.c (pid_is_stopped): New.
3801 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3803 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3805 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3808 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3810 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3812 2012-02-24 Luis Machado <lgustavo@codesourcery>
3814 * server.c (handle_query): Advertise support for target-side
3815 breakpoint condition evaluation.
3816 (process_point_options): New function.
3817 (process_serial_event): When inserting a breakpoint, check for
3818 a target-side condition that should be evaluated.
3820 * mem-break.c: Include regcache.h and ax.h.
3821 (point_cond_list_t): New data structure.
3822 (breakpoint) <cond_list>: New field.
3823 (find_gdb_breakpoint_at): Make non-static.
3824 (delete_gdb_breakpoint_at): Clear any target-side
3826 (clear_gdb_breakpoint_conditions): New function.
3827 (add_condition_to_breakpoint): Likewise.
3828 (add_breakpoint_condition): Likewise.
3829 (gdb_condition_true_at_breakpoint): Likewise.
3830 (gdb_breakpoint_here): Return result directly instead
3831 of going through a local variable.
3833 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3834 (clear_gdb_breakpoint_conditions): Likewise.
3835 (add_breakpoint_condition): Likewise.
3836 (gdb_condition_true_at_breakpoint): Likewise.
3838 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3839 (need_step_over_p): Take target-side breakpoint condition into
3842 2012-02-24 Luis Machado <lgustavo@codesourcery>
3844 * server.h: Include tracepoint.h.
3845 (agent_mem_read, agent_get_trace_state_variable_value,
3846 agent_set_trace_state_variable_value,
3847 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3848 get_set_tsv_func_addr): New prototypes.
3850 * ax.h: New include file.
3851 * ax.c: New source file.
3853 * tracepoint.c: Include ax.h.
3854 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3855 agent_expr, eval_result_type): Move to ax.h.
3856 (parse_agent_expr): Rename to ...
3857 (gdb_parse_agent_expr): ... this, make it non-static and move
3859 (unparse_agent_expr) Rename to ...
3860 (gdb_unparse_agent_expr): ... this, make it non-static and move
3862 (eval_agent_expr): Rename to ...
3863 (eval_tracepoint_agent_expr): ... this.
3864 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3865 forward declarations.
3866 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3867 (agent_get_trace_state_variable_value): New function.
3868 (agent_set_trace_state_variable_value): New function.
3869 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3870 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3871 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3872 (condition_true_at_tracepoint): Likewise.
3873 (parse_agent_expr): Rename to ...
3874 (gdb_parse_agent_expr): ... this and move to ax.c.
3875 (unparse_agent_expr): Rename to ...
3876 (gdb_unparse_agent_expr): ... this and move to ax.c.
3877 (gdb_agent_op_name): Move to ax.c.
3878 (eval_agent_expr): Rename to ...
3879 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3881 (eval_tracepoint_agent_expr): New function.
3882 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3884 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3886 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3887 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3888 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3889 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3890 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3891 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3892 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3893 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3894 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3895 (compile_bytecodes): Remove forward declaration.
3896 (is_goto_target): Move to ax.c.
3897 (compile_bytecodes): Move to ax.c and call
3898 agent_get_trace_state_variable_value (...) and
3899 agent_set_trace_state_variable_value (...).
3901 * Makefile.in: Update ax.c and IPA dependencies.
3903 2012-02-24 Pedro Alves <palves@redhat.com>
3905 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3906 (cmd_bigqtbuffer_circular): ... this. Only handle
3907 'QTBuffer:circular:'.
3908 (handle_tracepoint_general_set): Adjust.
3910 2012-02-16 Yao Qi <yao@codesourcery.com>
3912 * inferiors.c: Move code to ...
3913 * dll.c: .... here. New.
3914 * server.h: Declare clear_dlls.
3915 * Makefile.in (SFILES): Add dll.c.
3919 2012-02-11 Yao Qi <yao@codesourcery.com>
3921 * server.c: (handle_monitor_command): Add a new parameter
3923 (handle_query): Update caller.
3925 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3927 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3928 * configure, config.in: Regenerate.
3929 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3932 2012-02-02 Pedro Alves <palves@redhat.com>
3934 Try SIGKILL first, then PTRACE_KILL.
3935 * linux-low.c (linux_kill_one_lwp): New.
3936 (linux_kill_one_lwp): Rename to ...
3937 (kill_one_lwp_callback): ... this. Use the new
3940 2012-02-02 Pedro Alves <palves@redhat.com>
3942 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3945 2012-01-27 Pedro Alves <palves@redhat.com>
3947 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3948 (elf_64_file_p): Make static.
3949 (linux_pid_exe_is_elf_64_file): New.
3950 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3951 Delete declarations.
3952 (linux_pid_exe_is_elf_64_file): Declare.
3953 * linux-x86-low.c (x86_arch_setup): Use
3954 linux_pid_exe_is_elf_64_file.
3956 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3958 * linux-low.c (linux_wait_for_event_1): Rename to ...
3959 (linux_wait_for_event): ... here and merge it with former
3960 linux_wait_for_event - new variable wait_ptid, use it.
3961 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3963 2012-01-23 Pedro Alves <palves@redhat.com>
3965 * server.c (main): Avoid yet another case of infinite loop while
3966 detaching/killing after a longjmp.
3968 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3971 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3973 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3975 * hostio.c (handle_readlink): New function.
3976 (handle_vFile): Call it to handle "vFile:readlink" packets.
3978 2012-01-20 Pedro Alves <palves@redhat.com>
3979 Ulrich Weigand <ulrich.weigand@linaro.org>
3981 * server.c (handle_v_requests): Only support vAttach and vRun to
3982 start multiple processes when in extended protocol mode.
3984 2012-01-17 Pedro Alves <palves@redhat.com>
3986 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3987 memalign plus mprotect to allocate the scratch buffer.
3989 2012-01-13 Pedro Alves <palves@redhat.com>
3991 * server.c (attach_inferior): Clear `cont_thread'.
3993 2012-01-13 Pedro Alves <palves@redhat.com>
3995 * server.c (main): Avoid infinite loop while detaching/killing
3998 2012-01-09 Doug Evans <dje@google.com>
4000 * server.c (start_inferior): Set last_ptid in --wrapper case.
4002 2012-01-06 Yao Qi <yao@codesourcery.com>
4004 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4006 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4008 2012-01-04 Yao Qi <yao@codesourcery.com>
4010 * tracepoint.c (cmd_qtdp): Print debug message
4011 for static tracepoint.
4013 2012-01-04 Yao Qi <yao@codesourcery.com>
4015 * tracepoint.c (trace_vdebug): Differentiate debug message
4016 between gdbserver and IPA.
4018 2012-01-03 Yao Qi <yao@codesourcery.com>
4020 * tracepoint.c (tracepoint_was_hit): Don't collect for
4023 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4025 * terminal.h: Reformat copyright header.
4027 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4029 * server.c (gdbserver_version): Update copyright year.
4030 * gdbreplay.c (gdbreplay_version): Likewise.
4032 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4034 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4037 2011-12-18 Hui Zhu <teawater@gmail.com>
4038 * linux-low.c (linux_create_inferior): Save return value to ret.
4040 2011-12-18 Hui Zhu <teawater@gmail.com>
4042 * linux-low.c (linux_create_inferior): Save return value to ret.
4044 2011-12-16 Doug Evans <dje@google.com>
4046 * linux-low.c (linux_create_inferior): If stdio connection,
4047 redirect stdin from /dev/null, stdout to stderr.
4048 * remote-utils.c (remote_is_stdio): New static global.
4049 (remote_connection_is_stdio): New function.
4050 (remote_prepare): Handle stdio connection.
4051 (remote_open): Ditto.
4052 (remote_close): Don't close stdin for stdio connections.
4053 (read_prim,write_prim): New functions. Replace all calls to
4054 read/write to these.
4055 * server.c (main): Watch for "-" argument. Move call to
4056 remote_prepare before start_inferior.
4057 * server.h (STDIO_CONNECTION_NAME): New macro.
4058 (remote_connection_is_stdio): Declare.
4060 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4061 in debugging output.
4063 2011-12-15 Yao Qi <yao@codesourcery.com>
4065 * tracepoint.c: Include sys/syscall.h.
4066 (gdb_ust_thread): Remove preprocessor conditional.
4068 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4070 * linux-low.c (linux_detach_one_lwp): Call
4071 the_low_target.prepare_to_resume before detaching.
4073 2011-12-14 Yao Qi <yao@codesourcery.com>
4075 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4078 2011-12-14 Yao Qi <yao@codesourcery.com>
4080 * i386-low.c (i386_low_stopped_data_address): Initialize local
4083 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4087 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4088 DR_CONTROL unless necessary. Extend comments.
4089 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4090 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4092 2011-12-13 Yao Qi <yao@codesourcery.com>
4094 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4096 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4098 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4100 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4101 Print new debug message for such case.
4103 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4105 Fix overlapping memcpy.
4106 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4107 the read_inferior_memory transfer.
4108 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4109 write_inferior_memory transfer.
4110 (set_fast_tracepoint_jump): New variable buf. Use it for the
4111 read_inferior_memory and write_inferior_memory transfers.
4112 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4113 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4114 Use it for the write_inferior_memory transfer.
4115 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4118 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4120 * linux-low.c (fetch_register, store_register): Make code
4121 consistent, fix formatting.
4123 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4125 * linux-low.c (usr_store_inferior_registers): Factor out code
4126 to handle individual registers into...
4127 (store_register): ... this new function.
4129 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4131 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4132 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4133 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4134 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4135 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4136 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4137 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4138 (srv_xmlfiles): Add new XML files.
4140 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4142 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4143 (init_registers_s390_linux32v1): Add prototype.
4144 (init_registers_s390_linux32v2): Likewise.
4145 (init_registers_s390_linux64v1): Likewise.
4146 (init_registers_s390_linux64v2): Likewise.
4147 (init_registers_s390x_linux64v1): Likewise.
4148 (init_registers_s390x_linux64v2): Likewise.
4149 (s390_num_regs): Increment to 52.
4150 (s390_regmap): Add orig_r2 register.
4151 (s390_num_regs_3264): Increment to 68.
4152 (s390_regmap_3264): Add orig_r2 register.
4153 (s390_collect_ptrace_register): Handle orig_r2 register.
4154 (s390_supply_ptrace_register): Likewise.
4155 (s390_fill_last_break): New function.
4156 (s390_store_last_break): Likewise.
4157 (s390_fill_system_call): New function.
4158 (s390_store_system_call): Likewise.
4159 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4161 (s390_check_regset): New function.
4162 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4163 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4164 Update target_regsets for available register sets.
4166 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4167 Jan Kratochvil <jan.kratochvil@redhat.com>
4169 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4170 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4172 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4173 * linux-low.h (struct process_info_private): New member r_debug.
4174 * server.c (handle_qxfer_libraries): Call
4175 the_target->qxfer_libraries_svr4.
4176 (handle_qxfer_libraries_svr4): New function.
4177 (qxfer_packets): New entry "libraries-svr4".
4178 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4179 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4180 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4181 PACKET_qXfer_libraries_svr4.
4183 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4185 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4186 PSW address/mask between 8-byte and 16-byte formats.
4187 (s390_supply_ptrace_register): Likewise.
4188 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4189 basic addressing mode bit.
4191 2011-11-24 Stan Shebs <stan@codesourcery.com>
4193 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4195 2011-11-17 Stan Shebs <stan@codesourcery.com>
4197 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4198 (tracing_start_time): New global.
4199 (tracing_stop_time): New global.
4200 (tracing_user_name): New global.
4201 (tracing_notes): New global.
4202 (tracing_stop_note): New global.
4203 (cmd_qtstart): Set traceframe_usage, start_time.
4204 (stop_tracing): Set stop_time.
4205 (cmd_qtstatus): Report additional status.
4206 (cmd_qtp): New function.
4207 (handle_tracepoint_query): Call it.
4208 (cmd_qtnotes): New function.
4209 (handle_tracepoint_general_set): Call it.
4210 (get_timestamp): Rename from tsv_get_timestamp.
4212 2011-11-14 Stan Shebs <stan@codesourcery.com>
4213 Kwok Cheung Yeung <kcy@codesourcery.com>
4215 * linux-x86-low.c (small_jump_insn): New.
4216 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4217 trampoline and error message, build a trampoline and issue a small
4218 jump instruction to it.
4219 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4220 trampoline and error message.
4221 (x86_get_min_fast_tracepoint_insn_len): New.
4222 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4223 * linux-low.h (struct linux_target_ops): Add arguments to
4224 install_fast_tracepoint_jump_pad operation, add new operation.
4225 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4227 (linux_get_min_fast_tracepoint_insn_len): New function.
4228 (linux_target_op): Add new operation.
4229 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4230 (gdb_trampoline_buffer_end): Ditto.
4231 (gdb_trampoline_buffer_error): Ditto.
4232 (struct ipa_sym_addresses): Add fields for new IPA variables.
4233 (symbol_list): Add entries for new IPA variables.
4234 (struct tracepoint): Add fields to hold the address range of the
4235 trampoline used by the tracepoint.
4236 (trampoline_buffer_head): New static variable.
4237 (trampoline_buffer_tail): Ditto.
4238 (claim_trampoline_space): New function.
4239 (have_fast_tracepoint_trampoline_buffer): New function.
4240 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4242 (install_fast_tracepoint): Ditto, also add error buffer argument.
4243 (cmd_qtminftpilen): New function.
4244 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4245 (fast_tracepoint_from_trampoline_address): New function.
4246 (fast_tracepoint_collecting): Handle trampoline as part of jump
4248 (set_trampoline_buffer_space): New function.
4249 (initialize_tracepoint): Initialize new IPA variables.
4250 * target.h (struct target_ops): Add arguments to
4251 install_fast_tracepoint_jump_pad operation, add new
4252 get_min_fast_tracepoint_insn_len operation.
4253 (target_get_min_fast_tracepoint_insn_len): New.
4254 (install_fast_tracepoint_jump_pad): Add arguments.
4255 * server.h (IPA_BUFSIZ): Define.
4256 * linux-i386-ipa.c: Include extra header files.
4257 (initialize_fast_tracepoint_trampoline_buffer): New function.
4258 (initialize_low_tracepoint): Call it.
4259 * server.h (set_trampoline_buffer_space): Declare.
4260 (claim_trampoline_space): Ditto.
4261 (have_fast_tracepoint_trampoline_buffer): Ditto.
4263 2011-11-14 Yao Qi <yao@codesourcery.com>
4265 * server.c (handle_query): Handle InstallInTrace for qSupported.
4266 * tracepoint.c (add_tracepoint): Sort list.
4267 (install_tracepoint, download_tracepoint): New.
4268 (cmd_qtdp): Call them to install and download tracepoints.
4269 (sort_tracepoints): Removed.
4270 (cmd_qtstart): Update.
4272 2011-11-14 Yao Qi <yao@codesourcery.com>
4274 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4275 * mem-break.h: Declare.
4276 * tracepoint.c (cmd_qtstart): Move some code to ...
4277 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4279 (download_tracepoints): Move some code to ...
4280 (download_tracepoint_1): ... here. New.
4282 2011-11-08 Yao Qi <yao@codesourcery.com>
4284 * remote-utils.c (relocate_instruction): A comment fix.
4286 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4288 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4289 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4290 dr_status_mirror and dr_control_mirror from debug_reg_state.
4291 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4292 (i386_initial_stuff): Remove use of deleted globals.
4293 (i386_get_thread_context, i386_set_thread_context,
4294 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4295 from debug_reg_state.
4297 2011-11-05 Yao Qi <yao@codesourcery.com>
4299 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4300 address as TPOINT's.
4302 2011-11-02 Stan Shebs <stan@codesourcery.com>
4304 * tracepoint.c (agent_mem_read_string): New function.
4305 (eval_agent_expr): Call it for tracenz.
4306 * server.c (handle_query): Report support for tracenz.
4308 2011-11-02 Yao Qi <yao@codesourcery.com>
4310 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4312 2011-11-02 Yao Qi <yao@codesourcery.com>
4314 * target.h: Fix a typo in comment.
4316 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4318 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4319 clobber the breakpoints' shadows with fast tracepoint jumps.
4320 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4321 * target.c (write_inferior_memory): Also pass MYADDR down to
4324 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4326 * configure.ac: Check support for personality routine.
4327 * configure: Regenerate.
4328 * config.in: Likewise.
4329 * linux-low.c: Include <sys/personality.h>.
4330 Define ADDR_NO_RANDOMIZE if necessary.
4331 (linux_create_inferior): Disable address space randomization when
4332 forking inferior, if requested.
4333 (linux_supports_disable_randomization): New function.
4334 (linux_target_ops): Install it.
4335 * server.h (disable_randomization): Declare.
4336 * server.c (disable_randomization): New global variable.
4337 (handle_general_set): Handle QDisableRandomization.
4338 (handle_query): Likewise for qSupported.
4339 (main): Support --disable-randomization and --no-disable-randomization
4340 command line arguments.
4341 * target.h (struct target_ops): Add supports_disable_randomization.
4342 (target_supports_disable_randomization): New macro.
4344 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4346 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4348 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4349 [!PT_GETDSBT] (target_loadmap): New definition.
4350 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4351 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4352 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4353 and PT_GETDSBT to LINUX_LOADMAP.
4354 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4355 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4357 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4359 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4360 (arm_linux_hwbp_cap): New static variable.
4361 (arm_linux_get_hwbp_cap): Replace by ...
4362 (arm_linux_init_hwbp_cap): ... this new function.
4363 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4364 (arm_linux_get_hw_watchpoint_count): Likewise.
4365 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4366 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4367 (arm_prepare_to_resume): Use perror_with_name instead of error.
4369 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4371 * linux-arm-low.c: Include <signal.h>.
4372 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4373 (struct arm_linux_hwbp_cap): New data type.
4374 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4375 (struct arm_linux_hw_breakpoint): New data type.
4376 (MAX_BPTS, MAX_WPTS): Define.
4377 (struct arch_process_info, struct arch_lwp_info): New data types.
4378 (arm_linux_get_hwbp_cap): New function.
4379 (arm_linux_get_hw_breakpoint_count): Likewise.
4380 (arm_linux_get_hw_watchpoint_count): Likewise.
4381 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4382 (arm_hwbp_control_initialize): Likewise.
4383 (arm_hwbp_control_is_enabled): Likewise.
4384 (arm_hwbp_control_is_initialized): Likewise.
4385 (arm_hwbp_control_disable): Likewise.
4386 (arm_linux_hw_breakpoint_equal): Likewise.
4387 (arm_linux_hw_point_initialize): Likewise.
4388 (struct update_registers_data): New data structure.
4389 (update_registers_callback: New function.
4390 (arm_insert_point): Likewise.
4391 (arm_remove_point): Likewise.
4392 (arm_stopped_by_watchpoint): Likewise.
4393 (arm_stopped_data_address): Likewise.
4394 (arm_new_process): Likewise.
4395 (arm_new_thread): Likewise.
4396 (arm_prepare_to_resume): Likewise.
4397 (the_low_target): Register arm_insert_point, arm_remove_point,
4398 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4399 arm_new_thread, and arm_prepare_to_resume.
4401 2011-09-15 Stan Shebs <stan@codesourcery.com>
4403 * server.h (struct emit_ops): Add compare-goto fields.
4404 * tracepoint.c (gdb_agent_op_sizes): New table.
4405 (emit_eq_goto): New function.
4406 (emit_ne_goto): New function.
4407 (emit_lt_goto): New function.
4408 (emit_le_goto): New function.
4409 (emit_gt_goto): New function.
4410 (emit_ge_goto): New function.
4411 (is_goto_target): New function.
4412 (compile_bytecodes): Recognize special cases of compare-goto
4413 combinations and call specialized emitters for them.
4414 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4415 (amd64_emit_ne_goto): New function.
4416 (amd64_emit_lt_goto): New function.
4417 (amd64_emit_le_goto): New function.
4418 (amd64_emit_gt_goto): New function.
4419 (amd64_emit_ge_goto): New function.
4420 (amd64_emit_ops): Add the new functions.
4421 (i386_emit_eq_goto): New function.
4422 (i386_emit_ne_goto): New function.
4423 (i386_emit_lt_goto): New function.
4424 (i386_emit_le_goto): New function.
4425 (i386_emit_gt_goto): New function.
4426 (i386_emit_ge_goto): New function.
4427 (i386_emit_ops): Add the new functions.
4429 2011-09-08 Stan Shebs <stan@codesourcery.com>
4431 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4432 (i386_emit_epilogue): Restore %ebx.
4434 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4436 * server.c (step_thread): Remove definition.
4437 (process_serial_event): Don't handle Hs.
4438 * server.h (step_thread): Remove declaration.
4439 * target.c (set_desired_inferior): Remove use of step_thread.
4441 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4443 * linux-low.c: Include linux-procfs.h.
4444 (linux_attach_lwp_1): Update comments.
4445 (linux_attach): Scan for existing threads when attaching to a
4446 process that is the tgid.
4447 * Makefile.in: Update dependencies.
4449 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4451 * configure.srv: Add linux-procfs.o dependencies.
4453 2011-08-14 Yao Qi <yao@codesourcery.com>
4455 * target.h (struct target_ops): Fix indent.
4456 * win32-low.c (win32_target_ops): Fix comment.
4458 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4459 Yao Qi <yao@codesourcery.com>
4461 * Makefile.in (clean): Remove tic6x-*.c files.
4462 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4463 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4464 (tic6x-c64xp-linux.c): Likewise.
4465 * configure.srv: Add support for tic6x-*-uclinux.
4466 * linux-tic6x-low.c: New.
4467 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4469 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4470 Yao Qi <yao@codesourcery.com>
4472 * target.h (struct target_ops): Add read_loadmap.
4473 * linux-low.c (struct target_loadseg): New type.
4474 (struct target_loadmap): New type.
4475 (linux_read_loadmap): New function.
4476 (linux_target_ops): Add linux_read_loadmap.
4477 * server.c (handle_query): Support qXfer:fdpic:read packet.
4478 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4481 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4483 * win32-low.c: Include <stdint.h>.
4485 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4487 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4488 to the inferior here.
4489 (i386_remove_aligned_watchpoint): Ditto.
4490 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4491 fit part of the watchpoint in the debug registers.
4492 (i386_update_inferior_debug_regs): New.
4493 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4494 registers, and only update the inferior on success.
4495 (i386_low_remove_watchpoint): Ditto.
4497 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4499 * linux-low.c (compare_ints, unique, list_threads, show_process,
4500 linux_core_of_thread): Delete.
4501 (linux_target_ops): Change linux_core_of_thread to
4502 linux_common_core_of_thread.
4503 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4504 * utils.c (malloc_failure): Change type of argument.
4505 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4506 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4507 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4508 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4509 (IPA_OBJS): Add common-utils-ipa.o.
4510 (ptid_h, linux_osdata_h): New macros.
4511 (server_h): Add common/common-utils.h, common/xml-utils.h,
4512 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4514 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4515 ptid.o, buffer.o): New rules.
4516 (linux-low.o): Add common/linux-osdata.h as a dependency.
4517 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4518 * configure.ac: Add AC_HEADER_DIRENT check.
4519 * config.in: Regenerate.
4520 * configure: Regenerate.
4521 * remote-utils.c (xml_escape_text): Delete.
4522 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4523 buffer_xml_printf): Move to common/buffer.c.
4524 * server.c (main): Remove call to initialize_inferiors.
4525 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4526 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4527 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4528 internal_error, gdb_assert, gdb_assert_fail): Delete.
4529 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4530 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4532 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4533 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4534 initialize_inferiors): Delete.
4536 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4538 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4541 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4543 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4545 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4547 2011-05-26 Yao Qi <yao@codesourcery.com>
4549 * Makefile.in (thread-db.o): Track dependence to
4550 common/gdb_thread_db.h.
4551 * thread-db.c: include gdb_thread_db.h from right place.
4553 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4555 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4556 __FILE__ and __LINE__ to internal_error.
4558 2011-05-13 Doug Evans <dje@google.com>
4560 * thread-db.c (try_thread_db_load_from_sdir): New function.
4561 (try_thread_db_load_from_dir): New function.
4562 (thread_db_load_search): Handle $sdir, ignore $pdir.
4563 Remove trying of system directories if search of
4564 libthread-db-search-path fails, that is now done via $sdir.
4566 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4568 * server.c (handle_query): Add EnableDisableTracepoints to the list
4569 of supported features.
4570 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4572 (cmd_qtenable_disable): New.
4573 (cmd_qtstart): Install tracepoints even if disabled.
4574 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4575 receiving a QTEnable or QTDisable packet.
4576 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4577 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4579 (gdb_probe): Skip data collection if static tracepoint is disabled.
4581 2011-05-10 Doug Evans <dje@google.com>
4583 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4585 2011-05-04 Doug Evans <dje@google.com>
4587 * linux-low.c (linux_join): Skip process lookup.
4588 * spu-low.c (spu_join): Ditto.
4589 * server.c (join_inferiors_callback): Delete.
4590 (process_serial_event): For 'D' packet (detach) call join_inferior
4593 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4595 * README: Don't mention xscale*-*-linux*.
4596 * configure.srv (xscale*-*-linux*): Don't handle target.
4598 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4600 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4602 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4603 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4604 (i386_emit_void_call_2): Likewise.
4606 2011-04-26 Yao Qi <yao@codesourcery.com>
4608 * linux-low.c: Move common macros to linux-ptrace.h.
4609 Include linux-ptrace.h.
4610 * Makefile.in (linux_ptrace_h): New.
4611 (linux-low.o): Depends on linux-ptrace.h.
4613 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4615 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4616 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4617 (remote_prepare): New function with most of the TCP code from ...
4618 (remote_open): ... here. Detect PORT here unconditionally. Move also
4619 setting transport_is_reliable.
4620 * server.c (run_once): New variable.
4621 (gdbserver_usage): Document it.
4622 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4623 the first run if RUN_ONCE.
4624 * server.h (run_once, remote_prepare): New declarations.
4626 2011-04-19 Tom Tromey <tromey@redhat.com>
4628 * win32-low.c (handle_load_dll): Remove duplicate "the".
4630 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4632 Remove support for old Cygwin 1.5 versions.
4633 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4634 function to avoid warning.
4635 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4638 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4640 * gdbserver/server.h (Macro _): Define it if not available.
4642 2011-03-14 Michael Snyder <msnyder@vmware.com>
4644 * hostio.c (handle_close): Remove unnecessary null test.
4646 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4648 * Makefile.in (maintainer-clean realclean distclean): Remove
4649 "make ... subdir_do" command.
4651 2011-03-10 Michael Snyder <msnyder@vmware.com>
4653 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4655 * server.c (handle_v_run): Free alloced buffer on early return.
4657 2011-03-09 Yao Qi <yao@codesourcery.com>
4660 2011-03-04 Yao Qi <yao@codesourcery.com>
4662 * Makefile.in: Remove GNU make feature --directory.
4664 2011-03-05 Yao Qi <yao@codesourcery.com>
4666 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4667 (subdir_do): New make target. Copied from gdb/Makefile.
4668 (maintainer-clean, realclean, distclean, clean): Call corresponding
4669 make targets in common/Makefile.
4671 2011-02-11 Yao Qi <yao@codesourcery.com>
4673 * configure.ac: Call AC_PROG_RANLIB.
4674 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4675 * configure: Regenerate.
4677 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4679 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4681 2011-03-06 Yao Qi <yao@codesourcery.com>
4683 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4685 2011-03-05 Yao Qi <yao@codesourcery.com>
4687 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4688 (subdir_do): New make target. Copied from gdb/Makefile.
4689 (maintainer-clean, realclean, distclean, clean): Call corresponding
4690 make targets in common/Makefile.
4692 2011-03-04 Yao Qi <yao@codesourcery.com>
4694 * Makefile.in: Remove GNU make feature --directory.
4696 2011-03-04 Michael Snyder <msnyder@vmware.com>
4698 * server.c (queue_stop_reply): Call xmalloc not malloc.
4700 2011-03-02 Michael Snyder <msnyder@vmware.com>
4702 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4704 2011-02-28 Michael Snyder <msnyder@vmware.com>
4706 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4707 (cmd_qtframe): Ditto.
4708 (cmd_qtbuffer): Ditto.
4709 (cmd_bigqtbuffer): Ditto.
4711 * utils.c (decimal2str): Initialize 'width' to nine, then
4714 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4716 * hostio.c (require_data): Free *data, not data.
4718 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4720 * hostio.c (require_data): Use free, not xfree.
4722 2011-02-27 Michael Snyder <msnyder@vmware.com>
4724 * server.c (handle_query): Discard unused value.
4726 * hostio.c (require_data): Free malloc memory before returning
4729 2011-02-26 Michael Snyder <msnyder@vmware.com>
4731 * linux-low.c (list_threads): Call closedir for dirent.
4733 2011-02-27 Michael Snyder <msnyder@vmware.com>
4735 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4736 a case statement falls through.
4738 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4740 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4743 2011-02-26 Michael Snyder <msnyder@vmware.com>
4745 * utils.c (decimal2str): Eliminate dead code and dead param.
4746 (pulongest): Drop dead param from call to decimal2str.
4749 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4751 Revert the following patch (not approved yet):
4752 2011-02-21 Hui Zhu <teawater@gmail.com>
4753 * tracepoint.c (tp_printf): New function.
4754 (eval_agent_expr): Handle gdb_agent_op_printf.
4756 2011-02-21 Hui Zhu <teawater@gmail.com>
4758 * tracepoint.c (tp_printf): New function.
4759 (eval_agent_expr): Handle gdb_agent_op_printf.
4761 2011-02-18 Tom Tromey <tromey@redhat.com>
4763 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4764 (tracepoint.o): Likewise.
4765 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4766 (gdb_agent_op_names): Likewise.
4768 2011-02-18 Tom Tromey <tromey@redhat.com>
4770 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4771 gdb_agent_op_rot>: New constants.
4772 (gdb_agent_op_names): Add pick and roll.
4773 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4776 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4778 * aclocal.m4: Regenerated with aclocal-1.11.1.
4780 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4782 * server.c (handle_qxfer_traceframe_info): New.
4783 (qxfer_packets): Register "traceframe-info".
4784 (handle_query): Report support for qXfer:traceframe-info:read+.
4785 * tracepoint.c (match_blocktype): New.
4786 (traceframe_find_block_type): Rename to ...
4787 (traceframe_walk_blocks): ... this. Add callback filter argument,
4789 (traceframe_find_block_type): New, reimplemented on top of
4790 traceframe_walk_blocks.
4791 (build_traceframe_info_xml): New.
4792 (traceframe_read_info): New.
4793 * server.h (traceframe_read_info): Declare.
4795 2011-02-11 Yao Qi <yao@codesourcery.com>
4797 * configure.ac: Call AC_PROG_RANLIB.
4798 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4799 * configure: Regenerate.
4801 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4803 * server.c (gdb_read_memory): Change return semantics to allow
4805 (handle_search_memory_1): Adjust.
4806 (process_serial_event) <'m' packet>: Handle partial transfers.
4807 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4809 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4811 * regcache.c (init_register_cache): Initialize
4812 regcache->register_status.
4813 (free_register_cache): Release regcache->register_status.
4814 (regcache_cpy): Copy register_status.
4815 (registers_to_string): Print 'x's for unavailable registers.
4816 (supply_register): Mark the register's status valid or
4817 unavailable, depending on whether a buffer was passed in or not.
4818 (supply_register_zeroed): New.
4819 (supply_regblock): Mark the registers' status valid or
4820 unavailable, depending on whether a buffer was passed in or not.
4821 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4822 (struct regcache): New `register_status' field.
4823 (supply_register_zeroed): Declare.
4824 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4825 supply_register_zeroed, rather than passing a NULL buffer to
4827 * tracepoint.c (fetch_traceframe_registers): Update comment.
4829 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4831 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4834 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4836 * server.h (decode_xfer_write): Change prototype.
4837 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4838 and don't extract the annex here.
4839 * server.c (decode_xfer_read): Remove `annex' parameter,
4840 and don't extract the annex here.
4842 (struct qxfer): New.
4843 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4844 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4845 (handle_qxfer_statictrace): New functions, abstracted out from
4846 handle_query, and made to use the struct qxfer interface.
4847 (handle_threads_qxfer_proper): Rename to ...
4848 (handle_qxfer_threads_proper): ... this.
4849 (handle_threads_qxfer): Rename to ...
4850 (handle_qxfer_threads): ... this. Adjust.
4851 (qxfer_packets): New array.
4852 (handle_qxfer): New function.
4853 (handle_query): Use handle_qxfer.
4855 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4857 * gdbreplay.c: Shorten lines of >= 80 columns.
4858 * linux-low.c: Ditto.
4859 * linux-ppc-low.c: Ditto.
4860 * linux-s390-low.c: Ditto.
4861 * linux-sparc-low.c: Ditto.
4862 * linux-x86-low.c: Ditto.
4863 * linux-xtensa-low.c: Ditto.
4864 * mem-break.c: Ditto.
4866 * regcache.h: Ditto.
4867 * remote-utils.c: Ditto.
4870 * thread-db.c: Ditto.
4871 * tracepoint.c: Ditto.
4873 * win32-low.h: Ditto.
4875 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4877 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4880 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4882 * server.c (gdbserver_version): Update copyright year in version
4884 * gdbreplay.c (gdbreplay_version): Ditto.
4886 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4888 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4889 * linux-bfin-low.c: New file.
4890 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4891 PT_DATA_ADDR for BFIN targets.
4892 * Makefile.in (SFILES): Add linux-bfin-low.c.
4893 (clean): Remove reg-bfin.c.
4894 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4895 * README: Mention supported Blackfin targets.
4897 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4899 * .gitignore: New file.
4901 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4903 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4905 2010-10-22 Jie Zhang <jie@codesourcery.com>
4907 * Makefile.in: Add FLAGS_TO_PASS variable.
4908 (install): Remove dependency of install-only and recursively
4909 invoke make for install-only.
4911 2010-10-04 Doug Evans <dje@google.com>
4913 * Makefile.in (uninstall): Use $(DESTDIR).
4915 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4919 * linux-x86-low.c (compat_siginfo_from_siginfo)
4920 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4921 si_code is < 0. Check for si_code == SI_TIMER before checking for
4924 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4926 * lynx-i386-low.c: New file.
4927 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4929 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4931 * lynx-low.c (ptrace_request_to_str): Remove handling for
4932 request values that have been removed in LynxOS 5.x.
4934 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4936 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4939 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4941 * configure.ac: Add --enable-inprocess-agent option.
4942 * configure: Rebuilt.
4944 2010-09-06 Yao Qi <yao@codesourcery.com>
4946 * linux-low.c (linux_kill): Remove unused variable.
4947 (linux_stabilize_threads): Likewise.
4948 * server.c (start_inferior): Likewise.
4949 (queue_stop_reply_callback): Likewise.
4950 * tracepoint.c (do_action_at_tracepoint): Likewise.
4952 2010-09-06 Yao Qi <yao@codesourcery.com>
4954 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4957 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4959 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4961 2010-09-06 Pedro Alves <pedro@codesourcery.com>
4963 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4966 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4968 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4969 gdbserver/lynx-ppc-low.c: New files.
4970 * Makefile.in (lynx_low_h): New variable.
4971 (lynx-low.o, lynx-ppc-low.o): New rules.
4972 * configure.ac: On LynxOS, link with -lnetinet.
4973 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4974 * configure: regenerate.
4976 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4978 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4979 * configure.ac: Add check for vasprintf and vsnprintf.
4980 * configure, config.in: Regenerate.
4981 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4983 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4985 * gdbreplay.c: Move include of alloca.h up, next to include of
4987 * server.h: Add include of malloc.h.
4988 * mem-break.c: Remove include of malloc.h.
4989 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4991 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4993 * Makefile.in (memmem.o): Build with -Wno-error.
4995 2010-09-01 Joel Brobecker <brobecker@adacore.com>
4997 * utils.c (xsnprintf): Make non-static.
4998 * server.h: Add xsnprintf declaration.
4999 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5000 replace calls to snprintf by calls to xsnprintf throughout.
5002 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5004 * configure.ac: Add configure check for alloca.
5005 * configure, config.in: Regenerate.
5006 * server.h: Include alloca.h if it exists.
5007 * gdbreplay.c: Include alloca.h if it exists.
5009 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5011 * linux-low.c (__SIGRTMIN): Define if not already defined.
5012 (linux_create_inferior): Check for __ANDROID__ rather than
5014 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5015 are already deferred.
5016 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5017 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5018 stopped and already has a pending signal to report.
5019 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5020 a pending signal to report or is moving out of a jump pad.
5021 (linux_init_signals): Check for __ANDROID__ rather than
5024 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5026 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5027 debug_threads check. Avoid a linear search when not doing debug
5030 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5032 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5033 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5034 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5035 (process_event): Change local fd's type to gdb_fildes_t.
5036 (create_file_handler): Adjust prototype.
5037 (delete_file_handler): Adjust prototype.
5038 (handle_file_event): Adjust prototype. Use pfildes.
5039 (create_file_event): Adjsut prototype.
5040 * remote-utils.c (remote_desc, listen_desc): Change type to
5042 * server.h: New gdb_fildes_t typedef.
5043 [USE_WIN32API]: Include winsock2.h.
5044 (delete_file_handler, add_file_handler): Adjust prototypes.
5046 * utils.c (pfildes): New.
5048 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5050 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5051 * configure: Regenerate.
5053 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5055 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5056 (linux_done_accessing_memory): ... this.
5057 (linux_target_ops): Adjust.
5058 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5059 * nto-low.c (nto_target_ops): Adjust comment.
5060 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5061 * spu-low.c (spu_target_ops): Adjust comment.
5062 * target.h (target_ops): Rename unprepare_to_access_memory field
5063 to done_accessing_memory.
5064 (unprepare_to_access_memory): Rename to ...
5065 (done_accessing_memory): ... this.
5067 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5069 * linux-low.c (linux_prepare_to_access_memory): New.
5070 (linux_unprepare_to_access_memory): New.
5071 (linux_target_ops): Install them.
5072 * server.c (read_memory): Rename to ...
5073 (gdb_read_memory): ... this. Use
5074 prepare_to_access_memory/prepare_to_access_memory.
5075 (write_memory): Rename to ...
5076 (gdb_write_memory): ... this. Use
5077 prepare_to_access_memory/prepare_to_access_memory.
5078 (handle_search_memory_1): Adjust.
5079 (process_serial_event): Adjust.
5080 * target.h (struct target_ops): New fields
5081 prepare_to_access_memory and unprepare_to_access_memory.
5082 (prepare_to_access_memory, unprepare_to_access_memory): New.
5083 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5084 prepare_to_access_memory/prepare_to_access_memory.
5085 * nto-low.c (nto_target_ops): Adjust.
5086 * spu-low.c (spu_target_ops): Adjust.
5087 * win32-low.c (win32_target_ops): Adjust.
5089 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5091 * Makefile.in (WARN_CFLAGS): Get it from configure.
5092 (WERROR_CFLAGS): New.
5093 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5094 * configure.ac: Introduce --enable-werror, which adds -Werror to
5095 the compiler command line. Enabled by default. Disable with
5096 --disable-werror. Add -Wdeclaration-after-statement
5097 Wpointer-arith and -Wformat-nonliteral to warning flags.
5098 * configure: Regenerate.
5100 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5102 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5104 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5106 * gdbreplay.c (remote_error): New.
5108 (expect): Use gdbchar. Check for error reading from GDB.
5109 Clarify sync error output.
5110 (play): Check for errors writing to GDB.
5111 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5112 * remote-utils.c (getpkt): Check for errors writing to the remote
5115 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5117 * linux-low.c (linux_wait_1): Move non-debugging code out of
5118 `debug_threads' control.
5120 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5122 * linux-low.c (linux_wait_1): Don't set last_status here.
5123 * server.c (push_event, queue_stop_reply_callback): Assert we're
5124 not pushing a TARGET_WAITKIND_IGNORE event.
5125 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5126 (myresume, handle_target_event): Set the thread's last_resume_kind
5127 and last_status from the target returned status.
5129 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5133 * linux-x86-low.c (update_debug_registers_callback): New.
5134 (i386_dr_low_set_addr): Use it.
5135 (i386_dr_low_get_addr): New.
5136 (i386_dr_low_set_control): Use update_debug_registers_callback.
5137 (i386_dr_low_get_control): New.
5138 (i386_dr_low_get_status): Adjust.
5139 * linux-low.c (linux_stop_lwp): New.
5140 * linux-low.h (linux_stop_lwp): Declare.
5142 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5143 argument instead of a i386_debug_reg_state.
5144 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5145 a i386_debug_reg_state.
5146 (i386_insert_aligned_watchpoint): Adjust.
5147 (i386_remove_aligned_watchpoint): Adjust.
5148 (i386_low_stopped_data_address): Read the debug registers from the
5149 inferior instead of from the mirrors.
5150 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5151 (i386_dr_low_get_addr): Declare.
5152 (i386_dr_low_get_control): Declare.
5153 (i386_dr_low_get_status): Change prototype.
5155 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5156 (i386_dr_low_get_addr): New.
5157 (i386_dr_low_get_control): New.
5158 (i386_dr_low_get_status): Adjust prototype. Return
5160 (i386_initial_stuff): Clear dr_status_mirror and
5162 (i386_get_thread_context): Adjust.
5163 (i386_set_thread_context): Adjust.
5164 (i386_thread_added): Adjust.
5166 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5168 * linux-low.h (linux_thread_area): Delete declaration.
5170 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5172 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5173 after its termination.
5175 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5177 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5178 (gdb_wants_all_stopped): Delete.
5179 (linux_wait_1): Don't call them.
5180 * server.c (handle_v_cont): Tag all threads as want-stopped.
5181 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5182 stopped as "client-wants-stopped".
5184 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5186 * Makefile.in (signals_h): New.
5187 (server_h): Depend on it.
5188 (server.o): Don't depend on $(signals_def).
5189 (signals.o): Depend on $(signals_def).
5191 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5193 * Makefile.in (signals_def): New.
5194 (server_h): Append include/gdb/signals.h and signals_def.
5195 (server.o): Append signals_def.
5197 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5199 * server.c (handle_target_event): Use target_signal_to_host for
5200 resume_info.sig initialization.
5201 * target.h (struct thread_resume) <sig>: New comment.
5203 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5205 * server.c (handle_query): strcpy() the returned string from paddress()
5206 instead of sprintf().
5207 * utils.c (paddress): Return phex_nz().
5209 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5211 * server.c (handle_v_cont): Call mourn_inferior if process
5213 (myresume): Likewise.
5215 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5217 Static tracepoints, and integration with UST.
5219 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5220 * mem-break.c (uninsert_all_breakpoints)
5221 (reinsert_all_breakpoints): New.
5222 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5223 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5224 (gdb_agent_ust_loaded, helper_thread_id)
5225 (gdb_agent_helper_thread_id): New macros.
5226 (struct ipa_sym_addresses): Add addr_ust_loaded,
5227 addr_helper_thread_id, addr_cmd_buf.
5228 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5229 (in_process_agent_loaded_ust): New.
5230 (write_e_ust_not_loaded): New.
5231 (maybe_write_ipa_ust_not_loaded): New.
5232 (struct collect_static_trace_data_action): New.
5233 (enum tracepoint_type) <static_tracepoint>: New.
5234 (struct tracepoint) <handle>: Mention static tracepoints.
5235 (struct static_tracepoint_ctx): New.
5236 (CMD_BUF_SIZE): New.
5237 (add_tracepoint_action): Handle static tracepoint actions.
5238 (unprobe_marker_at): New.
5239 (clear_installed_tracepoints): Handle static tracepoints.
5240 (cmd_qtdp): Handle static tracepoints.
5241 (probe_marker_at): New.
5242 (cmd_qtstart): Handle static tracepoints.
5243 (response_tracepoint): Handle static tracepoints.
5244 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5245 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5246 (get_context_regcache): Handle static tracepoints.
5247 (do_action_at_tracepoint): Handle static tracepoint actions.
5248 (traceframe_find_block_type): Handle static trace data blocks.
5249 (traceframe_read_sdata): New.
5250 (download_tracepoints): Download static tracepoint actions.
5251 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5252 (GDB_PROBE_NAME): New.
5257 (ust_marker_to_static_tracepoint): New.
5259 (collect_ust_data_at_tracepoint): New.
5260 (gdb_ust_probe): New.
5261 (UNIX_PATH_MAX, SOCK_DIR): New.
5262 (gdb_ust_connect_sync_socket): New.
5263 (resume_thread, stop_thread): New.
5264 (run_inferior_command): New.
5265 (init_named_socket): New.
5266 (gdb_ust_socket_init): New.
5267 (cstr_to_hexstr): New.
5269 (first_marker, next_marker): New.
5270 (response_ust_marker): New.
5271 (cmd_qtfstm, cmd_qtsstm): New.
5272 (unprobe_marker_at, probe_marker_at): New.
5273 (cmd_qtstmat, gdb_ust_thread): New.
5274 (gdb_ust_init): New.
5275 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5276 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5278 (x86_64_st_collect_regmap): New.
5279 (X86_64_NUM_ST_COLLECT_GREGS): New.
5280 (AMD64_RIP_REGNUM): New.
5281 (supply_static_tracepoint_registers): New.
5282 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5284 (i386_st_collect_regmap): New.
5285 (i386_NUM_ST_COLLECT_GREGS): New.
5286 (supply_static_tracepoint_registers): New.
5287 * server.c (handle_query): Handle qXfer:statictrace:read.
5288 <qSupported>: Report support for StaticTracepoints, and
5289 qXfer:statictrace:read features.
5290 * server.h (traceframe_read_sdata)
5291 (supply_static_tracepoint_registers): Declare.
5292 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5293 (unpack_varlen_hex): Include in IPA build.
5294 * Makefile.in (ustlibs, ustinc): New.
5295 (IPA_OBJS): Add remote-utils-ipa.o.
5296 ($(IPA_LIB)): Link -ldl and -lpthread.
5298 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5299 * config.in, configure: Regenerate.
5301 2010-06-20 Ian Lance Taylor <iant@google.com>
5302 Pedro Alves <pedro@codesourcery.com>
5304 * linux-x86-low.c (always_true): Delete.
5305 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5306 trying to fool the compiler with always_true.
5308 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5310 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5311 conditions in gdbserver.
5313 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5315 * spu-low.c (spu_read_memory): Wrap around local store limit.
5316 (spu_write_memory): Likewise.
5318 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5320 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5321 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5323 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5325 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5326 uses with LONGEST uses.
5328 2010-06-14 Stan Shebs <stan@codesourcery.com>
5329 Pedro Alves <pedro@codesourcery.com>
5333 * linux-x86-low.c: Include limits.h.
5338 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5339 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5340 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5341 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5342 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5343 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5344 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5345 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5346 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5347 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5348 (amd64_emit_void_call_2): New.
5349 (amd64_emit_ops): New.
5350 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5351 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5352 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5353 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5354 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5355 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5356 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5357 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5358 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5359 (i386_emit_stack_adjust, i386_emit_int_call_1)
5360 (i386_emit_void_call_2): New.
5361 (i386_emit_ops): New.
5362 (x86_emit_ops): New.
5363 (the_low_target): Install x86_emit_ops.
5364 * server.h (struct emit_ops): New.
5365 (get_raw_reg_func_addr): Declare.
5366 (current_insn_ptr, emit_error): Declare.
5367 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5368 (set_trace_state_variable_value): New defines.
5369 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5370 addr_get_trace_state_variable_value and
5371 addr_set_trace_state_variable_value.
5372 (symbol_list): New fields for get_raw_reg,
5373 get_trace_state_variable_value and set_trace_state_variable_value.
5374 (condfn): New typedef.
5375 (struct tracepoint): New field `compiled_cond'.
5376 (do_action_at_tracepoint): Clear compiled_cond.
5377 (get_trace_state_variable_value, set_trace_state_variable_value):
5379 (condition_true_at_tracepoint): If there's a compiled condition,
5381 (current_insn_ptr, emit_error): New globals.
5382 (struct bytecode_address): New.
5383 (get_raw_reg_func_addr): New.
5384 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5385 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5386 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5387 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5388 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5389 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5390 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5391 (compile_tracepoint_condition, compile_bytecodes): New.
5392 * target.h (emit_ops): Forward declare.
5393 (struct target_ops): New field emit_ops.
5394 (target_emit_ops): New.
5395 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5396 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5397 * linux-low.c (linux_emit_ops): New.
5398 (linux_target_ops): Install it.
5399 * linux-low.h (struct linux_target_ops): New field emit_ops.
5401 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5403 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5404 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5406 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5407 Stan Shebs <stan@codesourcery.com>
5409 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5410 (all): Depend on $(extra_libraries).
5411 (install-only): Install the IPA.
5412 (IPA_OBJS, IPA_LIB): New.
5413 (clean): Remove the IPA lib.
5414 (IPAGENT_CFLAGS): New.
5415 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5416 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5417 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5418 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5419 * configure.ac: Check for atomic builtins support in the compiler.
5420 (IPA_DEPFILES, extra_libraries): Define.
5421 * configure.srv (ipa_obj): Add description.
5422 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5423 (i[34567]86-*-linux*): Set ipa_obj.
5424 (x86_64-*-linux*): Set ipa_obj.
5425 * linux-low.c (stabilizing_threads): New.
5426 (supports_fast_tracepoints): New.
5427 (linux_detach): Stabilize threads before detaching.
5428 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5429 the lwp is either not stabilizing, or is moving out of a jump pad.
5430 (linux_fast_tracepoint_collecting): New.
5431 (maybe_move_out_of_jump_pad): New.
5432 (enqueue_one_deferred_signal): New.
5433 (dequeue_one_deferred_signal): New.
5434 (linux_wait_for_event_1): If moving out of a jump pad, defer
5435 pending signals to later.
5436 (linux_stabilize_threads): New.
5437 (linux_wait_1): Check if threads need moving out of jump pads, and
5439 (stuck_in_jump_pad_callback): New.
5440 (move_out_of_jump_pad_callback): New.
5442 (linux_resume_one_lwp): Handle moving out of jump pads.
5443 (linux_set_resume_request): Dequeue deferred signals.
5444 (need_step_over_p): Also step over fast tracepoint jumps.
5445 (start_step_over): Also uninsert fast tracepoint jumps.
5446 (finish_step_over): Also reinsert fast tracepoint jumps.
5447 (linux_install_fast_tracepoint_jump): New.
5448 (linux_target_ops): Install linux_stabilize_threads and
5449 linux_install_fast_tracepoint_jump_pad.
5450 * linux-low.h (linux_target_ops) <get_thread_area,
5451 install_fast_tracepoint_jump_pad>: New fields.
5452 (struct lwp_info) <collecting_fast_tracepoint,
5453 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5454 (linux_get_thread_area): Declare.
5455 * linux-x86-low.c (jump_insn): New.
5456 (x86_get_thread_area): New.
5457 (append_insns): New.
5459 (amd64_install_fast_tracepoint_jump_pad): New.
5460 (i386_install_fast_tracepoint_jump_pad): New.
5461 (x86_install_fast_tracepoint_jump_pad): New.
5462 (the_low_target): Install x86_get_thread_area and
5463 x86_install_fast_tracepoint_jump_pad.
5464 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5465 (struct fast_tracepoint_jump): New.
5466 (fast_tracepoint_jump_insn): New.
5467 (fast_tracepoint_jump_shadow): New.
5468 (find_fast_tracepoint_jump_at): New.
5469 (fast_tracepoint_jump_here): New.
5470 (delete_fast_tracepoint_jump): New.
5471 (set_fast_tracepoint_jump): New.
5472 (uninsert_fast_tracepoint_jumps_at): New.
5473 (reinsert_fast_tracepoint_jumps_at): New.
5474 (set_breakpoint_at): Use write_inferior_memory.
5475 (uninsert_raw_breakpoint): Use write_inferior_memory.
5476 (check_mem_read): Mask out fast tracepoint jumps.
5477 (check_mem_write): Mask out fast tracepoint jumps.
5478 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5479 (set_fast_tracepoint_jump): Declare.
5480 (delete_fast_tracepoint_jump)
5481 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5482 (reinsert_fast_tracepoint_jumps_at): Declare.
5483 * regcache.c: Don't compile many functions when building the
5484 in-process agent library.
5485 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5486 the register buffer in the heap.
5487 (free_register_cache): If the register buffer isn't owned by the
5488 regcache, don't free it.
5489 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5490 pre-existing register caches.
5491 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5493 (convert_ascii_to_int): : Constify `from' parameter type.
5494 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5495 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5496 the needed buffer in-place.
5497 (relocate_instruction): New.
5498 * server.c (handle_query) <qSymbols>: If the target supports
5499 tracepoints, give it a chance of looking up symbols. Report
5500 support for fast tracepoints.
5501 (handle_status): Stabilize threads.
5502 (process_serial_event): Adjust.
5503 * server.h (struct fast_tracepoint_jump): Forward declare.
5504 (struct process_info) <fast_tracepoint_jumps>: New field.
5505 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5506 (decode_X_packet, decode_M_packet): Adjust.
5507 (relocate_instruction): Declare.
5508 (in_process_agent_loaded): Declare.
5509 (tracepoint_look_up_symbols): Declare.
5510 (struct fast_tpoint_collect_status): Declare.
5511 (fast_tracepoint_collecting): Declare.
5512 (force_unlock_trace_buffer): Declare.
5513 (handle_tracepoint_bkpts): Declare.
5514 (initialize_low_tracepoint)
5515 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5516 * target.h (struct target_ops) <stabilize_threads,
5517 install_fast_tracepoint_jump_pad>: New fields.
5518 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5519 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5520 [HAVE_STDINT_H]: Include stdint.h.
5521 (trace_debug_1): Rename to ...
5522 (trace_vdebug): ... this.
5523 (trace_debug): Rename to ...
5524 (trace_debug_1): ... this. Add `level' parameter.
5526 (ATTR_USED, ATTR_NOINLINE): New.
5527 (IP_AGENT_EXPORT): New.
5528 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5529 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5530 (about_to_request_buffer_space, trace_buffer_is_full)
5531 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5532 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5533 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5534 (traceframe_write_count, traceframes_created)
5535 (trace_state_variables)
5536 New renaming defines.
5537 (struct ipa_sym_addresses): New.
5538 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5540 (ipa_sym_addrs): New.
5541 (all_tracepoint_symbols_looked_up): New.
5542 (in_process_agent_loaded): New.
5543 (write_e_ipa_not_loaded): New.
5544 (maybe_write_ipa_not_loaded): New.
5545 (tracepoint_look_up_symbols): New.
5546 (debug_threads) [IN_PROCESS_AGENT]: New.
5547 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5548 (UNKNOWN_SIDE_EFFECTS): New.
5549 (stop_tracing): New.
5550 (flush_trace_buffer): New.
5551 (stop_tracing_bkpt): New.
5552 (flush_trace_buffer_bkpt): New.
5553 (read_inferior_integer): New.
5554 (read_inferior_uinteger): New.
5555 (read_inferior_data_pointer): New.
5556 (write_inferior_data_pointer): New.
5557 (write_inferior_integer): New.
5558 (write_inferior_uinteger): New.
5559 (struct collect_static_trace_data_action): Delete.
5560 (enum tracepoint_type): New.
5561 (struct tracepoint) <type>: New field `type'.
5562 <actions_str, step_actions, step_actions_str>: Only include in
5564 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5565 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5566 (tracepoints): Use IP_AGENT_EXPORT.
5567 (last_tracepoint): Don't include in the IPA.
5568 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5569 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5570 (alloced_trace_state_variables): New.
5571 (trace_state_variables): Use IP_AGENT_EXPORT.
5572 (traceframe_t): Delete unused variable.
5573 (circular_trace_buffer): Don't include in the IPA.
5574 (trace_buffer_start): Delete.
5575 (struct trace_buffer_control): New.
5576 (trace_buffer_free): Delete.
5577 (struct ipa_trace_buffer_control): New.
5578 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5579 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5581 (trace_buffer_ctrl): New.
5582 (TRACE_BUFFER_CTRL_CURR): New.
5583 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5584 Reimplement as macros.
5585 (trace_buffer_wrap): Delete.
5586 (traceframe_write_count, traceframe_read_count)
5587 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5588 (struct tracepoint_hit_ctx) <type>: New field.
5589 (struct fast_tracepoint_ctx): New.
5590 (memory_barrier): New.
5592 (record_tracepoint_error): Update atomically in the IPA.
5593 (clear_inferior_trace_buffer): New.
5594 (about_to_request_buffer_space): New.
5595 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5596 updating the same buffer.
5597 (add_tracepoint): Default the tracepoint's type to trap
5598 tracepoint, and orig_size to -1.
5599 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5601 (create_trace_state_variable): New parameter `gdb'. Handle it.
5602 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5603 (cmd_qtdp): Handle fast tracepoints.
5605 (max_jump_pad_size): New.
5606 (gdb_jump_pad_head): New.
5607 (get_jump_space_head): New.
5608 (claim_jump_space): New.
5609 (sort_tracepoints): New.
5610 (MAX_JUMP_SIZE): New.
5611 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5613 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5614 support. Upload fast traceframes, and delete internal IPA
5616 (stop_tracing_handler): New.
5617 (flush_trace_buffer_handler): New.
5618 (cmd_qtstop): Upload fast tracepoints.
5619 (response_tracepoint): Handle fast tracepoints.
5620 (tracepoint_finished_step): Upload fast traceframes. Set the
5621 tracepoint hit context's tracepoint type.
5622 (handle_tracepoint_bkpts): New.
5623 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5624 type. Add comment about fast tracepoints.
5625 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5626 non-existing action_str field.
5627 (get_context_regcache): Handle fast tracepoints.
5628 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5630 (fast_tracepoint_from_jump_pad_address): New.
5631 (fast_tracepoint_from_ipa_tpoint_address): New.
5632 (collecting_t): New.
5633 (force_unlock_trace_buffer): New.
5634 (fast_tracepoint_collecting): New.
5637 (write_inferior_data_ptr): New.
5638 (target_tp_heap): New.
5639 (target_malloc): New.
5640 (download_agent_expr): New.
5642 (download_tracepoints): New.
5643 (download_trace_state_variables): New.
5644 (upload_fast_traceframes): New.
5645 (IPA_FIRST_TRACEFRAME): New.
5646 (IPA_NEXT_TRACEFRAME_1): New.
5647 (IPA_NEXT_TRACEFRAME): New.
5648 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5649 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5650 (gdb_jump_pad_buffer_end): New.
5651 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5652 (initialize_tracepoint): Adjust.
5653 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5654 buffer. Initialize the low module.
5655 * utils.c (PREFIX, TOOLNAME): New.
5656 (malloc_failure): Use PREFIX.
5657 (error): In the IPA, an error causes an exit.
5658 (fatal, warning): Use PREFIX.
5659 (internal_error): Use TOOLNAME.
5660 (NUMCELLS): Increase to 10.
5661 * configure, config.in: Regenerate.
5663 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5665 * server.c (handle_query) <qSupported>: Do two passes over the
5666 qSupported string to avoid nesting strtok.
5668 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5670 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5672 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5674 * configure: Regenerate.
5675 * proc-service.list: New.
5677 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5679 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5682 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5684 * gdbreplay.c (remote_open): Check error return from socket() call by
5685 its equality to -1 not by it being negative.
5686 * remote-utils.c (remote_open): Likewise.
5688 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5690 * config.h: Regenerate.
5692 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5694 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5695 doesn't provide PTRACE_GET_THREAD_AREA.
5697 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5699 * linux-m68k-low.c: Include <asm/ptrace.h>
5700 (ps_get_thread_area): Implement.
5702 2010-05-03 Doug Evans <dje@google.com>
5704 * event-loop.c (struct callback_event): New struct.
5705 (callback_list): New global.
5706 (append_callback_event, delete_callback_event): New functions.
5707 (process_callback): New function.
5708 (start_event_loop): Call it.
5709 * remote-utils.c (NOT_SCHEDULED): Define.
5710 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5711 moved out of readchar.
5712 (readchar): Rewrite. Call reschedule before returning.
5713 (reset_readchar): New function.
5714 (remote_close): Call it.
5715 (process_remaining, reschedule): New functions.
5716 * server.h (callback_handler_func): New typedef.
5717 (append_callback_event, delete_callback_event): Declare.
5719 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5721 * proc-service.c (ps_pglobal_lookup): Use
5722 thread_db_look_up_one_symbol.
5723 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5724 parameter. Use it instead of all_symbols_looked_up.
5725 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5727 (all_symbols_looked_up): Don't declare.
5728 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5729 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5731 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5732 Set all_symbols_looked_up here.
5733 (thread_db_look_up_one_symbol): New.
5734 (thread_db_get_tls_address): Adjust.
5735 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5736 thread_db object on the heap, and tentatively set it in the
5738 (thread_db_init): Don't set all_symbols_looked_up here.
5739 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5741 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5743 * linux-low.c (linux_kill, linux_detach): Adjust.
5744 (status_pending_p_callback): Remove redundant statement. Check
5745 for !TARGET_WAITIKIND_IGNORE, instead of
5746 TARGET_WAITKIND_STOPPED.
5747 (handle_tracepoints): Make sure LWP is locked. Adjust.
5748 (linux_wait_for_event_1): Adjust.
5749 (linux_cancel_breakpoints): New.
5750 (unsuspend_one_lwp): New.
5751 (unsuspend_all_lwps): New.
5752 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5753 (send_sigstop_callback): Change return type to int, add new
5754 `except' parameter and handle it.
5755 (suspend_and_send_sigstop_callback): New.
5756 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5757 pass them down. If SUSPEND, also increment the lwp's suspend
5759 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5760 (need_step_over_p): Don't consider suspended LWPs.
5761 (start_step_over): Adjust.
5762 (proceed_one_lwp): Change return type to int, add new `except'
5763 parameter and handle it.
5764 (unsuspend_and_proceed_one_lwp): New.
5765 (proceed_all_lwps): Use find_inferior instead of
5767 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5768 also decrement the suspend count of LWPs. Pass `except' down,
5769 instead of hacking its suspend count.
5770 (linux_pause_all): Add `freeze' parameter. Adjust.
5771 (linux_unpause_all): New.
5772 (linux_target_ops): Install linux_unpause_all.
5773 * server.c (handle_status): Adjust.
5774 * target.h (struct target_ops): New fields `unpause_all' and
5775 `cancel_breakpoints'. Add new parameter to `pause_all'.
5776 (pause_all): Add new `freeze' parameter.
5778 (cancel_breakpoints): New.
5779 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5781 (cmd_qtstart): Pause threads.
5782 (stop_tracing): Pause threads, and cancel breakpoints.
5783 * win32-low.c (win32_target_ops): Adjust.
5785 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5787 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5788 the inferior right away from here...
5789 (linux_wait_1): ... to here, and adjust to check the thread's
5790 last_resume_kind instead of the lwp's step or stop_expected flags.
5792 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5794 * README: Use consistent `GDB' and `GDBserver' spellings.
5796 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5798 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5799 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5800 (linux_detach_one_lwp): Assume the lwp is stopped.
5801 (any_thread_of): Delete.
5802 (linux_detach): Stop all lwps here. Don't blindly delete all
5804 (delete_lwp_callback): New.
5805 (linux_mourn): Delete all lwps of the process that is gone.
5806 (linux_wait_1): Don't delete the last lwp of the process here.
5807 * mem-break.h (mark_breakpoints_out): Declare.
5808 * mem-break.c (mark_breakpoints_out): New.
5809 (free_all_breakpoints): Use it.
5810 * server.c (handle_target_event): If the process is gone, mark
5812 * thread-db.c (struct thread_db) <create_bp>: New field.
5813 (thread_db_enable_reporting): Fix prototype. Store a thread event
5814 breakpoint reference in the thread_db struct.
5815 (thread_db_load_search): Clear the thread_db object.
5816 (try_thread_db_load_1): Ditto.
5817 (switch_to_process): New.
5818 (disable_thread_event_reporting): Use it.
5819 (remove_thread_event_breakpoints): New.
5820 (thread_db_detach, thread_db_mourn): Use it.
5822 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5824 * linux-low.c (linux_enable_event_reporting): New.
5825 (linux_wait_for_event_1, handle_extended_wait): Use it.
5827 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5829 * linux-low.c (linux_kill_one_lwp, linux_kill)
5830 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5831 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5832 SIGSTOP even if the LWP is stopped.
5833 (send_sigstop_callback): New.
5834 (stop_all_lwps): Use send_sigstop_callback instead.
5835 (linux_resume_one_thread): Adjust.
5836 (proceed_one_lwp): Still proceed an LWP that the client has
5837 requested to stop, if we haven't reported it as stopped yet. Make
5838 sure that LWPs the client want stopped, have a pending SIGSTOP.
5840 2010-04-26 Doug Evans <dje@google.com>
5842 * server.c (handle_general_set): Make static.
5844 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5845 Print received char after testing for error/eof instead of before.
5846 (input_interrupt): Tweak comment.
5848 2010-04-23 Doug Evans <dje@google.com>
5850 * server.c (start_inferior): Print inferior argv if --debug.
5852 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5854 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5855 * nto-x86-low.c: Include server.h
5857 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5859 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5860 be consistent with other sources of this directory.
5861 (init_registers_amd64): Correct name of source file of this function
5864 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5866 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5869 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5871 * win32-i386-low.c: Add 64-bit support.
5872 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5873 (init_registers_amd64): Declare.
5874 (mappings): Add 64-bit version of array.
5875 (init_windows_x86): New function.
5876 (the_low_target): Change init_arch field to init_windows_x86.
5878 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5880 * win32-low.c: Adapt to support also 64-bit architecture.
5881 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5882 (get_image_name): Use SIZE_T type for local variable `done'.
5883 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5884 (toolhelp_get_dll_name): Idem.
5885 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5886 Use uintptr_t typecast to avoid warning.
5887 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5888 (handle_exception): Use phex_nz to avoid warning.
5889 (win32_wait): Remove unused local variable `process'.
5891 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5893 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5896 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5898 * configure.ac: Use `ws2_32' library for srv_mingw.
5899 * configure: Regenerate.
5900 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5901 * remote-utils.c: Likewise.
5903 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5905 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5906 if __x86_64__ is defined.
5908 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5910 * configure: Regenerate.
5912 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5914 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5915 * target.h (target_ops): New get_tib_address field.
5916 * win32-low.h (win32_thread_info): Add thread_local_base field.
5917 * win32-low.c (child_add_thread): Add tlb argument.
5918 Set thread_local_base field to TLB.
5919 (get_child_debug_event): Adapt to child_add_thread change.
5920 (win32_get_tib_address): New function.
5921 (win32_target_ops): Set get_tib_address field to
5922 win32_get_tib_address.
5923 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5925 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5927 * linux-low.c (linux_mourn): Also remove the process.
5928 * server.c (handle_target_event): Don't remove the process here.
5929 * nto-low.c (nto_mourn): New.
5930 (nto_target_ops): Install it.
5931 * spu-low.c (spu_mourn): New.
5932 (spu_target_ops): Install it.
5933 * win32-low.c (win32_mourn): New.
5934 (win32_target_ops): Install it.
5936 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5938 * server.h (buffer_xml_printf): Remove redundant `;'.
5940 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5942 * regcache.c (set_register_cache): Invalidate regcaches before
5943 changing the register cache layout.
5944 (regcache_invalidate_one): Allow a NULL regcache.
5945 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5946 regcaches before changing the register cache layout or the target
5949 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5951 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5952 variable warning on Linux/x86-64.
5954 2010-04-11 Pedro Alves <pedro@codesourcery.com>
5956 GDBserver disconnected tracing support.
5958 * linux-low.c (linux_remove_process): Delete.
5959 (add_lwp): Don't set last_resume_kind here.
5960 (linux_kill): Use `mourn'.
5961 (linux_detach): Use `thread_db_detach', and `mourn'.
5963 (linux_attach_lwp_1): Adjust comment.
5964 (linux_attach): last_resume_kind moved the thread_info; adjust.
5965 (status_pending_p_callback): Adjust.
5966 (linux_wait_for_event_1): Adjust.
5967 (count_events_callback, select_singlestep_lwp_callback)
5968 (select_event_lwp_callback, cancel_breakpoints_callback)
5969 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5970 (proceed_one_lwp): Adjust.
5971 (linux_async): Add debug output.
5972 (linux_thread_stopped): New.
5973 (linux_pause_all): New.
5974 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5976 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5977 (thread_db_free): Delete declaration.
5978 (thread_db_detach, thread_db_mourn): Declare.
5979 * thread-db.c (thread_db_init): Use thread_db_mourn.
5980 (thread_db_free): Delete, split in two.
5981 (disable_thread_event_reporting): New.
5982 (thread_db_detach): New.
5983 (thread_db_mourn): New.
5985 * server.h (struct thread_info) <last_resume_kind>: New field.
5986 <attached>: Add comment.
5987 <gdb_detached>: New field.
5988 (handler_func): Change return type to int.
5989 (handle_serial_event, handle_target_event): Ditto.
5990 (gdb_connected): Declare.
5992 (disconnected_tracing): Declare.
5993 (stop_tracing): Declare.
5995 * server.c (handle_query) <qSupported>: Report support for
5996 disconnected tracing.
5997 (queue_stop_reply_callback): Account for running threads.
5998 (gdb_wants_thread_stopped): New.
5999 (gdb_wants_all_threads_stopped): New.
6000 (gdb_reattached_process): New.
6001 (handle_status): Clear the `gdb_detached' flag of all processes.
6002 In all-stop, stop all threads.
6003 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6004 (process_serial_event): If the remote connection breaks, or if an
6005 exit was forced with "monitor exit", force an event loop exit.
6006 Handle disconnected tracing on detach.
6007 (handle_serial_event): Adjust.
6008 (handle_target_event): If GDB isn't connected, forward events back
6009 to the inferior, unless the last process exited, in which case,
6010 exit gdbserver. Adjust interface.
6012 * remote-utils.c (remote_open): Don't block in accept. Instead
6013 register an event loop source on the listen socket file
6014 descriptor. Refactor bits into ...
6015 (listen_desc): ... this new global.
6016 (gdb_connected): ... this new function.
6017 (enable_async_notification): ... this new function.
6018 (handle_accept_event): ... this new function.
6019 (remote_close): Clear remote_desc.
6021 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6023 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6025 (mourn_inferior): Define.
6026 (target_process_qsupported): Avoid the dangling else problem.
6027 (thread_stopped): Define.
6028 (pause_all): Define.
6029 (target_waitstatus_to_string): Declare.
6030 * target.c (target_waitstatus_to_string): New.
6032 * tracepoint.c (tracing): Make extern.
6033 (disconnected_tracing): New.
6034 (stop_tracing): Make extern. Handle tracing stops due to GDB
6036 (cmd_qtdisconnected): New.
6037 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6038 (handle_tracepoint_general_set): Handle QTDisconnected.
6040 * event-loop.c (event_handler_func): Change return type to int.
6041 (process_event): Bail out if the event handler wants the event
6043 (handle_file_event): Ditto.
6044 (start_event_loop): Bail out if the event handler wants the event
6047 * nto-low.c (nto_target_ops): Adjust.
6048 * spu-low.c (spu_wait): Don't remove the process here.
6049 (spu_target_ops): Adjust.
6050 * win32-low.c (win32_wait): Don't remove the process here.
6051 (win32_target_ops): Adjust.
6053 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6055 * regcache.c (realloc_register_cache): Invalidate inferior's
6056 regcache before recreating it.
6058 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6060 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6062 2010-04-09 Stan Shebs <stan@codesourcery.com>
6063 Pedro Alves <pedro@codesourcery.com>
6065 * server.h (LONGEST): New.
6066 (struct thread_info) <while_stepping>: New field.
6067 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6069 (initialize_tracepoint, handle_tracepoint_general_set)
6070 (handle_tracepoint_query, tracepoint_finished_step)
6071 (tracepoint_was_hit, release_while_stepping_state_list):
6072 (current_traceframe): Declare.
6073 * server.c (handle_general_set): Handle tracepoint packets.
6075 (write_memory): New.
6076 (handle_search_memory_1): Use read_memory.
6077 (handle_query): Report support for conditional tracepoints, trace
6078 state variables, and tracepoint sources. Handle tracepoint
6080 (main): Initialize the tracepoints module.
6081 (process_serial_event): Handle traceframe reads/writes.
6083 * linux-low.c (handle_tracepoints): New.
6084 (linux_wait_1): Call it.
6085 (linux_resume_one_lwp): Handle while-stepping.
6086 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6087 (linux_target_ops): Install them.
6088 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6090 * linux-x86-low.c (x86_supports_tracepoints): New.
6091 (the_low_target). Install it.
6093 * mem-break.h (delete_breakpoint): Declare.
6094 * mem-break.c (delete_breakpoint): Make external.
6096 * target.h (struct target_ops): Add `supports_tracepoints',
6097 `read_pc', and `write_pc' fields.
6098 (target_supports_tracepoints): Define.
6099 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6102 * regcache.h (struct regcache) <registers_owned>: New field.
6103 (init_register_cache, regcache_cpy): Declare.
6104 (regcache_read_pc, regcache_write_pc): Declare.
6105 (register_cache_size): Declare.
6106 (supply_regblock): Declare.
6107 * regcache.c (init_register_cache): New.
6108 (new_register_cache): Use it.
6109 (regcache_cpy): New.
6110 (register_cache_size): New.
6111 (supply_regblock): New.
6112 (regcache_read_pc, regcache_write_pc): New.
6114 * tracepoint.c: New.
6116 * Makefile.in (OBS): Add tracepoint.o.
6117 (tracepoint.o): New rule.
6119 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6121 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6123 (i386-mmx.c): Likewise.
6124 (i386-mmx-linux.o): Likewise.
6125 (i386-mmx-linux.c): Likewise.
6127 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6128 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6129 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6130 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6132 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6133 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6134 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6136 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6138 * Makefile.in (clean): Updated.
6140 (i386-avx.c): Likewise.
6141 (i386-avx-linux.o): Likewise.
6142 (i386-avx-linux.c): Likewise.
6143 (amd64-avx.o): Likewise.
6144 (amd64-avx.c): Likewise.
6145 (amd64-avx-linux.o): Likewise.
6146 (amd64-avx-linux.c): Likewise.
6148 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6149 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6150 (srv_amd64_regobj): Add amd64-avx.o.
6151 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6152 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6153 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6154 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6155 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6156 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6157 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6159 * i387-fp.c: Include "i386-xstate.h".
6161 (i387_cache_to_xsave): Likewise.
6162 (i387_xsave_to_cache): Likewise.
6163 (x86_xcr0): Likewise.
6165 * i387-fp.h (i387_cache_to_xsave): Likewise.
6166 (i387_xsave_to_cache): Likewise.
6167 (x86_xcr0): Likewise.
6169 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6170 * linux-crisv32-low.c (target_regsets): Likewise.
6171 * linux-m68k-low.c (target_regsets): Likewise.
6172 * linux-mips-low.c (target_regsets): Likewise.
6173 * linux-ppc-low.c (target_regsets): Likewise.
6174 * linux-s390-low.c (target_regsets): Likewise.
6175 * linux-sh-low.c (target_regsets): Likewise.
6176 * linux-sparc-low.c (target_regsets): Likewise.
6177 * linux-xtensa-low.c (target_regsets): Likewise.
6179 * linux-low.c: Include <sys/uio.h>.
6180 (regsets_fetch_inferior_registers): Support nt_type.
6181 (regsets_store_inferior_registers): Likewise.
6182 (linux_process_qsupported): New.
6183 (linux_target_ops): Add linux_process_qsupported.
6185 * linux-low.h (regset_info): Add nt_type.
6186 (linux_target_ops): Add process_qsupported.
6188 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6190 (init_registers_i386_avx_linux): New.
6191 (init_registers_amd64_avx_linux): Likewise.
6192 (xmltarget_i386_linux_no_xml): Likewise.
6193 (xmltarget_amd64_linux_no_xml): Likewise.
6194 (PTRACE_GETREGSET): Likewise.
6195 (PTRACE_SETREGSET): Likewise.
6196 (x86_fill_xstateregset): Likewise.
6197 (x86_store_xstateregset): Likewise.
6198 (use_xml): Likewise.
6199 (x86_linux_update_xmltarget): Likewise.
6200 (x86_linux_process_qsupported): Likewise.
6201 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6202 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6203 init_registers_i386_linux here. Call
6204 x86_linux_update_xmltarget.
6205 (the_low_target): Add x86_linux_process_qsupported.
6207 * server.c (handle_query): Call target_process_qsupported.
6209 * target.h (target_ops): Add process_qsupported.
6210 (target_process_qsupported): New.
6212 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6214 * inferiors.c (add_thread): Set last_status kind to
6215 TARGET_WAITKIND_IGNORE.
6216 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6217 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6218 (linux_wait_1): Move `thread' local definition to block that uses
6219 it. Don't NULL initialize `event_child'.
6220 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6221 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6222 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6224 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6226 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6227 an extended waitstatus, or by a watchpoint.
6228 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6229 thread was stepping or has been stopped by a watchpoint.
6231 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6233 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6234 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6235 of another, then delete the previous, and validate all
6237 (validate_inserted_breakpoint): New.
6238 (delete_disabled_breakpoints): New.
6239 (validate_breakpoints): New.
6240 (check_mem_read): Validate breakpoints before trusting their
6241 shadow. Delete disabled breakpoints.
6242 (check_mem_write): Validate breakpoints before trusting they
6243 should be inserted. Delete disabled breakpoints.
6244 * mem-break.h (validate_breakpoints):
6245 * server.c (handle_query): Validate breakpoints when we see a
6248 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6250 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6251 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6252 if we could tell there's a GDB breakpoint at stop_pc.
6253 (need_step_over_p): Don't do a step over if we find a GDB
6254 breakpoint at the resume PC.
6256 * mem-break.c (struct raw_breakpoint): New.
6257 (enum bkpt_type): New type `gdb_breakpoint'.
6258 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6259 fields. New field `raw'.
6260 (find_raw_breakpoint_at): New.
6261 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6263 (set_breakpoint_at): Adjust.
6264 (delete_raw_breakpoint): New.
6265 (release_breakpoint): New.
6266 (delete_breakpoint): Rename to...
6267 (delete_breakpoint_1): ... this. Add proc parameter. Use
6268 release_breakpoint. Return ENOENT.
6269 (delete_breakpoint): Reimplement.
6270 (find_breakpoint_at): Delete.
6271 (find_gdb_breakpoint_at): New.
6272 (delete_breakpoint_at): Delete.
6273 (set_gdb_breakpoint_at): New.
6274 (delete_gdb_breakpoint_at): New.
6275 (gdb_breakpoint_here): New.
6276 (set_reinsert_breakpoint): Use release_breakpoint.
6277 (uninsert_breakpoint): Rename to ...
6278 (uninsert_raw_breakpoint): ... this.
6279 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6280 (reinsert_raw_breakpoint): Change parameter type to
6282 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6284 (check_breakpoints): Adjust. Use release_breakpoint.
6285 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6286 (breakpoint_inserted_here): Ditto.
6287 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6288 Don't trust the breakpoint's shadow if it is not inserted.
6289 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6290 (delete_all_breakpoints): Adjust.
6291 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6292 use delete_breakpoint_1.
6294 * mem-break.h (breakpoints_supported): Delete declaration.
6295 (set_gdb_breakpoint_at): Declare.
6296 (gdb_breakpoint_here): Declare.
6297 (delete_breakpoint_at): Delete.
6298 (delete_gdb_breakpoint_at): Declare.
6300 * server.h (struct raw_breakpoint): Forward declare.
6301 (struct process_info): New field `raw_breakpoints'.
6303 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6306 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6308 * linux-low.c (status_pending_p_callback): Fix comment.
6309 (linux_wait_for_event_1): Move most of the internal breakpoint
6310 handling from here...
6311 (linux_wait_1): ... to here.
6312 (count_events_callback): New.
6313 (select_singlestep_lwp_callback): New.
6314 (select_event_lwp_callback): New.
6315 (cancel_breakpoints_callback): New.
6316 (select_event_lwp): New.
6317 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6318 priority to all LWPs that have had events that should be reported
6319 to the client. Cancel breakpoints when about to reporting the
6320 event to the client, not while stopping lwps. No longer cancel
6321 finished single-steps here.
6322 (cancel_finished_single_step): Delete.
6323 (cancel_finished_single_steps): Delete.
6325 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6327 * mem-break.c (enum bkpt_type): New.
6328 (struct breakpoint): New field `type'.
6329 (set_breakpoint_at): Change return type to struct breakpoint
6330 pointer. Set type to `other_breakpoint' by default.
6331 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6332 in the breakpoint list.
6333 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6334 (reinsert_breakpoint): Rename to ...
6335 (reinsert_raw_breakpoint): ... this.
6336 (reinsert_breakpoints_at): Adjust.
6337 * mem-break.h (struct breakpoint): Declare.
6338 (set_breakpoint_at): Change return type to struct breakpoint
6341 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6343 * server.c (handle_query): Assign, not compare.
6345 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6347 Teach linux gdbserver to step-over-breakpoints.
6349 * linux-low.c (can_hardware_single_step): New.
6350 (supports_breakpoints): New.
6351 (handle_extended_wait): If stopping threads, read the stop pc of
6354 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6355 low target doesn't support retrieving the PC.
6356 (add_lwp): Set last_resume_kind to resume_continue.
6357 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6358 (linux_attach): Don't clear stop_expected. Set the lwp's
6359 last_resume_kind to resume_stop.
6360 (linux_detach_one_lwp): Don't check for removed breakpoints.
6361 (check_removed_breakpoint): Delete.
6362 (status_pending_p): Rename to ...
6363 (status_pending_p_callback): ... this. Don't check for removed
6364 breakpoints. Don't consider threads that are stopped from GDB's
6366 (linux_wait_for_lwp): Always read the stop_pc here.
6367 (cancel_breakpoint): New.
6368 (step_over_bkpt): New global.
6369 (linux_wait_for_event_1): Implement stepping over breakpoints.
6370 (gdb_wants_lwp_stopped): New.
6371 (gdb_wants_all_stopped): New.
6372 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6373 single-step traps here. Store the thread's last reported target
6375 (send_sigstop): Don't clear stop_expected. Always set it,
6377 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6378 (cancel_finished_single_step): New.
6379 (cancel_finished_single_steps): New.
6380 (wait_for_sigstop): Don't cancel finished single-step traps here.
6381 (linux_resume_one_lwp): Don't check for removed breakpoints.
6382 Don't set `step' on non-hardware step archs.
6383 (linux_set_resume_request): Ignore resume_stop requests if already
6384 stopping or stopped. Set the lwp's last_resume_kind.
6385 (resume_status_pending_p): Don't check for removed breakpoints.
6386 (need_step_over_p): New.
6387 (start_step_over): New.
6388 (finish_step_over): New.
6389 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6390 requests. Clear the thread's last reported target waitstatus.
6391 Don't use the `suspended' flag. Don't consider pending breakpoints.
6392 (linux_resume): Start a step-over if necessary.
6393 (proceed_one_lwp): New.
6394 (proceed_all_lwps): New.
6395 (unstop_all_lwps): New.
6396 * linux-low.h (struct lwp_info): Rewrite comment for the
6397 `suspended' flag. Add the `stop_pc' field. Delete the
6398 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6399 Add `'last_resume_kind' and `need_step_over' fields.
6400 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6401 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6402 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6403 (set_raw_breakpoint_at): New.
6404 (set_breakpoint_at): Rewrite to use it.
6405 (reinsert_breakpoint_handler): Delete.
6406 (set_reinsert_breakpoint): New.
6407 (reinsert_breakpoint_by_bp): Delete.
6408 (delete_reinsert_breakpoints): New.
6409 (uninsert_breakpoint): Rewrite.
6410 (uninsert_breakpoints_at): New.
6411 (reinsert_breakpoint): Rewrite.
6412 (reinsert_breakpoints_at): New.
6413 (check_breakpoints): Rewrite.
6414 (breakpoint_here): New.
6415 (breakpoint_inserted_here): New.
6416 (check_mem_read): Adjust.
6417 * mem-break.h (breakpoints_supported, breakpoint_here)
6418 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6419 (reinsert_breakpoint_by_bp): Delete declaration.
6420 (delete_reinsert_breakpoints): Declare.
6421 (reinsert_breakpoint): Delete declaration.
6422 (reinsert_breakpoints_at): Declare.
6423 (uninsert_breakpoint): Delete declaration.
6424 (uninsert_breakpoints_at): Declare.
6425 (check_breakpoints): Adjust prototype.
6426 * server.h: Adjust include order.
6427 (struct thread_info): Declare here. Add a `last_status' field.
6429 2010-03-23 Michael Snyder <msnyder@vmware.com>
6431 * server.c (crc32): New function.
6432 (handle_query): Add handling for 'qCRC:' request.
6434 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6436 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6437 lwp had been stopped by a watchpoint.
6439 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6441 * server.h (internal_error): Declare.
6442 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6443 * utils.c (internal_error): New function.
6445 2010-03-15 Andreas Schwab <schwab@redhat.com>
6447 * configure.srv: Fix typo setting srv_regobj.
6449 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6451 * linux-low.c (fetch_register): Avoid passing a non string literal
6453 (usr_store_inferior_registers): Ditto.
6455 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6457 * linux-low.c (linux_write_memory): Bail out early if peeking
6460 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6462 * linux-low.h (struct lwp_info): New fields
6463 `stopped_by_watchpoint' and `stopped_data_address'.
6464 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6465 here, and cache them in the lwp object.
6466 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6468 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6470 (linux_stopped_by_watchpoint): Rewrite.
6471 (linux_stopped_data_address): Rewrite.
6473 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6475 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6476 switching the current inferior, not before.
6478 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6480 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6481 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6482 i386-linux.c and amd64-linux.c.
6483 (reg-i386.o): Removed.
6484 (reg-i386.c): Likewise.
6485 (reg-i386-linux.o): Likewise.
6486 (reg-i386-linux.c): Likewise.
6487 (reg-x86-64.o): Likewise.
6488 (reg-x86-64.c): Likewise.
6489 (reg-x86-64-linux.o): Likewise.
6490 (reg-x86-64-linux.c): Likewise.
6493 (i386-linux.o): Likewise.
6494 (i386-linux.c): Likewise.
6495 (amd64.o): Likewise.
6496 (amd64.c): Likewise.
6497 (amd64-linux.o): Likewise.
6498 (amd64-linux.c): Likewise.
6500 * configure.srv (srv_i386_regobj): New.
6501 (srv_i386_linux_regobj): Likewise.
6502 (srv_amd64_regobj): Likewise.
6503 (srv_amd64_linux_regobj): Likewise.
6504 (srv_i386_32bit_xmlfiles): Likewise.
6505 (srv_i386_64bit_xmlfiles): Likewise.
6506 (srv_i386_xmlfiles): Likewise.
6507 (srv_amd64_xmlfiles): Likewise.
6508 (srv_i386_linux_xmlfiles): Likewise.
6509 (srv_amd64_linux_xmlfiles): Likewise.
6510 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6511 srv_xmlfiles to $srv_i386_xmlfiles.
6512 (i[34567]86-*-mingw32ce*): Likewise.
6513 (i[34567]86-*-mingw*): Likewise.
6514 (i[34567]86-*-nto*): Likewise.
6515 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6516 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6517 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6518 (x86_64-*-linux*): Likewise.
6520 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6521 (init_registers_amd64_linux): New.
6522 (x86_arch_setup): Replace init_registers_x86_64_linux with
6523 init_registers_amd64_linux.
6525 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6527 * configure.ac: Check for libdl. If it is not available link against
6528 static libthread_db.
6529 * configure: Regenerate.
6531 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6535 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6536 handing a read watchpoint.
6537 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6539 2010-02-12 Doug Evans <dje@google.com>
6541 * linux-low.c (linux_supports_tracefork_flag): Document.
6542 (linux_look_up_symbols): Add comment.
6544 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6546 * regcache.c (supply_register): Clear regcache if buf is NULL.
6548 2010-02-02 Nicolas Roche <roche@sourceware.org>
6549 Joel Brobecker <brobecker@adacore.com>
6551 * inferiors.c (find_inferior): Add function documentation.
6552 (unloaded_dll): Handle the case where the unloaded dll has not
6553 been previously registered in the dll list.
6555 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6557 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6558 (thumb2_breakpoint): New.
6559 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6561 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6563 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6564 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6567 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6569 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6571 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6573 * linux-s390-low.c (s390_collect_ptrace_register)
6574 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6576 2010-01-21 Doug Evans <dje@google.com>
6578 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6579 (PTRACE_ARG4_TYPE): New macro.
6580 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6581 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6582 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6583 (usr_store_inferior_registers): Ditto.
6584 (linux_read_memory, linux_write_memory): Ditto.
6585 (linux_test_for_tracefork): Ditto.
6587 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6588 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6590 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6592 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6595 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6597 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6598 prototype to take a regcache. Adjust.
6600 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6602 * regcache.h (struct thread_info): Forward declare.
6603 (struct regcache): New.
6604 (new_register_cache): Adjust prototype.
6605 (get_thread_regcache): Declare.
6606 (free_register_cache): Adjust prototype.
6607 (registers_to_string, registers_from_string): Ditto.
6608 (supply_register, supply_register_by_name, collect_register)
6609 (collect_register_as_string, collect_register_by_name): Ditto.
6610 * regcache.c (struct inferior_regcache_data): Delete.
6611 (get_regcache): Rename to ...
6612 (get_thread_regcache): ... this. Adjust. Switch inferior before
6614 (regcache_invalidate_one): Adjust.
6615 (regcache_invalidate): Fix prototype.
6616 (new_register_cache): Return the new register cache.
6617 (free_register_cache): Change prototype.
6618 (realloc_register_cache): Adjust.
6619 (registers_to_string): Change prototype to take a regcache. Adjust.
6620 (registers_from_string): Ditto.
6621 (register_data): Ditto.
6622 (supply_register): Ditto.
6623 (supply_register_by_name): Ditto.
6624 (collect_register): Ditto.
6625 (collect_register_as_string): Ditto.
6626 (collect_register_by_name): Ditto.
6627 * server.c (process_serial_event): Adjust.
6628 * linux-low.h (regset_fill_func, regset_store_func): Change
6630 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6632 * linux-low.c (get_stop_pc): Adjust.
6633 (check_removed_breakpoint): Adjust.
6634 (linux_wait_for_event): Adjust.
6635 (linux_resume_one_lwp): Adjust.
6636 (fetch_register): Add regcache parameter. Adjust.
6637 (usr_store_inferior_registers): Ditto.
6638 (regsets_fetch_inferior_registers): Ditto.
6639 (regsets_store_inferior_registers): Ditto.
6640 (linux_fetch_registers, linux_store_registers): Ditto.
6641 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6643 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6645 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6646 prototype to take a regcache.
6647 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6648 * remote-utils.c (convert_ascii_to_int, outreg)
6649 (prepare_resume_reply): Change prototype to take a regcache.
6651 * target.h (struct target_ops) <fetch_registers, store_registers>:
6652 Change prototype to take a regcache.
6653 (fetch_inferior_registers, store_inferior_registers): Change
6654 prototype to take a regcache. Adjust.
6655 * proc-service.c (ps_lgetregs): Adjust.
6656 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6657 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6658 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6659 take a regcache. Adjust.
6660 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6661 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6662 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6663 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6664 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6665 (cris_cannot_fetch_register):
6666 (cris_breakpoint_at): Change prototype to take a regcache.
6668 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6669 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6670 to take a regcache. Adjust.
6671 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6673 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6674 take a regcache. Adjust.
6675 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6676 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6677 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6678 * linux-mips-low.c (mips_get_pc):
6679 (mips_set_pc): Change prototype to take a regcache. Adjust.
6680 (mips_reinsert_addr): Adjust.
6681 (mips_collect_register): Change prototype to take a regcache.
6683 (mips_supply_register):
6684 (mips_collect_register_32bit, mips_supply_register_32bit)
6685 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6686 (mips_store_fpregset): Ditto.
6687 * linux-ppc-low.c (ppc_supply_ptrace_register)
6688 (ppc_supply_ptrace_register): Ditto.
6689 (parse_spufs_run): Adjust.
6690 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6691 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6692 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6693 take a regcache. Adjust.
6694 * linux-s390-low.c (s390_collect_ptrace_register)
6695 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6696 (s390_set_pc): Change prototype to take a regcache. Adjust.
6697 (s390_arch_setup): Adjust.
6698 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6699 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6700 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6701 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6702 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6704 (sparc_breakpoint_at): Adjust.
6705 * linux-xtensa-low.c (xtensa_fill_gregset):
6706 (xtensa_store_gregset):
6707 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6708 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6709 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6710 prototype to take a regcache. Adjust.
6711 * win32-arm-low.c (arm_fetch_inferior_register)
6712 (arm_store_inferior_register): Change prototype to take a
6714 * win32-i386-low.c (i386_fetch_inferior_register)
6715 (i386_store_inferior_register): Change prototype to take a
6717 * win32-low.c (child_fetch_inferior_registers)
6718 (child_store_inferior_registers): Change prototype to take a
6720 (win32_wait): Adjust.
6721 (win32_fetch_inferior_registers): Change prototype to take a
6723 (win32_store_inferior_registers): Adjust.
6724 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6725 store_inferior_register>: Change prototype to take a regcache.
6727 2010-01-20 Doug Evans <dje@google.com>
6729 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6731 (linux_wait_for_event1, linux_init_signals): Ditto.
6732 (W_STOPCODE): Provide definition if missing.
6734 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6736 * linux-low.c (linux_core_of_thread): New.
6737 (compare_ints, show_process, list_threads): New.
6738 (linux_qxfer_osdata): Report threads and cores.
6739 (linux_target_op): Register linux_core_of_thread.
6740 * remote-utils.c (prepare_resume_reply): Report the core.
6741 (buffer_xml_printf): Support %d specifier.
6742 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6744 (handle_query): Handle qXfer:threads. Announce availability
6746 * target.h (struct target_ops): New field core_of_thread.
6748 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6750 * Makefile.in (clean): Remove new generated files.
6751 (reg-s390.o, reg-s390.c): Remove rules.
6752 (reg-s390x.o, reg-s390x.c): Likewise.
6753 (s390-linux32.o, s390-linux32.c): Add rules.
6754 (s390-linux64.o, s390-linux64.c): Likewise.
6755 (s390x-linux64.o, s390x-linux64.c): Likewise.
6756 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6757 * linux-s390-low.c: Include <elf.h>.
6758 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6759 (init_registers_s390): Remove prototype.
6760 (init_registers_s390x): Likewise.
6761 (init_registers_s390_linux32): Add prototype.
6762 (init_registers_s390_linux64): Likewise.
6763 (init_registers_s390x_linux64): Likewise.
6764 (s390_num_regs_3264): New define.
6765 (s390_regmap_3264): New global variable.
6766 (s390_cannot_fetch_register): Remove obsolete check.
6767 (s390_cannot_store_register): Likewise.
6768 (s390_collect_ptrace_register): Handle upper/lower register halves.
6769 (s390_supply_ptrace_register): Likewise.
6770 (s390_fill_gregset): Update to register number changes.
6771 (s390_get_hwcap): New routine.
6772 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6773 Install appropriate regmap and register set.
6775 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6777 * server.c (gdbserver_version): Update copyright year to 2010.
6778 * gdbreplay.c (gdbreplay_version): Likewise.
6780 2009-12-28 Doug Evans <dje@google.com>
6782 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6783 elf/external.h. Include <elf.h> instead but only if necessary.
6785 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6787 * linux-low.c (linux_remove_process): Remove `detaching'
6788 parameter. Don't release/detach from thread_db here.
6789 (linux_kill): Release/detach from thread_db here, ...
6790 (linux_detach): ... and here, before actually detaching.
6791 (linux_wait_1): ... and here, when a process exits.
6792 * thread-db.c (any_thread_of): New.
6793 (thread_db_free): Switch the current inferior to a thread of the
6796 2009-12-21 Doug Evans <dje@google.com>
6798 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6800 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6801 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6802 warning ifndef __NR_tkill. Move setting of errno there too.
6803 Delete unnecessary resetting of errno after syscall.
6804 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6806 * configure.ac: Check for dladdr.
6807 * config.in: Regenerate.
6808 * configure: Regenerate.
6809 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6810 (try_thread_db_load): Update.
6812 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6814 2009-12-18 Doug Evans <dje@google.com>
6816 * event-loop.c: Include unistd.h if it exists.
6818 * linux-low.c (my_waitpid): Move definition away from being in
6819 between linux_tracefork_child/linux_test_for_tracefork.
6821 * gdb_proc_service.h (psaddr_t): Fix type.
6822 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6823 signature to match glibc.
6825 2009-12-16 Doug Evans <dje@google.com>
6827 * linux-low.c (linux_read_memory): Fix argument to read.
6829 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6831 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6832 events, don't leave current_inferior pointing at null.
6834 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6836 * win32-low.c (LOG): Delete.
6837 (OUTMSG): Output to stderr.
6838 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6839 on compile time LOG macro.
6840 (win32_wait): Fix debug output.
6842 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6844 * win32-low.c (win32_add_one_solib): If the dll name is
6845 "ntdll.dll", prepend the system directory to the dll path.
6847 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6849 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6851 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6852 Vladimir Prus <vladimir@codesourcery.com>
6854 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6855 * configure.ac: Check for __mcoldfire__ and set
6856 gdb_cv_m68k_is_coldfire.
6857 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6858 reg-cf.o and reg-m68k.o.
6859 * configure: Regenerated.
6861 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6863 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6864 Pass it to thread_db_free.
6865 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6866 proper `detaching' argument to linux_remove_process.
6867 * linux-low.h (thread_db_free): Add `detaching' parameter.
6868 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6870 (thread_db_free): Add `detaching' parameter. Only
6871 call td_ta_clear_event if detaching from process.
6873 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6875 * thread-db.c (thread_db_free): Fix typo.
6877 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6880 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6882 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6884 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6885 with an i686 compiler.
6886 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6888 * configure: Rebuilt.
6890 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6894 * server.c (handle_search_memory_1): Correct read_addr initialization
6895 in loop for searching subsequent chunks.
6897 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6899 * configure.ac: New --with-libthread-db option.
6900 * thread-db.c: Allow direct dependence on libthread_db.
6901 (thread_db_free): Adjust.
6902 * config.in: Regenerate.
6903 * configure: Likewise.
6905 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6908 * thread-db.c (attach_thread): New function.
6909 (maybe_attach_thread): Return success/failure.
6910 (find_new_threads_callback): Adjust.
6911 (thread_db_find_new_threads): Loop until no new threads.
6913 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6915 * proc-service.c (ps_lgetregs): Formatting.
6917 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6919 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6920 * configure.ac: Adjust.
6921 * linux-low.h (struct process_info_private): Move members to struct
6923 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6924 * linux-low.c (linux_remove_process): Adjust.
6925 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6926 * server.c (handle_query): Move code ...
6927 (handle_monitor_command): ... here. New function.
6928 * target.h (struct target_ops): New member.
6929 * thread-db.c (struct thread_db): New.
6930 (libthread_db_search_path): New variable.
6931 (thread_db_create_event, thread_db_enable_reporting)
6932 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6933 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6934 (try_thread_db_load_1, dladdr_to_soname): New functions.
6935 (try_thread_db_load, thread_db_load_search): New functions.
6936 (thread_db_init): Search for libthread_db.
6937 (thread_db_free): New function.
6938 (thread_db_handle_monitor_command): Likewise.
6939 * config.in: Regenerate.
6940 * configure: Regenerate.
6942 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6944 * spu-low.c (spu_kill): Wait for inferior to terminate.
6945 Call clear_inferiors.
6946 (spu_detach): Call clear_inferiors.
6948 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6950 * aclocal.m4: Regenerate.
6951 * config.in: Likewise.
6952 * configure: Likewise.
6954 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6956 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6957 (parse_spufs_run): New function.
6958 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6959 (ppc_breakpoint_at): Handle SPU breakpoints.
6961 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6963 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6964 (SPUFS_MAGIC): Define.
6965 (spu_enumerate_spu_ids): New function.
6966 (linux_qxfer_spu): New function.
6967 (linux_target_ops): Install linux_qxfer_spu.
6969 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6971 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6972 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6973 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6974 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6975 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6976 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6977 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6978 (init_registers_powerpc_cell32l): Add prototype.
6979 (init_registers_powerpc_cell64l): Likewise.
6980 (ppc_arch_setup): Detect Cell/B.E. architecture.
6982 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6984 * Makefile.in (datarootdir): New variable.
6986 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6988 * linux-low.c (linux_write_memory): Update debugging output.
6989 * Makefile.in (clean): Add new descriptions.
6990 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6991 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6992 * configure.srv: Add new files for arm*-*-linux*.
6993 * linux-arm-low.c: Add new declarations.
6994 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6995 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6996 (HWCAP_VFPv3D16): New.
6997 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6998 instead of __IWMMXT__.
6999 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7000 (arm_arch_setup): New.
7001 (target_regsets): Remove #ifdef. Add VFP regset.
7002 (the_low_target): Use arm_arch_setup.
7004 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7006 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7007 the main thread again.
7009 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7011 Adding Neutrino gdbserver.
7012 * configure: Regenerated.
7013 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7014 * configure.srv (i[34567]86-*-nto*): New target.
7015 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7016 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7017 (nto_comctrl) [__QNX__]: New function.
7018 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7020 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7022 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7025 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7026 Pedro Alves <pedro@codesourcery.com>
7028 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7029 don't support CONTEXT_EXTENDED_REGISTERS.
7030 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7031 (the_low_target): Install them.
7032 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7033 failing with ERROR_PIPE_NOT_CONNECTED.
7035 2009-06-30 Doug Evans <dje@google.com>
7036 Pierre Muller <muller@ics.u-strasbg.fr>
7038 Add h/w watchpoint support to x86-linux, win32-i386.
7039 * Makefile.in (SFILES): Add i386-low.c
7040 (i386_low_h): Define.
7041 (i386-low.o): Add dependencies.
7042 (linux-x86-low.o): Add i386-low.h dependency.
7043 (win32-i386-low.o): Ditto.
7044 * i386-low.c: New file.
7045 * i386-low.h: New file.
7046 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7047 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7048 * linux-low.c (linux_add_process): Initialize arch_private.
7049 (linux_remove_process): Free arch_private.
7050 (add_lwp): Initialize arch_private.
7051 (delete_lwp): Free arch_private.
7052 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7054 * linux-low.h (process_info_private): New member arch_private.
7055 (lwp_info): New member arch_private.
7056 (linux_target_ops): New members new_process, new_thread,
7058 (ptid_of): New macro.
7059 * linux-x86-low.c: Include stddef.h, i386-low.h.
7060 (arch_process_info): New struct.
7061 (arch_lwp_info): New struct.
7062 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7063 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7064 (i386_dr_low_get_status): New function.
7065 (x86_insert_point, x86_remove_point): New functions.
7066 (x86_stopped_by_watchpoint): New function.
7067 (x86_stopped_data_address): New function.
7068 (x86_linux_new_process, x86_linux_new_thread): New functions.
7069 (x86_linux_prepare_to_resume): New function.
7070 (the_low_target): Add entries for insert_point, remove_point,
7071 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7073 * server.c (debug_hw_points): New global.
7074 (monitor_show_help): Document set debug-hw-points.
7075 (handle_query): Process "set debug-hw-points".
7076 * server.h (debug_hw_points): Declare.
7077 (paddress): Declare.
7078 * utils.c (NUMCELLS, CELLSIZE): New macros.
7079 (get_sell, xsnprintf, paddress): New functions.
7080 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7081 remove_point, stopped_by_watchpoint, stopped_data_address.
7082 * win32-i386-low.c: Include i386-low.h.
7083 (debug_reg_state): Replaces dr.
7084 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7085 (i386_dr_low_get_status): New function.
7086 (i386_insert_point, i386_remove_point): New functions.
7087 (i386_stopped_by_watchpoint): New function.
7088 (i386_stopped_data_address): New function.
7089 (i386_initial_stuff): Update.
7090 (get_thread_context,set_thread_context,i386_thread_added): Update.
7091 (the_low_target): Add entries for insert_point,
7092 remove_point, stopped_by_watchpoint, stopped_data_address.
7093 * win32-low.c (win32_insert_watchpoint): New function.
7094 (win32_remove_watchpoint): New function.
7095 (win32_stopped_by_watchpoint): New function.
7096 (win32_stopped_data_address): New function.
7097 (win32_target_ops): Add entries for insert_watchpoint,
7098 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7099 * win32-low.h (win32_target_ops): New members insert_point,
7100 remove_point, stopped_by_watchpoint, stopped_data_address.
7102 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7104 * server.c (process_serial_event): Re-return unsupported, not
7105 error, if the type isn't recognized. Re-allow supporting only
7106 insert or remove packets. Also call require_running for
7107 breakpoints. Add missing break statement to default case. Tidy.
7108 * target.h (struct target_ops): Rename insert_watchpoint to
7109 insert_point, and remove_watchpoint to remove_point.
7111 * linux-low.h (struct linux_target_ops): Likewise.
7112 * linux-low.c (linux_insert_watchpoint): Rename to ...
7113 (linux_insert_point): ... this. Adjust.
7114 (linux_remove_watchpoint): Rename to ...
7115 (linux_remove_point): ... this. Adjust.
7116 (linux_target_ops): Adjust.
7117 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7118 (cris_insert_point): ... this.
7119 (cris_remove_watchpoint): Rename to ...
7120 (cris_remove_point): ... this.
7121 (the_low_target): Adjust.
7123 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7125 * server.c (handle_v_kill): Pass signal_pid to
7126 kill_inferior if multi_process is zero.
7128 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7130 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7131 * target.h (target_ops): Comment for *_watchpoint to make it clear
7132 the functions can get types '0' and '1'.
7134 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7136 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7137 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7138 * regcache.c (get_regcache): Likewise.
7139 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7140 * win32-low.c (child_fetch_inferior_registers): Remove check for
7143 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7144 Pedro Alves <pedro@codesourcery.com>
7146 * target.h (struct target_ops) <supports_multi_process>: New
7148 (target_supports_multi_process): New.
7149 * server.c (handle_query): Even if GDB reports support, only
7150 enable multi-process if the target also supports it. Report
7151 multi-process support only if the target backend supports it.
7152 * linux-low.c (linux_supports_multi_process): New function.
7153 (linux_target_ops): Install it as target_supports_multi_process
7156 2009-05-24 Doug Evans <dje@google.com>
7158 Global renaming of find_thread_pid to find_thread_ptid.
7159 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7160 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7161 All callers updated.
7163 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7164 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7167 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7168 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7169 (linux_resume_one_lwp): Ditto.
7171 2009-05-23 Doug Evans <dje@google.com>
7173 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7174 from struct inferior_list_entry * to struct lwp_info *.
7175 All callers updated.
7177 2009-05-13 Doug Evans <dje@google.com>
7179 * linux-x86-low.c: Don't include assert.h.
7180 (x86_siginfo_fixup): Use fatal, not assert.
7181 (x86_arch_setup): Fix comment.
7183 2009-05-12 Doug Evans <dje@google.com>
7185 Biarch support for i386/amd64 gdbserver.
7186 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7187 Add linux-x86-low.c.
7188 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7189 (linux-x86-low.o): Add.
7190 * linux-x86-64-low.c: Delete.
7191 * linux-i386-low.c: Delete.
7192 * linux-x86-low.c: New file.
7193 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7195 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7197 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7198 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7199 (linux_child_pid_to_exec_file): New function.
7200 (elf_64_header_p, elf_64_file_p): New functions.
7201 (siginfo_fixup): New function.
7202 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7203 give target a chance to convert layout.
7204 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7205 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7207 2009-05-07 Doug Evans <dje@google.com>
7209 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7210 (regsets_store_inferior_registers): Ditto.
7212 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7216 * linux-low.c (must_set_ptrace_flags): Delete.
7217 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7219 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7220 `lwp->must_set_ptrace_flags' instead.
7221 (linux_wait_for_event_1): Set ptrace options here.
7222 (linux_wait_1): ... not here.
7224 2009-04-30 Doug Evans <dje@google.com>
7226 * inferiors.c (started_inferior_callback): New function.
7227 (attached_inferior_callback): New function.
7228 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7229 * server.c (print_started_pid, print_attached_pid): New functions.
7230 (detach_or_kill_for_exit): New function.
7231 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7232 * server.h (have_started_inferiors_p): Declare.
7233 (have_attached_inferiors_p): Declare.
7235 * inferiors.c (remove_process): Fix memory leak, free process.
7236 * linux-low.c (linux_remove_process): New function.
7237 (linux_kill): Call it instead of remove_process.
7238 (linux_detach, linux_wait_1): Ditto.
7240 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7242 * configure.srv: Add x86 Windows CE target.
7244 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7246 * inferiors.c (get_thread_process): Make global.
7247 * server.h (get_thread_process): Add prototype.
7248 * thread-db.c (find_one_thread): Use get_thread_process
7249 instead of current_process.
7250 (thread_db_get_tls_address): Do not crash if called when
7251 thread layer is not yet initialized.
7253 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7255 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7256 * spu-low.c (current_tid): Rename to ...
7257 (current_ptid): ... this.
7258 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7259 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7260 ptid_get_lwp (current_ptid) instead of current_tid.
7261 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7262 instead of current_tid. Use find_process_pid to verify pid
7263 argument is valid. Pass proper argument to remove_process.
7264 (spu_thread_alive): Compare current_ptid instead of current_tid.
7265 (spu_resume): Likewise.
7267 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7269 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7272 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7274 Implement the multiprocess extensions, and add linux multiprocess
7277 * server.h (ULONGEST): Declare.
7278 (struct ptid, ptid_t): New.
7279 (minus_one_ptid, null_ptid): Declare.
7280 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7281 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7282 (struct inferior_list_entry): Change `id' type from unsigned from
7284 (struct sym_cache, struct breakpoint, struct
7285 process_info_private): Forward declare.
7286 (struct process_info): Declare.
7287 (current_process): Declare.
7288 (all_processes): Declare.
7289 (initialize_inferiors): Declare.
7290 (add_thread): Adjust to use ptid_t.
7291 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7292 (add_process, remove_process, find_thread_pid): Declare.
7293 (find_inferior_id): Adjust to use ptid_t.
7294 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7295 (multi_process): Declare.
7296 (push_event): Adjust to use ptid_t.
7297 (read_ptid, write_ptid): Declare.
7298 (prepare_resume_reply): Adjust to use ptid_t.
7299 (clear_symbol_cache): Declare.
7300 * inferiors.c (all_processes): New.
7301 (null_ptid, minus_one_ptid): New.
7302 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7303 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7304 (add_thread): Change unsigned long to ptid. Remove gdb_id
7306 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7307 (gdb_id_to_thread): Rename to ...
7308 (find_thread_pid): ... this. Change unsigned long to ptid.
7309 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7310 (loaded_dll, pull_pid_from_list): Adjust.
7311 (add_process, remove_process, find_process_pid)
7312 (get_thread_process, current_process, initialize_inferiors): New.
7313 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7314 (struct target_waitstatus) <related_pid>: Ditto.
7315 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7317 (struct target_ops) <join>: Add `pid' argument.
7318 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7319 (struct target_ops) <wait>: Add `ptid' field. Change return type
7321 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7322 (mywait): Add `ptid' argument. Change return type to ptid_t.
7323 (target_pid_to_str): Declare.
7324 * target.c (set_desired_inferior): Adjust to use ptids.
7325 (mywait): Add new `ptid' argument. Adjust.
7326 (target_pid_to_str): New.
7327 * mem-break.h (free_all_breakpoints): Declare.
7328 * mem-break.c (breakpoints): Delelete.
7329 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7330 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7331 to use per-process breakpoint list.
7332 (free_all_breakpoints): New.
7333 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7334 (symbol_cache, all_symbols_looked_up): Delete.
7336 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7338 (prepare_resume_reply): Change ptid argument's type from unsigned
7339 long to ptid_t. Adjust. Implement W;process and X;process.
7340 (free_sym_cache, clear_symbol_cache): New.
7341 (look_up_one_symbol): Adjust to per-process symbol cache. *
7342 * server.c (cont_thread, general_thread, step_thread): Change type
7345 (multi_process): New.
7346 (last_ptid): Change type to ptid_t.
7347 (struct vstop_notif) <ptid>: Change type to ptid_t.
7348 (queue_stop_reply, push_event): Change `ptid' argument's type to
7350 (discard_queued_stop_replies): Add `pid' argument.
7351 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7352 changes. Don't reference the `attached' global.
7353 (attach_inferior): Adjust to mywait interface changes.
7354 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7355 features. Handle and report "multiprocess+". Handle
7357 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7359 (handle_v_kill): New.
7360 (handle_v_stopped): Adjust to use target_pid_to_str.
7361 (handle_v_requests): Allow multiple attaches and runs when
7362 multiprocess extensions are in effect. Handle "vKill".
7363 (myresume): Adjust to use ptids.
7364 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7365 (handle_status): Adjust to discard_queued_stop_replies interface
7367 (first_thread_of, kill_inferior_callback)
7368 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7369 (main): Call initialize_inferiors. Adjust to use ptids, killing
7370 and detaching from all inferiors. Handle multiprocess packet
7372 * linux-low.h: Include gdb_proc_service.h.
7373 (struct process_info_private): New.
7374 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7375 <lwpid_of>: Use ptid_get_lwp.
7376 (get_lwp_thread): Adjust.
7377 (struct lwp_info): Add `dead' member.
7378 (find_lwp_pid): Declare.
7379 * linux-low.c (thread_db_active): Delete.
7380 (new_inferior): Adjust comment.
7381 (inferior_pid): Delete.
7382 (linux_add_process): New.
7383 (handle_extended_wait): Adjust.
7384 (add_lwp): Change unsigned long to ptid.
7385 (linux_create_inferior): Add process to processes table. Adjust
7386 to use ptids. Don't set new_inferior here.
7387 (linux_attach_lwp): Rename to ...
7388 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7389 it. Adjust to use ptids.
7390 (linux_attach_lwp): New.
7391 (linux_attach): Add process to processes table. Don't set
7393 (struct counter): New.
7394 (second_thread_of_pid_p, last_thread_of_process_p): New.
7395 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7397 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7398 processes. Remove process from process table.
7399 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7400 to multiple processes.
7401 (any_thread_of): New.
7402 (linux_detach): Add `pid' argument, and handle it. Remove process
7403 from processes table.
7404 (linux_join): Add `pid' argument. Handle it.
7405 (linux_thread_alive): Change unsighed long argument to ptid_t.
7406 Consider dead lwps as not being alive.
7407 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7408 threads we're not interested in.
7409 (same_lwp, find_lwp_pid): New.
7410 (linux_wait_for_lwp): Change `pid' argument's type from int to
7412 (linux_wait_for_event): Rename to ...
7413 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7414 from int to ptid_t. Adjust.
7415 (linux_wait_for_event): New.
7416 (linux_wait_1): Add `ptid' argument. Change return type to
7417 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7418 that exit from the process table.
7419 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7421 (mark_lwp_dead): New.
7422 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7423 stopping all threads, mark its main lwp as dead.
7424 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7426 (fetch_register, usr_store_inferior_registers)
7427 (regsets_fetch_inferior_registers)
7428 (regsets_store_inferior_registers, linux_read_memory)
7429 (linux_write_memory): Inline `inferior_pid'.
7430 (linux_look_up_symbols): Adjust to use per-process
7432 (linux_request_interrupt): Adjust to use ptids.
7433 (linux_read_auxv): Inline `inferior_pid'.
7434 (initialize_low): Don't reference thread_db_active.
7435 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7436 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7437 (ps_getpid): Return the pid of the current inferior.
7438 * thread-db.c (proc_handle, thread_agent): Delete.
7439 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7441 (find_one_thread): Change argument type to ptid_t. Adjust to
7443 (maybe_attach_thread): Adjust to per-process data and ptids.
7444 (thread_db_find_new_threads): Ditto.
7445 (thread_db_init): Ditto.
7446 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7447 processes table. Adjust to use ptids.
7448 (spu_kill, spu_detach): Adjust interface. Remove process from
7450 (spu_join, spu_thread_alive): Adjust interface.
7451 (spu_wait): Adjust interface. Remove process from processes
7452 table. Adjust to use ptids.
7453 * win32-low.c (current_inferior_tid): Delete.
7454 (current_inferior_ptid): New.
7455 (debug_event_ptid): New.
7456 (thread_rec): Take a ptid. Adjust.
7457 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7458 (child_delete_thread): Ditto.
7459 (do_initial_child_stuff): Add `attached' argument. Add process to
7461 (child_fetch_inferior_registers, child_store_inferior_registers):
7463 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7464 (win32_attach): Pass 1 to do_initial_child_stuff.
7465 (win32_kill): Adjust interface. Remove process from processes
7467 (win32_detach): Ditto.
7468 (win32_join): Adjust interface.
7469 (win32_thread_alive): Take a ptid.
7470 (win32_resume): Adjust to use ptids.
7471 (get_child_debug_event): Ditto.
7472 (win32_wait): Adjust interface. Remove exiting process from
7475 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7477 Non-stop mode support.
7479 * server.h (non_stop): Declare.
7480 (gdb_client_data, handler_func): Declare.
7481 (delete_file_handler, add_file_handler, start_event_loop):
7483 (handle_serial_event, handle_target_event, push_event)
7484 (putpkt_notif): Declare.
7485 * target.h (enum resume_kind): New.
7486 (struct thread_resume): Replace `step' field by `kind' field.
7487 (TARGET_WNOHANG): Define.
7488 (struct target_ops) <wait>: Add `options' argument.
7489 <supports_non_stop, async, start_non_stop>: New fields.
7490 (target_supports_non_stop, target_async): New.
7491 (start_non_stop): Declare.
7492 (mywait): Add `options' argument.
7493 * target.c (mywait): Add `options' argument. Print child exit
7495 (start_non_stop): New.
7496 * server.c (non_stop, own_buf, mem_buf): New globals.
7497 (struct vstop_notif): New.
7498 (notif_queue): New global.
7499 (queue_stop_reply, push_event, discard_queued_stop_replies)
7500 (send_next_stop_reply): New.
7501 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7503 (attach_inferior): In non-stop mode, don't wait for the target
7505 (handle_general_set): Handle QNonStop.
7506 (handle_query): When handling qC, return the current general
7507 thread, instead of the first thread of the list.
7508 (handle_query): If the backend supports non-stop mode, include
7509 QNonStop+ in the qSupported query response.
7510 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7512 (handle_v_attach, handle_v_run): Handle non-stop mode.
7513 (handle_v_stopped): New.
7514 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7515 (myresume): Adjust to use resume_kind. Handle non-stop.
7516 (queue_stop_reply_callback): New.
7517 (handle_status): Handle non-stop mode.
7518 (main): Clear non_stop flag on reconnection. Use the event-loop.
7519 Refactor serial protocol handling from here ...
7520 (process_serial_event): ... to this new function. When GDB
7521 selects any thread, select one here. In non-stop mode, wait until
7522 GDB acks all pending events before exiting.
7523 (handle_serial_event, handle_target_event): New.
7524 * remote-utils.c (remote_open): Install remote_desc in the event
7526 (remote_close): Remove remote_desc from the event loop.
7527 (putpkt_binary): Rename to...
7528 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7529 (putpkt_binary): New as wrapper around putpkt_binary_1.
7530 (putpkt_notif): New.
7531 (prepare_resume_reply): In non-stop mode, don't change the
7533 * event-loop.c: New.
7534 * Makefile.in (OBJ): Add event-loop.o.
7535 (event-loop.o): New rule.
7537 * linux-low.h (pid_of): Moved here.
7539 (get_lwp_thread): Use lwpid_of.
7540 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7541 * linux-low.c (pid_of): Delete.
7542 (inferior_pid): Use lwpid_of.
7543 (linux_event_pipe): New.
7544 (target_is_async_p): New.
7546 (handle_extended_wait): Use lwpid_of.
7547 (add_lwp): Don't set lwpid field.
7548 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7549 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7550 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7551 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7552 first. Adjust to linux_wait_for_event interface changes. Use
7554 (linux_detach): Don't delete the main lwp here.
7555 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7556 (status_pending_p): Don't consider explicitly suspended lwps.
7557 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7558 pointer. Add OPTIONS argument. Change return type to int. Use
7559 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7560 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7561 pointer. Add status pointer argument. Return a pid instead of a
7562 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7563 changes. In non-stop mode, don't switch to a random thread.
7564 (linux_wait): Rename to...
7565 (linux_wait_1): ... this. Add target_options argument, and handle
7566 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7567 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7568 clean exit and signal exit code. Don't stop all threads in
7569 non-stop mode. In all-stop mode, only stop all threads when
7570 reporting a stop to GDB. Handle explicit thread stop requests.
7571 (async_file_flush, async_file_mark): New.
7573 (send_sigstop): Use lwpid_of.
7574 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7575 interface changes. In non-stop mode, don't switch to a random
7577 (linux_resume_one_lwp): Use lwpid_of.
7578 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7579 (linux_resume_one_thread): ... this. Handle resume_stop. In
7580 non-stop mode, don't look for pending flag in all threads.
7581 (resume_status_pending_p): Don't consider explicitly suspended
7583 (my_waitpid): Reimplement. Emulate __WALL.
7584 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7586 (sigchld_handler, linux_supports_non_stop, linux_async)
7587 (linux_start_non_stop): New.
7588 (linux_target_ops): Register linux_supports_non_stop, linux_async
7589 and linux_start_non_stop.
7590 (initialize_low): Install SIGCHLD handler.
7591 * thread-db.c (thread_db_create_event, find_one_thread)
7592 (thread_db_get_tls_address): Use lwpid_of.
7593 * win32-low.c (win32_detach): Adjust to use resume_kind.
7594 (win32_wait): Add `options' argument.
7595 * spu-low.c (spu_resume): Adjust to use resume_kind.
7596 (spu_wait): Add `options' argument.
7598 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7600 Decouple target code from remote protocol.
7602 * target.h (enum target_waitkind): New.
7603 (struct target_waitstatus): New.
7604 (struct target_ops) <wait>: Return an unsigned long. Take a
7605 target_waitstatus pointer instead of a char pointer.
7607 * target.c (mywait): Change prototype to return an unsigned long.
7608 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7609 * server.h (thread_from_wait, old_thread_from_wait): Delete
7611 (prepare_resume_reply): Change prototype to take a
7613 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7614 (last_status, last_ptid): New.
7615 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7616 pid instead of a signal.
7617 (attach_inferior): Remove "status" and "signal" parameters.
7619 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7621 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7622 (handle_v_requests, myresume): Remove "status" and "signal"
7624 (handle_status): New.
7625 (main): Delete local `status'. Adjust.
7626 * remote-utils.c: Include target.h.
7627 (prepare_resume_reply): Change prototype to take a
7628 target_waitstatus. Adjust.
7630 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7632 * spu-low.c (spu_wait): Adjust.
7633 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7635 (win32_wait): Adjust.
7637 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7639 * target.h (struct thread_resume): Delete leave_stopped member.
7640 (struct target_ops): Add a `n' argument to the `resume' callback.
7641 * server.c (start_inferior): Adjust.
7642 (handle_v_cont, myresume): Adjust.
7643 * linux-low.c (check_removed_breakpoint): Adjust to resume
7644 interface change, and to removed leave_stopped field.
7645 (resume_ptr): Delete.
7646 (struct thread_resume_array): New.
7647 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7648 resume interface change.
7649 (linux_continue_one_thread, linux_queue_one_thread)
7650 (resume_status_pending_p): Check if the resume field is NULL
7651 instead of checking the leave_stopped member.
7652 (linux_resume): Adjust to the target resume interface change.
7653 * spu-low.c (spu_resume): Adjust to the target resume interface
7655 * win32-low.c (win32_detach, win32_resume): Ditto.
7657 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7659 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7661 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7663 (linux_continue_one_thread): Only preserve the stepping flag if
7664 there's a pending breakpoint.
7666 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7668 * server.c (main): After the inferior having exited, call
7669 remote_close before exiting gdbserver.
7671 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7673 Fix size of FPSCR in Power 7 processors.
7674 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7675 (PPC_FEATURE_HAS_DFP): New #define.
7676 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7679 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7681 * server.c (handle_query) Whitespace and formatting.
7683 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7685 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7686 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7687 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7688 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7689 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7690 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7691 Makefile.in, configure.ac: Fix whitespace throughout.
7692 * configure: Regenerate.
7694 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7696 * inferiors.c (find_inferior): Make it safe for the callback
7697 function to delete the currently iterated inferior.
7699 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7701 * Makefile.in (linuw_low_h): Move higher.
7702 (thread-db.o): Depend on $(linux_low_h).
7704 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7706 Rename "process" to "lwp" throughout.
7708 * linux-low.c (all_processes): Rename to...
7709 (all_lwps): ... this.
7710 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7711 (add_process): Rename to ...
7712 (add_lwp): ... this. Adjust.
7713 (linux_create_inferior): Adjust.
7714 (linux_attach_lwp): Adjust.
7715 (linux_attach): Adjust.
7716 (linux_kill_one_process): Rename to ...
7717 (linux_kill_one_lwp): ... this. Adjust.
7718 (linux_kill): Adjust.
7719 (linux_detach_one_process): Rename to ...
7720 (linux_detach_one_lwp): ... this. Adjust.
7721 (linux_detach): Adjust.
7722 (check_removed_breakpoint): Adjust.
7723 (status_pending_p): Adjust.
7724 (linux_wait_for_process): Rename to ...
7725 (linux_wait_for_lwp): ... this. Adjust.
7726 (linux_wait_for_event): Adjust.
7727 (send_sigstop): Adjust.
7728 (wait_for_sigstop): Adjust.
7729 (stop_all_processes): Rename to ...
7730 (stop_all_lwps): ... this.
7731 (linux_resume_one_process): Rename to ...
7732 (linux_resume_one_lwp): ... this. Adjust.
7733 (linux_set_resume_request, linux_continue_one_thread)
7734 (linux_queue_one_thread, resume_status_pending_p)
7735 (usr_store_inferior_registers, regsets_store_inferior_registers)
7736 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7738 * linux-low.h (get_process): Rename to ...
7739 (get_lwp): ... this. Adjust.
7740 (get_thread_process): Rename to ...
7741 (get_thread_lwp): ... this. Adjust.
7742 (get_process_thread): Rename to ...
7743 (get_lwp_thread): ... this. Adjust.
7744 (struct process_info): Rename to ...
7745 (struct lwp_info): ... this.
7746 (all_processes): Rename to ...
7747 (all_lwps): ... this.
7748 * proc-service.c (ps_lgetregs): Adjust.
7749 * thread-db.c (thread_db_create_event, find_one_thread)
7750 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7752 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7754 * server.c (handle_query): Handle "qAttached".
7756 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7758 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7759 GPLv3, update license URL.
7761 2009-03-01 Doug Evans <dje@google.com>
7763 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7764 (server_h): Add gdb_signals.h.
7765 (signals.o): Update.
7766 * server.h (target_signal_from_host,target_signal_to_host_p)
7767 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7769 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7771 * remote-utils.c (getpkt): Also generate remote-debug
7772 information if noack_mode is set.
7774 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7776 * server.c (handle_query): Report qXfer:siginfo:read and
7777 qXfer:siginfo:write as supported and handle them.
7778 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7779 * linux-low.c (linux_xfer_siginfo): New.
7780 (linux_target_ops): Set it.
7782 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7784 * server.c (gdbserver_usage): Mention --remote-debug.
7785 (main): Accept '--remote-debug' switch.
7787 2009-01-18 Doug Evans <dje@google.com>
7789 * regcache.c (new_register_cache): No need to check result of xcalloc.
7790 * server.c (handle_search_memory): Back out calls to xmalloc,
7791 result is checked and error is returned to user upon failure.
7792 (handle_query): Ditto. Add more checks for result of malloc.
7793 (handle_v_cont): Check result of malloc, report error back to
7795 (handle_v_run): Ditto. Call freeargv.
7796 * server.h (freeargv): Declare.
7797 * utils.c (freeargv): New fn.
7799 2009-01-15 Doug Evans <dje@google.com>
7801 * gdbreplay.c (perror_with_name): Make arg const char *.
7802 * server.h (target_signal_to_name): Make return type const char *.
7803 * thread-db.c (thread_db_err_str): Make return type const char *.
7804 * utils.c (perror_with_name): Make arg const char *.
7806 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7808 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7809 when handling a EXIT_PROCESS_DEBUG_EVENT.
7811 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7813 * gdbreplay.c (gdbreplay_version): Update copyright year.
7814 * server.c (gdbserver_version): Likewise.
7816 2009-01-05 Doug Evans <dje@google.com>
7818 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7819 (handle_extended_wait): Improve comment.
7821 2008-12-13 Doug Evans <dje@google.com>
7823 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7824 * server.h (ATTR_MALLOC): New macro.
7825 (xmalloc,xcalloc,xstrdup): Declare.
7826 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7827 * inferiors.c: Ditto.
7828 * linux-low.c: Ditto.
7829 * mem-break.c: Ditto.
7830 * regcache.c: Ditto.
7831 * remote-utils.c: Ditto.
7834 * win32-low.c: Ditto.
7836 2008-12-12 Doug Evans <dje@google.com>
7838 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7839 in debugging printf.
7841 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7843 2008-12-09 Doug Evans <dje@google.com>
7845 * linux-low.h (struct process_info): Delete member tid, unused.
7846 * thread-db.c (find_one_thread): Update.
7847 (maybe_attach_thread): Update.
7849 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7851 * target.h (struct target_ops): Add qxfer_osdata member.
7852 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7854 (linux_qxfer_osdata): New functions.
7855 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7857 * server.c (handle_query): Handle "qXfer:osdata:read:".
7858 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7859 (buffer_xml_printf): New functions.
7860 * server.h (struct buffer): New.
7861 (buffer_grow_str, buffer_grow_str0): New macros.
7862 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7863 (buffer_xml_printf): Declare.
7865 2008-11-24 Doug Evans <dje@google.com>
7867 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7869 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7871 * server.c (handle_v_run): Always use the supplied argument list.
7873 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7875 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7876 (xtensa_regmap_table): Add entry for scompare1.
7878 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7880 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7881 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7882 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7883 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7884 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7885 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7886 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7887 XML target descriptions.
7888 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7889 when inferior is running on an ISA 2.05 or later processor. Add
7890 special case to return offset for full 64-bit slot of FPSCR when
7893 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7895 * Makefile.in (SFILES, clean): Added sparc64 files.
7896 (reg-sparc64.o, reg-sparc64.c): New.
7897 * configure.srv (sparc*-*-linux*): New configuration.
7898 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7899 syscall arguments for SPARC.
7900 (regsets_store_inferior_registers): Likewise.
7901 * linux-sparc-low.c: New file.
7903 2008-10-21 Doug Evans <dje@google.com>
7905 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7906 (READLINE_DIR,READLINE_DEP): Delete.
7907 (INTERNAL_CFLAGS): Update.
7908 (LINTFLAGS): Update.
7910 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7912 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7913 whole argv from the last run, not just argv[0].
7915 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7917 * regcache.c (new_register_cache): Return NULL if the register
7918 cache size isn't known yet.
7919 (free_register_cache): Avoid dereferencing a NULL regcache.
7921 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7923 * configure.srv: Merge MIPS and MIPS64.
7925 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7927 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7929 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7931 * Makefile.in: Add required vsx dependencies.
7933 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7934 Declare init_registers_powerpc_vsx32l.
7935 Declare init_registers_powerpc_vsx64l.
7936 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7937 (ppc_arch_setup): Check for VSX in hwcap.
7938 (ppc_fill_vsxregset): New function.
7939 (ppc_store_vsxregset): New function.
7940 Add new VSX entry in regset_info target_regsets.
7942 * configure.srv: Add new VSX dependencies.
7944 2008-08-12 Pedro Alves <pedro@codesourcery.com>
7946 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7947 (remote_open): Set or clear transport_is_reliable.
7948 (putpkt_binary): Don't expect acks in noack mode.
7949 (getpkt): Don't send ack/nac in noack mode.
7950 * server.c (handle_general_set): Handle QStartNoAckMode.
7951 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7953 (main): Reset noack_mode on every connection.
7954 * server.h (noack_mode): Declare.
7956 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7958 * Makefile.in (GDBREPLAY_OBS): New variable.
7959 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7961 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7962 Daniel Jacobowitz <dan@codesourcery.com>
7964 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7965 (usr_store_inferior_registers): Likewise.
7966 (regsets_store_inferior_registers): Likewise.
7968 2008-07-31 Rolf Jansen <rj@surtec.com>
7969 Pedro Alves <pedro@codesourcery.com>
7971 * configure.ac: Check for memmem declaration.
7972 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7973 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7974 (disable_packet_qfThreadInfo): Unconditionally compile.
7975 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7976 * configure, config.in: Regenerate.
7978 2008-07-28 Doug Kwan <dougkwan@google.com>
7980 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7981 (linux_write_memory): Remove declaration of errno.
7983 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7985 * linux-low.c (handle_extended_wait): Do not use "status"
7986 variable uninitialized.
7988 2008-07-07 Pedro Alves <pedro@codesourcery.com>
7990 * server.c (handle_v_attach): Inhibit reporting dll changes.
7992 2008-06-27 Pedro Alves <pedro@codesourcery.com>
7994 * remote-utils.c (prepare_resume_reply): If requested, don't
7995 output "thread:TID" in the T stop reply.
7997 * server.c (disable_packet_vCont, disable_packet_Tthread)
7998 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7999 (handle_query): If requested, disable support for qC, qfThreadInfo
8001 (handle_v_requests): If requested, disable support for vCont.
8002 (gdbserver_show_disableable): New.
8003 (main): Handle --disable-packet and --disable-packet=LIST.
8005 * server.h (disable_packet_vCont, disable_packet_Tthread)
8006 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8008 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8010 * server.c (gdbserver_usage): Mention --version.
8012 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8014 * Makefile.in (gdbreplay.o): New rule.
8016 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8018 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8019 message, not gdbserver.
8021 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8022 Nathan Sidwell <nathan@codesourcery.com>
8023 Joseph Myers <joseph@codesourcery.com>
8025 * acinclude.m4: Include ../../config/acx.m4.
8026 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8027 * configure, config.in: Regenerate.
8028 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8029 * server.c (gdbserver_version): Print PKGVERSION.
8030 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8031 (main): Adjust gdbserver_usage calls.
8032 * gdbreplay.c (version, host_name): Add declarations.
8033 (gdbreplay_version, gdbreplay_usage): New.
8034 (main): Accept --version and --help options.
8036 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8038 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8039 (arm_breakpoint_at): Handle Thumb.
8040 (the_low_target): Add comment.
8042 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8044 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8046 2008-05-09 Doug Evans <dje@google.com>
8048 * server.h (decode_search_memory_packet): Declare.
8049 * remote-utils.c (decode_search_memory_packet): New fn.
8050 * server.c (handle_search_memory_1): New fn.
8051 (handle_search_memory): New fn.
8052 (handle_query): Process qSearch:memory packets.
8054 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8056 * regcache.c (registers_length): Remove.
8057 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8058 full register packet.
8059 * regcache.h (registers_length): Remove prototype.
8060 * server.h (PBUFSIZ): Define to 16384.
8062 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8064 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8065 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8066 powerpc-64l.o, and powerpc-altivec64l.o.
8067 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8068 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8069 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8070 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8071 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8074 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8075 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8076 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8077 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8078 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8079 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8080 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8081 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8082 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8083 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8086 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8087 (init_registers_powerpc_32l): ... this new prototype.
8088 (init_registers_powerpc_32): Remove, replace by ...
8089 (init_registers_powerpc_altivec32l): ... this new prototype.
8090 (init_registers_powerpc_e500): Remove, replace by ...
8091 (init_registers_powerpc_e500l): ... this new prototype.
8092 (init_registers_ppc64): Remove, replace by ...
8093 (init_registers_powerpc_64l): ... this new prototype.
8094 (init_registers_powerpc_64): Remove, replace by ...
8095 (init_registers_powerpc_altivec64l): ... this new prototype.
8096 (ppc_num_regs): Set to 73.
8097 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8098 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8099 (ppc_cannot_store_register): Handle orig_r3 and trap.
8100 (ppc_arch_setup): Update init_registers_... calls.
8101 (ppc_fill_gregset): Handle orig_r3 and trap.
8103 * inferiors.c (clear_inferiors): Reset current_inferior.
8105 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8107 * acinclude.m4: Add override.m4.
8108 * configure: Regenerate.
8110 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8112 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8113 initial call to init_register_ppc64.
8115 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8117 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8118 single powerpc*-*-linux* case.
8119 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8121 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8123 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8124 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8126 * linux-ppc-low.c: Include <elf.h>.
8127 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8128 (ppc_hwcap): New global variable.
8129 (ppc_regmap): Remove __SPE__ #ifdef sections.
8130 (ppc_regmap_e500): New global variable.
8131 (ppc_cannot_store_register): Update __SPE__ special case.
8132 (ppc_get_hwcap): New function.
8133 (ppc_arch_setup): Use it to determine whether inferior supports
8134 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8135 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8136 Do not access registers if target does not support AltiVec.
8137 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8138 Do not access registers if target does not support SPE.
8139 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8141 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8143 * linux-low.c (disabled_regsets, num_regsets): New.
8144 (use_regsets_p): Delete.
8145 (linux_wait_for_process): Clear disabled_regsets.
8146 (regsets_fetch_inferior_registers): Check and set it.
8147 (regsets_store_inferior_registers): Likewise.
8148 (linux_fetch_registers, linux_store_registers): Do not use
8150 (initialize_low): Allocate disabled_regsets.
8152 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8154 * Makefile.in (LIBOBJS): New.
8156 (memmem.o): New rule.
8157 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8158 * configure: Regenerated.
8160 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8162 * server.c (handle_query): Never return "unsupported" for
8163 qXfer:features:read queries.
8165 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8167 * server.c (get_features_xml): Fix inverted condition.
8168 (handle_query): Always support qXfer:feature:read.
8170 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8172 * server.c (wrapper_argv): New.
8173 (start_inferior): Handle wrapper_argv. If set, expect an extra
8175 (gdbserver_usage): Document --wrapper.
8176 (main): Parse --wrapper.
8178 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8180 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8181 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8182 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8183 (ppc_set_pc): Likewise.
8184 (ppc_arch_setup): New function.
8185 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8186 of collect_register.
8187 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8189 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8191 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8192 instead of linux-ppc64-low.o.
8193 * linux-ppc64-low.c: Remove file.
8194 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8195 (linux-ppc64-low.o): Remove rule.
8197 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8198 (init_registers_powerpc_64): Likewise.
8199 (ppc_regmap): Conditionally define depending on __powerpc64__.
8200 (ppc_cannot_store_register): Do not special-case "fpscr" when
8201 compiled on __powerpc64__.
8202 (ppc_collect_ptrace_register): New function.
8203 (ppc_supply_ptrace_register): New function.
8204 (ppc_breakpoint): Change type to "unsigned int".
8205 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8206 (the_low_target): Conditionally provide initializers for the
8207 arch_setup member depending on __powerpc64__. Install
8208 collect_ptrace_register and supply_ptrace_register members.
8210 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8212 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8213 * server.c (gdbserver_xmltarget): Define.
8214 (get_features_xml): Use it to replace "target.xml" and arch_string.
8216 * configure.srv: Remove srv_xmltarget. Add XML files that were
8217 mentioned there to srv_xmlfiles instead. Remove conditional tests
8218 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8219 srv_xmlfiles and srv_regobj to include all possible choices.
8220 * configure.ac (srv_xmltarget): Remove.
8221 (srv_xmlfiles): Do not add "target.xml".
8222 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8223 checks for supplementary target information.
8224 * configure: Regenerate.
8225 * Makefile.in (XML_TARGET): Remove.
8226 (target.xml): Remove rule.
8227 (clean): Do not clean up target.xml.
8228 (.PRECIOUS): Do not mention target.xml.
8230 * target.h (struct target_ops): Remove arch_string member.
8231 * linux-low.c (linux_arch_string): Remove.
8232 (linux_target_ops): Remove arch_string initializer.
8233 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8234 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8235 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8236 * spu-low.c (spu_arch_string): Remove.
8237 (spu_target_ops): Remove arch_string initializer.
8238 * win32-low.c (win32_arch_string): Remove.
8239 (win32_target_ops): Remove arch_string initializer.
8240 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8241 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8242 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8244 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8246 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8247 by collect_ptrace_register and supply_ptrace_register hooks.
8248 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8249 instead of checking for the_low_target.left_pad_xfer.
8250 (usr_store_inferior_registers): Use collect_ptrace_register callback
8251 instead of checking for the_low_target.left_pad_xfer.
8253 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8254 (s390_supply_ptrace_register): Likewise.
8255 (s390_fill_gregset): Call s390_collect_ptrace_register.
8256 (the_low_target): Update.
8258 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8259 (ppc_supply_ptrace_register): Likewise.
8260 (the_low_target): Update.
8262 * linux-i386-low.c (the_low_target): Update.
8263 * linux-x86-64-low.c (the_low_target): Update.
8265 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8267 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8268 reg-s390.o and reg-s390x.o.
8270 * linux-low.c (new_inferior): New global variable.
8271 (linux_create_inferior, linux_attach): Set it.
8272 (linux_wait_for_process): Call the_low_target.arch_setup after the
8273 target has stopped for the first time.
8274 (initialize_low): Do not call the_low_target.arch_setup.
8276 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8277 (s390_set_pc): Likewise.
8278 (s390_arch_setup): New function.
8279 (the_low_target): Use s390_arch_setup as arch_setup routine.
8281 * regcache.c (realloc_register_cache): New function.
8282 (set_register_cache): Call it for each existing regcache.
8284 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8286 * server.h (init_registers): Remove prototype.
8288 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8289 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8290 instead of init_registers ().
8291 * linux-arm-low.c (init_registers_arm): Add prototype.
8292 (init_registers_arm_with_iwmmxt): Likewise.
8293 (the_low_target): Add initializer for arch_setup field.
8294 * linux-cris-low.c (init_registers_cris): Add prototype.
8295 (the_low_target): Add initializer for arch_setup field.
8296 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8297 (the_low_target): Add initializer for arch_setup field.
8298 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8299 (the_low_target): Add initializer for arch_setup field.
8300 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8301 (the_low_target): Add initializer for arch_setup field.
8302 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8303 (the_low_target): Add initializer for arch_setup field.
8304 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8305 (the_low_target): Add initializer for arch_setup field.
8306 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8307 (init_registers_mips64_linux): Likewise.
8308 (the_low_target): Add initializer for arch_setup field.
8309 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8310 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8311 (the_low_target): Add initializer for arch_setup field.
8312 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8313 (init_registers_powerpc_64): Likewise.
8314 (the_low_target): Add initializer for arch_setup field.
8315 * linux-s390-low.c (init_registers_s390): Add prototype.
8316 (init_registers_s390x): Likewise.
8317 (the_low_target): Add initializer for arch_setup field.
8318 * linux-sh-low.c (init_registers_sh): Add prototype.
8319 (the_low_target): Add initializer for arch_setup field.
8320 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8321 (the_low_target): Add initializer for arch_setup field.
8322 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8323 (the_low_target): Add initializer for arch_setup field.
8325 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8326 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8327 instead of init_registers ().
8328 * win32-arm-low.c (init_registers_arm): Add prototype.
8329 (the_low_target): Add initializer for arch_setup field.
8330 * win32-i386-low.c (init_registers_i386): Add prototype.
8331 (the_low_target): Add initializer for arch_setup field.
8333 * spu-low.c (init_registers_spu): Add prototype.
8334 (initialize_low): Call initialie_registers_spu () instead of
8335 initialize_registers ().
8337 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8339 * server.c (handle_v_requests): When handling the vRun and vAttach
8340 packets, if already debugging a process, don't kill it. Return an
8343 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8345 * server.c (handle_query): Correct length check.
8347 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8349 * win32-low.c (do_initial_child_stuff): Add process handle
8350 parameter. Set current_process_handle and current_process_id from the
8351 parameters. Clear globals.
8352 (win32_create_inferior): Don't set current_process_handle and
8353 current_process_id here. Instead pass them on the call to
8354 do_initial_child_stuff.
8355 (win32_attach): Likewise.
8356 (win32_clear_inferiors): New.
8357 (win32_kill): Don't close the current process handle or the
8358 current thread handle here. Instead call win32_clear_inferiors.
8359 (win32_detach): Don't open a new handle to the process. Call
8360 win32_clear_inferiors.
8361 (win32_join): Don't rely on current_process_handle; open a new
8362 handle using the process id.
8363 (win32_wait): Call win32_clear_inferiors when the inferior process
8366 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8368 * server.c (monitor_show_help): Add "exit".
8370 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8372 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8373 (clean): Add reg-xtensa.c.
8374 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8375 * configure.srv (xtensa*-*-linux*) New target.
8376 * linux-xtensa-low.c: New.
8377 * xtensa-xtregs.c: New.
8379 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8381 * hostio.c: Don't include errno.h.
8382 (errno_to_fileio_errno): Move to hostio-errno.
8383 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8384 error number outputting to the target->hostio_last_error callback.
8385 (hostio_packet_error): Use FILEIO_EINVAL directly.
8386 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8387 calls to hostio_error.
8388 * hostio-errno.c: New.
8389 * server.h (hostio_last_error_from_errno): Declare.
8390 * target.h (target_ops): Add hostio_last_error member.
8391 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8392 as hostio_last_error handler.
8393 * spu-low.c (spu_target_ops): Likewise.
8394 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8395 (wince_hostio_last_error): New functions.
8396 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8397 as hostio_last_error handler.
8398 (win32_target_ops) [!_WIN32_WCE]: Register
8399 hostio_last_error_from_errno as hostio_last_error handler.
8400 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8401 (hostio-errno.o): New rule.
8402 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8403 * configure.srv (srv_hostio_err_objs): New variable. Default to
8405 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8406 * configure: Regenerate.
8408 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8410 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8411 (linux_kill, linux_detach): Clean up the process list.
8412 * remote-utils.c (remote_open): Improve port number parsing.
8413 (putpkt_binary, input_interrupt): Only send interrupts if the target
8415 * server.c (extended_protocol): Make static.
8416 (attached): Define earlier.
8417 (exit_requested, response_needed, program_argv): New variables.
8418 (target_running): New.
8419 (start_inferior): Clear attached here.
8420 (attach_inferior): Set attached here.
8421 (require_running): Define.
8422 (handle_query): Use require_running and target_running. Implement
8424 (handle_v_attach, handle_v_run): New.
8425 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8426 (gdbserver_usage): Update.
8427 (main): Redo argument parsing. Handle --debug and --multi. Handle
8428 --attach along with other options or after the port. Save
8429 program_argv. Support no initial program. Resynchronize
8430 communication with GDB after an error. Handle "monitor exit".
8431 Use require_running and target_running. Always allow the extended
8432 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8433 restart in extended mode.
8434 * README: Refer to the GDB manual. Update --attach usage.
8436 2007-12-20 Andreas Schwab <schwab@suse.de>
8438 * linux-low.c (STACK_SIZE): Define.
8439 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8440 (linux_test_for_tracefork): Likewise.
8442 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8444 * linux-low.c (linux_wait_for_event): Update messages. Do not
8445 reinsert auto-delete breakpoints.
8446 * mem-break.c (struct breakpoint): Change return type of handler to
8448 (set_breakpoint_at): Update handler type.
8449 (reinsert_breakpoint_handler): Return 1 instead of calling
8451 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8453 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8454 * mem-break.h (set_breakpoint_at): Update handler type.
8455 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8456 * win32-low.c (auto_delete_breakpoint): New.
8457 (get_child_debug_event): Use it.
8459 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8461 * configure.ac: Check for pread and pwrite.
8462 * hostio.c (handle_pread): Fall back to lseek and read.
8463 (handle_pwrite): Fall back to lseek and write.
8464 * config.in, configure: Regenerated.
8466 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8468 * server.c (myresume): Add own_buf argument.
8469 (main): Update calls.
8471 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8473 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8474 * remote-utils.c (remote_open): Do not call disable_async_io.
8475 (block_async_io): Delete.
8476 (unblock_async_io): Make static.
8477 (initialize_async_io): New.
8478 * server.c (handle_v_cont): Handle async I/O here.
8479 (myresume): Likewise. Move other common resume tasks here...
8480 (main): ... from here. Call initialize_async_io. Disable async
8481 I/O before the main loop.
8482 * server.h (initialize_async_io): Declare.
8483 (block_async_io, unblock_async_io): Delete prototypes.
8484 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8486 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8488 * remote-utils.c (readchar): Allow binary data in received messages.
8490 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8492 * win32-low.c (attaching): New global.
8493 (win32_create_inferior): Clear the `attaching' global.
8494 (win32_attach): Set the `attaching' global.
8495 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8496 attaching. Only set a breakpoint at the entry point if not
8499 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8501 * server.c (main): Don't report dll events on the initial
8502 connection on attaches.
8504 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8506 * server.c (main): Relax numerical bases supported for the pid of
8507 the --attach command line argument.
8509 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8511 * win32-low.c (win32_attach): Call OpenProcess before
8512 DebugActiveProcess, not after. Add last error output to error
8515 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8517 * win32-low.c (win32_get_thread_context)
8518 (win32_set_thread_context): New functions.
8519 (thread_rec): Use win32_get_thread_context.
8520 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8521 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8524 2007-12-03 Leo Zayas
8525 Pedro Alves <pedro_alves@portugalmail.pt>
8527 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8529 (child_add_thread): Minor cleanup.
8530 (child_continue): Resume artificially suspended threads before
8531 calling ContinueDebugEvent.
8532 (suspend_one_thread): New.
8533 (fake_breakpoint_event): New.
8534 (get_child_debug_event): Change return type to int. Check here if
8535 gdb sent an interrupt request. If a soft interrupt was requested,
8536 fake a breakpoint event. Return 0 if there is no event to handle,
8538 (win32_wait): Don't check here if gdb sent an interrupt request.
8539 Ensure there is a valid event to handle.
8540 (win32_request_interrupt): Add soft interruption method as last
8543 2007-12-03 Leo Zayas
8544 Pedro Alves <pedro_alves@portugalmail.pt>
8546 * win32-low.h (win32_thread_info): Add descriptions to the
8547 structure members. Replace `suspend_count' counter by a
8549 * win32-low.c (thread_rec): Update condition of when to get the
8550 context from the inferior. Rely on ContextFlags being set if it
8551 has already been retrieved. Only suspend the inferior thread if
8552 we haven't already. Warn if that fails.
8553 (continue_one_thread): s/suspend_count/suspended/. Only call
8554 ResumeThread once. Warn if that fails.
8556 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8558 * win32-low.c (win32_wait): Don't read from the inferior when it
8561 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8563 * Makefile.in (win32_low_h): New variable.
8564 (win32-low.o): Add dependency on $(win32_low_h).
8565 (win32-arm-low.o, win32-i386-low.o): New rules.
8567 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8569 * hostio.c: Correct copyright year.
8571 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8573 * Makefile.in (OBS): Add hostio.o.
8574 (hostio.o): New rule.
8575 * server.h (handle_vFile): Declare.
8576 * hostio.c: New file.
8577 * server.c (handle_v_requests): Take packet_len and new_packet_len
8578 for binary packets. Call handle_vFile.
8579 (main): Update call to handle_v_requests.
8581 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8583 * linux-low.c: Include <sched.h>.
8585 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8587 * linux-low.c (linux_tracefork_grandchild): New.
8588 (linux_tracefork_child): Use clone.
8589 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8591 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8593 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8595 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8597 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8599 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8601 * inferiors.c (change_inferior_id): Delete.
8602 (add_pid_to_list, pull_pid_from_list): New.
8603 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8604 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8605 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8606 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8607 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8608 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8609 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8610 (using_threads): Always set to 1.
8611 (handle_extended_wait): New.
8612 (add_process): Do not set TID.
8613 (linux_create_inferior): Set must_set_ptrace_flags.
8614 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8615 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8616 (linux_thread_alive): Rename TID argument to LWPID.
8617 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8618 (linux_wait_for_event): Do not use TID or check using_threads. Update
8619 call to dead_thread_notify. Call handle_extended_wait.
8620 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8621 (send_sigstop): Delete sigstop_sent.
8622 (wait_for_sigstop): Avoid TID.
8623 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8624 (linux_test_for_tracefork): New.
8625 (linux_lookup_signals): Use thread_db_active and
8626 linux_supports_tracefork_flag.
8627 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8628 * linux-low.h (get_process_thread): Avoid TID.
8629 (struct process_ifo): Move thread_known and tid to the end. Remove
8631 (linux_attach_lwp, thread_db_init): Update prototypes.
8632 * server.h (change_inferior_id): Delete prototype.
8633 (add_pid_to_list, pull_pid_from_list): New prototypes.
8634 * thread-db.c (thread_db_use_events): New.
8635 (find_first_thread): Rename to...
8636 (find_one_thread): ...this. Update callers and messages. Do not
8637 call fatal. Check thread_db_use_events. Do not call
8638 change_inferior_id or new_thread_notify.
8639 (maybe_attach_thread): Update. Do not call new_thread_notify.
8640 (thread_db_init): Set thread_db_use_events. Check use_events.
8641 * utils.c (fatal, warning): Correct message prefix.
8643 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8645 * Makefile.in (clean): Remove new files.
8646 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8647 (powerpc-64.o, powerpc-64.c): New rules.
8648 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8649 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8651 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8653 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8654 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8655 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8656 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8657 (target_regsets): Add AltiVec and SPE register sets.
8658 * configure.ac: Check for AltiVec and SPE.
8659 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8660 (ppc_fill_vrregset, ppc_store_vrregset): New.
8661 (target_regsets): Add AltiVec register set.
8662 * configure: Regenerated.
8664 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8666 * linux-low.c (O_LARGEFILE): Define.
8667 (linux_read_memory): Use /proc/PID/mem.
8668 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8669 * configure, config.in: Regenerated.
8671 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8673 * linux-low.c (linux_wait_for_event): Do not pass signals while
8676 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8678 * win32-low.c (create_process): New.
8679 (win32_create_inferior): Use create_process instead of
8680 CreateProcess. If create_process failed retry appending an ".exe"
8681 suffix. Store the GetLastError result immediatelly after
8682 create_process calls and use it on the call to error.
8684 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8686 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8688 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8690 * configure.ac: Switch license to GPLv3.
8692 2007-08-01 Michael Snyder <msnyder@access-company.com>
8694 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8696 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8698 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8700 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8701 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8702 CloseToolhelp32Snapshot.
8703 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8704 CloseToolhelp32Snapshot.
8706 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8708 * server.c (main): Check for inferior exit before main loop.
8710 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8712 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8713 instead of on tmp_desc.
8715 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8716 Daniel Jacobowitz <dan@codesourcery.com>
8718 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8719 (add_thread): Minor cleanups.
8720 (clear_inferiors): Move lower in the file. Clear the DLL
8722 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8723 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8724 (xml_escape_text): New.
8725 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8727 (handle_v_cont): Report errors.
8728 (gdbserver_version): Update.
8729 (main): Correct size of own_buf. Do not report initial DLL events.
8730 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8731 (unloaded_dll, xml_escape_text): New.
8732 * win32-low.c (enum target_waitkind): Update comments.
8733 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8734 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8735 (win32_EnumProcessModules, win32_GetModuleInformation)
8736 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8737 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8738 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8739 (win32_Module32First, win32_Module32Next, load_toolhelp)
8740 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8741 (get_child_debug_event): Handle DLL events.
8742 (win32_wait): Likewise.
8744 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8746 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8747 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8749 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8751 * win32-low.c (handle_output_debug_string): Ignore event if not
8754 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8756 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8758 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8760 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8762 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8764 * inferiors.c (change_inferior_id): Add comment.
8765 * linux-low.c (check_removed_breakpoint): Add an early
8766 prototype. Improve debug output.
8767 (linux_attach): Doc update.
8768 (linux_detach_one_process, linux_detach): Clean up before releasing
8770 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8771 * linux-low.h (struct process_info): Doc improvement.
8772 * mem-break.c (delete_all_breakpoints): New.
8773 * mem-break.h (delete_all_breakpoints): New prototype.
8774 * thread-db.c (find_first_thread): New.
8775 (thread_db_create_event): Call it instead of
8776 thread_db_find_new_threads. Clean up unused variables.
8777 (maybe_attach_thread): Remove first thread handling.
8778 (thread_db_find_new_threads): Use find_first_thread.
8779 (thread_db_get_tls_address): Likewise.
8781 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8783 * thread-db.c (thread_db_find_new_threads): Add prototype.
8784 (thread_db_create_event): Check for the main thread before adding
8786 (maybe_attach_thread): Only enable event reporting if TID == 0.
8787 (thread_db_get_tls_address): Check for new threads.
8789 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8791 * linux-low.c (linux_create_inferior): Try execv before execvp.
8792 * spu-low.c (spu_create_inferior): Likewise.
8794 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8796 * linux-low.c (linux_create_inferior): Change execv to execvp.
8797 * spu-low.c (spu_create_inferior): Likewies.
8799 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8801 * Makefile.in (clean): Clean new files instead of deleted ones.
8802 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8803 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8805 * configure.srv: Specify XML files and new regformats for MIPS and
8807 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8808 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8809 an entry for the restart register.
8810 (mips_cannot_fetch_register, mips_cannot_store_register)
8811 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8812 register names to match the XML descriptions.
8813 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8814 restart register instead of $0.
8816 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8817 Markus Deuling <deuling@de.ibm.com>
8819 * remote-utils.c (decode_xfer_write): New function.
8820 * server.h (decode_xfer_write): Add prototype.
8821 * server.c (handle_query): Add PACKET_LEN argument. Support
8822 qXfer:spu:read and qXfer:spu:write packets.
8823 (main): Pass packet_len to handle_query.
8824 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8825 * target.h (target_ops): Add qxfer_spu.
8827 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8829 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8830 accessing non-seekable spufs files.
8832 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8834 * server.c (handle_query): Add reply for qC packet.
8836 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8837 Leo Zayas <lerele@champenstudios@com>
8839 * server.h (check_remote_input_interrupt_request): New function.
8840 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8841 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8842 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8843 (check_remote_input_interrupt_request): New function.
8844 * server.h (check_remote_input_interrupt_request): Declare.
8845 * win32-low.c (winapi_DebugBreakProcess,
8846 winapi_GenerateConsoleCtrlEvent): New typedefs.
8847 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8849 (win32_wait): Check for remote interrupt request
8850 with check_remote_input_interrupt_request.
8851 (win32_request_interrupt): New function.
8852 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8854 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8856 * win32-low.c (debug_registers_changed,
8857 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8858 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8859 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8860 (thread_rec): Get context using the low target.
8861 (child_add_thread): Call thread_added on the low target,
8862 which does the same thing.
8864 (do_initial_child_stuff): Remove debug registers references.
8865 Set context using the low target. Resume threads after
8866 setting the contexts.
8867 (child_continue): Remove dead variable. Remove debug
8868 registers references.
8869 (child_fetch_inferior_registers): Go through the low target.
8870 (do_child_store_inferior_registers): Remove.
8871 (child_store_inferior_registers): Go through the low target.
8872 (win32_resume): Remove debug registers references.
8873 Set context using the low target.
8874 (handle_exception): Change return type to void. Don't record
8875 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8876 first chance exception.
8877 (get_child_debug_event): Change return type to void. Remove
8878 goto loop. Always return after waiting for debug event.
8879 (win32_wait): Convert to switch statement. Handle spurious
8882 * win32-i386-low.c (debug_registers_changed,
8883 debug_registers_used): New.
8884 (initial_stuff): Rename to ...
8885 (i386_initial_stuff): ... this. Clear debug registers
8887 (store_debug_registers): Delete.
8888 (i386_get_thread_context): New.
8889 (load_debug_registers): Delete.
8890 (i386_set_thread_context): New.
8891 (i386_thread_added): New.
8892 (single_step): Rename to ...
8893 (i386_single_step): ... this.
8894 (do_fetch_inferior_registers): Rename to ...
8895 (i386_fetch_inferior_register): ... this.
8896 (i386_store_inferior_register): New.
8897 (the_low_target): Adapt to new interface.
8899 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8900 (arm_get_thread_context): New.
8901 (arm_set_thread_context): New.
8903 (do_fetch_inferior_registers): Rename to ...
8904 (arm_fetch_inferior_register): ... this.
8905 (arm_store_inferior_register): New.
8906 (arm_wince_breakpoint): Reimplement as unsigned long.
8907 (arm_wince_breakpoint_len): Define.
8908 (the_low_target): Adapt to new interface.
8910 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8911 load_debug_registers. Add get_thread_context, set_thread_context,
8912 thread_added and store_inferior_register. Rename
8913 fetch_inferior_registers to fetch_inferior_register.
8914 (regptr): Remove declaration.
8916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8918 * linux-low.c (linux_detach): Change return type to int. Return 0.
8919 * spu-low.c (spu_detach): Likewise.
8921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8923 * target.h (target_ops): Change return type of detach to int.
8925 (join_inferior): New.
8926 * server.c (main): Don't skip detach support on mingw32.
8927 If the inferior doesn't support detaching return error.
8928 Call join_inferior instead of using waitpid.
8929 * linux-low.c (linux_join): New.
8930 (linux_target_op): Add linux_join.
8931 * spu-low.c (spu_join): New.
8932 (spu_target_ops): Add spu_join.
8933 * win32-low.c (win32_detach): Adapt to new interface.
8934 Reopen current_process_handle before detaching. Issue a child
8935 resume before detaching.
8937 (win32_target_op): Add win32_join.
8939 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8941 * win32-low.c (win32-attach): Fix return value.
8942 * target.h (target_ops): Describe ATTACH return values.
8944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8946 * win32-low.c (GETPROCADDRESS): Define.
8947 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8948 (winapi_DebugSetProcessKillOnExit): Likewise.
8949 (win32_create_inferior): Force usage of ansi CreateProcessA.
8950 (win32_attach): Use GETPROCADDRESS.
8951 (win32_detach): Likewise.
8953 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8955 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8957 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8959 * win32-low.c: Commit leftover changes from 2007-03-29.
8961 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8963 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8964 fields short instead of int. Add explicit padding.
8965 (i387_cache_to_fsave): Remove unnecessary casts.
8966 (i387_fsave_to_cache): Doc fix.
8967 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8969 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8971 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8972 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8974 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8976 * configure.srv (arm*-*-mingw32ce*): Move near the other
8979 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8981 * configure.ac: Add errno checking.
8982 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8983 sys/file.h and malloc.h.
8984 (AC_CHECK_DECLS): Add perror.
8985 (srv_mingwce): Handle.
8986 * configure.srv (i[34567]86-*-cygwin*): Add
8987 win32-i386-low.o to srv_tgtobj.
8988 (i[34567]86-*-mingw*): Likewise.
8989 (arm*-*-mingw32ce*): Add case.
8990 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8991 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8992 [__MINGW32CE__] (strerror): New function.
8993 [__MINGW32CE__] (errno): Define to GetLastError.
8994 [__MINGW32CE__] (COUNTOF): New macro.
8995 (remote_open): Remove extra close call.
8996 * mem-break.c (delete_breakpoint_at): New function.
8997 * mem-break.h (delete_breakpoint_at): Declare.
8998 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8999 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9000 [USE_WIN32API] (read, write): Add char* casts.
9001 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9002 * server.h: Include wincecompat.h on Windows CE.
9003 [HAVE_ERRNO_H]: Check.
9004 (perror): Declare if not declared.
9005 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9006 (perror_with_name): Remove errno declaration.
9007 * wincecompat.h: New.
9008 * wincecompat.c: New.
9010 * win32-arm-low.c: New.
9011 * win32-i386-low.c: New.
9012 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9013 (OUTMSG2): Make it safe.
9015 (COUNTOF): New macro.
9016 (NUM_REGS): Get it from the low target.
9017 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9018 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9019 (thread_rec): Let low target handle debug registers.
9020 (child_add_thread): Likewise.
9021 (child_init_thread_list): Likewise.
9022 (continue_one_thread): Likewise.
9024 (do_child_fetch_inferior_registers): Move to ...
9025 * win32-i386-low.c: ... here, and rename to ...
9026 (do_fetch_inferior_registers): ... this.
9027 * win32-low.c (child_fetch_inferior_registers):
9028 Go through the low target.
9029 (do_child_store_inferior_registers): Use regptr.
9030 (strwinerror): New function.
9031 (win32_create_inferior): Handle Windows CE.
9032 Use strwinerror instead of strerror on Windows error
9033 codes. Add program to the error output.
9034 Don't close the main thread handle on Windows CE.
9035 (win32_attach): Use coredll.dll on Windows CE.
9036 (win32_kill): Close current process and current
9038 (win32_detach): Use coredll.dll on Windows CE.
9039 (win32_resume): Let low target handle debug registers, and
9041 (handle_exception): Add/Remove initial breakpoint. Avoid
9042 non-existant WSTOPSIG on Windows CE.
9043 (win32_read_inferior_memory): Cast to remove warning.
9044 (win32_arch_string): Go through the low target.
9045 (initialize_low): Call set_breakpoint_data with the low
9046 target's breakpoint.
9047 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9048 FOP_REGNUM, mappings): Move to ...
9049 * win32-i386-low.c: ... here.
9050 * win32-low.c (win32_thread_info): Move to ...
9051 * win32-low.h: ... here.
9052 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9053 win32-arm-low.c and wincecompat.c.
9054 (all:): Add $EXEEXT.
9055 (install-only:): Likewise.
9056 (gdbserver:): Likewise.
9057 (gdbreplay:): Likewise.
9058 * config.in: Regenerate.
9059 * configure: Regenerate.
9061 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9063 * win32-low.c: Rename typedef thread_info to
9064 win32_thread_info throughout.
9066 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9068 * win32-i386-low.c: Rename to ...
9069 * win32-low.c: ... this.
9070 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9071 * Makefile.in: Likewise.
9073 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9075 * remote-utils.c (monitor_output): Constify msg parameter.
9076 * server.h (monitor_output): Likewise.
9077 * win32-i386-low.c (handle_output_debug_string): New.
9078 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9079 handle_output_debug_string.
9080 (get_child_debug_event): Likewise.
9082 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9084 * server.c (main): Correct strtoul check.
9086 2007-03-27 Jon Ringle <jon@ringle.org>
9088 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9090 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9092 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9094 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9096 * terminal.h: Check HAVE_SGTTY_H.
9098 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9100 * remote-utils.c (remote_open): Print out the assigned port number.
9102 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9104 * remote-utils.c (monitor_output): New function.
9105 * server.c (debug_threads): Define here.
9106 (monitor_show_help): New function.
9107 (handle_query): Handle qRcmd.
9108 (main): Do not handle 'd' packet.
9109 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9110 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9113 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9115 * Makefile.in (EXEEXT): New.
9116 (clean): Use $(EXEEXT).
9118 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9120 * target.h (target_ops): Rename send_signal to request_interrupt,
9121 and remove enum target_signal parameter.
9122 * linux-low.c (linux_request_interrupt): Rename from
9123 linux_send_signal, and always send SIGINT.
9124 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9125 and always send SIGINT.
9126 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9128 (input_interrupt): Likewise.
9130 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9132 * server.c (get_features_xml): Check if target implemented
9134 * win32-i386-low.c (win32_arch_string): New.
9135 (win32_target_ops): Add win32_arch_string as arch_string member.
9137 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9139 * spu-low.c (spu_arch_string): New.
9140 (spu_target_ops): Add spu_arch_string.
9142 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9144 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9145 * configure.ac: Do not check for terminal.h.
9146 * configure, config.in: Regenerated.
9148 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9150 * Makefile.in (OBS): Add $(XML_BUILTIN).
9151 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9153 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9154 (arm-with-iwmmxt.c): New.
9155 * config.in, configure: Regenerate.
9156 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9157 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9158 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9159 (arm*-*-linux*): Add iWMMXt and regset support.
9160 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9161 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9162 (arm_store_wmmxregset, target_regsets): New.
9163 * server.c (get_features_xml): Take annex argument. Check builtin
9165 (handle_query): Handle multiple annexes.
9167 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9169 * remote-utils.c [USE_WIN32API] (read, write): Define.
9170 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9173 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9175 * linux-i386-low.c (the_low_target): Set arch_string.
9176 * linux-x86-64-low.c (the_low_target): Likewise.
9177 * linux-low.c (linux_arch_string): New.
9178 (linux_target_ops): Add it.
9179 * linux-low.h (struct linux_target_ops): Add arch_string.
9180 * server.c (write_qxfer_response): Use const void * for DATA.
9181 (get_features_xml): New.
9182 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9183 * target.h (struct target_ops): Add arch_string method.
9185 2007-01-03 Denis Pilat <denis.pilat@st.com>
9186 Daniel Jacobowitz <dan@codesourcery.com>
9188 * linux-low.c (linux_kill): Handle being called with no threads.
9189 * win32-i386-low.c (win32_kill): Likewise.
9190 (get_child_debug_event): Clear current_process_handle.
9192 2006-12-30 Denis PILAT <denis.pilat@st.com>
9193 Daniel Jacobowitz <dan@codesourcery.com>
9195 * remote-utils.c (remote_open): Check the type of specified
9196 serial port devices before opening them.
9197 * server.c (main): Kill the inferior if an error occurs during
9198 the first remote_open.
9200 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9202 * README: Update supported targets.
9204 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9206 * Makefile.in (clean): Remove reg-mips64.c.
9207 (reg-mips64.c, reg-mips64.o): New rules.
9208 * configure.srv: Handle mips64. Include regset support for mips.
9209 * linux-mips-low.c (union mips_register): New.
9210 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9211 (mips_breakpoint, mips_breakpoint_at): Use int.
9212 (mips_collect_register, mips_supply_register)
9213 (mips_collect_register_32bit, mips_supply_register_32bit)
9214 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9215 (mips_store_fpregset, target_regsets): New.
9216 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9218 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9220 * configure.srv: Add target "spu*-*-*".
9221 * Makefile.in (clean): Remove reg-spu.c.
9222 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9223 * spu-low.c: New file.
9225 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9227 * configure.ac: Correct td_thr_tls_get_addr test.
9228 * configure: Regenerated.
9230 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9232 * linux-low.c (linux_wait_for_event): Reformat. Use the
9234 * remote-utils.c (decode_address_to_semicolon): New.
9235 * server.c (pass_signals, handle_general_set): New.
9236 (handle_query): Mention QPassSignals for qSupported.
9237 (main): Call handle_general_set.
9238 * server.h (pass_signals, decode_address_to_semicolon): New.
9240 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9242 * server.c (handle_query): Correct error handling for read_auxv.
9244 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9246 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9247 and srv_linux_thread_db to yes.
9248 * linux-s390-low.c (s390_fill_gregset): New function.
9249 (target_regsets): Define data structure.
9251 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9253 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9254 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9255 * config.in, configure: Regenerated.
9256 * inferiors.c (gdb_id_to_thread): New function.
9257 (gdb_id_to_thread_id): Use it.
9258 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9259 * linux-low.h (struct process_info): Add th member.
9260 (thread_db_get_tls_address): New prototype.
9261 * remote-utils.c (decode_address): Make non-static.
9262 * server.c (handle_query): Handle qGetTLSAddr.
9263 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9264 * target.h (struct target_ops): Add get_tls_address.
9265 * thread-db.c (maybe_attach_thread): Save the thread handle.
9266 (thread_db_get_tls_address): New.
9268 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9270 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9271 (linux_resume_one_process): Take a siginfo_t *. Update all
9272 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9273 (struct pending_signals): Add a siginfo_t.
9274 (linux_wait_for_process): Always set last_status.
9275 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9276 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9277 * linux-low.h (struct process_info): Add last_status.
9279 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9281 * remote-utils.c (try_rle): New function.
9282 (putpkt_binary): Use it.
9284 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9286 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9287 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9288 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9289 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9290 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9293 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9295 * server.c (terminal_fd): New variable.
9296 (old_foreground_pgrp): Likewise.
9297 (restore_old_foreground_pgrp): New function.
9298 (start_inferior): Record the terminal file descriptor in terminal_fd
9299 and its original foreground group in old_foreground_pgrp. Register
9300 restore_old_foreground_pgrp with atexit().
9302 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9304 * server.c (handle_query): Correct qPart to qXfer.
9306 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9308 * configure.ac: Check for more headers which are missing on
9309 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9310 * configure.srv: Add Cygwin and mingw32.
9311 * remote-utils.c: Don't include headers unconditionally which
9312 are missing on mingw32. Include <winsock.h> for mingw32.
9313 (remote_open): Adjust for mingw32 support. Flush
9314 standard error after writing to it.
9315 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9316 (unblock_async_io, enable_async_io, disable_async_io)
9317 (readchar, getpkt): Update for Winsock support.
9318 (prepare_resume_reply): Expect a protocol signal number.
9319 * server.c: Disable <sys/wait.h> on mingw32.
9320 (start_inferior): Adjust for mingw32 support. Flush
9321 standard error after writing to it.
9322 (attach_inferior): Likewise. Use protocol signal
9324 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9326 * win32-i386-low.c: New file.
9327 * Makefile.in (XM_CLIBS): Set.
9328 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9329 (win32-i386-low.o): New dependency rule.
9330 * linux-low.c (linux_wait): Use target signal numbers.
9331 * target.h (struct target_ops): Doc fix.
9332 * server.h (target_signal_to_name): New prototype.
9333 * gdbreplay.c: Don't include headers unconditionally which
9334 are missing on mingw32. Include <winsock.h> for mingw32.
9335 (remote_close, remote_open): Adjust for Winsock support.
9336 * configure, config.in: Regenerated.
9338 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9340 * server.c (decode_xfer_read, write_qxfer_response): New.
9341 (handle_query): Take a packet length argument. Handle
9342 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9343 the qSupported response.
9344 (main): Update call to handle_query.
9346 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9348 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9349 (putpkt_binary): Renamed from putpkt and adjusted for binary
9351 (putpkt): New wrapper for putpkt_binary.
9352 (readchar): Don't mask off the high bit.
9353 (decode_X_packet): New function.
9354 * server.c (main): Call putpkt_binary if a handler sets the packet
9355 length. Save the length of the incoming packet. Handle 'X'.
9356 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9358 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9360 * server.c (handle_query): Handle qSupported.
9362 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9364 * remote-utils.c (all_symbols_looked_up): New variable.
9365 (look_up_one_symbol): Check it.
9366 * server.h (look_up_one_symbol): New declaration.
9367 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9369 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9371 * Makefile.in (linux-arm-low.o): Update dependencies.
9372 * linux-arm-low.c: Include "gdb_proc_service.h".
9373 (PTRACE_GET_THREAD_AREA): Define.
9374 (ps_get_thread_area): New function.
9376 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9378 * configure.srv (m68k*-*-uclinux*): New target.
9379 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9380 (linux_resume_one_process): Remove extraneous cast.
9381 (linux_read_offsets): New.
9382 (linux_target_op): Add linux_read_offsets on mmuless systems.
9383 * server.c (handle_query): Add qOffsets logic.
9384 * target.h (struct target_ops): Add read_offsets.
9386 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9388 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9389 (PTRACE_GET_THREAD_AREA): Define.
9390 (ps_get_thread_area): New function.
9391 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9392 (linux-x86-64-low.o): Update.
9394 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9396 * configure.ac: Remove checks for prfpregset_t.
9397 * gdb_proc_service.h: New file.
9398 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9399 new "gdb_proc_service.h".
9400 * proc-service.c: Likewise.
9401 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9402 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9403 * Makefile.in (gdb_proc_service_h): Updated.
9404 * configure, config.in: Regenerated.
9406 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9408 * remote-utils.c (prepare_resume_reply): Move declaration
9409 of gdb_id_from_wait to the top of the block.
9411 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9413 * linux-low.c (regsets_store_inferior_registers): Read the regset
9414 from the target before filling it.
9416 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9418 * server.c (attach_inferior): Return SIGTRAP for a successful
9421 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9423 * Makefile.in (OBS): Add version.o.
9424 (STAGESTUFF): Delete.
9425 (version.o): Add dependencies.
9426 (version.c): Replace rule.
9427 (clean): Remove version.c.
9428 * server.c (gdbserver_version): New.
9429 (gdbserver_usage): Use printf.
9430 (main): Handle --version and --help.
9431 * server.h (version, host_name): Add declarations.
9433 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9445 * linux-x86-64-low.c:
9448 * linux-ppc64-low.c:
9457 * linux-crisv32-low.c:
9469 * gdbserver.1: Add (C) after Copyright. Update the FSF
9472 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9474 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9475 (arm_breakpoint_at): Recognize both breakpoints.
9476 (the_low_target): Use the correct breakpoint instruction.
9478 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9480 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9481 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9482 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9483 (the_low_target): Update.
9485 2005-10-25 Andreas Schwab <schwab@suse.de>
9487 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9489 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9490 (ia64_num_regs): Reduce to 462.
9492 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9494 * acinclude.m4: Correct quoting.
9495 * aclocal.m4: Regenerated.
9497 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9498 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9499 (thread_db_init): Call thread_db_err_str.
9500 * configure.ac: Check for TD_VERSION.
9501 * config.in, configure: Regenerated.
9503 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9505 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9507 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9509 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9510 is not available. Define HAVE_PTRACE_GETREGS if it is.
9511 * config.in, configure: Regenerated.
9512 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9513 * linux-i386-low.c, linux-m68k-low.c: Update to use
9514 HAVE_PTRACE_GETREGS.
9515 * linux-low.c (regsets_fetch_inferior_registers)
9516 (regsets_store_inferior_registers): Only return 0 if we processed
9518 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9519 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9521 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9523 * inferiors.c (struct thread_info): Add gdb_id.
9524 (add_thread): Add gdb_id argument.
9525 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9526 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9527 calls to add_thread.
9528 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9529 * server.c (handle_query): Use thread_to_gdb_id.
9530 (handle_v_cont, main): Use gdb_id_to_thread_id.
9531 * server.h (add_thread): Update prototype.
9532 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9535 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9537 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9538 left-padded registers.
9539 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9540 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9542 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9544 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9545 * configure: Regenerate.
9546 * config.in: Regenerate.
9547 * server.h (NEED_DECLARATION_STRERROR):
9548 Replace with !HAVE_DECL_STRERROR.
9550 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9552 * linux-low.c (linux_wait, linux_send_signal): Don't test
9553 an unsigned long variable for > 0 if it could be MAX_ULONG.
9554 * server.c (myresume): Likewise.
9555 * target.c (set_desired_inferior): Likewise.
9557 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9559 * configure.ac: Simplify and improve check for socklen_t.
9560 * configure, config.in: Regenerate.
9562 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9564 * acconfig.h: Remove.
9565 * configure.ac: Add a test for socklen_t. Use three-argument
9566 AC_DEFINE throughout.
9567 * config.in: Regenerated using autoheader 2.59.
9568 * configure: Regenerated.
9570 * gdbreplay.c (socklen_t): Provide a default.
9571 (remote_open): Use socklen_t.
9572 * remote-utils.c (socklen_t): Provide a default.
9573 (remote_open): Use socklen_t.
9574 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9577 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9579 * linux-low.c (linux_read_memory, linux_write_memory)
9580 (linux_read_auxv): Likewise.
9581 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9582 (check_mem_write): Likewise.
9583 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9585 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9586 (registers_from_string, register_data): Likewise.
9587 * server.c (handle_query, main): Likewise.
9588 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9589 (decode_M_packet): Likewise.
9590 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9591 * target.h (struct target_ops): Update read_memory, write_memory,
9593 (read_inferior_memory, write_inferior_memory): Update.
9594 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9596 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9597 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9598 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9599 linux-s390-low.c, linux-sh-low.c: Update for changes in
9600 read_inferior_memory and the_low_target->breakpoint.
9602 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9604 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9605 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9606 * configure.srv: Add powerpc64-*-linux*.
9607 * linux-ppc64-low.c: New file.
9609 2005-05-23 Orjan Friberg <orjanf@axis.com>
9611 * linux-cris-low.c: New file with support for CRIS.
9612 * linux-crisv32-low.c: Ditto for CRISv32.
9613 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9614 (clean): Add reg-cris.c and reg-crisv32.c.
9615 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9616 reg-crisv32.o, and reg-crisv32.c to make rules.
9617 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9620 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9622 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9623 of sizeof (PTRACE_XFER_TYPE).
9624 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9626 2005-05-12 Orjan Friberg <orjanf@axis.com>
9628 * target.h (struct target_ops): Add insert_watchpoint,
9629 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9630 pointers for hardware watchpoint support.
9631 * linux-low.h (struct linux_target_ops): Ditto.
9632 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9633 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9634 to linux_target_ops.
9635 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9637 * server.c (main): Recognize 'Z' and 'z' packets.
9639 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9641 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9642 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9643 (the_low_target): Add new members.
9645 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9647 * proc-service.c (ps_lgetregs): Search all_processes instead of
9650 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9652 * server.c (start_inferior): Change return type to int.
9653 (attach_inferior): Change sigptr to int *.
9654 (handle_v_cont, handle_v_requests): Change signal to int *.
9655 (main): Change signal to int.
9657 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9659 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9660 * configure.srv: Add m32r*-*-linux*.
9661 * linux-m32r-low.c: New file.
9663 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9665 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9667 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9669 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9670 Take unsigned long arguments for PIDs.
9671 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9672 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9673 (wait_for_sigstop, linux_resume_one_process)
9674 (regsets_fetch_inferior_registers, linux_send_signal)
9675 (linux_read_auxv): Likewise. Update the types of variables holding
9676 PIDs. Update format string specifiers.
9677 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9678 * remote-utils.c (prepare_resume_reply): Likewise.
9679 * server.c (cont_thread, general_thread, step_thread)
9680 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9682 (handle_query): Update format specifiers.
9683 (handle_v_cont, main): Use strtoul for thread IDs.
9684 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9685 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9686 (general_thread, step_thread, thread_from_wait)
9687 (old_thread_from_wait): Update.
9688 * target.h (struct thread_resume): Use unsigned long for THREAD.
9689 (struct target_ops): Use unsigned long for arguments to attach and
9692 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9694 * acinclude.m4: Include bfd/bfd.m4 directly.
9695 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9696 <agriffis@toolchain.org>.
9697 * aclocal.m4, configure: Regenerated.
9699 2005-01-07 Andrew Cagney <cagney@gnu.org>
9701 * configure.ac: Rename configure.in, require autoconf 2.59.
9702 * configure: Re-generate.
9704 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9706 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9708 * aclocal.m4: Regenerated.
9709 * configure: Regenerated.
9711 2004-11-21 Andreas Schwab <schwab@suse.de>
9713 * linux-m68k-low.c (m68k_num_gregs): Define.
9714 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9715 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9716 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9717 (m68k_breakpoint_at): New. Add to the_low_target.
9719 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9720 srv_linux_thread_db to yes.
9722 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9724 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9725 (ARCH_SET_FS): Likewise.
9726 (ARCH_GET_FS): Likewise.
9727 (ARCH_GET_GS): Likewise.
9729 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9731 * linux-i386-low.c (ps_get_thread_area): New.
9732 * linux-x86-64-low.c (ps_get_thread_area): New.
9733 * linux-low.c: Include <sys/syscall.h>.
9734 (linux_kill_one_process): Don't kill the first thread here.
9735 (linux_kill): Kill the first thread here.
9736 (kill_lwp): New function.
9737 (send_sigstop, linux_send_signal): Use it.
9738 * proc-service.c: Clean up #ifdefs.
9739 (fpregset_info): Delete.
9740 (ps_lgetregs): Update and enable implementation.
9741 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9743 * remote-utils.c (struct sym_cache, symbol_cache): New.
9744 (input_interrupt): Print a clearer message.
9745 (async_io_enabled): New variable.
9746 (enable_async_io, disable_async_io): Use it. Update comments.
9747 (look_up_one_symbol): Use the symbol cache.
9748 * thread-db.c (thread_db_look_up_symbols): New function.
9749 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9751 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9753 * configure.in: Test for -rdynamic.
9754 * configure: Regenerated.
9755 * Makefile (INTERNAL_LDFLAGS): New.
9756 (gdbserver, gdbreplay): Use it.
9758 2004-09-02 Andrew Cagney <cagney@gnu.org>
9760 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9762 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9764 * linux-low.c (linux_wait): Clear all_processes list also.
9766 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9768 * linux-low.c: Include <errno.h>. Remove extern declaration of
9771 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9773 * gdbreplay.c, server.h, utils.c: Update copyright years.
9775 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9777 * server.c (main): Print child status or termination signal from
9778 variable 'signal', not 'sig'.
9780 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9782 * linux-low.c (linux_read_memory): Change return type to
9783 int. Check for and return error from ptrace().
9784 * target.c (read_inferior_memory): Change return type to int. Pass
9785 back return status from the_target->read_memory().
9786 * target.h (struct target_ops): Adapt *read_memory() prototype.
9788 (read_inferior_memory): Adapt prototype.
9789 * server.c (main): Return an error packet if
9790 read_inferior_memory() returns an error.
9792 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9794 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9795 Unify with other clean targets.
9797 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9799 * server.c (handle_v_cont): Call set_desired_inferior.
9801 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9803 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9805 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9807 * linux-low.c (linux_wait): Unblock async I/O.
9808 (linux_resume): Block and enable async I/O.
9809 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9810 * server.h (block_async_io, unblock_async_io): Add prototypes.
9812 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9814 * remote-utils.c (remote_open): Print a status notice after
9816 * server.c (attach_inferior): Print a status notice after
9819 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9821 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9823 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9825 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9827 * server.c, target.h: Update copyright years.
9829 2004-02-25 Roland McGrath <roland@redhat.com>
9831 * target.h (struct target_ops): New member `read_auxv'.
9832 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9833 * linux-low.c (linux_read_auxv): New function.
9834 (linux_target_ops): Initialize `read_auxv' member to that.
9836 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9838 Committed by Jim Blandy <jimb@redhat.com>.
9840 * linux-s390-low.c (s390_num_regs): Update.
9841 (s390_regmap): Remove control registers. Use __s390x__ predefine
9842 instead of GPR_SIZE to distiguish s390 and s390x targets.
9844 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9846 * linux-low.c: Update copyright year.
9847 (check_removed_breakpoint): Clear pending_is_breakpoint.
9848 (linux_set_resume_request, linux_queue_one_thread)
9849 (resume_status_pending_p): New functions.
9850 (linux_continue_one_thread): Use process->resume.
9851 (linux_resume): Only resume threads if there are no pending events.
9852 * linux-low.h (struct process_info): Add resume request
9855 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9857 * regcache.c (new_register_cache): Clear the allocated register
9858 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9860 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9862 * linux-low.c (linux_resume): Take a struct thread_resume *
9864 (linux_wait): Update call.
9865 (resume_ptr): New static variable.
9866 (linux_continue_one_thread): Renamed from
9867 linux_continue_one_process. Use resume_ptr.
9868 (linux_resume): Use linux_continue_one_thread.
9869 * server.c (handle_v_cont, handle_v_requests): New functions.
9870 (myresume): New function.
9871 (main): Handle 'v' case.
9872 * target.h (struct thread_resume): New type.
9873 (struct target_ops): Change argument of "resume" to struct
9875 (myresume): Delete macro.
9877 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9879 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9880 (uninstall): Support DESTDIR.
9882 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9884 * configure.srv: Add xscale*linux copy of arm*linux entry.
9886 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9888 * linux-arm-low.c (arm_reinsert_addr): New function.
9889 (the_low_target): Add arm_reinsert_addr.
9891 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9893 * mem-break.c: Remove whitespace at end of file.
9895 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9897 * configure.in: Check whether we need to prototype strerror.
9898 * server.h: Optionally prototype strerror.
9899 * gdbreplay.c (perror_with_name): Use strerror.
9900 * linux-low.c (linux_attach_lwp): Use strerror.
9901 * utils.c (perror_with_name): Use strerror.
9902 * config.in, configure: Regenerated.
9904 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9906 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9907 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9909 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9911 * Makefile.in (SFILES): Update.
9912 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9913 low-sun3.c: Remove files.
9915 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9917 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9918 (linux_detach_one_process, linux_detach): New functions.
9919 (linux_target_ops): Add linux_detach.
9920 * server.c (main): Handle 'D' packet.
9921 * target.h (struct target_ops): Add "detach" member.
9922 (detach_inferior): Define.
9924 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9926 From Kelley Cook <kelleycook@wideopenwest.com>:
9927 * configure.srv: Accept i[34567]86 variants.
9929 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9931 * linux-low.c (linux_wait_for_event): Correct comment typos.
9932 (linux_resume_one_process): Call check_removed_breakpoint.
9933 (linux_send_signal): New function.
9934 (linux_target_ops): Add linux_send_signal.
9935 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9937 * target.h (struct target_ops): Add send_signal.
9939 2003-05-29 Jim Blandy <jimb@redhat.com>
9941 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9942 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9943 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9944 away part of the register's value.
9946 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
9948 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9949 (linux_wait_for_event, linux_init_signals): Likewise.
9951 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
9953 * configure.in: Check for stdlib.h.
9954 * configure: Regenerated.
9955 * config.in: Regenerated.
9957 2003-01-04 Andreas Schwab <schwab@suse.de>
9959 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9961 2003-01-02 Andrew Cagney <ac131313@redhat.com>
9963 * Makefile.in: Remove obsolete code.
9965 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
9967 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9968 defined(PT_FPR0_HI).
9970 2002-11-17 Stuart Hughes <seh@zee2.com>
9972 * linux-arm-low.c (arm_num_regs): Increase.
9973 (arm_regmap): Include status register.
9975 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
9977 * linux-low.c (register_addr): Remove incorrect -1 check.
9979 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
9981 * linux-low.c (linux_create_inferior): Call setpgid. Return
9983 (unstopped_p, linux_signal_pid): Remove.
9984 (linux_target_ops): Remove linux_signal_pid.
9985 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9986 global instead of target method.
9987 * target.h (struct target_ops): Remove signal_pid. Update comment
9988 for create_inferior.
9989 * server.c (signal_pid): New variable.
9990 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
9991 gdbserver. Set the child to be the foreground process group.
9992 (attach_inferior): Set signal_pid.
9994 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
9996 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9998 2002-08-20 Jim Blandy <jimb@redhat.com>
10000 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10003 2002-08-01 Andrew Cagney <cagney@redhat.com>
10005 * Makefile.in: Make chill references obsolete.
10007 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10009 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10010 * configure: Regenerate.
10011 * config.in: Regenerate.
10013 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10015 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10016 (perror_with_name, remote_close, remote_open, expect, play): Static.
10018 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10020 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10021 byte offsets instead of an array of indexes.
10022 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10024 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10026 * regcache.c: Add comment.
10028 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10030 * thread-db.c: New file.
10031 * proc-service.c: New file.
10032 * acinclude.m4: New file.
10033 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10034 proc-service.o, and thread-db.o.
10035 (linux-low.o): Add USE_THREAD_DB.
10036 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10037 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10038 * aclocal.m4: Regenerated.
10039 * config.in: Regenerated.
10040 * configure: Regenerated.
10041 * configure.in: Check for proc_service.h, sys/procfs.h,
10042 thread_db.h, and linux/elf.h headrs.
10043 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10044 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10045 Check for -lthread_db and thread support.
10046 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10047 PowerPC, and SuperH.
10048 * i387-fp.c: Constify arguments.
10049 * i387-fp.h: Likewise.
10050 * inferiors.c: (struct thread_info): Renamed from
10051 `struct inferior_info'. Remove PID member. Use generic inferior
10052 list header. All uses updated.
10053 (inferiors, signal_pid): Removed.
10054 (all_threads): New variable.
10055 (get_thread): Define.
10056 (add_inferior_to_list): New function.
10057 (for_each_inferior): New function.
10058 (change_inferior_id): New function.
10059 (add_inferior): Removed.
10060 (remove_inferior): New function.
10061 (add_thread): New function.
10062 (free_one_thread): New function.
10063 (remove_thread): New function.
10064 (clear_inferiors): Use for_each_inferior and free_one_thread.
10065 (find_inferior): New function.
10066 (find_inferior_id): New function.
10067 (inferior_target_data): Update argument type.
10068 (set_inferior_target_data): Likewise.
10069 (inferior_regcache_data): Likewise.
10070 (set_inferior_regcache_data): Likewise.
10071 * linux-low.c (linux_bp_reinsert): Remove.
10072 (all_processes, stopping_threads, using_thrads)
10073 (struct pending_signals, debug_threads, pid_of): New.
10074 (inferior_pid): Replace with macro.
10075 (struct inferior_linux_data): Remove.
10076 (get_stop_pc, add_process): New functions.
10077 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10078 Use add_process and add_thread.
10079 (linux_attach_lwp): New function, based on old linux_attach. Use
10080 add_process and add_thread. Set stop_expected for new threads.
10081 (linux_attach): New function.
10082 (linux_kill_one_process): New function.
10083 (linux_kill): Kill all LWPs.
10084 (linux_thread_alive): Use find_inferior_id.
10085 (check_removed_breakpoints, status_pending_p): New functions.
10086 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10087 Update. Use WNOHANG. Wait for cloned processes also. Update process
10088 struct for the found process.
10089 (linux_wait_for_event): New function.
10090 (linux_wait): Use it. Support LWPs.
10091 (send_sigstop, wait_for_sigstop, stop_all_processes)
10092 (linux_resume_one_process, linux_continue_one_process): New functions.
10093 (linux_resume): Support LWPs.
10094 (REGISTER_RAW_SIZE): Remove.
10095 (fetch_register): Use register_size instead. Call supply_register.
10096 (usr_store_inferior_registers): Likewise. Call collect_register.
10097 Fix recursive case.
10098 (regsets_fetch_inferior_registers): Improve error message.
10099 (regsets_store_inferior_registers): Add debugging.
10100 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10101 (unstopped_p, linux_signal_pid): New functions.
10102 (linux_target_ops): Add linux_signal_pid.
10103 (linux_init_signals): New function.
10104 (initialize_low): Call it. Initialize using_threads.
10105 * regcache.c (inferior_regcache_data): Add valid
10107 (get_regcache): Fetch registers lazily. Add fetch argument
10108 and update all callers.
10109 (regcache_invalidate_one, regcache_invalidate): New
10111 (new_register_cache): Renamed from create_register_cache.
10112 Return the new regcache.
10113 (free_register_cache): Change argument to a void *.
10114 (registers_to_string, registers_from_string): Call get_regcache
10115 with fetch flag set.
10116 (register_data): Make static. Pass fetch flag to get_regcache.
10117 (supply_register): Call get_regcache with fetch flag clear.
10118 (collect_register): Call get_regcache with fetch flag set.
10119 (collect_register_as_string): New function.
10120 * regcache.h: Update.
10121 * remote-utils.c (putpkt): Flush after debug output and use
10123 Handle input interrupts while waiting for an ACK.
10124 (input_interrupt): Use signal_pid method.
10125 (getpkt): Flush after debug output and use stderr.
10126 (outreg): Use collect_register_as_string.
10127 (new_thread_notify, dead_thread_notify): New functions.
10128 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10129 and general_thread.
10130 (look_up_one_symbol): Flush after debug output.
10131 * server.c (step_thread, server_waiting): New variables.
10132 (start_inferior): Don't use signal_pid. Update call to mywait.
10133 (attach_inferior): Update call to mywait.
10134 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10135 (main): Don't fetch/store registers explicitly. Use
10136 set_desired_inferior. Support proposed ``Hs'' packet. Update
10138 * server.h: Update.
10139 (struct inferior_list, struct_inferior_list_entry): New.
10140 * target.c (set_desired_inferior): New.
10141 (write_inferior_memory): Constify.
10142 (mywait): New function.
10143 * target.h: Update.
10144 (struct target_ops): New signal_pid method.
10145 (mywait): Removed macro, added prototype.
10147 * linux-low.h (regset_func): Removed.
10148 (regset_fill_func, regset_store_func): New.
10149 (enum regset_type): New.
10150 (struct regset_info): Add type field. Use new operation types.
10151 (struct linux_target_ops): stop_pc renamed to get_pc.
10152 Add decr_pc_after_break and breakpoint_at.
10153 (get_process, get_thread_proess, get_process_thread)
10154 (strut process_info, all_processes, linux_attach_lwp)
10155 (thread_db_init): New.
10157 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10158 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10159 (the_low_target): Add new members.
10160 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10161 (i386_store_fpxregset): Constify.
10162 (target_regsets): Add new kind identifier.
10163 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10164 (i386_set_pc): Add debugging.
10165 (i386_breakpoint_at): New function.
10166 (the_low_target): Add new members.
10167 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10168 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10169 (mips_breakpoint_at): New.
10170 (the_low_target): Add new members.
10171 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10172 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10173 (the_low_target): Add new members.
10174 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10175 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10176 (the_low_target): Add new members.
10177 * linux-x86-64-low.c (target_regsets): Add new kind
10180 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10182 From Martin Pool <mbp@samba.org>:
10183 * server.c (gdbserver_usage): New function.
10186 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10188 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10189 stop_at -> stop_pc.
10191 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10193 * Makefile.in: Remove obsolete code.
10195 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10197 * linux-low.c (regsets_fetch_inferior_registers),
10198 (regsets_store_inferior_registers): Removed cast to int from
10200 * regcache.h: Added declaration of struct inferior_info.
10202 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10204 * inferiors.c (struct inferior_info): Add regcache_data.
10205 (add_inferior): Call create_register_cache.
10206 (clear_inferiors): Call free_register_cache.
10207 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10208 * regcache.c (struct inferior_regcache_data): New.
10209 (registers): Remove.
10210 (get_regcache): New function.
10211 (create_register_cache, free_register_cache): New functions.
10212 (set_register_cache): Don't initialize the register cache here.
10213 (registers_to_string, registers_from_string, register_data): Call
10215 * regcache.h: Add prototypes.
10216 * server.h: Likewise.
10218 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10220 * mem-break.c: New file.
10221 * mem-break.h: New file.
10222 * Makefile.in: Add mem-break.o rule; update server.h
10224 * inferiors.c (struct inferior_info): Add target_data
10226 (clear_inferiors): Free target_data member if set.
10227 (inferior_target_data, set_inferior_target_data): New functions.
10228 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10229 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10230 * linux-low.c (linux_bp_reinsert): New variable.
10231 (struct inferior_linux_data): New.
10232 (linux_create_inferior): Use set_inferior_target_data.
10233 (linux_attach): Likewise. Call add_inferior.
10234 (linux_wait_for_one_inferior): New function.
10235 (linux_wait): Call it.
10236 (linux_write_memory): Add const.
10237 (initialize_low): Call set_breakpoint_data.
10238 * linux-low.h (struct linux_target_ops): Add breakpoint
10240 * server.c (attach_inferior): Remove extra add_inferior
10242 * server.h: Include mem-break.h. Update inferior.c
10244 * target.c (read_inferior_memory)
10245 (write_inferior_memory): New functions.
10246 * target.h (read_inferior_memory)
10247 (write_inferior_memory): Change macros to prototypes.
10248 (struct target_ops): Update comments. Add const to write_memory
10251 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10253 * linux-low.c (usr_store_inferior_registers): Support
10254 registers which are allowed to fail to store.
10255 * linux-low.h (linux_target_ops): Likewise.
10256 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10257 (ppc_cannot_store_register): FPSCR may not be storable.
10259 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10261 * server.h: Include <string.h> if HAVE_STRING_H.
10262 * ChangeLog: Correct paths in last ChangeLog entry.
10264 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10266 * linux-low.h: Remove obsolete prototypes.
10267 (struct linux_target_ops): New.
10268 (extern the_low_target): New.
10269 * linux-low.c (num_regs, regmap): Remove declarations.
10270 (register_addr): Use the_low_target explicitly.
10271 (fetch_register): Likewise.
10272 (usr_fetch_inferior_registers): Likewise.
10273 (usr_store_inferior_registers): Likewise.
10274 * linux-arm-low.c (num_regs): Remove.
10275 (arm_num_regs): Define.
10276 (arm_regmap): Renamed from regmap, made static.
10277 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10279 (arm_cannot_store_register): Renamed from cannot_store_register,
10281 (the_low_target): New.
10282 * linux-i386-low.c (num_regs): Remove.
10283 (i386_num_regs): Define.
10284 (i386_regmap): Renamed from regmap, made static.
10285 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10287 (i386_cannot_store_register): Renamed from cannot_store_register,
10289 (the_low_target): New.
10290 * linux-ia64-low.c (num_regs): Remove.
10291 (ia64_num_regs): Define.
10292 (ia64_regmap): Renamed from regmap, made static.
10293 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10295 (ia64_cannot_store_register): Renamed from cannot_store_register,
10297 (the_low_target): New.
10298 * linux-m68k-low.c (num_regs): Remove.
10299 (m68k_num_regs): Define.
10300 (m68k_regmap): Renamed from regmap, made static.
10301 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10303 (m68k_cannot_store_register): Renamed from cannot_store_register,
10305 (the_low_target): New.
10306 * linux-mips-low.c (num_regs): Remove.
10307 (mips_num_regs): Define.
10308 (mips_regmap): Renamed from regmap, made static.
10309 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10311 (mips_cannot_store_register): Renamed from cannot_store_register,
10313 (the_low_target): New.
10314 * linux-ppc-low.c (num_regs): Remove.
10315 (ppc_num_regs): Define.
10316 (ppc_regmap): Renamed from regmap, made static.
10317 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10319 (ppc_cannot_store_register): Renamed from cannot_store_register,
10321 (the_low_target): New.
10322 * linux-s390-low.c (num_regs): Remove.
10323 (s390_num_regs): Define.
10324 (s390_regmap): Renamed from regmap, made static.
10325 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10327 (s390_cannot_store_register): Renamed from cannot_store_register,
10329 (the_low_target): New.
10330 * linux-sh-low.c (num_regs): Remove.
10331 (sh_num_regs): Define.
10332 (sh_regmap): Renamed from regmap, made static.
10333 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10335 (sh_cannot_store_register): Renamed from cannot_store_register,
10337 (the_low_target): New.
10338 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10339 (the_low_target): New.
10341 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10343 * Makefile.in: Add stamp-h target.
10344 * configure.in: Create stamp-h.
10345 * configure: Regenerated.
10347 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10349 * inferiors.c: New file.
10350 * target.c: New file.
10351 * target.h: New file.
10352 * Makefile.in: Add target.o and inferiors.o. Update
10354 * linux-low.c (inferior_pid): New static variable,
10355 moved from server.c.
10356 (linux_create_inferior): Renamed from create_inferior.
10357 Call add_inferior. Return 0 on success instead of a PID.
10358 (linux_attach): Renamed from myattach.
10359 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10360 (linux_thread_alive): Renamed from mythread_alive.
10361 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10363 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10364 (regsets_store_inferior_registers): Correct error message.
10365 Add missing ``return 0''.
10366 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10367 (linux_store_registers): Renamed from store_inferior_registers.
10368 (linux_read_memory): Renamed from read_inferior_memory.
10369 (linux_write_memory): Renamed from write_inferior_memory.
10370 (linux_target_ops): New structure.
10371 (initialize_low): Call set_target_ops ().
10372 * remote-utils.c (unhexify): New function.
10373 (hexify): New function.
10374 (input_interrupt): Send signals to ``signal_pid''.
10375 * server.c (inferior_pid): Remove.
10376 (start_inferior): Update create_inferior call.
10377 (attach_inferior): Call add_inferior.
10378 (handle_query): New function.
10379 (main): Call handle_query for `q' packets.
10380 * server.h: Include "target.h". Remove obsolete prototypes.
10381 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10383 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10385 * Makefile.in: Add WARN_CFLAGS. Update configury
10387 * configure.in: Check for <string.h>
10388 * configure: Regenerate.
10389 * config.in: Regenerate.
10390 * gdbreplay.c: Include needed system headers.
10391 (remote_open): Remove strchr prototype.
10392 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10393 * regcache.c (supply_register): Change buf argument to const void *.
10394 (supply_register_by_name): Likewise.
10395 (collect_register): Change buf argument to void *.
10396 (collect_register_by_name): Likewise.
10397 * regcache.h: Add missing prototypes.
10398 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10399 * server.c (handle_query): New function.
10400 (attached): New static variable, moved out of main.
10401 (main): Quiet longjmp clobber warnings.
10402 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10403 * utils.c (error): Remove NORETURN.