1 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4 * linux-low.c: Include filestuff.h.
5 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6 * lynx-low.c: Include filestuff.h.
7 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8 * server.c: Include filestuff.h.
9 (main): Call notice_open_fds.
10 * spu-low.c: Include filestuff.h.
11 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
15 * Makefile.in: Explain why ../target and ../nat are not
16 listed as include file search paths.
17 (linux-waitpid.o): New object file rule.
18 * configure.srv (srv_native_linux_obj): New variable.
19 Replace all occurrences of linux native object files with
20 $srv_native_linux_obj.
21 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
22 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
23 (linux_enable_event_reporting): Remove declaration.
24 (my_waitpid): Moved to common/linux-waitpid.c.
25 (linux_wait_for_event): Pass ptid when calling
26 linux_enable_event_reporting.
27 (linux_supports_tracefork_flag): Remove.
28 (linux_enable_event_reporting): Likewise.
29 (linux_tracefork_grandchild): Remove.
30 (STACK_SIZE): Moved to common/linux-ptrace.c.
31 (linux_tracefork_child): Remove.
32 (linux_test_for_tracefork): Remove.
33 (linux_look_up_symbols): Call linux_supports_traceclone.
34 (initialize_low): Remove call to linux_test_for_tracefork.
35 * linux-low.h (PTRACE_TYPE_ARG3): Move to
36 common/linux-ptrace.h.
37 (PTRACE_TYPE_ARG4): Likewise.
38 Include linux-ptrace.h.
40 2013-08-21 Pedro Alves <palves@redhat.com>
42 * config.in: Renegerate.
44 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
46 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
47 (SFILES): Remove $(srcdir)/common/target-common.c and
48 add $(srcdir)/target/waitstatus.c.
49 (OBS): Remove target-common.o and add waitstatus.o.
50 (server_h): Remove $(srcdir)/../common/target-common.h and
51 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
52 and $(srcdir)/../target/waitstatus.h.
53 (target-common.o): Remove.
54 (waitstatus.o): New target object file.
55 * target.h: Do not include target-common.h and
56 include target/resume.h, target/wait.h and
59 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
61 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
63 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
64 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
66 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
67 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
69 2013-07-27 Jie Zhang <jie@codesourcery.com>
70 Daniel Jacobowitz <dan@codesourcery.com>
71 Yao Qi <yao@codesourcery.com>
73 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
74 (mips-linux-watch.o): New rule.
75 (mips_linux_watch_h): New variable.
76 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
78 * linux-mips-low.c: Include mips-linux-watch.h.
79 (struct arch_process_info, struct arch_lwp_info): New.
80 (update_watch_registers_callback): New function.
81 (mips_linux_new_process, mips_linux_new_thread) New functions.
82 (mips_linux_prepare_to_resume, mips_insert_point): New
84 (mips_remove_point, mips_stopped_by_watchpoint): New
86 (rsp_bp_type_to_target_hw_bp_type): New function.
87 (mips_stopped_data_address): New function.
88 (the_low_target): Add watchpoint support functions.
90 2013-07-27 Yao Qi <yao@codesourcery.com>
92 * i386-low.c: Include break-common.h.
93 (enum target_hw_bp_type): Remove.
95 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
97 * Makefile.in (SFILES): /common/target-common.c.
98 (OBS): Add target-common.o.
99 (server_h): Add $(srcdir)/../common/target-common.h.
100 (target-common.o): New target.
101 * server.c (queue_stop_reply_callback): Free
102 status string after use.
103 * target.c (target_waitstatus_to_string): Remove.
104 * target.h: Include target-common.h.
105 (resume_kind): Likewise.
106 (target_waitkind): Likewise.
107 (target_waitstatus): Likewise.
108 (TARGET_WNOHANG): Likewise.
110 2013-07-04 Yao Qi <yao@codesourcery.com>
112 * Makefile.in (host_alias): Use @host_noncanonical@.
113 (target_alias): Use @target_noncanonical@.
114 * configure.ac: Use ACX_NONCANONICAL_TARGET and
115 ACX_NONCANONICAL_HOST.
116 * configure: Regenerated.
119 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
121 * configure.ac (version_host, version_target): Set and AC_SUBST them.
122 * configure: Rebuild.
123 * Makefile.in (version_host, version_target): Get from configure.
124 (version.c): Use $(version_host) and $(version_target).
126 2013-07-03 Pedro Alves <palves@redhat.com>
128 * Makefile.in (config.status): Depend on development.sh.
129 * acinclude.m4: Include libmcheck.m4.
130 * configure: Regenerate.
132 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
134 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
135 attribute inside the parentheses.
136 (winapi_DebugSetProcessKillOnExit): Ditto.
137 (winapi_DebugBreakProcess): Ditto.
138 (winapi_GenerateConsoleCtrlEvent): Ditto.
140 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
142 * notif.h (notif_event): Add a dummy member to avoid compiler
145 2013-07-01 Pedro Alves <palves@redhat.com>
147 * hostio.c (HOSTIO_PATH_MAX): Define.
148 (require_filename, handle_open, handle_unlink, handle_readlink):
151 2013-07-01 Pedro Alves <palves@redhat.com>
153 * server.h: Include "pathmax.h".
154 * linux-low.c: Don't include sys/param.h.
155 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
157 * win32-low.c: Don't include sys/param.h.
158 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
160 2013-07-01 Pedro Alves <palves@redhat.com>
162 * event-loop.c: Don't check HAVE_UNISTD_H before including
164 * gdbreplay.c: Likewise.
165 * remote-utils.c: Likewise.
166 * server.c: Likewise.
167 * configure.ac: Don't check for unistd.h.
168 * configure: Regenerate.
170 2013-06-28 Tom Tromey <tromey@redhat.com>
172 * Makefile.in (version.c): Use version.in, not
175 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
177 * configure.ac (version_host, version_target): Set and AC_SUBST them.
178 * configure: Rebuild.
179 * Makefile.in (version_host, version_target): Get from configure.
180 (version.c): Use $(version_host) and $(version_target).
182 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
184 Fix trace-status to output user name without trailing colon.
185 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
187 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
189 Fix trace-status to output proper start-time and stop-time.
190 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
191 output start time and stop time in hex as gdb expects.
193 2013-06-26 Pedro Alves <pedro@codesourcery.com>
195 * tracepoint.c (build_traceframe_info_xml): Output trace state
196 variables present in the trace buffer.
198 2013-06-24 Tom Tromey <tromey@redhat.com>
200 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
203 * gdbreplay.c: Include version.h.
204 (version, host_name): Don't declare.
205 * server.h: Include version.h.
206 (version, host_name): Don't declare.
208 2013-06-12 Pedro Alves <palves@redhat.com>
210 * linux-x86-low.c (linux_is_elf64): Delete global.
211 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
212 with local linux_pid_exe_is_elf_64_file use.
214 2013-06-11 Pedro Alves <palves@redhat.com>
216 * linux-low.c (regset_disabled, disable_regset): New functions.
217 (regsets_fetch_inferior_registers)
218 (regsets_store_inferior_registers): Use them.
219 (initialize_regsets_info); Don't allocate the disabled_regsets
221 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
224 2013-06-11 Pedro Alves <palves@redhat.com>
226 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
229 2013-06-11 Pedro Alves <palves@redhat.com>
231 * linux-x86-low.c (initialize_low_arch): Call
232 init_registers_x32_avx_linux.
234 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
236 Fix compatibility with Android Bionic.
237 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
240 2013-06-07 Pedro Alves <palves@redhat.com>
243 * Makefile.in (OBS): Add tdesc.o.
244 (IPA_OBJS): Add tdesc-ipa.o.
245 (tdesc-ipa.o): New rule.
246 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
248 * linux-low.c (new_inferior): Delete.
249 (disabled_regsets, num_regsets): Delete.
250 (linux_add_process): Adjust to set the new per-process
252 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
253 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
254 was a stop. When calling arch_setup, switch the current inferior
255 to the thread that got an event.
256 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
257 (regsets_fetch_inferior_registers)
258 (regsets_store_inferior_registers): New regsets_info parameter.
260 (linux_register_in_regsets): New regs_info parameter. Adjust to
262 (register_addr, fetch_register, store_register): New usrregs_info
263 parameter. Adjust to use it.
264 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
265 parameter regs_info. Adjust to use it.
266 (linux_fetch_registers): Get the current inferior's regs_info, and
268 (linux_store_registers): Ditto.
269 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
270 (initialize_low): Don't initialize the target_regsets here. Call
272 * linux-low.h (target_regsets): Delete declaration.
273 (struct regsets_info): New.
274 (struct usrregs_info): New.
275 (struct regs_info): New.
276 (struct process_info_private) <new_inferior>: New field.
277 (struct linux_target_ops): Delete the num_regs, regmap, and
278 regset_bitmap fields. New field regs_info.
279 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
280 * i387-fp.c (num_xmm_registers): Delete.
281 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
282 calls to new interface.
283 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
284 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
285 Infer the number of xmm registers from the regcache's target
287 * i387-fp.h (num_xmm_registers): Delete.
288 * inferiors.c (add_thread): Don't install the thread's regcache
290 * proc-service.c (gregset_info): Fetch the current inferior's
291 regs_info. Adjust to use it.
292 * regcache.c: Include tdesc.h.
293 (register_bytes, reg_defs, num_registers)
294 (gdbserver_expedite_regs): Delete.
295 (get_thread_regcache): If the thread doesn't have a regcache yet,
296 create one, instead of aborting gdbserver.
297 (regcache_invalidate_one): Rename to ...
298 (regcache_invalidate_thread): ... this.
299 (regcache_invalidate_one): New.
300 (regcache_invalidate): Only invalidate registers of the current
302 (init_register_cache): Add target_desc parameter, and use it.
303 (new_register_cache): Ditto. Assert the target description has a
304 non zero registers_size.
305 (regcache_cpy): Add assertions. Adjust.
306 (realloc_register_cache, set_register_cache): Delete.
307 (registers_to_string, registers_from_string): Adjust.
308 (find_register_by_name, find_regno, find_register_by_number)
309 (register_cache_size): Add target_desc parameter, and use it.
310 (free_register_cache_thread, free_register_cache_thread_one)
311 (regcache_release, register_cache_size): New.
312 (register_size): Add target_desc parameter, and use it.
313 (register_data, supply_register, supply_register_zeroed)
314 (supply_regblock, supply_register_by_name, collect_register)
315 (collect_register_as_string, collect_register_by_name): Adjust.
316 * regcache.h (struct target_desc): Forward declare.
317 (struct regcache) <tdesc>: New field.
318 (init_register_cache, new_register_cache): Add target_desc
320 (regcache_invalidate_thread): Declare.
321 (regcache_invalidate_one): Delete declaration.
322 (regcache_release): Declare.
323 (find_register_by_number, register_cache_size, register_size)
324 (find_regno): Add target_desc parameter.
325 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
327 * remote-utils.c: Include tdesc.h.
328 (outreg, prepare_resume_reply): Adjust.
329 * server.c: Include tdesc.h.
330 (gdbserver_xmltarget): Delete declaration.
331 (get_features_xml, process_serial_event): Adjust.
332 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
334 (struct process_info) <tdesc>: New field.
335 (ipa_tdesc): Declare.
338 * tracepoint.c: Include tdesc.h.
339 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
340 (get_context_regcache): Adjust to pass ipa_tdesc down.
341 (do_action_at_tracepoint): Adjust to get the register cache size
342 from the context regcache's description.
343 (traceframe_walk_blocks): Adjust to get the register cache size
344 from the current trace frame's description.
345 (traceframe_get_pc): Adjust to get current trace frame's
346 description and pass it down.
347 (gdb_collect): Adjust to get the register cache size from the
349 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
350 (gdbserver_xmltarget): Delete.
351 (initialize_low_tracepoint): Set the ipa's target description.
352 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
353 (initialize_low_tracepoint): Set the ipa's target description.
354 * linux-x86-low.c: Include tdesc.h.
355 [__x86_64__] (is_64bit_tdesc): New.
356 (ps_get_thread_area, x86_get_thread_area): Use it.
357 (i386_cannot_store_register): Rename to ...
358 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
359 (i386_cannot_fetch_register): Rename to ...
360 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
361 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
363 (target_regsets): Rename to ...
364 (x86_regsets): ... this.
365 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
367 (x86_siginfo_fixup): Use is_64bit_tdesc.
368 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
369 (tdesc_x32_avx_linux, tdesc_x32_linux)
370 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
372 (x86_linux_update_xmltarget): Delete.
373 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
374 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
375 (AMD64_LINUX_USER64_CS): New.
376 (x86_linux_read_description): New, based on
377 x86_linux_update_xmltarget.
378 (same_process_callback): New.
379 (x86_arch_setup_process_callback): New.
380 (x86_linux_update_xmltarget): New.
381 (x86_regsets_info): New.
382 (amd64_linux_regs_info): New.
383 (i386_linux_usrregs_info): New.
384 (i386_linux_regs_info): New.
385 (x86_linux_regs_info): New.
386 (x86_arch_setup): Reimplement.
387 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
388 (x86_emit_ops): Ditto.
389 (the_low_target): Adjust. Install x86_linux_regs_info,
390 x86_cannot_fetch_register, and x86_cannot_store_register.
391 (initialize_low_arch): New.
392 * linux-ia64-low.c (tdesc_ia64): Declare.
393 (ia64_fetch_register): Adjust.
394 (ia64_usrregs_info, regs_info): New globals.
395 (ia64_regs_info): New function.
396 (the_low_target): Adjust.
397 (initialize_low_arch): New function.
398 * linux-sparc-low.c (tdesc_sparc64): Declare.
399 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
401 (sparc_arch_setup): New function.
402 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
403 (the_low_target): Adjust.
404 (initialize_low_arch): New function.
405 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
406 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
407 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
408 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
409 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
410 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
411 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
412 (tdesc_powerpc_isa205_vsx64l): Declare.
413 (ppc_cannot_store_register, ppc_collect_ptrace_register)
414 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
415 (ppc_set_pc, ppc_get_hwcap): Adjust.
416 (ppc_usrregs_info): Forward declare.
417 (!__powerpc64__) ppc_regmap_adjusted: New global.
418 (ppc_arch_setup): Adjust to the current process'es target
420 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
421 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
422 (ppc_store_evrregset): Adjust.
423 (target_regsets): Rename to ...
424 (ppc_regsets): ... this, and make static.
425 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
426 (ppc_regs_info): New function.
427 (the_low_target): Adjust.
428 (initialize_low_arch): New function.
429 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
430 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
431 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
432 (tdesc_s390x_linux64v2): Declare.
433 (s390_collect_ptrace_register, s390_supply_ptrace_register)
434 (s390_fill_gregset, s390_store_last_break): Adjust.
435 (target_regsets): Rename to ...
436 (s390_regsets): ... this, and make static.
437 (s390_get_pc, s390_set_pc): Adjust.
438 (s390_get_hwcap): New target_desc parameter, and use it.
439 [__s390x__] (have_hwcap_s390_high_gprs): New global.
440 (s390_arch_setup): Adjust to set the current process'es target
441 description. Don't adjust the regmap.
442 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
443 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
444 (regs_info_3264): New globals.
445 (s390_regs_info): New function.
446 (the_low_target): Adjust.
447 (initialize_low_arch): New function.
448 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
449 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
450 [__mips64] (init_registers_mips_linux)
451 (init_registers_mips_dsp_linux): Delete defines.
452 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
453 (have_dsp): New global.
454 (mips_read_description): New, based on mips_arch_setup.
455 (mips_arch_setup): Reimplement.
456 (get_usrregs_info): New function.
457 (mips_cannot_fetch_register, mips_cannot_store_register)
458 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
459 (mips_fill_fpregset, mips_store_fpregset): Adjust.
460 (target_regsets): Rename to ...
461 (mips_regsets): ... this, and make static.
462 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
463 (dsp_regs_info, regs_info): New globals.
464 (mips_regs_info): New function.
465 (the_low_target): Adjust.
466 (initialize_low_arch): New function.
467 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
468 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
470 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
471 (arm_read_description): New, with bits factored from
473 (arm_arch_setup): Reimplement.
474 (target_regsets): Rename to ...
475 (arm_regsets): ... this, and make static.
476 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
477 (arm_regs_info): New function.
478 (the_low_target): Adjust.
479 (initialize_low_arch): New function.
480 * linux-m68k-low.c (tdesc_m68k): Declare.
481 (target_regsets): Rename to ...
482 (m68k_regsets): ... this, and make static.
483 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
484 (m68k_regs_info): New function.
485 (m68k_arch_setup): New function.
486 (the_low_target): Adjust.
487 (initialize_low_arch): New function.
488 * linux-sh-low.c (tdesc_sharch): Declare.
489 (target_regsets): Rename to ...
490 (sh_regsets): ... this, and make static.
491 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
492 (sh_regs_info, sh_arch_setup): New functions.
493 (the_low_target): Adjust.
494 (initialize_low_arch): New function.
495 * linux-bfin-low.c (tdesc_bfin): Declare.
496 (bfin_arch_setup): New function.
497 (bfin_usrregs_info, regs_info): New globals.
498 (bfin_regs_info): New function.
499 (the_low_target): Adjust.
500 (initialize_low_arch): New function.
501 * linux-cris-low.c (tdesc_cris): Declare.
502 (cris_arch_setup): New function.
503 (cris_usrregs_info, regs_info): New globals.
504 (cris_regs_info): New function.
505 (the_low_target): Adjust.
506 (initialize_low_arch): New function.
507 * linux-cris-low.c (tdesc_crisv32): Declare.
508 (cris_arch_setup): New function.
509 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
510 (cris_regs_info): New function.
511 (the_low_target): Adjust.
512 (initialize_low_arch): New function.
513 * linux-m32r-low.c (tdesc_m32r): Declare.
514 (m32r_arch_setup): New function.
515 (m32r_usrregs_info, regs_info): New globals.
516 (m32r_regs_info): Adjust.
517 (initialize_low_arch): New function.
518 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
519 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
520 (tic6x_usrregs_info): Forward declare.
521 (tic6x_read_description): New function, based on ...
522 (tic6x_arch_setup): ... this. Reimplement.
523 (target_regsets): Rename to ...
524 (tic6x_regsets): ... this, and make static.
525 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
526 (tic6x_regs_info): New function.
527 (the_low_target): Adjust.
528 (initialize_low_arch): New function.
529 * linux-xtensa-low.c (tdesc_xtensa): Declare.
530 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
531 (target_regsets): Rename to ...
532 (xtensa_regsets): ... this, and make static.
533 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
535 (xtensa_arch_setup, xtensa_regs_info): New functions.
536 (the_low_target): Adjust.
537 (initialize_low_arch): New function.
538 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
539 (nios2_arch_setup): Set the current process'es tdesc.
540 (target_regsets): Rename to ...
541 (nios2_regsets): ... this.
542 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
543 (nios2_regs_info): New function.
544 (the_low_target): Adjust.
545 (initialize_low_arch): New function.
546 * linux-aarch64-low.c (tdesc_aarch64): Declare.
547 (aarch64_arch_setup): Set the current process'es tdesc.
548 (target_regsets): Rename to ...
549 (aarch64_regsets): ... this.
550 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
551 (aarch64_regs_info): New function.
552 (the_low_target): Adjust.
553 (initialize_low_arch): New function.
554 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
556 (target_regsets): Rename to ...
557 (tile_regsets): ... this.
558 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
559 (tile_regs_info): New function.
560 (tile_arch_setup): Set the current process'es tdesc.
561 (the_low_target): Adjust.
562 (initialize_low_arch): New function.
563 * spu-low.c (tdesc_spu): Declare.
564 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
565 * win32-arm-low.c (tdesc_arm): Declare.
566 (arm_arch_setup): New function.
567 (the_low_target): Install arm_arch_setup instead of
569 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
570 (init_windows_x86): Rename to ...
571 (i386_arch_setup): ... this. Set `win32_tdesc'.
572 (the_low_target): Adjust.
573 * win32-low.c (win32_tdesc): New global.
574 (child_add_thread): Don't create the thread cache here.
575 (do_initial_child_stuff): Set the new process'es tdesc.
576 * win32-low.h (struct target_desc): Forward declare.
577 (win32_tdesc): Declare.
578 * lynx-i386-low.c (tdesc_i386): Declare global.
579 (lynx_i386_arch_setup): Set `lynx_tdesc'.
580 * lynx-low.c (lynx_tdesc): New global.
581 (lynx_add_process): Set the new process'es tdesc.
582 * lynx-low.h (struct target_desc): Forward declare.
583 (lynx_tdesc): Declare global.
584 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
585 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
586 * nto-low.c (nto_tdesc): New global.
587 (do_attach): Set the new process'es tdesc.
588 * nto-low.h (struct target_desc): Forward declare.
589 (nto_tdesc): Declare.
590 * nto-x86-low.c (tdesc_i386): Declare.
591 (nto_x86_arch_setup): Set `nto_tdesc'.
593 2013-06-04 Gary Benson <gbenson@redhat.com>
595 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
596 to qSupported response when appropriate.
597 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
598 with nonzero-length annex.
599 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
600 arguments supplied in annex.
602 2013-05-31 Doug Evans <dje@google.com>
605 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
606 64 bits in 64-cross-32 environment.
608 2013-05-28 Pedro Alves <palves@redhat.com>
610 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
611 (aarch64-without-fpu.c): Delete rule.
612 * configure.srv (aarch64*-*-linux*): Remove references to
613 aarch64-without-fpu.o and aarch64-without-fpu.xml.
614 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
617 2013-05-24 Pedro Alves <palves@redhat.com>
619 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
620 instead of strchr/decode_address. Error if the range isn't split
621 with a ','. Don't assume there's be a ':' in the action.
623 2013-05-23 Yao Qi <yao@codesourcery.com>
624 Pedro Alves <palves@redhat.com>
626 * linux-low.c (lwp_in_step_range): New function.
627 (linux_wait_1): If the thread was range stepping and stopped
628 outside the stepping range, report the stop to GDB. Otherwise,
629 continue stepping. Add range stepping debug output.
630 (linux_set_resume_request): Copy the step range from the resume
632 (linux_supports_range_stepping): New.
633 (linux_target_ops) <supports_range_stepping>: Set to
634 linux_supports_range_stepping.
635 * linux-low.h (struct linux_target_ops)
636 <supports_range_stepping>: New field.
637 (struct lwp_info) <step_range_start, step_range_end>: New fields.
638 * linux-x86-low.c (x86_supports_range_stepping): New.
639 (the_low_target) <supports_range_stepping>: Set to
640 x86_supports_range_stepping.
641 * server.c (handle_v_cont): Handle 'r' action.
642 (handle_v_requests): Append ";r" if the target supports range
644 * target.h (struct thread_resume) <step_range_start,
645 step_range_end>: New fields.
646 (struct target_ops) <supports_range_stepping>:
648 (target_supports_range_stepping): New macro.
650 2013-05-17 Joel Brobecker <brobecker@adacore.com>
652 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
653 confusion in comment.
655 2013-05-17 Joel Brobecker <brobecker@adacore.com>
657 * lynx-low.c (struct process_info_private): New type.
658 (lynx_add_process): New function.
659 (lynx_create_inferior, lynx_attach): Replace calls to
660 add_process by calls to lynx_add_process.
661 (lynx_resume): If PTID is null, then try using
662 current_process()->private->last_wait_event_ptid.
664 (lynx_clear_inferiors): Delete. The contents of that function
665 has been inlined in lynx_mourn;
666 (lynx_wait_1): Save the ptid in the process's private data.
667 (lynx_mourn): Free the process' private data. Replace call
668 to lynx_clear_inferiors by call to clear_inferiors.
670 2013-05-17 Yao Qi <yao@codesourcery.com>
672 * i386-low.c (i386_length_and_rw_bits): Move the comment to
675 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
677 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
678 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
679 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
680 PT_TEXT_END_ADDR guards. Update comments.
681 (linux_target_op) <read_offsets>: Conditionally define to
682 linux_read_offsets if the target is UCLIBC and if it defines
683 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
685 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
686 Andrew Jenner <andrew@codesourcery.com>
688 * Makefile.in (SFILES): Add linux-nios2-low.c.
689 (clean): Add action to delete nios2-linux.c.
690 (nios2-linux.c): New rule.
691 * configure.srv: Add nios2*-*-linux*.
692 * linux-nios2-low.c: New.
694 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
696 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
698 2013-04-25 Hui Zhu <hui@codesourcery.com>
701 * ax.c (ax_printf): Add fflush.
703 2013-04-22 Tom Tromey <tromey@redhat.com>
705 * Makefile.in (SFILES): Add filestuff.c.
706 (OBS): Add filestuff.o.
707 (filestuff.o): New target.
708 * config.in, configure: Rebuild.
709 * configure.ac: Check for fdwalk, pipe2.
711 2013-04-17 Pedro Alves <palves@redhat.com>
713 * configure.ac (USE_THREAD_DB): Delete variable.
714 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
715 Don't AC_SUBST USE_THREAD_DB.
716 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
717 * config.in, configure: Regenerate.
719 2013-04-16 Pedro Alves <palves@redhat.com>
721 * linux-low.h (struct lwp_info) <thread_known>: Move under
722 the USE_THREAD_DB #ifdef.
724 2013-04-16 Pedro Alves <palves@redhat.com>
726 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
727 (linux-low.o): Delete rule.
728 * linux-low.h: Always include "gdb_thread_db.h" instead of
729 conditionally including thread_db.h.
730 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
733 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
735 * Makefile.in (install-only): Fix make install regression.
737 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
739 Convert man pages to texinfo, new gdbinit.5 texinfo page.
740 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
742 * gdbserver.1: Remove.
744 2013-03-22 Pedro Alves <palves@redhat.com>
746 * linux-low.c (handle_extended_wait): Don't call
747 linux_enable_event_reporting.
749 2013-03-15 Tony Theodore <tonyt@logyst.com>
752 * Makefile.in (SHELL): Use @SHELL@.
754 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
756 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
759 2013-03-13 Joel Brobecker <brobecker@adacore.com>
761 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
762 Remove extraneous NULL element.
764 2013-03-13 Yao Qi <yao@codesourcery.com>
766 * tracepoint.c (traceframe_read_tsv): Look for the last matched
767 'V' block in trace frame.
769 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
771 * target.h (struct target_ops): Add btrace ops.
772 (target_supports_btrace): New macro.
773 (target_enable_btrace): New macro.
774 (target_disable_btrace): New macro.
775 (target_read_btrace): New macro.
776 * gdbthread.h (struct thread_info): Add btrace field.
777 * server.c: Include btrace-common.h.
778 (handle_btrace_general_set): New function.
779 (handle_btrace_enable): New function.
780 (handle_btrace_disable): New function.
781 (handle_general_set): Call handle_btrace_general_set.
782 (handle_qxfer_btrace): New function.
783 (struct qxfer qxfer_packets[]): Add btrace entry.
784 * inferiors.c (remove_thread): Disable btrace.
785 * linux-low: Include linux-btrace.h.
786 (linux_low_enable_btrace): New function.
787 (linux_low_read_btrace): New function.
788 (linux_target_ops): Add btrace ops.
789 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
790 Add srv_linux_btrace=yes.
791 (x86_64-*-linux*): Add linux-btrace.o.
792 Add srv_linux_btrace=yes.
793 * configure.ac: Define HAVE_LINUX_BTRACE.
794 * config.in: Regenerated.
795 * configure: Regenerated.
797 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
799 * server.c (handle_qxfer): Preserve error message if -3 is
801 (qxfer): Document the -3 return value.
803 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
805 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
806 (linux_btrace_h): New variable.
807 (linux-btrace.o): New rule.
809 2013-03-08 Stan Shebs <stan@codesourcery.com>
810 Hafiz Abid Qadeer <abidh@codesourcery.com>
812 * tracepoint.c (trace_buffer_size): New global.
813 (DEFAULT_TRACE_BUFFER_SIZE): New define.
814 (init_trace_buffer): Change to one-argument function. Allocate
816 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
817 handle QTBuffer:size packet.
818 (cmd_bigqtbuffer_size): New function.
819 (initialize_tracepoint): Call init_trace_buffer with
820 DEFAULT_TRACE_BUFFER_SIZE.
821 * server.c (handle_query): Add QTBuffer:size in the
824 2013-03-07 Yao Qi <yao@codesourcery.com>
826 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
827 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
829 (cmd_qtsp): Adjust condition. Do post increment.
830 Set cur_action and cur_step_action back to 0.
832 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
835 * linux-low.c (linux_write_memory): Return early success if LEN is
838 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
840 * configure.srv: Add x86_64-*-cygwin* as target.
842 2013-02-28 Tom Tromey <tromey@redhat.com>
844 * configure.ac: Invoke AC_SYS_LARGEFILE.
845 * configure, config.in: Rebuild.
847 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
849 * win32-low.c: Throughout, fix format strings and casts of
850 printf-like functions to avoid type related warnings on all
852 (get_child_debug_event): Print dwDebugEventCode as hex since
853 that's how it's usually documented.
855 2013-02-28 Yao Qi <yao@codesourcery.com>
857 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
860 2013-02-27 Jiong Wang <jiwang@tilera.com>
862 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
863 (reg-tilegx32.c): New rule.
864 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
865 * linux-tile-low.c (tile_arch_setup): New function. Invoke
866 different register info initializer according to elf class.
867 (init_registers_tilgx32): New function. The tilegx32 register info
869 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
870 (tile_store_gregset): Likewise.
872 2013-02-27 Yao Qi <yao@codesourcery.com>
874 * server.c (process_point_options): Print debug message when
875 debug_threads is true.
877 2013-02-26 Yao Qi <yao@codesourcery.com>
879 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
881 2013-02-19 Pedro Alves <palves@redhat.com>
882 Kai Tietz <ktietz@redhat.com>
886 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
887 instead of strtoul to extract address from packet.
888 (process_serial_event) <'z'>: Likewise.
890 2013-02-18 Yao Qi <yao@codesourcery.com>
892 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
894 2013-02-14 Pedro Alves <palves@redhat.com>
898 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
899 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
901 2013-02-14 Pedro Alves <palves@redhat.com>
903 * tracepoint.c (cmd_qtdpsrc): Use savestring.
905 2013-02-14 Pedro Alves <palves@redhat.com>
907 * tracepoint.c (save_string): Delete.
908 (add_tracepoint_action): Use savestring instead of save_string.
910 2013-02-12 Pedro Alves <palves@redhat.com>
912 * linux-xtensa-low.c: Ditto.
913 * xtensa-xtregs.c: Ditto.
915 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
917 * thread-db.c (thread_db_get_tls_address): NULL pointer check
920 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
922 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
923 aarch64_num_wp_regs and aarch64_num_bp_regs to
924 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
926 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
928 * linux-aarch64-low.c (ps_get_thread_area): Replace
929 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
931 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
932 Marcus Shawcroft <marcus.shawcroft@arm.com>
933 Nigel Stephens <nigel.stephens@arm.com>
934 Yufeng Zhang <yufeng.zhang@arm.com>
936 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
937 (aarch64.c, aarch64-without-fpu.c): New targets.
938 * configure.srv (aarch64*-*-linux*): New.
939 * linux-aarch64-low.c: New file.
941 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
943 * linux-low.c (handle_extended_wait, linux_create_inferior)
944 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
945 (dequeue_one_deferred_signal, linux_resume_one_thread)
946 (fetch_register, linux_write_memory, linux_enable_event_reporting)
947 (linux_tracefork_grandchild, linux_test_for_tracefork)
948 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
949 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
950 where the argument is 0.
952 2013-01-25 Yao Qi <yao@codesourcery.com>
954 * event-loop.c: Include "queue.h".
955 (gdb_event_p): New typedef.
956 (struct gdb_event) <next_event>: Remove.
957 (event_queue): Change to QUEUE(gdb_event_p).
958 (async_queue_event): Remove.
959 (gdb_event_xfree): New.
960 (initialize_event_loop): New.
961 (process_event): Use API from QUEUE.
962 (wait_for_event): Likewise.
963 * server.c (main): Call initialize_event_loop.
964 * server.h (initialize_event_loop): Declare.
966 2013-01-18 Yao Qi <yao@codesourcery.com>
968 * ax.h (struct eval_agent_expr_context): New.
969 (gdb_eval_agent_expr): Update declaration.
970 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
971 TFRAME. Add new argument CTX.
972 * server.h (struct eval_agent_expr_context): Declare.
973 (agent_mem_read, agent_tsv_read): Update declaration.
974 (agent_mem_read_string): Likewise.
975 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
976 (add_traceframe_block): Add new argument TPOINT.
977 Increase TPOINT->traceframe_usage.
978 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
979 eval_tracepoint_agent_expr.
980 (condition_true_at_tracepoint): Likewise.
981 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
982 (agent_mem_read_string, agent_tsv_read): Likewise.
984 2013-01-16 Yao Qi <yao@codesourcery.com>
986 * linux-low.c (linux_resume_one_lwp): Don't check
987 'lwp->bp_reinsert != 0'.
989 2013-01-07 Joel Brobecker <brobecker@adacore.com>
990 Pedro Alves <palves@redhat.com>
992 * lynx-low.c (ptrace_request_to_str): Define a temporary
993 macro and use it to simplify this function's implementation.
995 2013-01-07 Joel Brobecker <brobecker@adacore.com>
997 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1000 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1002 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1004 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1006 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1008 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1010 * lynx-low.c (lynx_resume): Use the resume_info parameter
1011 to determine the ptid for the lynx_ptrace call, unless
1012 it is equal to minus_one_ptid, in which case we use the
1013 ptid of the current_inferior.
1014 (lynx_wait_1): After having received a thread create/exit
1015 event, resume the inferior's execution using the signaling
1016 thread's ptid, rather than the old ptid.
1018 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1020 * lynx-low.c (lynx_resume): Delete variable ret.
1022 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1024 * gdbreplay.c (gdbreplay_version): Update copyright year.
1025 * server.c (gdbserver_version): Likewise.
1027 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1029 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1032 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1034 * lynx-low.c (ptrace_request_to_str): Add handling for
1037 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1039 * lynx-low.c (lynx_attach): Delete variable new_process.
1041 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1043 * lynx-low.c (lynx_create_inferior): Delete variable
1046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1048 * lynx-low.c (ptrace_request_to_str): Do not handle
1049 PTRACE_GETTHREADLIST if this macro does not exist.
1051 2012-12-15 Yao Qi <yao@codesourcery.com>
1053 * Makefile.in (OBS): Add notif.o.
1054 * notif.c, notif.h: New.
1055 * server.c: Include "notif.h".
1056 (struct vstop_notif) <next>: Remove.
1058 (queue_stop_reply): Update.
1059 (push_event, send_next_stop_reply): Remove.
1060 (discard_queued_stop_replies): Update.
1061 (notif_stop): New variable.
1062 (handle_v_stopped): Remove.
1063 (handle_v_requests): Don't call handle_v_stopped. Call
1064 handle_ack_notif instead.
1065 (queue_stop_reply_callback): Call notif_event_enque instead
1066 of queue_stop_reply.
1067 (handle_status): Don't call send_next_stop_reply, call
1068 notif_write_event instead.
1069 (kill_inferior_callback): Likewise.
1070 (detach_or_kill_inferior_callback): Likewise.
1071 (main): Call initialize_notif.
1072 (process_serial_event): Call QUEUE_is_empty.
1073 (handle_target_event): Call notif_push instead of push event.
1074 * server.h (push_event): Remove declaration.
1076 2012-12-10 Tom Tromey <tromey@redhat.com>
1078 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1079 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1082 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1083 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1084 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1085 (amd64-linux-ipa.o, ax.o): Rewrite.
1086 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1087 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1088 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1089 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1090 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1091 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1092 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1093 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1094 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1095 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1096 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1097 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1098 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1099 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1100 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1101 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1102 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1103 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1104 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1105 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1106 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1107 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1108 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1109 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1110 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1111 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1112 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1113 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1114 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1115 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1116 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1117 (reg-tilegx.o): Remove.
1118 (all_object_files): New macro.
1119 Include .deps files.
1120 * aclocal.m4, configure: Rebuild.
1121 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1122 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1123 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1125 2012-12-05 Tom Tromey <tromey@redhat.com>
1128 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1130 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1132 * configure.ac: Check for linux/perf_event.h.
1133 * config.in: Regenerated.
1134 * configure: Regenerated.
1136 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1138 * hostio.c (handle_readlink): Decrease buffer size
1139 parameter passed to readlink by one byte.
1141 2012-11-26 Yao Qi <yao@codesourcery.com>
1143 * configure.ac (build_warnings): Append '-Wempty-body'.
1144 * configure: Regenerated.
1145 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1148 2012-11-15 Pierre Muller <muller@sourceware.org>
1150 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1151 * config.in: Regenerate.
1152 * configure: Regenerate.
1153 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1154 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1155 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1156 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1158 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1159 instead of <sys/wait.h> header.
1160 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1162 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1164 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1165 (various make rules): Remove -DGDBSERVER
1167 2012-11-09 Yao Qi <yao@codesourcery.com>
1169 * spu-low.c (current_ptid): Move it to ..
1170 * gdbthread.h: ... here. New.
1171 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1172 * server.c (myresume, process_serial_event): Likewise.
1173 * thread-db.c (thread_db_find_new_threads): Likewise.
1174 * tracepoint.c (run_inferior_command): Likewise.
1176 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1178 * server.c (handle_search_memory_1): Include access length in
1181 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1183 * linux-crisv32-low.c: Fix compile errors.
1185 2012-09-04 Yao Qi <yao@codesourcery.com>
1187 * tracepoint.c (cmd_qtsv): Adjust debug message.
1188 Don't check CUR_TPOINT.
1190 2012-08-28 Yao Qi <yao@codesourcery.com>
1192 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1193 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1194 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1195 Remove declarations of xmalloc, xreallloc, xstrdup and
1197 * Makefile.in (libiberty_h): New.
1198 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1199 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1201 2012-08-23 Yao Qi <yao@codesourcery.com>
1203 * server.h: Remove declaration of 'xsnprintf'.
1205 2012-08-22 Keith Seitz <keiths@redhat.com>
1207 * server.h: Include build-gnulib-gbserver/config.h.
1208 * gdbreplay.c: Likewise.
1210 2012-08-08 Doug Evans <dje@google.com>
1212 * Makefile.in (SFILES): Add gdb_vecs.c.
1213 (OBS): Add gdb_vecs.o.
1214 (gdb_vecs_h, host_defs_h): New variables.
1215 (thread-db.o): Add $(gdb_vecs_h) dependency.
1216 (gdb_vecs.o): New rule.
1217 * thread-db.c: #include "gdb_vecs.h".
1218 (thread_db_load_search): Use a vector to iterate over path elements.
1219 Handle text appearing after "$pdir".
1221 * configure.ac: Add check for strstr.
1222 * config.in: Regenerate.
1223 * configure: Regenerate.
1225 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1227 * hostio.c (handle_pread): If pread fails, fall back to attempting
1229 (handle_pwrite): Likewise for pwrite.
1231 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1233 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1234 between unsupported TYPE and unimplementable ADDR/LEN combination.
1235 (arm_insert_point): Act on new return value.
1237 2012-07-31 Pedro Alves <palves@redhat.com>
1239 * server.c (process_point_options): Only skip tokens if we find
1240 one that is unrecognized. Don't treat 'X' specially while
1241 skipping unrecognized tokens.
1243 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1245 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1246 to 4-byte-align HW breakpoint addresses for Thumb.
1248 2012-07-27 Yao Qi <yao@codesourcery.com>
1252 * server.h: Declare gdb_agent_about_to_close.
1253 * target.c (kill_inferior): Include "agent.h".
1254 New. Send command 'kill'.
1255 * target.h (kill_inferior): Removed macro.
1256 * tracepoint.c (gdb_agent_about_to_close): New.
1257 (gdb_agent_helper_thread): Handle command 'close'.
1258 Wait endlessly until the inferior stops.
1259 Install gdb_agent_remove_socket to atexit hook.
1260 (agent_socket_name): New static variable.
1261 (gdb_agent_socket_init): Replace local variable 'name' with
1262 'agent_socket_name'.
1263 (gdb_agent_remove_socket): New.
1265 2012-07-27 Yao Qi <yao@codesourcery.com>
1267 * server.c (process_point_options): Stop at 'X' when parsing.
1269 2012-07-19 Michael Eager <eager@eagercon.com>
1271 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1273 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1274 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1275 hardware breakpoint.
1277 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1279 * gdbserver/linux-low.c (initialize_low): Call
1280 linux_ptrace_init_warnings.
1282 2012-07-02 Doug Evans <dje@google.com>
1284 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1287 2012-07-02 Stan Shebs <stan@codesourcery.com>
1289 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1290 (ax.o): Add it to build rule.
1292 (OBS): Add format.o.
1293 (IPA_OBS): Add format.o.
1294 * server.c (handle_query): Claim support for breakpoint commands.
1295 (process_point_options): Add command case.
1296 (process_serial_event): Leave running if there are printfs in
1298 * mem-break.h (any_persistent_commands): Declare.
1299 (add_breakpoint_commands): Declare.
1300 (gdb_no_commands_at_breakpoint): Declare.
1301 (run_breakpoint_commands): Declare.
1302 * mem-break.c (struct point_command_list): New struct.
1303 (struct breakpoint): New field command_list.
1304 (any_persistent_commands): New function.
1305 (add_commands_to_breakpoint): New function.
1306 (add_breakpoint_commands): New function.
1307 (gdb_no_commands_at_breakpoint): New function.
1308 (run_breakpoint_commands): New function.
1309 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1311 * ax.c: Include format.h.
1312 (ax_printf): New function.
1313 (gdb_eval_agent_expr): Add printf opcode.
1315 2012-06-13 Yao Qi <yao@codesourcery.com>
1317 * server.c (start_inferior): Remove duplicated writes to fields
1318 'last_resume_kind' and 'last_status' of 'current_inferior'.
1320 2012-06-12 Yao Qi <yao@codesourcery.com>
1321 Pedro Alves <palves@redhat.com>
1323 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1325 * server.c (handle_v_cont): Extend comment.
1327 2012-06-11 Yao Qi <yao@codesourcery.com>
1329 * linux-low.c (linux_attach): Add 'static'.
1331 2012-06-06 Yao Qi <yao@codesourcery.com>
1333 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1335 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1337 Fix gcc -flto compilation warning.
1338 * server.c (main): Make variable multi_mode and attach volatile.
1340 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1342 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1343 if the platform doesn't know about it.
1345 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1347 * Makefile.in (SFILES): Add linux-tile-low.c.
1348 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1349 * configure.srv: Handle tilegx-*-linux*.
1350 * linux-tile-low.c: New file.
1352 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1354 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1356 2012-05-24 Pedro Alves <palves@redhat.com>
1360 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1362 2012-05-24 Pedro Alves <palves@redhat.com>
1366 Replace target_signal with gdb_signal throughout.
1368 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1370 * linux-low.c (linux_store_registers): Avoid the copying sequence
1371 when no data has been retrieved by ptrace.
1373 2012-05-22 Will Deacon <will.deacon@arm.com>
1375 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1376 Include asm/ptrace.h.
1377 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1380 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1382 * linux-low.c (linux_store_registers): Don't re-retrieve data
1383 with ptrace that has already been obtained from /proc. Always
1384 copy any data retrieved with ptrace to the buffer supplied.
1386 2012-05-11 Yao Qi <yao@codesourcery.com>
1387 Pedro Alves <palves@redhat.com>
1389 * linux-low.c (enum stopping_threads_kind): New.
1390 (stopping_threads): Change type to `enum stopping_threads_kind'.
1391 (handle_extended_wait): If stopping and suspending threads, leave
1392 the new_lwp suspended too.
1393 (linux_wait_for_event): Adjust.
1394 (stop_all_lwps): Set `stopping_threads' to
1395 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1396 whether we're suspending threads or just stopping them. Assert no
1399 2012-04-29 Yao Qi <yao@codesourcery.com>
1401 * server.h: Move some code to ...
1402 * gdbthread.h: ... here. New.
1403 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1404 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1405 (nto-low.o, win32-low.o): Likewise.
1406 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1407 * regcache.c, remote-utils.c, server.c: Likewise.
1408 * target.c, tracepoint.c, win32-low.c: Likewise.
1410 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1412 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1413 (PTRACE_ARG4_TYPE): Likewise.
1414 (PTRACE_XFER_TYPE): Likewise.
1415 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1416 ptrace to PTRACE_ARG3_TYPE.
1417 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1418 (PTRACE_ARG4_TYPE): Likewise.
1419 (PTRACE_XFER_TYPE): Likewise.
1420 (linux_detach_one_lwp): Cast fourth argument of
1421 ptrace to long then PTRACE_ARG4_TYPE.
1422 (regsets_fetch_inferior_registers): Cast third argument of
1423 ptrace to long then PTRACE_ARG3_TYPE.
1424 (regsets_store_inferior_registers): Likewise.
1426 2012-04-20 Pedro Alves <palves@redhat.com>
1428 * configure: Regenerate.
1430 2012-04-19 Pedro Alves <palves@redhat.com>
1432 * Makefile.in (GNULIB_BUILDDIR): New.
1433 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1434 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1435 (all, install-only, uninstall, clean-info, all-lib, clean): No
1436 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1437 (maintainer-clean realclean distclean): Use subdir_do.
1439 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1440 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1441 * acinclude.m4: Include acx_configure_dir.m4.
1442 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1443 calls. Call AC_PROG_RANLIB. Configure gnulib using
1446 (GNULIB_STDINT_H): Adjust.
1447 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1448 * gdbreplay.c: Include build-gnulib/config.h.
1449 * server.h: Likewise.
1450 * aclocal.m4: Regenerate.
1451 * config.in: Regenerate.
1452 * configure: Regenerate.
1454 2012-04-19 Pedro Alves <palves@redhat.com>
1456 * Makefile.in (LIBGNU, INCGNU): Adjust.
1457 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1458 (all, install-only, uninstall, clean-info, all-lib, clean)
1459 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1460 * configure.ac: Adjust AC_OUTPUT output.
1461 * aclocal.m4: Regenerate.
1462 * configure: Regenerate.
1464 2012-04-19 Pedro Alves <palves@redhat.com>
1466 * Makefile.in (generated_files): New.
1467 (server_h): Remove the explicit dependency on config.h, and depend
1468 on $generated_files.
1470 2012-04-19 Pedro Alves <palves@redhat.com>
1472 * Makefile.in (INCGNU): Add -Ignulib.
1474 2012-04-19 Pedro Alves <palves@redhat.com>
1476 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1477 (INCGNU): ... this, and spell out -I here.
1478 (GNULIB_LIB): Rename to ...
1480 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1482 2012-04-19 Pedro Alves <palves@redhat.com>
1484 * config.in: Regenerate.
1486 2012-04-19 Pedro Alves <palves@redhat.com>
1488 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1489 * server.h (memmem): Remove declaration.
1490 * config.in: Regenerate.
1491 * configure: Regenerate.
1493 2012-04-19 Yao Qi <yao@codesourcery.com>
1495 * Makefile.in (SFILES): Add common/vec.c.
1499 2012-04-19 Yao Qi <yao@codesourcery.com>
1501 * remote-utils.c (prepare_resume_reply): Replace with macro
1502 target_core_of_thread.
1503 * server.c (handle_qxfer_threads_proper): Likewise.
1504 * target.h (traget_core_of_thread): New macro.
1506 2012-04-18 Pedro Alves <palves@redhat.com>
1508 * aclocal.m4: Regenerate.
1509 * configure: Regenerate.
1511 2012-04-16 Yao Qi <yao@codesourcery.com>
1513 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1514 duplicated on address.
1516 2012-04-16 Yao Qi <yao@codesourcery.com>
1518 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1519 (struct tracepoint_action_ops) <send>: New field.
1520 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1521 (agent_expr_send, x_tracepoint_action_send): New.
1522 (l_tracepoint_action_send): New.
1523 (cmd_qtdp): Download and install tracepoint
1524 according to `use_agent'.
1525 (run_inferior_command): Add one more parameter `len'.
1527 (tracepoint_send_agent): New.
1528 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1530 2012-04-16 Yao Qi <yao@codesourcery.com>
1532 * tracepoint.c (download_tracepoints): Moved to ...
1533 (cmd_qtstart): ... here.
1535 2012-04-14 Yao Qi <yao@codesourcery.com>
1537 * tracepoint.c: Include inttypes.h.
1538 (struct collect_memory_action): Use sized types.
1539 (struct tracepoint): Likewise.
1540 (cmd_qtdp, stop_tracing): Update print specifiers.
1541 (cmd_qtp, response_tracepoint): Likewise.
1542 (collect_data_at_tracepoint): Likewise.
1543 (collect_data_at_step): Likewise.
1545 2012-04-14 Yao Qi <yao@codesourcery.com>
1547 Import gnulib module inttypes.
1548 * aclocal.m4, config.in, configure: Regenerated.
1550 2012-04-14 Yao Qi <yao@codesourcery.com>
1552 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1553 Makefile and config.status at last.
1555 2012-04-13 Yao Qi <yao@codesourcery.com>
1557 * tracepoint.c: Include stdint.h unconditionally.
1559 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1561 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1562 on BFD_HAVE_SYS_PROCFS_TYPE.
1563 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1564 * configure: Regenerate.
1565 * config.in: Likewise.
1567 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1569 * Makefile.in (clean): Also remove x32.c x32-linux.c
1570 x32-avx.c x32-avx-linux.c.
1571 (x32.o): New target.
1573 (x32-linux.o): Likewise.
1574 (x32-linux.c): Likewise.
1575 (x32-avx.o): Likewise.
1576 (x32-avx.c): Likewise.
1577 (x32-avx-linux.o): Likewise.
1578 (x32-avx-linux.c): Likewise.
1580 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1581 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1582 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1583 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1584 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1585 i386/x32-avx-linux.xml.
1587 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1588 (init_registers_x32_avx_linux): Likwise.
1589 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1590 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1592 2012-04-13 Pedro Alves <palves@redhat.com>
1594 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1595 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1596 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1597 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1600 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1602 * linux-x86-low.c (compat_x32_clock_t): New.
1603 (compat_x32_siginfo_t): Likewise.
1604 (compat_x32_siginfo_from_siginfo): Likewise.
1605 (siginfo_from_compat_x32_siginfo): Likewise.
1606 (linux_is_elf64): Likewise.
1607 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1608 and siginfo_from_compat_x32_siginfo for x32.
1609 (x86_arch_setup): Set linux_is_elf64.
1611 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1614 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1616 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1617 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1618 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1619 compatible with process.
1621 2012-04-12 Yao Qi <yao@codesourcery.com>
1623 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1624 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1625 (install-only, install-info, clean): Handle sub dir gnulib.
1626 (all-lib, am--refresh): New targets.
1627 (memmem.o): Remove target.
1628 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1629 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1630 (AC_REPLACE_FUNCS): Remove memmem.
1631 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1632 (AC_OUTPUT): Generate Makefile in gnulib/.
1633 * aclocal.m4, config.in, configure: Regenerated.
1635 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1637 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1639 2012-04-05 Pedro Alves <palves@redhat.com>
1641 -Werror=strict-aliasing
1643 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1646 2012-04-04 Pedro Alves <palves@redhat.com>
1648 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1649 (sparc_store_gregset_from_stack, sparc_store_gregset)
1650 (sparc_breakpoint_at): Fix formatting.
1652 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1654 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1656 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1657 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1658 * config.in: Regenerate.
1659 * configure: Likewise.
1661 2012-03-29 Pedro Alves <palves@redhat.com>
1663 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1664 Correct ptrace arguments.
1666 2012-03-28 Pedro Alves <palves@redhat.com>
1668 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1669 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1670 (IA64_FR1_REGNUM): New defines.
1671 (ia64_fetch_register): New.
1672 (the_low_target): Install it.
1673 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1675 * linux-low.c (linux_fetch_registers): Try the
1676 the_low_target.fetch_register hook first.
1678 * linux-arm-low.c (the_low_target): Adjust.
1679 * linux-bfin-low.c (the_low_target): Adjust.
1680 * linux-cris-low.c (the_low_target): Adjust.
1681 * linux-crisv32-low.c (the_low_target): Adjust.
1682 * linux-m32r-low.c (the_low_target): Adjust.
1683 * linux-m68k-low.c (the_low_target): Adjust.
1684 * linux-mips-low.c (the_low_target): Adjust.
1685 * linux-ppc-low.c (the_low_target): Adjust.
1686 * linux-s390-low.c (the_low_target): Adjust.
1687 * linux-sh-low.c (the_low_target): Adjust.
1688 * linux-sparc-low.c (the_low_target): Adjust.
1689 * linux-tic6x-low.c (the_low_target): Adjust.
1690 * linux-x86-low.c (the_low_target): Adjust.
1691 * linux-xtensa-low.c (the_low_target): Adjust.
1693 2012-03-26 Pedro Alves <palves@redhat.com>
1695 * server.c (handle_qxfer_libraries): Don't bail early if
1696 the_target->qxfer_libraries_svr4 is not NULL.
1698 2012-03-26 Pedro Alves <palves@redhat.com>
1700 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1702 2012-03-23 Pedro Alves <palves@redhat.com>
1704 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1705 "library-list-svr4" element's start tag when the the DSO list is
1708 2012-03-23 Pedro Alves <palves@redhat.com>
1710 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1711 a variable whose type size is the same as the inferior's pointer
1714 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1716 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1718 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1719 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1720 * linux-low.h: Include <signal.h>.
1721 (struct siginfo): Remove forward declaration.
1722 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1725 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1727 * .gitignore: Ignore more files.
1729 2012-03-19 Pedro Alves <palves@redhat.com>
1730 Jan Kratochvil <jan.kratochvil@redhat.com>
1732 * server.c (cont_thread, general_thread): Add describing comments.
1733 (start_inferior): Clear `cont_thread'.
1734 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1737 2012-03-15 Yao Qi <yao@codesourcery.com>
1739 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1741 (cmd_qtdp): ... here.
1743 2012-03-15 Yao Qi <yao@codesourcery.com>
1745 * tracepoint.c (struct tracepoint_action_ops): New.
1746 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1747 (m_tracepoint_action_download): New.
1748 (r_tracepoint_action_download): New.
1749 (x_tracepoint_action_download): New.
1750 (l_tracepoint_action_download): New.
1751 (add_tracepoint_action): Install `action->ops' according type.
1752 (download_tracepoint_1): Move code `download' function pointer
1753 of various tracepoint_action_ops.
1755 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1757 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1758 linux_ptrace_attach_warnings.
1760 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1762 * Makefile.in (linux-ptrace.o): New.
1763 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1764 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1765 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1766 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1767 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1769 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1771 2012-03-08 Yao Qi <yao@codesourcery.com>
1772 Pedro Alves <palves@redhat.com>
1774 Fix PR server/13392.
1775 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1777 * tracepoint.c (remove_tracepoint): New.
1778 (cmd_qtdp): Call remove_tracepoint when failed to install.
1780 2012-03-07 Pedro Alves <palves@redhat.com>
1782 * linux-low.c (get_detach_signal): New.
1783 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1784 Pass on pending signals to PTRACE_DETACH. Check the result of the
1786 * server.c (program_signals, program_signals_p): New.
1787 (handle_general_set): Handle QProgramSignals.
1788 * server.h (program_signals, program_signals_p): Declare.
1790 2012-03-05 Pedro Alves <palves@redhat.com>
1791 Jan Kratochvil <jan.kratochvil@redhat.com>
1793 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1796 2012-03-03 Yao Qi <yao@codesourcery.com>
1798 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1799 agent_look_up_symbols.
1801 2012-03-03 Yao Qi <yao@codesourcery.com>
1803 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1804 (linux-x86-low.o): Likewise.
1805 * server.h: Remove in_process_agent_loaded.
1806 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1810 2012-03-03 Yao Qi <yao@codesourcery.com>
1812 * tracepoint.c (gdb_agent_capability): New global.
1813 (in_process_agent_loaded_ust): Renamed to
1814 `in_process_agent_supports_ust'.
1816 (in_process_agent_supports_ust): Call agent_capability_check.
1817 (clear_installed_tracepoints): Assert that agent supports
1820 2012-03-03 Yao Qi <yao@codesourcery.com>
1822 * linux-low.c (linux_supports_agent): New.
1823 (linux_target_ops): Initialize field `supports_agent' with
1824 linux_supports_agent.
1825 * target.h (struct target_ops) <supports_agent>: New.
1826 (target_supports_agent): New macro.
1827 * server.c (handle_general_set): Handle packet 'QAgent'.
1828 (handle_query): Send `QAgent+'.
1829 * Makefile.in (server.o): Depends on agent.h.
1831 2012-03-03 Yao Qi <yao@codesourcery.com>
1833 * Makefile.in (OBS): Add agent.o.
1834 Add new rule for agent.o.
1835 Track dependence of tracepoint.c on agent.h.
1836 * tracepoint.c (run_inferior_command_1):
1837 (run_inferior_command): Call agent_run_command.
1838 (gdb_ust_connect_sync_socket): Deleted. Move it to
1840 (resume_thread, stop_thread): Likewise.
1841 (gdb_ust_socket_init): Renamed to ...
1842 (gdb_agent_socket_init): ... New.
1843 (gdb_ust_thread): Renamed to ...
1844 (gdb_agent_helper_thread): ... New.
1845 (gdb_ust_init): Move some code to ...
1846 (gdb_agent_init): ... here. New.
1847 [HAVE_UST]: Call gdb_ust_init.
1848 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1849 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1850 * config.in, configure: Regenerated.
1852 2012-03-02 Pedro Alves <palves@redhat.com>
1854 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1855 * linux-low.c (struct simple_pid_list): New.
1856 (stopped_pids): New a struct simple_pid_list pointer.
1857 (add_to_pid_list, pull_pid_from_list): New.
1858 (handle_extended_wait): Don't assume the first signal new children
1859 report is SIGSTOP. Adjust call to pull_pid_from_list.
1860 (linux_wait_for_lwp): Adjust.
1862 2012-03-02 Yao Qi <yao@codesourcery.com>
1864 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1867 2012-03-02 Yao Qi <yao@codesourcery.com>
1869 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1870 `stop_pc' and `tpoint'. Update caller.
1872 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1874 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1875 * linux-low.c (use_linux_regsets): New macro.
1876 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1877 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1878 (linux_register_in_regsets): New function.
1879 (usr_fetch_inferior_registers): Skip registers covered by
1881 (usr_store_inferior_registers): Likewise.
1882 (usr_fetch_inferior_registers): New macro.
1883 (usr_store_inferior_registers): Likewise.
1884 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1885 (linux_store_registers): Likewise.
1886 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1888 (init_registers_mips64_dsp_linux): Likewise.
1889 (init_registers_mips_linux): New macro.
1890 (init_registers_mips_dsp_linux): Likewise.
1891 (mips_dsp_num_regs): Likewise.
1892 (DSP_BASE, DSP_CONTROL): New fallback macros.
1893 (mips_base_regs): New macro.
1894 (mips_regmap): Use it. Fix the size.
1895 (mips_dsp_regmap): New variable.
1896 (mips_dsp_regset_bitmap): Likewise.
1897 (mips_arch_setup): New function.
1898 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1900 (mips_cannot_store_register): Likewise.
1901 (the_low_target): Update .arch_setup, .num_regs and .regmap
1902 initializers. Add .regset_bitmap initializer.
1903 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1905 * linux-bfin-low.c (the_low_target): Likewise.
1906 * linux-cris-low.c (the_low_target): Likewise.
1907 * linux-crisv32-low.c (the_low_target): Likewise.
1908 * linux-ia64-low.c (the_low_target): Likewise.
1909 * linux-m32r-low.c (the_low_target): Likewise.
1910 * linux-m68k-low.c (the_low_target): Likewise.
1911 * linux-ppc-low.c (the_low_target): Likewise.
1912 * linux-s390-low.c (the_low_target): Likewise.
1913 * linux-sh-low.c (the_low_target): Likewise.
1914 * linux-sparc-low.c (the_low_target): Likewise.
1915 * linux-tic6x-low.c (the_low_target): Likewise.
1916 * linux-x86-low.c (the_low_target): Likewise.
1917 * linux-xtensa-low.c (the_low_target): Likewise.
1918 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1919 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1920 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1922 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1923 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1925 2012-02-29 Yao Qi <yao@codesourcery.com>
1926 Pedro Alves <palves@redhat.com>
1928 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1929 `step_over_finished' is true.
1931 2012-02-27 Pedro Alves <palves@redhat.com>
1933 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1934 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1936 2012-02-27 Pedro Alves <palves@redhat.com>
1939 * linux-low.c (pid_is_stopped): New.
1940 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1942 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1944 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1947 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1949 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1951 2012-02-24 Luis Machado <lgustavo@codesourcery>
1953 * server.c (handle_query): Advertise support for target-side
1954 breakpoint condition evaluation.
1955 (process_point_options): New function.
1956 (process_serial_event): When inserting a breakpoint, check for
1957 a target-side condition that should be evaluated.
1959 * mem-break.c: Include regcache.h and ax.h.
1960 (point_cond_list_t): New data structure.
1961 (breakpoint) <cond_list>: New field.
1962 (find_gdb_breakpoint_at): Make non-static.
1963 (delete_gdb_breakpoint_at): Clear any target-side
1965 (clear_gdb_breakpoint_conditions): New function.
1966 (add_condition_to_breakpoint): Likewise.
1967 (add_breakpoint_condition): Likewise.
1968 (gdb_condition_true_at_breakpoint): Likewise.
1969 (gdb_breakpoint_here): Return result directly instead
1970 of going through a local variable.
1972 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1973 (clear_gdb_breakpoint_conditions): Likewise.
1974 (add_breakpoint_condition): Likewise.
1975 (gdb_condition_true_at_breakpoint): Likewise.
1977 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1978 (need_step_over_p): Take target-side breakpoint condition into
1981 2012-02-24 Luis Machado <lgustavo@codesourcery>
1983 * server.h: Include tracepoint.h.
1984 (agent_mem_read, agent_get_trace_state_variable_value,
1985 agent_set_trace_state_variable_value,
1986 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1987 get_set_tsv_func_addr): New prototypes.
1989 * ax.h: New include file.
1990 * ax.c: New source file.
1992 * tracepoint.c: Include ax.h.
1993 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1994 agent_expr, eval_result_type): Move to ax.h.
1995 (parse_agent_expr): Rename to ...
1996 (gdb_parse_agent_expr): ... this, make it non-static and move
1998 (unparse_agent_expr) Rename to ...
1999 (gdb_unparse_agent_expr): ... this, make it non-static and move
2001 (eval_agent_expr): Rename to ...
2002 (eval_tracepoint_agent_expr): ... this.
2003 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2004 forward declarations.
2005 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2006 (agent_get_trace_state_variable_value): New function.
2007 (agent_set_trace_state_variable_value): New function.
2008 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2009 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2010 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2011 (condition_true_at_tracepoint): Likewise.
2012 (parse_agent_expr): Rename to ...
2013 (gdb_parse_agent_expr): ... this and move to ax.c.
2014 (unparse_agent_expr): Rename to ...
2015 (gdb_unparse_agent_expr): ... this and move to ax.c.
2016 (gdb_agent_op_name): Move to ax.c.
2017 (eval_agent_expr): Rename to ...
2018 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2020 (eval_tracepoint_agent_expr): New function.
2021 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2023 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2025 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2026 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2027 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2028 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2029 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2030 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2031 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2032 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2033 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2034 (compile_bytecodes): Remove forward declaration.
2035 (is_goto_target): Move to ax.c.
2036 (compile_bytecodes): Move to ax.c and call
2037 agent_get_trace_state_variable_value (...) and
2038 agent_set_trace_state_variable_value (...).
2040 * Makefile.in: Update ax.c and IPA dependencies.
2042 2012-02-24 Pedro Alves <palves@redhat.com>
2044 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2045 (cmd_bigqtbuffer_circular): ... this. Only handle
2046 'QTBuffer:circular:'.
2047 (handle_tracepoint_general_set): Adjust.
2049 2012-02-16 Yao Qi <yao@codesourcery.com>
2051 * inferiors.c: Move code to ...
2052 * dll.c: .... here. New.
2053 * server.h: Declare clear_dlls.
2054 * Makefile.in (SFILES): Add dll.c.
2058 2012-02-11 Yao Qi <yao@codesourcery.com>
2060 * server.c: (handle_monitor_command): Add a new parameter
2062 (handle_query): Update caller.
2064 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2066 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2067 * configure, config.in: Regenerate.
2068 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2071 2012-02-02 Pedro Alves <palves@redhat.com>
2073 Try SIGKILL first, then PTRACE_KILL.
2074 * linux-low.c (linux_kill_one_lwp): New.
2075 (linux_kill_one_lwp): Rename to ...
2076 (kill_one_lwp_callback): ... this. Use the new
2079 2012-02-02 Pedro Alves <palves@redhat.com>
2081 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2084 2012-01-27 Pedro Alves <palves@redhat.com>
2086 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2087 (elf_64_file_p): Make static.
2088 (linux_pid_exe_is_elf_64_file): New.
2089 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2090 Delete declarations.
2091 (linux_pid_exe_is_elf_64_file): Declare.
2092 * linux-x86-low.c (x86_arch_setup): Use
2093 linux_pid_exe_is_elf_64_file.
2095 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2097 * linux-low.c (linux_wait_for_event_1): Rename to ...
2098 (linux_wait_for_event): ... here and merge it with former
2099 linux_wait_for_event - new variable wait_ptid, use it.
2100 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2102 2012-01-23 Pedro Alves <palves@redhat.com>
2104 * server.c (main): Avoid yet another case of infinite loop while
2105 detaching/killing after a longjmp.
2107 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2110 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2112 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2114 * hostio.c (handle_readlink): New function.
2115 (handle_vFile): Call it to handle "vFile:readlink" packets.
2117 2012-01-20 Pedro Alves <palves@redhat.com>
2118 Ulrich Weigand <ulrich.weigand@linaro.org>
2120 * server.c (handle_v_requests): Only support vAttach and vRun to
2121 start multiple processes when in extended protocol mode.
2123 2012-01-17 Pedro Alves <palves@redhat.com>
2125 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2126 memalign plus mprotect to allocate the scratch buffer.
2128 2012-01-13 Pedro Alves <palves@redhat.com>
2130 * server.c (attach_inferior): Clear `cont_thread'.
2132 2012-01-13 Pedro Alves <palves@redhat.com>
2134 * server.c (main): Avoid infinite loop while detaching/killing
2137 2012-01-09 Doug Evans <dje@google.com>
2139 * server.c (start_inferior): Set last_ptid in --wrapper case.
2141 2012-01-06 Yao Qi <yao@codesourcery.com>
2143 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2145 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2147 2012-01-04 Yao Qi <yao@codesourcery.com>
2149 * tracepoint.c (cmd_qtdp): Print debug message
2150 for static tracepoint.
2152 2012-01-04 Yao Qi <yao@codesourcery.com>
2154 * tracepoint.c (trace_vdebug): Differentiate debug message
2155 between gdbserver and IPA.
2157 2012-01-03 Yao Qi <yao@codesourcery.com>
2159 * tracepoint.c (tracepoint_was_hit): Don't collect for
2162 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2164 * terminal.h: Reformat copyright header.
2166 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2168 * server.c (gdbserver_version): Update copyright year.
2169 * gdbreplay.c (gdbreplay_version): Likewise.
2171 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2173 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2176 2011-12-18 Hui Zhu <teawater@gmail.com>
2177 * linux-low.c (linux_create_inferior): Save return value to ret.
2179 2011-12-18 Hui Zhu <teawater@gmail.com>
2181 * linux-low.c (linux_create_inferior): Save return value to ret.
2183 2011-12-16 Doug Evans <dje@google.com>
2185 * linux-low.c (linux_create_inferior): If stdio connection,
2186 redirect stdin from /dev/null, stdout to stderr.
2187 * remote-utils.c (remote_is_stdio): New static global.
2188 (remote_connection_is_stdio): New function.
2189 (remote_prepare): Handle stdio connection.
2190 (remote_open): Ditto.
2191 (remote_close): Don't close stdin for stdio connections.
2192 (read_prim,write_prim): New functions. Replace all calls to
2193 read/write to these.
2194 * server.c (main): Watch for "-" argument. Move call to
2195 remote_prepare before start_inferior.
2196 * server.h (STDIO_CONNECTION_NAME): New macro.
2197 (remote_connection_is_stdio): Declare.
2199 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2200 in debugging output.
2202 2011-12-15 Yao Qi <yao@codesourcery.com>
2204 * tracepoint.c: Include sys/syscall.h.
2205 (gdb_ust_thread): Remove preprocessor conditional.
2207 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2209 * linux-low.c (linux_detach_one_lwp): Call
2210 the_low_target.prepare_to_resume before detaching.
2212 2011-12-14 Yao Qi <yao@codesourcery.com>
2214 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2217 2011-12-14 Yao Qi <yao@codesourcery.com>
2219 * i386-low.c (i386_low_stopped_data_address): Initialize local
2222 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2226 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2227 DR_CONTROL unless necessary. Extend comments.
2228 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2229 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2231 2011-12-13 Yao Qi <yao@codesourcery.com>
2233 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2235 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2237 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2239 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2240 Print new debug message for such case.
2242 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2244 Fix overlapping memcpy.
2245 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2246 the read_inferior_memory transfer.
2247 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2248 write_inferior_memory transfer.
2249 (set_fast_tracepoint_jump): New variable buf. Use it for the
2250 read_inferior_memory and write_inferior_memory transfers.
2251 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2252 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2253 Use it for the write_inferior_memory transfer.
2254 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2257 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2259 * linux-low.c (fetch_register, store_register): Make code
2260 consistent, fix formatting.
2262 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2264 * linux-low.c (usr_store_inferior_registers): Factor out code
2265 to handle individual registers into...
2266 (store_register): ... this new function.
2268 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2270 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2271 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2272 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2273 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2274 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2275 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2276 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2277 (srv_xmlfiles): Add new XML files.
2279 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2281 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2282 (init_registers_s390_linux32v1): Add prototype.
2283 (init_registers_s390_linux32v2): Likewise.
2284 (init_registers_s390_linux64v1): Likewise.
2285 (init_registers_s390_linux64v2): Likewise.
2286 (init_registers_s390x_linux64v1): Likewise.
2287 (init_registers_s390x_linux64v2): Likewise.
2288 (s390_num_regs): Increment to 52.
2289 (s390_regmap): Add orig_r2 register.
2290 (s390_num_regs_3264): Increment to 68.
2291 (s390_regmap_3264): Add orig_r2 register.
2292 (s390_collect_ptrace_register): Handle orig_r2 register.
2293 (s390_supply_ptrace_register): Likewise.
2294 (s390_fill_last_break): New function.
2295 (s390_store_last_break): Likewise.
2296 (s390_fill_system_call): New function.
2297 (s390_store_system_call): Likewise.
2298 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2300 (s390_check_regset): New function.
2301 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2302 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2303 Update target_regsets for available register sets.
2305 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2306 Jan Kratochvil <jan.kratochvil@redhat.com>
2308 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2309 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2311 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2312 * linux-low.h (struct process_info_private): New member r_debug.
2313 * server.c (handle_qxfer_libraries): Call
2314 the_target->qxfer_libraries_svr4.
2315 (handle_qxfer_libraries_svr4): New function.
2316 (qxfer_packets): New entry "libraries-svr4".
2317 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2318 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2319 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2320 PACKET_qXfer_libraries_svr4.
2322 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2324 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2325 PSW address/mask between 8-byte and 16-byte formats.
2326 (s390_supply_ptrace_register): Likewise.
2327 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2328 basic addressing mode bit.
2330 2011-11-24 Stan Shebs <stan@codesourcery.com>
2332 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2334 2011-11-17 Stan Shebs <stan@codesourcery.com>
2336 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2337 (tracing_start_time): New global.
2338 (tracing_stop_time): New global.
2339 (tracing_user_name): New global.
2340 (tracing_notes): New global.
2341 (tracing_stop_note): New global.
2342 (cmd_qtstart): Set traceframe_usage, start_time.
2343 (stop_tracing): Set stop_time.
2344 (cmd_qtstatus): Report additional status.
2345 (cmd_qtp): New function.
2346 (handle_tracepoint_query): Call it.
2347 (cmd_qtnotes): New function.
2348 (handle_tracepoint_general_set): Call it.
2349 (get_timestamp): Rename from tsv_get_timestamp.
2351 2011-11-14 Stan Shebs <stan@codesourcery.com>
2352 Kwok Cheung Yeung <kcy@codesourcery.com>
2354 * linux-x86-low.c (small_jump_insn): New.
2355 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2356 trampoline and error message, build a trampoline and issue a small
2357 jump instruction to it.
2358 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2359 trampoline and error message.
2360 (x86_get_min_fast_tracepoint_insn_len): New.
2361 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2362 * linux-low.h (struct linux_target_ops): Add arguments to
2363 install_fast_tracepoint_jump_pad operation, add new operation.
2364 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2366 (linux_get_min_fast_tracepoint_insn_len): New function.
2367 (linux_target_op): Add new operation.
2368 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2369 (gdb_trampoline_buffer_end): Ditto.
2370 (gdb_trampoline_buffer_error): Ditto.
2371 (struct ipa_sym_addresses): Add fields for new IPA variables.
2372 (symbol_list): Add entries for new IPA variables.
2373 (struct tracepoint): Add fields to hold the address range of the
2374 trampoline used by the tracepoint.
2375 (trampoline_buffer_head): New static variable.
2376 (trampoline_buffer_tail): Ditto.
2377 (claim_trampoline_space): New function.
2378 (have_fast_tracepoint_trampoline_buffer): New function.
2379 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2381 (install_fast_tracepoint): Ditto, also add error buffer argument.
2382 (cmd_qtminftpilen): New function.
2383 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2384 (fast_tracepoint_from_trampoline_address): New function.
2385 (fast_tracepoint_collecting): Handle trampoline as part of jump
2387 (set_trampoline_buffer_space): New function.
2388 (initialize_tracepoint): Initialize new IPA variables.
2389 * target.h (struct target_ops): Add arguments to
2390 install_fast_tracepoint_jump_pad operation, add new
2391 get_min_fast_tracepoint_insn_len operation.
2392 (target_get_min_fast_tracepoint_insn_len): New.
2393 (install_fast_tracepoint_jump_pad): Add arguments.
2394 * server.h (IPA_BUFSIZ): Define.
2395 * linux-i386-ipa.c: Include extra header files.
2396 (initialize_fast_tracepoint_trampoline_buffer): New function.
2397 (initialize_low_tracepoint): Call it.
2398 * server.h (set_trampoline_buffer_space): Declare.
2399 (claim_trampoline_space): Ditto.
2400 (have_fast_tracepoint_trampoline_buffer): Ditto.
2402 2011-11-14 Yao Qi <yao@codesourcery.com>
2404 * server.c (handle_query): Handle InstallInTrace for qSupported.
2405 * tracepoint.c (add_tracepoint): Sort list.
2406 (install_tracepoint, download_tracepoint): New.
2407 (cmd_qtdp): Call them to install and download tracepoints.
2408 (sort_tracepoints): Removed.
2409 (cmd_qtstart): Update.
2411 2011-11-14 Yao Qi <yao@codesourcery.com>
2413 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2414 * mem-break.h: Declare.
2415 * tracepoint.c (cmd_qtstart): Move some code to ...
2416 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2418 (download_tracepoints): Move some code to ...
2419 (download_tracepoint_1): ... here. New.
2421 2011-11-08 Yao Qi <yao@codesourcery.com>
2423 * remote-utils.c (relocate_instruction): A comment fix.
2425 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2427 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2428 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2429 dr_status_mirror and dr_control_mirror from debug_reg_state.
2430 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2431 (i386_initial_stuff): Remove use of deleted globals.
2432 (i386_get_thread_context, i386_set_thread_context,
2433 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2434 from debug_reg_state.
2436 2011-11-05 Yao Qi <yao@codesourcery.com>
2438 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2439 address as TPOINT's.
2441 2011-11-02 Stan Shebs <stan@codesourcery.com>
2443 * tracepoint.c (agent_mem_read_string): New function.
2444 (eval_agent_expr): Call it for tracenz.
2445 * server.c (handle_query): Report support for tracenz.
2447 2011-11-02 Yao Qi <yao@codesourcery.com>
2449 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2451 2011-11-02 Yao Qi <yao@codesourcery.com>
2453 * target.h: Fix a typo in comment.
2455 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2457 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2458 clobber the breakpoints' shadows with fast tracepoint jumps.
2459 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2460 * target.c (write_inferior_memory): Also pass MYADDR down to
2463 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2465 * configure.ac: Check support for personality routine.
2466 * configure: Regenerate.
2467 * config.in: Likewise.
2468 * linux-low.c: Include <sys/personality.h>.
2469 Define ADDR_NO_RANDOMIZE if necessary.
2470 (linux_create_inferior): Disable address space randomization when
2471 forking inferior, if requested.
2472 (linux_supports_disable_randomization): New function.
2473 (linux_target_ops): Install it.
2474 * server.h (disable_randomization): Declare.
2475 * server.c (disable_randomization): New global variable.
2476 (handle_general_set): Handle QDisableRandomization.
2477 (handle_query): Likewise for qSupported.
2478 (main): Support --disable-randomization and --no-disable-randomization
2479 command line arguments.
2480 * target.h (struct target_ops): Add supports_disable_randomization.
2481 (target_supports_disable_randomization): New macro.
2483 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2485 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2487 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2488 [!PT_GETDSBT] (target_loadmap): New definition.
2489 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2490 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2491 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2492 and PT_GETDSBT to LINUX_LOADMAP.
2493 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2494 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2496 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2498 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2499 (arm_linux_hwbp_cap): New static variable.
2500 (arm_linux_get_hwbp_cap): Replace by ...
2501 (arm_linux_init_hwbp_cap): ... this new function.
2502 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2503 (arm_linux_get_hw_watchpoint_count): Likewise.
2504 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2505 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2506 (arm_prepare_to_resume): Use perror_with_name instead of error.
2508 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2510 * linux-arm-low.c: Include <signal.h>.
2511 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2512 (struct arm_linux_hwbp_cap): New data type.
2513 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2514 (struct arm_linux_hw_breakpoint): New data type.
2515 (MAX_BPTS, MAX_WPTS): Define.
2516 (struct arch_process_info, struct arch_lwp_info): New data types.
2517 (arm_linux_get_hwbp_cap): New function.
2518 (arm_linux_get_hw_breakpoint_count): Likewise.
2519 (arm_linux_get_hw_watchpoint_count): Likewise.
2520 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2521 (arm_hwbp_control_initialize): Likewise.
2522 (arm_hwbp_control_is_enabled): Likewise.
2523 (arm_hwbp_control_is_initialized): Likewise.
2524 (arm_hwbp_control_disable): Likewise.
2525 (arm_linux_hw_breakpoint_equal): Likewise.
2526 (arm_linux_hw_point_initialize): Likewise.
2527 (struct update_registers_data): New data structure.
2528 (update_registers_callback: New function.
2529 (arm_insert_point): Likewise.
2530 (arm_remove_point): Likewise.
2531 (arm_stopped_by_watchpoint): Likewise.
2532 (arm_stopped_data_address): Likewise.
2533 (arm_new_process): Likewise.
2534 (arm_new_thread): Likewise.
2535 (arm_prepare_to_resume): Likewise.
2536 (the_low_target): Register arm_insert_point, arm_remove_point,
2537 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2538 arm_new_thread, and arm_prepare_to_resume.
2540 2011-09-15 Stan Shebs <stan@codesourcery.com>
2542 * server.h (struct emit_ops): Add compare-goto fields.
2543 * tracepoint.c (gdb_agent_op_sizes): New table.
2544 (emit_eq_goto): New function.
2545 (emit_ne_goto): New function.
2546 (emit_lt_goto): New function.
2547 (emit_le_goto): New function.
2548 (emit_gt_goto): New function.
2549 (emit_ge_goto): New function.
2550 (is_goto_target): New function.
2551 (compile_bytecodes): Recognize special cases of compare-goto
2552 combinations and call specialized emitters for them.
2553 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2554 (amd64_emit_ne_goto): New function.
2555 (amd64_emit_lt_goto): New function.
2556 (amd64_emit_le_goto): New function.
2557 (amd64_emit_gt_goto): New function.
2558 (amd64_emit_ge_goto): New function.
2559 (amd64_emit_ops): Add the new functions.
2560 (i386_emit_eq_goto): New function.
2561 (i386_emit_ne_goto): New function.
2562 (i386_emit_lt_goto): New function.
2563 (i386_emit_le_goto): New function.
2564 (i386_emit_gt_goto): New function.
2565 (i386_emit_ge_goto): New function.
2566 (i386_emit_ops): Add the new functions.
2568 2011-09-08 Stan Shebs <stan@codesourcery.com>
2570 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2571 (i386_emit_epilogue): Restore %ebx.
2573 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2575 * server.c (step_thread): Remove definition.
2576 (process_serial_event): Don't handle Hs.
2577 * server.h (step_thread): Remove declaration.
2578 * target.c (set_desired_inferior): Remove use of step_thread.
2580 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2582 * linux-low.c: Include linux-procfs.h.
2583 (linux_attach_lwp_1): Update comments.
2584 (linux_attach): Scan for existing threads when attaching to a
2585 process that is the tgid.
2586 * Makefile.in: Update dependencies.
2588 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2590 * configure.srv: Add linux-procfs.o dependencies.
2592 2011-08-14 Yao Qi <yao@codesourcery.com>
2594 * target.h (struct target_ops): Fix indent.
2595 * win32-low.c (win32_target_ops): Fix comment.
2597 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2598 Yao Qi <yao@codesourcery.com>
2600 * Makefile.in (clean): Remove tic6x-*.c files.
2601 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2602 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2603 (tic6x-c64xp-linux.c): Likewise.
2604 * configure.srv: Add support for tic6x-*-uclinux.
2605 * linux-tic6x-low.c: New.
2606 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2608 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2609 Yao Qi <yao@codesourcery.com>
2611 * target.h (struct target_ops): Add read_loadmap.
2612 * linux-low.c (struct target_loadseg): New type.
2613 (struct target_loadmap): New type.
2614 (linux_read_loadmap): New function.
2615 (linux_target_ops): Add linux_read_loadmap.
2616 * server.c (handle_query): Support qXfer:fdpic:read packet.
2617 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2620 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2622 * win32-low.c: Include <stdint.h>.
2624 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2626 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2627 to the inferior here.
2628 (i386_remove_aligned_watchpoint): Ditto.
2629 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2630 fit part of the watchpoint in the debug registers.
2631 (i386_update_inferior_debug_regs): New.
2632 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2633 registers, and only update the inferior on success.
2634 (i386_low_remove_watchpoint): Ditto.
2636 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2638 * linux-low.c (compare_ints, unique, list_threads, show_process,
2639 linux_core_of_thread): Delete.
2640 (linux_target_ops): Change linux_core_of_thread to
2641 linux_common_core_of_thread.
2642 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2643 * utils.c (malloc_failure): Change type of argument.
2644 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2645 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2646 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2647 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2648 (IPA_OBJS): Add common-utils-ipa.o.
2649 (ptid_h, linux_osdata_h): New macros.
2650 (server_h): Add common/common-utils.h, common/xml-utils.h,
2651 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2653 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2654 ptid.o, buffer.o): New rules.
2655 (linux-low.o): Add common/linux-osdata.h as a dependency.
2656 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2657 * configure.ac: Add AC_HEADER_DIRENT check.
2658 * config.in: Regenerate.
2659 * configure: Regenerate.
2660 * remote-utils.c (xml_escape_text): Delete.
2661 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2662 buffer_xml_printf): Move to common/buffer.c.
2663 * server.c (main): Remove call to initialize_inferiors.
2664 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2665 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2666 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2667 internal_error, gdb_assert, gdb_assert_fail): Delete.
2668 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2669 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2671 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2672 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2673 initialize_inferiors): Delete.
2675 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2677 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2680 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2682 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2684 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2686 2011-05-26 Yao Qi <yao@codesourcery.com>
2688 * Makefile.in (thread-db.o): Track dependence to
2689 common/gdb_thread_db.h.
2690 * thread-db.c: include gdb_thread_db.h from right place.
2692 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2694 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2695 __FILE__ and __LINE__ to internal_error.
2697 2011-05-13 Doug Evans <dje@google.com>
2699 * thread-db.c (try_thread_db_load_from_sdir): New function.
2700 (try_thread_db_load_from_dir): New function.
2701 (thread_db_load_search): Handle $sdir, ignore $pdir.
2702 Remove trying of system directories if search of
2703 libthread-db-search-path fails, that is now done via $sdir.
2705 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2707 * server.c (handle_query): Add EnableDisableTracepoints to the list
2708 of supported features.
2709 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2711 (cmd_qtenable_disable): New.
2712 (cmd_qtstart): Install tracepoints even if disabled.
2713 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2714 receiving a QTEnable or QTDisable packet.
2715 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2716 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2718 (gdb_probe): Skip data collection if static tracepoint is disabled.
2720 2011-05-10 Doug Evans <dje@google.com>
2722 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2724 2011-05-04 Doug Evans <dje@google.com>
2726 * linux-low.c (linux_join): Skip process lookup.
2727 * spu-low.c (spu_join): Ditto.
2728 * server.c (join_inferiors_callback): Delete.
2729 (process_serial_event): For 'D' packet (detach) call join_inferior
2732 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2734 * README: Don't mention xscale*-*-linux*.
2735 * configure.srv (xscale*-*-linux*): Don't handle target.
2737 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2739 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2741 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2742 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2743 (i386_emit_void_call_2): Likewise.
2745 2011-04-26 Yao Qi <yao@codesourcery.com>
2747 * linux-low.c: Move common macros to linux-ptrace.h.
2748 Include linux-ptrace.h.
2749 * Makefile.in (linux_ptrace_h): New.
2750 (linux-low.o): Depends on linux-ptrace.h.
2752 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2754 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2755 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2756 (remote_prepare): New function with most of the TCP code from ...
2757 (remote_open): ... here. Detect PORT here unconditionally. Move also
2758 setting transport_is_reliable.
2759 * server.c (run_once): New variable.
2760 (gdbserver_usage): Document it.
2761 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2762 the first run if RUN_ONCE.
2763 * server.h (run_once, remote_prepare): New declarations.
2765 2011-04-19 Tom Tromey <tromey@redhat.com>
2767 * win32-low.c (handle_load_dll): Remove duplicate "the".
2769 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2771 Remove support for old Cygwin 1.5 versions.
2772 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2773 function to avoid warning.
2774 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2777 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2779 * gdbserver/server.h (Macro _): Define it if not available.
2781 2011-03-14 Michael Snyder <msnyder@vmware.com>
2783 * hostio.c (handle_close): Remove unnecessary null test.
2785 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2787 * Makefile.in (maintainer-clean realclean distclean): Remove
2788 "make ... subdir_do" command.
2790 2011-03-10 Michael Snyder <msnyder@vmware.com>
2792 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2794 * server.c (handle_v_run): Free alloced buffer on early return.
2796 2011-03-09 Yao Qi <yao@codesourcery.com>
2799 2011-03-04 Yao Qi <yao@codesourcery.com>
2801 * Makefile.in: Remove GNU make feature --directory.
2803 2011-03-05 Yao Qi <yao@codesourcery.com>
2805 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2806 (subdir_do): New make target. Copied from gdb/Makefile.
2807 (maintainer-clean, realclean, distclean, clean): Call corresponding
2808 make targets in common/Makefile.
2810 2011-02-11 Yao Qi <yao@codesourcery.com>
2812 * configure.ac: Call AC_PROG_RANLIB.
2813 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2814 * configure: Regenerate.
2816 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2818 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2820 2011-03-06 Yao Qi <yao@codesourcery.com>
2822 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2824 2011-03-05 Yao Qi <yao@codesourcery.com>
2826 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2827 (subdir_do): New make target. Copied from gdb/Makefile.
2828 (maintainer-clean, realclean, distclean, clean): Call corresponding
2829 make targets in common/Makefile.
2831 2011-03-04 Yao Qi <yao@codesourcery.com>
2833 * Makefile.in: Remove GNU make feature --directory.
2835 2011-03-04 Michael Snyder <msnyder@vmware.com>
2837 * server.c (queue_stop_reply): Call xmalloc not malloc.
2839 2011-03-02 Michael Snyder <msnyder@vmware.com>
2841 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2843 2011-02-28 Michael Snyder <msnyder@vmware.com>
2845 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2846 (cmd_qtframe): Ditto.
2847 (cmd_qtbuffer): Ditto.
2848 (cmd_bigqtbuffer): Ditto.
2850 * utils.c (decimal2str): Initialize 'width' to nine, then
2853 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2855 * hostio.c (require_data): Free *data, not data.
2857 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2859 * hostio.c (require_data): Use free, not xfree.
2861 2011-02-27 Michael Snyder <msnyder@vmware.com>
2863 * server.c (handle_query): Discard unused value.
2865 * hostio.c (require_data): Free malloc memory before returning
2868 2011-02-26 Michael Snyder <msnyder@vmware.com>
2870 * linux-low.c (list_threads): Call closedir for dirent.
2872 2011-02-27 Michael Snyder <msnyder@vmware.com>
2874 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2875 a case statement falls through.
2877 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2879 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2882 2011-02-26 Michael Snyder <msnyder@vmware.com>
2884 * utils.c (decimal2str): Eliminate dead code and dead param.
2885 (pulongest): Drop dead param from call to decimal2str.
2888 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2890 Revert the following patch (not approved yet):
2891 2011-02-21 Hui Zhu <teawater@gmail.com>
2892 * tracepoint.c (tp_printf): New function.
2893 (eval_agent_expr): Handle gdb_agent_op_printf.
2895 2011-02-21 Hui Zhu <teawater@gmail.com>
2897 * tracepoint.c (tp_printf): New function.
2898 (eval_agent_expr): Handle gdb_agent_op_printf.
2900 2011-02-18 Tom Tromey <tromey@redhat.com>
2902 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2903 (tracepoint.o): Likewise.
2904 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2905 (gdb_agent_op_names): Likewise.
2907 2011-02-18 Tom Tromey <tromey@redhat.com>
2909 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2910 gdb_agent_op_rot>: New constants.
2911 (gdb_agent_op_names): Add pick and roll.
2912 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2915 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2917 * aclocal.m4: Regenerated with aclocal-1.11.1.
2919 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2921 * server.c (handle_qxfer_traceframe_info): New.
2922 (qxfer_packets): Register "traceframe-info".
2923 (handle_query): Report support for qXfer:traceframe-info:read+.
2924 * tracepoint.c (match_blocktype): New.
2925 (traceframe_find_block_type): Rename to ...
2926 (traceframe_walk_blocks): ... this. Add callback filter argument,
2928 (traceframe_find_block_type): New, reimplemented on top of
2929 traceframe_walk_blocks.
2930 (build_traceframe_info_xml): New.
2931 (traceframe_read_info): New.
2932 * server.h (traceframe_read_info): Declare.
2934 2011-02-11 Yao Qi <yao@codesourcery.com>
2936 * configure.ac: Call AC_PROG_RANLIB.
2937 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2938 * configure: Regenerate.
2940 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2942 * server.c (gdb_read_memory): Change return semantics to allow
2944 (handle_search_memory_1): Adjust.
2945 (process_serial_event) <'m' packet>: Handle partial transfers.
2946 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2948 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2950 * regcache.c (init_register_cache): Initialize
2951 regcache->register_status.
2952 (free_register_cache): Release regcache->register_status.
2953 (regcache_cpy): Copy register_status.
2954 (registers_to_string): Print 'x's for unavailable registers.
2955 (supply_register): Mark the register's status valid or
2956 unavailable, depending on whether a buffer was passed in or not.
2957 (supply_register_zeroed): New.
2958 (supply_regblock): Mark the registers' status valid or
2959 unavailable, depending on whether a buffer was passed in or not.
2960 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2961 (struct regcache): New `register_status' field.
2962 (supply_register_zeroed): Declare.
2963 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2964 supply_register_zeroed, rather than passing a NULL buffer to
2966 * tracepoint.c (fetch_traceframe_registers): Update comment.
2968 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2970 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2973 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2975 * server.h (decode_xfer_write): Change prototype.
2976 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2977 and don't extract the annex here.
2978 * server.c (decode_xfer_read): Remove `annex' parameter,
2979 and don't extract the annex here.
2981 (struct qxfer): New.
2982 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2983 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2984 (handle_qxfer_statictrace): New functions, abstracted out from
2985 handle_query, and made to use the struct qxfer interface.
2986 (handle_threads_qxfer_proper): Rename to ...
2987 (handle_qxfer_threads_proper): ... this.
2988 (handle_threads_qxfer): Rename to ...
2989 (handle_qxfer_threads): ... this. Adjust.
2990 (qxfer_packets): New array.
2991 (handle_qxfer): New function.
2992 (handle_query): Use handle_qxfer.
2994 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2996 * gdbreplay.c: Shorten lines of >= 80 columns.
2997 * linux-low.c: Ditto.
2998 * linux-ppc-low.c: Ditto.
2999 * linux-s390-low.c: Ditto.
3000 * linux-sparc-low.c: Ditto.
3001 * linux-x86-low.c: Ditto.
3002 * linux-xtensa-low.c: Ditto.
3003 * mem-break.c: Ditto.
3005 * regcache.h: Ditto.
3006 * remote-utils.c: Ditto.
3009 * thread-db.c: Ditto.
3010 * tracepoint.c: Ditto.
3012 * win32-low.h: Ditto.
3014 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3016 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3019 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3021 * server.c (gdbserver_version): Update copyright year in version
3023 * gdbreplay.c (gdbreplay_version): Ditto.
3025 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3027 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3028 * linux-bfin-low.c: New file.
3029 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3030 PT_DATA_ADDR for BFIN targets.
3031 * Makefile.in (SFILES): Add linux-bfin-low.c.
3032 (clean): Remove reg-bfin.c.
3033 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3034 * README: Mention supported Blackfin targets.
3036 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3038 * .gitignore: New file.
3040 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3042 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3044 2010-10-22 Jie Zhang <jie@codesourcery.com>
3046 * Makefile.in: Add FLAGS_TO_PASS variable.
3047 (install): Remove dependency of install-only and recursively
3048 invoke make for install-only.
3050 2010-10-04 Doug Evans <dje@google.com>
3052 * Makefile.in (uninstall): Use $(DESTDIR).
3054 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3058 * linux-x86-low.c (compat_siginfo_from_siginfo)
3059 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3060 si_code is < 0. Check for si_code == SI_TIMER before checking for
3063 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3065 * lynx-i386-low.c: New file.
3066 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3068 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3070 * lynx-low.c (ptrace_request_to_str): Remove handling for
3071 request values that have been removed in LynxOS 5.x.
3073 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3075 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3078 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3080 * configure.ac: Add --enable-inprocess-agent option.
3081 * configure: Rebuilt.
3083 2010-09-06 Yao Qi <yao@codesourcery.com>
3085 * linux-low.c (linux_kill): Remove unused variable.
3086 (linux_stabilize_threads): Likewise.
3087 * server.c (start_inferior): Likewise.
3088 (queue_stop_reply_callback): Likewise.
3089 * tracepoint.c (do_action_at_tracepoint): Likewise.
3091 2010-09-06 Yao Qi <yao@codesourcery.com>
3093 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3096 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3098 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3100 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3102 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3105 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3107 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3108 gdbserver/lynx-ppc-low.c: New files.
3109 * Makefile.in (lynx_low_h): New variable.
3110 (lynx-low.o, lynx-ppc-low.o): New rules.
3111 * configure.ac: On LynxOS, link with -lnetinet.
3112 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3113 * configure: regenerate.
3115 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3117 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3118 * configure.ac: Add check for vasprintf and vsnprintf.
3119 * configure, config.in: Regenerate.
3120 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3122 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3124 * gdbreplay.c: Move include of alloca.h up, next to include of
3126 * server.h: Add include of malloc.h.
3127 * mem-break.c: Remove include of malloc.h.
3128 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3130 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3132 * Makefile.in (memmem.o): Build with -Wno-error.
3134 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3136 * utils.c (xsnprintf): Make non-static.
3137 * server.h: Add xsnprintf declaration.
3138 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3139 replace calls to snprintf by calls to xsnprintf throughout.
3141 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3143 * configure.ac: Add configure check for alloca.
3144 * configure, config.in: Regenerate.
3145 * server.h: Include alloca.h if it exists.
3146 * gdbreplay.c: Include alloca.h if it exists.
3148 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3150 * linux-low.c (__SIGRTMIN): Define if not already defined.
3151 (linux_create_inferior): Check for __ANDROID__ rather than
3153 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3154 are already deferred.
3155 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3156 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3157 stopped and already has a pending signal to report.
3158 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3159 a pending signal to report or is moving out of a jump pad.
3160 (linux_init_signals): Check for __ANDROID__ rather than
3163 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3165 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3166 debug_threads check. Avoid a linear search when not doing debug
3169 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3171 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3172 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3173 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3174 (process_event): Change local fd's type to gdb_fildes_t.
3175 (create_file_handler): Adjust prototype.
3176 (delete_file_handler): Adjust prototype.
3177 (handle_file_event): Adjust prototype. Use pfildes.
3178 (create_file_event): Adjsut prototype.
3179 * remote-utils.c (remote_desc, listen_desc): Change type to
3181 * server.h: New gdb_fildes_t typedef.
3182 [USE_WIN32API]: Include winsock2.h.
3183 (delete_file_handler, add_file_handler): Adjust prototypes.
3185 * utils.c (pfildes): New.
3187 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3189 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3190 * configure: Regenerate.
3192 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3194 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3195 (linux_done_accessing_memory): ... this.
3196 (linux_target_ops): Adjust.
3197 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3198 * nto-low.c (nto_target_ops): Adjust comment.
3199 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3200 * spu-low.c (spu_target_ops): Adjust comment.
3201 * target.h (target_ops): Rename unprepare_to_access_memory field
3202 to done_accessing_memory.
3203 (unprepare_to_access_memory): Rename to ...
3204 (done_accessing_memory): ... this.
3206 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3208 * linux-low.c (linux_prepare_to_access_memory): New.
3209 (linux_unprepare_to_access_memory): New.
3210 (linux_target_ops): Install them.
3211 * server.c (read_memory): Rename to ...
3212 (gdb_read_memory): ... this. Use
3213 prepare_to_access_memory/prepare_to_access_memory.
3214 (write_memory): Rename to ...
3215 (gdb_write_memory): ... this. Use
3216 prepare_to_access_memory/prepare_to_access_memory.
3217 (handle_search_memory_1): Adjust.
3218 (process_serial_event): Adjust.
3219 * target.h (struct target_ops): New fields
3220 prepare_to_access_memory and unprepare_to_access_memory.
3221 (prepare_to_access_memory, unprepare_to_access_memory): New.
3222 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3223 prepare_to_access_memory/prepare_to_access_memory.
3224 * nto-low.c (nto_target_ops): Adjust.
3225 * spu-low.c (spu_target_ops): Adjust.
3226 * win32-low.c (win32_target_ops): Adjust.
3228 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3230 * Makefile.in (WARN_CFLAGS): Get it from configure.
3231 (WERROR_CFLAGS): New.
3232 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3233 * configure.ac: Introduce --enable-werror, which adds -Werror to
3234 the compiler command line. Enabled by default. Disable with
3235 --disable-werror. Add -Wdeclaration-after-statement
3236 Wpointer-arith and -Wformat-nonliteral to warning flags.
3237 * configure: Regenerate.
3239 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3241 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3243 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3245 * gdbreplay.c (remote_error): New.
3247 (expect): Use gdbchar. Check for error reading from GDB.
3248 Clarify sync error output.
3249 (play): Check for errors writing to GDB.
3250 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3251 * remote-utils.c (getpkt): Check for errors writing to the remote
3254 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3256 * linux-low.c (linux_wait_1): Move non-debugging code out of
3257 `debug_threads' control.
3259 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3261 * linux-low.c (linux_wait_1): Don't set last_status here.
3262 * server.c (push_event, queue_stop_reply_callback): Assert we're
3263 not pushing a TARGET_WAITKIND_IGNORE event.
3264 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3265 (myresume, handle_target_event): Set the thread's last_resume_kind
3266 and last_status from the target returned status.
3268 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3272 * linux-x86-low.c (update_debug_registers_callback): New.
3273 (i386_dr_low_set_addr): Use it.
3274 (i386_dr_low_get_addr): New.
3275 (i386_dr_low_set_control): Use update_debug_registers_callback.
3276 (i386_dr_low_get_control): New.
3277 (i386_dr_low_get_status): Adjust.
3278 * linux-low.c (linux_stop_lwp): New.
3279 * linux-low.h (linux_stop_lwp): Declare.
3281 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3282 argument instead of a i386_debug_reg_state.
3283 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3284 a i386_debug_reg_state.
3285 (i386_insert_aligned_watchpoint): Adjust.
3286 (i386_remove_aligned_watchpoint): Adjust.
3287 (i386_low_stopped_data_address): Read the debug registers from the
3288 inferior instead of from the mirrors.
3289 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3290 (i386_dr_low_get_addr): Declare.
3291 (i386_dr_low_get_control): Declare.
3292 (i386_dr_low_get_status): Change prototype.
3294 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3295 (i386_dr_low_get_addr): New.
3296 (i386_dr_low_get_control): New.
3297 (i386_dr_low_get_status): Adjust prototype. Return
3299 (i386_initial_stuff): Clear dr_status_mirror and
3301 (i386_get_thread_context): Adjust.
3302 (i386_set_thread_context): Adjust.
3303 (i386_thread_added): Adjust.
3305 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3307 * linux-low.h (linux_thread_area): Delete declaration.
3309 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3311 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3312 after its termination.
3314 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3316 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3317 (gdb_wants_all_stopped): Delete.
3318 (linux_wait_1): Don't call them.
3319 * server.c (handle_v_cont): Tag all threads as want-stopped.
3320 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3321 stopped as "client-wants-stopped".
3323 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3325 * Makefile.in (signals_h): New.
3326 (server_h): Depend on it.
3327 (server.o): Don't depend on $(signals_def).
3328 (signals.o): Depend on $(signals_def).
3330 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3332 * Makefile.in (signals_def): New.
3333 (server_h): Append include/gdb/signals.h and signals_def.
3334 (server.o): Append signals_def.
3336 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3338 * server.c (handle_target_event): Use target_signal_to_host for
3339 resume_info.sig initialization.
3340 * target.h (struct thread_resume) <sig>: New comment.
3342 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3344 * server.c (handle_query): strcpy() the returned string from paddress()
3345 instead of sprintf().
3346 * utils.c (paddress): Return phex_nz().
3348 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3350 * server.c (handle_v_cont): Call mourn_inferior if process
3352 (myresume): Likewise.
3354 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3356 Static tracepoints, and integration with UST.
3358 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3359 * mem-break.c (uninsert_all_breakpoints)
3360 (reinsert_all_breakpoints): New.
3361 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3362 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3363 (gdb_agent_ust_loaded, helper_thread_id)
3364 (gdb_agent_helper_thread_id): New macros.
3365 (struct ipa_sym_addresses): Add addr_ust_loaded,
3366 addr_helper_thread_id, addr_cmd_buf.
3367 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3368 (in_process_agent_loaded_ust): New.
3369 (write_e_ust_not_loaded): New.
3370 (maybe_write_ipa_ust_not_loaded): New.
3371 (struct collect_static_trace_data_action): New.
3372 (enum tracepoint_type) <static_tracepoint>: New.
3373 (struct tracepoint) <handle>: Mention static tracepoints.
3374 (struct static_tracepoint_ctx): New.
3375 (CMD_BUF_SIZE): New.
3376 (add_tracepoint_action): Handle static tracepoint actions.
3377 (unprobe_marker_at): New.
3378 (clear_installed_tracepoints): Handle static tracepoints.
3379 (cmd_qtdp): Handle static tracepoints.
3380 (probe_marker_at): New.
3381 (cmd_qtstart): Handle static tracepoints.
3382 (response_tracepoint): Handle static tracepoints.
3383 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3384 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3385 (get_context_regcache): Handle static tracepoints.
3386 (do_action_at_tracepoint): Handle static tracepoint actions.
3387 (traceframe_find_block_type): Handle static trace data blocks.
3388 (traceframe_read_sdata): New.
3389 (download_tracepoints): Download static tracepoint actions.
3390 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3391 (GDB_PROBE_NAME): New.
3396 (ust_marker_to_static_tracepoint): New.
3398 (collect_ust_data_at_tracepoint): New.
3399 (gdb_ust_probe): New.
3400 (UNIX_PATH_MAX, SOCK_DIR): New.
3401 (gdb_ust_connect_sync_socket): New.
3402 (resume_thread, stop_thread): New.
3403 (run_inferior_command): New.
3404 (init_named_socket): New.
3405 (gdb_ust_socket_init): New.
3406 (cstr_to_hexstr): New.
3408 (first_marker, next_marker): New.
3409 (response_ust_marker): New.
3410 (cmd_qtfstm, cmd_qtsstm): New.
3411 (unprobe_marker_at, probe_marker_at): New.
3412 (cmd_qtstmat, gdb_ust_thread): New.
3413 (gdb_ust_init): New.
3414 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3415 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3417 (x86_64_st_collect_regmap): New.
3418 (X86_64_NUM_ST_COLLECT_GREGS): New.
3419 (AMD64_RIP_REGNUM): New.
3420 (supply_static_tracepoint_registers): New.
3421 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3423 (i386_st_collect_regmap): New.
3424 (i386_NUM_ST_COLLECT_GREGS): New.
3425 (supply_static_tracepoint_registers): New.
3426 * server.c (handle_query): Handle qXfer:statictrace:read.
3427 <qSupported>: Report support for StaticTracepoints, and
3428 qXfer:statictrace:read features.
3429 * server.h (traceframe_read_sdata)
3430 (supply_static_tracepoint_registers): Declare.
3431 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3432 (unpack_varlen_hex): Include in IPA build.
3433 * Makefile.in (ustlibs, ustinc): New.
3434 (IPA_OBJS): Add remote-utils-ipa.o.
3435 ($(IPA_LIB)): Link -ldl and -lpthread.
3437 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3438 * config.in, configure: Regenerate.
3440 2010-06-20 Ian Lance Taylor <iant@google.com>
3441 Pedro Alves <pedro@codesourcery.com>
3443 * linux-x86-low.c (always_true): Delete.
3444 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3445 trying to fool the compiler with always_true.
3447 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3449 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3450 conditions in gdbserver.
3452 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3454 * spu-low.c (spu_read_memory): Wrap around local store limit.
3455 (spu_write_memory): Likewise.
3457 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3459 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3460 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3462 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3464 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3465 uses with LONGEST uses.
3467 2010-06-14 Stan Shebs <stan@codesourcery.com>
3468 Pedro Alves <pedro@codesourcery.com>
3472 * linux-x86-low.c: Include limits.h.
3477 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3478 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3479 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3480 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3481 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3482 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3483 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3484 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3485 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3486 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3487 (amd64_emit_void_call_2): New.
3488 (amd64_emit_ops): New.
3489 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3490 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3491 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3492 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3493 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3494 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3495 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3496 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3497 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3498 (i386_emit_stack_adjust, i386_emit_int_call_1)
3499 (i386_emit_void_call_2): New.
3500 (i386_emit_ops): New.
3501 (x86_emit_ops): New.
3502 (the_low_target): Install x86_emit_ops.
3503 * server.h (struct emit_ops): New.
3504 (get_raw_reg_func_addr): Declare.
3505 (current_insn_ptr, emit_error): Declare.
3506 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3507 (set_trace_state_variable_value): New defines.
3508 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3509 addr_get_trace_state_variable_value and
3510 addr_set_trace_state_variable_value.
3511 (symbol_list): New fields for get_raw_reg,
3512 get_trace_state_variable_value and set_trace_state_variable_value.
3513 (condfn): New typedef.
3514 (struct tracepoint): New field `compiled_cond'.
3515 (do_action_at_tracepoint): Clear compiled_cond.
3516 (get_trace_state_variable_value, set_trace_state_variable_value):
3518 (condition_true_at_tracepoint): If there's a compiled condition,
3520 (current_insn_ptr, emit_error): New globals.
3521 (struct bytecode_address): New.
3522 (get_raw_reg_func_addr): New.
3523 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3524 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3525 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3526 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3527 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3528 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3529 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3530 (compile_tracepoint_condition, compile_bytecodes): New.
3531 * target.h (emit_ops): Forward declare.
3532 (struct target_ops): New field emit_ops.
3533 (target_emit_ops): New.
3534 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3535 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3536 * linux-low.c (linux_emit_ops): New.
3537 (linux_target_ops): Install it.
3538 * linux-low.h (struct linux_target_ops): New field emit_ops.
3540 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3542 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3543 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3545 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3546 Stan Shebs <stan@codesourcery.com>
3548 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3549 (all): Depend on $(extra_libraries).
3550 (install-only): Install the IPA.
3551 (IPA_OBJS, IPA_LIB): New.
3552 (clean): Remove the IPA lib.
3553 (IPAGENT_CFLAGS): New.
3554 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3555 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3556 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3557 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3558 * configure.ac: Check for atomic builtins support in the compiler.
3559 (IPA_DEPFILES, extra_libraries): Define.
3560 * configure.srv (ipa_obj): Add description.
3561 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3562 (i[34567]86-*-linux*): Set ipa_obj.
3563 (x86_64-*-linux*): Set ipa_obj.
3564 * linux-low.c (stabilizing_threads): New.
3565 (supports_fast_tracepoints): New.
3566 (linux_detach): Stabilize threads before detaching.
3567 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3568 the lwp is either not stabilizing, or is moving out of a jump pad.
3569 (linux_fast_tracepoint_collecting): New.
3570 (maybe_move_out_of_jump_pad): New.
3571 (enqueue_one_deferred_signal): New.
3572 (dequeue_one_deferred_signal): New.
3573 (linux_wait_for_event_1): If moving out of a jump pad, defer
3574 pending signals to later.
3575 (linux_stabilize_threads): New.
3576 (linux_wait_1): Check if threads need moving out of jump pads, and
3578 (stuck_in_jump_pad_callback): New.
3579 (move_out_of_jump_pad_callback): New.
3581 (linux_resume_one_lwp): Handle moving out of jump pads.
3582 (linux_set_resume_request): Dequeue deferred signals.
3583 (need_step_over_p): Also step over fast tracepoint jumps.
3584 (start_step_over): Also uninsert fast tracepoint jumps.
3585 (finish_step_over): Also reinsert fast tracepoint jumps.
3586 (linux_install_fast_tracepoint_jump): New.
3587 (linux_target_ops): Install linux_stabilize_threads and
3588 linux_install_fast_tracepoint_jump_pad.
3589 * linux-low.h (linux_target_ops) <get_thread_area,
3590 install_fast_tracepoint_jump_pad>: New fields.
3591 (struct lwp_info) <collecting_fast_tracepoint,
3592 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3593 (linux_get_thread_area): Declare.
3594 * linux-x86-low.c (jump_insn): New.
3595 (x86_get_thread_area): New.
3596 (append_insns): New.
3598 (amd64_install_fast_tracepoint_jump_pad): New.
3599 (i386_install_fast_tracepoint_jump_pad): New.
3600 (x86_install_fast_tracepoint_jump_pad): New.
3601 (the_low_target): Install x86_get_thread_area and
3602 x86_install_fast_tracepoint_jump_pad.
3603 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3604 (struct fast_tracepoint_jump): New.
3605 (fast_tracepoint_jump_insn): New.
3606 (fast_tracepoint_jump_shadow): New.
3607 (find_fast_tracepoint_jump_at): New.
3608 (fast_tracepoint_jump_here): New.
3609 (delete_fast_tracepoint_jump): New.
3610 (set_fast_tracepoint_jump): New.
3611 (uninsert_fast_tracepoint_jumps_at): New.
3612 (reinsert_fast_tracepoint_jumps_at): New.
3613 (set_breakpoint_at): Use write_inferior_memory.
3614 (uninsert_raw_breakpoint): Use write_inferior_memory.
3615 (check_mem_read): Mask out fast tracepoint jumps.
3616 (check_mem_write): Mask out fast tracepoint jumps.
3617 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3618 (set_fast_tracepoint_jump): Declare.
3619 (delete_fast_tracepoint_jump)
3620 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3621 (reinsert_fast_tracepoint_jumps_at): Declare.
3622 * regcache.c: Don't compile many functions when building the
3623 in-process agent library.
3624 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3625 the register buffer in the heap.
3626 (free_register_cache): If the register buffer isn't owned by the
3627 regcache, don't free it.
3628 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3629 pre-existing register caches.
3630 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3632 (convert_ascii_to_int): : Constify `from' parameter type.
3633 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3634 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3635 the needed buffer in-place.
3636 (relocate_instruction): New.
3637 * server.c (handle_query) <qSymbols>: If the target supports
3638 tracepoints, give it a chance of looking up symbols. Report
3639 support for fast tracepoints.
3640 (handle_status): Stabilize threads.
3641 (process_serial_event): Adjust.
3642 * server.h (struct fast_tracepoint_jump): Forward declare.
3643 (struct process_info) <fast_tracepoint_jumps>: New field.
3644 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3645 (decode_X_packet, decode_M_packet): Adjust.
3646 (relocate_instruction): Declare.
3647 (in_process_agent_loaded): Declare.
3648 (tracepoint_look_up_symbols): Declare.
3649 (struct fast_tpoint_collect_status): Declare.
3650 (fast_tracepoint_collecting): Declare.
3651 (force_unlock_trace_buffer): Declare.
3652 (handle_tracepoint_bkpts): Declare.
3653 (initialize_low_tracepoint)
3654 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3655 * target.h (struct target_ops) <stabilize_threads,
3656 install_fast_tracepoint_jump_pad>: New fields.
3657 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3658 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3659 [HAVE_STDINT_H]: Include stdint.h.
3660 (trace_debug_1): Rename to ...
3661 (trace_vdebug): ... this.
3662 (trace_debug): Rename to ...
3663 (trace_debug_1): ... this. Add `level' parameter.
3665 (ATTR_USED, ATTR_NOINLINE): New.
3666 (IP_AGENT_EXPORT): New.
3667 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3668 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3669 (about_to_request_buffer_space, trace_buffer_is_full)
3670 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3671 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3672 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3673 (traceframe_write_count, traceframes_created)
3674 (trace_state_variables)
3675 New renaming defines.
3676 (struct ipa_sym_addresses): New.
3677 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3679 (ipa_sym_addrs): New.
3680 (all_tracepoint_symbols_looked_up): New.
3681 (in_process_agent_loaded): New.
3682 (write_e_ipa_not_loaded): New.
3683 (maybe_write_ipa_not_loaded): New.
3684 (tracepoint_look_up_symbols): New.
3685 (debug_threads) [IN_PROCESS_AGENT]: New.
3686 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3687 (UNKNOWN_SIDE_EFFECTS): New.
3688 (stop_tracing): New.
3689 (flush_trace_buffer): New.
3690 (stop_tracing_bkpt): New.
3691 (flush_trace_buffer_bkpt): New.
3692 (read_inferior_integer): New.
3693 (read_inferior_uinteger): New.
3694 (read_inferior_data_pointer): New.
3695 (write_inferior_data_pointer): New.
3696 (write_inferior_integer): New.
3697 (write_inferior_uinteger): New.
3698 (struct collect_static_trace_data_action): Delete.
3699 (enum tracepoint_type): New.
3700 (struct tracepoint) <type>: New field `type'.
3701 <actions_str, step_actions, step_actions_str>: Only include in
3703 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3704 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3705 (tracepoints): Use IP_AGENT_EXPORT.
3706 (last_tracepoint): Don't include in the IPA.
3707 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3708 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3709 (alloced_trace_state_variables): New.
3710 (trace_state_variables): Use IP_AGENT_EXPORT.
3711 (traceframe_t): Delete unused variable.
3712 (circular_trace_buffer): Don't include in the IPA.
3713 (trace_buffer_start): Delete.
3714 (struct trace_buffer_control): New.
3715 (trace_buffer_free): Delete.
3716 (struct ipa_trace_buffer_control): New.
3717 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3718 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3720 (trace_buffer_ctrl): New.
3721 (TRACE_BUFFER_CTRL_CURR): New.
3722 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3723 Reimplement as macros.
3724 (trace_buffer_wrap): Delete.
3725 (traceframe_write_count, traceframe_read_count)
3726 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3727 (struct tracepoint_hit_ctx) <type>: New field.
3728 (struct fast_tracepoint_ctx): New.
3729 (memory_barrier): New.
3731 (record_tracepoint_error): Update atomically in the IPA.
3732 (clear_inferior_trace_buffer): New.
3733 (about_to_request_buffer_space): New.
3734 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3735 updating the same buffer.
3736 (add_tracepoint): Default the tracepoint's type to trap
3737 tracepoint, and orig_size to -1.
3738 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3740 (create_trace_state_variable): New parameter `gdb'. Handle it.
3741 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3742 (cmd_qtdp): Handle fast tracepoints.
3744 (max_jump_pad_size): New.
3745 (gdb_jump_pad_head): New.
3746 (get_jump_space_head): New.
3747 (claim_jump_space): New.
3748 (sort_tracepoints): New.
3749 (MAX_JUMP_SIZE): New.
3750 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3752 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3753 support. Upload fast traceframes, and delete internal IPA
3755 (stop_tracing_handler): New.
3756 (flush_trace_buffer_handler): New.
3757 (cmd_qtstop): Upload fast tracepoints.
3758 (response_tracepoint): Handle fast tracepoints.
3759 (tracepoint_finished_step): Upload fast traceframes. Set the
3760 tracepoint hit context's tracepoint type.
3761 (handle_tracepoint_bkpts): New.
3762 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3763 type. Add comment about fast tracepoints.
3764 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3765 non-existing action_str field.
3766 (get_context_regcache): Handle fast tracepoints.
3767 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3769 (fast_tracepoint_from_jump_pad_address): New.
3770 (fast_tracepoint_from_ipa_tpoint_address): New.
3771 (collecting_t): New.
3772 (force_unlock_trace_buffer): New.
3773 (fast_tracepoint_collecting): New.
3776 (write_inferior_data_ptr): New.
3777 (target_tp_heap): New.
3778 (target_malloc): New.
3779 (download_agent_expr): New.
3781 (download_tracepoints): New.
3782 (download_trace_state_variables): New.
3783 (upload_fast_traceframes): New.
3784 (IPA_FIRST_TRACEFRAME): New.
3785 (IPA_NEXT_TRACEFRAME_1): New.
3786 (IPA_NEXT_TRACEFRAME): New.
3787 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3788 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3789 (gdb_jump_pad_buffer_end): New.
3790 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3791 (initialize_tracepoint): Adjust.
3792 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3793 buffer. Initialize the low module.
3794 * utils.c (PREFIX, TOOLNAME): New.
3795 (malloc_failure): Use PREFIX.
3796 (error): In the IPA, an error causes an exit.
3797 (fatal, warning): Use PREFIX.
3798 (internal_error): Use TOOLNAME.
3799 (NUMCELLS): Increase to 10.
3800 * configure, config.in: Regenerate.
3802 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3804 * server.c (handle_query) <qSupported>: Do two passes over the
3805 qSupported string to avoid nesting strtok.
3807 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3809 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3811 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3813 * configure: Regenerate.
3814 * proc-service.list: New.
3816 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3818 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3821 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3823 * gdbreplay.c (remote_open): Check error return from socket() call by
3824 its equality to -1 not by it being negative.
3825 * remote-utils.c (remote_open): Likewise.
3827 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3829 * config.h: Regenerate.
3831 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3833 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3834 doesn't provide PTRACE_GET_THREAD_AREA.
3836 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3838 * linux-m68k-low.c: Include <asm/ptrace.h>
3839 (ps_get_thread_area): Implement.
3841 2010-05-03 Doug Evans <dje@google.com>
3843 * event-loop.c (struct callback_event): New struct.
3844 (callback_list): New global.
3845 (append_callback_event, delete_callback_event): New functions.
3846 (process_callback): New function.
3847 (start_event_loop): Call it.
3848 * remote-utils.c (NOT_SCHEDULED): Define.
3849 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3850 moved out of readchar.
3851 (readchar): Rewrite. Call reschedule before returning.
3852 (reset_readchar): New function.
3853 (remote_close): Call it.
3854 (process_remaining, reschedule): New functions.
3855 * server.h (callback_handler_func): New typedef.
3856 (append_callback_event, delete_callback_event): Declare.
3858 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3860 * proc-service.c (ps_pglobal_lookup): Use
3861 thread_db_look_up_one_symbol.
3862 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3863 parameter. Use it instead of all_symbols_looked_up.
3864 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3866 (all_symbols_looked_up): Don't declare.
3867 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3868 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3870 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3871 Set all_symbols_looked_up here.
3872 (thread_db_look_up_one_symbol): New.
3873 (thread_db_get_tls_address): Adjust.
3874 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3875 thread_db object on the heap, and tentatively set it in the
3877 (thread_db_init): Don't set all_symbols_looked_up here.
3878 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3880 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3882 * linux-low.c (linux_kill, linux_detach): Adjust.
3883 (status_pending_p_callback): Remove redundant statement. Check
3884 for !TARGET_WAITIKIND_IGNORE, instead of
3885 TARGET_WAITKIND_STOPPED.
3886 (handle_tracepoints): Make sure LWP is locked. Adjust.
3887 (linux_wait_for_event_1): Adjust.
3888 (linux_cancel_breakpoints): New.
3889 (unsuspend_one_lwp): New.
3890 (unsuspend_all_lwps): New.
3891 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3892 (send_sigstop_callback): Change return type to int, add new
3893 `except' parameter and handle it.
3894 (suspend_and_send_sigstop_callback): New.
3895 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3896 pass them down. If SUSPEND, also increment the lwp's suspend
3898 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3899 (need_step_over_p): Don't consider suspended LWPs.
3900 (start_step_over): Adjust.
3901 (proceed_one_lwp): Change return type to int, add new `except'
3902 parameter and handle it.
3903 (unsuspend_and_proceed_one_lwp): New.
3904 (proceed_all_lwps): Use find_inferior instead of
3906 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3907 also decrement the suspend count of LWPs. Pass `except' down,
3908 instead of hacking its suspend count.
3909 (linux_pause_all): Add `freeze' parameter. Adjust.
3910 (linux_unpause_all): New.
3911 (linux_target_ops): Install linux_unpause_all.
3912 * server.c (handle_status): Adjust.
3913 * target.h (struct target_ops): New fields `unpause_all' and
3914 `cancel_breakpoints'. Add new parameter to `pause_all'.
3915 (pause_all): Add new `freeze' parameter.
3917 (cancel_breakpoints): New.
3918 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3920 (cmd_qtstart): Pause threads.
3921 (stop_tracing): Pause threads, and cancel breakpoints.
3922 * win32-low.c (win32_target_ops): Adjust.
3924 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3926 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3927 the inferior right away from here...
3928 (linux_wait_1): ... to here, and adjust to check the thread's
3929 last_resume_kind instead of the lwp's step or stop_expected flags.
3931 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3933 * README: Use consistent `GDB' and `GDBserver' spellings.
3935 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3937 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3938 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3939 (linux_detach_one_lwp): Assume the lwp is stopped.
3940 (any_thread_of): Delete.
3941 (linux_detach): Stop all lwps here. Don't blindly delete all
3943 (delete_lwp_callback): New.
3944 (linux_mourn): Delete all lwps of the process that is gone.
3945 (linux_wait_1): Don't delete the last lwp of the process here.
3946 * mem-break.h (mark_breakpoints_out): Declare.
3947 * mem-break.c (mark_breakpoints_out): New.
3948 (free_all_breakpoints): Use it.
3949 * server.c (handle_target_event): If the process is gone, mark
3951 * thread-db.c (struct thread_db) <create_bp>: New field.
3952 (thread_db_enable_reporting): Fix prototype. Store a thread event
3953 breakpoint reference in the thread_db struct.
3954 (thread_db_load_search): Clear the thread_db object.
3955 (try_thread_db_load_1): Ditto.
3956 (switch_to_process): New.
3957 (disable_thread_event_reporting): Use it.
3958 (remove_thread_event_breakpoints): New.
3959 (thread_db_detach, thread_db_mourn): Use it.
3961 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3963 * linux-low.c (linux_enable_event_reporting): New.
3964 (linux_wait_for_event_1, handle_extended_wait): Use it.
3966 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3968 * linux-low.c (linux_kill_one_lwp, linux_kill)
3969 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3970 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3971 SIGSTOP even if the LWP is stopped.
3972 (send_sigstop_callback): New.
3973 (stop_all_lwps): Use send_sigstop_callback instead.
3974 (linux_resume_one_thread): Adjust.
3975 (proceed_one_lwp): Still proceed an LWP that the client has
3976 requested to stop, if we haven't reported it as stopped yet. Make
3977 sure that LWPs the client want stopped, have a pending SIGSTOP.
3979 2010-04-26 Doug Evans <dje@google.com>
3981 * server.c (handle_general_set): Make static.
3983 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3984 Print received char after testing for error/eof instead of before.
3985 (input_interrupt): Tweak comment.
3987 2010-04-23 Doug Evans <dje@google.com>
3989 * server.c (start_inferior): Print inferior argv if --debug.
3991 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3993 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3994 * nto-x86-low.c: Include server.h
3996 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3998 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3999 be consistent with other sources of this directory.
4000 (init_registers_amd64): Correct name of source file of this function
4003 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4005 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4008 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4010 * win32-i386-low.c: Add 64-bit support.
4011 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4012 (init_registers_amd64): Declare.
4013 (mappings): Add 64-bit version of array.
4014 (init_windows_x86): New function.
4015 (the_low_target): Change init_arch field to init_windows_x86.
4017 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4019 * win32-low.c: Adapt to support also 64-bit architecture.
4020 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4021 (get_image_name): Use SIZE_T type for local variable `done'.
4022 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4023 (toolhelp_get_dll_name): Idem.
4024 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4025 Use uintptr_t typecast to avoid warning.
4026 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4027 (handle_exception): Use phex_nz to avoid warning.
4028 (win32_wait): Remove unused local variable `process'.
4030 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4032 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4035 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4037 * configure.ac: Use `ws2_32' library for srv_mingw.
4038 * configure: Regenerate.
4039 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4040 * remote-utils.c: Likewise.
4042 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4044 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4045 if __x86_64__ is defined.
4047 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4049 * configure: Regenerate.
4051 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4053 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4054 * target.h (target_ops): New get_tib_address field.
4055 * win32-low.h (win32_thread_info): Add thread_local_base field.
4056 * win32-low.c (child_add_thread): Add tlb argument.
4057 Set thread_local_base field to TLB.
4058 (get_child_debug_event): Adapt to child_add_thread change.
4059 (win32_get_tib_address): New function.
4060 (win32_target_ops): Set get_tib_address field to
4061 win32_get_tib_address.
4062 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4064 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4066 * linux-low.c (linux_mourn): Also remove the process.
4067 * server.c (handle_target_event): Don't remove the process here.
4068 * nto-low.c (nto_mourn): New.
4069 (nto_target_ops): Install it.
4070 * spu-low.c (spu_mourn): New.
4071 (spu_target_ops): Install it.
4072 * win32-low.c (win32_mourn): New.
4073 (win32_target_ops): Install it.
4075 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4077 * server.h (buffer_xml_printf): Remove redundant `;'.
4079 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4081 * regcache.c (set_register_cache): Invalidate regcaches before
4082 changing the register cache layout.
4083 (regcache_invalidate_one): Allow a NULL regcache.
4084 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4085 regcaches before changing the register cache layout or the target
4088 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4090 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4091 variable warning on Linux/x86-64.
4093 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4095 GDBserver disconnected tracing support.
4097 * linux-low.c (linux_remove_process): Delete.
4098 (add_lwp): Don't set last_resume_kind here.
4099 (linux_kill): Use `mourn'.
4100 (linux_detach): Use `thread_db_detach', and `mourn'.
4102 (linux_attach_lwp_1): Adjust comment.
4103 (linux_attach): last_resume_kind moved the thread_info; adjust.
4104 (status_pending_p_callback): Adjust.
4105 (linux_wait_for_event_1): Adjust.
4106 (count_events_callback, select_singlestep_lwp_callback)
4107 (select_event_lwp_callback, cancel_breakpoints_callback)
4108 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4109 (proceed_one_lwp): Adjust.
4110 (linux_async): Add debug output.
4111 (linux_thread_stopped): New.
4112 (linux_pause_all): New.
4113 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4115 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4116 (thread_db_free): Delete declaration.
4117 (thread_db_detach, thread_db_mourn): Declare.
4118 * thread-db.c (thread_db_init): Use thread_db_mourn.
4119 (thread_db_free): Delete, split in two.
4120 (disable_thread_event_reporting): New.
4121 (thread_db_detach): New.
4122 (thread_db_mourn): New.
4124 * server.h (struct thread_info) <last_resume_kind>: New field.
4125 <attached>: Add comment.
4126 <gdb_detached>: New field.
4127 (handler_func): Change return type to int.
4128 (handle_serial_event, handle_target_event): Ditto.
4129 (gdb_connected): Declare.
4131 (disconnected_tracing): Declare.
4132 (stop_tracing): Declare.
4134 * server.c (handle_query) <qSupported>: Report support for
4135 disconnected tracing.
4136 (queue_stop_reply_callback): Account for running threads.
4137 (gdb_wants_thread_stopped): New.
4138 (gdb_wants_all_threads_stopped): New.
4139 (gdb_reattached_process): New.
4140 (handle_status): Clear the `gdb_detached' flag of all processes.
4141 In all-stop, stop all threads.
4142 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4143 (process_serial_event): If the remote connection breaks, or if an
4144 exit was forced with "monitor exit", force an event loop exit.
4145 Handle disconnected tracing on detach.
4146 (handle_serial_event): Adjust.
4147 (handle_target_event): If GDB isn't connected, forward events back
4148 to the inferior, unless the last process exited, in which case,
4149 exit gdbserver. Adjust interface.
4151 * remote-utils.c (remote_open): Don't block in accept. Instead
4152 register an event loop source on the listen socket file
4153 descriptor. Refactor bits into ...
4154 (listen_desc): ... this new global.
4155 (gdb_connected): ... this new function.
4156 (enable_async_notification): ... this new function.
4157 (handle_accept_event): ... this new function.
4158 (remote_close): Clear remote_desc.
4160 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4162 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4164 (mourn_inferior): Define.
4165 (target_process_qsupported): Avoid the dangling else problem.
4166 (thread_stopped): Define.
4167 (pause_all): Define.
4168 (target_waitstatus_to_string): Declare.
4169 * target.c (target_waitstatus_to_string): New.
4171 * tracepoint.c (tracing): Make extern.
4172 (disconnected_tracing): New.
4173 (stop_tracing): Make extern. Handle tracing stops due to GDB
4175 (cmd_qtdisconnected): New.
4176 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4177 (handle_tracepoint_general_set): Handle QTDisconnected.
4179 * event-loop.c (event_handler_func): Change return type to int.
4180 (process_event): Bail out if the event handler wants the event
4182 (handle_file_event): Ditto.
4183 (start_event_loop): Bail out if the event handler wants the event
4186 * nto-low.c (nto_target_ops): Adjust.
4187 * spu-low.c (spu_wait): Don't remove the process here.
4188 (spu_target_ops): Adjust.
4189 * win32-low.c (win32_wait): Don't remove the process here.
4190 (win32_target_ops): Adjust.
4192 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4194 * regcache.c (realloc_register_cache): Invalidate inferior's
4195 regcache before recreating it.
4197 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4199 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4201 2010-04-09 Stan Shebs <stan@codesourcery.com>
4202 Pedro Alves <pedro@codesourcery.com>
4204 * server.h (LONGEST): New.
4205 (struct thread_info) <while_stepping>: New field.
4206 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4208 (initialize_tracepoint, handle_tracepoint_general_set)
4209 (handle_tracepoint_query, tracepoint_finished_step)
4210 (tracepoint_was_hit, release_while_stepping_state_list):
4211 (current_traceframe): Declare.
4212 * server.c (handle_general_set): Handle tracepoint packets.
4214 (write_memory): New.
4215 (handle_search_memory_1): Use read_memory.
4216 (handle_query): Report support for conditional tracepoints, trace
4217 state variables, and tracepoint sources. Handle tracepoint
4219 (main): Initialize the tracepoints module.
4220 (process_serial_event): Handle traceframe reads/writes.
4222 * linux-low.c (handle_tracepoints): New.
4223 (linux_wait_1): Call it.
4224 (linux_resume_one_lwp): Handle while-stepping.
4225 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4226 (linux_target_ops): Install them.
4227 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4229 * linux-x86-low.c (x86_supports_tracepoints): New.
4230 (the_low_target). Install it.
4232 * mem-break.h (delete_breakpoint): Declare.
4233 * mem-break.c (delete_breakpoint): Make external.
4235 * target.h (struct target_ops): Add `supports_tracepoints',
4236 `read_pc', and `write_pc' fields.
4237 (target_supports_tracepoints): Define.
4238 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4241 * regcache.h (struct regcache) <registers_owned>: New field.
4242 (init_register_cache, regcache_cpy): Declare.
4243 (regcache_read_pc, regcache_write_pc): Declare.
4244 (register_cache_size): Declare.
4245 (supply_regblock): Declare.
4246 * regcache.c (init_register_cache): New.
4247 (new_register_cache): Use it.
4248 (regcache_cpy): New.
4249 (register_cache_size): New.
4250 (supply_regblock): New.
4251 (regcache_read_pc, regcache_write_pc): New.
4253 * tracepoint.c: New.
4255 * Makefile.in (OBS): Add tracepoint.o.
4256 (tracepoint.o): New rule.
4258 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4260 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4262 (i386-mmx.c): Likewise.
4263 (i386-mmx-linux.o): Likewise.
4264 (i386-mmx-linux.c): Likewise.
4266 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4267 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4268 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4269 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4271 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4272 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4273 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4275 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4277 * Makefile.in (clean): Updated.
4279 (i386-avx.c): Likewise.
4280 (i386-avx-linux.o): Likewise.
4281 (i386-avx-linux.c): Likewise.
4282 (amd64-avx.o): Likewise.
4283 (amd64-avx.c): Likewise.
4284 (amd64-avx-linux.o): Likewise.
4285 (amd64-avx-linux.c): Likewise.
4287 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4288 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4289 (srv_amd64_regobj): Add amd64-avx.o.
4290 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4291 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4292 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4293 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4294 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4295 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4296 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4298 * i387-fp.c: Include "i386-xstate.h".
4300 (i387_cache_to_xsave): Likewise.
4301 (i387_xsave_to_cache): Likewise.
4302 (x86_xcr0): Likewise.
4304 * i387-fp.h (i387_cache_to_xsave): Likewise.
4305 (i387_xsave_to_cache): Likewise.
4306 (x86_xcr0): Likewise.
4308 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4309 * linux-crisv32-low.c (target_regsets): Likewise.
4310 * linux-m68k-low.c (target_regsets): Likewise.
4311 * linux-mips-low.c (target_regsets): Likewise.
4312 * linux-ppc-low.c (target_regsets): Likewise.
4313 * linux-s390-low.c (target_regsets): Likewise.
4314 * linux-sh-low.c (target_regsets): Likewise.
4315 * linux-sparc-low.c (target_regsets): Likewise.
4316 * linux-xtensa-low.c (target_regsets): Likewise.
4318 * linux-low.c: Include <sys/uio.h>.
4319 (regsets_fetch_inferior_registers): Support nt_type.
4320 (regsets_store_inferior_registers): Likewise.
4321 (linux_process_qsupported): New.
4322 (linux_target_ops): Add linux_process_qsupported.
4324 * linux-low.h (regset_info): Add nt_type.
4325 (linux_target_ops): Add process_qsupported.
4327 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4329 (init_registers_i386_avx_linux): New.
4330 (init_registers_amd64_avx_linux): Likewise.
4331 (xmltarget_i386_linux_no_xml): Likewise.
4332 (xmltarget_amd64_linux_no_xml): Likewise.
4333 (PTRACE_GETREGSET): Likewise.
4334 (PTRACE_SETREGSET): Likewise.
4335 (x86_fill_xstateregset): Likewise.
4336 (x86_store_xstateregset): Likewise.
4337 (use_xml): Likewise.
4338 (x86_linux_update_xmltarget): Likewise.
4339 (x86_linux_process_qsupported): Likewise.
4340 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4341 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4342 init_registers_i386_linux here. Call
4343 x86_linux_update_xmltarget.
4344 (the_low_target): Add x86_linux_process_qsupported.
4346 * server.c (handle_query): Call target_process_qsupported.
4348 * target.h (target_ops): Add process_qsupported.
4349 (target_process_qsupported): New.
4351 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4353 * inferiors.c (add_thread): Set last_status kind to
4354 TARGET_WAITKIND_IGNORE.
4355 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4356 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4357 (linux_wait_1): Move `thread' local definition to block that uses
4358 it. Don't NULL initialize `event_child'.
4359 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4360 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4361 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4363 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4365 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4366 an extended waitstatus, or by a watchpoint.
4367 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4368 thread was stepping or has been stopped by a watchpoint.
4370 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4372 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4373 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4374 of another, then delete the previous, and validate all
4376 (validate_inserted_breakpoint): New.
4377 (delete_disabled_breakpoints): New.
4378 (validate_breakpoints): New.
4379 (check_mem_read): Validate breakpoints before trusting their
4380 shadow. Delete disabled breakpoints.
4381 (check_mem_write): Validate breakpoints before trusting they
4382 should be inserted. Delete disabled breakpoints.
4383 * mem-break.h (validate_breakpoints):
4384 * server.c (handle_query): Validate breakpoints when we see a
4387 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4389 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4390 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4391 if we could tell there's a GDB breakpoint at stop_pc.
4392 (need_step_over_p): Don't do a step over if we find a GDB
4393 breakpoint at the resume PC.
4395 * mem-break.c (struct raw_breakpoint): New.
4396 (enum bkpt_type): New type `gdb_breakpoint'.
4397 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4398 fields. New field `raw'.
4399 (find_raw_breakpoint_at): New.
4400 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4402 (set_breakpoint_at): Adjust.
4403 (delete_raw_breakpoint): New.
4404 (release_breakpoint): New.
4405 (delete_breakpoint): Rename to...
4406 (delete_breakpoint_1): ... this. Add proc parameter. Use
4407 release_breakpoint. Return ENOENT.
4408 (delete_breakpoint): Reimplement.
4409 (find_breakpoint_at): Delete.
4410 (find_gdb_breakpoint_at): New.
4411 (delete_breakpoint_at): Delete.
4412 (set_gdb_breakpoint_at): New.
4413 (delete_gdb_breakpoint_at): New.
4414 (gdb_breakpoint_here): New.
4415 (set_reinsert_breakpoint): Use release_breakpoint.
4416 (uninsert_breakpoint): Rename to ...
4417 (uninsert_raw_breakpoint): ... this.
4418 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4419 (reinsert_raw_breakpoint): Change parameter type to
4421 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4423 (check_breakpoints): Adjust. Use release_breakpoint.
4424 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4425 (breakpoint_inserted_here): Ditto.
4426 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4427 Don't trust the breakpoint's shadow if it is not inserted.
4428 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4429 (delete_all_breakpoints): Adjust.
4430 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4431 use delete_breakpoint_1.
4433 * mem-break.h (breakpoints_supported): Delete declaration.
4434 (set_gdb_breakpoint_at): Declare.
4435 (gdb_breakpoint_here): Declare.
4436 (delete_breakpoint_at): Delete.
4437 (delete_gdb_breakpoint_at): Declare.
4439 * server.h (struct raw_breakpoint): Forward declare.
4440 (struct process_info): New field `raw_breakpoints'.
4442 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4445 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4447 * linux-low.c (status_pending_p_callback): Fix comment.
4448 (linux_wait_for_event_1): Move most of the internal breakpoint
4449 handling from here...
4450 (linux_wait_1): ... to here.
4451 (count_events_callback): New.
4452 (select_singlestep_lwp_callback): New.
4453 (select_event_lwp_callback): New.
4454 (cancel_breakpoints_callback): New.
4455 (select_event_lwp): New.
4456 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4457 priority to all LWPs that have had events that should be reported
4458 to the client. Cancel breakpoints when about to reporting the
4459 event to the client, not while stopping lwps. No longer cancel
4460 finished single-steps here.
4461 (cancel_finished_single_step): Delete.
4462 (cancel_finished_single_steps): Delete.
4464 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4466 * mem-break.c (enum bkpt_type): New.
4467 (struct breakpoint): New field `type'.
4468 (set_breakpoint_at): Change return type to struct breakpoint
4469 pointer. Set type to `other_breakpoint' by default.
4470 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4471 in the breakpoint list.
4472 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4473 (reinsert_breakpoint): Rename to ...
4474 (reinsert_raw_breakpoint): ... this.
4475 (reinsert_breakpoints_at): Adjust.
4476 * mem-break.h (struct breakpoint): Declare.
4477 (set_breakpoint_at): Change return type to struct breakpoint
4480 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4482 * server.c (handle_query): Assign, not compare.
4484 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4486 Teach linux gdbserver to step-over-breakpoints.
4488 * linux-low.c (can_hardware_single_step): New.
4489 (supports_breakpoints): New.
4490 (handle_extended_wait): If stopping threads, read the stop pc of
4493 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4494 low target doesn't support retrieving the PC.
4495 (add_lwp): Set last_resume_kind to resume_continue.
4496 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4497 (linux_attach): Don't clear stop_expected. Set the lwp's
4498 last_resume_kind to resume_stop.
4499 (linux_detach_one_lwp): Don't check for removed breakpoints.
4500 (check_removed_breakpoint): Delete.
4501 (status_pending_p): Rename to ...
4502 (status_pending_p_callback): ... this. Don't check for removed
4503 breakpoints. Don't consider threads that are stopped from GDB's
4505 (linux_wait_for_lwp): Always read the stop_pc here.
4506 (cancel_breakpoint): New.
4507 (step_over_bkpt): New global.
4508 (linux_wait_for_event_1): Implement stepping over breakpoints.
4509 (gdb_wants_lwp_stopped): New.
4510 (gdb_wants_all_stopped): New.
4511 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4512 single-step traps here. Store the thread's last reported target
4514 (send_sigstop): Don't clear stop_expected. Always set it,
4516 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4517 (cancel_finished_single_step): New.
4518 (cancel_finished_single_steps): New.
4519 (wait_for_sigstop): Don't cancel finished single-step traps here.
4520 (linux_resume_one_lwp): Don't check for removed breakpoints.
4521 Don't set `step' on non-hardware step archs.
4522 (linux_set_resume_request): Ignore resume_stop requests if already
4523 stopping or stopped. Set the lwp's last_resume_kind.
4524 (resume_status_pending_p): Don't check for removed breakpoints.
4525 (need_step_over_p): New.
4526 (start_step_over): New.
4527 (finish_step_over): New.
4528 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4529 requests. Clear the thread's last reported target waitstatus.
4530 Don't use the `suspended' flag. Don't consider pending breakpoints.
4531 (linux_resume): Start a step-over if necessary.
4532 (proceed_one_lwp): New.
4533 (proceed_all_lwps): New.
4534 (unstop_all_lwps): New.
4535 * linux-low.h (struct lwp_info): Rewrite comment for the
4536 `suspended' flag. Add the `stop_pc' field. Delete the
4537 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4538 Add `'last_resume_kind' and `need_step_over' fields.
4539 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4540 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4541 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4542 (set_raw_breakpoint_at): New.
4543 (set_breakpoint_at): Rewrite to use it.
4544 (reinsert_breakpoint_handler): Delete.
4545 (set_reinsert_breakpoint): New.
4546 (reinsert_breakpoint_by_bp): Delete.
4547 (delete_reinsert_breakpoints): New.
4548 (uninsert_breakpoint): Rewrite.
4549 (uninsert_breakpoints_at): New.
4550 (reinsert_breakpoint): Rewrite.
4551 (reinsert_breakpoints_at): New.
4552 (check_breakpoints): Rewrite.
4553 (breakpoint_here): New.
4554 (breakpoint_inserted_here): New.
4555 (check_mem_read): Adjust.
4556 * mem-break.h (breakpoints_supported, breakpoint_here)
4557 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4558 (reinsert_breakpoint_by_bp): Delete declaration.
4559 (delete_reinsert_breakpoints): Declare.
4560 (reinsert_breakpoint): Delete declaration.
4561 (reinsert_breakpoints_at): Declare.
4562 (uninsert_breakpoint): Delete declaration.
4563 (uninsert_breakpoints_at): Declare.
4564 (check_breakpoints): Adjust prototype.
4565 * server.h: Adjust include order.
4566 (struct thread_info): Declare here. Add a `last_status' field.
4568 2010-03-23 Michael Snyder <msnyder@vmware.com>
4570 * server.c (crc32): New function.
4571 (handle_query): Add handling for 'qCRC:' request.
4573 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4575 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4576 lwp had been stopped by a watchpoint.
4578 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4580 * server.h (internal_error): Declare.
4581 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4582 * utils.c (internal_error): New function.
4584 2010-03-15 Andreas Schwab <schwab@redhat.com>
4586 * configure.srv: Fix typo setting srv_regobj.
4588 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4590 * linux-low.c (fetch_register): Avoid passing a non string literal
4592 (usr_store_inferior_registers): Ditto.
4594 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4596 * linux-low.c (linux_write_memory): Bail out early if peeking
4599 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4601 * linux-low.h (struct lwp_info): New fields
4602 `stopped_by_watchpoint' and `stopped_data_address'.
4603 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4604 here, and cache them in the lwp object.
4605 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4607 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4609 (linux_stopped_by_watchpoint): Rewrite.
4610 (linux_stopped_data_address): Rewrite.
4612 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4614 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4615 switching the current inferior, not before.
4617 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4619 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4620 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4621 i386-linux.c and amd64-linux.c.
4622 (reg-i386.o): Removed.
4623 (reg-i386.c): Likewise.
4624 (reg-i386-linux.o): Likewise.
4625 (reg-i386-linux.c): Likewise.
4626 (reg-x86-64.o): Likewise.
4627 (reg-x86-64.c): Likewise.
4628 (reg-x86-64-linux.o): Likewise.
4629 (reg-x86-64-linux.c): Likewise.
4632 (i386-linux.o): Likewise.
4633 (i386-linux.c): Likewise.
4634 (amd64.o): Likewise.
4635 (amd64.c): Likewise.
4636 (amd64-linux.o): Likewise.
4637 (amd64-linux.c): Likewise.
4639 * configure.srv (srv_i386_regobj): New.
4640 (srv_i386_linux_regobj): Likewise.
4641 (srv_amd64_regobj): Likewise.
4642 (srv_amd64_linux_regobj): Likewise.
4643 (srv_i386_32bit_xmlfiles): Likewise.
4644 (srv_i386_64bit_xmlfiles): Likewise.
4645 (srv_i386_xmlfiles): Likewise.
4646 (srv_amd64_xmlfiles): Likewise.
4647 (srv_i386_linux_xmlfiles): Likewise.
4648 (srv_amd64_linux_xmlfiles): Likewise.
4649 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4650 srv_xmlfiles to $srv_i386_xmlfiles.
4651 (i[34567]86-*-mingw32ce*): Likewise.
4652 (i[34567]86-*-mingw*): Likewise.
4653 (i[34567]86-*-nto*): Likewise.
4654 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4655 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4656 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4657 (x86_64-*-linux*): Likewise.
4659 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4660 (init_registers_amd64_linux): New.
4661 (x86_arch_setup): Replace init_registers_x86_64_linux with
4662 init_registers_amd64_linux.
4664 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4666 * configure.ac: Check for libdl. If it is not available link against
4667 static libthread_db.
4668 * configure: Regenerate.
4670 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4674 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4675 handing a read watchpoint.
4676 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4678 2010-02-12 Doug Evans <dje@google.com>
4680 * linux-low.c (linux_supports_tracefork_flag): Document.
4681 (linux_look_up_symbols): Add comment.
4683 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4685 * regcache.c (supply_register): Clear regcache if buf is NULL.
4687 2010-02-02 Nicolas Roche <roche@sourceware.org>
4688 Joel Brobecker <brobecker@adacore.com>
4690 * inferiors.c (find_inferior): Add function documentation.
4691 (unloaded_dll): Handle the case where the unloaded dll has not
4692 been previously registered in the dll list.
4694 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4696 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4697 (thumb2_breakpoint): New.
4698 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4700 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4702 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4703 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4706 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4708 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4710 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4712 * linux-s390-low.c (s390_collect_ptrace_register)
4713 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4715 2010-01-21 Doug Evans <dje@google.com>
4717 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4718 (PTRACE_ARG4_TYPE): New macro.
4719 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4720 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4721 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4722 (usr_store_inferior_registers): Ditto.
4723 (linux_read_memory, linux_write_memory): Ditto.
4724 (linux_test_for_tracefork): Ditto.
4726 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4727 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4729 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4731 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4734 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4736 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4737 prototype to take a regcache. Adjust.
4739 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4741 * regcache.h (struct thread_info): Forward declare.
4742 (struct regcache): New.
4743 (new_register_cache): Adjust prototype.
4744 (get_thread_regcache): Declare.
4745 (free_register_cache): Adjust prototype.
4746 (registers_to_string, registers_from_string): Ditto.
4747 (supply_register, supply_register_by_name, collect_register)
4748 (collect_register_as_string, collect_register_by_name): Ditto.
4749 * regcache.c (struct inferior_regcache_data): Delete.
4750 (get_regcache): Rename to ...
4751 (get_thread_regcache): ... this. Adjust. Switch inferior before
4753 (regcache_invalidate_one): Adjust.
4754 (regcache_invalidate): Fix prototype.
4755 (new_register_cache): Return the new register cache.
4756 (free_register_cache): Change prototype.
4757 (realloc_register_cache): Adjust.
4758 (registers_to_string): Change prototype to take a regcache. Adjust.
4759 (registers_from_string): Ditto.
4760 (register_data): Ditto.
4761 (supply_register): Ditto.
4762 (supply_register_by_name): Ditto.
4763 (collect_register): Ditto.
4764 (collect_register_as_string): Ditto.
4765 (collect_register_by_name): Ditto.
4766 * server.c (process_serial_event): Adjust.
4767 * linux-low.h (regset_fill_func, regset_store_func): Change
4769 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4771 * linux-low.c (get_stop_pc): Adjust.
4772 (check_removed_breakpoint): Adjust.
4773 (linux_wait_for_event): Adjust.
4774 (linux_resume_one_lwp): Adjust.
4775 (fetch_register): Add regcache parameter. Adjust.
4776 (usr_store_inferior_registers): Ditto.
4777 (regsets_fetch_inferior_registers): Ditto.
4778 (regsets_store_inferior_registers): Ditto.
4779 (linux_fetch_registers, linux_store_registers): Ditto.
4780 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4782 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4784 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4785 prototype to take a regcache.
4786 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4787 * remote-utils.c (convert_ascii_to_int, outreg)
4788 (prepare_resume_reply): Change prototype to take a regcache.
4790 * target.h (struct target_ops) <fetch_registers, store_registers>:
4791 Change prototype to take a regcache.
4792 (fetch_inferior_registers, store_inferior_registers): Change
4793 prototype to take a regcache. Adjust.
4794 * proc-service.c (ps_lgetregs): Adjust.
4795 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4796 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4797 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4798 take a regcache. Adjust.
4799 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4800 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4801 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4802 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4803 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4804 (cris_cannot_fetch_register):
4805 (cris_breakpoint_at): Change prototype to take a regcache.
4807 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4808 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4809 to take a regcache. Adjust.
4810 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4812 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4813 take a regcache. Adjust.
4814 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4815 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4816 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4817 * linux-mips-low.c (mips_get_pc):
4818 (mips_set_pc): Change prototype to take a regcache. Adjust.
4819 (mips_reinsert_addr): Adjust.
4820 (mips_collect_register): Change prototype to take a regcache.
4822 (mips_supply_register):
4823 (mips_collect_register_32bit, mips_supply_register_32bit)
4824 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4825 (mips_store_fpregset): Ditto.
4826 * linux-ppc-low.c (ppc_supply_ptrace_register)
4827 (ppc_supply_ptrace_register): Ditto.
4828 (parse_spufs_run): Adjust.
4829 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4830 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4831 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4832 take a regcache. Adjust.
4833 * linux-s390-low.c (s390_collect_ptrace_register)
4834 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4835 (s390_set_pc): Change prototype to take a regcache. Adjust.
4836 (s390_arch_setup): Adjust.
4837 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4838 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4839 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4840 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4841 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4843 (sparc_breakpoint_at): Adjust.
4844 * linux-xtensa-low.c (xtensa_fill_gregset):
4845 (xtensa_store_gregset):
4846 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4847 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4848 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4849 prototype to take a regcache. Adjust.
4850 * win32-arm-low.c (arm_fetch_inferior_register)
4851 (arm_store_inferior_register): Change prototype to take a
4853 * win32-i386-low.c (i386_fetch_inferior_register)
4854 (i386_store_inferior_register): Change prototype to take a
4856 * win32-low.c (child_fetch_inferior_registers)
4857 (child_store_inferior_registers): Change prototype to take a
4859 (win32_wait): Adjust.
4860 (win32_fetch_inferior_registers): Change prototype to take a
4862 (win32_store_inferior_registers): Adjust.
4863 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4864 store_inferior_register>: Change prototype to take a regcache.
4866 2010-01-20 Doug Evans <dje@google.com>
4868 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4870 (linux_wait_for_event1, linux_init_signals): Ditto.
4871 (W_STOPCODE): Provide definition if missing.
4873 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4875 * linux-low.c (linux_core_of_thread): New.
4876 (compare_ints, show_process, list_threads): New.
4877 (linux_qxfer_osdata): Report threads and cores.
4878 (linux_target_op): Register linux_core_of_thread.
4879 * remote-utils.c (prepare_resume_reply): Report the core.
4880 (buffer_xml_printf): Support %d specifier.
4881 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4883 (handle_query): Handle qXfer:threads. Announce availability
4885 * target.h (struct target_ops): New field core_of_thread.
4887 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4889 * Makefile.in (clean): Remove new generated files.
4890 (reg-s390.o, reg-s390.c): Remove rules.
4891 (reg-s390x.o, reg-s390x.c): Likewise.
4892 (s390-linux32.o, s390-linux32.c): Add rules.
4893 (s390-linux64.o, s390-linux64.c): Likewise.
4894 (s390x-linux64.o, s390x-linux64.c): Likewise.
4895 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4896 * linux-s390-low.c: Include <elf.h>.
4897 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4898 (init_registers_s390): Remove prototype.
4899 (init_registers_s390x): Likewise.
4900 (init_registers_s390_linux32): Add prototype.
4901 (init_registers_s390_linux64): Likewise.
4902 (init_registers_s390x_linux64): Likewise.
4903 (s390_num_regs_3264): New define.
4904 (s390_regmap_3264): New global variable.
4905 (s390_cannot_fetch_register): Remove obsolete check.
4906 (s390_cannot_store_register): Likewise.
4907 (s390_collect_ptrace_register): Handle upper/lower register halves.
4908 (s390_supply_ptrace_register): Likewise.
4909 (s390_fill_gregset): Update to register number changes.
4910 (s390_get_hwcap): New routine.
4911 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4912 Install appropriate regmap and register set.
4914 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4916 * server.c (gdbserver_version): Update copyright year to 2010.
4917 * gdbreplay.c (gdbreplay_version): Likewise.
4919 2009-12-28 Doug Evans <dje@google.com>
4921 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4922 elf/external.h. Include <elf.h> instead but only if necessary.
4924 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4926 * linux-low.c (linux_remove_process): Remove `detaching'
4927 parameter. Don't release/detach from thread_db here.
4928 (linux_kill): Release/detach from thread_db here, ...
4929 (linux_detach): ... and here, before actually detaching.
4930 (linux_wait_1): ... and here, when a process exits.
4931 * thread-db.c (any_thread_of): New.
4932 (thread_db_free): Switch the current inferior to a thread of the
4935 2009-12-21 Doug Evans <dje@google.com>
4937 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4939 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4940 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4941 warning ifndef __NR_tkill. Move setting of errno there too.
4942 Delete unnecessary resetting of errno after syscall.
4943 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4945 * configure.ac: Check for dladdr.
4946 * config.in: Regenerate.
4947 * configure: Regenerate.
4948 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4949 (try_thread_db_load): Update.
4951 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4953 2009-12-18 Doug Evans <dje@google.com>
4955 * event-loop.c: Include unistd.h if it exists.
4957 * linux-low.c (my_waitpid): Move definition away from being in
4958 between linux_tracefork_child/linux_test_for_tracefork.
4960 * gdb_proc_service.h (psaddr_t): Fix type.
4961 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4962 signature to match glibc.
4964 2009-12-16 Doug Evans <dje@google.com>
4966 * linux-low.c (linux_read_memory): Fix argument to read.
4968 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4970 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4971 events, don't leave current_inferior pointing at null.
4973 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4975 * win32-low.c (LOG): Delete.
4976 (OUTMSG): Output to stderr.
4977 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4978 on compile time LOG macro.
4979 (win32_wait): Fix debug output.
4981 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4983 * win32-low.c (win32_add_one_solib): If the dll name is
4984 "ntdll.dll", prepend the system directory to the dll path.
4986 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4988 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4990 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4991 Vladimir Prus <vladimir@codesourcery.com>
4993 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4994 * configure.ac: Check for __mcoldfire__ and set
4995 gdb_cv_m68k_is_coldfire.
4996 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4997 reg-cf.o and reg-m68k.o.
4998 * configure: Regenerated.
5000 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5002 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5003 Pass it to thread_db_free.
5004 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5005 proper `detaching' argument to linux_remove_process.
5006 * linux-low.h (thread_db_free): Add `detaching' parameter.
5007 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5009 (thread_db_free): Add `detaching' parameter. Only
5010 call td_ta_clear_event if detaching from process.
5012 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5014 * thread-db.c (thread_db_free): Fix typo.
5016 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5019 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5021 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5023 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5024 with an i686 compiler.
5025 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5027 * configure: Rebuilt.
5029 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5033 * server.c (handle_search_memory_1): Correct read_addr initialization
5034 in loop for searching subsequent chunks.
5036 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5038 * configure.ac: New --with-libthread-db option.
5039 * thread-db.c: Allow direct dependence on libthread_db.
5040 (thread_db_free): Adjust.
5041 * config.in: Regenerate.
5042 * configure: Likewise.
5044 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5047 * thread-db.c (attach_thread): New function.
5048 (maybe_attach_thread): Return success/failure.
5049 (find_new_threads_callback): Adjust.
5050 (thread_db_find_new_threads): Loop until no new threads.
5052 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5054 * proc-service.c (ps_lgetregs): Formatting.
5056 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5058 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5059 * configure.ac: Adjust.
5060 * linux-low.h (struct process_info_private): Move members to struct
5062 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5063 * linux-low.c (linux_remove_process): Adjust.
5064 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5065 * server.c (handle_query): Move code ...
5066 (handle_monitor_command): ... here. New function.
5067 * target.h (struct target_ops): New member.
5068 * thread-db.c (struct thread_db): New.
5069 (libthread_db_search_path): New variable.
5070 (thread_db_create_event, thread_db_enable_reporting)
5071 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5072 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5073 (try_thread_db_load_1, dladdr_to_soname): New functions.
5074 (try_thread_db_load, thread_db_load_search): New functions.
5075 (thread_db_init): Search for libthread_db.
5076 (thread_db_free): New function.
5077 (thread_db_handle_monitor_command): Likewise.
5078 * config.in: Regenerate.
5079 * configure: Regenerate.
5081 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5083 * spu-low.c (spu_kill): Wait for inferior to terminate.
5084 Call clear_inferiors.
5085 (spu_detach): Call clear_inferiors.
5087 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5089 * aclocal.m4: Regenerate.
5090 * config.in: Likewise.
5091 * configure: Likewise.
5093 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5095 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5096 (parse_spufs_run): New function.
5097 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5098 (ppc_breakpoint_at): Handle SPU breakpoints.
5100 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5102 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5103 (SPUFS_MAGIC): Define.
5104 (spu_enumerate_spu_ids): New function.
5105 (linux_qxfer_spu): New function.
5106 (linux_target_ops): Install linux_qxfer_spu.
5108 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5110 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5111 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5112 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5113 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5114 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5115 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5116 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5117 (init_registers_powerpc_cell32l): Add prototype.
5118 (init_registers_powerpc_cell64l): Likewise.
5119 (ppc_arch_setup): Detect Cell/B.E. architecture.
5121 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5123 * Makefile.in (datarootdir): New variable.
5125 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5127 * linux-low.c (linux_write_memory): Update debugging output.
5128 * Makefile.in (clean): Add new descriptions.
5129 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5130 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5131 * configure.srv: Add new files for arm*-*-linux*.
5132 * linux-arm-low.c: Add new declarations.
5133 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5134 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5135 (HWCAP_VFPv3D16): New.
5136 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5137 instead of __IWMMXT__.
5138 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5139 (arm_arch_setup): New.
5140 (target_regsets): Remove #ifdef. Add VFP regset.
5141 (the_low_target): Use arm_arch_setup.
5143 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5145 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5146 the main thread again.
5148 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5150 Adding Neutrino gdbserver.
5151 * configure: Regenerated.
5152 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5153 * configure.srv (i[34567]86-*-nto*): New target.
5154 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5155 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5156 (nto_comctrl) [__QNX__]: New function.
5157 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5159 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5161 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5164 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5165 Pedro Alves <pedro@codesourcery.com>
5167 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5168 don't support CONTEXT_EXTENDED_REGISTERS.
5169 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5170 (the_low_target): Install them.
5171 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5172 failing with ERROR_PIPE_NOT_CONNECTED.
5174 2009-06-30 Doug Evans <dje@google.com>
5175 Pierre Muller <muller@ics.u-strasbg.fr>
5177 Add h/w watchpoint support to x86-linux, win32-i386.
5178 * Makefile.in (SFILES): Add i386-low.c
5179 (i386_low_h): Define.
5180 (i386-low.o): Add dependencies.
5181 (linux-x86-low.o): Add i386-low.h dependency.
5182 (win32-i386-low.o): Ditto.
5183 * i386-low.c: New file.
5184 * i386-low.h: New file.
5185 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5186 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5187 * linux-low.c (linux_add_process): Initialize arch_private.
5188 (linux_remove_process): Free arch_private.
5189 (add_lwp): Initialize arch_private.
5190 (delete_lwp): Free arch_private.
5191 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5193 * linux-low.h (process_info_private): New member arch_private.
5194 (lwp_info): New member arch_private.
5195 (linux_target_ops): New members new_process, new_thread,
5197 (ptid_of): New macro.
5198 * linux-x86-low.c: Include stddef.h, i386-low.h.
5199 (arch_process_info): New struct.
5200 (arch_lwp_info): New struct.
5201 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5202 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5203 (i386_dr_low_get_status): New function.
5204 (x86_insert_point, x86_remove_point): New functions.
5205 (x86_stopped_by_watchpoint): New function.
5206 (x86_stopped_data_address): New function.
5207 (x86_linux_new_process, x86_linux_new_thread): New functions.
5208 (x86_linux_prepare_to_resume): New function.
5209 (the_low_target): Add entries for insert_point, remove_point,
5210 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5212 * server.c (debug_hw_points): New global.
5213 (monitor_show_help): Document set debug-hw-points.
5214 (handle_query): Process "set debug-hw-points".
5215 * server.h (debug_hw_points): Declare.
5216 (paddress): Declare.
5217 * utils.c (NUMCELLS, CELLSIZE): New macros.
5218 (get_sell, xsnprintf, paddress): New functions.
5219 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5220 remove_point, stopped_by_watchpoint, stopped_data_address.
5221 * win32-i386-low.c: Include i386-low.h.
5222 (debug_reg_state): Replaces dr.
5223 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5224 (i386_dr_low_get_status): New function.
5225 (i386_insert_point, i386_remove_point): New functions.
5226 (i386_stopped_by_watchpoint): New function.
5227 (i386_stopped_data_address): New function.
5228 (i386_initial_stuff): Update.
5229 (get_thread_context,set_thread_context,i386_thread_added): Update.
5230 (the_low_target): Add entries for insert_point,
5231 remove_point, stopped_by_watchpoint, stopped_data_address.
5232 * win32-low.c (win32_insert_watchpoint): New function.
5233 (win32_remove_watchpoint): New function.
5234 (win32_stopped_by_watchpoint): New function.
5235 (win32_stopped_data_address): New function.
5236 (win32_target_ops): Add entries for insert_watchpoint,
5237 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5238 * win32-low.h (win32_target_ops): New members insert_point,
5239 remove_point, stopped_by_watchpoint, stopped_data_address.
5241 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5243 * server.c (process_serial_event): Re-return unsupported, not
5244 error, if the type isn't recognized. Re-allow supporting only
5245 insert or remove packets. Also call require_running for
5246 breakpoints. Add missing break statement to default case. Tidy.
5247 * target.h (struct target_ops): Rename insert_watchpoint to
5248 insert_point, and remove_watchpoint to remove_point.
5250 * linux-low.h (struct linux_target_ops): Likewise.
5251 * linux-low.c (linux_insert_watchpoint): Rename to ...
5252 (linux_insert_point): ... this. Adjust.
5253 (linux_remove_watchpoint): Rename to ...
5254 (linux_remove_point): ... this. Adjust.
5255 (linux_target_ops): Adjust.
5256 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5257 (cris_insert_point): ... this.
5258 (cris_remove_watchpoint): Rename to ...
5259 (cris_remove_point): ... this.
5260 (the_low_target): Adjust.
5262 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5264 * server.c (handle_v_kill): Pass signal_pid to
5265 kill_inferior if multi_process is zero.
5267 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5269 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5270 * target.h (target_ops): Comment for *_watchpoint to make it clear
5271 the functions can get types '0' and '1'.
5273 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5275 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5276 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5277 * regcache.c (get_regcache): Likewise.
5278 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5279 * win32-low.c (child_fetch_inferior_registers): Remove check for
5282 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5283 Pedro Alves <pedro@codesourcery.com>
5285 * target.h (struct target_ops) <supports_multi_process>: New
5287 (target_supports_multi_process): New.
5288 * server.c (handle_query): Even if GDB reports support, only
5289 enable multi-process if the target also supports it. Report
5290 multi-process support only if the target backend supports it.
5291 * linux-low.c (linux_supports_multi_process): New function.
5292 (linux_target_ops): Install it as target_supports_multi_process
5295 2009-05-24 Doug Evans <dje@google.com>
5297 Global renaming of find_thread_pid to find_thread_ptid.
5298 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5299 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5300 All callers updated.
5302 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5303 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5306 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5307 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5308 (linux_resume_one_lwp): Ditto.
5310 2009-05-23 Doug Evans <dje@google.com>
5312 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5313 from struct inferior_list_entry * to struct lwp_info *.
5314 All callers updated.
5316 2009-05-13 Doug Evans <dje@google.com>
5318 * linux-x86-low.c: Don't include assert.h.
5319 (x86_siginfo_fixup): Use fatal, not assert.
5320 (x86_arch_setup): Fix comment.
5322 2009-05-12 Doug Evans <dje@google.com>
5324 Biarch support for i386/amd64 gdbserver.
5325 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5326 Add linux-x86-low.c.
5327 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5328 (linux-x86-low.o): Add.
5329 * linux-x86-64-low.c: Delete.
5330 * linux-i386-low.c: Delete.
5331 * linux-x86-low.c: New file.
5332 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5334 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5336 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5337 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5338 (linux_child_pid_to_exec_file): New function.
5339 (elf_64_header_p, elf_64_file_p): New functions.
5340 (siginfo_fixup): New function.
5341 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5342 give target a chance to convert layout.
5343 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5344 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5346 2009-05-07 Doug Evans <dje@google.com>
5348 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5349 (regsets_store_inferior_registers): Ditto.
5351 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5355 * linux-low.c (must_set_ptrace_flags): Delete.
5356 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5358 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5359 `lwp->must_set_ptrace_flags' instead.
5360 (linux_wait_for_event_1): Set ptrace options here.
5361 (linux_wait_1): ... not here.
5363 2009-04-30 Doug Evans <dje@google.com>
5365 * inferiors.c (started_inferior_callback): New function.
5366 (attached_inferior_callback): New function.
5367 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5368 * server.c (print_started_pid, print_attached_pid): New functions.
5369 (detach_or_kill_for_exit): New function.
5370 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5371 * server.h (have_started_inferiors_p): Declare.
5372 (have_attached_inferiors_p): Declare.
5374 * inferiors.c (remove_process): Fix memory leak, free process.
5375 * linux-low.c (linux_remove_process): New function.
5376 (linux_kill): Call it instead of remove_process.
5377 (linux_detach, linux_wait_1): Ditto.
5379 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5381 * configure.srv: Add x86 Windows CE target.
5383 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5385 * inferiors.c (get_thread_process): Make global.
5386 * server.h (get_thread_process): Add prototype.
5387 * thread-db.c (find_one_thread): Use get_thread_process
5388 instead of current_process.
5389 (thread_db_get_tls_address): Do not crash if called when
5390 thread layer is not yet initialized.
5392 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5394 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5395 * spu-low.c (current_tid): Rename to ...
5396 (current_ptid): ... this.
5397 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5398 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5399 ptid_get_lwp (current_ptid) instead of current_tid.
5400 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5401 instead of current_tid. Use find_process_pid to verify pid
5402 argument is valid. Pass proper argument to remove_process.
5403 (spu_thread_alive): Compare current_ptid instead of current_tid.
5404 (spu_resume): Likewise.
5406 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5408 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5411 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5413 Implement the multiprocess extensions, and add linux multiprocess
5416 * server.h (ULONGEST): Declare.
5417 (struct ptid, ptid_t): New.
5418 (minus_one_ptid, null_ptid): Declare.
5419 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5420 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5421 (struct inferior_list_entry): Change `id' type from unsigned from
5423 (struct sym_cache, struct breakpoint, struct
5424 process_info_private): Forward declare.
5425 (struct process_info): Declare.
5426 (current_process): Declare.
5427 (all_processes): Declare.
5428 (initialize_inferiors): Declare.
5429 (add_thread): Adjust to use ptid_t.
5430 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5431 (add_process, remove_process, find_thread_pid): Declare.
5432 (find_inferior_id): Adjust to use ptid_t.
5433 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5434 (multi_process): Declare.
5435 (push_event): Adjust to use ptid_t.
5436 (read_ptid, write_ptid): Declare.
5437 (prepare_resume_reply): Adjust to use ptid_t.
5438 (clear_symbol_cache): Declare.
5439 * inferiors.c (all_processes): New.
5440 (null_ptid, minus_one_ptid): New.
5441 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5442 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5443 (add_thread): Change unsigned long to ptid. Remove gdb_id
5445 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5446 (gdb_id_to_thread): Rename to ...
5447 (find_thread_pid): ... this. Change unsigned long to ptid.
5448 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5449 (loaded_dll, pull_pid_from_list): Adjust.
5450 (add_process, remove_process, find_process_pid)
5451 (get_thread_process, current_process, initialize_inferiors): New.
5452 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5453 (struct target_waitstatus) <related_pid>: Ditto.
5454 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5456 (struct target_ops) <join>: Add `pid' argument.
5457 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5458 (struct target_ops) <wait>: Add `ptid' field. Change return type
5460 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5461 (mywait): Add `ptid' argument. Change return type to ptid_t.
5462 (target_pid_to_str): Declare.
5463 * target.c (set_desired_inferior): Adjust to use ptids.
5464 (mywait): Add new `ptid' argument. Adjust.
5465 (target_pid_to_str): New.
5466 * mem-break.h (free_all_breakpoints): Declare.
5467 * mem-break.c (breakpoints): Delelete.
5468 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5469 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5470 to use per-process breakpoint list.
5471 (free_all_breakpoints): New.
5472 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5473 (symbol_cache, all_symbols_looked_up): Delete.
5475 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5477 (prepare_resume_reply): Change ptid argument's type from unsigned
5478 long to ptid_t. Adjust. Implement W;process and X;process.
5479 (free_sym_cache, clear_symbol_cache): New.
5480 (look_up_one_symbol): Adjust to per-process symbol cache. *
5481 * server.c (cont_thread, general_thread, step_thread): Change type
5484 (multi_process): New.
5485 (last_ptid): Change type to ptid_t.
5486 (struct vstop_notif) <ptid>: Change type to ptid_t.
5487 (queue_stop_reply, push_event): Change `ptid' argument's type to
5489 (discard_queued_stop_replies): Add `pid' argument.
5490 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5491 changes. Don't reference the `attached' global.
5492 (attach_inferior): Adjust to mywait interface changes.
5493 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5494 features. Handle and report "multiprocess+". Handle
5496 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5498 (handle_v_kill): New.
5499 (handle_v_stopped): Adjust to use target_pid_to_str.
5500 (handle_v_requests): Allow multiple attaches and runs when
5501 multiprocess extensions are in effect. Handle "vKill".
5502 (myresume): Adjust to use ptids.
5503 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5504 (handle_status): Adjust to discard_queued_stop_replies interface
5506 (first_thread_of, kill_inferior_callback)
5507 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5508 (main): Call initialize_inferiors. Adjust to use ptids, killing
5509 and detaching from all inferiors. Handle multiprocess packet
5511 * linux-low.h: Include gdb_proc_service.h.
5512 (struct process_info_private): New.
5513 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5514 <lwpid_of>: Use ptid_get_lwp.
5515 (get_lwp_thread): Adjust.
5516 (struct lwp_info): Add `dead' member.
5517 (find_lwp_pid): Declare.
5518 * linux-low.c (thread_db_active): Delete.
5519 (new_inferior): Adjust comment.
5520 (inferior_pid): Delete.
5521 (linux_add_process): New.
5522 (handle_extended_wait): Adjust.
5523 (add_lwp): Change unsigned long to ptid.
5524 (linux_create_inferior): Add process to processes table. Adjust
5525 to use ptids. Don't set new_inferior here.
5526 (linux_attach_lwp): Rename to ...
5527 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5528 it. Adjust to use ptids.
5529 (linux_attach_lwp): New.
5530 (linux_attach): Add process to processes table. Don't set
5532 (struct counter): New.
5533 (second_thread_of_pid_p, last_thread_of_process_p): New.
5534 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5536 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5537 processes. Remove process from process table.
5538 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5539 to multiple processes.
5540 (any_thread_of): New.
5541 (linux_detach): Add `pid' argument, and handle it. Remove process
5542 from processes table.
5543 (linux_join): Add `pid' argument. Handle it.
5544 (linux_thread_alive): Change unsighed long argument to ptid_t.
5545 Consider dead lwps as not being alive.
5546 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5547 threads we're not interested in.
5548 (same_lwp, find_lwp_pid): New.
5549 (linux_wait_for_lwp): Change `pid' argument's type from int to
5551 (linux_wait_for_event): Rename to ...
5552 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5553 from int to ptid_t. Adjust.
5554 (linux_wait_for_event): New.
5555 (linux_wait_1): Add `ptid' argument. Change return type to
5556 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5557 that exit from the process table.
5558 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5560 (mark_lwp_dead): New.
5561 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5562 stopping all threads, mark its main lwp as dead.
5563 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5565 (fetch_register, usr_store_inferior_registers)
5566 (regsets_fetch_inferior_registers)
5567 (regsets_store_inferior_registers, linux_read_memory)
5568 (linux_write_memory): Inline `inferior_pid'.
5569 (linux_look_up_symbols): Adjust to use per-process
5571 (linux_request_interrupt): Adjust to use ptids.
5572 (linux_read_auxv): Inline `inferior_pid'.
5573 (initialize_low): Don't reference thread_db_active.
5574 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5575 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5576 (ps_getpid): Return the pid of the current inferior.
5577 * thread-db.c (proc_handle, thread_agent): Delete.
5578 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5580 (find_one_thread): Change argument type to ptid_t. Adjust to
5582 (maybe_attach_thread): Adjust to per-process data and ptids.
5583 (thread_db_find_new_threads): Ditto.
5584 (thread_db_init): Ditto.
5585 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5586 processes table. Adjust to use ptids.
5587 (spu_kill, spu_detach): Adjust interface. Remove process from
5589 (spu_join, spu_thread_alive): Adjust interface.
5590 (spu_wait): Adjust interface. Remove process from processes
5591 table. Adjust to use ptids.
5592 * win32-low.c (current_inferior_tid): Delete.
5593 (current_inferior_ptid): New.
5594 (debug_event_ptid): New.
5595 (thread_rec): Take a ptid. Adjust.
5596 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5597 (child_delete_thread): Ditto.
5598 (do_initial_child_stuff): Add `attached' argument. Add process to
5600 (child_fetch_inferior_registers, child_store_inferior_registers):
5602 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5603 (win32_attach): Pass 1 to do_initial_child_stuff.
5604 (win32_kill): Adjust interface. Remove process from processes
5606 (win32_detach): Ditto.
5607 (win32_join): Adjust interface.
5608 (win32_thread_alive): Take a ptid.
5609 (win32_resume): Adjust to use ptids.
5610 (get_child_debug_event): Ditto.
5611 (win32_wait): Adjust interface. Remove exiting process from
5614 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5616 Non-stop mode support.
5618 * server.h (non_stop): Declare.
5619 (gdb_client_data, handler_func): Declare.
5620 (delete_file_handler, add_file_handler, start_event_loop):
5622 (handle_serial_event, handle_target_event, push_event)
5623 (putpkt_notif): Declare.
5624 * target.h (enum resume_kind): New.
5625 (struct thread_resume): Replace `step' field by `kind' field.
5626 (TARGET_WNOHANG): Define.
5627 (struct target_ops) <wait>: Add `options' argument.
5628 <supports_non_stop, async, start_non_stop>: New fields.
5629 (target_supports_non_stop, target_async): New.
5630 (start_non_stop): Declare.
5631 (mywait): Add `options' argument.
5632 * target.c (mywait): Add `options' argument. Print child exit
5634 (start_non_stop): New.
5635 * server.c (non_stop, own_buf, mem_buf): New globals.
5636 (struct vstop_notif): New.
5637 (notif_queue): New global.
5638 (queue_stop_reply, push_event, discard_queued_stop_replies)
5639 (send_next_stop_reply): New.
5640 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5642 (attach_inferior): In non-stop mode, don't wait for the target
5644 (handle_general_set): Handle QNonStop.
5645 (handle_query): When handling qC, return the current general
5646 thread, instead of the first thread of the list.
5647 (handle_query): If the backend supports non-stop mode, include
5648 QNonStop+ in the qSupported query response.
5649 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5651 (handle_v_attach, handle_v_run): Handle non-stop mode.
5652 (handle_v_stopped): New.
5653 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5654 (myresume): Adjust to use resume_kind. Handle non-stop.
5655 (queue_stop_reply_callback): New.
5656 (handle_status): Handle non-stop mode.
5657 (main): Clear non_stop flag on reconnection. Use the event-loop.
5658 Refactor serial protocol handling from here ...
5659 (process_serial_event): ... to this new function. When GDB
5660 selects any thread, select one here. In non-stop mode, wait until
5661 GDB acks all pending events before exiting.
5662 (handle_serial_event, handle_target_event): New.
5663 * remote-utils.c (remote_open): Install remote_desc in the event
5665 (remote_close): Remove remote_desc from the event loop.
5666 (putpkt_binary): Rename to...
5667 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5668 (putpkt_binary): New as wrapper around putpkt_binary_1.
5669 (putpkt_notif): New.
5670 (prepare_resume_reply): In non-stop mode, don't change the
5672 * event-loop.c: New.
5673 * Makefile.in (OBJ): Add event-loop.o.
5674 (event-loop.o): New rule.
5676 * linux-low.h (pid_of): Moved here.
5678 (get_lwp_thread): Use lwpid_of.
5679 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5680 * linux-low.c (pid_of): Delete.
5681 (inferior_pid): Use lwpid_of.
5682 (linux_event_pipe): New.
5683 (target_is_async_p): New.
5685 (handle_extended_wait): Use lwpid_of.
5686 (add_lwp): Don't set lwpid field.
5687 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5688 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5689 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5690 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5691 first. Adjust to linux_wait_for_event interface changes. Use
5693 (linux_detach): Don't delete the main lwp here.
5694 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5695 (status_pending_p): Don't consider explicitly suspended lwps.
5696 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5697 pointer. Add OPTIONS argument. Change return type to int. Use
5698 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5699 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5700 pointer. Add status pointer argument. Return a pid instead of a
5701 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5702 changes. In non-stop mode, don't switch to a random thread.
5703 (linux_wait): Rename to...
5704 (linux_wait_1): ... this. Add target_options argument, and handle
5705 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5706 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5707 clean exit and signal exit code. Don't stop all threads in
5708 non-stop mode. In all-stop mode, only stop all threads when
5709 reporting a stop to GDB. Handle explicit thread stop requests.
5710 (async_file_flush, async_file_mark): New.
5712 (send_sigstop): Use lwpid_of.
5713 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5714 interface changes. In non-stop mode, don't switch to a random
5716 (linux_resume_one_lwp): Use lwpid_of.
5717 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5718 (linux_resume_one_thread): ... this. Handle resume_stop. In
5719 non-stop mode, don't look for pending flag in all threads.
5720 (resume_status_pending_p): Don't consider explicitly suspended
5722 (my_waitpid): Reimplement. Emulate __WALL.
5723 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5725 (sigchld_handler, linux_supports_non_stop, linux_async)
5726 (linux_start_non_stop): New.
5727 (linux_target_ops): Register linux_supports_non_stop, linux_async
5728 and linux_start_non_stop.
5729 (initialize_low): Install SIGCHLD handler.
5730 * thread-db.c (thread_db_create_event, find_one_thread)
5731 (thread_db_get_tls_address): Use lwpid_of.
5732 * win32-low.c (win32_detach): Adjust to use resume_kind.
5733 (win32_wait): Add `options' argument.
5734 * spu-low.c (spu_resume): Adjust to use resume_kind.
5735 (spu_wait): Add `options' argument.
5737 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5739 Decouple target code from remote protocol.
5741 * target.h (enum target_waitkind): New.
5742 (struct target_waitstatus): New.
5743 (struct target_ops) <wait>: Return an unsigned long. Take a
5744 target_waitstatus pointer instead of a char pointer.
5746 * target.c (mywait): Change prototype to return an unsigned long.
5747 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5748 * server.h (thread_from_wait, old_thread_from_wait): Delete
5750 (prepare_resume_reply): Change prototype to take a
5752 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5753 (last_status, last_ptid): New.
5754 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5755 pid instead of a signal.
5756 (attach_inferior): Remove "status" and "signal" parameters.
5758 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5760 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5761 (handle_v_requests, myresume): Remove "status" and "signal"
5763 (handle_status): New.
5764 (main): Delete local `status'. Adjust.
5765 * remote-utils.c: Include target.h.
5766 (prepare_resume_reply): Change prototype to take a
5767 target_waitstatus. Adjust.
5769 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5771 * spu-low.c (spu_wait): Adjust.
5772 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5774 (win32_wait): Adjust.
5776 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5778 * target.h (struct thread_resume): Delete leave_stopped member.
5779 (struct target_ops): Add a `n' argument to the `resume' callback.
5780 * server.c (start_inferior): Adjust.
5781 (handle_v_cont, myresume): Adjust.
5782 * linux-low.c (check_removed_breakpoint): Adjust to resume
5783 interface change, and to removed leave_stopped field.
5784 (resume_ptr): Delete.
5785 (struct thread_resume_array): New.
5786 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5787 resume interface change.
5788 (linux_continue_one_thread, linux_queue_one_thread)
5789 (resume_status_pending_p): Check if the resume field is NULL
5790 instead of checking the leave_stopped member.
5791 (linux_resume): Adjust to the target resume interface change.
5792 * spu-low.c (spu_resume): Adjust to the target resume interface
5794 * win32-low.c (win32_detach, win32_resume): Ditto.
5796 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5798 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5800 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5802 (linux_continue_one_thread): Only preserve the stepping flag if
5803 there's a pending breakpoint.
5805 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5807 * server.c (main): After the inferior having exited, call
5808 remote_close before exiting gdbserver.
5810 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5812 Fix size of FPSCR in Power 7 processors.
5813 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5814 (PPC_FEATURE_HAS_DFP): New #define.
5815 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5818 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5820 * server.c (handle_query) Whitespace and formatting.
5822 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5824 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5825 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5826 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5827 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5828 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5829 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5830 Makefile.in, configure.ac: Fix whitespace throughout.
5831 * configure: Regenerate.
5833 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5835 * inferiors.c (find_inferior): Make it safe for the callback
5836 function to delete the currently iterated inferior.
5838 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5840 * Makefile.in (linuw_low_h): Move higher.
5841 (thread-db.o): Depend on $(linux_low_h).
5843 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5845 Rename "process" to "lwp" throughout.
5847 * linux-low.c (all_processes): Rename to...
5848 (all_lwps): ... this.
5849 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5850 (add_process): Rename to ...
5851 (add_lwp): ... this. Adjust.
5852 (linux_create_inferior): Adjust.
5853 (linux_attach_lwp): Adjust.
5854 (linux_attach): Adjust.
5855 (linux_kill_one_process): Rename to ...
5856 (linux_kill_one_lwp): ... this. Adjust.
5857 (linux_kill): Adjust.
5858 (linux_detach_one_process): Rename to ...
5859 (linux_detach_one_lwp): ... this. Adjust.
5860 (linux_detach): Adjust.
5861 (check_removed_breakpoint): Adjust.
5862 (status_pending_p): Adjust.
5863 (linux_wait_for_process): Rename to ...
5864 (linux_wait_for_lwp): ... this. Adjust.
5865 (linux_wait_for_event): Adjust.
5866 (send_sigstop): Adjust.
5867 (wait_for_sigstop): Adjust.
5868 (stop_all_processes): Rename to ...
5869 (stop_all_lwps): ... this.
5870 (linux_resume_one_process): Rename to ...
5871 (linux_resume_one_lwp): ... this. Adjust.
5872 (linux_set_resume_request, linux_continue_one_thread)
5873 (linux_queue_one_thread, resume_status_pending_p)
5874 (usr_store_inferior_registers, regsets_store_inferior_registers)
5875 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5877 * linux-low.h (get_process): Rename to ...
5878 (get_lwp): ... this. Adjust.
5879 (get_thread_process): Rename to ...
5880 (get_thread_lwp): ... this. Adjust.
5881 (get_process_thread): Rename to ...
5882 (get_lwp_thread): ... this. Adjust.
5883 (struct process_info): Rename to ...
5884 (struct lwp_info): ... this.
5885 (all_processes): Rename to ...
5886 (all_lwps): ... this.
5887 * proc-service.c (ps_lgetregs): Adjust.
5888 * thread-db.c (thread_db_create_event, find_one_thread)
5889 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5891 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5893 * server.c (handle_query): Handle "qAttached".
5895 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5897 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5898 GPLv3, update license URL.
5900 2009-03-01 Doug Evans <dje@google.com>
5902 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5903 (server_h): Add gdb_signals.h.
5904 (signals.o): Update.
5905 * server.h (target_signal_from_host,target_signal_to_host_p)
5906 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5908 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5910 * remote-utils.c (getpkt): Also generate remote-debug
5911 information if noack_mode is set.
5913 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5915 * server.c (handle_query): Report qXfer:siginfo:read and
5916 qXfer:siginfo:write as supported and handle them.
5917 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5918 * linux-low.c (linux_xfer_siginfo): New.
5919 (linux_target_ops): Set it.
5921 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5923 * server.c (gdbserver_usage): Mention --remote-debug.
5924 (main): Accept '--remote-debug' switch.
5926 2009-01-18 Doug Evans <dje@google.com>
5928 * regcache.c (new_register_cache): No need to check result of xcalloc.
5929 * server.c (handle_search_memory): Back out calls to xmalloc,
5930 result is checked and error is returned to user upon failure.
5931 (handle_query): Ditto. Add more checks for result of malloc.
5932 (handle_v_cont): Check result of malloc, report error back to
5934 (handle_v_run): Ditto. Call freeargv.
5935 * server.h (freeargv): Declare.
5936 * utils.c (freeargv): New fn.
5938 2009-01-15 Doug Evans <dje@google.com>
5940 * gdbreplay.c (perror_with_name): Make arg const char *.
5941 * server.h (target_signal_to_name): Make return type const char *.
5942 * thread-db.c (thread_db_err_str): Make return type const char *.
5943 * utils.c (perror_with_name): Make arg const char *.
5945 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5947 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5948 when handling a EXIT_PROCESS_DEBUG_EVENT.
5950 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5952 * gdbreplay.c (gdbreplay_version): Update copyright year.
5953 * server.c (gdbserver_version): Likewise.
5955 2009-01-05 Doug Evans <dje@google.com>
5957 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5958 (handle_extended_wait): Improve comment.
5960 2008-12-13 Doug Evans <dje@google.com>
5962 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5963 * server.h (ATTR_MALLOC): New macro.
5964 (xmalloc,xcalloc,xstrdup): Declare.
5965 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5966 * inferiors.c: Ditto.
5967 * linux-low.c: Ditto.
5968 * mem-break.c: Ditto.
5969 * regcache.c: Ditto.
5970 * remote-utils.c: Ditto.
5973 * win32-low.c: Ditto.
5975 2008-12-12 Doug Evans <dje@google.com>
5977 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5978 in debugging printf.
5980 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5982 2008-12-09 Doug Evans <dje@google.com>
5984 * linux-low.h (struct process_info): Delete member tid, unused.
5985 * thread-db.c (find_one_thread): Update.
5986 (maybe_attach_thread): Update.
5988 2008-12-02 Pedro Alves <pedro@codesourcery.com>
5990 * target.h (struct target_ops): Add qxfer_osdata member.
5991 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5993 (linux_qxfer_osdata): New functions.
5994 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5996 * server.c (handle_query): Handle "qXfer:osdata:read:".
5997 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5998 (buffer_xml_printf): New functions.
5999 * server.h (struct buffer): New.
6000 (buffer_grow_str, buffer_grow_str0): New macros.
6001 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6002 (buffer_xml_printf): Declare.
6004 2008-11-24 Doug Evans <dje@google.com>
6006 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6008 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6010 * server.c (handle_v_run): Always use the supplied argument list.
6012 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6014 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6015 (xtensa_regmap_table): Add entry for scompare1.
6017 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6019 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6020 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6021 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6022 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6023 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6024 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6025 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6026 XML target descriptions.
6027 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6028 when inferior is running on an ISA 2.05 or later processor. Add
6029 special case to return offset for full 64-bit slot of FPSCR when
6032 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6034 * Makefile.in (SFILES, clean): Added sparc64 files.
6035 (reg-sparc64.o, reg-sparc64.c): New.
6036 * configure.srv (sparc*-*-linux*): New configuration.
6037 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6038 syscall arguments for SPARC.
6039 (regsets_store_inferior_registers): Likewise.
6040 * linux-sparc-low.c: New file.
6042 2008-10-21 Doug Evans <dje@google.com>
6044 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6045 (READLINE_DIR,READLINE_DEP): Delete.
6046 (INTERNAL_CFLAGS): Update.
6047 (LINTFLAGS): Update.
6049 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6051 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6052 whole argv from the last run, not just argv[0].
6054 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6056 * regcache.c (new_register_cache): Return NULL if the register
6057 cache size isn't known yet.
6058 (free_register_cache): Avoid dereferencing a NULL regcache.
6060 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6062 * configure.srv: Merge MIPS and MIPS64.
6064 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6066 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6068 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6070 * Makefile.in: Add required vsx dependencies.
6072 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6073 Declare init_registers_powerpc_vsx32l.
6074 Declare init_registers_powerpc_vsx64l.
6075 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6076 (ppc_arch_setup): Check for VSX in hwcap.
6077 (ppc_fill_vsxregset): New function.
6078 (ppc_store_vsxregset): New function.
6079 Add new VSX entry in regset_info target_regsets.
6081 * configure.srv: Add new VSX dependencies.
6083 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6085 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6086 (remote_open): Set or clear transport_is_reliable.
6087 (putpkt_binary): Don't expect acks in noack mode.
6088 (getpkt): Don't send ack/nac in noack mode.
6089 * server.c (handle_general_set): Handle QStartNoAckMode.
6090 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6092 (main): Reset noack_mode on every connection.
6093 * server.h (noack_mode): Declare.
6095 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6097 * Makefile.in (GDBREPLAY_OBS): New variable.
6098 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6100 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6101 Daniel Jacobowitz <dan@codesourcery.com>
6103 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6104 (usr_store_inferior_registers): Likewise.
6105 (regsets_store_inferior_registers): Likewise.
6107 2008-07-31 Rolf Jansen <rj@surtec.com>
6108 Pedro Alves <pedro@codesourcery.com>
6110 * configure.ac: Check for memmem declaration.
6111 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6112 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6113 (disable_packet_qfThreadInfo): Unconditionally compile.
6114 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6115 * configure, config.in: Regenerate.
6117 2008-07-28 Doug Kwan <dougkwan@google.com>
6119 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6120 (linux_write_memory): Remove declaration of errno.
6122 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6124 * linux-low.c (handle_extended_wait): Do not use "status"
6125 variable uninitialized.
6127 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6129 * server.c (handle_v_attach): Inhibit reporting dll changes.
6131 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6133 * remote-utils.c (prepare_resume_reply): If requested, don't
6134 output "thread:TID" in the T stop reply.
6136 * server.c (disable_packet_vCont, disable_packet_Tthread)
6137 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6138 (handle_query): If requested, disable support for qC, qfThreadInfo
6140 (handle_v_requests): If requested, disable support for vCont.
6141 (gdbserver_show_disableable): New.
6142 (main): Handle --disable-packet and --disable-packet=LIST.
6144 * server.h (disable_packet_vCont, disable_packet_Tthread)
6145 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6147 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6149 * server.c (gdbserver_usage): Mention --version.
6151 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6153 * Makefile.in (gdbreplay.o): New rule.
6155 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6157 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6158 message, not gdbserver.
6160 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6161 Nathan Sidwell <nathan@codesourcery.com>
6162 Joseph Myers <joseph@codesourcery.com>
6164 * acinclude.m4: Include ../../config/acx.m4.
6165 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6166 * configure, config.in: Regenerate.
6167 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6168 * server.c (gdbserver_version): Print PKGVERSION.
6169 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6170 (main): Adjust gdbserver_usage calls.
6171 * gdbreplay.c (version, host_name): Add declarations.
6172 (gdbreplay_version, gdbreplay_usage): New.
6173 (main): Accept --version and --help options.
6175 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6177 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6178 (arm_breakpoint_at): Handle Thumb.
6179 (the_low_target): Add comment.
6181 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6183 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6185 2008-05-09 Doug Evans <dje@google.com>
6187 * server.h (decode_search_memory_packet): Declare.
6188 * remote-utils.c (decode_search_memory_packet): New fn.
6189 * server.c (handle_search_memory_1): New fn.
6190 (handle_search_memory): New fn.
6191 (handle_query): Process qSearch:memory packets.
6193 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6195 * regcache.c (registers_length): Remove.
6196 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6197 full register packet.
6198 * regcache.h (registers_length): Remove prototype.
6199 * server.h (PBUFSIZ): Define to 16384.
6201 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6203 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6204 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6205 powerpc-64l.o, and powerpc-altivec64l.o.
6206 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6207 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6208 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6209 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6210 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6213 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6214 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6215 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6216 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6217 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6218 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6219 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6220 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6221 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6222 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6225 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6226 (init_registers_powerpc_32l): ... this new prototype.
6227 (init_registers_powerpc_32): Remove, replace by ...
6228 (init_registers_powerpc_altivec32l): ... this new prototype.
6229 (init_registers_powerpc_e500): Remove, replace by ...
6230 (init_registers_powerpc_e500l): ... this new prototype.
6231 (init_registers_ppc64): Remove, replace by ...
6232 (init_registers_powerpc_64l): ... this new prototype.
6233 (init_registers_powerpc_64): Remove, replace by ...
6234 (init_registers_powerpc_altivec64l): ... this new prototype.
6235 (ppc_num_regs): Set to 73.
6236 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6237 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6238 (ppc_cannot_store_register): Handle orig_r3 and trap.
6239 (ppc_arch_setup): Update init_registers_... calls.
6240 (ppc_fill_gregset): Handle orig_r3 and trap.
6242 * inferiors.c (clear_inferiors): Reset current_inferior.
6244 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6246 * acinclude.m4: Add override.m4.
6247 * configure: Regenerate.
6249 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6251 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6252 initial call to init_register_ppc64.
6254 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6256 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6257 single powerpc*-*-linux* case.
6258 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6260 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6262 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6263 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6265 * linux-ppc-low.c: Include <elf.h>.
6266 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6267 (ppc_hwcap): New global variable.
6268 (ppc_regmap): Remove __SPE__ #ifdef sections.
6269 (ppc_regmap_e500): New global variable.
6270 (ppc_cannot_store_register): Update __SPE__ special case.
6271 (ppc_get_hwcap): New function.
6272 (ppc_arch_setup): Use it to determine whether inferior supports
6273 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6274 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6275 Do not access registers if target does not support AltiVec.
6276 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6277 Do not access registers if target does not support SPE.
6278 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6280 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6282 * linux-low.c (disabled_regsets, num_regsets): New.
6283 (use_regsets_p): Delete.
6284 (linux_wait_for_process): Clear disabled_regsets.
6285 (regsets_fetch_inferior_registers): Check and set it.
6286 (regsets_store_inferior_registers): Likewise.
6287 (linux_fetch_registers, linux_store_registers): Do not use
6289 (initialize_low): Allocate disabled_regsets.
6291 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6293 * Makefile.in (LIBOBJS): New.
6295 (memmem.o): New rule.
6296 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6297 * configure: Regenerated.
6299 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6301 * server.c (handle_query): Never return "unsupported" for
6302 qXfer:features:read queries.
6304 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6306 * server.c (get_features_xml): Fix inverted condition.
6307 (handle_query): Always support qXfer:feature:read.
6309 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6311 * server.c (wrapper_argv): New.
6312 (start_inferior): Handle wrapper_argv. If set, expect an extra
6314 (gdbserver_usage): Document --wrapper.
6315 (main): Parse --wrapper.
6317 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6319 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6320 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6321 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6322 (ppc_set_pc): Likewise.
6323 (ppc_arch_setup): New function.
6324 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6325 of collect_register.
6326 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6328 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6330 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6331 instead of linux-ppc64-low.o.
6332 * linux-ppc64-low.c: Remove file.
6333 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6334 (linux-ppc64-low.o): Remove rule.
6336 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6337 (init_registers_powerpc_64): Likewise.
6338 (ppc_regmap): Conditionally define depending on __powerpc64__.
6339 (ppc_cannot_store_register): Do not special-case "fpscr" when
6340 compiled on __powerpc64__.
6341 (ppc_collect_ptrace_register): New function.
6342 (ppc_supply_ptrace_register): New function.
6343 (ppc_breakpoint): Change type to "unsigned int".
6344 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6345 (the_low_target): Conditionally provide initializers for the
6346 arch_setup member depending on __powerpc64__. Install
6347 collect_ptrace_register and supply_ptrace_register members.
6349 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6351 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6352 * server.c (gdbserver_xmltarget): Define.
6353 (get_features_xml): Use it to replace "target.xml" and arch_string.
6355 * configure.srv: Remove srv_xmltarget. Add XML files that were
6356 mentioned there to srv_xmlfiles instead. Remove conditional tests
6357 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6358 srv_xmlfiles and srv_regobj to include all possible choices.
6359 * configure.ac (srv_xmltarget): Remove.
6360 (srv_xmlfiles): Do not add "target.xml".
6361 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6362 checks for supplementary target information.
6363 * configure: Regenerate.
6364 * Makefile.in (XML_TARGET): Remove.
6365 (target.xml): Remove rule.
6366 (clean): Do not clean up target.xml.
6367 (.PRECIOUS): Do not mention target.xml.
6369 * target.h (struct target_ops): Remove arch_string member.
6370 * linux-low.c (linux_arch_string): Remove.
6371 (linux_target_ops): Remove arch_string initializer.
6372 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6373 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6374 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6375 * spu-low.c (spu_arch_string): Remove.
6376 (spu_target_ops): Remove arch_string initializer.
6377 * win32-low.c (win32_arch_string): Remove.
6378 (win32_target_ops): Remove arch_string initializer.
6379 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6380 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6381 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6383 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6385 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6386 by collect_ptrace_register and supply_ptrace_register hooks.
6387 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6388 instead of checking for the_low_target.left_pad_xfer.
6389 (usr_store_inferior_registers): Use collect_ptrace_register callback
6390 instead of checking for the_low_target.left_pad_xfer.
6392 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6393 (s390_supply_ptrace_register): Likewise.
6394 (s390_fill_gregset): Call s390_collect_ptrace_register.
6395 (the_low_target): Update.
6397 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6398 (ppc_supply_ptrace_register): Likewise.
6399 (the_low_target): Update.
6401 * linux-i386-low.c (the_low_target): Update.
6402 * linux-x86-64-low.c (the_low_target): Update.
6404 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6406 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6407 reg-s390.o and reg-s390x.o.
6409 * linux-low.c (new_inferior): New global variable.
6410 (linux_create_inferior, linux_attach): Set it.
6411 (linux_wait_for_process): Call the_low_target.arch_setup after the
6412 target has stopped for the first time.
6413 (initialize_low): Do not call the_low_target.arch_setup.
6415 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6416 (s390_set_pc): Likewise.
6417 (s390_arch_setup): New function.
6418 (the_low_target): Use s390_arch_setup as arch_setup routine.
6420 * regcache.c (realloc_register_cache): New function.
6421 (set_register_cache): Call it for each existing regcache.
6423 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6425 * server.h (init_registers): Remove prototype.
6427 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6428 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6429 instead of init_registers ().
6430 * linux-arm-low.c (init_registers_arm): Add prototype.
6431 (init_registers_arm_with_iwmmxt): Likewise.
6432 (the_low_target): Add initializer for arch_setup field.
6433 * linux-cris-low.c (init_registers_cris): Add prototype.
6434 (the_low_target): Add initializer for arch_setup field.
6435 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6436 (the_low_target): Add initializer for arch_setup field.
6437 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6438 (the_low_target): Add initializer for arch_setup field.
6439 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6440 (the_low_target): Add initializer for arch_setup field.
6441 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6442 (the_low_target): Add initializer for arch_setup field.
6443 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6444 (the_low_target): Add initializer for arch_setup field.
6445 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6446 (init_registers_mips64_linux): Likewise.
6447 (the_low_target): Add initializer for arch_setup field.
6448 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6449 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6450 (the_low_target): Add initializer for arch_setup field.
6451 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6452 (init_registers_powerpc_64): Likewise.
6453 (the_low_target): Add initializer for arch_setup field.
6454 * linux-s390-low.c (init_registers_s390): Add prototype.
6455 (init_registers_s390x): Likewise.
6456 (the_low_target): Add initializer for arch_setup field.
6457 * linux-sh-low.c (init_registers_sh): Add prototype.
6458 (the_low_target): Add initializer for arch_setup field.
6459 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6460 (the_low_target): Add initializer for arch_setup field.
6461 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6462 (the_low_target): Add initializer for arch_setup field.
6464 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6465 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6466 instead of init_registers ().
6467 * win32-arm-low.c (init_registers_arm): Add prototype.
6468 (the_low_target): Add initializer for arch_setup field.
6469 * win32-i386-low.c (init_registers_i386): Add prototype.
6470 (the_low_target): Add initializer for arch_setup field.
6472 * spu-low.c (init_registers_spu): Add prototype.
6473 (initialize_low): Call initialie_registers_spu () instead of
6474 initialize_registers ().
6476 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6478 * server.c (handle_v_requests): When handling the vRun and vAttach
6479 packets, if already debugging a process, don't kill it. Return an
6482 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6484 * server.c (handle_query): Correct length check.
6486 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6488 * win32-low.c (do_initial_child_stuff): Add process handle
6489 parameter. Set current_process_handle and current_process_id from the
6490 parameters. Clear globals.
6491 (win32_create_inferior): Don't set current_process_handle and
6492 current_process_id here. Instead pass them on the call to
6493 do_initial_child_stuff.
6494 (win32_attach): Likewise.
6495 (win32_clear_inferiors): New.
6496 (win32_kill): Don't close the current process handle or the
6497 current thread handle here. Instead call win32_clear_inferiors.
6498 (win32_detach): Don't open a new handle to the process. Call
6499 win32_clear_inferiors.
6500 (win32_join): Don't rely on current_process_handle; open a new
6501 handle using the process id.
6502 (win32_wait): Call win32_clear_inferiors when the inferior process
6505 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6507 * server.c (monitor_show_help): Add "exit".
6509 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6511 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6512 (clean): Add reg-xtensa.c.
6513 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6514 * configure.srv (xtensa*-*-linux*) New target.
6515 * linux-xtensa-low.c: New.
6516 * xtensa-xtregs.c: New.
6518 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6520 * hostio.c: Don't include errno.h.
6521 (errno_to_fileio_errno): Move to hostio-errno.
6522 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6523 error number outputting to the target->hostio_last_error callback.
6524 (hostio_packet_error): Use FILEIO_EINVAL directly.
6525 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6526 calls to hostio_error.
6527 * hostio-errno.c: New.
6528 * server.h (hostio_last_error_from_errno): Declare.
6529 * target.h (target_ops): Add hostio_last_error member.
6530 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6531 as hostio_last_error handler.
6532 * spu-low.c (spu_target_ops): Likewise.
6533 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6534 (wince_hostio_last_error): New functions.
6535 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6536 as hostio_last_error handler.
6537 (win32_target_ops) [!_WIN32_WCE]: Register
6538 hostio_last_error_from_errno as hostio_last_error handler.
6539 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6540 (hostio-errno.o): New rule.
6541 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6542 * configure.srv (srv_hostio_err_objs): New variable. Default to
6544 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6545 * configure: Regenerate.
6547 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6549 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6550 (linux_kill, linux_detach): Clean up the process list.
6551 * remote-utils.c (remote_open): Improve port number parsing.
6552 (putpkt_binary, input_interrupt): Only send interrupts if the target
6554 * server.c (extended_protocol): Make static.
6555 (attached): Define earlier.
6556 (exit_requested, response_needed, program_argv): New variables.
6557 (target_running): New.
6558 (start_inferior): Clear attached here.
6559 (attach_inferior): Set attached here.
6560 (require_running): Define.
6561 (handle_query): Use require_running and target_running. Implement
6563 (handle_v_attach, handle_v_run): New.
6564 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6565 (gdbserver_usage): Update.
6566 (main): Redo argument parsing. Handle --debug and --multi. Handle
6567 --attach along with other options or after the port. Save
6568 program_argv. Support no initial program. Resynchronize
6569 communication with GDB after an error. Handle "monitor exit".
6570 Use require_running and target_running. Always allow the extended
6571 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6572 restart in extended mode.
6573 * README: Refer to the GDB manual. Update --attach usage.
6575 2007-12-20 Andreas Schwab <schwab@suse.de>
6577 * linux-low.c (STACK_SIZE): Define.
6578 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6579 (linux_test_for_tracefork): Likewise.
6581 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6583 * linux-low.c (linux_wait_for_event): Update messages. Do not
6584 reinsert auto-delete breakpoints.
6585 * mem-break.c (struct breakpoint): Change return type of handler to
6587 (set_breakpoint_at): Update handler type.
6588 (reinsert_breakpoint_handler): Return 1 instead of calling
6590 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6592 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6593 * mem-break.h (set_breakpoint_at): Update handler type.
6594 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6595 * win32-low.c (auto_delete_breakpoint): New.
6596 (get_child_debug_event): Use it.
6598 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6600 * configure.ac: Check for pread and pwrite.
6601 * hostio.c (handle_pread): Fall back to lseek and read.
6602 (handle_pwrite): Fall back to lseek and write.
6603 * config.in, configure: Regenerated.
6605 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6607 * server.c (myresume): Add own_buf argument.
6608 (main): Update calls.
6610 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6612 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6613 * remote-utils.c (remote_open): Do not call disable_async_io.
6614 (block_async_io): Delete.
6615 (unblock_async_io): Make static.
6616 (initialize_async_io): New.
6617 * server.c (handle_v_cont): Handle async I/O here.
6618 (myresume): Likewise. Move other common resume tasks here...
6619 (main): ... from here. Call initialize_async_io. Disable async
6620 I/O before the main loop.
6621 * server.h (initialize_async_io): Declare.
6622 (block_async_io, unblock_async_io): Delete prototypes.
6623 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6625 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6627 * remote-utils.c (readchar): Allow binary data in received messages.
6629 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6631 * win32-low.c (attaching): New global.
6632 (win32_create_inferior): Clear the `attaching' global.
6633 (win32_attach): Set the `attaching' global.
6634 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6635 attaching. Only set a breakpoint at the entry point if not
6638 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6640 * server.c (main): Don't report dll events on the initial
6641 connection on attaches.
6643 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6645 * server.c (main): Relax numerical bases supported for the pid of
6646 the --attach command line argument.
6648 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6650 * win32-low.c (win32_attach): Call OpenProcess before
6651 DebugActiveProcess, not after. Add last error output to error
6654 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6656 * win32-low.c (win32_get_thread_context)
6657 (win32_set_thread_context): New functions.
6658 (thread_rec): Use win32_get_thread_context.
6659 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6660 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6663 2007-12-03 Leo Zayas
6664 Pedro Alves <pedro_alves@portugalmail.pt>
6666 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6668 (child_add_thread): Minor cleanup.
6669 (child_continue): Resume artificially suspended threads before
6670 calling ContinueDebugEvent.
6671 (suspend_one_thread): New.
6672 (fake_breakpoint_event): New.
6673 (get_child_debug_event): Change return type to int. Check here if
6674 gdb sent an interrupt request. If a soft interrupt was requested,
6675 fake a breakpoint event. Return 0 if there is no event to handle,
6677 (win32_wait): Don't check here if gdb sent an interrupt request.
6678 Ensure there is a valid event to handle.
6679 (win32_request_interrupt): Add soft interruption method as last
6682 2007-12-03 Leo Zayas
6683 Pedro Alves <pedro_alves@portugalmail.pt>
6685 * win32-low.h (win32_thread_info): Add descriptions to the
6686 structure members. Replace `suspend_count' counter by a
6688 * win32-low.c (thread_rec): Update condition of when to get the
6689 context from the inferior. Rely on ContextFlags being set if it
6690 has already been retrieved. Only suspend the inferior thread if
6691 we haven't already. Warn if that fails.
6692 (continue_one_thread): s/suspend_count/suspended/. Only call
6693 ResumeThread once. Warn if that fails.
6695 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6697 * win32-low.c (win32_wait): Don't read from the inferior when it
6700 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6702 * Makefile.in (win32_low_h): New variable.
6703 (win32-low.o): Add dependency on $(win32_low_h).
6704 (win32-arm-low.o, win32-i386-low.o): New rules.
6706 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6708 * hostio.c: Correct copyright year.
6710 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6712 * Makefile.in (OBS): Add hostio.o.
6713 (hostio.o): New rule.
6714 * server.h (handle_vFile): Declare.
6715 * hostio.c: New file.
6716 * server.c (handle_v_requests): Take packet_len and new_packet_len
6717 for binary packets. Call handle_vFile.
6718 (main): Update call to handle_v_requests.
6720 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6722 * linux-low.c: Include <sched.h>.
6724 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6726 * linux-low.c (linux_tracefork_grandchild): New.
6727 (linux_tracefork_child): Use clone.
6728 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6730 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6732 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6734 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6736 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6738 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6740 * inferiors.c (change_inferior_id): Delete.
6741 (add_pid_to_list, pull_pid_from_list): New.
6742 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6743 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6744 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6745 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6746 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6747 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6748 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6749 (using_threads): Always set to 1.
6750 (handle_extended_wait): New.
6751 (add_process): Do not set TID.
6752 (linux_create_inferior): Set must_set_ptrace_flags.
6753 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6754 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6755 (linux_thread_alive): Rename TID argument to LWPID.
6756 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6757 (linux_wait_for_event): Do not use TID or check using_threads. Update
6758 call to dead_thread_notify. Call handle_extended_wait.
6759 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6760 (send_sigstop): Delete sigstop_sent.
6761 (wait_for_sigstop): Avoid TID.
6762 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6763 (linux_test_for_tracefork): New.
6764 (linux_lookup_signals): Use thread_db_active and
6765 linux_supports_tracefork_flag.
6766 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6767 * linux-low.h (get_process_thread): Avoid TID.
6768 (struct process_ifo): Move thread_known and tid to the end. Remove
6770 (linux_attach_lwp, thread_db_init): Update prototypes.
6771 * server.h (change_inferior_id): Delete prototype.
6772 (add_pid_to_list, pull_pid_from_list): New prototypes.
6773 * thread-db.c (thread_db_use_events): New.
6774 (find_first_thread): Rename to...
6775 (find_one_thread): ...this. Update callers and messages. Do not
6776 call fatal. Check thread_db_use_events. Do not call
6777 change_inferior_id or new_thread_notify.
6778 (maybe_attach_thread): Update. Do not call new_thread_notify.
6779 (thread_db_init): Set thread_db_use_events. Check use_events.
6780 * utils.c (fatal, warning): Correct message prefix.
6782 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6784 * Makefile.in (clean): Remove new files.
6785 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6786 (powerpc-64.o, powerpc-64.c): New rules.
6787 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6788 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6790 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6792 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6793 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6794 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6795 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6796 (target_regsets): Add AltiVec and SPE register sets.
6797 * configure.ac: Check for AltiVec and SPE.
6798 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6799 (ppc_fill_vrregset, ppc_store_vrregset): New.
6800 (target_regsets): Add AltiVec register set.
6801 * configure: Regenerated.
6803 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6805 * linux-low.c (O_LARGEFILE): Define.
6806 (linux_read_memory): Use /proc/PID/mem.
6807 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6808 * configure, config.in: Regenerated.
6810 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6812 * linux-low.c (linux_wait_for_event): Do not pass signals while
6815 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6817 * win32-low.c (create_process): New.
6818 (win32_create_inferior): Use create_process instead of
6819 CreateProcess. If create_process failed retry appending an ".exe"
6820 suffix. Store the GetLastError result immediatelly after
6821 create_process calls and use it on the call to error.
6823 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6825 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6827 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6829 * configure.ac: Switch license to GPLv3.
6831 2007-08-01 Michael Snyder <msnyder@access-company.com>
6833 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6835 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6837 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6839 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6840 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6841 CloseToolhelp32Snapshot.
6842 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6843 CloseToolhelp32Snapshot.
6845 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6847 * server.c (main): Check for inferior exit before main loop.
6849 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6851 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6852 instead of on tmp_desc.
6854 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6855 Daniel Jacobowitz <dan@codesourcery.com>
6857 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6858 (add_thread): Minor cleanups.
6859 (clear_inferiors): Move lower in the file. Clear the DLL
6861 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6862 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6863 (xml_escape_text): New.
6864 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6866 (handle_v_cont): Report errors.
6867 (gdbserver_version): Update.
6868 (main): Correct size of own_buf. Do not report initial DLL events.
6869 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6870 (unloaded_dll, xml_escape_text): New.
6871 * win32-low.c (enum target_waitkind): Update comments.
6872 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6873 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6874 (win32_EnumProcessModules, win32_GetModuleInformation)
6875 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6876 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6877 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6878 (win32_Module32First, win32_Module32Next, load_toolhelp)
6879 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6880 (get_child_debug_event): Handle DLL events.
6881 (win32_wait): Likewise.
6883 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6885 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6886 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6888 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6890 * win32-low.c (handle_output_debug_string): Ignore event if not
6893 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6895 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6897 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6899 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6901 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6903 * inferiors.c (change_inferior_id): Add comment.
6904 * linux-low.c (check_removed_breakpoint): Add an early
6905 prototype. Improve debug output.
6906 (linux_attach): Doc update.
6907 (linux_detach_one_process, linux_detach): Clean up before releasing
6909 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6910 * linux-low.h (struct process_info): Doc improvement.
6911 * mem-break.c (delete_all_breakpoints): New.
6912 * mem-break.h (delete_all_breakpoints): New prototype.
6913 * thread-db.c (find_first_thread): New.
6914 (thread_db_create_event): Call it instead of
6915 thread_db_find_new_threads. Clean up unused variables.
6916 (maybe_attach_thread): Remove first thread handling.
6917 (thread_db_find_new_threads): Use find_first_thread.
6918 (thread_db_get_tls_address): Likewise.
6920 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6922 * thread-db.c (thread_db_find_new_threads): Add prototype.
6923 (thread_db_create_event): Check for the main thread before adding
6925 (maybe_attach_thread): Only enable event reporting if TID == 0.
6926 (thread_db_get_tls_address): Check for new threads.
6928 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6930 * linux-low.c (linux_create_inferior): Try execv before execvp.
6931 * spu-low.c (spu_create_inferior): Likewise.
6933 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6935 * linux-low.c (linux_create_inferior): Change execv to execvp.
6936 * spu-low.c (spu_create_inferior): Likewies.
6938 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6940 * Makefile.in (clean): Clean new files instead of deleted ones.
6941 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6942 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6944 * configure.srv: Specify XML files and new regformats for MIPS and
6946 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6947 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6948 an entry for the restart register.
6949 (mips_cannot_fetch_register, mips_cannot_store_register)
6950 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6951 register names to match the XML descriptions.
6952 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6953 restart register instead of $0.
6955 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6956 Markus Deuling <deuling@de.ibm.com>
6958 * remote-utils.c (decode_xfer_write): New function.
6959 * server.h (decode_xfer_write): Add prototype.
6960 * server.c (handle_query): Add PACKET_LEN argument. Support
6961 qXfer:spu:read and qXfer:spu:write packets.
6962 (main): Pass packet_len to handle_query.
6963 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6964 * target.h (target_ops): Add qxfer_spu.
6966 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6968 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6969 accessing non-seekable spufs files.
6971 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6973 * server.c (handle_query): Add reply for qC packet.
6975 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6976 Leo Zayas <lerele@champenstudios@com>
6978 * server.h (check_remote_input_interrupt_request): New function.
6979 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6980 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6981 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6982 (check_remote_input_interrupt_request): New function.
6983 * server.h (check_remote_input_interrupt_request): Declare.
6984 * win32-low.c (winapi_DebugBreakProcess,
6985 winapi_GenerateConsoleCtrlEvent): New typedefs.
6986 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6988 (win32_wait): Check for remote interrupt request
6989 with check_remote_input_interrupt_request.
6990 (win32_request_interrupt): New function.
6991 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6993 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6995 * win32-low.c (debug_registers_changed,
6996 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6997 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6998 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6999 (thread_rec): Get context using the low target.
7000 (child_add_thread): Call thread_added on the low target,
7001 which does the same thing.
7003 (do_initial_child_stuff): Remove debug registers references.
7004 Set context using the low target. Resume threads after
7005 setting the contexts.
7006 (child_continue): Remove dead variable. Remove debug
7007 registers references.
7008 (child_fetch_inferior_registers): Go through the low target.
7009 (do_child_store_inferior_registers): Remove.
7010 (child_store_inferior_registers): Go through the low target.
7011 (win32_resume): Remove debug registers references.
7012 Set context using the low target.
7013 (handle_exception): Change return type to void. Don't record
7014 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7015 first chance exception.
7016 (get_child_debug_event): Change return type to void. Remove
7017 goto loop. Always return after waiting for debug event.
7018 (win32_wait): Convert to switch statement. Handle spurious
7021 * win32-i386-low.c (debug_registers_changed,
7022 debug_registers_used): New.
7023 (initial_stuff): Rename to ...
7024 (i386_initial_stuff): ... this. Clear debug registers
7026 (store_debug_registers): Delete.
7027 (i386_get_thread_context): New.
7028 (load_debug_registers): Delete.
7029 (i386_set_thread_context): New.
7030 (i386_thread_added): New.
7031 (single_step): Rename to ...
7032 (i386_single_step): ... this.
7033 (do_fetch_inferior_registers): Rename to ...
7034 (i386_fetch_inferior_register): ... this.
7035 (i386_store_inferior_register): New.
7036 (the_low_target): Adapt to new interface.
7038 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7039 (arm_get_thread_context): New.
7040 (arm_set_thread_context): New.
7042 (do_fetch_inferior_registers): Rename to ...
7043 (arm_fetch_inferior_register): ... this.
7044 (arm_store_inferior_register): New.
7045 (arm_wince_breakpoint): Reimplement as unsigned long.
7046 (arm_wince_breakpoint_len): Define.
7047 (the_low_target): Adapt to new interface.
7049 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7050 load_debug_registers. Add get_thread_context, set_thread_context,
7051 thread_added and store_inferior_register. Rename
7052 fetch_inferior_registers to fetch_inferior_register.
7053 (regptr): Remove declaration.
7055 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7057 * linux-low.c (linux_detach): Change return type to int. Return 0.
7058 * spu-low.c (spu_detach): Likewise.
7060 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7062 * target.h (target_ops): Change return type of detach to int.
7064 (join_inferior): New.
7065 * server.c (main): Don't skip detach support on mingw32.
7066 If the inferior doesn't support detaching return error.
7067 Call join_inferior instead of using waitpid.
7068 * linux-low.c (linux_join): New.
7069 (linux_target_op): Add linux_join.
7070 * spu-low.c (spu_join): New.
7071 (spu_target_ops): Add spu_join.
7072 * win32-low.c (win32_detach): Adapt to new interface.
7073 Reopen current_process_handle before detaching. Issue a child
7074 resume before detaching.
7076 (win32_target_op): Add win32_join.
7078 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7080 * win32-low.c (win32-attach): Fix return value.
7081 * target.h (target_ops): Describe ATTACH return values.
7083 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7085 * win32-low.c (GETPROCADDRESS): Define.
7086 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7087 (winapi_DebugSetProcessKillOnExit): Likewise.
7088 (win32_create_inferior): Force usage of ansi CreateProcessA.
7089 (win32_attach): Use GETPROCADDRESS.
7090 (win32_detach): Likewise.
7092 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7094 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7096 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7098 * win32-low.c: Commit leftover changes from 2007-03-29.
7100 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7102 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7103 fields short instead of int. Add explicit padding.
7104 (i387_cache_to_fsave): Remove unnecessary casts.
7105 (i387_fsave_to_cache): Doc fix.
7106 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7108 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7110 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7111 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7113 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7115 * configure.srv (arm*-*-mingw32ce*): Move near the other
7118 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7120 * configure.ac: Add errno checking.
7121 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7122 sys/file.h and malloc.h.
7123 (AC_CHECK_DECLS): Add perror.
7124 (srv_mingwce): Handle.
7125 * configure.srv (i[34567]86-*-cygwin*): Add
7126 win32-i386-low.o to srv_tgtobj.
7127 (i[34567]86-*-mingw*): Likewise.
7128 (arm*-*-mingw32ce*): Add case.
7129 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7130 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7131 [__MINGW32CE__] (strerror): New function.
7132 [__MINGW32CE__] (errno): Define to GetLastError.
7133 [__MINGW32CE__] (COUNTOF): New macro.
7134 (remote_open): Remove extra close call.
7135 * mem-break.c (delete_breakpoint_at): New function.
7136 * mem-break.h (delete_breakpoint_at): Declare.
7137 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7138 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7139 [USE_WIN32API] (read, write): Add char* casts.
7140 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7141 * server.h: Include wincecompat.h on Windows CE.
7142 [HAVE_ERRNO_H]: Check.
7143 (perror): Declare if not declared.
7144 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7145 (perror_with_name): Remove errno declaration.
7146 * wincecompat.h: New.
7147 * wincecompat.c: New.
7149 * win32-arm-low.c: New.
7150 * win32-i386-low.c: New.
7151 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7152 (OUTMSG2): Make it safe.
7154 (COUNTOF): New macro.
7155 (NUM_REGS): Get it from the low target.
7156 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7157 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7158 (thread_rec): Let low target handle debug registers.
7159 (child_add_thread): Likewise.
7160 (child_init_thread_list): Likewise.
7161 (continue_one_thread): Likewise.
7163 (do_child_fetch_inferior_registers): Move to ...
7164 * win32-i386-low.c: ... here, and rename to ...
7165 (do_fetch_inferior_registers): ... this.
7166 * win32-low.c (child_fetch_inferior_registers):
7167 Go through the low target.
7168 (do_child_store_inferior_registers): Use regptr.
7169 (strwinerror): New function.
7170 (win32_create_inferior): Handle Windows CE.
7171 Use strwinerror instead of strerror on Windows error
7172 codes. Add program to the error output.
7173 Don't close the main thread handle on Windows CE.
7174 (win32_attach): Use coredll.dll on Windows CE.
7175 (win32_kill): Close current process and current
7177 (win32_detach): Use coredll.dll on Windows CE.
7178 (win32_resume): Let low target handle debug registers, and
7180 (handle_exception): Add/Remove initial breakpoint. Avoid
7181 non-existant WSTOPSIG on Windows CE.
7182 (win32_read_inferior_memory): Cast to remove warning.
7183 (win32_arch_string): Go through the low target.
7184 (initialize_low): Call set_breakpoint_data with the low
7185 target's breakpoint.
7186 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7187 FOP_REGNUM, mappings): Move to ...
7188 * win32-i386-low.c: ... here.
7189 * win32-low.c (win32_thread_info): Move to ...
7190 * win32-low.h: ... here.
7191 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7192 win32-arm-low.c and wincecompat.c.
7193 (all:): Add $EXEEXT.
7194 (install-only:): Likewise.
7195 (gdbserver:): Likewise.
7196 (gdbreplay:): Likewise.
7197 * config.in: Regenerate.
7198 * configure: Regenerate.
7200 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7202 * win32-low.c: Rename typedef thread_info to
7203 win32_thread_info throughout.
7205 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7207 * win32-i386-low.c: Rename to ...
7208 * win32-low.c: ... this.
7209 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7210 * Makefile.in: Likewise.
7212 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7214 * remote-utils.c (monitor_output): Constify msg parameter.
7215 * server.h (monitor_output): Likewise.
7216 * win32-i386-low.c (handle_output_debug_string): New.
7217 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7218 handle_output_debug_string.
7219 (get_child_debug_event): Likewise.
7221 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7223 * server.c (main): Correct strtoul check.
7225 2007-03-27 Jon Ringle <jon@ringle.org>
7227 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7229 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7231 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7233 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7235 * terminal.h: Check HAVE_SGTTY_H.
7237 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7239 * remote-utils.c (remote_open): Print out the assigned port number.
7241 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7243 * remote-utils.c (monitor_output): New function.
7244 * server.c (debug_threads): Define here.
7245 (monitor_show_help): New function.
7246 (handle_query): Handle qRcmd.
7247 (main): Do not handle 'd' packet.
7248 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7249 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7252 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7254 * Makefile.in (EXEEXT): New.
7255 (clean): Use $(EXEEXT).
7257 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7259 * target.h (target_ops): Rename send_signal to request_interrupt,
7260 and remove enum target_signal parameter.
7261 * linux-low.c (linux_request_interrupt): Rename from
7262 linux_send_signal, and always send SIGINT.
7263 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7264 and always send SIGINT.
7265 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7267 (input_interrupt): Likewise.
7269 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7271 * server.c (get_features_xml): Check if target implemented
7273 * win32-i386-low.c (win32_arch_string): New.
7274 (win32_target_ops): Add win32_arch_string as arch_string member.
7276 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7278 * spu-low.c (spu_arch_string): New.
7279 (spu_target_ops): Add spu_arch_string.
7281 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7283 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7284 * configure.ac: Do not check for terminal.h.
7285 * configure, config.in: Regenerated.
7287 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7289 * Makefile.in (OBS): Add $(XML_BUILTIN).
7290 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7292 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7293 (arm-with-iwmmxt.c): New.
7294 * config.in, configure: Regenerate.
7295 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7296 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7297 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7298 (arm*-*-linux*): Add iWMMXt and regset support.
7299 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7300 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7301 (arm_store_wmmxregset, target_regsets): New.
7302 * server.c (get_features_xml): Take annex argument. Check builtin
7304 (handle_query): Handle multiple annexes.
7306 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7308 * remote-utils.c [USE_WIN32API] (read, write): Define.
7309 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7312 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7314 * linux-i386-low.c (the_low_target): Set arch_string.
7315 * linux-x86-64-low.c (the_low_target): Likewise.
7316 * linux-low.c (linux_arch_string): New.
7317 (linux_target_ops): Add it.
7318 * linux-low.h (struct linux_target_ops): Add arch_string.
7319 * server.c (write_qxfer_response): Use const void * for DATA.
7320 (get_features_xml): New.
7321 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7322 * target.h (struct target_ops): Add arch_string method.
7324 2007-01-03 Denis Pilat <denis.pilat@st.com>
7325 Daniel Jacobowitz <dan@codesourcery.com>
7327 * linux-low.c (linux_kill): Handle being called with no threads.
7328 * win32-i386-low.c (win32_kill): Likewise.
7329 (get_child_debug_event): Clear current_process_handle.
7331 2006-12-30 Denis PILAT <denis.pilat@st.com>
7332 Daniel Jacobowitz <dan@codesourcery.com>
7334 * remote-utils.c (remote_open): Check the type of specified
7335 serial port devices before opening them.
7336 * server.c (main): Kill the inferior if an error occurs during
7337 the first remote_open.
7339 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7341 * README: Update supported targets.
7343 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7345 * Makefile.in (clean): Remove reg-mips64.c.
7346 (reg-mips64.c, reg-mips64.o): New rules.
7347 * configure.srv: Handle mips64. Include regset support for mips.
7348 * linux-mips-low.c (union mips_register): New.
7349 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7350 (mips_breakpoint, mips_breakpoint_at): Use int.
7351 (mips_collect_register, mips_supply_register)
7352 (mips_collect_register_32bit, mips_supply_register_32bit)
7353 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7354 (mips_store_fpregset, target_regsets): New.
7355 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7357 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7359 * configure.srv: Add target "spu*-*-*".
7360 * Makefile.in (clean): Remove reg-spu.c.
7361 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7362 * spu-low.c: New file.
7364 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7366 * configure.ac: Correct td_thr_tls_get_addr test.
7367 * configure: Regenerated.
7369 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7371 * linux-low.c (linux_wait_for_event): Reformat. Use the
7373 * remote-utils.c (decode_address_to_semicolon): New.
7374 * server.c (pass_signals, handle_general_set): New.
7375 (handle_query): Mention QPassSignals for qSupported.
7376 (main): Call handle_general_set.
7377 * server.h (pass_signals, decode_address_to_semicolon): New.
7379 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7381 * server.c (handle_query): Correct error handling for read_auxv.
7383 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7385 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7386 and srv_linux_thread_db to yes.
7387 * linux-s390-low.c (s390_fill_gregset): New function.
7388 (target_regsets): Define data structure.
7390 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7392 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7393 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7394 * config.in, configure: Regenerated.
7395 * inferiors.c (gdb_id_to_thread): New function.
7396 (gdb_id_to_thread_id): Use it.
7397 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7398 * linux-low.h (struct process_info): Add th member.
7399 (thread_db_get_tls_address): New prototype.
7400 * remote-utils.c (decode_address): Make non-static.
7401 * server.c (handle_query): Handle qGetTLSAddr.
7402 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7403 * target.h (struct target_ops): Add get_tls_address.
7404 * thread-db.c (maybe_attach_thread): Save the thread handle.
7405 (thread_db_get_tls_address): New.
7407 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7409 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7410 (linux_resume_one_process): Take a siginfo_t *. Update all
7411 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7412 (struct pending_signals): Add a siginfo_t.
7413 (linux_wait_for_process): Always set last_status.
7414 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7415 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7416 * linux-low.h (struct process_info): Add last_status.
7418 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7420 * remote-utils.c (try_rle): New function.
7421 (putpkt_binary): Use it.
7423 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7425 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7426 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7427 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7428 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7429 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7432 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7434 * server.c (terminal_fd): New variable.
7435 (old_foreground_pgrp): Likewise.
7436 (restore_old_foreground_pgrp): New function.
7437 (start_inferior): Record the terminal file descriptor in terminal_fd
7438 and its original foreground group in old_foreground_pgrp. Register
7439 restore_old_foreground_pgrp with atexit().
7441 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7443 * server.c (handle_query): Correct qPart to qXfer.
7445 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7447 * configure.ac: Check for more headers which are missing on
7448 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7449 * configure.srv: Add Cygwin and mingw32.
7450 * remote-utils.c: Don't include headers unconditionally which
7451 are missing on mingw32. Include <winsock.h> for mingw32.
7452 (remote_open): Adjust for mingw32 support. Flush
7453 standard error after writing to it.
7454 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7455 (unblock_async_io, enable_async_io, disable_async_io)
7456 (readchar, getpkt): Update for Winsock support.
7457 (prepare_resume_reply): Expect a protocol signal number.
7458 * server.c: Disable <sys/wait.h> on mingw32.
7459 (start_inferior): Adjust for mingw32 support. Flush
7460 standard error after writing to it.
7461 (attach_inferior): Likewise. Use protocol signal
7463 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7465 * win32-i386-low.c: New file.
7466 * Makefile.in (XM_CLIBS): Set.
7467 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7468 (win32-i386-low.o): New dependency rule.
7469 * linux-low.c (linux_wait): Use target signal numbers.
7470 * target.h (struct target_ops): Doc fix.
7471 * server.h (target_signal_to_name): New prototype.
7472 * gdbreplay.c: Don't include headers unconditionally which
7473 are missing on mingw32. Include <winsock.h> for mingw32.
7474 (remote_close, remote_open): Adjust for Winsock support.
7475 * configure, config.in: Regenerated.
7477 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7479 * server.c (decode_xfer_read, write_qxfer_response): New.
7480 (handle_query): Take a packet length argument. Handle
7481 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7482 the qSupported response.
7483 (main): Update call to handle_query.
7485 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7487 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7488 (putpkt_binary): Renamed from putpkt and adjusted for binary
7490 (putpkt): New wrapper for putpkt_binary.
7491 (readchar): Don't mask off the high bit.
7492 (decode_X_packet): New function.
7493 * server.c (main): Call putpkt_binary if a handler sets the packet
7494 length. Save the length of the incoming packet. Handle 'X'.
7495 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7497 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7499 * server.c (handle_query): Handle qSupported.
7501 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7503 * remote-utils.c (all_symbols_looked_up): New variable.
7504 (look_up_one_symbol): Check it.
7505 * server.h (look_up_one_symbol): New declaration.
7506 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7508 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7510 * Makefile.in (linux-arm-low.o): Update dependencies.
7511 * linux-arm-low.c: Include "gdb_proc_service.h".
7512 (PTRACE_GET_THREAD_AREA): Define.
7513 (ps_get_thread_area): New function.
7515 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7517 * configure.srv (m68k*-*-uclinux*): New target.
7518 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7519 (linux_resume_one_process): Remove extraneous cast.
7520 (linux_read_offsets): New.
7521 (linux_target_op): Add linux_read_offsets on mmuless systems.
7522 * server.c (handle_query): Add qOffsets logic.
7523 * target.h (struct target_ops): Add read_offsets.
7525 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7527 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7528 (PTRACE_GET_THREAD_AREA): Define.
7529 (ps_get_thread_area): New function.
7530 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7531 (linux-x86-64-low.o): Update.
7533 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7535 * configure.ac: Remove checks for prfpregset_t.
7536 * gdb_proc_service.h: New file.
7537 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7538 new "gdb_proc_service.h".
7539 * proc-service.c: Likewise.
7540 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7541 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7542 * Makefile.in (gdb_proc_service_h): Updated.
7543 * configure, config.in: Regenerated.
7545 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7547 * remote-utils.c (prepare_resume_reply): Move declaration
7548 of gdb_id_from_wait to the top of the block.
7550 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7552 * linux-low.c (regsets_store_inferior_registers): Read the regset
7553 from the target before filling it.
7555 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7557 * server.c (attach_inferior): Return SIGTRAP for a successful
7560 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7562 * Makefile.in (OBS): Add version.o.
7563 (STAGESTUFF): Delete.
7564 (version.o): Add dependencies.
7565 (version.c): Replace rule.
7566 (clean): Remove version.c.
7567 * server.c (gdbserver_version): New.
7568 (gdbserver_usage): Use printf.
7569 (main): Handle --version and --help.
7570 * server.h (version, host_name): Add declarations.
7572 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7584 * linux-x86-64-low.c:
7587 * linux-ppc64-low.c:
7596 * linux-crisv32-low.c:
7608 * gdbserver.1: Add (C) after Copyright. Update the FSF
7611 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7613 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7614 (arm_breakpoint_at): Recognize both breakpoints.
7615 (the_low_target): Use the correct breakpoint instruction.
7617 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7619 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7620 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7621 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7622 (the_low_target): Update.
7624 2005-10-25 Andreas Schwab <schwab@suse.de>
7626 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7628 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7629 (ia64_num_regs): Reduce to 462.
7631 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7633 * acinclude.m4: Correct quoting.
7634 * aclocal.m4: Regenerated.
7636 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7637 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7638 (thread_db_init): Call thread_db_err_str.
7639 * configure.ac: Check for TD_VERSION.
7640 * config.in, configure: Regenerated.
7642 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7644 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7646 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7648 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7649 is not available. Define HAVE_PTRACE_GETREGS if it is.
7650 * config.in, configure: Regenerated.
7651 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7652 * linux-i386-low.c, linux-m68k-low.c: Update to use
7653 HAVE_PTRACE_GETREGS.
7654 * linux-low.c (regsets_fetch_inferior_registers)
7655 (regsets_store_inferior_registers): Only return 0 if we processed
7657 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7658 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7660 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7662 * inferiors.c (struct thread_info): Add gdb_id.
7663 (add_thread): Add gdb_id argument.
7664 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7665 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7666 calls to add_thread.
7667 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7668 * server.c (handle_query): Use thread_to_gdb_id.
7669 (handle_v_cont, main): Use gdb_id_to_thread_id.
7670 * server.h (add_thread): Update prototype.
7671 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7674 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7676 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7677 left-padded registers.
7678 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7679 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7681 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7683 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7684 * configure: Regenerate.
7685 * config.in: Regenerate.
7686 * server.h (NEED_DECLARATION_STRERROR):
7687 Replace with !HAVE_DECL_STRERROR.
7689 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7691 * linux-low.c (linux_wait, linux_send_signal): Don't test
7692 an unsigned long variable for > 0 if it could be MAX_ULONG.
7693 * server.c (myresume): Likewise.
7694 * target.c (set_desired_inferior): Likewise.
7696 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7698 * configure.ac: Simplify and improve check for socklen_t.
7699 * configure, config.in: Regenerate.
7701 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7703 * acconfig.h: Remove.
7704 * configure.ac: Add a test for socklen_t. Use three-argument
7705 AC_DEFINE throughout.
7706 * config.in: Regenerated using autoheader 2.59.
7707 * configure: Regenerated.
7709 * gdbreplay.c (socklen_t): Provide a default.
7710 (remote_open): Use socklen_t.
7711 * remote-utils.c (socklen_t): Provide a default.
7712 (remote_open): Use socklen_t.
7713 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7716 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7718 * linux-low.c (linux_read_memory, linux_write_memory)
7719 (linux_read_auxv): Likewise.
7720 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7721 (check_mem_write): Likewise.
7722 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7724 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7725 (registers_from_string, register_data): Likewise.
7726 * server.c (handle_query, main): Likewise.
7727 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7728 (decode_M_packet): Likewise.
7729 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7730 * target.h (struct target_ops): Update read_memory, write_memory,
7732 (read_inferior_memory, write_inferior_memory): Update.
7733 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7735 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7736 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7737 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7738 linux-s390-low.c, linux-sh-low.c: Update for changes in
7739 read_inferior_memory and the_low_target->breakpoint.
7741 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7743 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7744 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7745 * configure.srv: Add powerpc64-*-linux*.
7746 * linux-ppc64-low.c: New file.
7748 2005-05-23 Orjan Friberg <orjanf@axis.com>
7750 * linux-cris-low.c: New file with support for CRIS.
7751 * linux-crisv32-low.c: Ditto for CRISv32.
7752 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7753 (clean): Add reg-cris.c and reg-crisv32.c.
7754 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7755 reg-crisv32.o, and reg-crisv32.c to make rules.
7756 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7759 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7761 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7762 of sizeof (PTRACE_XFER_TYPE).
7763 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7765 2005-05-12 Orjan Friberg <orjanf@axis.com>
7767 * target.h (struct target_ops): Add insert_watchpoint,
7768 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7769 pointers for hardware watchpoint support.
7770 * linux-low.h (struct linux_target_ops): Ditto.
7771 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7772 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7773 to linux_target_ops.
7774 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7776 * server.c (main): Recognize 'Z' and 'z' packets.
7778 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7780 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7781 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7782 (the_low_target): Add new members.
7784 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7786 * proc-service.c (ps_lgetregs): Search all_processes instead of
7789 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7791 * server.c (start_inferior): Change return type to int.
7792 (attach_inferior): Change sigptr to int *.
7793 (handle_v_cont, handle_v_requests): Change signal to int *.
7794 (main): Change signal to int.
7796 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7798 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7799 * configure.srv: Add m32r*-*-linux*.
7800 * linux-m32r-low.c: New file.
7802 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7804 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7806 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7808 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7809 Take unsigned long arguments for PIDs.
7810 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7811 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7812 (wait_for_sigstop, linux_resume_one_process)
7813 (regsets_fetch_inferior_registers, linux_send_signal)
7814 (linux_read_auxv): Likewise. Update the types of variables holding
7815 PIDs. Update format string specifiers.
7816 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7817 * remote-utils.c (prepare_resume_reply): Likewise.
7818 * server.c (cont_thread, general_thread, step_thread)
7819 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7821 (handle_query): Update format specifiers.
7822 (handle_v_cont, main): Use strtoul for thread IDs.
7823 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7824 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7825 (general_thread, step_thread, thread_from_wait)
7826 (old_thread_from_wait): Update.
7827 * target.h (struct thread_resume): Use unsigned long for THREAD.
7828 (struct target_ops): Use unsigned long for arguments to attach and
7831 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7833 * acinclude.m4: Include bfd/bfd.m4 directly.
7834 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7835 <agriffis@toolchain.org>.
7836 * aclocal.m4, configure: Regenerated.
7838 2005-01-07 Andrew Cagney <cagney@gnu.org>
7840 * configure.ac: Rename configure.in, require autoconf 2.59.
7841 * configure: Re-generate.
7843 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7845 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7847 * aclocal.m4: Regenerated.
7848 * configure: Regenerated.
7850 2004-11-21 Andreas Schwab <schwab@suse.de>
7852 * linux-m68k-low.c (m68k_num_gregs): Define.
7853 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7854 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7855 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7856 (m68k_breakpoint_at): New. Add to the_low_target.
7858 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7859 srv_linux_thread_db to yes.
7861 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7863 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7864 (ARCH_SET_FS): Likewise.
7865 (ARCH_GET_FS): Likewise.
7866 (ARCH_GET_GS): Likewise.
7868 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7870 * linux-i386-low.c (ps_get_thread_area): New.
7871 * linux-x86-64-low.c (ps_get_thread_area): New.
7872 * linux-low.c: Include <sys/syscall.h>.
7873 (linux_kill_one_process): Don't kill the first thread here.
7874 (linux_kill): Kill the first thread here.
7875 (kill_lwp): New function.
7876 (send_sigstop, linux_send_signal): Use it.
7877 * proc-service.c: Clean up #ifdefs.
7878 (fpregset_info): Delete.
7879 (ps_lgetregs): Update and enable implementation.
7880 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7882 * remote-utils.c (struct sym_cache, symbol_cache): New.
7883 (input_interrupt): Print a clearer message.
7884 (async_io_enabled): New variable.
7885 (enable_async_io, disable_async_io): Use it. Update comments.
7886 (look_up_one_symbol): Use the symbol cache.
7887 * thread-db.c (thread_db_look_up_symbols): New function.
7888 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7890 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7892 * configure.in: Test for -rdynamic.
7893 * configure: Regenerated.
7894 * Makefile (INTERNAL_LDFLAGS): New.
7895 (gdbserver, gdbreplay): Use it.
7897 2004-09-02 Andrew Cagney <cagney@gnu.org>
7899 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7901 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7903 * linux-low.c (linux_wait): Clear all_processes list also.
7905 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7907 * linux-low.c: Include <errno.h>. Remove extern declaration of
7910 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7912 * gdbreplay.c, server.h, utils.c: Update copyright years.
7914 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7916 * server.c (main): Print child status or termination signal from
7917 variable 'signal', not 'sig'.
7919 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7921 * linux-low.c (linux_read_memory): Change return type to
7922 int. Check for and return error from ptrace().
7923 * target.c (read_inferior_memory): Change return type to int. Pass
7924 back return status from the_target->read_memory().
7925 * target.h (struct target_ops): Adapt *read_memory() prototype.
7927 (read_inferior_memory): Adapt prototype.
7928 * server.c (main): Return an error packet if
7929 read_inferior_memory() returns an error.
7931 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7933 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7934 Unify with other clean targets.
7936 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7938 * server.c (handle_v_cont): Call set_desired_inferior.
7940 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7942 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7944 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7946 * linux-low.c (linux_wait): Unblock async I/O.
7947 (linux_resume): Block and enable async I/O.
7948 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7949 * server.h (block_async_io, unblock_async_io): Add prototypes.
7951 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7953 * remote-utils.c (remote_open): Print a status notice after
7955 * server.c (attach_inferior): Print a status notice after
7958 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7960 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7962 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7964 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7966 * server.c, target.h: Update copyright years.
7968 2004-02-25 Roland McGrath <roland@redhat.com>
7970 * target.h (struct target_ops): New member `read_auxv'.
7971 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7972 * linux-low.c (linux_read_auxv): New function.
7973 (linux_target_ops): Initialize `read_auxv' member to that.
7975 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7977 Committed by Jim Blandy <jimb@redhat.com>.
7979 * linux-s390-low.c (s390_num_regs): Update.
7980 (s390_regmap): Remove control registers. Use __s390x__ predefine
7981 instead of GPR_SIZE to distiguish s390 and s390x targets.
7983 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7985 * linux-low.c: Update copyright year.
7986 (check_removed_breakpoint): Clear pending_is_breakpoint.
7987 (linux_set_resume_request, linux_queue_one_thread)
7988 (resume_status_pending_p): New functions.
7989 (linux_continue_one_thread): Use process->resume.
7990 (linux_resume): Only resume threads if there are no pending events.
7991 * linux-low.h (struct process_info): Add resume request
7994 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
7996 * regcache.c (new_register_cache): Clear the allocated register
7997 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7999 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8001 * linux-low.c (linux_resume): Take a struct thread_resume *
8003 (linux_wait): Update call.
8004 (resume_ptr): New static variable.
8005 (linux_continue_one_thread): Renamed from
8006 linux_continue_one_process. Use resume_ptr.
8007 (linux_resume): Use linux_continue_one_thread.
8008 * server.c (handle_v_cont, handle_v_requests): New functions.
8009 (myresume): New function.
8010 (main): Handle 'v' case.
8011 * target.h (struct thread_resume): New type.
8012 (struct target_ops): Change argument of "resume" to struct
8014 (myresume): Delete macro.
8016 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8018 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8019 (uninstall): Support DESTDIR.
8021 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8023 * configure.srv: Add xscale*linux copy of arm*linux entry.
8025 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8027 * linux-arm-low.c (arm_reinsert_addr): New function.
8028 (the_low_target): Add arm_reinsert_addr.
8030 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8032 * mem-break.c: Remove whitespace at end of file.
8034 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8036 * configure.in: Check whether we need to prototype strerror.
8037 * server.h: Optionally prototype strerror.
8038 * gdbreplay.c (perror_with_name): Use strerror.
8039 * linux-low.c (linux_attach_lwp): Use strerror.
8040 * utils.c (perror_with_name): Use strerror.
8041 * config.in, configure: Regenerated.
8043 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8045 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8046 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8048 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8050 * Makefile.in (SFILES): Update.
8051 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8052 low-sun3.c: Remove files.
8054 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8056 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8057 (linux_detach_one_process, linux_detach): New functions.
8058 (linux_target_ops): Add linux_detach.
8059 * server.c (main): Handle 'D' packet.
8060 * target.h (struct target_ops): Add "detach" member.
8061 (detach_inferior): Define.
8063 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8065 From Kelley Cook <kelleycook@wideopenwest.com>:
8066 * configure.srv: Accept i[34567]86 variants.
8068 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8070 * linux-low.c (linux_wait_for_event): Correct comment typos.
8071 (linux_resume_one_process): Call check_removed_breakpoint.
8072 (linux_send_signal): New function.
8073 (linux_target_ops): Add linux_send_signal.
8074 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8076 * target.h (struct target_ops): Add send_signal.
8078 2003-05-29 Jim Blandy <jimb@redhat.com>
8080 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8081 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8082 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8083 away part of the register's value.
8085 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8087 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8088 (linux_wait_for_event, linux_init_signals): Likewise.
8090 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8092 * configure.in: Check for stdlib.h.
8093 * configure: Regenerated.
8094 * config.in: Regenerated.
8096 2003-01-04 Andreas Schwab <schwab@suse.de>
8098 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8100 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8102 * Makefile.in: Remove obsolete code.
8104 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8106 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8107 defined(PT_FPR0_HI).
8109 2002-11-17 Stuart Hughes <seh@zee2.com>
8111 * linux-arm-low.c (arm_num_regs): Increase.
8112 (arm_regmap): Include status register.
8114 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8116 * linux-low.c (register_addr): Remove incorrect -1 check.
8118 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8120 * linux-low.c (linux_create_inferior): Call setpgid. Return
8122 (unstopped_p, linux_signal_pid): Remove.
8123 (linux_target_ops): Remove linux_signal_pid.
8124 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8125 global instead of target method.
8126 * target.h (struct target_ops): Remove signal_pid. Update comment
8127 for create_inferior.
8128 * server.c (signal_pid): New variable.
8129 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8130 gdbserver. Set the child to be the foreground process group.
8131 (attach_inferior): Set signal_pid.
8133 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8135 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8137 2002-08-20 Jim Blandy <jimb@redhat.com>
8139 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8142 2002-08-01 Andrew Cagney <cagney@redhat.com>
8144 * Makefile.in: Make chill references obsolete.
8146 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8148 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8149 * configure: Regenerate.
8150 * config.in: Regenerate.
8152 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8154 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8155 (perror_with_name, remote_close, remote_open, expect, play): Static.
8157 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8159 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8160 byte offsets instead of an array of indexes.
8161 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8163 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8165 * regcache.c: Add comment.
8167 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8169 * thread-db.c: New file.
8170 * proc-service.c: New file.
8171 * acinclude.m4: New file.
8172 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8173 proc-service.o, and thread-db.o.
8174 (linux-low.o): Add USE_THREAD_DB.
8175 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8176 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8177 * aclocal.m4: Regenerated.
8178 * config.in: Regenerated.
8179 * configure: Regenerated.
8180 * configure.in: Check for proc_service.h, sys/procfs.h,
8181 thread_db.h, and linux/elf.h headrs.
8182 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8183 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8184 Check for -lthread_db and thread support.
8185 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8186 PowerPC, and SuperH.
8187 * i387-fp.c: Constify arguments.
8188 * i387-fp.h: Likewise.
8189 * inferiors.c: (struct thread_info): Renamed from
8190 `struct inferior_info'. Remove PID member. Use generic inferior
8191 list header. All uses updated.
8192 (inferiors, signal_pid): Removed.
8193 (all_threads): New variable.
8194 (get_thread): Define.
8195 (add_inferior_to_list): New function.
8196 (for_each_inferior): New function.
8197 (change_inferior_id): New function.
8198 (add_inferior): Removed.
8199 (remove_inferior): New function.
8200 (add_thread): New function.
8201 (free_one_thread): New function.
8202 (remove_thread): New function.
8203 (clear_inferiors): Use for_each_inferior and free_one_thread.
8204 (find_inferior): New function.
8205 (find_inferior_id): New function.
8206 (inferior_target_data): Update argument type.
8207 (set_inferior_target_data): Likewise.
8208 (inferior_regcache_data): Likewise.
8209 (set_inferior_regcache_data): Likewise.
8210 * linux-low.c (linux_bp_reinsert): Remove.
8211 (all_processes, stopping_threads, using_thrads)
8212 (struct pending_signals, debug_threads, pid_of): New.
8213 (inferior_pid): Replace with macro.
8214 (struct inferior_linux_data): Remove.
8215 (get_stop_pc, add_process): New functions.
8216 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8217 Use add_process and add_thread.
8218 (linux_attach_lwp): New function, based on old linux_attach. Use
8219 add_process and add_thread. Set stop_expected for new threads.
8220 (linux_attach): New function.
8221 (linux_kill_one_process): New function.
8222 (linux_kill): Kill all LWPs.
8223 (linux_thread_alive): Use find_inferior_id.
8224 (check_removed_breakpoints, status_pending_p): New functions.
8225 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8226 Update. Use WNOHANG. Wait for cloned processes also. Update process
8227 struct for the found process.
8228 (linux_wait_for_event): New function.
8229 (linux_wait): Use it. Support LWPs.
8230 (send_sigstop, wait_for_sigstop, stop_all_processes)
8231 (linux_resume_one_process, linux_continue_one_process): New functions.
8232 (linux_resume): Support LWPs.
8233 (REGISTER_RAW_SIZE): Remove.
8234 (fetch_register): Use register_size instead. Call supply_register.
8235 (usr_store_inferior_registers): Likewise. Call collect_register.
8237 (regsets_fetch_inferior_registers): Improve error message.
8238 (regsets_store_inferior_registers): Add debugging.
8239 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8240 (unstopped_p, linux_signal_pid): New functions.
8241 (linux_target_ops): Add linux_signal_pid.
8242 (linux_init_signals): New function.
8243 (initialize_low): Call it. Initialize using_threads.
8244 * regcache.c (inferior_regcache_data): Add valid
8246 (get_regcache): Fetch registers lazily. Add fetch argument
8247 and update all callers.
8248 (regcache_invalidate_one, regcache_invalidate): New
8250 (new_register_cache): Renamed from create_register_cache.
8251 Return the new regcache.
8252 (free_register_cache): Change argument to a void *.
8253 (registers_to_string, registers_from_string): Call get_regcache
8254 with fetch flag set.
8255 (register_data): Make static. Pass fetch flag to get_regcache.
8256 (supply_register): Call get_regcache with fetch flag clear.
8257 (collect_register): Call get_regcache with fetch flag set.
8258 (collect_register_as_string): New function.
8259 * regcache.h: Update.
8260 * remote-utils.c (putpkt): Flush after debug output and use
8262 Handle input interrupts while waiting for an ACK.
8263 (input_interrupt): Use signal_pid method.
8264 (getpkt): Flush after debug output and use stderr.
8265 (outreg): Use collect_register_as_string.
8266 (new_thread_notify, dead_thread_notify): New functions.
8267 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8269 (look_up_one_symbol): Flush after debug output.
8270 * server.c (step_thread, server_waiting): New variables.
8271 (start_inferior): Don't use signal_pid. Update call to mywait.
8272 (attach_inferior): Update call to mywait.
8273 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8274 (main): Don't fetch/store registers explicitly. Use
8275 set_desired_inferior. Support proposed ``Hs'' packet. Update
8278 (struct inferior_list, struct_inferior_list_entry): New.
8279 * target.c (set_desired_inferior): New.
8280 (write_inferior_memory): Constify.
8281 (mywait): New function.
8283 (struct target_ops): New signal_pid method.
8284 (mywait): Removed macro, added prototype.
8286 * linux-low.h (regset_func): Removed.
8287 (regset_fill_func, regset_store_func): New.
8288 (enum regset_type): New.
8289 (struct regset_info): Add type field. Use new operation types.
8290 (struct linux_target_ops): stop_pc renamed to get_pc.
8291 Add decr_pc_after_break and breakpoint_at.
8292 (get_process, get_thread_proess, get_process_thread)
8293 (strut process_info, all_processes, linux_attach_lwp)
8294 (thread_db_init): New.
8296 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8297 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8298 (the_low_target): Add new members.
8299 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8300 (i386_store_fpxregset): Constify.
8301 (target_regsets): Add new kind identifier.
8302 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8303 (i386_set_pc): Add debugging.
8304 (i386_breakpoint_at): New function.
8305 (the_low_target): Add new members.
8306 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8307 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8308 (mips_breakpoint_at): New.
8309 (the_low_target): Add new members.
8310 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8311 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8312 (the_low_target): Add new members.
8313 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8314 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8315 (the_low_target): Add new members.
8316 * linux-x86-64-low.c (target_regsets): Add new kind
8319 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8321 From Martin Pool <mbp@samba.org>:
8322 * server.c (gdbserver_usage): New function.
8325 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8327 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8330 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8332 * Makefile.in: Remove obsolete code.
8334 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8336 * linux-low.c (regsets_fetch_inferior_registers),
8337 (regsets_store_inferior_registers): Removed cast to int from
8339 * regcache.h: Added declaration of struct inferior_info.
8341 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8343 * inferiors.c (struct inferior_info): Add regcache_data.
8344 (add_inferior): Call create_register_cache.
8345 (clear_inferiors): Call free_register_cache.
8346 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8347 * regcache.c (struct inferior_regcache_data): New.
8348 (registers): Remove.
8349 (get_regcache): New function.
8350 (create_register_cache, free_register_cache): New functions.
8351 (set_register_cache): Don't initialize the register cache here.
8352 (registers_to_string, registers_from_string, register_data): Call
8354 * regcache.h: Add prototypes.
8355 * server.h: Likewise.
8357 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8359 * mem-break.c: New file.
8360 * mem-break.h: New file.
8361 * Makefile.in: Add mem-break.o rule; update server.h
8363 * inferiors.c (struct inferior_info): Add target_data
8365 (clear_inferiors): Free target_data member if set.
8366 (inferior_target_data, set_inferior_target_data): New functions.
8367 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8368 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8369 * linux-low.c (linux_bp_reinsert): New variable.
8370 (struct inferior_linux_data): New.
8371 (linux_create_inferior): Use set_inferior_target_data.
8372 (linux_attach): Likewise. Call add_inferior.
8373 (linux_wait_for_one_inferior): New function.
8374 (linux_wait): Call it.
8375 (linux_write_memory): Add const.
8376 (initialize_low): Call set_breakpoint_data.
8377 * linux-low.h (struct linux_target_ops): Add breakpoint
8379 * server.c (attach_inferior): Remove extra add_inferior
8381 * server.h: Include mem-break.h. Update inferior.c
8383 * target.c (read_inferior_memory)
8384 (write_inferior_memory): New functions.
8385 * target.h (read_inferior_memory)
8386 (write_inferior_memory): Change macros to prototypes.
8387 (struct target_ops): Update comments. Add const to write_memory
8390 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8392 * linux-low.c (usr_store_inferior_registers): Support
8393 registers which are allowed to fail to store.
8394 * linux-low.h (linux_target_ops): Likewise.
8395 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8396 (ppc_cannot_store_register): FPSCR may not be storable.
8398 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8400 * server.h: Include <string.h> if HAVE_STRING_H.
8401 * ChangeLog: Correct paths in last ChangeLog entry.
8403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8405 * linux-low.h: Remove obsolete prototypes.
8406 (struct linux_target_ops): New.
8407 (extern the_low_target): New.
8408 * linux-low.c (num_regs, regmap): Remove declarations.
8409 (register_addr): Use the_low_target explicitly.
8410 (fetch_register): Likewise.
8411 (usr_fetch_inferior_registers): Likewise.
8412 (usr_store_inferior_registers): Likewise.
8413 * linux-arm-low.c (num_regs): Remove.
8414 (arm_num_regs): Define.
8415 (arm_regmap): Renamed from regmap, made static.
8416 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8418 (arm_cannot_store_register): Renamed from cannot_store_register,
8420 (the_low_target): New.
8421 * linux-i386-low.c (num_regs): Remove.
8422 (i386_num_regs): Define.
8423 (i386_regmap): Renamed from regmap, made static.
8424 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8426 (i386_cannot_store_register): Renamed from cannot_store_register,
8428 (the_low_target): New.
8429 * linux-ia64-low.c (num_regs): Remove.
8430 (ia64_num_regs): Define.
8431 (ia64_regmap): Renamed from regmap, made static.
8432 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8434 (ia64_cannot_store_register): Renamed from cannot_store_register,
8436 (the_low_target): New.
8437 * linux-m68k-low.c (num_regs): Remove.
8438 (m68k_num_regs): Define.
8439 (m68k_regmap): Renamed from regmap, made static.
8440 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8442 (m68k_cannot_store_register): Renamed from cannot_store_register,
8444 (the_low_target): New.
8445 * linux-mips-low.c (num_regs): Remove.
8446 (mips_num_regs): Define.
8447 (mips_regmap): Renamed from regmap, made static.
8448 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8450 (mips_cannot_store_register): Renamed from cannot_store_register,
8452 (the_low_target): New.
8453 * linux-ppc-low.c (num_regs): Remove.
8454 (ppc_num_regs): Define.
8455 (ppc_regmap): Renamed from regmap, made static.
8456 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8458 (ppc_cannot_store_register): Renamed from cannot_store_register,
8460 (the_low_target): New.
8461 * linux-s390-low.c (num_regs): Remove.
8462 (s390_num_regs): Define.
8463 (s390_regmap): Renamed from regmap, made static.
8464 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8466 (s390_cannot_store_register): Renamed from cannot_store_register,
8468 (the_low_target): New.
8469 * linux-sh-low.c (num_regs): Remove.
8470 (sh_num_regs): Define.
8471 (sh_regmap): Renamed from regmap, made static.
8472 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8474 (sh_cannot_store_register): Renamed from cannot_store_register,
8476 (the_low_target): New.
8477 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8478 (the_low_target): New.
8480 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8482 * Makefile.in: Add stamp-h target.
8483 * configure.in: Create stamp-h.
8484 * configure: Regenerated.
8486 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8488 * inferiors.c: New file.
8489 * target.c: New file.
8490 * target.h: New file.
8491 * Makefile.in: Add target.o and inferiors.o. Update
8493 * linux-low.c (inferior_pid): New static variable,
8494 moved from server.c.
8495 (linux_create_inferior): Renamed from create_inferior.
8496 Call add_inferior. Return 0 on success instead of a PID.
8497 (linux_attach): Renamed from myattach.
8498 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8499 (linux_thread_alive): Renamed from mythread_alive.
8500 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8502 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8503 (regsets_store_inferior_registers): Correct error message.
8504 Add missing ``return 0''.
8505 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8506 (linux_store_registers): Renamed from store_inferior_registers.
8507 (linux_read_memory): Renamed from read_inferior_memory.
8508 (linux_write_memory): Renamed from write_inferior_memory.
8509 (linux_target_ops): New structure.
8510 (initialize_low): Call set_target_ops ().
8511 * remote-utils.c (unhexify): New function.
8512 (hexify): New function.
8513 (input_interrupt): Send signals to ``signal_pid''.
8514 * server.c (inferior_pid): Remove.
8515 (start_inferior): Update create_inferior call.
8516 (attach_inferior): Call add_inferior.
8517 (handle_query): New function.
8518 (main): Call handle_query for `q' packets.
8519 * server.h: Include "target.h". Remove obsolete prototypes.
8520 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8522 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8524 * Makefile.in: Add WARN_CFLAGS. Update configury
8526 * configure.in: Check for <string.h>
8527 * configure: Regenerate.
8528 * config.in: Regenerate.
8529 * gdbreplay.c: Include needed system headers.
8530 (remote_open): Remove strchr prototype.
8531 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8532 * regcache.c (supply_register): Change buf argument to const void *.
8533 (supply_register_by_name): Likewise.
8534 (collect_register): Change buf argument to void *.
8535 (collect_register_by_name): Likewise.
8536 * regcache.h: Add missing prototypes.
8537 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8538 * server.c (handle_query): New function.
8539 (attached): New static variable, moved out of main.
8540 (main): Quiet longjmp clobber warnings.
8541 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8542 * utils.c (error): Remove NORETURN.