1 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3 * remote-utils.c: Include ctype.h.
4 (input_interrupt): Explicitly handle the case when the char
5 received is the NUL byte. Improve the printing of non-ASCII
8 2014-12-16 Joel Brobecker <brobecker@adacore.com>
10 * linux-low.c (linux_low_filter_event): Update call to
11 linux_enable_event_reporting following the addition of
12 a new parameter to that function.
14 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
17 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
18 (AARCH64_FPCR_REGNO): Likewise.
19 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
20 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
21 (aarch64_store_fpregset): Likewise.
23 2014-12-15 Joel Brobecker <brobecker@adacore.com>
25 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
26 Remove FIXME comment about assumption about N.
28 2014-12-13 Joel Brobecker <brobecker@adacore.com>
30 * configure.ac: If large-file support is disabled in GDBserver,
31 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
32 * configure: Regenerate.
34 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
36 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
37 warning upon ENODATA from ptrace.
38 * linux-s390-low.c (s390_store_tdb): New.
39 (s390_regsets): Add regset for NT_S390_TDB.
41 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
43 * linux-low.c (regsets_store_inferior_registers): Skip regsets
44 without a fill_function.
45 * linux-s390-low.c (s390_fill_last_break): Remove.
46 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
47 (s390_arch_setup): Use regset's size instead of fill_function for
50 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
52 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
53 the regset's store function when ptrace returned an error.
54 * regcache.c (get_thread_regcache): Invalidate register cache
55 before fetching inferior's registers.
57 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
59 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
60 while-loop as for-loop.
61 (regsets_store_inferior_registers): Likewise.
63 2014-11-28 Yao Qi <yao@codesourcery.com>
65 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
66 * config.in, configure: Re-generate.
67 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
70 2014-11-21 Yao Qi <yao@codesourcery.com>
72 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
73 (AC_CHECK_HEADERS): Remove malloc.h.
74 * configure: Re-generated.
75 * config.in: Re-generated.
76 * server.h: Don't include alloca.h and malloc.h.
77 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
78 Don't include malloc.h.
80 2014-11-17 Joel Brobecker <brobecker@adacore.com>
82 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
83 corresponding ERRNO check in same block.
85 2014-11-12 Pedro Alves <palves@redhat.com>
87 * server.c (cont_thread): Update comment.
88 (start_inferior, attach_inferior): No longer clear cont_thread.
89 (handle_v_cont): No longer set cont_thread.
90 (captured_main): Clear cont_thread each time a GDB connects.
92 2014-11-12 Pedro Alves <palves@redhat.com>
94 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
95 thread, and don't resume all threads if the Hc thread has exited.
97 2014-11-12 Pedro Alves <palves@redhat.com>
99 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
100 the process group instead of to a specific LWP.
102 2014-10-15 Pedro Alves <palves@redhat.com>
105 * win32-arm-low.c (arm_set_thread_context): Remove current_event
107 (arm_set_thread_context): Delete.
108 (the_low_target): Adjust.
109 * win32-i386-low.c (debug_registers_changed)
110 (debug_registers_used): Delete.
111 (update_debug_registers_callback): New function.
112 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
113 needing to update their debug registers.
114 (win32_get_current_dr): New function.
115 (x86_dr_low_get_addr, x86_dr_low_get_control)
116 (x86_dr_low_get_status): Fetch the debug register from the thread
118 (i386_initial_stuff): Adjust.
119 (i386_get_thread_context): Remove current_event parameter. Don't
120 clear debug_registers_changed nor copy DR values to
122 (i386_set_thread_context): Delete.
123 (i386_prepare_to_resume): New function.
124 (i386_thread_added): Mark the thread as needing to update irs
126 (the_low_target): Remove i386_set_thread_context and install
127 i386_prepare_to_resume.
128 * win32-low.c (win32_get_thread_context): Adjust.
129 (win32_set_thread_context): Use SetThreadContext
131 (win32_prepare_to_resume): New function.
132 (win32_require_context): New function, factored out from ...
133 (thread_rec): ... this.
134 (continue_one_thread): Call win32_prepare_to_resume on each thread
135 we're about to continue.
136 (win32_resume): Call win32_prepare_to_resume on the event thread.
137 * win32-low.h (struct win32_thread_info)
138 <debug_registers_changed>: New field.
139 (struct win32_target_ops): Change prototype of set_thread_context,
140 delete set_thread_context and add prepare_to_resume.
141 (win32_require_context): New declaration.
143 2014-10-08 Gary Benson <gbenson@redhat.com>
145 * server.h: Do not include common-exceptions.h.
147 2014-10-08 Gary Benson <gbenson@redhat.com>
149 * server.h: Do not include cleanups.h.
151 2014-09-30 James Hogan <james.hogan@imgtec.com>
153 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
156 2014-09-23 Yao Qi <yao@codesourcery.com>
158 * linux-low.c (lp_status_maybe_breakpoint): New function.
159 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
160 (count_events_callback): Likewise.
161 (select_event_lwp_callback): Likewise.
162 (cancel_breakpoints_callback): Likewise.
164 2014-09-19 Don Breazeal <donb@codesourcery.com>
166 * linux-low.c (handle_extended_wait): Call
167 linux_ptrace_get_extended_event.
168 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
169 linux_is_extended_waitstatus.
171 2014-09-16 Joel Brobecker <brobecker@adacore.com>
173 * Makefile.in (CPPFLAGS): Define.
174 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
175 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
177 2014-09-16 Gary Benson <gbenson@redhat.com>
179 * inferiors.h (current_inferior): Renamed as...
180 (current_thread): New variable. All uses updated.
181 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
182 (maybe_move_out_of_jump_pad): Likewise.
183 (cancel_breakpoint): Likewise.
184 (linux_low_filter_event): Likewise.
185 (wait_for_sigstop): Likewise.
186 (linux_resume_one_lwp): Likewise.
187 (need_step_over_p): Likewise.
188 (start_step_over): Likewise.
189 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
190 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
191 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
192 and save_inferior as saved_thread.
193 * regcache.c (get_thread_regcache): Renamed saved_inferior as
195 (regcache_invalidate_thread): Likewise.
196 * remote-utils.c (prepare_resume_reply): Likewise.
197 * thread-db.c (thread_db_get_tls_address): Likewise.
198 (disable_thread_event_reporting): Likewise.
199 (remove_thread_event_breakpoints): Likewise.
200 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
202 * target.h (set_desired_inferior): Renamed as...
203 (set_desired_thread): New declaration. All uses updated.
204 * server.c (myresume): Updated comment to reference thread instead
206 (handle_serial_event): Likewise.
207 (handle_target_event): Likewise.
209 2014-09-12 Tom Tromey <tromey@redhat.com>
210 Gary Benson <gbenson@redhat.com>
212 * regcache.h: Include common-regcache.h.
213 (regcache_read_pc): Don't declare.
214 * regcache.c (get_thread_regcache_for_ptid): New function.
216 2014-09-11 Tom Tromey <tromey@redhat.com>
217 Gary Benson <gbenson@redhat.com>
219 * symbol.c: New file.
220 * Makefile.in (SFILES): Add symbol.c.
223 2014-09-11 Gary Benson <gbenson@redhat.com>
225 * target.c (target_stop_ptid, target_continue_ptid): New
228 2014-09-11 Tom Tromey <tromey@redhat.com>
229 Gary Benson <gbenson@redhat.com>
231 * target.h: Include target/target.h.
232 * target.c (target_read_memory, target_read_uint32)
233 (target_write_memory): New functions.
235 2014-09-11 Gary Benson <gbenson@redhat.com>
237 * server.h (debug_hw_points): Don't declare.
238 * server.c (debug_hw_points): Don't define. Replace all uses
239 with show_debug_regs.
240 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
241 all uses with show_debug_regs.
243 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
245 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
246 endianness into account.
247 (ppc_supply_ptrace_register): Likewise.
249 2014-09-03 James Hogan <james.hogan@imgtec.com>
251 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
252 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
254 2014-09-03 Gary Benson <gbenson@redhat.com>
256 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
257 ALL_DEBUG_ADDRESS_REGISTERS.
259 2014-09-02 Gary Benson <gbenson@redhat.com>
261 * i386-low.h: Renamed as...
262 * x86-low.h: New file. All type, function and variable name
263 prefixes changed from "i386_" to "x86_". All references updated.
264 * i386-low.c: Renamed as...
265 * x86-low.c: New file. All type, function and variable name
266 prefixes changed from "i386_" to "x86_". All references updated.
268 2014-09-02 Gary Benson <gbenson@redhat.com>
270 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
271 (x86_linux_new_thread): Likewise.
273 2014-08-29 Gary Benson <gbenson@redhat.com>
275 * server.h (setjmp.h): Do not include.
276 (toplevel): Do not declare.
277 (common-exceptions.h): Include.
278 (cleanups.h): Likewise.
279 * server.c (toplevel): Do not define.
280 (exit_code): New static global.
281 (detach_or_kill_for_exit_cleanup): New function.
282 (main): New function. Original main renamed to...
283 (captured_main): New function.
284 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
286 2014-08-29 Gary Benson <gbenson@redhat.com>
288 * Makefile.in (SFILES): Add common/common-exceptions.c.
289 (OBS): Add common-exceptions.o.
290 (common-exceptions.o): New rule.
291 * utils.c (prepare_to_throw_exception): New function.
293 2014-08-29 Gary Benson <gbenson@redhat.com>
295 * config.in: Regenerate.
296 * configure: Likewise.
298 2014-08-29 Gary Benson <gbenson@redhat.com>
300 * Makefile.in (SFILES): Add common/cleanups.c.
302 (cleanups.o): New rule.
304 2014-08-29 Gary Benson <gbenson@redhat.com>
306 * utils.c (internal_vwarning): New function.
308 2014-08-28 Gary Benson <gbenson@redhat.com>
310 * utils.h (fatal): Remove declaration.
311 * utils.c (fatal): Remove function.
313 2014-08-28 Gary Benson <gbenson@redhat.com>
315 * tracepoint.c (gdb_agent_init): Replace fatal with
317 (initialize_tracepoint): Likewise.
319 2014-08-28 Gary Benson <gbenson@redhat.com>
321 * remote-utils.c (remote_prepare): Replace fatal with error.
323 2014-08-28 Gary Benson <gbenson@redhat.com>
325 * linux-low.c (linux_async): Replace fatal with warning.
327 (linux_start_non_stop): Return -1 if linux_async failed.
329 2014-08-28 Gary Benson <gbenson@redhat.com>
331 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
333 (i386_dr_low_get_addr): Remove vague comment.
334 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
337 2014-08-28 Gary Benson <gbenson@redhat.com>
339 * inferiors.c (get_thread_process): Replace check with gdb_assert.
340 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
342 (linux_resume_one_lwp): Likewise.
343 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
345 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
347 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
348 (init_register_cache): Replace fatal with gdb_assert_not_reached.
349 (find_register_by_name): Replace fatal with internal_error.
350 (find_regno): Likewise.
351 * tdesc.c (init_target_desc): Replace check with gdb_assert.
352 * thread-db.c (thread_db_create_event): Likewise.
353 (thread_db_load_search): Likewise.
354 (try_thread_db_load_1): Likewise.
355 * tracepoint.c (get_jump_space_head): Replace fatal with
357 (claim_trampoline_space): Likewise.
358 (have_fast_tracepoint_trampoline_buffer): Likewise.
359 (cmd_qtstart): Likewise.
360 (stop_tracing): Likewise.
361 (fast_tracepoint_collecting): Likewise.
362 (target_malloc): Likewise.
363 (download_tracepoint): Likewise.
364 (download_trace_state_variables): Replace check with gdb_assert.
365 (upload_fast_traceframes): Replace fatal with internal_error.
367 2014-08-19 Tom Tromey <tromey@redhat.com>
368 Gary Benson <gbenson@redhat.com>
370 * Makefile.in (SFILES): Add common/common-debug.c.
371 (OBS): Add common-debug.o.
372 (common-debug.o): New rule.
373 * debug.h (debug_printf): Don't declare.
374 * debug.c (debug_printf): Renamed and rewritten as...
375 (debug_vprintf): New function.
377 2014-08-19 Gary Benson <gbenson@redhat.com>
379 * utils.h: Do not include print-utils.h.
381 2014-08-19 Tom Tromey <tromey@redhat.com>
382 Gary Benson <gbenson@redhat.com>
384 * server.h: Add static assertion.
385 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
387 2014-08-19 Tom Tromey <tromey@redhat.com>
388 Gary Benson <gbenson@redhat.com>
390 * Makefile.in (SFILES): Add common/errors.c.
392 (IPA_OBS): Add errors-ipa.o.
393 (errors.o): New rule.
394 (errors-ipa.o): Likewise.
395 * utils.h (perror_with_name, error, warning): Don't declare.
396 * utils.c (warning): Renamed and rewritten as...
397 (vwarning): New function.
398 (error): Renamed and rewritten as...
399 (verror): New function.
400 (internal_error): Renamed and rewritten as...
401 (internal_verror): New function.
403 2014-08-07 Gary Benson <gbenson@redhat.com>
405 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
406 * configure: Regenerate.
407 * config.in: Likewise.
408 * server.h: Do not include errno.h.
409 * event-loop.c: Likewise.
410 * hostio-errno.c: Likewise.
411 * linux-low.c: Likewise.
412 * remote-utils.c: Likewise.
413 * spu-low.c: Likewise.
415 * gdbreplay.c: Unconditionally include errno.h.
417 2014-08-07 Gary Benson <gbenson@redhat.com>
419 * server.h: Do not include string.h.
420 * event-loop.c: Likewise.
421 * linux-low.c: Likewise.
422 * regcache.c: Likewise.
423 * remote-utils.c: Likewise.
424 * spu-low.c: Likewise.
427 2014-08-07 Gary Benson <gbenson@redhat.com>
429 * server.h: Do not include gdb_assert.h.
431 2014-08-07 Gary Benson <gbenson@redhat.com>
433 * server.h: Do not include common-utils.h.
435 2014-08-07 Gary Benson <gbenson@redhat.com>
437 * server.h: Do not include ptid.h.
440 2014-08-07 Gary Benson <gbenson@redhat.com>
442 * server.h: Do not include gdb_locale.h.
444 2014-08-07 Gary Benson <gbenson@redhat.com>
446 * server.h: Do not include gdb/signals.h.
447 * win32-low.c: Likewise.
449 2014-08-07 Gary Benson <gbenson@redhat.com>
451 * server.h: Do not include pathmax.h.
453 2014-08-07 Gary Benson <gbenson@redhat.com>
455 * server.h: Do not include libiberty.h.
456 * linux-bfin-low.c: Likewise.
458 2014-08-07 Gary Benson <gbenson@redhat.com>
460 * server.h: Do not include ansidecl.h.
462 2014-08-07 Gary Benson <gbenson@redhat.com>
464 * linux-x86-low.c: Do not include stddef.h.
465 * lynx-ppc-low.c: Likewise.
466 * tracepoint.c: Likewise.
468 2014-08-07 Gary Benson <gbenson@redhat.com>
470 * server.h: Do not include stdarg.h.
471 * nto-low.c: Likewise.
473 2014-08-07 Gary Benson <gbenson@redhat.com>
475 * server.h: Do not include stdlib.h.
476 * inferiors.c: Likewise.
477 * linux-low.c: Likewise.
478 * regcache.c: Likewise.
479 * spu-low.c: Likewise.
480 * tracepoint.c: Likewise.
483 2014-08-07 Gary Benson <gbenson@redhat.com>
485 * server.h: Do not include stdio.h.
486 * linux-low.c: Likewise.
487 * remote-utils.c: Likewise.
488 * spu-low.c: Likewise.
490 * wincecompat.c: Likewise.
492 2014-08-06 Gary Benson <gbenson@redhat.com>
494 * regcache.c (init_register_cache): Move conditionals inside if.
496 2014-08-06 Gary Benson <gbenson@redhat.com>
498 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
500 2014-07-31 Gary Benson <gbenson@redhat.com>
502 * ax.h: Do not include server.h.
503 * gdbthread.h: Likewise.
504 * lynx-low.h: Likewise.
507 2014-07-30 Gary Benson <gbenson@redhat.com>
509 * server.h: Include common-defs.h.
510 Do not include config.h or build-gnulib-gdbserver/config.h.
512 2014-07-30 Gary Benson <gbenson@redhat.com>
514 * hostio-errno.c: Move server.h to top of includes list.
515 * inferiors.c: Likewise.
516 * linux-x86-low.c: Likewise.
517 * notif.c: Include server.h.
519 2014-07-24 Tom Tromey <tromey@redhat.com>
520 Gary Benson <gbenson@redhat.com>
522 * server.h (CORE_ADDR): Now unsigned.
524 2014-07-16 Pedro Alves <palves@redhat.com>
526 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
528 2014-07-15 Pedro Alves <palves@redhat.com>
530 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
533 2014-07-11 Pedro Alves <palves@redhat.com>
535 * linux-low.c (kill_wait_lwp): New function, based on
536 kill_one_lwp_callback, but use my_waitpid directly.
537 (kill_one_lwp_callback, linux_kill): Use it.
539 2014-06-23 Pedro Alves <palves@redhat.com>
541 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
542 before setting DR0..DR3.
544 2014-06-20 Gary Benson <gbenson@redhat.com>
546 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
547 * configure: Regenerated.
548 * config.in: Likewise.
550 2014-06-20 Gary Benson <gbenson@redhat.com>
552 * Makefile.in (SFILES): Update locations for files moved
554 (object file files): Reordered.
556 2014-06-20 Gary Benson <gbenson@redhat.com>
558 * i386-low.h (i386_dr_low_can_set_addr): Removed.
559 (i386_dr_low_set_addr): Likewise.
560 (i386_dr_low_get_addr): Likewise.
561 (i386_dr_low_can_set_control): Likewise.
562 (i386_dr_low_set_control): Likewise.
563 (i386_dr_low_get_control): Likewise.
564 (i386_dr_low_get_status): Likewise.
565 (i386_get_debug_register_length): Likewise.
566 * linux-x86-low.c (i386_dr_low_set_addr):
567 Changed signature. Made static.
568 (i386_dr_low_get_addr): Likewise.
569 (i386_dr_low_set_control): Likewise.
570 (i386_dr_low_get_control): Likewise.
571 (i386_dr_low_get_status): Likewise.
572 (i386_dr_low): New global variable.
573 * win32-i386-low.c (i386_dr_low_set_addr):
574 Changed signature. Made static.
575 (i386_dr_low_get_addr): Likewise.
576 (i386_dr_low_set_control): Likewise.
577 (i386_dr_low_get_control): Likewise.
578 (i386_dr_low_get_status): Likewise.
579 (i386_dr_low): New global variable.
581 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
583 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
584 * Makefile.in (AR, AR_FLAGS): Define.
585 * configure: Regenerate.
587 2014-06-19 Gary Benson <gbenson@redhat.com>
589 * Makefile.in (i386-dregs.o): New rule.
590 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
591 * i386-low.c (target.h): Remove include.
592 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
593 (DR_CONTROL_SHIFT): Likewise.
594 (DR_CONTROL_SIZE): Likewise.
595 (DR_RW_EXECUTE): Likewise.
596 (DR_RW_WRITE): Likewise.
597 (DR_RW_READ): Likewise.
598 (DR_RW_IORW): Likewise.
599 (DR_LEN_1): Likewise.
600 (DR_LEN_2): Likewise.
601 (DR_LEN_4): Likewise.
602 (DR_LEN_8): Likewise.
603 (DR_LOCAL_ENABLE_SHIFT): Likewise.
604 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
605 (DR_ENABLE_SIZE): Likewise.
606 (DR_LOCAL_SLOWDOWN): Likewise.
607 (DR_GLOBAL_SLOWDOWN): Likewise.
608 (DR_CONTROL_RESERVED): Likewise.
609 (I386_DR_CONTROL_MASK): Likewise.
610 (I386_DR_VACANT): Likewise.
611 (I386_DR_LOCAL_ENABLE): Likewise.
612 (I386_DR_GLOBAL_ENABLE): Likewise.
613 (I386_DR_DISABLE): Likewise.
614 (I386_DR_SET_RW_LEN): Likewise.
615 (I386_DR_GET_RW_LEN): Likewise.
616 (I386_DR_WATCH_HIT): Likewise.
617 (i386_wp_op_t): Likewise.
618 (i386_show_dr): Likewise.
619 (i386_length_and_rw_bits): Likewise.
620 (i386_insert_aligned_watchpoint): Likewise.
621 (i386_remove_aligned_watchpoint): Likewise.
622 (i386_handle_nonaligned_watchpoint): Likewise.
623 i386_update_inferior_debug_regs(): Likewise.
624 (i386_dr_insert_watchpoint): Likewise.
625 (i386_dr_remove_watchpoint): Likewise.
626 (i386_dr_region_ok_for_watchpoint): Likewise.
627 (i386_dr_stopped_data_address): Likewise.
628 (i386_dr_stopped_by_watchpoint): Likewise.
630 2014-06-19 Gary Benson <gbenson@redhat.com>
632 * i386-low.c (i386_dr_show): Renamed to
633 i386_show_dr and made static. All uses updated.
634 (i386_dr_length_and_rw_bits): Renamed to
635 i386_length_and_rw_bits and made static.
637 (i386_dr_insert_aligned_watchpoint): Renamed to
638 i386_insert_aligned_watchpoint and made static.
640 (i386_dr_remove_aligned_watchpoint): Renamed to
641 i386_remove_aligned_watchpoint and made static.
643 (i386_dr_update_inferior_debug_regs): Renamed to
644 i386_update_inferior_debug_regs and made static.
647 2014-06-18 Gary Benson <gbenson@redhat.com>
649 * i386-low.h (i386_dr_low_can_set_addr): New macro.
650 (i386_dr_low_can_set_control): Likewise.
651 (i386_get_debug_register_length): Likewise.
652 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
653 (i386_dr_low_can_set_control): Likewise.
654 (i386_get_debug_register_length): Likewise.
656 2014-06-17 Gary Benson <gbenson@redhat.com>
658 * i386-low.h (i386-dregs.h): New include.
659 (DR_FIRSTADDR): Now in i386-dregs.h.
660 (DR_LASTADDR): Likewise.
661 (DR_NADDR): Likewise.
662 (DR_STATUS): Likewise.
663 (DR_CONTROL): Likewise.
664 (i386_debug_reg_state): Likewise.
665 (i386_dr_insert_watchpoint): Likewise.
666 (i386_dr_remove_watchpoint): Likewise.
667 (i386_dr_region_ok_for_watchpoint): Likewise.
668 (i386_dr_stopped_data_address): Likewise.
669 (i386_dr_stopped_by_watchpoint): Likewise.
670 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
672 2014-06-18 Gary Benson <gbenson@redhat.com>
674 * i386-low.h (i386_low_insert_watchpoint): Renamed to
675 i386_dr_insert_watchpoint.
676 (i386_low_remove_watchpoint): Renamed to
677 i386_dr_remove_watchpoint.
678 (i386_low_region_ok_for_watchpoint): Renamed to
679 i386_dr_region_ok_for_watchpoint.
680 (i386_low_stopped_data_address): Renamed to
681 i386_dr_stopped_data_address.
682 (i386_low_stopped_by_watchpoint): Renamed to
683 i386_dr_stopped_by_watchpoint.
684 * i386-low.c (i386_show_dr): Renamed to
685 i386_dr_show and made nonstatic. All uses updated.
686 (i386_length_and_rw_bits): Renamed to
687 i386_dr_length_and_rw_bits and made nonstatic.
689 (i386_insert_aligned_watchpoint): Renamed to
690 i386_dr_insert_aligned_watchpoint and made nonstatic.
692 (i386_remove_aligned_watchpoint): Renamed to
693 i386_dr_remove_aligned_watchpoint and made nonstatic.
695 (i386_update_inferior_debug_regs): Renamed to
696 i386_dr_update_inferior_debug_regs and made nonstatic.
698 (i386_low_insert_watchpoint): Renamed to
699 i386_dr_insert_watchpoint. All uses updated.
700 (i386_low_remove_watchpoint): Renamed to
701 i386_dr_remove_watchpoint. All uses updated.
702 (i386_low_region_ok_for_watchpoint): Renamed to
703 i386_dr_region_ok_for_watchpoint. All uses updated.
704 (i386_low_stopped_data_address): Renamed to
705 i386_dr_stopped_data_address. All uses updated.
706 (i386_low_stopped_by_watchpoint): Renamed to
707 i386_dr_stopped_by_watchpoint. All uses updated.
709 2014-06-18 Gary Benson <gbenson@redhat.com>
711 * i386-low.c (i386_dr_low_can_set_addr): New macro.
712 (i386_dr_low_can_set_control): Likewise.
713 (i386_insert_aligned_watchpoint): New check.
715 2014-06-18 Gary Benson <gbenson@redhat.com>
717 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
720 2014-06-18 Gary Benson <gbenson@redhat.com>
722 * i386-low.c (i386_length_and_rw_bits): Use internal_error
723 instead of fatal and error.
724 (i386_handle_nonaligned_watchpoint): Likewise.
726 2014-06-18 Gary Benson <gbenson@redhat.com>
728 * i386-low.c (i386_get_debug_register_length): New macro.
729 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
730 (i386_show_dr): Use debug_printf instead of fprintf. Use
731 phex to format values.
733 2014-06-18 Gary Benson <gbenson@redhat.com>
735 * i386-low.h: Comment changes.
736 * i386-low.c: Likewise.
738 2014-06-18 Gary Benson <gbenson@redhat.com>
740 * i386-low.c: Whitespace changes.
742 2014-06-12 Tom Tromey <tromey@redhat.com>
744 * utils.c (freeargv): Remove.
746 2014-06-12 Tom Tromey <tromey@redhat.com>
748 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
749 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
750 (parse_debug_format_options): Likewise.
751 (gdbserver_usage): Likewise.
752 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
753 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
754 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
756 ($(LIBGNU)): Depend on libiberty.
757 (all-lib): Recurse into all subdirs.
758 (install-only): Invoke "install" target in subdirs.
759 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
761 * configure: Rebuild.
762 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
763 for vasprintf, vsnprintf, or gettimeofday.
764 * configure.srv: Don't add safe-ctype.o or lbasename.o to
767 2014-06-05 Joel Brobecker <brobecker@adacore.com>
769 * development.sh: Delete.
770 * Makefile.in (config.status): Adjust dependency on development.sh.
771 * configure.ac: Adjust development.sh source call.
772 * configure: Regenerate.
774 2014-06-02 Pedro Alves <palves@redhat.com>
776 * ax.c (gdb_free_agent_expr): New function.
777 * ax.h (gdb_free_agent_expr): New declaration.
778 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
780 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
782 (clear_breakpoint_conditions_and_commands): New function.
783 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
784 (clear_breakpoint_conditions_and_commands): New declaration.
786 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
788 * linux-aarch64-low.c (asm/ptrace.h): Include.
790 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
792 Fix TLS access for -static -pthread.
793 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
794 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
795 (thread_db_load_search, try_thread_db_load_1): Initialize it.
797 2014-05-20 Pedro Alves <palves@redhat.com>
799 * linux-aarch64-low.c (aarch64_insert_point)
800 (aarch64_remove_point): No longer check whether the type is
801 supported here. Adjust to new interface.
802 (the_low_target): Install aarch64_supports_z_point_type as
803 supports_z_point_type method.
804 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
805 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
806 instead of a Z packet char. Adjust.
807 (arm_supports_z_point_type): New function.
808 (arm_insert_point, arm_remove_point): Adjust to new interface.
809 (the_low_target): Install arm_supports_z_point_type.
810 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
811 (cris_insert_point, cris_remove_point): Adjust to new interface.
812 Don't check whether the type is supported here.
813 (the_low_target): Install cris_supports_z_point_type.
814 * linux-low.c (linux_supports_z_point_type): New function.
815 (linux_insert_point, linux_remove_point): Adjust to new interface.
816 * linux-low.h (struct linux_target_ops) <insert_point,
817 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
818 raw_breakpoint pointer parameter.
819 <supports_z_point_type>: New method.
820 * linux-mips-low.c (mips_supports_z_point_type): New function.
821 (mips_insert_point, mips_remove_point): Adjust to new interface.
822 Use mips_supports_z_point_type.
823 (the_low_target): Install mips_supports_z_point_type.
824 * linux-ppc-low.c (the_low_target): Install NULL as
825 supports_z_point_type method.
826 * linux-s390-low.c (the_low_target): Install NULL as
827 supports_z_point_type method.
828 * linux-sparc-low.c (the_low_target): Install NULL as
829 supports_z_point_type method.
830 * linux-x86-low.c (x86_supports_z_point_type): New function.
831 (x86_insert_point): Adjust to new insert_point interface. Use
832 insert_memory_breakpoint. Adjust to new
833 i386_low_insert_watchpoint interface.
834 (x86_remove_point): Adjust to remove_point interface. Use
835 remove_memory_breakpoint. Adjust to new
836 i386_low_remove_watchpoint interface.
837 (the_low_target): Install x86_supports_z_point_type.
838 * lynx-low.c (lynx_target_ops): Install NULL as
839 supports_z_point_type callback.
840 * nto-low.c (nto_supports_z_point_type): New.
841 (nto_insert_point, nto_remove_point): Adjust to new interface.
842 (nto_target_ops): Install nto_supports_z_point_type.
843 * mem-break.c: Adjust intro comment.
844 (struct raw_breakpoint) <raw_type, size>: New fields.
845 <inserted>: Update comment.
846 <shlib_disabled>: Delete field.
847 (enum bkpt_type) <gdb_breakpoint>: Delete value.
848 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
849 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
850 (raw_bkpt_type_to_target_hw_bp_type): New function.
851 (find_enabled_raw_code_breakpoint_at): New function.
852 (find_raw_breakpoint_at): New type and size parameters. Use them.
853 (insert_memory_breakpoint): New function, based off
854 set_raw_breakpoint_at.
855 (remove_memory_breakpoint): New function.
856 (set_raw_breakpoint_at): Reimplement.
857 (set_breakpoint): New, based on set_breakpoint_at.
858 (set_breakpoint_at): Reimplement.
859 (delete_raw_breakpoint): Go through the_target->remove_point
860 instead of assuming memory breakpoints.
861 (find_gdb_breakpoint_at): Delete.
862 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
863 (find_gdb_breakpoint): New function.
864 (set_gdb_breakpoint_at): Delete.
865 (z_type_supported): New function.
866 (set_gdb_breakpoint_1): New function, loosely based off
867 set_gdb_breakpoint_at.
868 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
869 (delete_gdb_breakpoint_at): Delete.
870 (delete_gdb_breakpoint_1): New function, loosely based off
871 delete_gdb_breakpoint_at.
872 (delete_gdb_breakpoint): New function.
873 (clear_gdb_breakpoint_conditions): Rename to ...
874 (clear_breakpoint_conditions): ... this. Don't handle a NULL
876 (add_condition_to_breakpoint): Make static.
877 (add_breakpoint_condition): Take a struct breakpoint pointer
878 instead of an address. Adjust.
879 (gdb_condition_true_at_breakpoint): Rename to ...
880 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
882 (gdb_condition_true_at_breakpoint): Reimplement.
883 (add_breakpoint_commands): Take a struct breakpoint pointer
884 instead of an address. Adjust.
885 (gdb_no_commands_at_breakpoint): Rename to ...
886 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
887 parameter. Return true if no breakpoint was found. Change debug
889 (gdb_no_commands_at_breakpoint): Reimplement.
890 (run_breakpoint_commands): Rename to ...
891 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
892 and change return type to boolean.
893 (run_breakpoint_commands): New function.
894 (gdb_breakpoint_here): Also check for Z1 breakpoints.
895 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
896 breakpoint. Go through the_target->remove_point instead of
897 assuming memory breakpoint.
898 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
899 software and hardware breakpoints.
900 (reinsert_raw_breakpoint): Go through the_target->insert_point
901 instead of assuming memory breakpoint.
902 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
903 software and hardware breakpoints.
904 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
905 Check both software and hardware breakpoints.
906 (validate_inserted_breakpoint): Assert the breakpoint is a
907 software breakpoint. Set the inserted flag to -1 instead of
908 setting shlib_disabled.
909 (delete_disabled_breakpoints): Adjust.
910 (validate_breakpoints): Only validate software breakpoints.
911 Adjust to inserted flag change.
912 (check_mem_read, check_mem_write): Skip breakpoint types other
913 than software breakpoints. Adjust to inserted flag change.
914 * mem-break.h (enum raw_bkpt_type): New enum.
915 (raw_breakpoint, struct process_info): Forward declare.
916 (Z_packet_to_target_hw_bp_type): Delete declaration.
917 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
918 (set_gdb_breakpoint, delete_gdb_breakpoint)
919 (clear_breakpoint_conditions): New declarations.
920 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
921 (breakpoint_inserted_here): Update comment.
922 (add_breakpoint_condition, add_breakpoint_commands): Replace
923 address parameter with a breakpoint pointer parameter.
924 (gdb_breakpoint_here): Update comment.
925 (delete_gdb_breakpoint_at): Delete.
926 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
927 * server.c (process_point_options): Take a struct breakpoint
928 pointer instead of an address. Adjust.
929 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
930 delete_gdb_breakpoint.
931 * spu-low.c (spu_target_ops): Install NULL as
932 supports_z_point_type method.
933 * target.h: Include mem-break.h.
934 (struct target_ops) <prepare_to_access_memory>: Update comment.
935 <supports_z_point_type>: New field.
936 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
937 instead of a char. Also take a raw breakpoint pointer.
938 * win32-arm-low.c (the_low_target): Install NULL as
939 supports_z_point_type.
940 * win32-i386-low.c (i386_supports_z_point_type): New function.
941 (i386_insert_point, i386_remove_point): Adjust to new interface.
942 (the_low_target): Install i386_supports_z_point_type.
943 * win32-low.c (win32_supports_z_point_type): New function.
944 (win32_insert_point, win32_remove_point): Adjust to new interface.
945 (win32_target_ops): Install win32_supports_z_point_type.
946 * win32-low.h (struct win32_target_ops):
947 <supports_z_point_type>: New method.
948 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
949 instead of a char. Also take a raw breakpoint pointer.
951 2014-05-20 Pedro Alves <palves@redhat.com>
953 * mem-break.h: Include break-common.h.
954 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
955 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
956 (Z_packet_to_target_hw_bp_type): New declaration.
957 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
958 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
959 (Z_PACKET_ACCESS_WP): Delete macros.
960 (Z_packet_to_hw_type): Delete function.
961 * i386-low.h: Don't include break-common.h here.
962 (Z_packet_to_hw_type): Delete declaration.
963 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
964 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
965 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
966 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
967 * linux-aarch64-low.c: Don't include break-common.h here.
968 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
969 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
970 (Z_packet_to_target_hw_bp_type): Delete function.
971 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
973 (mips_insert_point, mips_remove_point): Use
974 Z_packet_to_target_hw_bp_type.
976 2014-05-20 Pedro Alves <palves@redhat.com>
978 * linux-aarch64-low.c: Include break-common.h.
979 (enum target_point_type): Delete.
980 (Z_packet_to_point_type): Rename to ...
981 (Z_packet_to_target_hw_bp_type): ... this, and return a
982 target_hw_bp_type instead.
983 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
984 instead of an enum target_point_type.
985 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
987 (aarch64_dr_state_insert_one_point)
988 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
989 (aarch64_handle_aligned_watchpoint)
990 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
991 Take an enum target_hw_bp_type instead of an enum
993 (aarch64_supports_z_point_type): New function.
994 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
995 use Z_packet_to_target_hw_bp_type.
997 2014-05-20 Joel Brobecker <brobecker@adacore.com>
999 * configure.ac: Only use -Werror by default when DEVELOPMENT
1001 * configure: Regenerate.
1003 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1005 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1006 * linux-x86-low.c (X86_64_USER_REGS): New.
1007 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1009 2014-04-28 Yao Qi <yao@codesourcery.com>
1011 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1014 2014-04-25 Pedro Alves <palves@redhat.com>
1017 * linux-low.c (linux_attach_fail_reason_string): New function.
1018 (linux_attach_lwp): Delete.
1019 (linux_attach_lwp_1): Rename to ...
1020 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1021 argument. Remove "initial" parameter. Return int instead of
1022 void. Don't error or warn here.
1023 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1024 failure to attach to the tgid. Call warning when failing to
1026 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1027 argument. Remove "initial" parameter. Return int instead of
1028 void. Don't error or warn here.
1029 (linux_attach_fail_reason_string): New declaration.
1030 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1031 interface change. Use linux_attach_fail_reason_string.
1033 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1034 Walfred Tedeschi <walfred.tedeschi@intel.com>
1036 * Makefile.in: Added rules to handle new files
1037 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1038 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1039 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1040 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1041 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1042 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1044 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1045 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1046 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1047 i386/x32-avx512.xml.
1048 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1049 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1050 i386/x32-avx512-linux.xml.
1051 * i387-fp.c (num_avx512_k_registers): New constant for number
1053 (num_avx512_zmmh_low_registers): New constant for number of
1054 lower ZMM registers (0-15).
1055 (num_avx512_zmmh_high_registers): New constant for number of
1056 higher ZMM registers (16-31).
1057 (num_avx512_ymmh_registers): New contant for number of higher
1058 YMM registers (ymm16-31 added by avx521 on x86_64).
1059 (num_avx512_xmm_registers): New constant for number of higher
1060 XMM registers (xmm16-31 added by AVX512 on x86_64).
1061 (struct i387_xsave): Add space for AVX512 registers.
1062 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1063 Add code to handle AVX512 registers.
1064 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1065 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1066 prototypei from generated file.
1067 (tdesc_amd64_avx512_linux): Likewise.
1068 (init_registers_x32_avx512_linux): Likewise.
1069 (tdesc_x32_avx512_linux): Likewise.
1070 (init_registers_i386_avx512_linux): Likewise.
1071 (tdesc_i386_avx512_linux): Likewise.
1072 (x86_64_regmap): Add AVX512 registers.
1073 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1075 (initialize_low_arch): Add code to initialize AVX512 registers.
1077 2014-04-23 Pedro Alves <palves@redhat.com>
1079 * mem-break.c (find_gdb_breakpoint_at): Make static.
1080 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1082 2014-04-23 Pedro Alves <palves@redhat.com>
1084 * i386-low.c: Don't include break-common.h here.
1085 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1086 prototype to take target_hw_bp_type as argument instead of a Z
1088 * i386-low.h: Include break-common.h here.
1089 (Z_packet_to_hw_type): Declare.
1090 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1092 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1093 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1094 (x86_remove_point): Convert the packet number to a
1095 target_hw_bp_type before calling i386_low_remove_watchpoint.
1096 * win32-i386-low.c (i386_insert_point): Convert the packet number
1097 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1098 (i386_remove_point): Convert the packet number to a
1099 target_hw_bp_type before calling i386_low_remove_watchpoint.
1101 2014-04-23 Pedro Alves <palves@redhat.com>
1103 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1105 2014-04-10 Pedro Alves <palves@redhat.com>
1107 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1108 Check if the condition or command is NULL before checking if the
1109 breakpoint is known. On success, return true.
1110 * mem-break.h (add_breakpoint_condition): Document return.
1111 (add_breakpoint_commands): Add describing comment.
1112 * server.c (skip_to_semicolon): New function.
1113 (process_point_options): Use it.
1115 2014-04-09 Pedro Alves <palves@redhat.com>
1117 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1120 2014-02-27 Pedro Alves <palves@redhat.com>
1123 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1125 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1127 (last_thread_of_process_p): Take a PID argument instead of a
1129 (linux_wait_for_lwp): Delete.
1130 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1132 (linux_low_filter_event): New function, party factored out from
1133 linux_wait_for_event.
1134 (linux_wait_for_event): Rename to ...
1135 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1136 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1137 sigsuspend. Check for zombie leaders.
1138 (linux_wait_for_event): Reimplement as wrapper around
1139 linux_wait_for_event_filtered.
1140 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1141 a normal or signal exit is seen, it's the whole process exiting.
1142 (wait_for_sigstop): No longer a for_each_inferior callback.
1143 Rewrite on top of linux_wait_for_event_filtered.
1144 (stop_all_lwps): Call wait_for_sigstop directly.
1145 * server.c (resume, handle_target_event): Handle
1146 TARGET_WAITKIND_NO_RESUMED.
1148 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1150 * win32-low.c (psapi_get_dll_name,
1151 * win32_CreateToolhelp32Snapshot): Delete.
1152 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1153 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1155 (handle_load_dll): Add function description.
1156 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1158 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1160 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1162 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1163 base address when calling win32_add_one_solib.
1164 (handle_load_dll): Delete local variable load_addr.
1165 Remove 0x1000 offset applied to DLL base address when calling
1166 win32_add_one_solib.
1167 (handle_unload_dll): Add comment.
1169 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1171 * win32-low.c (win32_add_all_dlls): Renames
1172 win32_ensure_ntdll_loaded. Rewrite function documentation.
1173 Adjust implementation to always load all DLLs.
1174 Add 0x1000 offset to DLL base address when calling
1175 win32_add_one_solib.
1176 (child_initialization_done): New static global.
1177 (do_initial_child_stuff): Set child_initialization_done to
1178 zero during child initialization, and 1 after. Replace call
1179 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1181 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1182 (handle_unload_dll): Add function documentation.
1183 (get_child_debug_event): Ignore load and unload DLL events
1184 during child initialization.
1186 2014-02-20 Doug Evans <dje@google.com>
1188 Remove global all_lwps.
1189 * inferiors.h (ptid_of): Move here from linux-low.h.
1190 (pid_of, lwpid_of): Ditto.
1191 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1192 parameter is a struct thread_info * now.
1193 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1194 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1195 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1197 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1198 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1199 * linux-arm-low.c (update_registers_callback): Update, "entry"
1200 parameter is a struct thread_info * now.
1201 Fetch lwpid from current_inferior directly.
1202 (arm_insert_point): Pass &all_threads to find_inferior instead of
1204 (arm_remove_point): Ditto.
1205 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1206 (arm_prepare_to_resume): Fetch pid from thread.
1207 (arm_read_description): Fetch lwpid from current_inferior directly.
1208 * linux-low.c (all_lwps): Delete.
1209 (delete_lwp): Delete call to remove_inferior.
1210 (handle_extended_wait): Fetch lwpid from thread.
1211 (add_lwp): Don't set lwp->entry.id. Remove call to
1212 add_inferior_to_list.
1213 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1214 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1215 (kill_one_lwp_callback): Ditto.
1216 (linux_kill): Don't dereference NULL pointer.
1217 Fetch ptid,lwpid from thread.
1218 (get_detach_signal): Fetch ptid from thread.
1219 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1220 Simplify call to regcache_invalidate_thread.
1221 (delete_lwp_callback): Update, "entry" parameter is a
1222 struct thread_info * now. Fetch pid from thread.
1223 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1224 (status_pending_p_callback): Update, "entry" parameter is a
1225 struct thread_info * now. Fetch ptid from thread.
1226 (find_lwp_pid): Update, "entry" parameter is a
1227 struct thread_info * now.
1228 (linux_wait_for_lwp): Fetch pid from thread.
1229 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1230 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1231 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1232 (dequeue_one_deferred_signal): Ditto.
1233 (cancel_breakpoint): Fetch ptid from current_inferior.
1234 (linux_wait_for_event): Pass &all_threads to find_inferior,
1235 not &all_lwps. Fetch ptid, lwpid from thread.
1236 (count_events_callback): Update, "entry" parameter is a
1237 struct thread_info * now.
1238 (select_singlestep_lwp_callback): Ditto.
1239 (select_event_lwp_callback): Ditto.
1240 (cancel_breakpoints_callback): Ditto.
1241 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1243 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1244 (unsuspend_one_lwp): Update, "entry" parameter is a
1245 struct thread_info * now.
1246 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1248 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1249 Fetch lwpid from thread, not lwp.
1250 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1251 Pass &all_threads to find_inferior, not &all_lwps.
1252 (send_sigstop): Fetch lwpid from thread, not lwp.
1253 (send_sigstop_callback): Update, "entry" parameter is a
1254 struct thread_info * now.
1255 (suspend_and_send_sigstop_callback): Ditto.
1256 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1257 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1258 struct thread_info * now.
1259 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1261 (lwp_running): Update, "entry" parameter is a
1262 struct thread_info * now.
1263 (stop_all_lwps): Fetch ptid from thread.
1264 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1265 (linux_resume_one_lwp): Fetch lwpid from thread.
1266 (linux_set_resume_request): Update, "entry" parameter is a
1267 struct thread_info * now. Fetch pid, lwpid from thread.
1268 (resume_status_pending_p): Update, "entry" parameter is a
1269 struct thread_info * now.
1270 (need_step_over_p): Ditto. Fetch lwpid from thread.
1271 (start_step_over): Fetch lwpid from thread.
1272 (linux_resume_one_thread): Update, "entry" parameter is a
1273 struct thread_info * now. Fetch lwpid from thread.
1274 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1275 (proceed_one_lwp): Update, "entry" parameter is a
1276 struct thread_info * now. Fetch lwpid from thread.
1277 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1278 struct thread_info * now.
1279 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1280 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1281 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1283 (regsets_store_inferior_registers): Ditto.
1284 (fetch_register, store_register): Ditto.
1285 (linux_read_memory, linux_write_memory): Ditto.
1286 (linux_request_interrupt): Ditto.
1287 (linux_read_auxv): Ditto.
1288 (linux_xfer_siginfo): Ditto.
1289 (linux_qxfer_spu): Ditto.
1290 (linux_qxfer_libraries_svr4): Ditto.
1291 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1292 moved to inferiors.h.
1294 (get_thread_lwp): Update.
1295 (struct lwp_info): Delete member "entry". Simplify comment for
1298 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1299 current_inferior directly.
1300 (update_watch_registers_callback): Update, "entry" parameter is a
1301 struct thread_info * now. Fetch pid from thread.
1302 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1303 (mips_insert_point): Fetch lwpid from current_inferior.
1304 Pass &all_threads to find_inferior, not &all_lwps.
1305 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1306 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1308 (mips_stopped_data_address): Ditto.
1309 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1311 * linux-tile-low.c (tile_arch_setup): Ditto.
1312 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1313 (update_debug_registers_callback): Update, "entry" parameter is a
1314 struct thread_info * now. Fetch pid from thread.
1315 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1316 Pass &all_threads to find_inferior, not &all_lwps.
1317 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1318 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1319 Pass &all_threads to find_inferior, not &all_lwps.
1320 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1321 (i386_dr_low_get_status): Ditto.
1322 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1323 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1324 (x86_linux_read_description): Ditto.
1325 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1327 2014-02-20 Doug Evans <dje@google.com>
1329 * inferiors.c (get_first_inferior): Fix buglet.
1331 2014-02-19 Doug Evans <dje@google.com>
1333 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1334 * inferiors.c (add_thread): Change result type to struct thread_info *.
1335 All callers updated.
1336 (add_lwp): Call add_thread here instead of in callers.
1337 All callers updated.
1338 * linux-low.h (get_lwp_thread): Rewrite.
1339 (struct lwp_info): New member "thread".
1341 2014-02-19 Doug Evans <dje@google.com>
1343 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1344 All callers updated.
1346 2014-02-19 Doug Evans <dje@google.com>
1348 * inferiors.c (add_thread): Fix whitespace.
1350 2014-02-19 Doug Evans <dje@google.com>
1352 * dll.c (clear_dlls): Replace accessing list implemention details
1354 * gdbthread.h (get_first_thread): Declare.
1355 * inferiors.c (for_each_inferior_with_data): New function.
1356 (get_first_thread): New function.
1357 (find_thread_ptid): Simplify.
1358 (get_first_inferior): New function.
1359 (clear_list): Delete.
1360 (one_inferior_p): New function.
1361 (clear_inferior_list): New function.
1362 (clear_inferiors): Update.
1363 * inferiors.h (for_each_inferior_with_data): Declare.
1364 (clear_inferior_list): Declare.
1365 (one_inferior_p): Declare.
1366 (get_first_inferior): Declare.
1367 * linux-low.c (linux_wait_for_event): Replace accessing list
1368 implemention details with API function.
1369 * server.c (target_running): Ditto.
1370 (accumulate_file_name_length): New function.
1371 (emit_dll_description): New function.
1372 (handle_qxfer_libraries): Replace accessing list implemention
1373 details with API function.
1374 (handle_qxfer_threads_worker): New function.
1375 (handle_qxfer_threads_proper): Replace accessing list implemention
1376 details with API function.
1377 (handle_query): Ditto.
1378 (visit_actioned_threads_callback_ftype): New typedef.
1379 (visit_actioned_threads_data): New struct.
1380 (visit_actioned_threads): Rewrite to be find_inferior callback.
1381 (resume): Call find_inferior.
1382 (handle_status): Replace accessing list implemention
1383 details with API function.
1384 (process_serial_event): Replace accessing list implemention details
1386 * target.c (set_desired_inferior): Replace accessing list implemention
1387 details with API function.
1388 * tracepoint.c (same_process_p): New function.
1389 (gdb_agent_about_to_close): Replace accessing list implemention
1390 details with API function.
1391 * win32-low.c (child_delete_thread): Replace accessing list
1392 implemention details with API function.
1393 (match_dll_by_basename): New function.
1394 (dll_is_loaded_by_basename): New function.
1395 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1396 details call to dll_is_loaded_by_basename.
1398 2014-02-19 Doug Evans <dje@google.com>
1400 * dll.h (struct dll_info): Add comment.
1401 * gdbthread.h (struct thread_info): Add comment.
1402 (current_ptid): Simplify.
1403 * inferiors.c (add_process): Update.
1404 (remove_process): Update.
1405 * inferiors.h (struct process_info): Rename member "head" to "entry".
1406 * linux-low.c (delete_lwp): Update.
1408 (last_thread_of_process_p): Update.
1409 (kill_one_lwp_callback, linux_kill): Update.
1410 (status_pending_p_callback): Update.
1411 (wait_for_sigstop): Update. Simplify read of ptid.
1412 (start_step_over): Update.
1413 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1414 (get_lwp_thread): Update.
1415 (struct lwp_info): Rename member "head" to "entry".
1416 * regcache.h (inferior_list_entry): Delete.
1417 * server.c (kill_inferior_callback): Update.
1418 (detach_or_kill_inferior_callback): Update.
1419 (print_started_pid): Update.
1420 (print_attached_pid): Update.
1421 (process_serial_event): Simplify read of ptid.
1422 * thread-db.c (thread_db_create_event): Update.
1423 (thread_db_get_tls_address): Update.
1424 * win32-low.c (current_inferior_ptid): Simplify.
1426 2014-02-19 Tom Tromey <tromey@redhat.com>
1428 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1430 (target_supports_btrace): Update.
1432 2014-02-14 Yao Qi <yao@codesourcery.com>
1434 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1435 (rsp-low-ipa.o): New target.
1437 2014-02-12 Tom Tromey <tromey@redhat.com>
1439 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1440 convert_ascii_to_int.
1441 * regcache.c (registers_to_string): Likewise.
1442 * remote-utils.c (decode_M_packet): Likewise.
1443 * server.c (process_serial_event): Likewise.
1445 2014-02-12 Tom Tromey <tromey@redhat.com>
1447 * server.c (handle_query, handle_v_run): Use hex2bin, not
1449 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1451 2014-02-12 Tom Tromey <tromey@redhat.com>
1453 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1454 convert_int_to_ascii.
1455 * regcache.c (registers_to_string, collect_register_as_string):
1457 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1459 * server.c (process_serial_event): Likewise.
1460 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1461 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1463 2014-02-12 Tom Tromey <tromey@redhat.com>
1465 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1466 bin2hex, not hexify.
1467 * tracepoint.c (cmd_qtstatus): Likewise.
1469 2014-02-12 Tom Tromey <tromey@redhat.com>
1471 * remote-utils.c (monitor_output): Pass explicit length to
1474 2014-02-12 Tom Tromey <tromey@redhat.com>
1476 * tracepoint.c: Include rsp-low.h.
1477 * server.c: Include rsp-low.h.
1478 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1479 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1481 * remote-utils.c: Include rsp-low.h.
1482 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1483 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1484 (convert_int_to_ascii, convert_ascii_to_int): Move to
1486 * regcache.c: Include rsp-low.h.
1487 * ax.c: Include rsp-low.h.
1488 * Makefile.in (SFILES): Add common/rsp-low.c.
1489 (OBS): Add rsp-low.o.
1490 (rsp-low.o): New target.
1492 2014-02-12 Tom Tromey <tromey@redhat.com>
1494 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1495 Include print-utils.h.
1496 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1497 (plongest, thirty_two, phex_nz): Remove.
1498 * Makefile.in (SFILES): Add common/print-utils.c.
1499 (OBS): Add print-utils.o.
1500 (print-utils-ipa.o): New target.
1501 (print-utils.o): New target.
1502 (IPA_OBJS): Add print-utils-ipa.o.
1504 2014-02-06 Tom Tromey <tromey@redhat.com>
1506 * Makefile.in (SFILES): Fix indentation.
1508 2014-02-05 Doug Evans <dje@google.com>
1510 * linux-low.c (linux_wait_for_event): Improve comment.
1511 (linux_wait_1): Keep current_inferior in sync with event_child.
1513 2014-01-22 Doug Evans <dje@google.com>
1515 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1517 2014-01-22 Doug Evans <dje@google.com>
1519 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1520 * configure: Regenerate.
1521 * config.in: Regenerate.
1522 * Makefile.in (SFILES): Add debug.c.
1524 * debug.c: New file.
1525 * debug.h: New file.
1526 * linux-aarch64-low.c (*): Update all debugging printfs to use
1527 debug_printf instead of fprintf.
1528 * linux-arm-low.c (*): Ditto.
1529 * linux-cris-low.c (*): Ditto.
1530 * linux-crisv32-low.c (*): Ditto.
1531 * linux-m32r-low.c (*): Ditto.
1532 * linux-sparc-low.c (*): Ditto.
1533 * linux-x86.c (*): Ditto.
1534 * linux-low.c (*): Ditto.
1535 (linux_wait_1): Add calls to debug_enter, debug_exit.
1536 (linux_wait): Remove redundant debugging printf.
1537 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1538 (linux_resume, unstop_all_lwps): Ditto.
1539 * mem-break.c (*): Update all debugging printfs to use
1540 debug_printf instead of fprintf.
1541 * remote-utils.c (*): Ditto.
1542 * thread-db.c (*): Ditto.
1543 * server.c #include <ctype.h>, "gdb_vecs.h".
1544 (debug_threads): Moved to debug.c.
1545 (*): Update all debugging printfs to use debug_printf instead of
1547 (start_inferior): Replace call to fflush with call to debug_flush.
1548 (monitor_show_help): Mention set debug-format.
1549 (parse_debug_format_options): New function.
1550 (handle_monitor_command): Handle "monitor set debug-format".
1551 (gdbserver_usage): Mention --debug-format.
1552 (main): Parse --debug-format.
1553 * server.h (debug_threads): Declaration moved to debug.h.
1555 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1556 trace_debug_1 that uses debug_printf.
1557 (tracepoint_look_up_symbols): Update all debugging printfs to use
1558 debug_printf instead of fprintf.
1560 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1562 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1565 2014-01-17 Pedro Alves <palves@redhat.com>
1568 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1569 defined after including gdb_proc_service.h.
1571 2014-01-16 Doug Evans <dje@google.com>
1573 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1574 (match_dll): Use it.
1576 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1578 * target.h (target_ops) <read_btrace>: Change parameters and
1579 return type to allow error reporting.
1580 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1581 trace reading errors on.
1582 * linux-low.c (linux_low_read_btrace): Pass trace reading
1584 (linux_low_disable_btrace): New.
1586 2014-01-15 Doug Evans <dje@google.com>
1588 * inferiors.c (thread_id_to_gdb_id): Delete.
1589 * inferiors.h (thread_id_to_gdb_id): Delete.
1591 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1593 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1594 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1597 2014-01-08 Pedro Alves <palves@redhat.com>
1599 * server.c (handle_status): Don't discard previous queued stop
1600 replies or thread's pending status here.
1601 (main) <disconnection>: Do it here instead.
1603 2014-01-08 Pedro Alves <palves@redhat.com>
1605 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1606 * server.c (visit_actioned_threads, handle_pending_status): New
1608 (handle_v_cont): Factor out parts to ...
1609 (resume): ... this new function. If in all-stop, and a thread
1610 being resumed has a pending status, report it without actually
1612 (myresume): Adjust to use the new 'resume' function.
1613 (clear_pending_status_callback, set_pending_status_callback)
1614 (find_status_pending_thread_callback): New functions.
1615 (handle_status): Handle the case of multiple threads having
1616 interesting statuses to report. Report threads' real last signal
1617 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1618 with an interesting thread to report the status for, instead of
1619 always reporting the status of the first thread.
1621 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1623 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1624 * gdbreplay.c (gdbreplay_version): Likewise.
1626 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1628 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1629 iov.iov_len with the real length in use.
1631 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1633 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1634 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1635 for all targets that use win32-low.c.
1636 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1637 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1639 2013-12-13 Pedro Alves <palves@redhat.com>
1641 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1642 if equal to TARGET_WAITKIND_LOADED.
1643 * win32-low.c (cached_status): New static global.
1644 (win32_wait): Add declaration.
1645 (do_initial_child_stuff): Flush all initial pending debug events
1646 up to the initial breakpoint.
1647 (win32_wait): If CACHED_STATUS was set, return that instead
1648 of doing a real wait. Remove the code resuming the execution
1649 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1650 during the initial phase. Also remove the code changing
1651 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1652 TARGET_WAITKIND_STOPPED.
1654 2013-12-11 Yao Qi <yao@codesourcery.com>
1656 * notif.c (handle_notif_ack): Return 0 if no notification
1659 2013-11-20 Doug Evans <dje@google.com>
1661 * linux-low.c (linux_set_resume_request): Fix comment.
1663 2013-11-20 Doug Evans <dje@google.com>
1665 * linux-low.c (resume_status_pending_p): Tweak comment.
1667 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1669 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1670 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1671 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1672 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1673 (srv_amd64_regobj): Add amd64-mpx.o.
1674 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1675 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1676 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1677 * i387-fp.c (num_pl_bnd_register) Added constant.
1678 (num_pl_bnd_cfg_registers) Added constant.
1679 (struct i387_xsave) Added reserved area and MPX fields.
1680 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1681 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1683 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1684 (init_registers_amd64_mpx_linux): Declare new function.
1685 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1686 (x86_64_regmap): Add MPX registers.
1687 (x86_linux_read_description): Add MPX case.
1688 (initialize_low_arch): Initialize MPX targets.
1690 2013-11-18 Tom Tromey <tromey@redhat.com>
1692 * configure: Rebuild.
1693 * configure.ac: Don't check for stdlib.h.
1694 * gdbreplay.c: Unconditionally include stdlib.h.
1696 2013-11-18 Tom Tromey <tromey@redhat.com>
1698 * config.in: Rebuild.
1699 * configure: Rebuild.
1700 * configure.ac: Don't use AC_HEADER_DIRENT.
1702 2013-11-18 Tom Tromey <tromey@redhat.com>
1704 * server.h: Don't check HAVE_STRING_H.
1705 * gdbreplay.c: Don't check HAVE_STRING_H.
1706 * configure: Rebuild.
1708 2013-11-18 Tom Tromey <tromey@redhat.com>
1710 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1713 2013-11-08 Tom Tromey <tromey@redhat.com>
1715 * configure, config.in: Rebuild.
1716 * configure.ac: Remove unused configury.
1718 2013-11-08 Tom Tromey <tromey@redhat.com>
1720 * acinclude.m4: Include common.m4, codeset.m4.
1721 * configure, config.in: Rebuild.
1722 * configure.ac: Use GDB_AC_COMMON.
1724 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1726 * linux-s390-low.c (HWCAP_S390_TE): New define.
1727 (s390_arch_setup): Consider the TE field in the HWCAP for
1728 determining 'have_regset_tdb'.
1730 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1733 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1736 2013-10-02 Pedro Alves <palves@redhat.com>
1738 * server.c (process_serial_event): Don't output "GDBserver
1739 exiting" if GDB is connected through stdio.
1740 * target.c (mywait): Likewise, be silent if GDB is connected
1743 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1745 * lynx-low.c (lynx_add_threads_after_attach): New function.
1746 (lynx_attach): Remove call to add_thread. Add call to
1747 lynx_add_threads_after_attach instead.
1749 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1751 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1752 * config.in, configure: Regenerated.
1754 2013-09-18 Yao Qi <yao@codesourcery.com>
1757 * server.c (start_inferior): Clear 'resume_info'.
1759 2013-09-16 Jiong Wang <jiwang@tilera.com>
1761 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1764 2013-09-16 Jiong Wang <jiwang@tilera.com>
1766 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1767 linux-tile-low.o to srv_tgtobj.
1769 2013-09-16 Will Newton <will.newton@linaro.org>
1771 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1774 2013-09-06 Pedro Alves <palves@redhat.com>
1776 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1777 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1778 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1779 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1780 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1781 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1783 2013-09-06 Pedro Alves <palves@redhat.com>
1785 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1786 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1788 2013-09-06 Pedro Alves <palves@redhat.com>
1790 * linux-amd64-ipa.c: Include tracepoint.h.
1791 * linux-i386-ipa.c: Include tracepoint.h.
1793 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1795 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1796 (ps_get_thread_area): New function.
1798 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1800 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1801 (initialize_low_arch): Call init_registers_crisv32 rather than
1802 init_register_crisv32.
1804 2013-09-05 Pedro Alves <palves@redhat.com>
1806 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1808 * hostio.h: ... this new file.
1809 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1810 win32-low.c: Include hostio.h.
1812 2013-09-05 Pedro Alves <palves@redhat.com>
1814 * server.h (gdb_client_data, handler_func, callback_handler_func)
1815 (delete_file_handler, add_file_handler, append_callback_event)
1816 (delete_callback_event, start_event_loop, initialize_event_loop):
1817 Move to event-loop.h and include it.
1818 * event-loop.h: New file.
1820 2013-09-05 Pedro Alves <palves@redhat.com>
1822 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1823 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1824 (loaded_dll, unloaded_dll): Move to ...
1825 * dll.h: ... this new file.
1826 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1828 2013-09-05 Pedro Alves <palves@redhat.com>
1830 * server.h (current_process, get_thread_process, all_processes)
1831 (add_inferior_to_list, for_each_inferior, current_inferior)
1832 (remove_inferior, add_process, remove_process, find_process_pid)
1833 (have_started_inferiors_p, have_attached_inferiors_p)
1834 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1835 (clear_inferiors, find_inferior, find_inferior_id)
1836 (inferior_target_data, set_inferior_target_data)
1837 (inferior_regcache_data, set_inferior_regcache_data): Move to
1838 inferiors.h, and include it.
1839 * inferiors.h: New file.
1841 2013-09-05 Pedro Alves <palves@redhat.com>
1843 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1847 2013-09-05 Pedro Alves <palves@redhat.com>
1849 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1851 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1852 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1853 (handle_tracepoint_general_set, handle_tracepoint_query)
1854 (tracepoint_finished_step, tracepoint_was_hit)
1855 (release_while_stepping_state_list, current_traceframe)
1856 (in_readonly_region, traceframe_read_mem)
1857 (fetch_traceframe_registers, traceframe_read_sdata)
1858 (traceframe_read_info, struct fast_tpoint_collect_status)
1859 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1860 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1861 (supply_fast_tracepoint_registers)
1862 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1863 (ipa_tdesc, claim_trampoline_space)
1864 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1865 (agent_mem_read, agent_get_trace_state_variable_value)
1866 (agent_set_trace_state_variable_value, agent_tsv_read)
1867 (agent_mem_read_string, get_raw_reg_func_addr)
1868 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1869 * tracepoint.h: ... this new file.
1871 2013-09-05 Pedro Alves <palves@redhat.com>
1873 * server.h (perror_with_name, error, fatal, warning, paddress)
1874 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1876 * utils.h: New file.
1878 2013-09-05 Pedro Alves <palves@redhat.com>
1880 * server.h (remote_debug, noack_mode, transport_is_reliable)
1881 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1882 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1883 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1884 (write_enn, initialize_async_io, enable_async_io)
1885 (disable_async_io, check_remote_input_interrupt_request)
1886 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1887 (dead_thread_notify, prepare_resume_reply)
1888 (decode_address_to_semicolon, decode_address, decode_m_packet)
1889 (decode_M_packet, decode_X_packet, decode_xfer_write)
1890 (decode_search_memory_packet, unhexify, hexify)
1891 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1892 (look_up_one_symbol, relocate_instruction)
1893 (monitor_output): Move to remote-utils.h, and include it.
1894 * remote-utils.h: New file.
1896 2013-09-05 Pedro Alves <palves@redhat.com>
1898 * server.h (_): Delete.
1900 2013-09-02 Pedro Alves <palves@redhat.com>
1902 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1903 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1905 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1907 2013-09-02 Pierre Muller <muller@sourceware.org>
1909 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1910 or WriteProcessMemory complete successfully and handle
1911 ERROR_PARTIAL_COPY error.
1913 2013-09-02 Pedro Alves <palves@redhat.com>
1915 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1916 error instead of EIO.
1918 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1921 * linux-low.c: Include filestuff.h.
1922 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1923 * lynx-low.c: Include filestuff.h.
1924 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1925 * server.c: Include filestuff.h.
1926 (main): Call notice_open_fds.
1927 * spu-low.c: Include filestuff.h.
1928 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1930 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
1932 * Makefile.in: Explain why ../target and ../nat are not
1933 listed as include file search paths.
1934 (linux-waitpid.o): New object file rule.
1935 * configure.srv (srv_native_linux_obj): New variable.
1936 Replace all occurrences of linux native object files with
1937 $srv_native_linux_obj.
1938 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1939 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1940 (linux_enable_event_reporting): Remove declaration.
1941 (my_waitpid): Moved to common/linux-waitpid.c.
1942 (linux_wait_for_event): Pass ptid when calling
1943 linux_enable_event_reporting.
1944 (linux_supports_tracefork_flag): Remove.
1945 (linux_enable_event_reporting): Likewise.
1946 (linux_tracefork_grandchild): Remove.
1947 (STACK_SIZE): Moved to common/linux-ptrace.c.
1948 (linux_tracefork_child): Remove.
1949 (linux_test_for_tracefork): Remove.
1950 (linux_look_up_symbols): Call linux_supports_traceclone.
1951 (initialize_low): Remove call to linux_test_for_tracefork.
1952 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1953 common/linux-ptrace.h.
1954 (PTRACE_TYPE_ARG4): Likewise.
1955 Include linux-ptrace.h.
1957 2013-08-21 Pedro Alves <palves@redhat.com>
1959 * config.in: Renegerate.
1961 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
1963 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1964 (SFILES): Remove $(srcdir)/common/target-common.c and
1965 add $(srcdir)/target/waitstatus.c.
1966 (OBS): Remove target-common.o and add waitstatus.o.
1967 (server_h): Remove $(srcdir)/../common/target-common.h and
1968 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1969 and $(srcdir)/../target/waitstatus.h.
1970 (target-common.o): Remove.
1971 (waitstatus.o): New target object file.
1972 * target.h: Do not include target-common.h and
1973 include target/resume.h, target/wait.h and
1974 target/waitstatus.h.
1976 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
1978 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1979 to PTRACE_TYPE_ARG3.
1980 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1981 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1983 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1984 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1986 2013-07-27 Jie Zhang <jie@codesourcery.com>
1987 Daniel Jacobowitz <dan@codesourcery.com>
1988 Yao Qi <yao@codesourcery.com>
1990 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1991 (mips-linux-watch.o): New rule.
1992 (mips_linux_watch_h): New variable.
1993 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1995 * linux-mips-low.c: Include mips-linux-watch.h.
1996 (struct arch_process_info, struct arch_lwp_info): New.
1997 (update_watch_registers_callback): New function.
1998 (mips_linux_new_process, mips_linux_new_thread) New functions.
1999 (mips_linux_prepare_to_resume, mips_insert_point): New
2001 (mips_remove_point, mips_stopped_by_watchpoint): New
2003 (rsp_bp_type_to_target_hw_bp_type): New function.
2004 (mips_stopped_data_address): New function.
2005 (the_low_target): Add watchpoint support functions.
2007 2013-07-27 Yao Qi <yao@codesourcery.com>
2009 * i386-low.c: Include break-common.h.
2010 (enum target_hw_bp_type): Remove.
2012 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2014 * Makefile.in (SFILES): /common/target-common.c.
2015 (OBS): Add target-common.o.
2016 (server_h): Add $(srcdir)/../common/target-common.h.
2017 (target-common.o): New target.
2018 * server.c (queue_stop_reply_callback): Free
2019 status string after use.
2020 * target.c (target_waitstatus_to_string): Remove.
2021 * target.h: Include target-common.h.
2022 (resume_kind): Likewise.
2023 (target_waitkind): Likewise.
2024 (target_waitstatus): Likewise.
2025 (TARGET_WNOHANG): Likewise.
2027 2013-07-04 Yao Qi <yao@codesourcery.com>
2029 * Makefile.in (host_alias): Use @host_noncanonical@.
2030 (target_alias): Use @target_noncanonical@.
2031 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2032 ACX_NONCANONICAL_HOST.
2033 * configure: Regenerated.
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-07-03 Pedro Alves <palves@redhat.com>
2045 * Makefile.in (config.status): Depend on development.sh.
2046 * acinclude.m4: Include libmcheck.m4.
2047 * configure: Regenerate.
2049 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2051 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2052 attribute inside the parentheses.
2053 (winapi_DebugSetProcessKillOnExit): Ditto.
2054 (winapi_DebugBreakProcess): Ditto.
2055 (winapi_GenerateConsoleCtrlEvent): Ditto.
2057 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2059 * notif.h (notif_event): Add a dummy member to avoid compiler
2062 2013-07-01 Pedro Alves <palves@redhat.com>
2064 * hostio.c (HOSTIO_PATH_MAX): Define.
2065 (require_filename, handle_open, handle_unlink, handle_readlink):
2068 2013-07-01 Pedro Alves <palves@redhat.com>
2070 * server.h: Include "pathmax.h".
2071 * linux-low.c: Don't include sys/param.h.
2072 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2074 * win32-low.c: Don't include sys/param.h.
2075 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2077 2013-07-01 Pedro Alves <palves@redhat.com>
2079 * event-loop.c: Don't check HAVE_UNISTD_H before including
2081 * gdbreplay.c: Likewise.
2082 * remote-utils.c: Likewise.
2083 * server.c: Likewise.
2084 * configure.ac: Don't check for unistd.h.
2085 * configure: Regenerate.
2087 2013-06-28 Tom Tromey <tromey@redhat.com>
2089 * Makefile.in (version.c): Use version.in, not
2092 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2094 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2095 * configure: Rebuild.
2096 * Makefile.in (version_host, version_target): Get from configure.
2097 (version.c): Use $(version_host) and $(version_target).
2099 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2101 Fix trace-status to output user name without trailing colon.
2102 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2104 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2106 Fix trace-status to output proper start-time and stop-time.
2107 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2108 output start time and stop time in hex as gdb expects.
2110 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2112 * tracepoint.c (build_traceframe_info_xml): Output trace state
2113 variables present in the trace buffer.
2115 2013-06-24 Tom Tromey <tromey@redhat.com>
2117 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2119 (version.o): Remove.
2120 * gdbreplay.c: Include version.h.
2121 (version, host_name): Don't declare.
2122 * server.h: Include version.h.
2123 (version, host_name): Don't declare.
2125 2013-06-12 Pedro Alves <palves@redhat.com>
2127 * linux-x86-low.c (linux_is_elf64): Delete global.
2128 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2129 with local linux_pid_exe_is_elf_64_file use.
2131 2013-06-11 Pedro Alves <palves@redhat.com>
2133 * linux-low.c (regset_disabled, disable_regset): New functions.
2134 (regsets_fetch_inferior_registers)
2135 (regsets_store_inferior_registers): Use them.
2136 (initialize_regsets_info); Don't allocate the disabled_regsets
2138 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2141 2013-06-11 Pedro Alves <palves@redhat.com>
2143 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2146 2013-06-11 Pedro Alves <palves@redhat.com>
2148 * linux-x86-low.c (initialize_low_arch): Call
2149 init_registers_x32_avx_linux.
2151 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2153 Fix compatibility with Android Bionic.
2154 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2157 2013-06-07 Pedro Alves <palves@redhat.com>
2160 * Makefile.in (OBS): Add tdesc.o.
2161 (IPA_OBJS): Add tdesc-ipa.o.
2162 (tdesc-ipa.o): New rule.
2163 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2165 * linux-low.c (new_inferior): Delete.
2166 (disabled_regsets, num_regsets): Delete.
2167 (linux_add_process): Adjust to set the new per-process
2169 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2170 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2171 was a stop. When calling arch_setup, switch the current inferior
2172 to the thread that got an event.
2173 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2174 (regsets_fetch_inferior_registers)
2175 (regsets_store_inferior_registers): New regsets_info parameter.
2177 (linux_register_in_regsets): New regs_info parameter. Adjust to
2179 (register_addr, fetch_register, store_register): New usrregs_info
2180 parameter. Adjust to use it.
2181 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2182 parameter regs_info. Adjust to use it.
2183 (linux_fetch_registers): Get the current inferior's regs_info, and
2185 (linux_store_registers): Ditto.
2186 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2187 (initialize_low): Don't initialize the target_regsets here. Call
2188 initialize_low_arch.
2189 * linux-low.h (target_regsets): Delete declaration.
2190 (struct regsets_info): New.
2191 (struct usrregs_info): New.
2192 (struct regs_info): New.
2193 (struct process_info_private) <new_inferior>: New field.
2194 (struct linux_target_ops): Delete the num_regs, regmap, and
2195 regset_bitmap fields. New field regs_info.
2196 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2197 * i387-fp.c (num_xmm_registers): Delete.
2198 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2199 calls to new interface.
2200 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2201 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2202 Infer the number of xmm registers from the regcache's target
2204 * i387-fp.h (num_xmm_registers): Delete.
2205 * inferiors.c (add_thread): Don't install the thread's regcache
2207 * proc-service.c (gregset_info): Fetch the current inferior's
2208 regs_info. Adjust to use it.
2209 * regcache.c: Include tdesc.h.
2210 (register_bytes, reg_defs, num_registers)
2211 (gdbserver_expedite_regs): Delete.
2212 (get_thread_regcache): If the thread doesn't have a regcache yet,
2213 create one, instead of aborting gdbserver.
2214 (regcache_invalidate_one): Rename to ...
2215 (regcache_invalidate_thread): ... this.
2216 (regcache_invalidate_one): New.
2217 (regcache_invalidate): Only invalidate registers of the current
2219 (init_register_cache): Add target_desc parameter, and use it.
2220 (new_register_cache): Ditto. Assert the target description has a
2221 non zero registers_size.
2222 (regcache_cpy): Add assertions. Adjust.
2223 (realloc_register_cache, set_register_cache): Delete.
2224 (registers_to_string, registers_from_string): Adjust.
2225 (find_register_by_name, find_regno, find_register_by_number)
2226 (register_cache_size): Add target_desc parameter, and use it.
2227 (free_register_cache_thread, free_register_cache_thread_one)
2228 (regcache_release, register_cache_size): New.
2229 (register_size): Add target_desc parameter, and use it.
2230 (register_data, supply_register, supply_register_zeroed)
2231 (supply_regblock, supply_register_by_name, collect_register)
2232 (collect_register_as_string, collect_register_by_name): Adjust.
2233 * regcache.h (struct target_desc): Forward declare.
2234 (struct regcache) <tdesc>: New field.
2235 (init_register_cache, new_register_cache): Add target_desc
2237 (regcache_invalidate_thread): Declare.
2238 (regcache_invalidate_one): Delete declaration.
2239 (regcache_release): Declare.
2240 (find_register_by_number, register_cache_size, register_size)
2241 (find_regno): Add target_desc parameter.
2242 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2244 * remote-utils.c: Include tdesc.h.
2245 (outreg, prepare_resume_reply): Adjust.
2246 * server.c: Include tdesc.h.
2247 (gdbserver_xmltarget): Delete declaration.
2248 (get_features_xml, process_serial_event): Adjust.
2249 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2251 (struct process_info) <tdesc>: New field.
2252 (ipa_tdesc): Declare.
2253 * tdesc.c: New file.
2254 * tdesc.h: New file.
2255 * tracepoint.c: Include tdesc.h.
2256 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2257 (get_context_regcache): Adjust to pass ipa_tdesc down.
2258 (do_action_at_tracepoint): Adjust to get the register cache size
2259 from the context regcache's description.
2260 (traceframe_walk_blocks): Adjust to get the register cache size
2261 from the current trace frame's description.
2262 (traceframe_get_pc): Adjust to get current trace frame's
2263 description and pass it down.
2264 (gdb_collect): Adjust to get the register cache size from the
2266 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2267 (gdbserver_xmltarget): Delete.
2268 (initialize_low_tracepoint): Set the ipa's target description.
2269 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2270 (initialize_low_tracepoint): Set the ipa's target description.
2271 * linux-x86-low.c: Include tdesc.h.
2272 [__x86_64__] (is_64bit_tdesc): New.
2273 (ps_get_thread_area, x86_get_thread_area): Use it.
2274 (i386_cannot_store_register): Rename to ...
2275 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2276 (i386_cannot_fetch_register): Rename to ...
2277 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2278 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2280 (target_regsets): Rename to ...
2281 (x86_regsets): ... this.
2282 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2284 (x86_siginfo_fixup): Use is_64bit_tdesc.
2285 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2286 (tdesc_x32_avx_linux, tdesc_x32_linux)
2287 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2289 (x86_linux_update_xmltarget): Delete.
2290 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2291 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2292 (AMD64_LINUX_USER64_CS): New.
2293 (x86_linux_read_description): New, based on
2294 x86_linux_update_xmltarget.
2295 (same_process_callback): New.
2296 (x86_arch_setup_process_callback): New.
2297 (x86_linux_update_xmltarget): New.
2298 (x86_regsets_info): New.
2299 (amd64_linux_regs_info): New.
2300 (i386_linux_usrregs_info): New.
2301 (i386_linux_regs_info): New.
2302 (x86_linux_regs_info): New.
2303 (x86_arch_setup): Reimplement.
2304 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2305 (x86_emit_ops): Ditto.
2306 (the_low_target): Adjust. Install x86_linux_regs_info,
2307 x86_cannot_fetch_register, and x86_cannot_store_register.
2308 (initialize_low_arch): New.
2309 * linux-ia64-low.c (tdesc_ia64): Declare.
2310 (ia64_fetch_register): Adjust.
2311 (ia64_usrregs_info, regs_info): New globals.
2312 (ia64_regs_info): New function.
2313 (the_low_target): Adjust.
2314 (initialize_low_arch): New function.
2315 * linux-sparc-low.c (tdesc_sparc64): Declare.
2316 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2318 (sparc_arch_setup): New function.
2319 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2320 (the_low_target): Adjust.
2321 (initialize_low_arch): New function.
2322 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2323 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2324 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2325 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2326 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2327 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2328 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2329 (tdesc_powerpc_isa205_vsx64l): Declare.
2330 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2331 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2332 (ppc_set_pc, ppc_get_hwcap): Adjust.
2333 (ppc_usrregs_info): Forward declare.
2334 (!__powerpc64__) ppc_regmap_adjusted: New global.
2335 (ppc_arch_setup): Adjust to the current process'es target
2337 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2338 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2339 (ppc_store_evrregset): Adjust.
2340 (target_regsets): Rename to ...
2341 (ppc_regsets): ... this, and make static.
2342 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2343 (ppc_regs_info): New function.
2344 (the_low_target): Adjust.
2345 (initialize_low_arch): New function.
2346 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2347 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2348 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2349 (tdesc_s390x_linux64v2): Declare.
2350 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2351 (s390_fill_gregset, s390_store_last_break): Adjust.
2352 (target_regsets): Rename to ...
2353 (s390_regsets): ... this, and make static.
2354 (s390_get_pc, s390_set_pc): Adjust.
2355 (s390_get_hwcap): New target_desc parameter, and use it.
2356 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2357 (s390_arch_setup): Adjust to set the current process'es target
2358 description. Don't adjust the regmap.
2359 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2360 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2361 (regs_info_3264): New globals.
2362 (s390_regs_info): New function.
2363 (the_low_target): Adjust.
2364 (initialize_low_arch): New function.
2365 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2366 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2367 [__mips64] (init_registers_mips_linux)
2368 (init_registers_mips_dsp_linux): Delete defines.
2369 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2370 (have_dsp): New global.
2371 (mips_read_description): New, based on mips_arch_setup.
2372 (mips_arch_setup): Reimplement.
2373 (get_usrregs_info): New function.
2374 (mips_cannot_fetch_register, mips_cannot_store_register)
2375 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2376 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2377 (target_regsets): Rename to ...
2378 (mips_regsets): ... this, and make static.
2379 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2380 (dsp_regs_info, regs_info): New globals.
2381 (mips_regs_info): New function.
2382 (the_low_target): Adjust.
2383 (initialize_low_arch): New function.
2384 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2385 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2387 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2388 (arm_read_description): New, with bits factored from
2390 (arm_arch_setup): Reimplement.
2391 (target_regsets): Rename to ...
2392 (arm_regsets): ... this, and make static.
2393 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2394 (arm_regs_info): New function.
2395 (the_low_target): Adjust.
2396 (initialize_low_arch): New function.
2397 * linux-m68k-low.c (tdesc_m68k): Declare.
2398 (target_regsets): Rename to ...
2399 (m68k_regsets): ... this, and make static.
2400 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2401 (m68k_regs_info): New function.
2402 (m68k_arch_setup): New function.
2403 (the_low_target): Adjust.
2404 (initialize_low_arch): New function.
2405 * linux-sh-low.c (tdesc_sharch): Declare.
2406 (target_regsets): Rename to ...
2407 (sh_regsets): ... this, and make static.
2408 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2409 (sh_regs_info, sh_arch_setup): New functions.
2410 (the_low_target): Adjust.
2411 (initialize_low_arch): New function.
2412 * linux-bfin-low.c (tdesc_bfin): Declare.
2413 (bfin_arch_setup): New function.
2414 (bfin_usrregs_info, regs_info): New globals.
2415 (bfin_regs_info): New function.
2416 (the_low_target): Adjust.
2417 (initialize_low_arch): New function.
2418 * linux-cris-low.c (tdesc_cris): Declare.
2419 (cris_arch_setup): New function.
2420 (cris_usrregs_info, regs_info): New globals.
2421 (cris_regs_info): New function.
2422 (the_low_target): Adjust.
2423 (initialize_low_arch): New function.
2424 * linux-cris-low.c (tdesc_crisv32): Declare.
2425 (cris_arch_setup): New function.
2426 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2427 (cris_regs_info): New function.
2428 (the_low_target): Adjust.
2429 (initialize_low_arch): New function.
2430 * linux-m32r-low.c (tdesc_m32r): Declare.
2431 (m32r_arch_setup): New function.
2432 (m32r_usrregs_info, regs_info): New globals.
2433 (m32r_regs_info): Adjust.
2434 (initialize_low_arch): New function.
2435 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2436 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2437 (tic6x_usrregs_info): Forward declare.
2438 (tic6x_read_description): New function, based on ...
2439 (tic6x_arch_setup): ... this. Reimplement.
2440 (target_regsets): Rename to ...
2441 (tic6x_regsets): ... this, and make static.
2442 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2443 (tic6x_regs_info): New function.
2444 (the_low_target): Adjust.
2445 (initialize_low_arch): New function.
2446 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2447 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2448 (target_regsets): Rename to ...
2449 (xtensa_regsets): ... this, and make static.
2450 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2452 (xtensa_arch_setup, xtensa_regs_info): New functions.
2453 (the_low_target): Adjust.
2454 (initialize_low_arch): New function.
2455 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2456 (nios2_arch_setup): Set the current process'es tdesc.
2457 (target_regsets): Rename to ...
2458 (nios2_regsets): ... this.
2459 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2460 (nios2_regs_info): New function.
2461 (the_low_target): Adjust.
2462 (initialize_low_arch): New function.
2463 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2464 (aarch64_arch_setup): Set the current process'es tdesc.
2465 (target_regsets): Rename to ...
2466 (aarch64_regsets): ... this.
2467 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2468 (aarch64_regs_info): New function.
2469 (the_low_target): Adjust.
2470 (initialize_low_arch): New function.
2471 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2473 (target_regsets): Rename to ...
2474 (tile_regsets): ... this.
2475 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2476 (tile_regs_info): New function.
2477 (tile_arch_setup): Set the current process'es tdesc.
2478 (the_low_target): Adjust.
2479 (initialize_low_arch): New function.
2480 * spu-low.c (tdesc_spu): Declare.
2481 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2482 * win32-arm-low.c (tdesc_arm): Declare.
2483 (arm_arch_setup): New function.
2484 (the_low_target): Install arm_arch_setup instead of
2486 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2487 (init_windows_x86): Rename to ...
2488 (i386_arch_setup): ... this. Set `win32_tdesc'.
2489 (the_low_target): Adjust.
2490 * win32-low.c (win32_tdesc): New global.
2491 (child_add_thread): Don't create the thread cache here.
2492 (do_initial_child_stuff): Set the new process'es tdesc.
2493 * win32-low.h (struct target_desc): Forward declare.
2494 (win32_tdesc): Declare.
2495 * lynx-i386-low.c (tdesc_i386): Declare global.
2496 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2497 * lynx-low.c (lynx_tdesc): New global.
2498 (lynx_add_process): Set the new process'es tdesc.
2499 * lynx-low.h (struct target_desc): Forward declare.
2500 (lynx_tdesc): Declare global.
2501 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2502 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2503 * nto-low.c (nto_tdesc): New global.
2504 (do_attach): Set the new process'es tdesc.
2505 * nto-low.h (struct target_desc): Forward declare.
2506 (nto_tdesc): Declare.
2507 * nto-x86-low.c (tdesc_i386): Declare.
2508 (nto_x86_arch_setup): Set `nto_tdesc'.
2510 2013-06-04 Gary Benson <gbenson@redhat.com>
2512 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2513 to qSupported response when appropriate.
2514 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2515 with nonzero-length annex.
2516 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2517 arguments supplied in annex.
2519 2013-05-31 Doug Evans <dje@google.com>
2522 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2523 64 bits in 64-cross-32 environment.
2525 2013-05-28 Pedro Alves <palves@redhat.com>
2527 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2528 (aarch64-without-fpu.c): Delete rule.
2529 * configure.srv (aarch64*-*-linux*): Remove references to
2530 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2531 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2534 2013-05-24 Pedro Alves <palves@redhat.com>
2536 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2537 instead of strchr/decode_address. Error if the range isn't split
2538 with a ','. Don't assume there's be a ':' in the action.
2540 2013-05-23 Yao Qi <yao@codesourcery.com>
2541 Pedro Alves <palves@redhat.com>
2543 * linux-low.c (lwp_in_step_range): New function.
2544 (linux_wait_1): If the thread was range stepping and stopped
2545 outside the stepping range, report the stop to GDB. Otherwise,
2546 continue stepping. Add range stepping debug output.
2547 (linux_set_resume_request): Copy the step range from the resume
2549 (linux_supports_range_stepping): New.
2550 (linux_target_ops) <supports_range_stepping>: Set to
2551 linux_supports_range_stepping.
2552 * linux-low.h (struct linux_target_ops)
2553 <supports_range_stepping>: New field.
2554 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2555 * linux-x86-low.c (x86_supports_range_stepping): New.
2556 (the_low_target) <supports_range_stepping>: Set to
2557 x86_supports_range_stepping.
2558 * server.c (handle_v_cont): Handle 'r' action.
2559 (handle_v_requests): Append ";r" if the target supports range
2561 * target.h (struct thread_resume) <step_range_start,
2562 step_range_end>: New fields.
2563 (struct target_ops) <supports_range_stepping>:
2565 (target_supports_range_stepping): New macro.
2567 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2569 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2570 confusion in comment.
2572 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2574 * lynx-low.c (struct process_info_private): New type.
2575 (lynx_add_process): New function.
2576 (lynx_create_inferior, lynx_attach): Replace calls to
2577 add_process by calls to lynx_add_process.
2578 (lynx_resume): If PTID is null, then try using
2579 current_process()->private->last_wait_event_ptid.
2581 (lynx_clear_inferiors): Delete. The contents of that function
2582 has been inlined in lynx_mourn;
2583 (lynx_wait_1): Save the ptid in the process's private data.
2584 (lynx_mourn): Free the process' private data. Replace call
2585 to lynx_clear_inferiors by call to clear_inferiors.
2587 2013-05-17 Yao Qi <yao@codesourcery.com>
2589 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2592 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2594 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2595 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2596 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2597 PT_TEXT_END_ADDR guards. Update comments.
2598 (linux_target_op) <read_offsets>: Conditionally define to
2599 linux_read_offsets if the target is UCLIBC and if it defines
2600 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2602 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2603 Andrew Jenner <andrew@codesourcery.com>
2605 * Makefile.in (SFILES): Add linux-nios2-low.c.
2606 (clean): Add action to delete nios2-linux.c.
2607 (nios2-linux.c): New rule.
2608 * configure.srv: Add nios2*-*-linux*.
2609 * linux-nios2-low.c: New.
2611 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2613 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2615 2013-04-25 Hui Zhu <hui@codesourcery.com>
2618 * ax.c (ax_printf): Add fflush.
2620 2013-04-22 Tom Tromey <tromey@redhat.com>
2622 * Makefile.in (SFILES): Add filestuff.c.
2623 (OBS): Add filestuff.o.
2624 (filestuff.o): New target.
2625 * config.in, configure: Rebuild.
2626 * configure.ac: Check for fdwalk, pipe2.
2628 2013-04-17 Pedro Alves <palves@redhat.com>
2630 * configure.ac (USE_THREAD_DB): Delete variable.
2631 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2632 Don't AC_SUBST USE_THREAD_DB.
2633 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2634 * config.in, configure: Regenerate.
2636 2013-04-16 Pedro Alves <palves@redhat.com>
2638 * linux-low.h (struct lwp_info) <thread_known>: Move under
2639 the USE_THREAD_DB #ifdef.
2641 2013-04-16 Pedro Alves <palves@redhat.com>
2643 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2644 (linux-low.o): Delete rule.
2645 * linux-low.h: Always include "gdb_thread_db.h" instead of
2646 conditionally including thread_db.h.
2647 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2650 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2652 * Makefile.in (install-only): Fix make install regression.
2654 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2656 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2657 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2659 * gdbserver.1: Remove.
2661 2013-03-22 Pedro Alves <palves@redhat.com>
2663 * linux-low.c (handle_extended_wait): Don't call
2664 linux_enable_event_reporting.
2666 2013-03-15 Tony Theodore <tonyt@logyst.com>
2669 * Makefile.in (SHELL): Use @SHELL@.
2671 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2673 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2676 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2678 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2679 Remove extraneous NULL element.
2681 2013-03-13 Yao Qi <yao@codesourcery.com>
2683 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2684 'V' block in trace frame.
2686 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2688 * target.h (struct target_ops): Add btrace ops.
2689 (target_supports_btrace): New macro.
2690 (target_enable_btrace): New macro.
2691 (target_disable_btrace): New macro.
2692 (target_read_btrace): New macro.
2693 * gdbthread.h (struct thread_info): Add btrace field.
2694 * server.c: Include btrace-common.h.
2695 (handle_btrace_general_set): New function.
2696 (handle_btrace_enable): New function.
2697 (handle_btrace_disable): New function.
2698 (handle_general_set): Call handle_btrace_general_set.
2699 (handle_qxfer_btrace): New function.
2700 (struct qxfer qxfer_packets[]): Add btrace entry.
2701 * inferiors.c (remove_thread): Disable btrace.
2702 * linux-low: Include linux-btrace.h.
2703 (linux_low_enable_btrace): New function.
2704 (linux_low_read_btrace): New function.
2705 (linux_target_ops): Add btrace ops.
2706 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2707 Add srv_linux_btrace=yes.
2708 (x86_64-*-linux*): Add linux-btrace.o.
2709 Add srv_linux_btrace=yes.
2710 * configure.ac: Define HAVE_LINUX_BTRACE.
2711 * config.in: Regenerated.
2712 * configure: Regenerated.
2714 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2716 * server.c (handle_qxfer): Preserve error message if -3 is
2718 (qxfer): Document the -3 return value.
2720 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2722 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2723 (linux_btrace_h): New variable.
2724 (linux-btrace.o): New rule.
2726 2013-03-08 Stan Shebs <stan@codesourcery.com>
2727 Hafiz Abid Qadeer <abidh@codesourcery.com>
2729 * tracepoint.c (trace_buffer_size): New global.
2730 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2731 (init_trace_buffer): Change to one-argument function. Allocate
2732 trace buffer memory.
2733 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2734 handle QTBuffer:size packet.
2735 (cmd_bigqtbuffer_size): New function.
2736 (initialize_tracepoint): Call init_trace_buffer with
2737 DEFAULT_TRACE_BUFFER_SIZE.
2738 * server.c (handle_query): Add QTBuffer:size in the
2741 2013-03-07 Yao Qi <yao@codesourcery.com>
2743 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2744 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2746 (cmd_qtsp): Adjust condition. Do post increment.
2747 Set cur_action and cur_step_action back to 0.
2749 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2752 * linux-low.c (linux_write_memory): Return early success if LEN is
2755 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2757 * configure.srv: Add x86_64-*-cygwin* as target.
2759 2013-02-28 Tom Tromey <tromey@redhat.com>
2761 * configure.ac: Invoke AC_SYS_LARGEFILE.
2762 * configure, config.in: Rebuild.
2764 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2766 * win32-low.c: Throughout, fix format strings and casts of
2767 printf-like functions to avoid type related warnings on all
2769 (get_child_debug_event): Print dwDebugEventCode as hex since
2770 that's how it's usually documented.
2772 2013-02-28 Yao Qi <yao@codesourcery.com>
2774 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2777 2013-02-27 Jiong Wang <jiwang@tilera.com>
2779 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2780 (reg-tilegx32.c): New rule.
2781 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2782 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2783 different register info initializer according to elf class.
2784 (init_registers_tilgx32): New function. The tilegx32 register info
2786 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2787 (tile_store_gregset): Likewise.
2789 2013-02-27 Yao Qi <yao@codesourcery.com>
2791 * server.c (process_point_options): Print debug message when
2792 debug_threads is true.
2794 2013-02-26 Yao Qi <yao@codesourcery.com>
2796 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2798 2013-02-19 Pedro Alves <palves@redhat.com>
2799 Kai Tietz <ktietz@redhat.com>
2803 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2804 instead of strtoul to extract address from packet.
2805 (process_serial_event) <'z'>: Likewise.
2807 2013-02-18 Yao Qi <yao@codesourcery.com>
2809 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2811 2013-02-14 Pedro Alves <palves@redhat.com>
2815 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2816 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2818 2013-02-14 Pedro Alves <palves@redhat.com>
2820 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2822 2013-02-14 Pedro Alves <palves@redhat.com>
2824 * tracepoint.c (save_string): Delete.
2825 (add_tracepoint_action): Use savestring instead of save_string.
2827 2013-02-12 Pedro Alves <palves@redhat.com>
2829 * linux-xtensa-low.c: Ditto.
2830 * xtensa-xtregs.c: Ditto.
2832 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2834 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2837 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2839 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2840 aarch64_num_wp_regs and aarch64_num_bp_regs to
2841 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2843 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2845 * linux-aarch64-low.c (ps_get_thread_area): Replace
2846 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2848 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2849 Marcus Shawcroft <marcus.shawcroft@arm.com>
2850 Nigel Stephens <nigel.stephens@arm.com>
2851 Yufeng Zhang <yufeng.zhang@arm.com>
2853 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2854 (aarch64.c, aarch64-without-fpu.c): New targets.
2855 * configure.srv (aarch64*-*-linux*): New.
2856 * linux-aarch64-low.c: New file.
2858 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2860 * linux-low.c (handle_extended_wait, linux_create_inferior)
2861 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2862 (dequeue_one_deferred_signal, linux_resume_one_thread)
2863 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2864 (linux_tracefork_grandchild, linux_test_for_tracefork)
2865 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2866 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2867 where the argument is 0.
2869 2013-01-25 Yao Qi <yao@codesourcery.com>
2871 * event-loop.c: Include "queue.h".
2872 (gdb_event_p): New typedef.
2873 (struct gdb_event) <next_event>: Remove.
2874 (event_queue): Change to QUEUE(gdb_event_p).
2875 (async_queue_event): Remove.
2876 (gdb_event_xfree): New.
2877 (initialize_event_loop): New.
2878 (process_event): Use API from QUEUE.
2879 (wait_for_event): Likewise.
2880 * server.c (main): Call initialize_event_loop.
2881 * server.h (initialize_event_loop): Declare.
2883 2013-01-18 Yao Qi <yao@codesourcery.com>
2885 * ax.h (struct eval_agent_expr_context): New.
2886 (gdb_eval_agent_expr): Update declaration.
2887 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2888 TFRAME. Add new argument CTX.
2889 * server.h (struct eval_agent_expr_context): Declare.
2890 (agent_mem_read, agent_tsv_read): Update declaration.
2891 (agent_mem_read_string): Likewise.
2892 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2893 (add_traceframe_block): Add new argument TPOINT.
2894 Increase TPOINT->traceframe_usage.
2895 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2896 eval_tracepoint_agent_expr.
2897 (condition_true_at_tracepoint): Likewise.
2898 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2899 (agent_mem_read_string, agent_tsv_read): Likewise.
2901 2013-01-16 Yao Qi <yao@codesourcery.com>
2903 * linux-low.c (linux_resume_one_lwp): Don't check
2904 'lwp->bp_reinsert != 0'.
2906 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2907 Pedro Alves <palves@redhat.com>
2909 * lynx-low.c (ptrace_request_to_str): Define a temporary
2910 macro and use it to simplify this function's implementation.
2912 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2914 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2917 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2919 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2921 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2923 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2925 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2927 * lynx-low.c (lynx_resume): Use the resume_info parameter
2928 to determine the ptid for the lynx_ptrace call, unless
2929 it is equal to minus_one_ptid, in which case we use the
2930 ptid of the current_inferior.
2931 (lynx_wait_1): After having received a thread create/exit
2932 event, resume the inferior's execution using the signaling
2933 thread's ptid, rather than the old ptid.
2935 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2937 * lynx-low.c (lynx_resume): Delete variable ret.
2939 2013-01-01 Joel Brobecker <brobecker@adacore.com>
2941 * gdbreplay.c (gdbreplay_version): Update copyright year.
2942 * server.c (gdbserver_version): Likewise.
2944 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2946 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2949 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2951 * lynx-low.c (ptrace_request_to_str): Add handling for
2954 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2956 * lynx-low.c (lynx_attach): Delete variable new_process.
2958 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2960 * lynx-low.c (lynx_create_inferior): Delete variable
2963 2012-12-17 Joel Brobecker <brobecker@adacore.com>
2965 * lynx-low.c (ptrace_request_to_str): Do not handle
2966 PTRACE_GETTHREADLIST if this macro does not exist.
2968 2012-12-15 Yao Qi <yao@codesourcery.com>
2970 * Makefile.in (OBS): Add notif.o.
2971 * notif.c, notif.h: New.
2972 * server.c: Include "notif.h".
2973 (struct vstop_notif) <next>: Remove.
2975 (queue_stop_reply): Update.
2976 (push_event, send_next_stop_reply): Remove.
2977 (discard_queued_stop_replies): Update.
2978 (notif_stop): New variable.
2979 (handle_v_stopped): Remove.
2980 (handle_v_requests): Don't call handle_v_stopped. Call
2981 handle_ack_notif instead.
2982 (queue_stop_reply_callback): Call notif_event_enque instead
2983 of queue_stop_reply.
2984 (handle_status): Don't call send_next_stop_reply, call
2985 notif_write_event instead.
2986 (kill_inferior_callback): Likewise.
2987 (detach_or_kill_inferior_callback): Likewise.
2988 (main): Call initialize_notif.
2989 (process_serial_event): Call QUEUE_is_empty.
2990 (handle_target_event): Call notif_push instead of push event.
2991 * server.h (push_event): Remove declaration.
2993 2012-12-10 Tom Tromey <tromey@redhat.com>
2995 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2996 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2999 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3000 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3001 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3002 (amd64-linux-ipa.o, ax.o): Rewrite.
3003 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3004 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3005 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3006 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3007 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3008 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3009 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3010 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3011 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3012 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3013 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3014 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3015 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3016 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3017 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3018 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3019 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3020 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3021 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3022 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3023 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3024 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3025 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3026 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3027 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3028 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3029 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3030 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3031 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3032 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3033 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3034 (reg-tilegx.o): Remove.
3035 (all_object_files): New macro.
3036 Include .deps files.
3037 * aclocal.m4, configure: Rebuild.
3038 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3039 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3040 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3042 2012-12-05 Tom Tromey <tromey@redhat.com>
3045 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3047 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3049 * configure.ac: Check for linux/perf_event.h.
3050 * config.in: Regenerated.
3051 * configure: Regenerated.
3053 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3055 * hostio.c (handle_readlink): Decrease buffer size
3056 parameter passed to readlink by one byte.
3058 2012-11-26 Yao Qi <yao@codesourcery.com>
3060 * configure.ac (build_warnings): Append '-Wempty-body'.
3061 * configure: Regenerated.
3062 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3065 2012-11-15 Pierre Muller <muller@sourceware.org>
3067 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3068 * config.in: Regenerate.
3069 * configure: Regenerate.
3070 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3071 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3072 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3073 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3075 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3076 instead of <sys/wait.h> header.
3077 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3079 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3081 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3082 (various make rules): Remove -DGDBSERVER
3084 2012-11-09 Yao Qi <yao@codesourcery.com>
3086 * spu-low.c (current_ptid): Move it to ..
3087 * gdbthread.h: ... here. New.
3088 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3089 * server.c (myresume, process_serial_event): Likewise.
3090 * thread-db.c (thread_db_find_new_threads): Likewise.
3091 * tracepoint.c (run_inferior_command): Likewise.
3093 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3095 * server.c (handle_search_memory_1): Include access length in
3098 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3100 * linux-crisv32-low.c: Fix compile errors.
3102 2012-09-04 Yao Qi <yao@codesourcery.com>
3104 * tracepoint.c (cmd_qtsv): Adjust debug message.
3105 Don't check CUR_TPOINT.
3107 2012-08-28 Yao Qi <yao@codesourcery.com>
3109 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3110 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3111 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3112 Remove declarations of xmalloc, xreallloc, xstrdup and
3114 * Makefile.in (libiberty_h): New.
3115 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3116 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3118 2012-08-23 Yao Qi <yao@codesourcery.com>
3120 * server.h: Remove declaration of 'xsnprintf'.
3122 2012-08-22 Keith Seitz <keiths@redhat.com>
3124 * server.h: Include build-gnulib-gbserver/config.h.
3125 * gdbreplay.c: Likewise.
3127 2012-08-08 Doug Evans <dje@google.com>
3129 * Makefile.in (SFILES): Add gdb_vecs.c.
3130 (OBS): Add gdb_vecs.o.
3131 (gdb_vecs_h, host_defs_h): New variables.
3132 (thread-db.o): Add $(gdb_vecs_h) dependency.
3133 (gdb_vecs.o): New rule.
3134 * thread-db.c: #include "gdb_vecs.h".
3135 (thread_db_load_search): Use a vector to iterate over path elements.
3136 Handle text appearing after "$pdir".
3138 * configure.ac: Add check for strstr.
3139 * config.in: Regenerate.
3140 * configure: Regenerate.
3142 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3144 * hostio.c (handle_pread): If pread fails, fall back to attempting
3146 (handle_pwrite): Likewise for pwrite.
3148 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3150 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3151 between unsupported TYPE and unimplementable ADDR/LEN combination.
3152 (arm_insert_point): Act on new return value.
3154 2012-07-31 Pedro Alves <palves@redhat.com>
3156 * server.c (process_point_options): Only skip tokens if we find
3157 one that is unrecognized. Don't treat 'X' specially while
3158 skipping unrecognized tokens.
3160 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3162 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3163 to 4-byte-align HW breakpoint addresses for Thumb.
3165 2012-07-27 Yao Qi <yao@codesourcery.com>
3169 * server.h: Declare gdb_agent_about_to_close.
3170 * target.c (kill_inferior): Include "agent.h".
3171 New. Send command 'kill'.
3172 * target.h (kill_inferior): Removed macro.
3173 * tracepoint.c (gdb_agent_about_to_close): New.
3174 (gdb_agent_helper_thread): Handle command 'close'.
3175 Wait endlessly until the inferior stops.
3176 Install gdb_agent_remove_socket to atexit hook.
3177 (agent_socket_name): New static variable.
3178 (gdb_agent_socket_init): Replace local variable 'name' with
3179 'agent_socket_name'.
3180 (gdb_agent_remove_socket): New.
3182 2012-07-27 Yao Qi <yao@codesourcery.com>
3184 * server.c (process_point_options): Stop at 'X' when parsing.
3186 2012-07-19 Michael Eager <eager@eagercon.com>
3188 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3190 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3191 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3192 hardware breakpoint.
3194 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3196 * gdbserver/linux-low.c (initialize_low): Call
3197 linux_ptrace_init_warnings.
3199 2012-07-02 Doug Evans <dje@google.com>
3201 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3204 2012-07-02 Stan Shebs <stan@codesourcery.com>
3206 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3207 (ax.o): Add it to build rule.
3209 (OBS): Add format.o.
3210 (IPA_OBS): Add format.o.
3211 * server.c (handle_query): Claim support for breakpoint commands.
3212 (process_point_options): Add command case.
3213 (process_serial_event): Leave running if there are printfs in
3215 * mem-break.h (any_persistent_commands): Declare.
3216 (add_breakpoint_commands): Declare.
3217 (gdb_no_commands_at_breakpoint): Declare.
3218 (run_breakpoint_commands): Declare.
3219 * mem-break.c (struct point_command_list): New struct.
3220 (struct breakpoint): New field command_list.
3221 (any_persistent_commands): New function.
3222 (add_commands_to_breakpoint): New function.
3223 (add_breakpoint_commands): New function.
3224 (gdb_no_commands_at_breakpoint): New function.
3225 (run_breakpoint_commands): New function.
3226 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3228 * ax.c: Include format.h.
3229 (ax_printf): New function.
3230 (gdb_eval_agent_expr): Add printf opcode.
3232 2012-06-13 Yao Qi <yao@codesourcery.com>
3234 * server.c (start_inferior): Remove duplicated writes to fields
3235 'last_resume_kind' and 'last_status' of 'current_inferior'.
3237 2012-06-12 Yao Qi <yao@codesourcery.com>
3238 Pedro Alves <palves@redhat.com>
3240 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3242 * server.c (handle_v_cont): Extend comment.
3244 2012-06-11 Yao Qi <yao@codesourcery.com>
3246 * linux-low.c (linux_attach): Add 'static'.
3248 2012-06-06 Yao Qi <yao@codesourcery.com>
3250 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3252 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3254 Fix gcc -flto compilation warning.
3255 * server.c (main): Make variable multi_mode and attach volatile.
3257 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3259 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3260 if the platform doesn't know about it.
3262 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3264 * Makefile.in (SFILES): Add linux-tile-low.c.
3265 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3266 * configure.srv: Handle tilegx-*-linux*.
3267 * linux-tile-low.c: New file.
3269 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3271 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3273 2012-05-24 Pedro Alves <palves@redhat.com>
3277 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3279 2012-05-24 Pedro Alves <palves@redhat.com>
3283 Replace target_signal with gdb_signal throughout.
3285 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3287 * linux-low.c (linux_store_registers): Avoid the copying sequence
3288 when no data has been retrieved by ptrace.
3290 2012-05-22 Will Deacon <will.deacon@arm.com>
3292 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3293 Include asm/ptrace.h.
3294 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3297 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3299 * linux-low.c (linux_store_registers): Don't re-retrieve data
3300 with ptrace that has already been obtained from /proc. Always
3301 copy any data retrieved with ptrace to the buffer supplied.
3303 2012-05-11 Yao Qi <yao@codesourcery.com>
3304 Pedro Alves <palves@redhat.com>
3306 * linux-low.c (enum stopping_threads_kind): New.
3307 (stopping_threads): Change type to `enum stopping_threads_kind'.
3308 (handle_extended_wait): If stopping and suspending threads, leave
3309 the new_lwp suspended too.
3310 (linux_wait_for_event): Adjust.
3311 (stop_all_lwps): Set `stopping_threads' to
3312 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3313 whether we're suspending threads or just stopping them. Assert no
3316 2012-04-29 Yao Qi <yao@codesourcery.com>
3318 * server.h: Move some code to ...
3319 * gdbthread.h: ... here. New.
3320 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3321 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3322 (nto-low.o, win32-low.o): Likewise.
3323 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3324 * regcache.c, remote-utils.c, server.c: Likewise.
3325 * target.c, tracepoint.c, win32-low.c: Likewise.
3327 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3329 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3330 (PTRACE_ARG4_TYPE): Likewise.
3331 (PTRACE_XFER_TYPE): Likewise.
3332 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3333 ptrace to PTRACE_ARG3_TYPE.
3334 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3335 (PTRACE_ARG4_TYPE): Likewise.
3336 (PTRACE_XFER_TYPE): Likewise.
3337 (linux_detach_one_lwp): Cast fourth argument of
3338 ptrace to long then PTRACE_ARG4_TYPE.
3339 (regsets_fetch_inferior_registers): Cast third argument of
3340 ptrace to long then PTRACE_ARG3_TYPE.
3341 (regsets_store_inferior_registers): Likewise.
3343 2012-04-20 Pedro Alves <palves@redhat.com>
3345 * configure: Regenerate.
3347 2012-04-19 Pedro Alves <palves@redhat.com>
3349 * Makefile.in (GNULIB_BUILDDIR): New.
3350 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3351 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3352 (all, install-only, uninstall, clean-info, all-lib, clean): No
3353 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3354 (maintainer-clean realclean distclean): Use subdir_do.
3356 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3357 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3358 * acinclude.m4: Include acx_configure_dir.m4.
3359 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3360 calls. Call AC_PROG_RANLIB. Configure gnulib using
3363 (GNULIB_STDINT_H): Adjust.
3364 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3365 * gdbreplay.c: Include build-gnulib/config.h.
3366 * server.h: Likewise.
3367 * aclocal.m4: Regenerate.
3368 * config.in: Regenerate.
3369 * configure: Regenerate.
3371 2012-04-19 Pedro Alves <palves@redhat.com>
3373 * Makefile.in (LIBGNU, INCGNU): Adjust.
3374 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3375 (all, install-only, uninstall, clean-info, all-lib, clean)
3376 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3377 * configure.ac: Adjust AC_OUTPUT output.
3378 * aclocal.m4: Regenerate.
3379 * configure: Regenerate.
3381 2012-04-19 Pedro Alves <palves@redhat.com>
3383 * Makefile.in (generated_files): New.
3384 (server_h): Remove the explicit dependency on config.h, and depend
3385 on $generated_files.
3387 2012-04-19 Pedro Alves <palves@redhat.com>
3389 * Makefile.in (INCGNU): Add -Ignulib.
3391 2012-04-19 Pedro Alves <palves@redhat.com>
3393 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3394 (INCGNU): ... this, and spell out -I here.
3395 (GNULIB_LIB): Rename to ...
3397 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3399 2012-04-19 Pedro Alves <palves@redhat.com>
3401 * config.in: Regenerate.
3403 2012-04-19 Pedro Alves <palves@redhat.com>
3405 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3406 * server.h (memmem): Remove declaration.
3407 * config.in: Regenerate.
3408 * configure: Regenerate.
3410 2012-04-19 Yao Qi <yao@codesourcery.com>
3412 * Makefile.in (SFILES): Add common/vec.c.
3416 2012-04-19 Yao Qi <yao@codesourcery.com>
3418 * remote-utils.c (prepare_resume_reply): Replace with macro
3419 target_core_of_thread.
3420 * server.c (handle_qxfer_threads_proper): Likewise.
3421 * target.h (traget_core_of_thread): New macro.
3423 2012-04-18 Pedro Alves <palves@redhat.com>
3425 * aclocal.m4: Regenerate.
3426 * configure: Regenerate.
3428 2012-04-16 Yao Qi <yao@codesourcery.com>
3430 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3431 duplicated on address.
3433 2012-04-16 Yao Qi <yao@codesourcery.com>
3435 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3436 (struct tracepoint_action_ops) <send>: New field.
3437 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3438 (agent_expr_send, x_tracepoint_action_send): New.
3439 (l_tracepoint_action_send): New.
3440 (cmd_qtdp): Download and install tracepoint
3441 according to `use_agent'.
3442 (run_inferior_command): Add one more parameter `len'.
3444 (tracepoint_send_agent): New.
3445 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3447 2012-04-16 Yao Qi <yao@codesourcery.com>
3449 * tracepoint.c (download_tracepoints): Moved to ...
3450 (cmd_qtstart): ... here.
3452 2012-04-14 Yao Qi <yao@codesourcery.com>
3454 * tracepoint.c: Include inttypes.h.
3455 (struct collect_memory_action): Use sized types.
3456 (struct tracepoint): Likewise.
3457 (cmd_qtdp, stop_tracing): Update print specifiers.
3458 (cmd_qtp, response_tracepoint): Likewise.
3459 (collect_data_at_tracepoint): Likewise.
3460 (collect_data_at_step): Likewise.
3462 2012-04-14 Yao Qi <yao@codesourcery.com>
3464 Import gnulib module inttypes.
3465 * aclocal.m4, config.in, configure: Regenerated.
3467 2012-04-14 Yao Qi <yao@codesourcery.com>
3469 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3470 Makefile and config.status at last.
3472 2012-04-13 Yao Qi <yao@codesourcery.com>
3474 * tracepoint.c: Include stdint.h unconditionally.
3476 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3478 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3479 on BFD_HAVE_SYS_PROCFS_TYPE.
3480 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3481 * configure: Regenerate.
3482 * config.in: Likewise.
3484 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3486 * Makefile.in (clean): Also remove x32.c x32-linux.c
3487 x32-avx.c x32-avx-linux.c.
3488 (x32.o): New target.
3490 (x32-linux.o): Likewise.
3491 (x32-linux.c): Likewise.
3492 (x32-avx.o): Likewise.
3493 (x32-avx.c): Likewise.
3494 (x32-avx-linux.o): Likewise.
3495 (x32-avx-linux.c): Likewise.
3497 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3498 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3499 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3500 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3501 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3502 i386/x32-avx-linux.xml.
3504 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3505 (init_registers_x32_avx_linux): Likwise.
3506 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3507 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3509 2012-04-13 Pedro Alves <palves@redhat.com>
3511 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3512 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3513 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3514 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3517 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3519 * linux-x86-low.c (compat_x32_clock_t): New.
3520 (compat_x32_siginfo_t): Likewise.
3521 (compat_x32_siginfo_from_siginfo): Likewise.
3522 (siginfo_from_compat_x32_siginfo): Likewise.
3523 (linux_is_elf64): Likewise.
3524 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3525 and siginfo_from_compat_x32_siginfo for x32.
3526 (x86_arch_setup): Set linux_is_elf64.
3528 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3531 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3533 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3534 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3535 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3536 compatible with process.
3538 2012-04-12 Yao Qi <yao@codesourcery.com>
3540 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3541 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3542 (install-only, install-info, clean): Handle sub dir gnulib.
3543 (all-lib, am--refresh): New targets.
3544 (memmem.o): Remove target.
3545 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3546 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3547 (AC_REPLACE_FUNCS): Remove memmem.
3548 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3549 (AC_OUTPUT): Generate Makefile in gnulib/.
3550 * aclocal.m4, config.in, configure: Regenerated.
3552 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3554 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3556 2012-04-05 Pedro Alves <palves@redhat.com>
3558 -Werror=strict-aliasing
3560 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3563 2012-04-04 Pedro Alves <palves@redhat.com>
3565 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3566 (sparc_store_gregset_from_stack, sparc_store_gregset)
3567 (sparc_breakpoint_at): Fix formatting.
3569 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3571 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3573 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3574 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3575 * config.in: Regenerate.
3576 * configure: Likewise.
3578 2012-03-29 Pedro Alves <palves@redhat.com>
3580 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3581 Correct ptrace arguments.
3583 2012-03-28 Pedro Alves <palves@redhat.com>
3585 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3586 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3587 (IA64_FR1_REGNUM): New defines.
3588 (ia64_fetch_register): New.
3589 (the_low_target): Install it.
3590 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3592 * linux-low.c (linux_fetch_registers): Try the
3593 the_low_target.fetch_register hook first.
3595 * linux-arm-low.c (the_low_target): Adjust.
3596 * linux-bfin-low.c (the_low_target): Adjust.
3597 * linux-cris-low.c (the_low_target): Adjust.
3598 * linux-crisv32-low.c (the_low_target): Adjust.
3599 * linux-m32r-low.c (the_low_target): Adjust.
3600 * linux-m68k-low.c (the_low_target): Adjust.
3601 * linux-mips-low.c (the_low_target): Adjust.
3602 * linux-ppc-low.c (the_low_target): Adjust.
3603 * linux-s390-low.c (the_low_target): Adjust.
3604 * linux-sh-low.c (the_low_target): Adjust.
3605 * linux-sparc-low.c (the_low_target): Adjust.
3606 * linux-tic6x-low.c (the_low_target): Adjust.
3607 * linux-x86-low.c (the_low_target): Adjust.
3608 * linux-xtensa-low.c (the_low_target): Adjust.
3610 2012-03-26 Pedro Alves <palves@redhat.com>
3612 * server.c (handle_qxfer_libraries): Don't bail early if
3613 the_target->qxfer_libraries_svr4 is not NULL.
3615 2012-03-26 Pedro Alves <palves@redhat.com>
3617 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3619 2012-03-23 Pedro Alves <palves@redhat.com>
3621 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3622 "library-list-svr4" element's start tag when the the DSO list is
3625 2012-03-23 Pedro Alves <palves@redhat.com>
3627 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3628 a variable whose type size is the same as the inferior's pointer
3631 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3633 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3635 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3636 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3637 * linux-low.h: Include <signal.h>.
3638 (struct siginfo): Remove forward declaration.
3639 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3642 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3644 * .gitignore: Ignore more files.
3646 2012-03-19 Pedro Alves <palves@redhat.com>
3647 Jan Kratochvil <jan.kratochvil@redhat.com>
3649 * server.c (cont_thread, general_thread): Add describing comments.
3650 (start_inferior): Clear `cont_thread'.
3651 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3654 2012-03-15 Yao Qi <yao@codesourcery.com>
3656 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3658 (cmd_qtdp): ... here.
3660 2012-03-15 Yao Qi <yao@codesourcery.com>
3662 * tracepoint.c (struct tracepoint_action_ops): New.
3663 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3664 (m_tracepoint_action_download): New.
3665 (r_tracepoint_action_download): New.
3666 (x_tracepoint_action_download): New.
3667 (l_tracepoint_action_download): New.
3668 (add_tracepoint_action): Install `action->ops' according type.
3669 (download_tracepoint_1): Move code `download' function pointer
3670 of various tracepoint_action_ops.
3672 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3674 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3675 linux_ptrace_attach_warnings.
3677 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3679 * Makefile.in (linux-ptrace.o): New.
3680 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3681 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3682 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3683 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3684 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3686 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3688 2012-03-08 Yao Qi <yao@codesourcery.com>
3689 Pedro Alves <palves@redhat.com>
3691 Fix PR server/13392.
3692 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3694 * tracepoint.c (remove_tracepoint): New.
3695 (cmd_qtdp): Call remove_tracepoint when failed to install.
3697 2012-03-07 Pedro Alves <palves@redhat.com>
3699 * linux-low.c (get_detach_signal): New.
3700 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3701 Pass on pending signals to PTRACE_DETACH. Check the result of the
3703 * server.c (program_signals, program_signals_p): New.
3704 (handle_general_set): Handle QProgramSignals.
3705 * server.h (program_signals, program_signals_p): Declare.
3707 2012-03-05 Pedro Alves <palves@redhat.com>
3708 Jan Kratochvil <jan.kratochvil@redhat.com>
3710 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3713 2012-03-03 Yao Qi <yao@codesourcery.com>
3715 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3716 agent_look_up_symbols.
3718 2012-03-03 Yao Qi <yao@codesourcery.com>
3720 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3721 (linux-x86-low.o): Likewise.
3722 * server.h: Remove in_process_agent_loaded.
3723 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3727 2012-03-03 Yao Qi <yao@codesourcery.com>
3729 * tracepoint.c (gdb_agent_capability): New global.
3730 (in_process_agent_loaded_ust): Renamed to
3731 `in_process_agent_supports_ust'.
3733 (in_process_agent_supports_ust): Call agent_capability_check.
3734 (clear_installed_tracepoints): Assert that agent supports
3737 2012-03-03 Yao Qi <yao@codesourcery.com>
3739 * linux-low.c (linux_supports_agent): New.
3740 (linux_target_ops): Initialize field `supports_agent' with
3741 linux_supports_agent.
3742 * target.h (struct target_ops) <supports_agent>: New.
3743 (target_supports_agent): New macro.
3744 * server.c (handle_general_set): Handle packet 'QAgent'.
3745 (handle_query): Send `QAgent+'.
3746 * Makefile.in (server.o): Depends on agent.h.
3748 2012-03-03 Yao Qi <yao@codesourcery.com>
3750 * Makefile.in (OBS): Add agent.o.
3751 Add new rule for agent.o.
3752 Track dependence of tracepoint.c on agent.h.
3753 * tracepoint.c (run_inferior_command_1):
3754 (run_inferior_command): Call agent_run_command.
3755 (gdb_ust_connect_sync_socket): Deleted. Move it to
3757 (resume_thread, stop_thread): Likewise.
3758 (gdb_ust_socket_init): Renamed to ...
3759 (gdb_agent_socket_init): ... New.
3760 (gdb_ust_thread): Renamed to ...
3761 (gdb_agent_helper_thread): ... New.
3762 (gdb_ust_init): Move some code to ...
3763 (gdb_agent_init): ... here. New.
3764 [HAVE_UST]: Call gdb_ust_init.
3765 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3766 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3767 * config.in, configure: Regenerated.
3769 2012-03-02 Pedro Alves <palves@redhat.com>
3771 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3772 * linux-low.c (struct simple_pid_list): New.
3773 (stopped_pids): New a struct simple_pid_list pointer.
3774 (add_to_pid_list, pull_pid_from_list): New.
3775 (handle_extended_wait): Don't assume the first signal new children
3776 report is SIGSTOP. Adjust call to pull_pid_from_list.
3777 (linux_wait_for_lwp): Adjust.
3779 2012-03-02 Yao Qi <yao@codesourcery.com>
3781 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3784 2012-03-02 Yao Qi <yao@codesourcery.com>
3786 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3787 `stop_pc' and `tpoint'. Update caller.
3789 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3791 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3792 * linux-low.c (use_linux_regsets): New macro.
3793 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3794 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3795 (linux_register_in_regsets): New function.
3796 (usr_fetch_inferior_registers): Skip registers covered by
3798 (usr_store_inferior_registers): Likewise.
3799 (usr_fetch_inferior_registers): New macro.
3800 (usr_store_inferior_registers): Likewise.
3801 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3802 (linux_store_registers): Likewise.
3803 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3805 (init_registers_mips64_dsp_linux): Likewise.
3806 (init_registers_mips_linux): New macro.
3807 (init_registers_mips_dsp_linux): Likewise.
3808 (mips_dsp_num_regs): Likewise.
3809 (DSP_BASE, DSP_CONTROL): New fallback macros.
3810 (mips_base_regs): New macro.
3811 (mips_regmap): Use it. Fix the size.
3812 (mips_dsp_regmap): New variable.
3813 (mips_dsp_regset_bitmap): Likewise.
3814 (mips_arch_setup): New function.
3815 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3817 (mips_cannot_store_register): Likewise.
3818 (the_low_target): Update .arch_setup, .num_regs and .regmap
3819 initializers. Add .regset_bitmap initializer.
3820 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3822 * linux-bfin-low.c (the_low_target): Likewise.
3823 * linux-cris-low.c (the_low_target): Likewise.
3824 * linux-crisv32-low.c (the_low_target): Likewise.
3825 * linux-ia64-low.c (the_low_target): Likewise.
3826 * linux-m32r-low.c (the_low_target): Likewise.
3827 * linux-m68k-low.c (the_low_target): Likewise.
3828 * linux-ppc-low.c (the_low_target): Likewise.
3829 * linux-s390-low.c (the_low_target): Likewise.
3830 * linux-sh-low.c (the_low_target): Likewise.
3831 * linux-sparc-low.c (the_low_target): Likewise.
3832 * linux-tic6x-low.c (the_low_target): Likewise.
3833 * linux-x86-low.c (the_low_target): Likewise.
3834 * linux-xtensa-low.c (the_low_target): Likewise.
3835 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3836 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3837 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3839 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3840 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3842 2012-02-29 Yao Qi <yao@codesourcery.com>
3843 Pedro Alves <palves@redhat.com>
3845 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3846 `step_over_finished' is true.
3848 2012-02-27 Pedro Alves <palves@redhat.com>
3850 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3851 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3853 2012-02-27 Pedro Alves <palves@redhat.com>
3856 * linux-low.c (pid_is_stopped): New.
3857 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3859 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3861 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3864 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3866 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3868 2012-02-24 Luis Machado <lgustavo@codesourcery>
3870 * server.c (handle_query): Advertise support for target-side
3871 breakpoint condition evaluation.
3872 (process_point_options): New function.
3873 (process_serial_event): When inserting a breakpoint, check for
3874 a target-side condition that should be evaluated.
3876 * mem-break.c: Include regcache.h and ax.h.
3877 (point_cond_list_t): New data structure.
3878 (breakpoint) <cond_list>: New field.
3879 (find_gdb_breakpoint_at): Make non-static.
3880 (delete_gdb_breakpoint_at): Clear any target-side
3882 (clear_gdb_breakpoint_conditions): New function.
3883 (add_condition_to_breakpoint): Likewise.
3884 (add_breakpoint_condition): Likewise.
3885 (gdb_condition_true_at_breakpoint): Likewise.
3886 (gdb_breakpoint_here): Return result directly instead
3887 of going through a local variable.
3889 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3890 (clear_gdb_breakpoint_conditions): Likewise.
3891 (add_breakpoint_condition): Likewise.
3892 (gdb_condition_true_at_breakpoint): Likewise.
3894 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3895 (need_step_over_p): Take target-side breakpoint condition into
3898 2012-02-24 Luis Machado <lgustavo@codesourcery>
3900 * server.h: Include tracepoint.h.
3901 (agent_mem_read, agent_get_trace_state_variable_value,
3902 agent_set_trace_state_variable_value,
3903 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3904 get_set_tsv_func_addr): New prototypes.
3906 * ax.h: New include file.
3907 * ax.c: New source file.
3909 * tracepoint.c: Include ax.h.
3910 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3911 agent_expr, eval_result_type): Move to ax.h.
3912 (parse_agent_expr): Rename to ...
3913 (gdb_parse_agent_expr): ... this, make it non-static and move
3915 (unparse_agent_expr) Rename to ...
3916 (gdb_unparse_agent_expr): ... this, make it non-static and move
3918 (eval_agent_expr): Rename to ...
3919 (eval_tracepoint_agent_expr): ... this.
3920 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3921 forward declarations.
3922 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3923 (agent_get_trace_state_variable_value): New function.
3924 (agent_set_trace_state_variable_value): New function.
3925 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3926 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3927 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3928 (condition_true_at_tracepoint): Likewise.
3929 (parse_agent_expr): Rename to ...
3930 (gdb_parse_agent_expr): ... this and move to ax.c.
3931 (unparse_agent_expr): Rename to ...
3932 (gdb_unparse_agent_expr): ... this and move to ax.c.
3933 (gdb_agent_op_name): Move to ax.c.
3934 (eval_agent_expr): Rename to ...
3935 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3937 (eval_tracepoint_agent_expr): New function.
3938 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
3940 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3942 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3943 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3944 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3945 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3946 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3947 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3948 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3949 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3950 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3951 (compile_bytecodes): Remove forward declaration.
3952 (is_goto_target): Move to ax.c.
3953 (compile_bytecodes): Move to ax.c and call
3954 agent_get_trace_state_variable_value (...) and
3955 agent_set_trace_state_variable_value (...).
3957 * Makefile.in: Update ax.c and IPA dependencies.
3959 2012-02-24 Pedro Alves <palves@redhat.com>
3961 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3962 (cmd_bigqtbuffer_circular): ... this. Only handle
3963 'QTBuffer:circular:'.
3964 (handle_tracepoint_general_set): Adjust.
3966 2012-02-16 Yao Qi <yao@codesourcery.com>
3968 * inferiors.c: Move code to ...
3969 * dll.c: .... here. New.
3970 * server.h: Declare clear_dlls.
3971 * Makefile.in (SFILES): Add dll.c.
3975 2012-02-11 Yao Qi <yao@codesourcery.com>
3977 * server.c: (handle_monitor_command): Add a new parameter
3979 (handle_query): Update caller.
3981 2012-02-09 Joel Brobecker <brobecker@adacore.com>
3983 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3984 * configure, config.in: Regenerate.
3985 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3988 2012-02-02 Pedro Alves <palves@redhat.com>
3990 Try SIGKILL first, then PTRACE_KILL.
3991 * linux-low.c (linux_kill_one_lwp): New.
3992 (linux_kill_one_lwp): Rename to ...
3993 (kill_one_lwp_callback): ... this. Use the new
3996 2012-02-02 Pedro Alves <palves@redhat.com>
3998 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4001 2012-01-27 Pedro Alves <palves@redhat.com>
4003 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4004 (elf_64_file_p): Make static.
4005 (linux_pid_exe_is_elf_64_file): New.
4006 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4007 Delete declarations.
4008 (linux_pid_exe_is_elf_64_file): Declare.
4009 * linux-x86-low.c (x86_arch_setup): Use
4010 linux_pid_exe_is_elf_64_file.
4012 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4014 * linux-low.c (linux_wait_for_event_1): Rename to ...
4015 (linux_wait_for_event): ... here and merge it with former
4016 linux_wait_for_event - new variable wait_ptid, use it.
4017 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4019 2012-01-23 Pedro Alves <palves@redhat.com>
4021 * server.c (main): Avoid yet another case of infinite loop while
4022 detaching/killing after a longjmp.
4024 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4027 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4029 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4031 * hostio.c (handle_readlink): New function.
4032 (handle_vFile): Call it to handle "vFile:readlink" packets.
4034 2012-01-20 Pedro Alves <palves@redhat.com>
4035 Ulrich Weigand <ulrich.weigand@linaro.org>
4037 * server.c (handle_v_requests): Only support vAttach and vRun to
4038 start multiple processes when in extended protocol mode.
4040 2012-01-17 Pedro Alves <palves@redhat.com>
4042 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4043 memalign plus mprotect to allocate the scratch buffer.
4045 2012-01-13 Pedro Alves <palves@redhat.com>
4047 * server.c (attach_inferior): Clear `cont_thread'.
4049 2012-01-13 Pedro Alves <palves@redhat.com>
4051 * server.c (main): Avoid infinite loop while detaching/killing
4054 2012-01-09 Doug Evans <dje@google.com>
4056 * server.c (start_inferior): Set last_ptid in --wrapper case.
4058 2012-01-06 Yao Qi <yao@codesourcery.com>
4060 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4062 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4064 2012-01-04 Yao Qi <yao@codesourcery.com>
4066 * tracepoint.c (cmd_qtdp): Print debug message
4067 for static tracepoint.
4069 2012-01-04 Yao Qi <yao@codesourcery.com>
4071 * tracepoint.c (trace_vdebug): Differentiate debug message
4072 between gdbserver and IPA.
4074 2012-01-03 Yao Qi <yao@codesourcery.com>
4076 * tracepoint.c (tracepoint_was_hit): Don't collect for
4079 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4081 * terminal.h: Reformat copyright header.
4083 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4085 * server.c (gdbserver_version): Update copyright year.
4086 * gdbreplay.c (gdbreplay_version): Likewise.
4088 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4090 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4093 2011-12-18 Hui Zhu <teawater@gmail.com>
4094 * linux-low.c (linux_create_inferior): Save return value to ret.
4096 2011-12-18 Hui Zhu <teawater@gmail.com>
4098 * linux-low.c (linux_create_inferior): Save return value to ret.
4100 2011-12-16 Doug Evans <dje@google.com>
4102 * linux-low.c (linux_create_inferior): If stdio connection,
4103 redirect stdin from /dev/null, stdout to stderr.
4104 * remote-utils.c (remote_is_stdio): New static global.
4105 (remote_connection_is_stdio): New function.
4106 (remote_prepare): Handle stdio connection.
4107 (remote_open): Ditto.
4108 (remote_close): Don't close stdin for stdio connections.
4109 (read_prim,write_prim): New functions. Replace all calls to
4110 read/write to these.
4111 * server.c (main): Watch for "-" argument. Move call to
4112 remote_prepare before start_inferior.
4113 * server.h (STDIO_CONNECTION_NAME): New macro.
4114 (remote_connection_is_stdio): Declare.
4116 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4117 in debugging output.
4119 2011-12-15 Yao Qi <yao@codesourcery.com>
4121 * tracepoint.c: Include sys/syscall.h.
4122 (gdb_ust_thread): Remove preprocessor conditional.
4124 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4126 * linux-low.c (linux_detach_one_lwp): Call
4127 the_low_target.prepare_to_resume before detaching.
4129 2011-12-14 Yao Qi <yao@codesourcery.com>
4131 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4134 2011-12-14 Yao Qi <yao@codesourcery.com>
4136 * i386-low.c (i386_low_stopped_data_address): Initialize local
4139 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4143 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4144 DR_CONTROL unless necessary. Extend comments.
4145 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4146 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4148 2011-12-13 Yao Qi <yao@codesourcery.com>
4150 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4152 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4154 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4156 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4157 Print new debug message for such case.
4159 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4161 Fix overlapping memcpy.
4162 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4163 the read_inferior_memory transfer.
4164 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4165 write_inferior_memory transfer.
4166 (set_fast_tracepoint_jump): New variable buf. Use it for the
4167 read_inferior_memory and write_inferior_memory transfers.
4168 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4169 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4170 Use it for the write_inferior_memory transfer.
4171 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4174 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4176 * linux-low.c (fetch_register, store_register): Make code
4177 consistent, fix formatting.
4179 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4181 * linux-low.c (usr_store_inferior_registers): Factor out code
4182 to handle individual registers into...
4183 (store_register): ... this new function.
4185 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4187 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4188 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4189 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4190 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4191 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4192 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4193 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4194 (srv_xmlfiles): Add new XML files.
4196 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4198 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4199 (init_registers_s390_linux32v1): Add prototype.
4200 (init_registers_s390_linux32v2): Likewise.
4201 (init_registers_s390_linux64v1): Likewise.
4202 (init_registers_s390_linux64v2): Likewise.
4203 (init_registers_s390x_linux64v1): Likewise.
4204 (init_registers_s390x_linux64v2): Likewise.
4205 (s390_num_regs): Increment to 52.
4206 (s390_regmap): Add orig_r2 register.
4207 (s390_num_regs_3264): Increment to 68.
4208 (s390_regmap_3264): Add orig_r2 register.
4209 (s390_collect_ptrace_register): Handle orig_r2 register.
4210 (s390_supply_ptrace_register): Likewise.
4211 (s390_fill_last_break): New function.
4212 (s390_store_last_break): Likewise.
4213 (s390_fill_system_call): New function.
4214 (s390_store_system_call): Likewise.
4215 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4217 (s390_check_regset): New function.
4218 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4219 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4220 Update target_regsets for available register sets.
4222 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4223 Jan Kratochvil <jan.kratochvil@redhat.com>
4225 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4226 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4228 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4229 * linux-low.h (struct process_info_private): New member r_debug.
4230 * server.c (handle_qxfer_libraries): Call
4231 the_target->qxfer_libraries_svr4.
4232 (handle_qxfer_libraries_svr4): New function.
4233 (qxfer_packets): New entry "libraries-svr4".
4234 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4235 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4236 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4237 PACKET_qXfer_libraries_svr4.
4239 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4241 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4242 PSW address/mask between 8-byte and 16-byte formats.
4243 (s390_supply_ptrace_register): Likewise.
4244 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4245 basic addressing mode bit.
4247 2011-11-24 Stan Shebs <stan@codesourcery.com>
4249 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4251 2011-11-17 Stan Shebs <stan@codesourcery.com>
4253 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4254 (tracing_start_time): New global.
4255 (tracing_stop_time): New global.
4256 (tracing_user_name): New global.
4257 (tracing_notes): New global.
4258 (tracing_stop_note): New global.
4259 (cmd_qtstart): Set traceframe_usage, start_time.
4260 (stop_tracing): Set stop_time.
4261 (cmd_qtstatus): Report additional status.
4262 (cmd_qtp): New function.
4263 (handle_tracepoint_query): Call it.
4264 (cmd_qtnotes): New function.
4265 (handle_tracepoint_general_set): Call it.
4266 (get_timestamp): Rename from tsv_get_timestamp.
4268 2011-11-14 Stan Shebs <stan@codesourcery.com>
4269 Kwok Cheung Yeung <kcy@codesourcery.com>
4271 * linux-x86-low.c (small_jump_insn): New.
4272 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4273 trampoline and error message, build a trampoline and issue a small
4274 jump instruction to it.
4275 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4276 trampoline and error message.
4277 (x86_get_min_fast_tracepoint_insn_len): New.
4278 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4279 * linux-low.h (struct linux_target_ops): Add arguments to
4280 install_fast_tracepoint_jump_pad operation, add new operation.
4281 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4283 (linux_get_min_fast_tracepoint_insn_len): New function.
4284 (linux_target_op): Add new operation.
4285 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4286 (gdb_trampoline_buffer_end): Ditto.
4287 (gdb_trampoline_buffer_error): Ditto.
4288 (struct ipa_sym_addresses): Add fields for new IPA variables.
4289 (symbol_list): Add entries for new IPA variables.
4290 (struct tracepoint): Add fields to hold the address range of the
4291 trampoline used by the tracepoint.
4292 (trampoline_buffer_head): New static variable.
4293 (trampoline_buffer_tail): Ditto.
4294 (claim_trampoline_space): New function.
4295 (have_fast_tracepoint_trampoline_buffer): New function.
4296 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4298 (install_fast_tracepoint): Ditto, also add error buffer argument.
4299 (cmd_qtminftpilen): New function.
4300 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4301 (fast_tracepoint_from_trampoline_address): New function.
4302 (fast_tracepoint_collecting): Handle trampoline as part of jump
4304 (set_trampoline_buffer_space): New function.
4305 (initialize_tracepoint): Initialize new IPA variables.
4306 * target.h (struct target_ops): Add arguments to
4307 install_fast_tracepoint_jump_pad operation, add new
4308 get_min_fast_tracepoint_insn_len operation.
4309 (target_get_min_fast_tracepoint_insn_len): New.
4310 (install_fast_tracepoint_jump_pad): Add arguments.
4311 * server.h (IPA_BUFSIZ): Define.
4312 * linux-i386-ipa.c: Include extra header files.
4313 (initialize_fast_tracepoint_trampoline_buffer): New function.
4314 (initialize_low_tracepoint): Call it.
4315 * server.h (set_trampoline_buffer_space): Declare.
4316 (claim_trampoline_space): Ditto.
4317 (have_fast_tracepoint_trampoline_buffer): Ditto.
4319 2011-11-14 Yao Qi <yao@codesourcery.com>
4321 * server.c (handle_query): Handle InstallInTrace for qSupported.
4322 * tracepoint.c (add_tracepoint): Sort list.
4323 (install_tracepoint, download_tracepoint): New.
4324 (cmd_qtdp): Call them to install and download tracepoints.
4325 (sort_tracepoints): Removed.
4326 (cmd_qtstart): Update.
4328 2011-11-14 Yao Qi <yao@codesourcery.com>
4330 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4331 * mem-break.h: Declare.
4332 * tracepoint.c (cmd_qtstart): Move some code to ...
4333 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4335 (download_tracepoints): Move some code to ...
4336 (download_tracepoint_1): ... here. New.
4338 2011-11-08 Yao Qi <yao@codesourcery.com>
4340 * remote-utils.c (relocate_instruction): A comment fix.
4342 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4344 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4345 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4346 dr_status_mirror and dr_control_mirror from debug_reg_state.
4347 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4348 (i386_initial_stuff): Remove use of deleted globals.
4349 (i386_get_thread_context, i386_set_thread_context,
4350 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4351 from debug_reg_state.
4353 2011-11-05 Yao Qi <yao@codesourcery.com>
4355 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4356 address as TPOINT's.
4358 2011-11-02 Stan Shebs <stan@codesourcery.com>
4360 * tracepoint.c (agent_mem_read_string): New function.
4361 (eval_agent_expr): Call it for tracenz.
4362 * server.c (handle_query): Report support for tracenz.
4364 2011-11-02 Yao Qi <yao@codesourcery.com>
4366 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4368 2011-11-02 Yao Qi <yao@codesourcery.com>
4370 * target.h: Fix a typo in comment.
4372 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4374 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4375 clobber the breakpoints' shadows with fast tracepoint jumps.
4376 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4377 * target.c (write_inferior_memory): Also pass MYADDR down to
4380 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4382 * configure.ac: Check support for personality routine.
4383 * configure: Regenerate.
4384 * config.in: Likewise.
4385 * linux-low.c: Include <sys/personality.h>.
4386 Define ADDR_NO_RANDOMIZE if necessary.
4387 (linux_create_inferior): Disable address space randomization when
4388 forking inferior, if requested.
4389 (linux_supports_disable_randomization): New function.
4390 (linux_target_ops): Install it.
4391 * server.h (disable_randomization): Declare.
4392 * server.c (disable_randomization): New global variable.
4393 (handle_general_set): Handle QDisableRandomization.
4394 (handle_query): Likewise for qSupported.
4395 (main): Support --disable-randomization and --no-disable-randomization
4396 command line arguments.
4397 * target.h (struct target_ops): Add supports_disable_randomization.
4398 (target_supports_disable_randomization): New macro.
4400 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4402 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4404 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4405 [!PT_GETDSBT] (target_loadmap): New definition.
4406 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4407 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4408 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4409 and PT_GETDSBT to LINUX_LOADMAP.
4410 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4411 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4413 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4415 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4416 (arm_linux_hwbp_cap): New static variable.
4417 (arm_linux_get_hwbp_cap): Replace by ...
4418 (arm_linux_init_hwbp_cap): ... this new function.
4419 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4420 (arm_linux_get_hw_watchpoint_count): Likewise.
4421 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4422 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4423 (arm_prepare_to_resume): Use perror_with_name instead of error.
4425 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4427 * linux-arm-low.c: Include <signal.h>.
4428 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4429 (struct arm_linux_hwbp_cap): New data type.
4430 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4431 (struct arm_linux_hw_breakpoint): New data type.
4432 (MAX_BPTS, MAX_WPTS): Define.
4433 (struct arch_process_info, struct arch_lwp_info): New data types.
4434 (arm_linux_get_hwbp_cap): New function.
4435 (arm_linux_get_hw_breakpoint_count): Likewise.
4436 (arm_linux_get_hw_watchpoint_count): Likewise.
4437 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4438 (arm_hwbp_control_initialize): Likewise.
4439 (arm_hwbp_control_is_enabled): Likewise.
4440 (arm_hwbp_control_is_initialized): Likewise.
4441 (arm_hwbp_control_disable): Likewise.
4442 (arm_linux_hw_breakpoint_equal): Likewise.
4443 (arm_linux_hw_point_initialize): Likewise.
4444 (struct update_registers_data): New data structure.
4445 (update_registers_callback: New function.
4446 (arm_insert_point): Likewise.
4447 (arm_remove_point): Likewise.
4448 (arm_stopped_by_watchpoint): Likewise.
4449 (arm_stopped_data_address): Likewise.
4450 (arm_new_process): Likewise.
4451 (arm_new_thread): Likewise.
4452 (arm_prepare_to_resume): Likewise.
4453 (the_low_target): Register arm_insert_point, arm_remove_point,
4454 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4455 arm_new_thread, and arm_prepare_to_resume.
4457 2011-09-15 Stan Shebs <stan@codesourcery.com>
4459 * server.h (struct emit_ops): Add compare-goto fields.
4460 * tracepoint.c (gdb_agent_op_sizes): New table.
4461 (emit_eq_goto): New function.
4462 (emit_ne_goto): New function.
4463 (emit_lt_goto): New function.
4464 (emit_le_goto): New function.
4465 (emit_gt_goto): New function.
4466 (emit_ge_goto): New function.
4467 (is_goto_target): New function.
4468 (compile_bytecodes): Recognize special cases of compare-goto
4469 combinations and call specialized emitters for them.
4470 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4471 (amd64_emit_ne_goto): New function.
4472 (amd64_emit_lt_goto): New function.
4473 (amd64_emit_le_goto): New function.
4474 (amd64_emit_gt_goto): New function.
4475 (amd64_emit_ge_goto): New function.
4476 (amd64_emit_ops): Add the new functions.
4477 (i386_emit_eq_goto): New function.
4478 (i386_emit_ne_goto): New function.
4479 (i386_emit_lt_goto): New function.
4480 (i386_emit_le_goto): New function.
4481 (i386_emit_gt_goto): New function.
4482 (i386_emit_ge_goto): New function.
4483 (i386_emit_ops): Add the new functions.
4485 2011-09-08 Stan Shebs <stan@codesourcery.com>
4487 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4488 (i386_emit_epilogue): Restore %ebx.
4490 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4492 * server.c (step_thread): Remove definition.
4493 (process_serial_event): Don't handle Hs.
4494 * server.h (step_thread): Remove declaration.
4495 * target.c (set_desired_inferior): Remove use of step_thread.
4497 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4499 * linux-low.c: Include linux-procfs.h.
4500 (linux_attach_lwp_1): Update comments.
4501 (linux_attach): Scan for existing threads when attaching to a
4502 process that is the tgid.
4503 * Makefile.in: Update dependencies.
4505 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4507 * configure.srv: Add linux-procfs.o dependencies.
4509 2011-08-14 Yao Qi <yao@codesourcery.com>
4511 * target.h (struct target_ops): Fix indent.
4512 * win32-low.c (win32_target_ops): Fix comment.
4514 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4515 Yao Qi <yao@codesourcery.com>
4517 * Makefile.in (clean): Remove tic6x-*.c files.
4518 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4519 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4520 (tic6x-c64xp-linux.c): Likewise.
4521 * configure.srv: Add support for tic6x-*-uclinux.
4522 * linux-tic6x-low.c: New.
4523 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4525 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4526 Yao Qi <yao@codesourcery.com>
4528 * target.h (struct target_ops): Add read_loadmap.
4529 * linux-low.c (struct target_loadseg): New type.
4530 (struct target_loadmap): New type.
4531 (linux_read_loadmap): New function.
4532 (linux_target_ops): Add linux_read_loadmap.
4533 * server.c (handle_query): Support qXfer:fdpic:read packet.
4534 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4537 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4539 * win32-low.c: Include <stdint.h>.
4541 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4543 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4544 to the inferior here.
4545 (i386_remove_aligned_watchpoint): Ditto.
4546 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4547 fit part of the watchpoint in the debug registers.
4548 (i386_update_inferior_debug_regs): New.
4549 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4550 registers, and only update the inferior on success.
4551 (i386_low_remove_watchpoint): Ditto.
4553 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4555 * linux-low.c (compare_ints, unique, list_threads, show_process,
4556 linux_core_of_thread): Delete.
4557 (linux_target_ops): Change linux_core_of_thread to
4558 linux_common_core_of_thread.
4559 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4560 * utils.c (malloc_failure): Change type of argument.
4561 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4562 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4563 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4564 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4565 (IPA_OBJS): Add common-utils-ipa.o.
4566 (ptid_h, linux_osdata_h): New macros.
4567 (server_h): Add common/common-utils.h, common/xml-utils.h,
4568 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4570 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4571 ptid.o, buffer.o): New rules.
4572 (linux-low.o): Add common/linux-osdata.h as a dependency.
4573 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4574 * configure.ac: Add AC_HEADER_DIRENT check.
4575 * config.in: Regenerate.
4576 * configure: Regenerate.
4577 * remote-utils.c (xml_escape_text): Delete.
4578 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4579 buffer_xml_printf): Move to common/buffer.c.
4580 * server.c (main): Remove call to initialize_inferiors.
4581 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4582 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4583 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4584 internal_error, gdb_assert, gdb_assert_fail): Delete.
4585 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4586 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4588 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4589 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4590 initialize_inferiors): Delete.
4592 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4594 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4597 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4599 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4601 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4603 2011-05-26 Yao Qi <yao@codesourcery.com>
4605 * Makefile.in (thread-db.o): Track dependence to
4606 common/gdb_thread_db.h.
4607 * thread-db.c: include gdb_thread_db.h from right place.
4609 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4611 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4612 __FILE__ and __LINE__ to internal_error.
4614 2011-05-13 Doug Evans <dje@google.com>
4616 * thread-db.c (try_thread_db_load_from_sdir): New function.
4617 (try_thread_db_load_from_dir): New function.
4618 (thread_db_load_search): Handle $sdir, ignore $pdir.
4619 Remove trying of system directories if search of
4620 libthread-db-search-path fails, that is now done via $sdir.
4622 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4624 * server.c (handle_query): Add EnableDisableTracepoints to the list
4625 of supported features.
4626 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4628 (cmd_qtenable_disable): New.
4629 (cmd_qtstart): Install tracepoints even if disabled.
4630 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4631 receiving a QTEnable or QTDisable packet.
4632 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4633 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4635 (gdb_probe): Skip data collection if static tracepoint is disabled.
4637 2011-05-10 Doug Evans <dje@google.com>
4639 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4641 2011-05-04 Doug Evans <dje@google.com>
4643 * linux-low.c (linux_join): Skip process lookup.
4644 * spu-low.c (spu_join): Ditto.
4645 * server.c (join_inferiors_callback): Delete.
4646 (process_serial_event): For 'D' packet (detach) call join_inferior
4649 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4651 * README: Don't mention xscale*-*-linux*.
4652 * configure.srv (xscale*-*-linux*): Don't handle target.
4654 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4656 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4658 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4659 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4660 (i386_emit_void_call_2): Likewise.
4662 2011-04-26 Yao Qi <yao@codesourcery.com>
4664 * linux-low.c: Move common macros to linux-ptrace.h.
4665 Include linux-ptrace.h.
4666 * Makefile.in (linux_ptrace_h): New.
4667 (linux-low.o): Depends on linux-ptrace.h.
4669 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4671 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4672 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4673 (remote_prepare): New function with most of the TCP code from ...
4674 (remote_open): ... here. Detect PORT here unconditionally. Move also
4675 setting transport_is_reliable.
4676 * server.c (run_once): New variable.
4677 (gdbserver_usage): Document it.
4678 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4679 the first run if RUN_ONCE.
4680 * server.h (run_once, remote_prepare): New declarations.
4682 2011-04-19 Tom Tromey <tromey@redhat.com>
4684 * win32-low.c (handle_load_dll): Remove duplicate "the".
4686 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4688 Remove support for old Cygwin 1.5 versions.
4689 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4690 function to avoid warning.
4691 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4694 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4696 * gdbserver/server.h (Macro _): Define it if not available.
4698 2011-03-14 Michael Snyder <msnyder@vmware.com>
4700 * hostio.c (handle_close): Remove unnecessary null test.
4702 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4704 * Makefile.in (maintainer-clean realclean distclean): Remove
4705 "make ... subdir_do" command.
4707 2011-03-10 Michael Snyder <msnyder@vmware.com>
4709 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4711 * server.c (handle_v_run): Free alloced buffer on early return.
4713 2011-03-09 Yao Qi <yao@codesourcery.com>
4716 2011-03-04 Yao Qi <yao@codesourcery.com>
4718 * Makefile.in: Remove GNU make feature --directory.
4720 2011-03-05 Yao Qi <yao@codesourcery.com>
4722 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4723 (subdir_do): New make target. Copied from gdb/Makefile.
4724 (maintainer-clean, realclean, distclean, clean): Call corresponding
4725 make targets in common/Makefile.
4727 2011-02-11 Yao Qi <yao@codesourcery.com>
4729 * configure.ac: Call AC_PROG_RANLIB.
4730 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4731 * configure: Regenerate.
4733 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4735 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4737 2011-03-06 Yao Qi <yao@codesourcery.com>
4739 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4741 2011-03-05 Yao Qi <yao@codesourcery.com>
4743 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4744 (subdir_do): New make target. Copied from gdb/Makefile.
4745 (maintainer-clean, realclean, distclean, clean): Call corresponding
4746 make targets in common/Makefile.
4748 2011-03-04 Yao Qi <yao@codesourcery.com>
4750 * Makefile.in: Remove GNU make feature --directory.
4752 2011-03-04 Michael Snyder <msnyder@vmware.com>
4754 * server.c (queue_stop_reply): Call xmalloc not malloc.
4756 2011-03-02 Michael Snyder <msnyder@vmware.com>
4758 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4760 2011-02-28 Michael Snyder <msnyder@vmware.com>
4762 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4763 (cmd_qtframe): Ditto.
4764 (cmd_qtbuffer): Ditto.
4765 (cmd_bigqtbuffer): Ditto.
4767 * utils.c (decimal2str): Initialize 'width' to nine, then
4770 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4772 * hostio.c (require_data): Free *data, not data.
4774 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4776 * hostio.c (require_data): Use free, not xfree.
4778 2011-02-27 Michael Snyder <msnyder@vmware.com>
4780 * server.c (handle_query): Discard unused value.
4782 * hostio.c (require_data): Free malloc memory before returning
4785 2011-02-26 Michael Snyder <msnyder@vmware.com>
4787 * linux-low.c (list_threads): Call closedir for dirent.
4789 2011-02-27 Michael Snyder <msnyder@vmware.com>
4791 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4792 a case statement falls through.
4794 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4796 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4799 2011-02-26 Michael Snyder <msnyder@vmware.com>
4801 * utils.c (decimal2str): Eliminate dead code and dead param.
4802 (pulongest): Drop dead param from call to decimal2str.
4805 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4807 Revert the following patch (not approved yet):
4808 2011-02-21 Hui Zhu <teawater@gmail.com>
4809 * tracepoint.c (tp_printf): New function.
4810 (eval_agent_expr): Handle gdb_agent_op_printf.
4812 2011-02-21 Hui Zhu <teawater@gmail.com>
4814 * tracepoint.c (tp_printf): New function.
4815 (eval_agent_expr): Handle gdb_agent_op_printf.
4817 2011-02-18 Tom Tromey <tromey@redhat.com>
4819 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4820 (tracepoint.o): Likewise.
4821 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4822 (gdb_agent_op_names): Likewise.
4824 2011-02-18 Tom Tromey <tromey@redhat.com>
4826 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4827 gdb_agent_op_rot>: New constants.
4828 (gdb_agent_op_names): Add pick and roll.
4829 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4832 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4834 * aclocal.m4: Regenerated with aclocal-1.11.1.
4836 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4838 * server.c (handle_qxfer_traceframe_info): New.
4839 (qxfer_packets): Register "traceframe-info".
4840 (handle_query): Report support for qXfer:traceframe-info:read+.
4841 * tracepoint.c (match_blocktype): New.
4842 (traceframe_find_block_type): Rename to ...
4843 (traceframe_walk_blocks): ... this. Add callback filter argument,
4845 (traceframe_find_block_type): New, reimplemented on top of
4846 traceframe_walk_blocks.
4847 (build_traceframe_info_xml): New.
4848 (traceframe_read_info): New.
4849 * server.h (traceframe_read_info): Declare.
4851 2011-02-11 Yao Qi <yao@codesourcery.com>
4853 * configure.ac: Call AC_PROG_RANLIB.
4854 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4855 * configure: Regenerate.
4857 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4859 * server.c (gdb_read_memory): Change return semantics to allow
4861 (handle_search_memory_1): Adjust.
4862 (process_serial_event) <'m' packet>: Handle partial transfers.
4863 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4865 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4867 * regcache.c (init_register_cache): Initialize
4868 regcache->register_status.
4869 (free_register_cache): Release regcache->register_status.
4870 (regcache_cpy): Copy register_status.
4871 (registers_to_string): Print 'x's for unavailable registers.
4872 (supply_register): Mark the register's status valid or
4873 unavailable, depending on whether a buffer was passed in or not.
4874 (supply_register_zeroed): New.
4875 (supply_regblock): Mark the registers' status valid or
4876 unavailable, depending on whether a buffer was passed in or not.
4877 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4878 (struct regcache): New `register_status' field.
4879 (supply_register_zeroed): Declare.
4880 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4881 supply_register_zeroed, rather than passing a NULL buffer to
4883 * tracepoint.c (fetch_traceframe_registers): Update comment.
4885 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4887 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4890 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4892 * server.h (decode_xfer_write): Change prototype.
4893 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4894 and don't extract the annex here.
4895 * server.c (decode_xfer_read): Remove `annex' parameter,
4896 and don't extract the annex here.
4898 (struct qxfer): New.
4899 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4900 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4901 (handle_qxfer_statictrace): New functions, abstracted out from
4902 handle_query, and made to use the struct qxfer interface.
4903 (handle_threads_qxfer_proper): Rename to ...
4904 (handle_qxfer_threads_proper): ... this.
4905 (handle_threads_qxfer): Rename to ...
4906 (handle_qxfer_threads): ... this. Adjust.
4907 (qxfer_packets): New array.
4908 (handle_qxfer): New function.
4909 (handle_query): Use handle_qxfer.
4911 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4913 * gdbreplay.c: Shorten lines of >= 80 columns.
4914 * linux-low.c: Ditto.
4915 * linux-ppc-low.c: Ditto.
4916 * linux-s390-low.c: Ditto.
4917 * linux-sparc-low.c: Ditto.
4918 * linux-x86-low.c: Ditto.
4919 * linux-xtensa-low.c: Ditto.
4920 * mem-break.c: Ditto.
4922 * regcache.h: Ditto.
4923 * remote-utils.c: Ditto.
4926 * thread-db.c: Ditto.
4927 * tracepoint.c: Ditto.
4929 * win32-low.h: Ditto.
4931 2011-01-05 Joel Brobecker <brobecker@adacore.com>
4933 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4936 2011-01-01 Joel Brobecker <brobecker@adacore.com>
4938 * server.c (gdbserver_version): Update copyright year in version
4940 * gdbreplay.c (gdbreplay_version): Ditto.
4942 2010-12-29 Jie Zhang <jie.zhang@analog.com>
4944 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4945 * linux-bfin-low.c: New file.
4946 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4947 PT_DATA_ADDR for BFIN targets.
4948 * Makefile.in (SFILES): Add linux-bfin-low.c.
4949 (clean): Remove reg-bfin.c.
4950 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4951 * README: Mention supported Blackfin targets.
4953 2010-12-23 Mike Frysinger <vapier@gentoo.org>
4955 * .gitignore: New file.
4957 2010-11-16 Mike Frysinger <vapier@gentoo.org>
4959 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4961 2010-10-22 Jie Zhang <jie@codesourcery.com>
4963 * Makefile.in: Add FLAGS_TO_PASS variable.
4964 (install): Remove dependency of install-only and recursively
4965 invoke make for install-only.
4967 2010-10-04 Doug Evans <dje@google.com>
4969 * Makefile.in (uninstall): Use $(DESTDIR).
4971 2010-09-24 Pedro Alves <pedro@codesourcery.com>
4975 * linux-x86-low.c (compat_siginfo_from_siginfo)
4976 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4977 si_code is < 0. Check for si_code == SI_TIMER before checking for
4980 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4982 * lynx-i386-low.c: New file.
4983 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4985 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4987 * lynx-low.c (ptrace_request_to_str): Remove handling for
4988 request values that have been removed in LynxOS 5.x.
4990 2010-09-13 Joel Brobecker <brobecker@adacore.com>
4992 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4995 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4997 * configure.ac: Add --enable-inprocess-agent option.
4998 * configure: Rebuilt.
5000 2010-09-06 Yao Qi <yao@codesourcery.com>
5002 * linux-low.c (linux_kill): Remove unused variable.
5003 (linux_stabilize_threads): Likewise.
5004 * server.c (start_inferior): Likewise.
5005 (queue_stop_reply_callback): Likewise.
5006 * tracepoint.c (do_action_at_tracepoint): Likewise.
5008 2010-09-06 Yao Qi <yao@codesourcery.com>
5010 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5013 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5015 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5017 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5019 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5022 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5024 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5025 gdbserver/lynx-ppc-low.c: New files.
5026 * Makefile.in (lynx_low_h): New variable.
5027 (lynx-low.o, lynx-ppc-low.o): New rules.
5028 * configure.ac: On LynxOS, link with -lnetinet.
5029 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5030 * configure: regenerate.
5032 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5034 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5035 * configure.ac: Add check for vasprintf and vsnprintf.
5036 * configure, config.in: Regenerate.
5037 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5039 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5041 * gdbreplay.c: Move include of alloca.h up, next to include of
5043 * server.h: Add include of malloc.h.
5044 * mem-break.c: Remove include of malloc.h.
5045 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5047 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5049 * Makefile.in (memmem.o): Build with -Wno-error.
5051 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5053 * utils.c (xsnprintf): Make non-static.
5054 * server.h: Add xsnprintf declaration.
5055 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5056 replace calls to snprintf by calls to xsnprintf throughout.
5058 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5060 * configure.ac: Add configure check for alloca.
5061 * configure, config.in: Regenerate.
5062 * server.h: Include alloca.h if it exists.
5063 * gdbreplay.c: Include alloca.h if it exists.
5065 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5067 * linux-low.c (__SIGRTMIN): Define if not already defined.
5068 (linux_create_inferior): Check for __ANDROID__ rather than
5070 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5071 are already deferred.
5072 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5073 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5074 stopped and already has a pending signal to report.
5075 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5076 a pending signal to report or is moving out of a jump pad.
5077 (linux_init_signals): Check for __ANDROID__ rather than
5080 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5082 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5083 debug_threads check. Avoid a linear search when not doing debug
5086 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5088 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5089 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5090 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5091 (process_event): Change local fd's type to gdb_fildes_t.
5092 (create_file_handler): Adjust prototype.
5093 (delete_file_handler): Adjust prototype.
5094 (handle_file_event): Adjust prototype. Use pfildes.
5095 (create_file_event): Adjsut prototype.
5096 * remote-utils.c (remote_desc, listen_desc): Change type to
5098 * server.h: New gdb_fildes_t typedef.
5099 [USE_WIN32API]: Include winsock2.h.
5100 (delete_file_handler, add_file_handler): Adjust prototypes.
5102 * utils.c (pfildes): New.
5104 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5106 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5107 * configure: Regenerate.
5109 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5111 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5112 (linux_done_accessing_memory): ... this.
5113 (linux_target_ops): Adjust.
5114 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5115 * nto-low.c (nto_target_ops): Adjust comment.
5116 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5117 * spu-low.c (spu_target_ops): Adjust comment.
5118 * target.h (target_ops): Rename unprepare_to_access_memory field
5119 to done_accessing_memory.
5120 (unprepare_to_access_memory): Rename to ...
5121 (done_accessing_memory): ... this.
5123 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5125 * linux-low.c (linux_prepare_to_access_memory): New.
5126 (linux_unprepare_to_access_memory): New.
5127 (linux_target_ops): Install them.
5128 * server.c (read_memory): Rename to ...
5129 (gdb_read_memory): ... this. Use
5130 prepare_to_access_memory/prepare_to_access_memory.
5131 (write_memory): Rename to ...
5132 (gdb_write_memory): ... this. Use
5133 prepare_to_access_memory/prepare_to_access_memory.
5134 (handle_search_memory_1): Adjust.
5135 (process_serial_event): Adjust.
5136 * target.h (struct target_ops): New fields
5137 prepare_to_access_memory and unprepare_to_access_memory.
5138 (prepare_to_access_memory, unprepare_to_access_memory): New.
5139 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5140 prepare_to_access_memory/prepare_to_access_memory.
5141 * nto-low.c (nto_target_ops): Adjust.
5142 * spu-low.c (spu_target_ops): Adjust.
5143 * win32-low.c (win32_target_ops): Adjust.
5145 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5147 * Makefile.in (WARN_CFLAGS): Get it from configure.
5148 (WERROR_CFLAGS): New.
5149 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5150 * configure.ac: Introduce --enable-werror, which adds -Werror to
5151 the compiler command line. Enabled by default. Disable with
5152 --disable-werror. Add -Wdeclaration-after-statement
5153 Wpointer-arith and -Wformat-nonliteral to warning flags.
5154 * configure: Regenerate.
5156 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5158 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5160 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5162 * gdbreplay.c (remote_error): New.
5164 (expect): Use gdbchar. Check for error reading from GDB.
5165 Clarify sync error output.
5166 (play): Check for errors writing to GDB.
5167 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5168 * remote-utils.c (getpkt): Check for errors writing to the remote
5171 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5173 * linux-low.c (linux_wait_1): Move non-debugging code out of
5174 `debug_threads' control.
5176 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5178 * linux-low.c (linux_wait_1): Don't set last_status here.
5179 * server.c (push_event, queue_stop_reply_callback): Assert we're
5180 not pushing a TARGET_WAITKIND_IGNORE event.
5181 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5182 (myresume, handle_target_event): Set the thread's last_resume_kind
5183 and last_status from the target returned status.
5185 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5189 * linux-x86-low.c (update_debug_registers_callback): New.
5190 (i386_dr_low_set_addr): Use it.
5191 (i386_dr_low_get_addr): New.
5192 (i386_dr_low_set_control): Use update_debug_registers_callback.
5193 (i386_dr_low_get_control): New.
5194 (i386_dr_low_get_status): Adjust.
5195 * linux-low.c (linux_stop_lwp): New.
5196 * linux-low.h (linux_stop_lwp): Declare.
5198 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5199 argument instead of a i386_debug_reg_state.
5200 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5201 a i386_debug_reg_state.
5202 (i386_insert_aligned_watchpoint): Adjust.
5203 (i386_remove_aligned_watchpoint): Adjust.
5204 (i386_low_stopped_data_address): Read the debug registers from the
5205 inferior instead of from the mirrors.
5206 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5207 (i386_dr_low_get_addr): Declare.
5208 (i386_dr_low_get_control): Declare.
5209 (i386_dr_low_get_status): Change prototype.
5211 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5212 (i386_dr_low_get_addr): New.
5213 (i386_dr_low_get_control): New.
5214 (i386_dr_low_get_status): Adjust prototype. Return
5216 (i386_initial_stuff): Clear dr_status_mirror and
5218 (i386_get_thread_context): Adjust.
5219 (i386_set_thread_context): Adjust.
5220 (i386_thread_added): Adjust.
5222 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5224 * linux-low.h (linux_thread_area): Delete declaration.
5226 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5228 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5229 after its termination.
5231 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5233 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5234 (gdb_wants_all_stopped): Delete.
5235 (linux_wait_1): Don't call them.
5236 * server.c (handle_v_cont): Tag all threads as want-stopped.
5237 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5238 stopped as "client-wants-stopped".
5240 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5242 * Makefile.in (signals_h): New.
5243 (server_h): Depend on it.
5244 (server.o): Don't depend on $(signals_def).
5245 (signals.o): Depend on $(signals_def).
5247 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5249 * Makefile.in (signals_def): New.
5250 (server_h): Append include/gdb/signals.h and signals_def.
5251 (server.o): Append signals_def.
5253 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5255 * server.c (handle_target_event): Use target_signal_to_host for
5256 resume_info.sig initialization.
5257 * target.h (struct thread_resume) <sig>: New comment.
5259 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5261 * server.c (handle_query): strcpy() the returned string from paddress()
5262 instead of sprintf().
5263 * utils.c (paddress): Return phex_nz().
5265 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5267 * server.c (handle_v_cont): Call mourn_inferior if process
5269 (myresume): Likewise.
5271 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5273 Static tracepoints, and integration with UST.
5275 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5276 * mem-break.c (uninsert_all_breakpoints)
5277 (reinsert_all_breakpoints): New.
5278 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5279 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5280 (gdb_agent_ust_loaded, helper_thread_id)
5281 (gdb_agent_helper_thread_id): New macros.
5282 (struct ipa_sym_addresses): Add addr_ust_loaded,
5283 addr_helper_thread_id, addr_cmd_buf.
5284 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5285 (in_process_agent_loaded_ust): New.
5286 (write_e_ust_not_loaded): New.
5287 (maybe_write_ipa_ust_not_loaded): New.
5288 (struct collect_static_trace_data_action): New.
5289 (enum tracepoint_type) <static_tracepoint>: New.
5290 (struct tracepoint) <handle>: Mention static tracepoints.
5291 (struct static_tracepoint_ctx): New.
5292 (CMD_BUF_SIZE): New.
5293 (add_tracepoint_action): Handle static tracepoint actions.
5294 (unprobe_marker_at): New.
5295 (clear_installed_tracepoints): Handle static tracepoints.
5296 (cmd_qtdp): Handle static tracepoints.
5297 (probe_marker_at): New.
5298 (cmd_qtstart): Handle static tracepoints.
5299 (response_tracepoint): Handle static tracepoints.
5300 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5301 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5302 (get_context_regcache): Handle static tracepoints.
5303 (do_action_at_tracepoint): Handle static tracepoint actions.
5304 (traceframe_find_block_type): Handle static trace data blocks.
5305 (traceframe_read_sdata): New.
5306 (download_tracepoints): Download static tracepoint actions.
5307 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5308 (GDB_PROBE_NAME): New.
5313 (ust_marker_to_static_tracepoint): New.
5315 (collect_ust_data_at_tracepoint): New.
5316 (gdb_ust_probe): New.
5317 (UNIX_PATH_MAX, SOCK_DIR): New.
5318 (gdb_ust_connect_sync_socket): New.
5319 (resume_thread, stop_thread): New.
5320 (run_inferior_command): New.
5321 (init_named_socket): New.
5322 (gdb_ust_socket_init): New.
5323 (cstr_to_hexstr): New.
5325 (first_marker, next_marker): New.
5326 (response_ust_marker): New.
5327 (cmd_qtfstm, cmd_qtsstm): New.
5328 (unprobe_marker_at, probe_marker_at): New.
5329 (cmd_qtstmat, gdb_ust_thread): New.
5330 (gdb_ust_init): New.
5331 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5332 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5334 (x86_64_st_collect_regmap): New.
5335 (X86_64_NUM_ST_COLLECT_GREGS): New.
5336 (AMD64_RIP_REGNUM): New.
5337 (supply_static_tracepoint_registers): New.
5338 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5340 (i386_st_collect_regmap): New.
5341 (i386_NUM_ST_COLLECT_GREGS): New.
5342 (supply_static_tracepoint_registers): New.
5343 * server.c (handle_query): Handle qXfer:statictrace:read.
5344 <qSupported>: Report support for StaticTracepoints, and
5345 qXfer:statictrace:read features.
5346 * server.h (traceframe_read_sdata)
5347 (supply_static_tracepoint_registers): Declare.
5348 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5349 (unpack_varlen_hex): Include in IPA build.
5350 * Makefile.in (ustlibs, ustinc): New.
5351 (IPA_OBJS): Add remote-utils-ipa.o.
5352 ($(IPA_LIB)): Link -ldl and -lpthread.
5354 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5355 * config.in, configure: Regenerate.
5357 2010-06-20 Ian Lance Taylor <iant@google.com>
5358 Pedro Alves <pedro@codesourcery.com>
5360 * linux-x86-low.c (always_true): Delete.
5361 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5362 trying to fool the compiler with always_true.
5364 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5366 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5367 conditions in gdbserver.
5369 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5371 * spu-low.c (spu_read_memory): Wrap around local store limit.
5372 (spu_write_memory): Likewise.
5374 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5376 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5377 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5379 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5381 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5382 uses with LONGEST uses.
5384 2010-06-14 Stan Shebs <stan@codesourcery.com>
5385 Pedro Alves <pedro@codesourcery.com>
5389 * linux-x86-low.c: Include limits.h.
5394 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5395 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5396 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5397 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5398 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5399 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5400 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5401 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5402 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5403 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5404 (amd64_emit_void_call_2): New.
5405 (amd64_emit_ops): New.
5406 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5407 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5408 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5409 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5410 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5411 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5412 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5413 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5414 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5415 (i386_emit_stack_adjust, i386_emit_int_call_1)
5416 (i386_emit_void_call_2): New.
5417 (i386_emit_ops): New.
5418 (x86_emit_ops): New.
5419 (the_low_target): Install x86_emit_ops.
5420 * server.h (struct emit_ops): New.
5421 (get_raw_reg_func_addr): Declare.
5422 (current_insn_ptr, emit_error): Declare.
5423 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5424 (set_trace_state_variable_value): New defines.
5425 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5426 addr_get_trace_state_variable_value and
5427 addr_set_trace_state_variable_value.
5428 (symbol_list): New fields for get_raw_reg,
5429 get_trace_state_variable_value and set_trace_state_variable_value.
5430 (condfn): New typedef.
5431 (struct tracepoint): New field `compiled_cond'.
5432 (do_action_at_tracepoint): Clear compiled_cond.
5433 (get_trace_state_variable_value, set_trace_state_variable_value):
5435 (condition_true_at_tracepoint): If there's a compiled condition,
5437 (current_insn_ptr, emit_error): New globals.
5438 (struct bytecode_address): New.
5439 (get_raw_reg_func_addr): New.
5440 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5441 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5442 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5443 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5444 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5445 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5446 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5447 (compile_tracepoint_condition, compile_bytecodes): New.
5448 * target.h (emit_ops): Forward declare.
5449 (struct target_ops): New field emit_ops.
5450 (target_emit_ops): New.
5451 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5452 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5453 * linux-low.c (linux_emit_ops): New.
5454 (linux_target_ops): Install it.
5455 * linux-low.h (struct linux_target_ops): New field emit_ops.
5457 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5459 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5460 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5462 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5463 Stan Shebs <stan@codesourcery.com>
5465 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5466 (all): Depend on $(extra_libraries).
5467 (install-only): Install the IPA.
5468 (IPA_OBJS, IPA_LIB): New.
5469 (clean): Remove the IPA lib.
5470 (IPAGENT_CFLAGS): New.
5471 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5472 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5473 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5474 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5475 * configure.ac: Check for atomic builtins support in the compiler.
5476 (IPA_DEPFILES, extra_libraries): Define.
5477 * configure.srv (ipa_obj): Add description.
5478 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5479 (i[34567]86-*-linux*): Set ipa_obj.
5480 (x86_64-*-linux*): Set ipa_obj.
5481 * linux-low.c (stabilizing_threads): New.
5482 (supports_fast_tracepoints): New.
5483 (linux_detach): Stabilize threads before detaching.
5484 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5485 the lwp is either not stabilizing, or is moving out of a jump pad.
5486 (linux_fast_tracepoint_collecting): New.
5487 (maybe_move_out_of_jump_pad): New.
5488 (enqueue_one_deferred_signal): New.
5489 (dequeue_one_deferred_signal): New.
5490 (linux_wait_for_event_1): If moving out of a jump pad, defer
5491 pending signals to later.
5492 (linux_stabilize_threads): New.
5493 (linux_wait_1): Check if threads need moving out of jump pads, and
5495 (stuck_in_jump_pad_callback): New.
5496 (move_out_of_jump_pad_callback): New.
5498 (linux_resume_one_lwp): Handle moving out of jump pads.
5499 (linux_set_resume_request): Dequeue deferred signals.
5500 (need_step_over_p): Also step over fast tracepoint jumps.
5501 (start_step_over): Also uninsert fast tracepoint jumps.
5502 (finish_step_over): Also reinsert fast tracepoint jumps.
5503 (linux_install_fast_tracepoint_jump): New.
5504 (linux_target_ops): Install linux_stabilize_threads and
5505 linux_install_fast_tracepoint_jump_pad.
5506 * linux-low.h (linux_target_ops) <get_thread_area,
5507 install_fast_tracepoint_jump_pad>: New fields.
5508 (struct lwp_info) <collecting_fast_tracepoint,
5509 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5510 (linux_get_thread_area): Declare.
5511 * linux-x86-low.c (jump_insn): New.
5512 (x86_get_thread_area): New.
5513 (append_insns): New.
5515 (amd64_install_fast_tracepoint_jump_pad): New.
5516 (i386_install_fast_tracepoint_jump_pad): New.
5517 (x86_install_fast_tracepoint_jump_pad): New.
5518 (the_low_target): Install x86_get_thread_area and
5519 x86_install_fast_tracepoint_jump_pad.
5520 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5521 (struct fast_tracepoint_jump): New.
5522 (fast_tracepoint_jump_insn): New.
5523 (fast_tracepoint_jump_shadow): New.
5524 (find_fast_tracepoint_jump_at): New.
5525 (fast_tracepoint_jump_here): New.
5526 (delete_fast_tracepoint_jump): New.
5527 (set_fast_tracepoint_jump): New.
5528 (uninsert_fast_tracepoint_jumps_at): New.
5529 (reinsert_fast_tracepoint_jumps_at): New.
5530 (set_breakpoint_at): Use write_inferior_memory.
5531 (uninsert_raw_breakpoint): Use write_inferior_memory.
5532 (check_mem_read): Mask out fast tracepoint jumps.
5533 (check_mem_write): Mask out fast tracepoint jumps.
5534 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5535 (set_fast_tracepoint_jump): Declare.
5536 (delete_fast_tracepoint_jump)
5537 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5538 (reinsert_fast_tracepoint_jumps_at): Declare.
5539 * regcache.c: Don't compile many functions when building the
5540 in-process agent library.
5541 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5542 the register buffer in the heap.
5543 (free_register_cache): If the register buffer isn't owned by the
5544 regcache, don't free it.
5545 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5546 pre-existing register caches.
5547 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5549 (convert_ascii_to_int): : Constify `from' parameter type.
5550 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5551 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5552 the needed buffer in-place.
5553 (relocate_instruction): New.
5554 * server.c (handle_query) <qSymbols>: If the target supports
5555 tracepoints, give it a chance of looking up symbols. Report
5556 support for fast tracepoints.
5557 (handle_status): Stabilize threads.
5558 (process_serial_event): Adjust.
5559 * server.h (struct fast_tracepoint_jump): Forward declare.
5560 (struct process_info) <fast_tracepoint_jumps>: New field.
5561 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5562 (decode_X_packet, decode_M_packet): Adjust.
5563 (relocate_instruction): Declare.
5564 (in_process_agent_loaded): Declare.
5565 (tracepoint_look_up_symbols): Declare.
5566 (struct fast_tpoint_collect_status): Declare.
5567 (fast_tracepoint_collecting): Declare.
5568 (force_unlock_trace_buffer): Declare.
5569 (handle_tracepoint_bkpts): Declare.
5570 (initialize_low_tracepoint)
5571 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5572 * target.h (struct target_ops) <stabilize_threads,
5573 install_fast_tracepoint_jump_pad>: New fields.
5574 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5575 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5576 [HAVE_STDINT_H]: Include stdint.h.
5577 (trace_debug_1): Rename to ...
5578 (trace_vdebug): ... this.
5579 (trace_debug): Rename to ...
5580 (trace_debug_1): ... this. Add `level' parameter.
5582 (ATTR_USED, ATTR_NOINLINE): New.
5583 (IP_AGENT_EXPORT): New.
5584 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5585 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5586 (about_to_request_buffer_space, trace_buffer_is_full)
5587 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5588 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5589 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5590 (traceframe_write_count, traceframes_created)
5591 (trace_state_variables)
5592 New renaming defines.
5593 (struct ipa_sym_addresses): New.
5594 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5596 (ipa_sym_addrs): New.
5597 (all_tracepoint_symbols_looked_up): New.
5598 (in_process_agent_loaded): New.
5599 (write_e_ipa_not_loaded): New.
5600 (maybe_write_ipa_not_loaded): New.
5601 (tracepoint_look_up_symbols): New.
5602 (debug_threads) [IN_PROCESS_AGENT]: New.
5603 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5604 (UNKNOWN_SIDE_EFFECTS): New.
5605 (stop_tracing): New.
5606 (flush_trace_buffer): New.
5607 (stop_tracing_bkpt): New.
5608 (flush_trace_buffer_bkpt): New.
5609 (read_inferior_integer): New.
5610 (read_inferior_uinteger): New.
5611 (read_inferior_data_pointer): New.
5612 (write_inferior_data_pointer): New.
5613 (write_inferior_integer): New.
5614 (write_inferior_uinteger): New.
5615 (struct collect_static_trace_data_action): Delete.
5616 (enum tracepoint_type): New.
5617 (struct tracepoint) <type>: New field `type'.
5618 <actions_str, step_actions, step_actions_str>: Only include in
5620 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5621 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5622 (tracepoints): Use IP_AGENT_EXPORT.
5623 (last_tracepoint): Don't include in the IPA.
5624 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5625 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5626 (alloced_trace_state_variables): New.
5627 (trace_state_variables): Use IP_AGENT_EXPORT.
5628 (traceframe_t): Delete unused variable.
5629 (circular_trace_buffer): Don't include in the IPA.
5630 (trace_buffer_start): Delete.
5631 (struct trace_buffer_control): New.
5632 (trace_buffer_free): Delete.
5633 (struct ipa_trace_buffer_control): New.
5634 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5635 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5637 (trace_buffer_ctrl): New.
5638 (TRACE_BUFFER_CTRL_CURR): New.
5639 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5640 Reimplement as macros.
5641 (trace_buffer_wrap): Delete.
5642 (traceframe_write_count, traceframe_read_count)
5643 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5644 (struct tracepoint_hit_ctx) <type>: New field.
5645 (struct fast_tracepoint_ctx): New.
5646 (memory_barrier): New.
5648 (record_tracepoint_error): Update atomically in the IPA.
5649 (clear_inferior_trace_buffer): New.
5650 (about_to_request_buffer_space): New.
5651 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5652 updating the same buffer.
5653 (add_tracepoint): Default the tracepoint's type to trap
5654 tracepoint, and orig_size to -1.
5655 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5657 (create_trace_state_variable): New parameter `gdb'. Handle it.
5658 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5659 (cmd_qtdp): Handle fast tracepoints.
5661 (max_jump_pad_size): New.
5662 (gdb_jump_pad_head): New.
5663 (get_jump_space_head): New.
5664 (claim_jump_space): New.
5665 (sort_tracepoints): New.
5666 (MAX_JUMP_SIZE): New.
5667 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5669 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5670 support. Upload fast traceframes, and delete internal IPA
5672 (stop_tracing_handler): New.
5673 (flush_trace_buffer_handler): New.
5674 (cmd_qtstop): Upload fast tracepoints.
5675 (response_tracepoint): Handle fast tracepoints.
5676 (tracepoint_finished_step): Upload fast traceframes. Set the
5677 tracepoint hit context's tracepoint type.
5678 (handle_tracepoint_bkpts): New.
5679 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5680 type. Add comment about fast tracepoints.
5681 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5682 non-existing action_str field.
5683 (get_context_regcache): Handle fast tracepoints.
5684 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5686 (fast_tracepoint_from_jump_pad_address): New.
5687 (fast_tracepoint_from_ipa_tpoint_address): New.
5688 (collecting_t): New.
5689 (force_unlock_trace_buffer): New.
5690 (fast_tracepoint_collecting): New.
5693 (write_inferior_data_ptr): New.
5694 (target_tp_heap): New.
5695 (target_malloc): New.
5696 (download_agent_expr): New.
5698 (download_tracepoints): New.
5699 (download_trace_state_variables): New.
5700 (upload_fast_traceframes): New.
5701 (IPA_FIRST_TRACEFRAME): New.
5702 (IPA_NEXT_TRACEFRAME_1): New.
5703 (IPA_NEXT_TRACEFRAME): New.
5704 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5705 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5706 (gdb_jump_pad_buffer_end): New.
5707 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5708 (initialize_tracepoint): Adjust.
5709 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5710 buffer. Initialize the low module.
5711 * utils.c (PREFIX, TOOLNAME): New.
5712 (malloc_failure): Use PREFIX.
5713 (error): In the IPA, an error causes an exit.
5714 (fatal, warning): Use PREFIX.
5715 (internal_error): Use TOOLNAME.
5716 (NUMCELLS): Increase to 10.
5717 * configure, config.in: Regenerate.
5719 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5721 * server.c (handle_query) <qSupported>: Do two passes over the
5722 qSupported string to avoid nesting strtok.
5724 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5726 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5728 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5730 * configure: Regenerate.
5731 * proc-service.list: New.
5733 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5735 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5738 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5740 * gdbreplay.c (remote_open): Check error return from socket() call by
5741 its equality to -1 not by it being negative.
5742 * remote-utils.c (remote_open): Likewise.
5744 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5746 * config.h: Regenerate.
5748 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5750 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5751 doesn't provide PTRACE_GET_THREAD_AREA.
5753 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5755 * linux-m68k-low.c: Include <asm/ptrace.h>
5756 (ps_get_thread_area): Implement.
5758 2010-05-03 Doug Evans <dje@google.com>
5760 * event-loop.c (struct callback_event): New struct.
5761 (callback_list): New global.
5762 (append_callback_event, delete_callback_event): New functions.
5763 (process_callback): New function.
5764 (start_event_loop): Call it.
5765 * remote-utils.c (NOT_SCHEDULED): Define.
5766 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5767 moved out of readchar.
5768 (readchar): Rewrite. Call reschedule before returning.
5769 (reset_readchar): New function.
5770 (remote_close): Call it.
5771 (process_remaining, reschedule): New functions.
5772 * server.h (callback_handler_func): New typedef.
5773 (append_callback_event, delete_callback_event): Declare.
5775 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5777 * proc-service.c (ps_pglobal_lookup): Use
5778 thread_db_look_up_one_symbol.
5779 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5780 parameter. Use it instead of all_symbols_looked_up.
5781 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5783 (all_symbols_looked_up): Don't declare.
5784 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5785 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5787 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5788 Set all_symbols_looked_up here.
5789 (thread_db_look_up_one_symbol): New.
5790 (thread_db_get_tls_address): Adjust.
5791 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5792 thread_db object on the heap, and tentatively set it in the
5794 (thread_db_init): Don't set all_symbols_looked_up here.
5795 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5797 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5799 * linux-low.c (linux_kill, linux_detach): Adjust.
5800 (status_pending_p_callback): Remove redundant statement. Check
5801 for !TARGET_WAITIKIND_IGNORE, instead of
5802 TARGET_WAITKIND_STOPPED.
5803 (handle_tracepoints): Make sure LWP is locked. Adjust.
5804 (linux_wait_for_event_1): Adjust.
5805 (linux_cancel_breakpoints): New.
5806 (unsuspend_one_lwp): New.
5807 (unsuspend_all_lwps): New.
5808 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5809 (send_sigstop_callback): Change return type to int, add new
5810 `except' parameter and handle it.
5811 (suspend_and_send_sigstop_callback): New.
5812 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5813 pass them down. If SUSPEND, also increment the lwp's suspend
5815 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5816 (need_step_over_p): Don't consider suspended LWPs.
5817 (start_step_over): Adjust.
5818 (proceed_one_lwp): Change return type to int, add new `except'
5819 parameter and handle it.
5820 (unsuspend_and_proceed_one_lwp): New.
5821 (proceed_all_lwps): Use find_inferior instead of
5823 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5824 also decrement the suspend count of LWPs. Pass `except' down,
5825 instead of hacking its suspend count.
5826 (linux_pause_all): Add `freeze' parameter. Adjust.
5827 (linux_unpause_all): New.
5828 (linux_target_ops): Install linux_unpause_all.
5829 * server.c (handle_status): Adjust.
5830 * target.h (struct target_ops): New fields `unpause_all' and
5831 `cancel_breakpoints'. Add new parameter to `pause_all'.
5832 (pause_all): Add new `freeze' parameter.
5834 (cancel_breakpoints): New.
5835 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5837 (cmd_qtstart): Pause threads.
5838 (stop_tracing): Pause threads, and cancel breakpoints.
5839 * win32-low.c (win32_target_ops): Adjust.
5841 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5843 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5844 the inferior right away from here...
5845 (linux_wait_1): ... to here, and adjust to check the thread's
5846 last_resume_kind instead of the lwp's step or stop_expected flags.
5848 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5850 * README: Use consistent `GDB' and `GDBserver' spellings.
5852 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5854 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5855 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5856 (linux_detach_one_lwp): Assume the lwp is stopped.
5857 (any_thread_of): Delete.
5858 (linux_detach): Stop all lwps here. Don't blindly delete all
5860 (delete_lwp_callback): New.
5861 (linux_mourn): Delete all lwps of the process that is gone.
5862 (linux_wait_1): Don't delete the last lwp of the process here.
5863 * mem-break.h (mark_breakpoints_out): Declare.
5864 * mem-break.c (mark_breakpoints_out): New.
5865 (free_all_breakpoints): Use it.
5866 * server.c (handle_target_event): If the process is gone, mark
5868 * thread-db.c (struct thread_db) <create_bp>: New field.
5869 (thread_db_enable_reporting): Fix prototype. Store a thread event
5870 breakpoint reference in the thread_db struct.
5871 (thread_db_load_search): Clear the thread_db object.
5872 (try_thread_db_load_1): Ditto.
5873 (switch_to_process): New.
5874 (disable_thread_event_reporting): Use it.
5875 (remove_thread_event_breakpoints): New.
5876 (thread_db_detach, thread_db_mourn): Use it.
5878 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5880 * linux-low.c (linux_enable_event_reporting): New.
5881 (linux_wait_for_event_1, handle_extended_wait): Use it.
5883 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5885 * linux-low.c (linux_kill_one_lwp, linux_kill)
5886 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5887 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5888 SIGSTOP even if the LWP is stopped.
5889 (send_sigstop_callback): New.
5890 (stop_all_lwps): Use send_sigstop_callback instead.
5891 (linux_resume_one_thread): Adjust.
5892 (proceed_one_lwp): Still proceed an LWP that the client has
5893 requested to stop, if we haven't reported it as stopped yet. Make
5894 sure that LWPs the client want stopped, have a pending SIGSTOP.
5896 2010-04-26 Doug Evans <dje@google.com>
5898 * server.c (handle_general_set): Make static.
5900 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5901 Print received char after testing for error/eof instead of before.
5902 (input_interrupt): Tweak comment.
5904 2010-04-23 Doug Evans <dje@google.com>
5906 * server.c (start_inferior): Print inferior argv if --debug.
5908 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5910 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5911 * nto-x86-low.c: Include server.h
5913 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5915 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5916 be consistent with other sources of this directory.
5917 (init_registers_amd64): Correct name of source file of this function
5920 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5922 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5925 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5927 * win32-i386-low.c: Add 64-bit support.
5928 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5929 (init_registers_amd64): Declare.
5930 (mappings): Add 64-bit version of array.
5931 (init_windows_x86): New function.
5932 (the_low_target): Change init_arch field to init_windows_x86.
5934 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5936 * win32-low.c: Adapt to support also 64-bit architecture.
5937 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5938 (get_image_name): Use SIZE_T type for local variable `done'.
5939 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5940 (toolhelp_get_dll_name): Idem.
5941 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5942 Use uintptr_t typecast to avoid warning.
5943 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5944 (handle_exception): Use phex_nz to avoid warning.
5945 (win32_wait): Remove unused local variable `process'.
5947 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5949 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5952 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5954 * configure.ac: Use `ws2_32' library for srv_mingw.
5955 * configure: Regenerate.
5956 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5957 * remote-utils.c: Likewise.
5959 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5961 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5962 if __x86_64__ is defined.
5964 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5966 * configure: Regenerate.
5968 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5970 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5971 * target.h (target_ops): New get_tib_address field.
5972 * win32-low.h (win32_thread_info): Add thread_local_base field.
5973 * win32-low.c (child_add_thread): Add tlb argument.
5974 Set thread_local_base field to TLB.
5975 (get_child_debug_event): Adapt to child_add_thread change.
5976 (win32_get_tib_address): New function.
5977 (win32_target_ops): Set get_tib_address field to
5978 win32_get_tib_address.
5979 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5981 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5983 * linux-low.c (linux_mourn): Also remove the process.
5984 * server.c (handle_target_event): Don't remove the process here.
5985 * nto-low.c (nto_mourn): New.
5986 (nto_target_ops): Install it.
5987 * spu-low.c (spu_mourn): New.
5988 (spu_target_ops): Install it.
5989 * win32-low.c (win32_mourn): New.
5990 (win32_target_ops): Install it.
5992 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5994 * server.h (buffer_xml_printf): Remove redundant `;'.
5996 2010-04-12 Pedro Alves <pedro@codesourcery.com>
5998 * regcache.c (set_register_cache): Invalidate regcaches before
5999 changing the register cache layout.
6000 (regcache_invalidate_one): Allow a NULL regcache.
6001 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6002 regcaches before changing the register cache layout or the target
6005 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6007 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6008 variable warning on Linux/x86-64.
6010 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6012 GDBserver disconnected tracing support.
6014 * linux-low.c (linux_remove_process): Delete.
6015 (add_lwp): Don't set last_resume_kind here.
6016 (linux_kill): Use `mourn'.
6017 (linux_detach): Use `thread_db_detach', and `mourn'.
6019 (linux_attach_lwp_1): Adjust comment.
6020 (linux_attach): last_resume_kind moved the thread_info; adjust.
6021 (status_pending_p_callback): Adjust.
6022 (linux_wait_for_event_1): Adjust.
6023 (count_events_callback, select_singlestep_lwp_callback)
6024 (select_event_lwp_callback, cancel_breakpoints_callback)
6025 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6026 (proceed_one_lwp): Adjust.
6027 (linux_async): Add debug output.
6028 (linux_thread_stopped): New.
6029 (linux_pause_all): New.
6030 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6032 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6033 (thread_db_free): Delete declaration.
6034 (thread_db_detach, thread_db_mourn): Declare.
6035 * thread-db.c (thread_db_init): Use thread_db_mourn.
6036 (thread_db_free): Delete, split in two.
6037 (disable_thread_event_reporting): New.
6038 (thread_db_detach): New.
6039 (thread_db_mourn): New.
6041 * server.h (struct thread_info) <last_resume_kind>: New field.
6042 <attached>: Add comment.
6043 <gdb_detached>: New field.
6044 (handler_func): Change return type to int.
6045 (handle_serial_event, handle_target_event): Ditto.
6046 (gdb_connected): Declare.
6048 (disconnected_tracing): Declare.
6049 (stop_tracing): Declare.
6051 * server.c (handle_query) <qSupported>: Report support for
6052 disconnected tracing.
6053 (queue_stop_reply_callback): Account for running threads.
6054 (gdb_wants_thread_stopped): New.
6055 (gdb_wants_all_threads_stopped): New.
6056 (gdb_reattached_process): New.
6057 (handle_status): Clear the `gdb_detached' flag of all processes.
6058 In all-stop, stop all threads.
6059 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6060 (process_serial_event): If the remote connection breaks, or if an
6061 exit was forced with "monitor exit", force an event loop exit.
6062 Handle disconnected tracing on detach.
6063 (handle_serial_event): Adjust.
6064 (handle_target_event): If GDB isn't connected, forward events back
6065 to the inferior, unless the last process exited, in which case,
6066 exit gdbserver. Adjust interface.
6068 * remote-utils.c (remote_open): Don't block in accept. Instead
6069 register an event loop source on the listen socket file
6070 descriptor. Refactor bits into ...
6071 (listen_desc): ... this new global.
6072 (gdb_connected): ... this new function.
6073 (enable_async_notification): ... this new function.
6074 (handle_accept_event): ... this new function.
6075 (remote_close): Clear remote_desc.
6077 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6079 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6081 (mourn_inferior): Define.
6082 (target_process_qsupported): Avoid the dangling else problem.
6083 (thread_stopped): Define.
6084 (pause_all): Define.
6085 (target_waitstatus_to_string): Declare.
6086 * target.c (target_waitstatus_to_string): New.
6088 * tracepoint.c (tracing): Make extern.
6089 (disconnected_tracing): New.
6090 (stop_tracing): Make extern. Handle tracing stops due to GDB
6092 (cmd_qtdisconnected): New.
6093 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6094 (handle_tracepoint_general_set): Handle QTDisconnected.
6096 * event-loop.c (event_handler_func): Change return type to int.
6097 (process_event): Bail out if the event handler wants the event
6099 (handle_file_event): Ditto.
6100 (start_event_loop): Bail out if the event handler wants the event
6103 * nto-low.c (nto_target_ops): Adjust.
6104 * spu-low.c (spu_wait): Don't remove the process here.
6105 (spu_target_ops): Adjust.
6106 * win32-low.c (win32_wait): Don't remove the process here.
6107 (win32_target_ops): Adjust.
6109 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6111 * regcache.c (realloc_register_cache): Invalidate inferior's
6112 regcache before recreating it.
6114 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6116 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6118 2010-04-09 Stan Shebs <stan@codesourcery.com>
6119 Pedro Alves <pedro@codesourcery.com>
6121 * server.h (LONGEST): New.
6122 (struct thread_info) <while_stepping>: New field.
6123 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6125 (initialize_tracepoint, handle_tracepoint_general_set)
6126 (handle_tracepoint_query, tracepoint_finished_step)
6127 (tracepoint_was_hit, release_while_stepping_state_list):
6128 (current_traceframe): Declare.
6129 * server.c (handle_general_set): Handle tracepoint packets.
6131 (write_memory): New.
6132 (handle_search_memory_1): Use read_memory.
6133 (handle_query): Report support for conditional tracepoints, trace
6134 state variables, and tracepoint sources. Handle tracepoint
6136 (main): Initialize the tracepoints module.
6137 (process_serial_event): Handle traceframe reads/writes.
6139 * linux-low.c (handle_tracepoints): New.
6140 (linux_wait_1): Call it.
6141 (linux_resume_one_lwp): Handle while-stepping.
6142 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6143 (linux_target_ops): Install them.
6144 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6146 * linux-x86-low.c (x86_supports_tracepoints): New.
6147 (the_low_target). Install it.
6149 * mem-break.h (delete_breakpoint): Declare.
6150 * mem-break.c (delete_breakpoint): Make external.
6152 * target.h (struct target_ops): Add `supports_tracepoints',
6153 `read_pc', and `write_pc' fields.
6154 (target_supports_tracepoints): Define.
6155 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6158 * regcache.h (struct regcache) <registers_owned>: New field.
6159 (init_register_cache, regcache_cpy): Declare.
6160 (regcache_read_pc, regcache_write_pc): Declare.
6161 (register_cache_size): Declare.
6162 (supply_regblock): Declare.
6163 * regcache.c (init_register_cache): New.
6164 (new_register_cache): Use it.
6165 (regcache_cpy): New.
6166 (register_cache_size): New.
6167 (supply_regblock): New.
6168 (regcache_read_pc, regcache_write_pc): New.
6170 * tracepoint.c: New.
6172 * Makefile.in (OBS): Add tracepoint.o.
6173 (tracepoint.o): New rule.
6175 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6177 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6179 (i386-mmx.c): Likewise.
6180 (i386-mmx-linux.o): Likewise.
6181 (i386-mmx-linux.c): Likewise.
6183 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6184 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6185 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6186 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6188 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6189 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6190 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6192 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6194 * Makefile.in (clean): Updated.
6196 (i386-avx.c): Likewise.
6197 (i386-avx-linux.o): Likewise.
6198 (i386-avx-linux.c): Likewise.
6199 (amd64-avx.o): Likewise.
6200 (amd64-avx.c): Likewise.
6201 (amd64-avx-linux.o): Likewise.
6202 (amd64-avx-linux.c): Likewise.
6204 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6205 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6206 (srv_amd64_regobj): Add amd64-avx.o.
6207 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6208 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6209 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6210 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6211 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6212 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6213 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6215 * i387-fp.c: Include "i386-xstate.h".
6217 (i387_cache_to_xsave): Likewise.
6218 (i387_xsave_to_cache): Likewise.
6219 (x86_xcr0): Likewise.
6221 * i387-fp.h (i387_cache_to_xsave): Likewise.
6222 (i387_xsave_to_cache): Likewise.
6223 (x86_xcr0): Likewise.
6225 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6226 * linux-crisv32-low.c (target_regsets): Likewise.
6227 * linux-m68k-low.c (target_regsets): Likewise.
6228 * linux-mips-low.c (target_regsets): Likewise.
6229 * linux-ppc-low.c (target_regsets): Likewise.
6230 * linux-s390-low.c (target_regsets): Likewise.
6231 * linux-sh-low.c (target_regsets): Likewise.
6232 * linux-sparc-low.c (target_regsets): Likewise.
6233 * linux-xtensa-low.c (target_regsets): Likewise.
6235 * linux-low.c: Include <sys/uio.h>.
6236 (regsets_fetch_inferior_registers): Support nt_type.
6237 (regsets_store_inferior_registers): Likewise.
6238 (linux_process_qsupported): New.
6239 (linux_target_ops): Add linux_process_qsupported.
6241 * linux-low.h (regset_info): Add nt_type.
6242 (linux_target_ops): Add process_qsupported.
6244 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6246 (init_registers_i386_avx_linux): New.
6247 (init_registers_amd64_avx_linux): Likewise.
6248 (xmltarget_i386_linux_no_xml): Likewise.
6249 (xmltarget_amd64_linux_no_xml): Likewise.
6250 (PTRACE_GETREGSET): Likewise.
6251 (PTRACE_SETREGSET): Likewise.
6252 (x86_fill_xstateregset): Likewise.
6253 (x86_store_xstateregset): Likewise.
6254 (use_xml): Likewise.
6255 (x86_linux_update_xmltarget): Likewise.
6256 (x86_linux_process_qsupported): Likewise.
6257 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6258 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6259 init_registers_i386_linux here. Call
6260 x86_linux_update_xmltarget.
6261 (the_low_target): Add x86_linux_process_qsupported.
6263 * server.c (handle_query): Call target_process_qsupported.
6265 * target.h (target_ops): Add process_qsupported.
6266 (target_process_qsupported): New.
6268 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6270 * inferiors.c (add_thread): Set last_status kind to
6271 TARGET_WAITKIND_IGNORE.
6272 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6273 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6274 (linux_wait_1): Move `thread' local definition to block that uses
6275 it. Don't NULL initialize `event_child'.
6276 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6277 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6278 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6280 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6282 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6283 an extended waitstatus, or by a watchpoint.
6284 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6285 thread was stepping or has been stopped by a watchpoint.
6287 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6289 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6290 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6291 of another, then delete the previous, and validate all
6293 (validate_inserted_breakpoint): New.
6294 (delete_disabled_breakpoints): New.
6295 (validate_breakpoints): New.
6296 (check_mem_read): Validate breakpoints before trusting their
6297 shadow. Delete disabled breakpoints.
6298 (check_mem_write): Validate breakpoints before trusting they
6299 should be inserted. Delete disabled breakpoints.
6300 * mem-break.h (validate_breakpoints):
6301 * server.c (handle_query): Validate breakpoints when we see a
6304 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6306 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6307 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6308 if we could tell there's a GDB breakpoint at stop_pc.
6309 (need_step_over_p): Don't do a step over if we find a GDB
6310 breakpoint at the resume PC.
6312 * mem-break.c (struct raw_breakpoint): New.
6313 (enum bkpt_type): New type `gdb_breakpoint'.
6314 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6315 fields. New field `raw'.
6316 (find_raw_breakpoint_at): New.
6317 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6319 (set_breakpoint_at): Adjust.
6320 (delete_raw_breakpoint): New.
6321 (release_breakpoint): New.
6322 (delete_breakpoint): Rename to...
6323 (delete_breakpoint_1): ... this. Add proc parameter. Use
6324 release_breakpoint. Return ENOENT.
6325 (delete_breakpoint): Reimplement.
6326 (find_breakpoint_at): Delete.
6327 (find_gdb_breakpoint_at): New.
6328 (delete_breakpoint_at): Delete.
6329 (set_gdb_breakpoint_at): New.
6330 (delete_gdb_breakpoint_at): New.
6331 (gdb_breakpoint_here): New.
6332 (set_reinsert_breakpoint): Use release_breakpoint.
6333 (uninsert_breakpoint): Rename to ...
6334 (uninsert_raw_breakpoint): ... this.
6335 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6336 (reinsert_raw_breakpoint): Change parameter type to
6338 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6340 (check_breakpoints): Adjust. Use release_breakpoint.
6341 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6342 (breakpoint_inserted_here): Ditto.
6343 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6344 Don't trust the breakpoint's shadow if it is not inserted.
6345 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6346 (delete_all_breakpoints): Adjust.
6347 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6348 use delete_breakpoint_1.
6350 * mem-break.h (breakpoints_supported): Delete declaration.
6351 (set_gdb_breakpoint_at): Declare.
6352 (gdb_breakpoint_here): Declare.
6353 (delete_breakpoint_at): Delete.
6354 (delete_gdb_breakpoint_at): Declare.
6356 * server.h (struct raw_breakpoint): Forward declare.
6357 (struct process_info): New field `raw_breakpoints'.
6359 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6362 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6364 * linux-low.c (status_pending_p_callback): Fix comment.
6365 (linux_wait_for_event_1): Move most of the internal breakpoint
6366 handling from here...
6367 (linux_wait_1): ... to here.
6368 (count_events_callback): New.
6369 (select_singlestep_lwp_callback): New.
6370 (select_event_lwp_callback): New.
6371 (cancel_breakpoints_callback): New.
6372 (select_event_lwp): New.
6373 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6374 priority to all LWPs that have had events that should be reported
6375 to the client. Cancel breakpoints when about to reporting the
6376 event to the client, not while stopping lwps. No longer cancel
6377 finished single-steps here.
6378 (cancel_finished_single_step): Delete.
6379 (cancel_finished_single_steps): Delete.
6381 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6383 * mem-break.c (enum bkpt_type): New.
6384 (struct breakpoint): New field `type'.
6385 (set_breakpoint_at): Change return type to struct breakpoint
6386 pointer. Set type to `other_breakpoint' by default.
6387 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6388 in the breakpoint list.
6389 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6390 (reinsert_breakpoint): Rename to ...
6391 (reinsert_raw_breakpoint): ... this.
6392 (reinsert_breakpoints_at): Adjust.
6393 * mem-break.h (struct breakpoint): Declare.
6394 (set_breakpoint_at): Change return type to struct breakpoint
6397 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6399 * server.c (handle_query): Assign, not compare.
6401 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6403 Teach linux gdbserver to step-over-breakpoints.
6405 * linux-low.c (can_hardware_single_step): New.
6406 (supports_breakpoints): New.
6407 (handle_extended_wait): If stopping threads, read the stop pc of
6410 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6411 low target doesn't support retrieving the PC.
6412 (add_lwp): Set last_resume_kind to resume_continue.
6413 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6414 (linux_attach): Don't clear stop_expected. Set the lwp's
6415 last_resume_kind to resume_stop.
6416 (linux_detach_one_lwp): Don't check for removed breakpoints.
6417 (check_removed_breakpoint): Delete.
6418 (status_pending_p): Rename to ...
6419 (status_pending_p_callback): ... this. Don't check for removed
6420 breakpoints. Don't consider threads that are stopped from GDB's
6422 (linux_wait_for_lwp): Always read the stop_pc here.
6423 (cancel_breakpoint): New.
6424 (step_over_bkpt): New global.
6425 (linux_wait_for_event_1): Implement stepping over breakpoints.
6426 (gdb_wants_lwp_stopped): New.
6427 (gdb_wants_all_stopped): New.
6428 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6429 single-step traps here. Store the thread's last reported target
6431 (send_sigstop): Don't clear stop_expected. Always set it,
6433 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6434 (cancel_finished_single_step): New.
6435 (cancel_finished_single_steps): New.
6436 (wait_for_sigstop): Don't cancel finished single-step traps here.
6437 (linux_resume_one_lwp): Don't check for removed breakpoints.
6438 Don't set `step' on non-hardware step archs.
6439 (linux_set_resume_request): Ignore resume_stop requests if already
6440 stopping or stopped. Set the lwp's last_resume_kind.
6441 (resume_status_pending_p): Don't check for removed breakpoints.
6442 (need_step_over_p): New.
6443 (start_step_over): New.
6444 (finish_step_over): New.
6445 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6446 requests. Clear the thread's last reported target waitstatus.
6447 Don't use the `suspended' flag. Don't consider pending breakpoints.
6448 (linux_resume): Start a step-over if necessary.
6449 (proceed_one_lwp): New.
6450 (proceed_all_lwps): New.
6451 (unstop_all_lwps): New.
6452 * linux-low.h (struct lwp_info): Rewrite comment for the
6453 `suspended' flag. Add the `stop_pc' field. Delete the
6454 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6455 Add `'last_resume_kind' and `need_step_over' fields.
6456 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6457 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6458 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6459 (set_raw_breakpoint_at): New.
6460 (set_breakpoint_at): Rewrite to use it.
6461 (reinsert_breakpoint_handler): Delete.
6462 (set_reinsert_breakpoint): New.
6463 (reinsert_breakpoint_by_bp): Delete.
6464 (delete_reinsert_breakpoints): New.
6465 (uninsert_breakpoint): Rewrite.
6466 (uninsert_breakpoints_at): New.
6467 (reinsert_breakpoint): Rewrite.
6468 (reinsert_breakpoints_at): New.
6469 (check_breakpoints): Rewrite.
6470 (breakpoint_here): New.
6471 (breakpoint_inserted_here): New.
6472 (check_mem_read): Adjust.
6473 * mem-break.h (breakpoints_supported, breakpoint_here)
6474 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6475 (reinsert_breakpoint_by_bp): Delete declaration.
6476 (delete_reinsert_breakpoints): Declare.
6477 (reinsert_breakpoint): Delete declaration.
6478 (reinsert_breakpoints_at): Declare.
6479 (uninsert_breakpoint): Delete declaration.
6480 (uninsert_breakpoints_at): Declare.
6481 (check_breakpoints): Adjust prototype.
6482 * server.h: Adjust include order.
6483 (struct thread_info): Declare here. Add a `last_status' field.
6485 2010-03-23 Michael Snyder <msnyder@vmware.com>
6487 * server.c (crc32): New function.
6488 (handle_query): Add handling for 'qCRC:' request.
6490 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6492 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6493 lwp had been stopped by a watchpoint.
6495 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6497 * server.h (internal_error): Declare.
6498 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6499 * utils.c (internal_error): New function.
6501 2010-03-15 Andreas Schwab <schwab@redhat.com>
6503 * configure.srv: Fix typo setting srv_regobj.
6505 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6507 * linux-low.c (fetch_register): Avoid passing a non string literal
6509 (usr_store_inferior_registers): Ditto.
6511 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6513 * linux-low.c (linux_write_memory): Bail out early if peeking
6516 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6518 * linux-low.h (struct lwp_info): New fields
6519 `stopped_by_watchpoint' and `stopped_data_address'.
6520 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6521 here, and cache them in the lwp object.
6522 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6524 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6526 (linux_stopped_by_watchpoint): Rewrite.
6527 (linux_stopped_data_address): Rewrite.
6529 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6531 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6532 switching the current inferior, not before.
6534 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6536 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6537 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6538 i386-linux.c and amd64-linux.c.
6539 (reg-i386.o): Removed.
6540 (reg-i386.c): Likewise.
6541 (reg-i386-linux.o): Likewise.
6542 (reg-i386-linux.c): Likewise.
6543 (reg-x86-64.o): Likewise.
6544 (reg-x86-64.c): Likewise.
6545 (reg-x86-64-linux.o): Likewise.
6546 (reg-x86-64-linux.c): Likewise.
6549 (i386-linux.o): Likewise.
6550 (i386-linux.c): Likewise.
6551 (amd64.o): Likewise.
6552 (amd64.c): Likewise.
6553 (amd64-linux.o): Likewise.
6554 (amd64-linux.c): Likewise.
6556 * configure.srv (srv_i386_regobj): New.
6557 (srv_i386_linux_regobj): Likewise.
6558 (srv_amd64_regobj): Likewise.
6559 (srv_amd64_linux_regobj): Likewise.
6560 (srv_i386_32bit_xmlfiles): Likewise.
6561 (srv_i386_64bit_xmlfiles): Likewise.
6562 (srv_i386_xmlfiles): Likewise.
6563 (srv_amd64_xmlfiles): Likewise.
6564 (srv_i386_linux_xmlfiles): Likewise.
6565 (srv_amd64_linux_xmlfiles): Likewise.
6566 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6567 srv_xmlfiles to $srv_i386_xmlfiles.
6568 (i[34567]86-*-mingw32ce*): Likewise.
6569 (i[34567]86-*-mingw*): Likewise.
6570 (i[34567]86-*-nto*): Likewise.
6571 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6572 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6573 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6574 (x86_64-*-linux*): Likewise.
6576 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6577 (init_registers_amd64_linux): New.
6578 (x86_arch_setup): Replace init_registers_x86_64_linux with
6579 init_registers_amd64_linux.
6581 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6583 * configure.ac: Check for libdl. If it is not available link against
6584 static libthread_db.
6585 * configure: Regenerate.
6587 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6591 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6592 handing a read watchpoint.
6593 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6595 2010-02-12 Doug Evans <dje@google.com>
6597 * linux-low.c (linux_supports_tracefork_flag): Document.
6598 (linux_look_up_symbols): Add comment.
6600 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6602 * regcache.c (supply_register): Clear regcache if buf is NULL.
6604 2010-02-02 Nicolas Roche <roche@sourceware.org>
6605 Joel Brobecker <brobecker@adacore.com>
6607 * inferiors.c (find_inferior): Add function documentation.
6608 (unloaded_dll): Handle the case where the unloaded dll has not
6609 been previously registered in the dll list.
6611 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6613 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6614 (thumb2_breakpoint): New.
6615 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6617 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6619 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6620 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6623 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6625 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6627 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6629 * linux-s390-low.c (s390_collect_ptrace_register)
6630 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6632 2010-01-21 Doug Evans <dje@google.com>
6634 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6635 (PTRACE_ARG4_TYPE): New macro.
6636 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6637 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6638 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6639 (usr_store_inferior_registers): Ditto.
6640 (linux_read_memory, linux_write_memory): Ditto.
6641 (linux_test_for_tracefork): Ditto.
6643 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6644 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6646 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6648 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6651 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6653 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6654 prototype to take a regcache. Adjust.
6656 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6658 * regcache.h (struct thread_info): Forward declare.
6659 (struct regcache): New.
6660 (new_register_cache): Adjust prototype.
6661 (get_thread_regcache): Declare.
6662 (free_register_cache): Adjust prototype.
6663 (registers_to_string, registers_from_string): Ditto.
6664 (supply_register, supply_register_by_name, collect_register)
6665 (collect_register_as_string, collect_register_by_name): Ditto.
6666 * regcache.c (struct inferior_regcache_data): Delete.
6667 (get_regcache): Rename to ...
6668 (get_thread_regcache): ... this. Adjust. Switch inferior before
6670 (regcache_invalidate_one): Adjust.
6671 (regcache_invalidate): Fix prototype.
6672 (new_register_cache): Return the new register cache.
6673 (free_register_cache): Change prototype.
6674 (realloc_register_cache): Adjust.
6675 (registers_to_string): Change prototype to take a regcache. Adjust.
6676 (registers_from_string): Ditto.
6677 (register_data): Ditto.
6678 (supply_register): Ditto.
6679 (supply_register_by_name): Ditto.
6680 (collect_register): Ditto.
6681 (collect_register_as_string): Ditto.
6682 (collect_register_by_name): Ditto.
6683 * server.c (process_serial_event): Adjust.
6684 * linux-low.h (regset_fill_func, regset_store_func): Change
6686 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6688 * linux-low.c (get_stop_pc): Adjust.
6689 (check_removed_breakpoint): Adjust.
6690 (linux_wait_for_event): Adjust.
6691 (linux_resume_one_lwp): Adjust.
6692 (fetch_register): Add regcache parameter. Adjust.
6693 (usr_store_inferior_registers): Ditto.
6694 (regsets_fetch_inferior_registers): Ditto.
6695 (regsets_store_inferior_registers): Ditto.
6696 (linux_fetch_registers, linux_store_registers): Ditto.
6697 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6699 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6701 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6702 prototype to take a regcache.
6703 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6704 * remote-utils.c (convert_ascii_to_int, outreg)
6705 (prepare_resume_reply): Change prototype to take a regcache.
6707 * target.h (struct target_ops) <fetch_registers, store_registers>:
6708 Change prototype to take a regcache.
6709 (fetch_inferior_registers, store_inferior_registers): Change
6710 prototype to take a regcache. Adjust.
6711 * proc-service.c (ps_lgetregs): Adjust.
6712 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6713 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6714 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6715 take a regcache. Adjust.
6716 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6717 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6718 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6719 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6720 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6721 (cris_cannot_fetch_register):
6722 (cris_breakpoint_at): Change prototype to take a regcache.
6724 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6725 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6726 to take a regcache. Adjust.
6727 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6729 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6730 take a regcache. Adjust.
6731 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6732 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6733 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6734 * linux-mips-low.c (mips_get_pc):
6735 (mips_set_pc): Change prototype to take a regcache. Adjust.
6736 (mips_reinsert_addr): Adjust.
6737 (mips_collect_register): Change prototype to take a regcache.
6739 (mips_supply_register):
6740 (mips_collect_register_32bit, mips_supply_register_32bit)
6741 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6742 (mips_store_fpregset): Ditto.
6743 * linux-ppc-low.c (ppc_supply_ptrace_register)
6744 (ppc_supply_ptrace_register): Ditto.
6745 (parse_spufs_run): Adjust.
6746 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6747 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6748 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6749 take a regcache. Adjust.
6750 * linux-s390-low.c (s390_collect_ptrace_register)
6751 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6752 (s390_set_pc): Change prototype to take a regcache. Adjust.
6753 (s390_arch_setup): Adjust.
6754 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6755 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6756 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6757 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6758 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6760 (sparc_breakpoint_at): Adjust.
6761 * linux-xtensa-low.c (xtensa_fill_gregset):
6762 (xtensa_store_gregset):
6763 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6764 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6765 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6766 prototype to take a regcache. Adjust.
6767 * win32-arm-low.c (arm_fetch_inferior_register)
6768 (arm_store_inferior_register): Change prototype to take a
6770 * win32-i386-low.c (i386_fetch_inferior_register)
6771 (i386_store_inferior_register): Change prototype to take a
6773 * win32-low.c (child_fetch_inferior_registers)
6774 (child_store_inferior_registers): Change prototype to take a
6776 (win32_wait): Adjust.
6777 (win32_fetch_inferior_registers): Change prototype to take a
6779 (win32_store_inferior_registers): Adjust.
6780 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6781 store_inferior_register>: Change prototype to take a regcache.
6783 2010-01-20 Doug Evans <dje@google.com>
6785 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6787 (linux_wait_for_event1, linux_init_signals): Ditto.
6788 (W_STOPCODE): Provide definition if missing.
6790 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6792 * linux-low.c (linux_core_of_thread): New.
6793 (compare_ints, show_process, list_threads): New.
6794 (linux_qxfer_osdata): Report threads and cores.
6795 (linux_target_op): Register linux_core_of_thread.
6796 * remote-utils.c (prepare_resume_reply): Report the core.
6797 (buffer_xml_printf): Support %d specifier.
6798 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6800 (handle_query): Handle qXfer:threads. Announce availability
6802 * target.h (struct target_ops): New field core_of_thread.
6804 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6806 * Makefile.in (clean): Remove new generated files.
6807 (reg-s390.o, reg-s390.c): Remove rules.
6808 (reg-s390x.o, reg-s390x.c): Likewise.
6809 (s390-linux32.o, s390-linux32.c): Add rules.
6810 (s390-linux64.o, s390-linux64.c): Likewise.
6811 (s390x-linux64.o, s390x-linux64.c): Likewise.
6812 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6813 * linux-s390-low.c: Include <elf.h>.
6814 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6815 (init_registers_s390): Remove prototype.
6816 (init_registers_s390x): Likewise.
6817 (init_registers_s390_linux32): Add prototype.
6818 (init_registers_s390_linux64): Likewise.
6819 (init_registers_s390x_linux64): Likewise.
6820 (s390_num_regs_3264): New define.
6821 (s390_regmap_3264): New global variable.
6822 (s390_cannot_fetch_register): Remove obsolete check.
6823 (s390_cannot_store_register): Likewise.
6824 (s390_collect_ptrace_register): Handle upper/lower register halves.
6825 (s390_supply_ptrace_register): Likewise.
6826 (s390_fill_gregset): Update to register number changes.
6827 (s390_get_hwcap): New routine.
6828 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6829 Install appropriate regmap and register set.
6831 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6833 * server.c (gdbserver_version): Update copyright year to 2010.
6834 * gdbreplay.c (gdbreplay_version): Likewise.
6836 2009-12-28 Doug Evans <dje@google.com>
6838 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6839 elf/external.h. Include <elf.h> instead but only if necessary.
6841 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6843 * linux-low.c (linux_remove_process): Remove `detaching'
6844 parameter. Don't release/detach from thread_db here.
6845 (linux_kill): Release/detach from thread_db here, ...
6846 (linux_detach): ... and here, before actually detaching.
6847 (linux_wait_1): ... and here, when a process exits.
6848 * thread-db.c (any_thread_of): New.
6849 (thread_db_free): Switch the current inferior to a thread of the
6852 2009-12-21 Doug Evans <dje@google.com>
6854 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6856 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6857 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6858 warning ifndef __NR_tkill. Move setting of errno there too.
6859 Delete unnecessary resetting of errno after syscall.
6860 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6862 * configure.ac: Check for dladdr.
6863 * config.in: Regenerate.
6864 * configure: Regenerate.
6865 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6866 (try_thread_db_load): Update.
6868 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6870 2009-12-18 Doug Evans <dje@google.com>
6872 * event-loop.c: Include unistd.h if it exists.
6874 * linux-low.c (my_waitpid): Move definition away from being in
6875 between linux_tracefork_child/linux_test_for_tracefork.
6877 * gdb_proc_service.h (psaddr_t): Fix type.
6878 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6879 signature to match glibc.
6881 2009-12-16 Doug Evans <dje@google.com>
6883 * linux-low.c (linux_read_memory): Fix argument to read.
6885 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6887 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6888 events, don't leave current_inferior pointing at null.
6890 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6892 * win32-low.c (LOG): Delete.
6893 (OUTMSG): Output to stderr.
6894 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6895 on compile time LOG macro.
6896 (win32_wait): Fix debug output.
6898 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6900 * win32-low.c (win32_add_one_solib): If the dll name is
6901 "ntdll.dll", prepend the system directory to the dll path.
6903 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6905 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6907 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6908 Vladimir Prus <vladimir@codesourcery.com>
6910 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6911 * configure.ac: Check for __mcoldfire__ and set
6912 gdb_cv_m68k_is_coldfire.
6913 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6914 reg-cf.o and reg-m68k.o.
6915 * configure: Regenerated.
6917 2009-11-16 Pedro Alves <pedro@codesourcery.com>
6919 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6920 Pass it to thread_db_free.
6921 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6922 proper `detaching' argument to linux_remove_process.
6923 * linux-low.h (thread_db_free): Add `detaching' parameter.
6924 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6926 (thread_db_free): Add `detaching' parameter. Only
6927 call td_ta_clear_event if detaching from process.
6929 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6931 * thread-db.c (thread_db_free): Fix typo.
6933 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6936 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6938 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6940 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6941 with an i686 compiler.
6942 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6944 * configure: Rebuilt.
6946 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6950 * server.c (handle_search_memory_1): Correct read_addr initialization
6951 in loop for searching subsequent chunks.
6953 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6955 * configure.ac: New --with-libthread-db option.
6956 * thread-db.c: Allow direct dependence on libthread_db.
6957 (thread_db_free): Adjust.
6958 * config.in: Regenerate.
6959 * configure: Likewise.
6961 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6964 * thread-db.c (attach_thread): New function.
6965 (maybe_attach_thread): Return success/failure.
6966 (find_new_threads_callback): Adjust.
6967 (thread_db_find_new_threads): Loop until no new threads.
6969 2009-10-13 Pedro Alves <pedro@codesourcery.com>
6971 * proc-service.c (ps_lgetregs): Formatting.
6973 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6975 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6976 * configure.ac: Adjust.
6977 * linux-low.h (struct process_info_private): Move members to struct
6979 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6980 * linux-low.c (linux_remove_process): Adjust.
6981 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6982 * server.c (handle_query): Move code ...
6983 (handle_monitor_command): ... here. New function.
6984 * target.h (struct target_ops): New member.
6985 * thread-db.c (struct thread_db): New.
6986 (libthread_db_search_path): New variable.
6987 (thread_db_create_event, thread_db_enable_reporting)
6988 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6989 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6990 (try_thread_db_load_1, dladdr_to_soname): New functions.
6991 (try_thread_db_load, thread_db_load_search): New functions.
6992 (thread_db_init): Search for libthread_db.
6993 (thread_db_free): New function.
6994 (thread_db_handle_monitor_command): Likewise.
6995 * config.in: Regenerate.
6996 * configure: Regenerate.
6998 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7000 * spu-low.c (spu_kill): Wait for inferior to terminate.
7001 Call clear_inferiors.
7002 (spu_detach): Call clear_inferiors.
7004 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7006 * aclocal.m4: Regenerate.
7007 * config.in: Likewise.
7008 * configure: Likewise.
7010 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7012 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7013 (parse_spufs_run): New function.
7014 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7015 (ppc_breakpoint_at): Handle SPU breakpoints.
7017 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7019 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7020 (SPUFS_MAGIC): Define.
7021 (spu_enumerate_spu_ids): New function.
7022 (linux_qxfer_spu): New function.
7023 (linux_target_ops): Install linux_qxfer_spu.
7025 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7027 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7028 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7029 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7030 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7031 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7032 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7033 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7034 (init_registers_powerpc_cell32l): Add prototype.
7035 (init_registers_powerpc_cell64l): Likewise.
7036 (ppc_arch_setup): Detect Cell/B.E. architecture.
7038 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7040 * Makefile.in (datarootdir): New variable.
7042 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7044 * linux-low.c (linux_write_memory): Update debugging output.
7045 * Makefile.in (clean): Add new descriptions.
7046 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7047 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7048 * configure.srv: Add new files for arm*-*-linux*.
7049 * linux-arm-low.c: Add new declarations.
7050 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7051 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7052 (HWCAP_VFPv3D16): New.
7053 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7054 instead of __IWMMXT__.
7055 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7056 (arm_arch_setup): New.
7057 (target_regsets): Remove #ifdef. Add VFP regset.
7058 (the_low_target): Use arm_arch_setup.
7060 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7062 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7063 the main thread again.
7065 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7067 Adding Neutrino gdbserver.
7068 * configure: Regenerated.
7069 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7070 * configure.srv (i[34567]86-*-nto*): New target.
7071 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7072 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7073 (nto_comctrl) [__QNX__]: New function.
7074 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7076 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7078 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7081 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7082 Pedro Alves <pedro@codesourcery.com>
7084 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7085 don't support CONTEXT_EXTENDED_REGISTERS.
7086 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7087 (the_low_target): Install them.
7088 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7089 failing with ERROR_PIPE_NOT_CONNECTED.
7091 2009-06-30 Doug Evans <dje@google.com>
7092 Pierre Muller <muller@ics.u-strasbg.fr>
7094 Add h/w watchpoint support to x86-linux, win32-i386.
7095 * Makefile.in (SFILES): Add i386-low.c
7096 (i386_low_h): Define.
7097 (i386-low.o): Add dependencies.
7098 (linux-x86-low.o): Add i386-low.h dependency.
7099 (win32-i386-low.o): Ditto.
7100 * i386-low.c: New file.
7101 * i386-low.h: New file.
7102 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7103 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7104 * linux-low.c (linux_add_process): Initialize arch_private.
7105 (linux_remove_process): Free arch_private.
7106 (add_lwp): Initialize arch_private.
7107 (delete_lwp): Free arch_private.
7108 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7110 * linux-low.h (process_info_private): New member arch_private.
7111 (lwp_info): New member arch_private.
7112 (linux_target_ops): New members new_process, new_thread,
7114 (ptid_of): New macro.
7115 * linux-x86-low.c: Include stddef.h, i386-low.h.
7116 (arch_process_info): New struct.
7117 (arch_lwp_info): New struct.
7118 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7119 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7120 (i386_dr_low_get_status): New function.
7121 (x86_insert_point, x86_remove_point): New functions.
7122 (x86_stopped_by_watchpoint): New function.
7123 (x86_stopped_data_address): New function.
7124 (x86_linux_new_process, x86_linux_new_thread): New functions.
7125 (x86_linux_prepare_to_resume): New function.
7126 (the_low_target): Add entries for insert_point, remove_point,
7127 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7129 * server.c (debug_hw_points): New global.
7130 (monitor_show_help): Document set debug-hw-points.
7131 (handle_query): Process "set debug-hw-points".
7132 * server.h (debug_hw_points): Declare.
7133 (paddress): Declare.
7134 * utils.c (NUMCELLS, CELLSIZE): New macros.
7135 (get_sell, xsnprintf, paddress): New functions.
7136 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7137 remove_point, stopped_by_watchpoint, stopped_data_address.
7138 * win32-i386-low.c: Include i386-low.h.
7139 (debug_reg_state): Replaces dr.
7140 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7141 (i386_dr_low_get_status): New function.
7142 (i386_insert_point, i386_remove_point): New functions.
7143 (i386_stopped_by_watchpoint): New function.
7144 (i386_stopped_data_address): New function.
7145 (i386_initial_stuff): Update.
7146 (get_thread_context,set_thread_context,i386_thread_added): Update.
7147 (the_low_target): Add entries for insert_point,
7148 remove_point, stopped_by_watchpoint, stopped_data_address.
7149 * win32-low.c (win32_insert_watchpoint): New function.
7150 (win32_remove_watchpoint): New function.
7151 (win32_stopped_by_watchpoint): New function.
7152 (win32_stopped_data_address): New function.
7153 (win32_target_ops): Add entries for insert_watchpoint,
7154 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7155 * win32-low.h (win32_target_ops): New members insert_point,
7156 remove_point, stopped_by_watchpoint, stopped_data_address.
7158 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7160 * server.c (process_serial_event): Re-return unsupported, not
7161 error, if the type isn't recognized. Re-allow supporting only
7162 insert or remove packets. Also call require_running for
7163 breakpoints. Add missing break statement to default case. Tidy.
7164 * target.h (struct target_ops): Rename insert_watchpoint to
7165 insert_point, and remove_watchpoint to remove_point.
7167 * linux-low.h (struct linux_target_ops): Likewise.
7168 * linux-low.c (linux_insert_watchpoint): Rename to ...
7169 (linux_insert_point): ... this. Adjust.
7170 (linux_remove_watchpoint): Rename to ...
7171 (linux_remove_point): ... this. Adjust.
7172 (linux_target_ops): Adjust.
7173 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7174 (cris_insert_point): ... this.
7175 (cris_remove_watchpoint): Rename to ...
7176 (cris_remove_point): ... this.
7177 (the_low_target): Adjust.
7179 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7181 * server.c (handle_v_kill): Pass signal_pid to
7182 kill_inferior if multi_process is zero.
7184 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7186 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7187 * target.h (target_ops): Comment for *_watchpoint to make it clear
7188 the functions can get types '0' and '1'.
7190 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7192 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7193 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7194 * regcache.c (get_regcache): Likewise.
7195 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7196 * win32-low.c (child_fetch_inferior_registers): Remove check for
7199 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7200 Pedro Alves <pedro@codesourcery.com>
7202 * target.h (struct target_ops) <supports_multi_process>: New
7204 (target_supports_multi_process): New.
7205 * server.c (handle_query): Even if GDB reports support, only
7206 enable multi-process if the target also supports it. Report
7207 multi-process support only if the target backend supports it.
7208 * linux-low.c (linux_supports_multi_process): New function.
7209 (linux_target_ops): Install it as target_supports_multi_process
7212 2009-05-24 Doug Evans <dje@google.com>
7214 Global renaming of find_thread_pid to find_thread_ptid.
7215 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7216 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7217 All callers updated.
7219 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7220 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7223 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7224 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7225 (linux_resume_one_lwp): Ditto.
7227 2009-05-23 Doug Evans <dje@google.com>
7229 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7230 from struct inferior_list_entry * to struct lwp_info *.
7231 All callers updated.
7233 2009-05-13 Doug Evans <dje@google.com>
7235 * linux-x86-low.c: Don't include assert.h.
7236 (x86_siginfo_fixup): Use fatal, not assert.
7237 (x86_arch_setup): Fix comment.
7239 2009-05-12 Doug Evans <dje@google.com>
7241 Biarch support for i386/amd64 gdbserver.
7242 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7243 Add linux-x86-low.c.
7244 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7245 (linux-x86-low.o): Add.
7246 * linux-x86-64-low.c: Delete.
7247 * linux-i386-low.c: Delete.
7248 * linux-x86-low.c: New file.
7249 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7251 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7253 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7254 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7255 (linux_child_pid_to_exec_file): New function.
7256 (elf_64_header_p, elf_64_file_p): New functions.
7257 (siginfo_fixup): New function.
7258 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7259 give target a chance to convert layout.
7260 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7261 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7263 2009-05-07 Doug Evans <dje@google.com>
7265 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7266 (regsets_store_inferior_registers): Ditto.
7268 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7272 * linux-low.c (must_set_ptrace_flags): Delete.
7273 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7275 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7276 `lwp->must_set_ptrace_flags' instead.
7277 (linux_wait_for_event_1): Set ptrace options here.
7278 (linux_wait_1): ... not here.
7280 2009-04-30 Doug Evans <dje@google.com>
7282 * inferiors.c (started_inferior_callback): New function.
7283 (attached_inferior_callback): New function.
7284 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7285 * server.c (print_started_pid, print_attached_pid): New functions.
7286 (detach_or_kill_for_exit): New function.
7287 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7288 * server.h (have_started_inferiors_p): Declare.
7289 (have_attached_inferiors_p): Declare.
7291 * inferiors.c (remove_process): Fix memory leak, free process.
7292 * linux-low.c (linux_remove_process): New function.
7293 (linux_kill): Call it instead of remove_process.
7294 (linux_detach, linux_wait_1): Ditto.
7296 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7298 * configure.srv: Add x86 Windows CE target.
7300 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7302 * inferiors.c (get_thread_process): Make global.
7303 * server.h (get_thread_process): Add prototype.
7304 * thread-db.c (find_one_thread): Use get_thread_process
7305 instead of current_process.
7306 (thread_db_get_tls_address): Do not crash if called when
7307 thread layer is not yet initialized.
7309 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7311 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7312 * spu-low.c (current_tid): Rename to ...
7313 (current_ptid): ... this.
7314 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7315 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7316 ptid_get_lwp (current_ptid) instead of current_tid.
7317 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7318 instead of current_tid. Use find_process_pid to verify pid
7319 argument is valid. Pass proper argument to remove_process.
7320 (spu_thread_alive): Compare current_ptid instead of current_tid.
7321 (spu_resume): Likewise.
7323 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7325 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7328 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7330 Implement the multiprocess extensions, and add linux multiprocess
7333 * server.h (ULONGEST): Declare.
7334 (struct ptid, ptid_t): New.
7335 (minus_one_ptid, null_ptid): Declare.
7336 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7337 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7338 (struct inferior_list_entry): Change `id' type from unsigned from
7340 (struct sym_cache, struct breakpoint, struct
7341 process_info_private): Forward declare.
7342 (struct process_info): Declare.
7343 (current_process): Declare.
7344 (all_processes): Declare.
7345 (initialize_inferiors): Declare.
7346 (add_thread): Adjust to use ptid_t.
7347 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7348 (add_process, remove_process, find_thread_pid): Declare.
7349 (find_inferior_id): Adjust to use ptid_t.
7350 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7351 (multi_process): Declare.
7352 (push_event): Adjust to use ptid_t.
7353 (read_ptid, write_ptid): Declare.
7354 (prepare_resume_reply): Adjust to use ptid_t.
7355 (clear_symbol_cache): Declare.
7356 * inferiors.c (all_processes): New.
7357 (null_ptid, minus_one_ptid): New.
7358 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7359 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7360 (add_thread): Change unsigned long to ptid. Remove gdb_id
7362 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7363 (gdb_id_to_thread): Rename to ...
7364 (find_thread_pid): ... this. Change unsigned long to ptid.
7365 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7366 (loaded_dll, pull_pid_from_list): Adjust.
7367 (add_process, remove_process, find_process_pid)
7368 (get_thread_process, current_process, initialize_inferiors): New.
7369 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7370 (struct target_waitstatus) <related_pid>: Ditto.
7371 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7373 (struct target_ops) <join>: Add `pid' argument.
7374 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7375 (struct target_ops) <wait>: Add `ptid' field. Change return type
7377 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7378 (mywait): Add `ptid' argument. Change return type to ptid_t.
7379 (target_pid_to_str): Declare.
7380 * target.c (set_desired_inferior): Adjust to use ptids.
7381 (mywait): Add new `ptid' argument. Adjust.
7382 (target_pid_to_str): New.
7383 * mem-break.h (free_all_breakpoints): Declare.
7384 * mem-break.c (breakpoints): Delelete.
7385 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7386 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7387 to use per-process breakpoint list.
7388 (free_all_breakpoints): New.
7389 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7390 (symbol_cache, all_symbols_looked_up): Delete.
7392 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7394 (prepare_resume_reply): Change ptid argument's type from unsigned
7395 long to ptid_t. Adjust. Implement W;process and X;process.
7396 (free_sym_cache, clear_symbol_cache): New.
7397 (look_up_one_symbol): Adjust to per-process symbol cache. *
7398 * server.c (cont_thread, general_thread, step_thread): Change type
7401 (multi_process): New.
7402 (last_ptid): Change type to ptid_t.
7403 (struct vstop_notif) <ptid>: Change type to ptid_t.
7404 (queue_stop_reply, push_event): Change `ptid' argument's type to
7406 (discard_queued_stop_replies): Add `pid' argument.
7407 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7408 changes. Don't reference the `attached' global.
7409 (attach_inferior): Adjust to mywait interface changes.
7410 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7411 features. Handle and report "multiprocess+". Handle
7413 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7415 (handle_v_kill): New.
7416 (handle_v_stopped): Adjust to use target_pid_to_str.
7417 (handle_v_requests): Allow multiple attaches and runs when
7418 multiprocess extensions are in effect. Handle "vKill".
7419 (myresume): Adjust to use ptids.
7420 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7421 (handle_status): Adjust to discard_queued_stop_replies interface
7423 (first_thread_of, kill_inferior_callback)
7424 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7425 (main): Call initialize_inferiors. Adjust to use ptids, killing
7426 and detaching from all inferiors. Handle multiprocess packet
7428 * linux-low.h: Include gdb_proc_service.h.
7429 (struct process_info_private): New.
7430 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7431 <lwpid_of>: Use ptid_get_lwp.
7432 (get_lwp_thread): Adjust.
7433 (struct lwp_info): Add `dead' member.
7434 (find_lwp_pid): Declare.
7435 * linux-low.c (thread_db_active): Delete.
7436 (new_inferior): Adjust comment.
7437 (inferior_pid): Delete.
7438 (linux_add_process): New.
7439 (handle_extended_wait): Adjust.
7440 (add_lwp): Change unsigned long to ptid.
7441 (linux_create_inferior): Add process to processes table. Adjust
7442 to use ptids. Don't set new_inferior here.
7443 (linux_attach_lwp): Rename to ...
7444 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7445 it. Adjust to use ptids.
7446 (linux_attach_lwp): New.
7447 (linux_attach): Add process to processes table. Don't set
7449 (struct counter): New.
7450 (second_thread_of_pid_p, last_thread_of_process_p): New.
7451 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7453 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7454 processes. Remove process from process table.
7455 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7456 to multiple processes.
7457 (any_thread_of): New.
7458 (linux_detach): Add `pid' argument, and handle it. Remove process
7459 from processes table.
7460 (linux_join): Add `pid' argument. Handle it.
7461 (linux_thread_alive): Change unsighed long argument to ptid_t.
7462 Consider dead lwps as not being alive.
7463 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7464 threads we're not interested in.
7465 (same_lwp, find_lwp_pid): New.
7466 (linux_wait_for_lwp): Change `pid' argument's type from int to
7468 (linux_wait_for_event): Rename to ...
7469 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7470 from int to ptid_t. Adjust.
7471 (linux_wait_for_event): New.
7472 (linux_wait_1): Add `ptid' argument. Change return type to
7473 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7474 that exit from the process table.
7475 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7477 (mark_lwp_dead): New.
7478 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7479 stopping all threads, mark its main lwp as dead.
7480 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7482 (fetch_register, usr_store_inferior_registers)
7483 (regsets_fetch_inferior_registers)
7484 (regsets_store_inferior_registers, linux_read_memory)
7485 (linux_write_memory): Inline `inferior_pid'.
7486 (linux_look_up_symbols): Adjust to use per-process
7488 (linux_request_interrupt): Adjust to use ptids.
7489 (linux_read_auxv): Inline `inferior_pid'.
7490 (initialize_low): Don't reference thread_db_active.
7491 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7492 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7493 (ps_getpid): Return the pid of the current inferior.
7494 * thread-db.c (proc_handle, thread_agent): Delete.
7495 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7497 (find_one_thread): Change argument type to ptid_t. Adjust to
7499 (maybe_attach_thread): Adjust to per-process data and ptids.
7500 (thread_db_find_new_threads): Ditto.
7501 (thread_db_init): Ditto.
7502 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7503 processes table. Adjust to use ptids.
7504 (spu_kill, spu_detach): Adjust interface. Remove process from
7506 (spu_join, spu_thread_alive): Adjust interface.
7507 (spu_wait): Adjust interface. Remove process from processes
7508 table. Adjust to use ptids.
7509 * win32-low.c (current_inferior_tid): Delete.
7510 (current_inferior_ptid): New.
7511 (debug_event_ptid): New.
7512 (thread_rec): Take a ptid. Adjust.
7513 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7514 (child_delete_thread): Ditto.
7515 (do_initial_child_stuff): Add `attached' argument. Add process to
7517 (child_fetch_inferior_registers, child_store_inferior_registers):
7519 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7520 (win32_attach): Pass 1 to do_initial_child_stuff.
7521 (win32_kill): Adjust interface. Remove process from processes
7523 (win32_detach): Ditto.
7524 (win32_join): Adjust interface.
7525 (win32_thread_alive): Take a ptid.
7526 (win32_resume): Adjust to use ptids.
7527 (get_child_debug_event): Ditto.
7528 (win32_wait): Adjust interface. Remove exiting process from
7531 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7533 Non-stop mode support.
7535 * server.h (non_stop): Declare.
7536 (gdb_client_data, handler_func): Declare.
7537 (delete_file_handler, add_file_handler, start_event_loop):
7539 (handle_serial_event, handle_target_event, push_event)
7540 (putpkt_notif): Declare.
7541 * target.h (enum resume_kind): New.
7542 (struct thread_resume): Replace `step' field by `kind' field.
7543 (TARGET_WNOHANG): Define.
7544 (struct target_ops) <wait>: Add `options' argument.
7545 <supports_non_stop, async, start_non_stop>: New fields.
7546 (target_supports_non_stop, target_async): New.
7547 (start_non_stop): Declare.
7548 (mywait): Add `options' argument.
7549 * target.c (mywait): Add `options' argument. Print child exit
7551 (start_non_stop): New.
7552 * server.c (non_stop, own_buf, mem_buf): New globals.
7553 (struct vstop_notif): New.
7554 (notif_queue): New global.
7555 (queue_stop_reply, push_event, discard_queued_stop_replies)
7556 (send_next_stop_reply): New.
7557 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7559 (attach_inferior): In non-stop mode, don't wait for the target
7561 (handle_general_set): Handle QNonStop.
7562 (handle_query): When handling qC, return the current general
7563 thread, instead of the first thread of the list.
7564 (handle_query): If the backend supports non-stop mode, include
7565 QNonStop+ in the qSupported query response.
7566 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7568 (handle_v_attach, handle_v_run): Handle non-stop mode.
7569 (handle_v_stopped): New.
7570 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7571 (myresume): Adjust to use resume_kind. Handle non-stop.
7572 (queue_stop_reply_callback): New.
7573 (handle_status): Handle non-stop mode.
7574 (main): Clear non_stop flag on reconnection. Use the event-loop.
7575 Refactor serial protocol handling from here ...
7576 (process_serial_event): ... to this new function. When GDB
7577 selects any thread, select one here. In non-stop mode, wait until
7578 GDB acks all pending events before exiting.
7579 (handle_serial_event, handle_target_event): New.
7580 * remote-utils.c (remote_open): Install remote_desc in the event
7582 (remote_close): Remove remote_desc from the event loop.
7583 (putpkt_binary): Rename to...
7584 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7585 (putpkt_binary): New as wrapper around putpkt_binary_1.
7586 (putpkt_notif): New.
7587 (prepare_resume_reply): In non-stop mode, don't change the
7589 * event-loop.c: New.
7590 * Makefile.in (OBJ): Add event-loop.o.
7591 (event-loop.o): New rule.
7593 * linux-low.h (pid_of): Moved here.
7595 (get_lwp_thread): Use lwpid_of.
7596 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7597 * linux-low.c (pid_of): Delete.
7598 (inferior_pid): Use lwpid_of.
7599 (linux_event_pipe): New.
7600 (target_is_async_p): New.
7602 (handle_extended_wait): Use lwpid_of.
7603 (add_lwp): Don't set lwpid field.
7604 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7605 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7606 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7607 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7608 first. Adjust to linux_wait_for_event interface changes. Use
7610 (linux_detach): Don't delete the main lwp here.
7611 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7612 (status_pending_p): Don't consider explicitly suspended lwps.
7613 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7614 pointer. Add OPTIONS argument. Change return type to int. Use
7615 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7616 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7617 pointer. Add status pointer argument. Return a pid instead of a
7618 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7619 changes. In non-stop mode, don't switch to a random thread.
7620 (linux_wait): Rename to...
7621 (linux_wait_1): ... this. Add target_options argument, and handle
7622 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7623 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7624 clean exit and signal exit code. Don't stop all threads in
7625 non-stop mode. In all-stop mode, only stop all threads when
7626 reporting a stop to GDB. Handle explicit thread stop requests.
7627 (async_file_flush, async_file_mark): New.
7629 (send_sigstop): Use lwpid_of.
7630 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7631 interface changes. In non-stop mode, don't switch to a random
7633 (linux_resume_one_lwp): Use lwpid_of.
7634 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7635 (linux_resume_one_thread): ... this. Handle resume_stop. In
7636 non-stop mode, don't look for pending flag in all threads.
7637 (resume_status_pending_p): Don't consider explicitly suspended
7639 (my_waitpid): Reimplement. Emulate __WALL.
7640 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7642 (sigchld_handler, linux_supports_non_stop, linux_async)
7643 (linux_start_non_stop): New.
7644 (linux_target_ops): Register linux_supports_non_stop, linux_async
7645 and linux_start_non_stop.
7646 (initialize_low): Install SIGCHLD handler.
7647 * thread-db.c (thread_db_create_event, find_one_thread)
7648 (thread_db_get_tls_address): Use lwpid_of.
7649 * win32-low.c (win32_detach): Adjust to use resume_kind.
7650 (win32_wait): Add `options' argument.
7651 * spu-low.c (spu_resume): Adjust to use resume_kind.
7652 (spu_wait): Add `options' argument.
7654 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7656 Decouple target code from remote protocol.
7658 * target.h (enum target_waitkind): New.
7659 (struct target_waitstatus): New.
7660 (struct target_ops) <wait>: Return an unsigned long. Take a
7661 target_waitstatus pointer instead of a char pointer.
7663 * target.c (mywait): Change prototype to return an unsigned long.
7664 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7665 * server.h (thread_from_wait, old_thread_from_wait): Delete
7667 (prepare_resume_reply): Change prototype to take a
7669 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7670 (last_status, last_ptid): New.
7671 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7672 pid instead of a signal.
7673 (attach_inferior): Remove "status" and "signal" parameters.
7675 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7677 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7678 (handle_v_requests, myresume): Remove "status" and "signal"
7680 (handle_status): New.
7681 (main): Delete local `status'. Adjust.
7682 * remote-utils.c: Include target.h.
7683 (prepare_resume_reply): Change prototype to take a
7684 target_waitstatus. Adjust.
7686 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7688 * spu-low.c (spu_wait): Adjust.
7689 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7691 (win32_wait): Adjust.
7693 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7695 * target.h (struct thread_resume): Delete leave_stopped member.
7696 (struct target_ops): Add a `n' argument to the `resume' callback.
7697 * server.c (start_inferior): Adjust.
7698 (handle_v_cont, myresume): Adjust.
7699 * linux-low.c (check_removed_breakpoint): Adjust to resume
7700 interface change, and to removed leave_stopped field.
7701 (resume_ptr): Delete.
7702 (struct thread_resume_array): New.
7703 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7704 resume interface change.
7705 (linux_continue_one_thread, linux_queue_one_thread)
7706 (resume_status_pending_p): Check if the resume field is NULL
7707 instead of checking the leave_stopped member.
7708 (linux_resume): Adjust to the target resume interface change.
7709 * spu-low.c (spu_resume): Adjust to the target resume interface
7711 * win32-low.c (win32_detach, win32_resume): Ditto.
7713 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7715 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7717 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7719 (linux_continue_one_thread): Only preserve the stepping flag if
7720 there's a pending breakpoint.
7722 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7724 * server.c (main): After the inferior having exited, call
7725 remote_close before exiting gdbserver.
7727 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7729 Fix size of FPSCR in Power 7 processors.
7730 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7731 (PPC_FEATURE_HAS_DFP): New #define.
7732 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7735 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7737 * server.c (handle_query) Whitespace and formatting.
7739 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7741 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7742 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7743 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7744 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7745 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7746 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7747 Makefile.in, configure.ac: Fix whitespace throughout.
7748 * configure: Regenerate.
7750 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7752 * inferiors.c (find_inferior): Make it safe for the callback
7753 function to delete the currently iterated inferior.
7755 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7757 * Makefile.in (linuw_low_h): Move higher.
7758 (thread-db.o): Depend on $(linux_low_h).
7760 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7762 Rename "process" to "lwp" throughout.
7764 * linux-low.c (all_processes): Rename to...
7765 (all_lwps): ... this.
7766 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7767 (add_process): Rename to ...
7768 (add_lwp): ... this. Adjust.
7769 (linux_create_inferior): Adjust.
7770 (linux_attach_lwp): Adjust.
7771 (linux_attach): Adjust.
7772 (linux_kill_one_process): Rename to ...
7773 (linux_kill_one_lwp): ... this. Adjust.
7774 (linux_kill): Adjust.
7775 (linux_detach_one_process): Rename to ...
7776 (linux_detach_one_lwp): ... this. Adjust.
7777 (linux_detach): Adjust.
7778 (check_removed_breakpoint): Adjust.
7779 (status_pending_p): Adjust.
7780 (linux_wait_for_process): Rename to ...
7781 (linux_wait_for_lwp): ... this. Adjust.
7782 (linux_wait_for_event): Adjust.
7783 (send_sigstop): Adjust.
7784 (wait_for_sigstop): Adjust.
7785 (stop_all_processes): Rename to ...
7786 (stop_all_lwps): ... this.
7787 (linux_resume_one_process): Rename to ...
7788 (linux_resume_one_lwp): ... this. Adjust.
7789 (linux_set_resume_request, linux_continue_one_thread)
7790 (linux_queue_one_thread, resume_status_pending_p)
7791 (usr_store_inferior_registers, regsets_store_inferior_registers)
7792 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7794 * linux-low.h (get_process): Rename to ...
7795 (get_lwp): ... this. Adjust.
7796 (get_thread_process): Rename to ...
7797 (get_thread_lwp): ... this. Adjust.
7798 (get_process_thread): Rename to ...
7799 (get_lwp_thread): ... this. Adjust.
7800 (struct process_info): Rename to ...
7801 (struct lwp_info): ... this.
7802 (all_processes): Rename to ...
7803 (all_lwps): ... this.
7804 * proc-service.c (ps_lgetregs): Adjust.
7805 * thread-db.c (thread_db_create_event, find_one_thread)
7806 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7808 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7810 * server.c (handle_query): Handle "qAttached".
7812 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7814 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7815 GPLv3, update license URL.
7817 2009-03-01 Doug Evans <dje@google.com>
7819 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7820 (server_h): Add gdb_signals.h.
7821 (signals.o): Update.
7822 * server.h (target_signal_from_host,target_signal_to_host_p)
7823 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7825 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7827 * remote-utils.c (getpkt): Also generate remote-debug
7828 information if noack_mode is set.
7830 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7832 * server.c (handle_query): Report qXfer:siginfo:read and
7833 qXfer:siginfo:write as supported and handle them.
7834 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7835 * linux-low.c (linux_xfer_siginfo): New.
7836 (linux_target_ops): Set it.
7838 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7840 * server.c (gdbserver_usage): Mention --remote-debug.
7841 (main): Accept '--remote-debug' switch.
7843 2009-01-18 Doug Evans <dje@google.com>
7845 * regcache.c (new_register_cache): No need to check result of xcalloc.
7846 * server.c (handle_search_memory): Back out calls to xmalloc,
7847 result is checked and error is returned to user upon failure.
7848 (handle_query): Ditto. Add more checks for result of malloc.
7849 (handle_v_cont): Check result of malloc, report error back to
7851 (handle_v_run): Ditto. Call freeargv.
7852 * server.h (freeargv): Declare.
7853 * utils.c (freeargv): New fn.
7855 2009-01-15 Doug Evans <dje@google.com>
7857 * gdbreplay.c (perror_with_name): Make arg const char *.
7858 * server.h (target_signal_to_name): Make return type const char *.
7859 * thread-db.c (thread_db_err_str): Make return type const char *.
7860 * utils.c (perror_with_name): Make arg const char *.
7862 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7864 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7865 when handling a EXIT_PROCESS_DEBUG_EVENT.
7867 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7869 * gdbreplay.c (gdbreplay_version): Update copyright year.
7870 * server.c (gdbserver_version): Likewise.
7872 2009-01-05 Doug Evans <dje@google.com>
7874 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7875 (handle_extended_wait): Improve comment.
7877 2008-12-13 Doug Evans <dje@google.com>
7879 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7880 * server.h (ATTR_MALLOC): New macro.
7881 (xmalloc,xcalloc,xstrdup): Declare.
7882 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7883 * inferiors.c: Ditto.
7884 * linux-low.c: Ditto.
7885 * mem-break.c: Ditto.
7886 * regcache.c: Ditto.
7887 * remote-utils.c: Ditto.
7890 * win32-low.c: Ditto.
7892 2008-12-12 Doug Evans <dje@google.com>
7894 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7895 in debugging printf.
7897 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7899 2008-12-09 Doug Evans <dje@google.com>
7901 * linux-low.h (struct process_info): Delete member tid, unused.
7902 * thread-db.c (find_one_thread): Update.
7903 (maybe_attach_thread): Update.
7905 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7907 * target.h (struct target_ops): Add qxfer_osdata member.
7908 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7910 (linux_qxfer_osdata): New functions.
7911 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7913 * server.c (handle_query): Handle "qXfer:osdata:read:".
7914 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7915 (buffer_xml_printf): New functions.
7916 * server.h (struct buffer): New.
7917 (buffer_grow_str, buffer_grow_str0): New macros.
7918 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7919 (buffer_xml_printf): Declare.
7921 2008-11-24 Doug Evans <dje@google.com>
7923 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7925 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7927 * server.c (handle_v_run): Always use the supplied argument list.
7929 2008-11-19 Bob Wilson <bob.wilson@acm.org>
7931 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7932 (xtensa_regmap_table): Add entry for scompare1.
7934 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7936 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7937 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7938 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7939 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7940 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7941 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7942 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7943 XML target descriptions.
7944 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7945 when inferior is running on an ISA 2.05 or later processor. Add
7946 special case to return offset for full 64-bit slot of FPSCR when
7949 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7951 * Makefile.in (SFILES, clean): Added sparc64 files.
7952 (reg-sparc64.o, reg-sparc64.c): New.
7953 * configure.srv (sparc*-*-linux*): New configuration.
7954 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7955 syscall arguments for SPARC.
7956 (regsets_store_inferior_registers): Likewise.
7957 * linux-sparc-low.c: New file.
7959 2008-10-21 Doug Evans <dje@google.com>
7961 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7962 (READLINE_DIR,READLINE_DEP): Delete.
7963 (INTERNAL_CFLAGS): Update.
7964 (LINTFLAGS): Update.
7966 2008-10-10 Pedro Alves <pedro@codesourcery.com>
7968 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7969 whole argv from the last run, not just argv[0].
7971 2008-09-08 Pedro Alves <pedro@codesourcery.com>
7973 * regcache.c (new_register_cache): Return NULL if the register
7974 cache size isn't known yet.
7975 (free_register_cache): Avoid dereferencing a NULL regcache.
7977 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7979 * configure.srv: Merge MIPS and MIPS64.
7981 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7983 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7985 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
7987 * Makefile.in: Add required vsx dependencies.
7989 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7990 Declare init_registers_powerpc_vsx32l.
7991 Declare init_registers_powerpc_vsx64l.
7992 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7993 (ppc_arch_setup): Check for VSX in hwcap.
7994 (ppc_fill_vsxregset): New function.
7995 (ppc_store_vsxregset): New function.
7996 Add new VSX entry in regset_info target_regsets.
7998 * configure.srv: Add new VSX dependencies.
8000 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8002 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8003 (remote_open): Set or clear transport_is_reliable.
8004 (putpkt_binary): Don't expect acks in noack mode.
8005 (getpkt): Don't send ack/nac in noack mode.
8006 * server.c (handle_general_set): Handle QStartNoAckMode.
8007 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8009 (main): Reset noack_mode on every connection.
8010 * server.h (noack_mode): Declare.
8012 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8014 * Makefile.in (GDBREPLAY_OBS): New variable.
8015 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8017 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8018 Daniel Jacobowitz <dan@codesourcery.com>
8020 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8021 (usr_store_inferior_registers): Likewise.
8022 (regsets_store_inferior_registers): Likewise.
8024 2008-07-31 Rolf Jansen <rj@surtec.com>
8025 Pedro Alves <pedro@codesourcery.com>
8027 * configure.ac: Check for memmem declaration.
8028 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8029 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8030 (disable_packet_qfThreadInfo): Unconditionally compile.
8031 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8032 * configure, config.in: Regenerate.
8034 2008-07-28 Doug Kwan <dougkwan@google.com>
8036 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8037 (linux_write_memory): Remove declaration of errno.
8039 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8041 * linux-low.c (handle_extended_wait): Do not use "status"
8042 variable uninitialized.
8044 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8046 * server.c (handle_v_attach): Inhibit reporting dll changes.
8048 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8050 * remote-utils.c (prepare_resume_reply): If requested, don't
8051 output "thread:TID" in the T stop reply.
8053 * server.c (disable_packet_vCont, disable_packet_Tthread)
8054 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8055 (handle_query): If requested, disable support for qC, qfThreadInfo
8057 (handle_v_requests): If requested, disable support for vCont.
8058 (gdbserver_show_disableable): New.
8059 (main): Handle --disable-packet and --disable-packet=LIST.
8061 * server.h (disable_packet_vCont, disable_packet_Tthread)
8062 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8064 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8066 * server.c (gdbserver_usage): Mention --version.
8068 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8070 * Makefile.in (gdbreplay.o): New rule.
8072 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8074 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8075 message, not gdbserver.
8077 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8078 Nathan Sidwell <nathan@codesourcery.com>
8079 Joseph Myers <joseph@codesourcery.com>
8081 * acinclude.m4: Include ../../config/acx.m4.
8082 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8083 * configure, config.in: Regenerate.
8084 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8085 * server.c (gdbserver_version): Print PKGVERSION.
8086 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8087 (main): Adjust gdbserver_usage calls.
8088 * gdbreplay.c (version, host_name): Add declarations.
8089 (gdbreplay_version, gdbreplay_usage): New.
8090 (main): Accept --version and --help options.
8092 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8094 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8095 (arm_breakpoint_at): Handle Thumb.
8096 (the_low_target): Add comment.
8098 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8100 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8102 2008-05-09 Doug Evans <dje@google.com>
8104 * server.h (decode_search_memory_packet): Declare.
8105 * remote-utils.c (decode_search_memory_packet): New fn.
8106 * server.c (handle_search_memory_1): New fn.
8107 (handle_search_memory): New fn.
8108 (handle_query): Process qSearch:memory packets.
8110 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8112 * regcache.c (registers_length): Remove.
8113 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8114 full register packet.
8115 * regcache.h (registers_length): Remove prototype.
8116 * server.h (PBUFSIZ): Define to 16384.
8118 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8120 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8121 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8122 powerpc-64l.o, and powerpc-altivec64l.o.
8123 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8124 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8125 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8126 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8127 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8130 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8131 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8132 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8133 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8134 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8135 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8136 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8137 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8138 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8139 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8142 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8143 (init_registers_powerpc_32l): ... this new prototype.
8144 (init_registers_powerpc_32): Remove, replace by ...
8145 (init_registers_powerpc_altivec32l): ... this new prototype.
8146 (init_registers_powerpc_e500): Remove, replace by ...
8147 (init_registers_powerpc_e500l): ... this new prototype.
8148 (init_registers_ppc64): Remove, replace by ...
8149 (init_registers_powerpc_64l): ... this new prototype.
8150 (init_registers_powerpc_64): Remove, replace by ...
8151 (init_registers_powerpc_altivec64l): ... this new prototype.
8152 (ppc_num_regs): Set to 73.
8153 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8154 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8155 (ppc_cannot_store_register): Handle orig_r3 and trap.
8156 (ppc_arch_setup): Update init_registers_... calls.
8157 (ppc_fill_gregset): Handle orig_r3 and trap.
8159 * inferiors.c (clear_inferiors): Reset current_inferior.
8161 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8163 * acinclude.m4: Add override.m4.
8164 * configure: Regenerate.
8166 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8168 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8169 initial call to init_register_ppc64.
8171 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8173 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8174 single powerpc*-*-linux* case.
8175 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8177 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8179 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8180 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8182 * linux-ppc-low.c: Include <elf.h>.
8183 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8184 (ppc_hwcap): New global variable.
8185 (ppc_regmap): Remove __SPE__ #ifdef sections.
8186 (ppc_regmap_e500): New global variable.
8187 (ppc_cannot_store_register): Update __SPE__ special case.
8188 (ppc_get_hwcap): New function.
8189 (ppc_arch_setup): Use it to determine whether inferior supports
8190 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8191 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8192 Do not access registers if target does not support AltiVec.
8193 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8194 Do not access registers if target does not support SPE.
8195 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8197 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8199 * linux-low.c (disabled_regsets, num_regsets): New.
8200 (use_regsets_p): Delete.
8201 (linux_wait_for_process): Clear disabled_regsets.
8202 (regsets_fetch_inferior_registers): Check and set it.
8203 (regsets_store_inferior_registers): Likewise.
8204 (linux_fetch_registers, linux_store_registers): Do not use
8206 (initialize_low): Allocate disabled_regsets.
8208 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8210 * Makefile.in (LIBOBJS): New.
8212 (memmem.o): New rule.
8213 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8214 * configure: Regenerated.
8216 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8218 * server.c (handle_query): Never return "unsupported" for
8219 qXfer:features:read queries.
8221 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8223 * server.c (get_features_xml): Fix inverted condition.
8224 (handle_query): Always support qXfer:feature:read.
8226 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8228 * server.c (wrapper_argv): New.
8229 (start_inferior): Handle wrapper_argv. If set, expect an extra
8231 (gdbserver_usage): Document --wrapper.
8232 (main): Parse --wrapper.
8234 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8236 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8237 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8238 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8239 (ppc_set_pc): Likewise.
8240 (ppc_arch_setup): New function.
8241 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8242 of collect_register.
8243 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8245 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8247 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8248 instead of linux-ppc64-low.o.
8249 * linux-ppc64-low.c: Remove file.
8250 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8251 (linux-ppc64-low.o): Remove rule.
8253 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8254 (init_registers_powerpc_64): Likewise.
8255 (ppc_regmap): Conditionally define depending on __powerpc64__.
8256 (ppc_cannot_store_register): Do not special-case "fpscr" when
8257 compiled on __powerpc64__.
8258 (ppc_collect_ptrace_register): New function.
8259 (ppc_supply_ptrace_register): New function.
8260 (ppc_breakpoint): Change type to "unsigned int".
8261 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8262 (the_low_target): Conditionally provide initializers for the
8263 arch_setup member depending on __powerpc64__. Install
8264 collect_ptrace_register and supply_ptrace_register members.
8266 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8268 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8269 * server.c (gdbserver_xmltarget): Define.
8270 (get_features_xml): Use it to replace "target.xml" and arch_string.
8272 * configure.srv: Remove srv_xmltarget. Add XML files that were
8273 mentioned there to srv_xmlfiles instead. Remove conditional tests
8274 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8275 srv_xmlfiles and srv_regobj to include all possible choices.
8276 * configure.ac (srv_xmltarget): Remove.
8277 (srv_xmlfiles): Do not add "target.xml".
8278 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8279 checks for supplementary target information.
8280 * configure: Regenerate.
8281 * Makefile.in (XML_TARGET): Remove.
8282 (target.xml): Remove rule.
8283 (clean): Do not clean up target.xml.
8284 (.PRECIOUS): Do not mention target.xml.
8286 * target.h (struct target_ops): Remove arch_string member.
8287 * linux-low.c (linux_arch_string): Remove.
8288 (linux_target_ops): Remove arch_string initializer.
8289 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8290 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8291 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8292 * spu-low.c (spu_arch_string): Remove.
8293 (spu_target_ops): Remove arch_string initializer.
8294 * win32-low.c (win32_arch_string): Remove.
8295 (win32_target_ops): Remove arch_string initializer.
8296 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8297 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8298 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8300 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8302 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8303 by collect_ptrace_register and supply_ptrace_register hooks.
8304 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8305 instead of checking for the_low_target.left_pad_xfer.
8306 (usr_store_inferior_registers): Use collect_ptrace_register callback
8307 instead of checking for the_low_target.left_pad_xfer.
8309 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8310 (s390_supply_ptrace_register): Likewise.
8311 (s390_fill_gregset): Call s390_collect_ptrace_register.
8312 (the_low_target): Update.
8314 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8315 (ppc_supply_ptrace_register): Likewise.
8316 (the_low_target): Update.
8318 * linux-i386-low.c (the_low_target): Update.
8319 * linux-x86-64-low.c (the_low_target): Update.
8321 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8323 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8324 reg-s390.o and reg-s390x.o.
8326 * linux-low.c (new_inferior): New global variable.
8327 (linux_create_inferior, linux_attach): Set it.
8328 (linux_wait_for_process): Call the_low_target.arch_setup after the
8329 target has stopped for the first time.
8330 (initialize_low): Do not call the_low_target.arch_setup.
8332 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8333 (s390_set_pc): Likewise.
8334 (s390_arch_setup): New function.
8335 (the_low_target): Use s390_arch_setup as arch_setup routine.
8337 * regcache.c (realloc_register_cache): New function.
8338 (set_register_cache): Call it for each existing regcache.
8340 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8342 * server.h (init_registers): Remove prototype.
8344 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8345 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8346 instead of init_registers ().
8347 * linux-arm-low.c (init_registers_arm): Add prototype.
8348 (init_registers_arm_with_iwmmxt): Likewise.
8349 (the_low_target): Add initializer for arch_setup field.
8350 * linux-cris-low.c (init_registers_cris): Add prototype.
8351 (the_low_target): Add initializer for arch_setup field.
8352 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8353 (the_low_target): Add initializer for arch_setup field.
8354 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8355 (the_low_target): Add initializer for arch_setup field.
8356 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8357 (the_low_target): Add initializer for arch_setup field.
8358 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8359 (the_low_target): Add initializer for arch_setup field.
8360 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8361 (the_low_target): Add initializer for arch_setup field.
8362 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8363 (init_registers_mips64_linux): Likewise.
8364 (the_low_target): Add initializer for arch_setup field.
8365 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8366 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8367 (the_low_target): Add initializer for arch_setup field.
8368 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8369 (init_registers_powerpc_64): Likewise.
8370 (the_low_target): Add initializer for arch_setup field.
8371 * linux-s390-low.c (init_registers_s390): Add prototype.
8372 (init_registers_s390x): Likewise.
8373 (the_low_target): Add initializer for arch_setup field.
8374 * linux-sh-low.c (init_registers_sh): Add prototype.
8375 (the_low_target): Add initializer for arch_setup field.
8376 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8377 (the_low_target): Add initializer for arch_setup field.
8378 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8379 (the_low_target): Add initializer for arch_setup field.
8381 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8382 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8383 instead of init_registers ().
8384 * win32-arm-low.c (init_registers_arm): Add prototype.
8385 (the_low_target): Add initializer for arch_setup field.
8386 * win32-i386-low.c (init_registers_i386): Add prototype.
8387 (the_low_target): Add initializer for arch_setup field.
8389 * spu-low.c (init_registers_spu): Add prototype.
8390 (initialize_low): Call initialie_registers_spu () instead of
8391 initialize_registers ().
8393 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8395 * server.c (handle_v_requests): When handling the vRun and vAttach
8396 packets, if already debugging a process, don't kill it. Return an
8399 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8401 * server.c (handle_query): Correct length check.
8403 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8405 * win32-low.c (do_initial_child_stuff): Add process handle
8406 parameter. Set current_process_handle and current_process_id from the
8407 parameters. Clear globals.
8408 (win32_create_inferior): Don't set current_process_handle and
8409 current_process_id here. Instead pass them on the call to
8410 do_initial_child_stuff.
8411 (win32_attach): Likewise.
8412 (win32_clear_inferiors): New.
8413 (win32_kill): Don't close the current process handle or the
8414 current thread handle here. Instead call win32_clear_inferiors.
8415 (win32_detach): Don't open a new handle to the process. Call
8416 win32_clear_inferiors.
8417 (win32_join): Don't rely on current_process_handle; open a new
8418 handle using the process id.
8419 (win32_wait): Call win32_clear_inferiors when the inferior process
8422 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8424 * server.c (monitor_show_help): Add "exit".
8426 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8428 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8429 (clean): Add reg-xtensa.c.
8430 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8431 * configure.srv (xtensa*-*-linux*) New target.
8432 * linux-xtensa-low.c: New.
8433 * xtensa-xtregs.c: New.
8435 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8437 * hostio.c: Don't include errno.h.
8438 (errno_to_fileio_errno): Move to hostio-errno.
8439 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8440 error number outputting to the target->hostio_last_error callback.
8441 (hostio_packet_error): Use FILEIO_EINVAL directly.
8442 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8443 calls to hostio_error.
8444 * hostio-errno.c: New.
8445 * server.h (hostio_last_error_from_errno): Declare.
8446 * target.h (target_ops): Add hostio_last_error member.
8447 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8448 as hostio_last_error handler.
8449 * spu-low.c (spu_target_ops): Likewise.
8450 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8451 (wince_hostio_last_error): New functions.
8452 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8453 as hostio_last_error handler.
8454 (win32_target_ops) [!_WIN32_WCE]: Register
8455 hostio_last_error_from_errno as hostio_last_error handler.
8456 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8457 (hostio-errno.o): New rule.
8458 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8459 * configure.srv (srv_hostio_err_objs): New variable. Default to
8461 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8462 * configure: Regenerate.
8464 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8466 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8467 (linux_kill, linux_detach): Clean up the process list.
8468 * remote-utils.c (remote_open): Improve port number parsing.
8469 (putpkt_binary, input_interrupt): Only send interrupts if the target
8471 * server.c (extended_protocol): Make static.
8472 (attached): Define earlier.
8473 (exit_requested, response_needed, program_argv): New variables.
8474 (target_running): New.
8475 (start_inferior): Clear attached here.
8476 (attach_inferior): Set attached here.
8477 (require_running): Define.
8478 (handle_query): Use require_running and target_running. Implement
8480 (handle_v_attach, handle_v_run): New.
8481 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8482 (gdbserver_usage): Update.
8483 (main): Redo argument parsing. Handle --debug and --multi. Handle
8484 --attach along with other options or after the port. Save
8485 program_argv. Support no initial program. Resynchronize
8486 communication with GDB after an error. Handle "monitor exit".
8487 Use require_running and target_running. Always allow the extended
8488 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8489 restart in extended mode.
8490 * README: Refer to the GDB manual. Update --attach usage.
8492 2007-12-20 Andreas Schwab <schwab@suse.de>
8494 * linux-low.c (STACK_SIZE): Define.
8495 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8496 (linux_test_for_tracefork): Likewise.
8498 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8500 * linux-low.c (linux_wait_for_event): Update messages. Do not
8501 reinsert auto-delete breakpoints.
8502 * mem-break.c (struct breakpoint): Change return type of handler to
8504 (set_breakpoint_at): Update handler type.
8505 (reinsert_breakpoint_handler): Return 1 instead of calling
8507 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8509 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8510 * mem-break.h (set_breakpoint_at): Update handler type.
8511 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8512 * win32-low.c (auto_delete_breakpoint): New.
8513 (get_child_debug_event): Use it.
8515 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8517 * configure.ac: Check for pread and pwrite.
8518 * hostio.c (handle_pread): Fall back to lseek and read.
8519 (handle_pwrite): Fall back to lseek and write.
8520 * config.in, configure: Regenerated.
8522 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8524 * server.c (myresume): Add own_buf argument.
8525 (main): Update calls.
8527 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8529 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8530 * remote-utils.c (remote_open): Do not call disable_async_io.
8531 (block_async_io): Delete.
8532 (unblock_async_io): Make static.
8533 (initialize_async_io): New.
8534 * server.c (handle_v_cont): Handle async I/O here.
8535 (myresume): Likewise. Move other common resume tasks here...
8536 (main): ... from here. Call initialize_async_io. Disable async
8537 I/O before the main loop.
8538 * server.h (initialize_async_io): Declare.
8539 (block_async_io, unblock_async_io): Delete prototypes.
8540 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8542 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8544 * remote-utils.c (readchar): Allow binary data in received messages.
8546 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8548 * win32-low.c (attaching): New global.
8549 (win32_create_inferior): Clear the `attaching' global.
8550 (win32_attach): Set the `attaching' global.
8551 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8552 attaching. Only set a breakpoint at the entry point if not
8555 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8557 * server.c (main): Don't report dll events on the initial
8558 connection on attaches.
8560 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8562 * server.c (main): Relax numerical bases supported for the pid of
8563 the --attach command line argument.
8565 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8567 * win32-low.c (win32_attach): Call OpenProcess before
8568 DebugActiveProcess, not after. Add last error output to error
8571 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8573 * win32-low.c (win32_get_thread_context)
8574 (win32_set_thread_context): New functions.
8575 (thread_rec): Use win32_get_thread_context.
8576 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8577 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8580 2007-12-03 Leo Zayas
8581 Pedro Alves <pedro_alves@portugalmail.pt>
8583 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8585 (child_add_thread): Minor cleanup.
8586 (child_continue): Resume artificially suspended threads before
8587 calling ContinueDebugEvent.
8588 (suspend_one_thread): New.
8589 (fake_breakpoint_event): New.
8590 (get_child_debug_event): Change return type to int. Check here if
8591 gdb sent an interrupt request. If a soft interrupt was requested,
8592 fake a breakpoint event. Return 0 if there is no event to handle,
8594 (win32_wait): Don't check here if gdb sent an interrupt request.
8595 Ensure there is a valid event to handle.
8596 (win32_request_interrupt): Add soft interruption method as last
8599 2007-12-03 Leo Zayas
8600 Pedro Alves <pedro_alves@portugalmail.pt>
8602 * win32-low.h (win32_thread_info): Add descriptions to the
8603 structure members. Replace `suspend_count' counter by a
8605 * win32-low.c (thread_rec): Update condition of when to get the
8606 context from the inferior. Rely on ContextFlags being set if it
8607 has already been retrieved. Only suspend the inferior thread if
8608 we haven't already. Warn if that fails.
8609 (continue_one_thread): s/suspend_count/suspended/. Only call
8610 ResumeThread once. Warn if that fails.
8612 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8614 * win32-low.c (win32_wait): Don't read from the inferior when it
8617 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8619 * Makefile.in (win32_low_h): New variable.
8620 (win32-low.o): Add dependency on $(win32_low_h).
8621 (win32-arm-low.o, win32-i386-low.o): New rules.
8623 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8625 * hostio.c: Correct copyright year.
8627 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8629 * Makefile.in (OBS): Add hostio.o.
8630 (hostio.o): New rule.
8631 * server.h (handle_vFile): Declare.
8632 * hostio.c: New file.
8633 * server.c (handle_v_requests): Take packet_len and new_packet_len
8634 for binary packets. Call handle_vFile.
8635 (main): Update call to handle_v_requests.
8637 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8639 * linux-low.c: Include <sched.h>.
8641 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8643 * linux-low.c (linux_tracefork_grandchild): New.
8644 (linux_tracefork_child): Use clone.
8645 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8647 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8649 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8651 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8653 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8655 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8657 * inferiors.c (change_inferior_id): Delete.
8658 (add_pid_to_list, pull_pid_from_list): New.
8659 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8660 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8661 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8662 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8663 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8664 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8665 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8666 (using_threads): Always set to 1.
8667 (handle_extended_wait): New.
8668 (add_process): Do not set TID.
8669 (linux_create_inferior): Set must_set_ptrace_flags.
8670 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8671 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8672 (linux_thread_alive): Rename TID argument to LWPID.
8673 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8674 (linux_wait_for_event): Do not use TID or check using_threads. Update
8675 call to dead_thread_notify. Call handle_extended_wait.
8676 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8677 (send_sigstop): Delete sigstop_sent.
8678 (wait_for_sigstop): Avoid TID.
8679 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8680 (linux_test_for_tracefork): New.
8681 (linux_lookup_signals): Use thread_db_active and
8682 linux_supports_tracefork_flag.
8683 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8684 * linux-low.h (get_process_thread): Avoid TID.
8685 (struct process_ifo): Move thread_known and tid to the end. Remove
8687 (linux_attach_lwp, thread_db_init): Update prototypes.
8688 * server.h (change_inferior_id): Delete prototype.
8689 (add_pid_to_list, pull_pid_from_list): New prototypes.
8690 * thread-db.c (thread_db_use_events): New.
8691 (find_first_thread): Rename to...
8692 (find_one_thread): ...this. Update callers and messages. Do not
8693 call fatal. Check thread_db_use_events. Do not call
8694 change_inferior_id or new_thread_notify.
8695 (maybe_attach_thread): Update. Do not call new_thread_notify.
8696 (thread_db_init): Set thread_db_use_events. Check use_events.
8697 * utils.c (fatal, warning): Correct message prefix.
8699 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8701 * Makefile.in (clean): Remove new files.
8702 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8703 (powerpc-64.o, powerpc-64.c): New rules.
8704 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8705 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8707 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8709 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8710 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8711 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8712 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8713 (target_regsets): Add AltiVec and SPE register sets.
8714 * configure.ac: Check for AltiVec and SPE.
8715 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8716 (ppc_fill_vrregset, ppc_store_vrregset): New.
8717 (target_regsets): Add AltiVec register set.
8718 * configure: Regenerated.
8720 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8722 * linux-low.c (O_LARGEFILE): Define.
8723 (linux_read_memory): Use /proc/PID/mem.
8724 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8725 * configure, config.in: Regenerated.
8727 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8729 * linux-low.c (linux_wait_for_event): Do not pass signals while
8732 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8734 * win32-low.c (create_process): New.
8735 (win32_create_inferior): Use create_process instead of
8736 CreateProcess. If create_process failed retry appending an ".exe"
8737 suffix. Store the GetLastError result immediatelly after
8738 create_process calls and use it on the call to error.
8740 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8742 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8744 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8746 * configure.ac: Switch license to GPLv3.
8748 2007-08-01 Michael Snyder <msnyder@access-company.com>
8750 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8752 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8754 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8756 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8757 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8758 CloseToolhelp32Snapshot.
8759 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8760 CloseToolhelp32Snapshot.
8762 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8764 * server.c (main): Check for inferior exit before main loop.
8766 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8768 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8769 instead of on tmp_desc.
8771 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8772 Daniel Jacobowitz <dan@codesourcery.com>
8774 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8775 (add_thread): Minor cleanups.
8776 (clear_inferiors): Move lower in the file. Clear the DLL
8778 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8779 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8780 (xml_escape_text): New.
8781 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8783 (handle_v_cont): Report errors.
8784 (gdbserver_version): Update.
8785 (main): Correct size of own_buf. Do not report initial DLL events.
8786 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8787 (unloaded_dll, xml_escape_text): New.
8788 * win32-low.c (enum target_waitkind): Update comments.
8789 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8790 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8791 (win32_EnumProcessModules, win32_GetModuleInformation)
8792 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8793 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8794 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8795 (win32_Module32First, win32_Module32Next, load_toolhelp)
8796 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8797 (get_child_debug_event): Handle DLL events.
8798 (win32_wait): Likewise.
8800 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8802 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8803 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8805 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8807 * win32-low.c (handle_output_debug_string): Ignore event if not
8810 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8812 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8814 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8816 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8818 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8820 * inferiors.c (change_inferior_id): Add comment.
8821 * linux-low.c (check_removed_breakpoint): Add an early
8822 prototype. Improve debug output.
8823 (linux_attach): Doc update.
8824 (linux_detach_one_process, linux_detach): Clean up before releasing
8826 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8827 * linux-low.h (struct process_info): Doc improvement.
8828 * mem-break.c (delete_all_breakpoints): New.
8829 * mem-break.h (delete_all_breakpoints): New prototype.
8830 * thread-db.c (find_first_thread): New.
8831 (thread_db_create_event): Call it instead of
8832 thread_db_find_new_threads. Clean up unused variables.
8833 (maybe_attach_thread): Remove first thread handling.
8834 (thread_db_find_new_threads): Use find_first_thread.
8835 (thread_db_get_tls_address): Likewise.
8837 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8839 * thread-db.c (thread_db_find_new_threads): Add prototype.
8840 (thread_db_create_event): Check for the main thread before adding
8842 (maybe_attach_thread): Only enable event reporting if TID == 0.
8843 (thread_db_get_tls_address): Check for new threads.
8845 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8847 * linux-low.c (linux_create_inferior): Try execv before execvp.
8848 * spu-low.c (spu_create_inferior): Likewise.
8850 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8852 * linux-low.c (linux_create_inferior): Change execv to execvp.
8853 * spu-low.c (spu_create_inferior): Likewies.
8855 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8857 * Makefile.in (clean): Clean new files instead of deleted ones.
8858 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8859 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8861 * configure.srv: Specify XML files and new regformats for MIPS and
8863 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8864 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8865 an entry for the restart register.
8866 (mips_cannot_fetch_register, mips_cannot_store_register)
8867 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8868 register names to match the XML descriptions.
8869 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8870 restart register instead of $0.
8872 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8873 Markus Deuling <deuling@de.ibm.com>
8875 * remote-utils.c (decode_xfer_write): New function.
8876 * server.h (decode_xfer_write): Add prototype.
8877 * server.c (handle_query): Add PACKET_LEN argument. Support
8878 qXfer:spu:read and qXfer:spu:write packets.
8879 (main): Pass packet_len to handle_query.
8880 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8881 * target.h (target_ops): Add qxfer_spu.
8883 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8885 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8886 accessing non-seekable spufs files.
8888 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8890 * server.c (handle_query): Add reply for qC packet.
8892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8893 Leo Zayas <lerele@champenstudios@com>
8895 * server.h (check_remote_input_interrupt_request): New function.
8896 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8897 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8898 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8899 (check_remote_input_interrupt_request): New function.
8900 * server.h (check_remote_input_interrupt_request): Declare.
8901 * win32-low.c (winapi_DebugBreakProcess,
8902 winapi_GenerateConsoleCtrlEvent): New typedefs.
8903 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8905 (win32_wait): Check for remote interrupt request
8906 with check_remote_input_interrupt_request.
8907 (win32_request_interrupt): New function.
8908 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8910 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8912 * win32-low.c (debug_registers_changed,
8913 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8914 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8915 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8916 (thread_rec): Get context using the low target.
8917 (child_add_thread): Call thread_added on the low target,
8918 which does the same thing.
8920 (do_initial_child_stuff): Remove debug registers references.
8921 Set context using the low target. Resume threads after
8922 setting the contexts.
8923 (child_continue): Remove dead variable. Remove debug
8924 registers references.
8925 (child_fetch_inferior_registers): Go through the low target.
8926 (do_child_store_inferior_registers): Remove.
8927 (child_store_inferior_registers): Go through the low target.
8928 (win32_resume): Remove debug registers references.
8929 Set context using the low target.
8930 (handle_exception): Change return type to void. Don't record
8931 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8932 first chance exception.
8933 (get_child_debug_event): Change return type to void. Remove
8934 goto loop. Always return after waiting for debug event.
8935 (win32_wait): Convert to switch statement. Handle spurious
8938 * win32-i386-low.c (debug_registers_changed,
8939 debug_registers_used): New.
8940 (initial_stuff): Rename to ...
8941 (i386_initial_stuff): ... this. Clear debug registers
8943 (store_debug_registers): Delete.
8944 (i386_get_thread_context): New.
8945 (load_debug_registers): Delete.
8946 (i386_set_thread_context): New.
8947 (i386_thread_added): New.
8948 (single_step): Rename to ...
8949 (i386_single_step): ... this.
8950 (do_fetch_inferior_registers): Rename to ...
8951 (i386_fetch_inferior_register): ... this.
8952 (i386_store_inferior_register): New.
8953 (the_low_target): Adapt to new interface.
8955 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8956 (arm_get_thread_context): New.
8957 (arm_set_thread_context): New.
8959 (do_fetch_inferior_registers): Rename to ...
8960 (arm_fetch_inferior_register): ... this.
8961 (arm_store_inferior_register): New.
8962 (arm_wince_breakpoint): Reimplement as unsigned long.
8963 (arm_wince_breakpoint_len): Define.
8964 (the_low_target): Adapt to new interface.
8966 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8967 load_debug_registers. Add get_thread_context, set_thread_context,
8968 thread_added and store_inferior_register. Rename
8969 fetch_inferior_registers to fetch_inferior_register.
8970 (regptr): Remove declaration.
8972 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8974 * linux-low.c (linux_detach): Change return type to int. Return 0.
8975 * spu-low.c (spu_detach): Likewise.
8977 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8979 * target.h (target_ops): Change return type of detach to int.
8981 (join_inferior): New.
8982 * server.c (main): Don't skip detach support on mingw32.
8983 If the inferior doesn't support detaching return error.
8984 Call join_inferior instead of using waitpid.
8985 * linux-low.c (linux_join): New.
8986 (linux_target_op): Add linux_join.
8987 * spu-low.c (spu_join): New.
8988 (spu_target_ops): Add spu_join.
8989 * win32-low.c (win32_detach): Adapt to new interface.
8990 Reopen current_process_handle before detaching. Issue a child
8991 resume before detaching.
8993 (win32_target_op): Add win32_join.
8995 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8997 * win32-low.c (win32-attach): Fix return value.
8998 * target.h (target_ops): Describe ATTACH return values.
9000 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9002 * win32-low.c (GETPROCADDRESS): Define.
9003 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9004 (winapi_DebugSetProcessKillOnExit): Likewise.
9005 (win32_create_inferior): Force usage of ansi CreateProcessA.
9006 (win32_attach): Use GETPROCADDRESS.
9007 (win32_detach): Likewise.
9009 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9011 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9013 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9015 * win32-low.c: Commit leftover changes from 2007-03-29.
9017 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9019 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9020 fields short instead of int. Add explicit padding.
9021 (i387_cache_to_fsave): Remove unnecessary casts.
9022 (i387_fsave_to_cache): Doc fix.
9023 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9025 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9027 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9028 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9030 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9032 * configure.srv (arm*-*-mingw32ce*): Move near the other
9035 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9037 * configure.ac: Add errno checking.
9038 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9039 sys/file.h and malloc.h.
9040 (AC_CHECK_DECLS): Add perror.
9041 (srv_mingwce): Handle.
9042 * configure.srv (i[34567]86-*-cygwin*): Add
9043 win32-i386-low.o to srv_tgtobj.
9044 (i[34567]86-*-mingw*): Likewise.
9045 (arm*-*-mingw32ce*): Add case.
9046 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9047 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9048 [__MINGW32CE__] (strerror): New function.
9049 [__MINGW32CE__] (errno): Define to GetLastError.
9050 [__MINGW32CE__] (COUNTOF): New macro.
9051 (remote_open): Remove extra close call.
9052 * mem-break.c (delete_breakpoint_at): New function.
9053 * mem-break.h (delete_breakpoint_at): Declare.
9054 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9055 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9056 [USE_WIN32API] (read, write): Add char* casts.
9057 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9058 * server.h: Include wincecompat.h on Windows CE.
9059 [HAVE_ERRNO_H]: Check.
9060 (perror): Declare if not declared.
9061 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9062 (perror_with_name): Remove errno declaration.
9063 * wincecompat.h: New.
9064 * wincecompat.c: New.
9066 * win32-arm-low.c: New.
9067 * win32-i386-low.c: New.
9068 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9069 (OUTMSG2): Make it safe.
9071 (COUNTOF): New macro.
9072 (NUM_REGS): Get it from the low target.
9073 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9074 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9075 (thread_rec): Let low target handle debug registers.
9076 (child_add_thread): Likewise.
9077 (child_init_thread_list): Likewise.
9078 (continue_one_thread): Likewise.
9080 (do_child_fetch_inferior_registers): Move to ...
9081 * win32-i386-low.c: ... here, and rename to ...
9082 (do_fetch_inferior_registers): ... this.
9083 * win32-low.c (child_fetch_inferior_registers):
9084 Go through the low target.
9085 (do_child_store_inferior_registers): Use regptr.
9086 (strwinerror): New function.
9087 (win32_create_inferior): Handle Windows CE.
9088 Use strwinerror instead of strerror on Windows error
9089 codes. Add program to the error output.
9090 Don't close the main thread handle on Windows CE.
9091 (win32_attach): Use coredll.dll on Windows CE.
9092 (win32_kill): Close current process and current
9094 (win32_detach): Use coredll.dll on Windows CE.
9095 (win32_resume): Let low target handle debug registers, and
9097 (handle_exception): Add/Remove initial breakpoint. Avoid
9098 non-existant WSTOPSIG on Windows CE.
9099 (win32_read_inferior_memory): Cast to remove warning.
9100 (win32_arch_string): Go through the low target.
9101 (initialize_low): Call set_breakpoint_data with the low
9102 target's breakpoint.
9103 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9104 FOP_REGNUM, mappings): Move to ...
9105 * win32-i386-low.c: ... here.
9106 * win32-low.c (win32_thread_info): Move to ...
9107 * win32-low.h: ... here.
9108 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9109 win32-arm-low.c and wincecompat.c.
9110 (all:): Add $EXEEXT.
9111 (install-only:): Likewise.
9112 (gdbserver:): Likewise.
9113 (gdbreplay:): Likewise.
9114 * config.in: Regenerate.
9115 * configure: Regenerate.
9117 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9119 * win32-low.c: Rename typedef thread_info to
9120 win32_thread_info throughout.
9122 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9124 * win32-i386-low.c: Rename to ...
9125 * win32-low.c: ... this.
9126 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9127 * Makefile.in: Likewise.
9129 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9131 * remote-utils.c (monitor_output): Constify msg parameter.
9132 * server.h (monitor_output): Likewise.
9133 * win32-i386-low.c (handle_output_debug_string): New.
9134 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9135 handle_output_debug_string.
9136 (get_child_debug_event): Likewise.
9138 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9140 * server.c (main): Correct strtoul check.
9142 2007-03-27 Jon Ringle <jon@ringle.org>
9144 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9146 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9148 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9150 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9152 * terminal.h: Check HAVE_SGTTY_H.
9154 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9156 * remote-utils.c (remote_open): Print out the assigned port number.
9158 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9160 * remote-utils.c (monitor_output): New function.
9161 * server.c (debug_threads): Define here.
9162 (monitor_show_help): New function.
9163 (handle_query): Handle qRcmd.
9164 (main): Do not handle 'd' packet.
9165 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9166 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9169 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9171 * Makefile.in (EXEEXT): New.
9172 (clean): Use $(EXEEXT).
9174 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9176 * target.h (target_ops): Rename send_signal to request_interrupt,
9177 and remove enum target_signal parameter.
9178 * linux-low.c (linux_request_interrupt): Rename from
9179 linux_send_signal, and always send SIGINT.
9180 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9181 and always send SIGINT.
9182 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9184 (input_interrupt): Likewise.
9186 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9188 * server.c (get_features_xml): Check if target implemented
9190 * win32-i386-low.c (win32_arch_string): New.
9191 (win32_target_ops): Add win32_arch_string as arch_string member.
9193 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9195 * spu-low.c (spu_arch_string): New.
9196 (spu_target_ops): Add spu_arch_string.
9198 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9200 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9201 * configure.ac: Do not check for terminal.h.
9202 * configure, config.in: Regenerated.
9204 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9206 * Makefile.in (OBS): Add $(XML_BUILTIN).
9207 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9209 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9210 (arm-with-iwmmxt.c): New.
9211 * config.in, configure: Regenerate.
9212 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9213 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9214 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9215 (arm*-*-linux*): Add iWMMXt and regset support.
9216 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9217 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9218 (arm_store_wmmxregset, target_regsets): New.
9219 * server.c (get_features_xml): Take annex argument. Check builtin
9221 (handle_query): Handle multiple annexes.
9223 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9225 * remote-utils.c [USE_WIN32API] (read, write): Define.
9226 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9229 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9231 * linux-i386-low.c (the_low_target): Set arch_string.
9232 * linux-x86-64-low.c (the_low_target): Likewise.
9233 * linux-low.c (linux_arch_string): New.
9234 (linux_target_ops): Add it.
9235 * linux-low.h (struct linux_target_ops): Add arch_string.
9236 * server.c (write_qxfer_response): Use const void * for DATA.
9237 (get_features_xml): New.
9238 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9239 * target.h (struct target_ops): Add arch_string method.
9241 2007-01-03 Denis Pilat <denis.pilat@st.com>
9242 Daniel Jacobowitz <dan@codesourcery.com>
9244 * linux-low.c (linux_kill): Handle being called with no threads.
9245 * win32-i386-low.c (win32_kill): Likewise.
9246 (get_child_debug_event): Clear current_process_handle.
9248 2006-12-30 Denis PILAT <denis.pilat@st.com>
9249 Daniel Jacobowitz <dan@codesourcery.com>
9251 * remote-utils.c (remote_open): Check the type of specified
9252 serial port devices before opening them.
9253 * server.c (main): Kill the inferior if an error occurs during
9254 the first remote_open.
9256 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9258 * README: Update supported targets.
9260 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9262 * Makefile.in (clean): Remove reg-mips64.c.
9263 (reg-mips64.c, reg-mips64.o): New rules.
9264 * configure.srv: Handle mips64. Include regset support for mips.
9265 * linux-mips-low.c (union mips_register): New.
9266 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9267 (mips_breakpoint, mips_breakpoint_at): Use int.
9268 (mips_collect_register, mips_supply_register)
9269 (mips_collect_register_32bit, mips_supply_register_32bit)
9270 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9271 (mips_store_fpregset, target_regsets): New.
9272 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9274 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9276 * configure.srv: Add target "spu*-*-*".
9277 * Makefile.in (clean): Remove reg-spu.c.
9278 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9279 * spu-low.c: New file.
9281 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9283 * configure.ac: Correct td_thr_tls_get_addr test.
9284 * configure: Regenerated.
9286 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9288 * linux-low.c (linux_wait_for_event): Reformat. Use the
9290 * remote-utils.c (decode_address_to_semicolon): New.
9291 * server.c (pass_signals, handle_general_set): New.
9292 (handle_query): Mention QPassSignals for qSupported.
9293 (main): Call handle_general_set.
9294 * server.h (pass_signals, decode_address_to_semicolon): New.
9296 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9298 * server.c (handle_query): Correct error handling for read_auxv.
9300 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9302 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9303 and srv_linux_thread_db to yes.
9304 * linux-s390-low.c (s390_fill_gregset): New function.
9305 (target_regsets): Define data structure.
9307 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9309 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9310 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9311 * config.in, configure: Regenerated.
9312 * inferiors.c (gdb_id_to_thread): New function.
9313 (gdb_id_to_thread_id): Use it.
9314 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9315 * linux-low.h (struct process_info): Add th member.
9316 (thread_db_get_tls_address): New prototype.
9317 * remote-utils.c (decode_address): Make non-static.
9318 * server.c (handle_query): Handle qGetTLSAddr.
9319 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9320 * target.h (struct target_ops): Add get_tls_address.
9321 * thread-db.c (maybe_attach_thread): Save the thread handle.
9322 (thread_db_get_tls_address): New.
9324 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9326 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9327 (linux_resume_one_process): Take a siginfo_t *. Update all
9328 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9329 (struct pending_signals): Add a siginfo_t.
9330 (linux_wait_for_process): Always set last_status.
9331 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9332 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9333 * linux-low.h (struct process_info): Add last_status.
9335 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9337 * remote-utils.c (try_rle): New function.
9338 (putpkt_binary): Use it.
9340 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9342 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9343 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9344 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9345 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9346 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9349 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9351 * server.c (terminal_fd): New variable.
9352 (old_foreground_pgrp): Likewise.
9353 (restore_old_foreground_pgrp): New function.
9354 (start_inferior): Record the terminal file descriptor in terminal_fd
9355 and its original foreground group in old_foreground_pgrp. Register
9356 restore_old_foreground_pgrp with atexit().
9358 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9360 * server.c (handle_query): Correct qPart to qXfer.
9362 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9364 * configure.ac: Check for more headers which are missing on
9365 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9366 * configure.srv: Add Cygwin and mingw32.
9367 * remote-utils.c: Don't include headers unconditionally which
9368 are missing on mingw32. Include <winsock.h> for mingw32.
9369 (remote_open): Adjust for mingw32 support. Flush
9370 standard error after writing to it.
9371 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9372 (unblock_async_io, enable_async_io, disable_async_io)
9373 (readchar, getpkt): Update for Winsock support.
9374 (prepare_resume_reply): Expect a protocol signal number.
9375 * server.c: Disable <sys/wait.h> on mingw32.
9376 (start_inferior): Adjust for mingw32 support. Flush
9377 standard error after writing to it.
9378 (attach_inferior): Likewise. Use protocol signal
9380 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9382 * win32-i386-low.c: New file.
9383 * Makefile.in (XM_CLIBS): Set.
9384 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9385 (win32-i386-low.o): New dependency rule.
9386 * linux-low.c (linux_wait): Use target signal numbers.
9387 * target.h (struct target_ops): Doc fix.
9388 * server.h (target_signal_to_name): New prototype.
9389 * gdbreplay.c: Don't include headers unconditionally which
9390 are missing on mingw32. Include <winsock.h> for mingw32.
9391 (remote_close, remote_open): Adjust for Winsock support.
9392 * configure, config.in: Regenerated.
9394 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9396 * server.c (decode_xfer_read, write_qxfer_response): New.
9397 (handle_query): Take a packet length argument. Handle
9398 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9399 the qSupported response.
9400 (main): Update call to handle_query.
9402 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9404 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9405 (putpkt_binary): Renamed from putpkt and adjusted for binary
9407 (putpkt): New wrapper for putpkt_binary.
9408 (readchar): Don't mask off the high bit.
9409 (decode_X_packet): New function.
9410 * server.c (main): Call putpkt_binary if a handler sets the packet
9411 length. Save the length of the incoming packet. Handle 'X'.
9412 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9414 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9416 * server.c (handle_query): Handle qSupported.
9418 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9420 * remote-utils.c (all_symbols_looked_up): New variable.
9421 (look_up_one_symbol): Check it.
9422 * server.h (look_up_one_symbol): New declaration.
9423 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9425 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9427 * Makefile.in (linux-arm-low.o): Update dependencies.
9428 * linux-arm-low.c: Include "gdb_proc_service.h".
9429 (PTRACE_GET_THREAD_AREA): Define.
9430 (ps_get_thread_area): New function.
9432 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9434 * configure.srv (m68k*-*-uclinux*): New target.
9435 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9436 (linux_resume_one_process): Remove extraneous cast.
9437 (linux_read_offsets): New.
9438 (linux_target_op): Add linux_read_offsets on mmuless systems.
9439 * server.c (handle_query): Add qOffsets logic.
9440 * target.h (struct target_ops): Add read_offsets.
9442 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9444 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9445 (PTRACE_GET_THREAD_AREA): Define.
9446 (ps_get_thread_area): New function.
9447 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9448 (linux-x86-64-low.o): Update.
9450 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9452 * configure.ac: Remove checks for prfpregset_t.
9453 * gdb_proc_service.h: New file.
9454 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9455 new "gdb_proc_service.h".
9456 * proc-service.c: Likewise.
9457 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9458 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9459 * Makefile.in (gdb_proc_service_h): Updated.
9460 * configure, config.in: Regenerated.
9462 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9464 * remote-utils.c (prepare_resume_reply): Move declaration
9465 of gdb_id_from_wait to the top of the block.
9467 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9469 * linux-low.c (regsets_store_inferior_registers): Read the regset
9470 from the target before filling it.
9472 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9474 * server.c (attach_inferior): Return SIGTRAP for a successful
9477 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9479 * Makefile.in (OBS): Add version.o.
9480 (STAGESTUFF): Delete.
9481 (version.o): Add dependencies.
9482 (version.c): Replace rule.
9483 (clean): Remove version.c.
9484 * server.c (gdbserver_version): New.
9485 (gdbserver_usage): Use printf.
9486 (main): Handle --version and --help.
9487 * server.h (version, host_name): Add declarations.
9489 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9501 * linux-x86-64-low.c:
9504 * linux-ppc64-low.c:
9513 * linux-crisv32-low.c:
9525 * gdbserver.1: Add (C) after Copyright. Update the FSF
9528 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9530 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9531 (arm_breakpoint_at): Recognize both breakpoints.
9532 (the_low_target): Use the correct breakpoint instruction.
9534 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9536 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9537 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9538 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9539 (the_low_target): Update.
9541 2005-10-25 Andreas Schwab <schwab@suse.de>
9543 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9545 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9546 (ia64_num_regs): Reduce to 462.
9548 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9550 * acinclude.m4: Correct quoting.
9551 * aclocal.m4: Regenerated.
9553 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9554 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9555 (thread_db_init): Call thread_db_err_str.
9556 * configure.ac: Check for TD_VERSION.
9557 * config.in, configure: Regenerated.
9559 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9561 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9563 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9565 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9566 is not available. Define HAVE_PTRACE_GETREGS if it is.
9567 * config.in, configure: Regenerated.
9568 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9569 * linux-i386-low.c, linux-m68k-low.c: Update to use
9570 HAVE_PTRACE_GETREGS.
9571 * linux-low.c (regsets_fetch_inferior_registers)
9572 (regsets_store_inferior_registers): Only return 0 if we processed
9574 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9575 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9577 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9579 * inferiors.c (struct thread_info): Add gdb_id.
9580 (add_thread): Add gdb_id argument.
9581 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9582 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9583 calls to add_thread.
9584 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9585 * server.c (handle_query): Use thread_to_gdb_id.
9586 (handle_v_cont, main): Use gdb_id_to_thread_id.
9587 * server.h (add_thread): Update prototype.
9588 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9591 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9593 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9594 left-padded registers.
9595 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9596 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9598 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9600 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9601 * configure: Regenerate.
9602 * config.in: Regenerate.
9603 * server.h (NEED_DECLARATION_STRERROR):
9604 Replace with !HAVE_DECL_STRERROR.
9606 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9608 * linux-low.c (linux_wait, linux_send_signal): Don't test
9609 an unsigned long variable for > 0 if it could be MAX_ULONG.
9610 * server.c (myresume): Likewise.
9611 * target.c (set_desired_inferior): Likewise.
9613 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9615 * configure.ac: Simplify and improve check for socklen_t.
9616 * configure, config.in: Regenerate.
9618 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9620 * acconfig.h: Remove.
9621 * configure.ac: Add a test for socklen_t. Use three-argument
9622 AC_DEFINE throughout.
9623 * config.in: Regenerated using autoheader 2.59.
9624 * configure: Regenerated.
9626 * gdbreplay.c (socklen_t): Provide a default.
9627 (remote_open): Use socklen_t.
9628 * remote-utils.c (socklen_t): Provide a default.
9629 (remote_open): Use socklen_t.
9630 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9633 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9635 * linux-low.c (linux_read_memory, linux_write_memory)
9636 (linux_read_auxv): Likewise.
9637 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9638 (check_mem_write): Likewise.
9639 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9641 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9642 (registers_from_string, register_data): Likewise.
9643 * server.c (handle_query, main): Likewise.
9644 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9645 (decode_M_packet): Likewise.
9646 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9647 * target.h (struct target_ops): Update read_memory, write_memory,
9649 (read_inferior_memory, write_inferior_memory): Update.
9650 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9652 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9653 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9654 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9655 linux-s390-low.c, linux-sh-low.c: Update for changes in
9656 read_inferior_memory and the_low_target->breakpoint.
9658 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9660 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9661 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9662 * configure.srv: Add powerpc64-*-linux*.
9663 * linux-ppc64-low.c: New file.
9665 2005-05-23 Orjan Friberg <orjanf@axis.com>
9667 * linux-cris-low.c: New file with support for CRIS.
9668 * linux-crisv32-low.c: Ditto for CRISv32.
9669 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9670 (clean): Add reg-cris.c and reg-crisv32.c.
9671 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9672 reg-crisv32.o, and reg-crisv32.c to make rules.
9673 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9676 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9678 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9679 of sizeof (PTRACE_XFER_TYPE).
9680 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9682 2005-05-12 Orjan Friberg <orjanf@axis.com>
9684 * target.h (struct target_ops): Add insert_watchpoint,
9685 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9686 pointers for hardware watchpoint support.
9687 * linux-low.h (struct linux_target_ops): Ditto.
9688 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9689 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9690 to linux_target_ops.
9691 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9693 * server.c (main): Recognize 'Z' and 'z' packets.
9695 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9697 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9698 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9699 (the_low_target): Add new members.
9701 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9703 * proc-service.c (ps_lgetregs): Search all_processes instead of
9706 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9708 * server.c (start_inferior): Change return type to int.
9709 (attach_inferior): Change sigptr to int *.
9710 (handle_v_cont, handle_v_requests): Change signal to int *.
9711 (main): Change signal to int.
9713 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9715 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9716 * configure.srv: Add m32r*-*-linux*.
9717 * linux-m32r-low.c: New file.
9719 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9721 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9723 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9725 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9726 Take unsigned long arguments for PIDs.
9727 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9728 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9729 (wait_for_sigstop, linux_resume_one_process)
9730 (regsets_fetch_inferior_registers, linux_send_signal)
9731 (linux_read_auxv): Likewise. Update the types of variables holding
9732 PIDs. Update format string specifiers.
9733 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9734 * remote-utils.c (prepare_resume_reply): Likewise.
9735 * server.c (cont_thread, general_thread, step_thread)
9736 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9738 (handle_query): Update format specifiers.
9739 (handle_v_cont, main): Use strtoul for thread IDs.
9740 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9741 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9742 (general_thread, step_thread, thread_from_wait)
9743 (old_thread_from_wait): Update.
9744 * target.h (struct thread_resume): Use unsigned long for THREAD.
9745 (struct target_ops): Use unsigned long for arguments to attach and
9748 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9750 * acinclude.m4: Include bfd/bfd.m4 directly.
9751 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9752 <agriffis@toolchain.org>.
9753 * aclocal.m4, configure: Regenerated.
9755 2005-01-07 Andrew Cagney <cagney@gnu.org>
9757 * configure.ac: Rename configure.in, require autoconf 2.59.
9758 * configure: Re-generate.
9760 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9762 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9764 * aclocal.m4: Regenerated.
9765 * configure: Regenerated.
9767 2004-11-21 Andreas Schwab <schwab@suse.de>
9769 * linux-m68k-low.c (m68k_num_gregs): Define.
9770 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9771 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9772 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9773 (m68k_breakpoint_at): New. Add to the_low_target.
9775 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9776 srv_linux_thread_db to yes.
9778 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9780 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9781 (ARCH_SET_FS): Likewise.
9782 (ARCH_GET_FS): Likewise.
9783 (ARCH_GET_GS): Likewise.
9785 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9787 * linux-i386-low.c (ps_get_thread_area): New.
9788 * linux-x86-64-low.c (ps_get_thread_area): New.
9789 * linux-low.c: Include <sys/syscall.h>.
9790 (linux_kill_one_process): Don't kill the first thread here.
9791 (linux_kill): Kill the first thread here.
9792 (kill_lwp): New function.
9793 (send_sigstop, linux_send_signal): Use it.
9794 * proc-service.c: Clean up #ifdefs.
9795 (fpregset_info): Delete.
9796 (ps_lgetregs): Update and enable implementation.
9797 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9799 * remote-utils.c (struct sym_cache, symbol_cache): New.
9800 (input_interrupt): Print a clearer message.
9801 (async_io_enabled): New variable.
9802 (enable_async_io, disable_async_io): Use it. Update comments.
9803 (look_up_one_symbol): Use the symbol cache.
9804 * thread-db.c (thread_db_look_up_symbols): New function.
9805 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9807 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9809 * configure.in: Test for -rdynamic.
9810 * configure: Regenerated.
9811 * Makefile (INTERNAL_LDFLAGS): New.
9812 (gdbserver, gdbreplay): Use it.
9814 2004-09-02 Andrew Cagney <cagney@gnu.org>
9816 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9818 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9820 * linux-low.c (linux_wait): Clear all_processes list also.
9822 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9824 * linux-low.c: Include <errno.h>. Remove extern declaration of
9827 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9829 * gdbreplay.c, server.h, utils.c: Update copyright years.
9831 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9833 * server.c (main): Print child status or termination signal from
9834 variable 'signal', not 'sig'.
9836 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9838 * linux-low.c (linux_read_memory): Change return type to
9839 int. Check for and return error from ptrace().
9840 * target.c (read_inferior_memory): Change return type to int. Pass
9841 back return status from the_target->read_memory().
9842 * target.h (struct target_ops): Adapt *read_memory() prototype.
9844 (read_inferior_memory): Adapt prototype.
9845 * server.c (main): Return an error packet if
9846 read_inferior_memory() returns an error.
9848 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9850 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9851 Unify with other clean targets.
9853 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9855 * server.c (handle_v_cont): Call set_desired_inferior.
9857 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9859 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9861 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9863 * linux-low.c (linux_wait): Unblock async I/O.
9864 (linux_resume): Block and enable async I/O.
9865 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9866 * server.h (block_async_io, unblock_async_io): Add prototypes.
9868 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9870 * remote-utils.c (remote_open): Print a status notice after
9872 * server.c (attach_inferior): Print a status notice after
9875 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9877 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9879 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9881 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9883 * server.c, target.h: Update copyright years.
9885 2004-02-25 Roland McGrath <roland@redhat.com>
9887 * target.h (struct target_ops): New member `read_auxv'.
9888 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9889 * linux-low.c (linux_read_auxv): New function.
9890 (linux_target_ops): Initialize `read_auxv' member to that.
9892 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9894 Committed by Jim Blandy <jimb@redhat.com>.
9896 * linux-s390-low.c (s390_num_regs): Update.
9897 (s390_regmap): Remove control registers. Use __s390x__ predefine
9898 instead of GPR_SIZE to distiguish s390 and s390x targets.
9900 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9902 * linux-low.c: Update copyright year.
9903 (check_removed_breakpoint): Clear pending_is_breakpoint.
9904 (linux_set_resume_request, linux_queue_one_thread)
9905 (resume_status_pending_p): New functions.
9906 (linux_continue_one_thread): Use process->resume.
9907 (linux_resume): Only resume threads if there are no pending events.
9908 * linux-low.h (struct process_info): Add resume request
9911 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
9913 * regcache.c (new_register_cache): Clear the allocated register
9914 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9916 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
9918 * linux-low.c (linux_resume): Take a struct thread_resume *
9920 (linux_wait): Update call.
9921 (resume_ptr): New static variable.
9922 (linux_continue_one_thread): Renamed from
9923 linux_continue_one_process. Use resume_ptr.
9924 (linux_resume): Use linux_continue_one_thread.
9925 * server.c (handle_v_cont, handle_v_requests): New functions.
9926 (myresume): New function.
9927 (main): Handle 'v' case.
9928 * target.h (struct thread_resume): New type.
9929 (struct target_ops): Change argument of "resume" to struct
9931 (myresume): Delete macro.
9933 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9935 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9936 (uninstall): Support DESTDIR.
9938 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9940 * configure.srv: Add xscale*linux copy of arm*linux entry.
9942 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
9944 * linux-arm-low.c (arm_reinsert_addr): New function.
9945 (the_low_target): Add arm_reinsert_addr.
9947 2003-07-08 Mark Kettenis <kettenis@gnu.org>
9949 * mem-break.c: Remove whitespace at end of file.
9951 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9953 * configure.in: Check whether we need to prototype strerror.
9954 * server.h: Optionally prototype strerror.
9955 * gdbreplay.c (perror_with_name): Use strerror.
9956 * linux-low.c (linux_attach_lwp): Use strerror.
9957 * utils.c (perror_with_name): Use strerror.
9958 * config.in, configure: Regenerated.
9960 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
9962 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9963 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9965 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
9967 * Makefile.in (SFILES): Update.
9968 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9969 low-sun3.c: Remove files.
9971 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
9973 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9974 (linux_detach_one_process, linux_detach): New functions.
9975 (linux_target_ops): Add linux_detach.
9976 * server.c (main): Handle 'D' packet.
9977 * target.h (struct target_ops): Add "detach" member.
9978 (detach_inferior): Define.
9980 2003-06-13 Mark Kettenis <kettenis@gnu.org>
9982 From Kelley Cook <kelleycook@wideopenwest.com>:
9983 * configure.srv: Accept i[34567]86 variants.
9985 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
9987 * linux-low.c (linux_wait_for_event): Correct comment typos.
9988 (linux_resume_one_process): Call check_removed_breakpoint.
9989 (linux_send_signal): New function.
9990 (linux_target_ops): Add linux_send_signal.
9991 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9993 * target.h (struct target_ops): Add send_signal.
9995 2003-05-29 Jim Blandy <jimb@redhat.com>
9997 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9998 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9999 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10000 away part of the register's value.
10002 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10004 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10005 (linux_wait_for_event, linux_init_signals): Likewise.
10007 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10009 * configure.in: Check for stdlib.h.
10010 * configure: Regenerated.
10011 * config.in: Regenerated.
10013 2003-01-04 Andreas Schwab <schwab@suse.de>
10015 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10017 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10019 * Makefile.in: Remove obsolete code.
10021 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10023 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10024 defined(PT_FPR0_HI).
10026 2002-11-17 Stuart Hughes <seh@zee2.com>
10028 * linux-arm-low.c (arm_num_regs): Increase.
10029 (arm_regmap): Include status register.
10031 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10033 * linux-low.c (register_addr): Remove incorrect -1 check.
10035 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10037 * linux-low.c (linux_create_inferior): Call setpgid. Return
10039 (unstopped_p, linux_signal_pid): Remove.
10040 (linux_target_ops): Remove linux_signal_pid.
10041 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10042 global instead of target method.
10043 * target.h (struct target_ops): Remove signal_pid. Update comment
10044 for create_inferior.
10045 * server.c (signal_pid): New variable.
10046 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10047 gdbserver. Set the child to be the foreground process group.
10048 (attach_inferior): Set signal_pid.
10050 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10052 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10054 2002-08-20 Jim Blandy <jimb@redhat.com>
10056 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10059 2002-08-01 Andrew Cagney <cagney@redhat.com>
10061 * Makefile.in: Make chill references obsolete.
10063 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10065 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10066 * configure: Regenerate.
10067 * config.in: Regenerate.
10069 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10071 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10072 (perror_with_name, remote_close, remote_open, expect, play): Static.
10074 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10076 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10077 byte offsets instead of an array of indexes.
10078 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10080 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10082 * regcache.c: Add comment.
10084 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10086 * thread-db.c: New file.
10087 * proc-service.c: New file.
10088 * acinclude.m4: New file.
10089 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10090 proc-service.o, and thread-db.o.
10091 (linux-low.o): Add USE_THREAD_DB.
10092 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10093 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10094 * aclocal.m4: Regenerated.
10095 * config.in: Regenerated.
10096 * configure: Regenerated.
10097 * configure.in: Check for proc_service.h, sys/procfs.h,
10098 thread_db.h, and linux/elf.h headrs.
10099 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10100 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10101 Check for -lthread_db and thread support.
10102 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10103 PowerPC, and SuperH.
10104 * i387-fp.c: Constify arguments.
10105 * i387-fp.h: Likewise.
10106 * inferiors.c: (struct thread_info): Renamed from
10107 `struct inferior_info'. Remove PID member. Use generic inferior
10108 list header. All uses updated.
10109 (inferiors, signal_pid): Removed.
10110 (all_threads): New variable.
10111 (get_thread): Define.
10112 (add_inferior_to_list): New function.
10113 (for_each_inferior): New function.
10114 (change_inferior_id): New function.
10115 (add_inferior): Removed.
10116 (remove_inferior): New function.
10117 (add_thread): New function.
10118 (free_one_thread): New function.
10119 (remove_thread): New function.
10120 (clear_inferiors): Use for_each_inferior and free_one_thread.
10121 (find_inferior): New function.
10122 (find_inferior_id): New function.
10123 (inferior_target_data): Update argument type.
10124 (set_inferior_target_data): Likewise.
10125 (inferior_regcache_data): Likewise.
10126 (set_inferior_regcache_data): Likewise.
10127 * linux-low.c (linux_bp_reinsert): Remove.
10128 (all_processes, stopping_threads, using_thrads)
10129 (struct pending_signals, debug_threads, pid_of): New.
10130 (inferior_pid): Replace with macro.
10131 (struct inferior_linux_data): Remove.
10132 (get_stop_pc, add_process): New functions.
10133 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10134 Use add_process and add_thread.
10135 (linux_attach_lwp): New function, based on old linux_attach. Use
10136 add_process and add_thread. Set stop_expected for new threads.
10137 (linux_attach): New function.
10138 (linux_kill_one_process): New function.
10139 (linux_kill): Kill all LWPs.
10140 (linux_thread_alive): Use find_inferior_id.
10141 (check_removed_breakpoints, status_pending_p): New functions.
10142 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10143 Update. Use WNOHANG. Wait for cloned processes also. Update process
10144 struct for the found process.
10145 (linux_wait_for_event): New function.
10146 (linux_wait): Use it. Support LWPs.
10147 (send_sigstop, wait_for_sigstop, stop_all_processes)
10148 (linux_resume_one_process, linux_continue_one_process): New functions.
10149 (linux_resume): Support LWPs.
10150 (REGISTER_RAW_SIZE): Remove.
10151 (fetch_register): Use register_size instead. Call supply_register.
10152 (usr_store_inferior_registers): Likewise. Call collect_register.
10153 Fix recursive case.
10154 (regsets_fetch_inferior_registers): Improve error message.
10155 (regsets_store_inferior_registers): Add debugging.
10156 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10157 (unstopped_p, linux_signal_pid): New functions.
10158 (linux_target_ops): Add linux_signal_pid.
10159 (linux_init_signals): New function.
10160 (initialize_low): Call it. Initialize using_threads.
10161 * regcache.c (inferior_regcache_data): Add valid
10163 (get_regcache): Fetch registers lazily. Add fetch argument
10164 and update all callers.
10165 (regcache_invalidate_one, regcache_invalidate): New
10167 (new_register_cache): Renamed from create_register_cache.
10168 Return the new regcache.
10169 (free_register_cache): Change argument to a void *.
10170 (registers_to_string, registers_from_string): Call get_regcache
10171 with fetch flag set.
10172 (register_data): Make static. Pass fetch flag to get_regcache.
10173 (supply_register): Call get_regcache with fetch flag clear.
10174 (collect_register): Call get_regcache with fetch flag set.
10175 (collect_register_as_string): New function.
10176 * regcache.h: Update.
10177 * remote-utils.c (putpkt): Flush after debug output and use
10179 Handle input interrupts while waiting for an ACK.
10180 (input_interrupt): Use signal_pid method.
10181 (getpkt): Flush after debug output and use stderr.
10182 (outreg): Use collect_register_as_string.
10183 (new_thread_notify, dead_thread_notify): New functions.
10184 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10185 and general_thread.
10186 (look_up_one_symbol): Flush after debug output.
10187 * server.c (step_thread, server_waiting): New variables.
10188 (start_inferior): Don't use signal_pid. Update call to mywait.
10189 (attach_inferior): Update call to mywait.
10190 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10191 (main): Don't fetch/store registers explicitly. Use
10192 set_desired_inferior. Support proposed ``Hs'' packet. Update
10194 * server.h: Update.
10195 (struct inferior_list, struct_inferior_list_entry): New.
10196 * target.c (set_desired_inferior): New.
10197 (write_inferior_memory): Constify.
10198 (mywait): New function.
10199 * target.h: Update.
10200 (struct target_ops): New signal_pid method.
10201 (mywait): Removed macro, added prototype.
10203 * linux-low.h (regset_func): Removed.
10204 (regset_fill_func, regset_store_func): New.
10205 (enum regset_type): New.
10206 (struct regset_info): Add type field. Use new operation types.
10207 (struct linux_target_ops): stop_pc renamed to get_pc.
10208 Add decr_pc_after_break and breakpoint_at.
10209 (get_process, get_thread_proess, get_process_thread)
10210 (strut process_info, all_processes, linux_attach_lwp)
10211 (thread_db_init): New.
10213 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10214 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10215 (the_low_target): Add new members.
10216 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10217 (i386_store_fpxregset): Constify.
10218 (target_regsets): Add new kind identifier.
10219 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10220 (i386_set_pc): Add debugging.
10221 (i386_breakpoint_at): New function.
10222 (the_low_target): Add new members.
10223 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10224 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10225 (mips_breakpoint_at): New.
10226 (the_low_target): Add new members.
10227 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10228 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10229 (the_low_target): Add new members.
10230 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10231 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10232 (the_low_target): Add new members.
10233 * linux-x86-64-low.c (target_regsets): Add new kind
10236 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10238 From Martin Pool <mbp@samba.org>:
10239 * server.c (gdbserver_usage): New function.
10242 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10244 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10245 stop_at -> stop_pc.
10247 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10249 * Makefile.in: Remove obsolete code.
10251 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10253 * linux-low.c (regsets_fetch_inferior_registers),
10254 (regsets_store_inferior_registers): Removed cast to int from
10256 * regcache.h: Added declaration of struct inferior_info.
10258 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10260 * inferiors.c (struct inferior_info): Add regcache_data.
10261 (add_inferior): Call create_register_cache.
10262 (clear_inferiors): Call free_register_cache.
10263 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10264 * regcache.c (struct inferior_regcache_data): New.
10265 (registers): Remove.
10266 (get_regcache): New function.
10267 (create_register_cache, free_register_cache): New functions.
10268 (set_register_cache): Don't initialize the register cache here.
10269 (registers_to_string, registers_from_string, register_data): Call
10271 * regcache.h: Add prototypes.
10272 * server.h: Likewise.
10274 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10276 * mem-break.c: New file.
10277 * mem-break.h: New file.
10278 * Makefile.in: Add mem-break.o rule; update server.h
10280 * inferiors.c (struct inferior_info): Add target_data
10282 (clear_inferiors): Free target_data member if set.
10283 (inferior_target_data, set_inferior_target_data): New functions.
10284 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10285 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10286 * linux-low.c (linux_bp_reinsert): New variable.
10287 (struct inferior_linux_data): New.
10288 (linux_create_inferior): Use set_inferior_target_data.
10289 (linux_attach): Likewise. Call add_inferior.
10290 (linux_wait_for_one_inferior): New function.
10291 (linux_wait): Call it.
10292 (linux_write_memory): Add const.
10293 (initialize_low): Call set_breakpoint_data.
10294 * linux-low.h (struct linux_target_ops): Add breakpoint
10296 * server.c (attach_inferior): Remove extra add_inferior
10298 * server.h: Include mem-break.h. Update inferior.c
10300 * target.c (read_inferior_memory)
10301 (write_inferior_memory): New functions.
10302 * target.h (read_inferior_memory)
10303 (write_inferior_memory): Change macros to prototypes.
10304 (struct target_ops): Update comments. Add const to write_memory
10307 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10309 * linux-low.c (usr_store_inferior_registers): Support
10310 registers which are allowed to fail to store.
10311 * linux-low.h (linux_target_ops): Likewise.
10312 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10313 (ppc_cannot_store_register): FPSCR may not be storable.
10315 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10317 * server.h: Include <string.h> if HAVE_STRING_H.
10318 * ChangeLog: Correct paths in last ChangeLog entry.
10320 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10322 * linux-low.h: Remove obsolete prototypes.
10323 (struct linux_target_ops): New.
10324 (extern the_low_target): New.
10325 * linux-low.c (num_regs, regmap): Remove declarations.
10326 (register_addr): Use the_low_target explicitly.
10327 (fetch_register): Likewise.
10328 (usr_fetch_inferior_registers): Likewise.
10329 (usr_store_inferior_registers): Likewise.
10330 * linux-arm-low.c (num_regs): Remove.
10331 (arm_num_regs): Define.
10332 (arm_regmap): Renamed from regmap, made static.
10333 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10335 (arm_cannot_store_register): Renamed from cannot_store_register,
10337 (the_low_target): New.
10338 * linux-i386-low.c (num_regs): Remove.
10339 (i386_num_regs): Define.
10340 (i386_regmap): Renamed from regmap, made static.
10341 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10343 (i386_cannot_store_register): Renamed from cannot_store_register,
10345 (the_low_target): New.
10346 * linux-ia64-low.c (num_regs): Remove.
10347 (ia64_num_regs): Define.
10348 (ia64_regmap): Renamed from regmap, made static.
10349 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10351 (ia64_cannot_store_register): Renamed from cannot_store_register,
10353 (the_low_target): New.
10354 * linux-m68k-low.c (num_regs): Remove.
10355 (m68k_num_regs): Define.
10356 (m68k_regmap): Renamed from regmap, made static.
10357 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10359 (m68k_cannot_store_register): Renamed from cannot_store_register,
10361 (the_low_target): New.
10362 * linux-mips-low.c (num_regs): Remove.
10363 (mips_num_regs): Define.
10364 (mips_regmap): Renamed from regmap, made static.
10365 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10367 (mips_cannot_store_register): Renamed from cannot_store_register,
10369 (the_low_target): New.
10370 * linux-ppc-low.c (num_regs): Remove.
10371 (ppc_num_regs): Define.
10372 (ppc_regmap): Renamed from regmap, made static.
10373 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10375 (ppc_cannot_store_register): Renamed from cannot_store_register,
10377 (the_low_target): New.
10378 * linux-s390-low.c (num_regs): Remove.
10379 (s390_num_regs): Define.
10380 (s390_regmap): Renamed from regmap, made static.
10381 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10383 (s390_cannot_store_register): Renamed from cannot_store_register,
10385 (the_low_target): New.
10386 * linux-sh-low.c (num_regs): Remove.
10387 (sh_num_regs): Define.
10388 (sh_regmap): Renamed from regmap, made static.
10389 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10391 (sh_cannot_store_register): Renamed from cannot_store_register,
10393 (the_low_target): New.
10394 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10395 (the_low_target): New.
10397 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10399 * Makefile.in: Add stamp-h target.
10400 * configure.in: Create stamp-h.
10401 * configure: Regenerated.
10403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10405 * inferiors.c: New file.
10406 * target.c: New file.
10407 * target.h: New file.
10408 * Makefile.in: Add target.o and inferiors.o. Update
10410 * linux-low.c (inferior_pid): New static variable,
10411 moved from server.c.
10412 (linux_create_inferior): Renamed from create_inferior.
10413 Call add_inferior. Return 0 on success instead of a PID.
10414 (linux_attach): Renamed from myattach.
10415 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10416 (linux_thread_alive): Renamed from mythread_alive.
10417 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10419 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10420 (regsets_store_inferior_registers): Correct error message.
10421 Add missing ``return 0''.
10422 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10423 (linux_store_registers): Renamed from store_inferior_registers.
10424 (linux_read_memory): Renamed from read_inferior_memory.
10425 (linux_write_memory): Renamed from write_inferior_memory.
10426 (linux_target_ops): New structure.
10427 (initialize_low): Call set_target_ops ().
10428 * remote-utils.c (unhexify): New function.
10429 (hexify): New function.
10430 (input_interrupt): Send signals to ``signal_pid''.
10431 * server.c (inferior_pid): Remove.
10432 (start_inferior): Update create_inferior call.
10433 (attach_inferior): Call add_inferior.
10434 (handle_query): New function.
10435 (main): Call handle_query for `q' packets.
10436 * server.h: Include "target.h". Remove obsolete prototypes.
10437 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10439 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10441 * Makefile.in: Add WARN_CFLAGS. Update configury
10443 * configure.in: Check for <string.h>
10444 * configure: Regenerate.
10445 * config.in: Regenerate.
10446 * gdbreplay.c: Include needed system headers.
10447 (remote_open): Remove strchr prototype.
10448 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10449 * regcache.c (supply_register): Change buf argument to const void *.
10450 (supply_register_by_name): Likewise.
10451 (collect_register): Change buf argument to void *.
10452 (collect_register_by_name): Likewise.
10453 * regcache.h: Add missing prototypes.
10454 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10455 * server.c (handle_query): New function.
10456 (attached): New static variable, moved out of main.
10457 (main): Quiet longjmp clobber warnings.
10458 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10459 * utils.c (error): Remove NORETURN.