1 2013-09-02 Pierre Muller <muller@sourceware.org>
3 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4 or WriteProcessMemory complete successfully and handle
5 ERROR_PARTIAL_COPY error.
7 2013-09-02 Pedro Alves <palves@redhat.com>
9 * server.c (gdb_read_memory): Return -1 on traceframe memory read
12 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15 * linux-low.c: Include filestuff.h.
16 (linux_create_inferior) <pid == 0>: Call close_most_fds.
17 * lynx-low.c: Include filestuff.h.
18 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
19 * server.c: Include filestuff.h.
20 (main): Call notice_open_fds.
21 * spu-low.c: Include filestuff.h.
22 (spu_create_inferior) <pid == 0>: Call close_most_fds.
24 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
26 * Makefile.in: Explain why ../target and ../nat are not
27 listed as include file search paths.
28 (linux-waitpid.o): New object file rule.
29 * configure.srv (srv_native_linux_obj): New variable.
30 Replace all occurrences of linux native object files with
31 $srv_native_linux_obj.
32 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
33 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
34 (linux_enable_event_reporting): Remove declaration.
35 (my_waitpid): Moved to common/linux-waitpid.c.
36 (linux_wait_for_event): Pass ptid when calling
37 linux_enable_event_reporting.
38 (linux_supports_tracefork_flag): Remove.
39 (linux_enable_event_reporting): Likewise.
40 (linux_tracefork_grandchild): Remove.
41 (STACK_SIZE): Moved to common/linux-ptrace.c.
42 (linux_tracefork_child): Remove.
43 (linux_test_for_tracefork): Remove.
44 (linux_look_up_symbols): Call linux_supports_traceclone.
45 (initialize_low): Remove call to linux_test_for_tracefork.
46 * linux-low.h (PTRACE_TYPE_ARG3): Move to
47 common/linux-ptrace.h.
48 (PTRACE_TYPE_ARG4): Likewise.
49 Include linux-ptrace.h.
51 2013-08-21 Pedro Alves <palves@redhat.com>
53 * config.in: Renegerate.
55 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
57 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
58 (SFILES): Remove $(srcdir)/common/target-common.c and
59 add $(srcdir)/target/waitstatus.c.
60 (OBS): Remove target-common.o and add waitstatus.o.
61 (server_h): Remove $(srcdir)/../common/target-common.h and
62 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
63 and $(srcdir)/../target/waitstatus.h.
64 (target-common.o): Remove.
65 (waitstatus.o): New target object file.
66 * target.h: Do not include target-common.h and
67 include target/resume.h, target/wait.h and
70 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
72 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
74 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
75 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
77 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
78 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
80 2013-07-27 Jie Zhang <jie@codesourcery.com>
81 Daniel Jacobowitz <dan@codesourcery.com>
82 Yao Qi <yao@codesourcery.com>
84 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
85 (mips-linux-watch.o): New rule.
86 (mips_linux_watch_h): New variable.
87 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
89 * linux-mips-low.c: Include mips-linux-watch.h.
90 (struct arch_process_info, struct arch_lwp_info): New.
91 (update_watch_registers_callback): New function.
92 (mips_linux_new_process, mips_linux_new_thread) New functions.
93 (mips_linux_prepare_to_resume, mips_insert_point): New
95 (mips_remove_point, mips_stopped_by_watchpoint): New
97 (rsp_bp_type_to_target_hw_bp_type): New function.
98 (mips_stopped_data_address): New function.
99 (the_low_target): Add watchpoint support functions.
101 2013-07-27 Yao Qi <yao@codesourcery.com>
103 * i386-low.c: Include break-common.h.
104 (enum target_hw_bp_type): Remove.
106 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
108 * Makefile.in (SFILES): /common/target-common.c.
109 (OBS): Add target-common.o.
110 (server_h): Add $(srcdir)/../common/target-common.h.
111 (target-common.o): New target.
112 * server.c (queue_stop_reply_callback): Free
113 status string after use.
114 * target.c (target_waitstatus_to_string): Remove.
115 * target.h: Include target-common.h.
116 (resume_kind): Likewise.
117 (target_waitkind): Likewise.
118 (target_waitstatus): Likewise.
119 (TARGET_WNOHANG): Likewise.
121 2013-07-04 Yao Qi <yao@codesourcery.com>
123 * Makefile.in (host_alias): Use @host_noncanonical@.
124 (target_alias): Use @target_noncanonical@.
125 * configure.ac: Use ACX_NONCANONICAL_TARGET and
126 ACX_NONCANONICAL_HOST.
127 * configure: Regenerated.
130 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
132 * configure.ac (version_host, version_target): Set and AC_SUBST them.
133 * configure: Rebuild.
134 * Makefile.in (version_host, version_target): Get from configure.
135 (version.c): Use $(version_host) and $(version_target).
137 2013-07-03 Pedro Alves <palves@redhat.com>
139 * Makefile.in (config.status): Depend on development.sh.
140 * acinclude.m4: Include libmcheck.m4.
141 * configure: Regenerate.
143 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
145 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
146 attribute inside the parentheses.
147 (winapi_DebugSetProcessKillOnExit): Ditto.
148 (winapi_DebugBreakProcess): Ditto.
149 (winapi_GenerateConsoleCtrlEvent): Ditto.
151 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
153 * notif.h (notif_event): Add a dummy member to avoid compiler
156 2013-07-01 Pedro Alves <palves@redhat.com>
158 * hostio.c (HOSTIO_PATH_MAX): Define.
159 (require_filename, handle_open, handle_unlink, handle_readlink):
162 2013-07-01 Pedro Alves <palves@redhat.com>
164 * server.h: Include "pathmax.h".
165 * linux-low.c: Don't include sys/param.h.
166 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
168 * win32-low.c: Don't include sys/param.h.
169 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
171 2013-07-01 Pedro Alves <palves@redhat.com>
173 * event-loop.c: Don't check HAVE_UNISTD_H before including
175 * gdbreplay.c: Likewise.
176 * remote-utils.c: Likewise.
177 * server.c: Likewise.
178 * configure.ac: Don't check for unistd.h.
179 * configure: Regenerate.
181 2013-06-28 Tom Tromey <tromey@redhat.com>
183 * Makefile.in (version.c): Use version.in, not
186 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
188 * configure.ac (version_host, version_target): Set and AC_SUBST them.
189 * configure: Rebuild.
190 * Makefile.in (version_host, version_target): Get from configure.
191 (version.c): Use $(version_host) and $(version_target).
193 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
195 Fix trace-status to output user name without trailing colon.
196 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
198 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
200 Fix trace-status to output proper start-time and stop-time.
201 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
202 output start time and stop time in hex as gdb expects.
204 2013-06-26 Pedro Alves <pedro@codesourcery.com>
206 * tracepoint.c (build_traceframe_info_xml): Output trace state
207 variables present in the trace buffer.
209 2013-06-24 Tom Tromey <tromey@redhat.com>
211 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
214 * gdbreplay.c: Include version.h.
215 (version, host_name): Don't declare.
216 * server.h: Include version.h.
217 (version, host_name): Don't declare.
219 2013-06-12 Pedro Alves <palves@redhat.com>
221 * linux-x86-low.c (linux_is_elf64): Delete global.
222 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
223 with local linux_pid_exe_is_elf_64_file use.
225 2013-06-11 Pedro Alves <palves@redhat.com>
227 * linux-low.c (regset_disabled, disable_regset): New functions.
228 (regsets_fetch_inferior_registers)
229 (regsets_store_inferior_registers): Use them.
230 (initialize_regsets_info); Don't allocate the disabled_regsets
232 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
235 2013-06-11 Pedro Alves <palves@redhat.com>
237 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
240 2013-06-11 Pedro Alves <palves@redhat.com>
242 * linux-x86-low.c (initialize_low_arch): Call
243 init_registers_x32_avx_linux.
245 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
247 Fix compatibility with Android Bionic.
248 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
251 2013-06-07 Pedro Alves <palves@redhat.com>
254 * Makefile.in (OBS): Add tdesc.o.
255 (IPA_OBJS): Add tdesc-ipa.o.
256 (tdesc-ipa.o): New rule.
257 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
259 * linux-low.c (new_inferior): Delete.
260 (disabled_regsets, num_regsets): Delete.
261 (linux_add_process): Adjust to set the new per-process
263 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
264 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
265 was a stop. When calling arch_setup, switch the current inferior
266 to the thread that got an event.
267 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
268 (regsets_fetch_inferior_registers)
269 (regsets_store_inferior_registers): New regsets_info parameter.
271 (linux_register_in_regsets): New regs_info parameter. Adjust to
273 (register_addr, fetch_register, store_register): New usrregs_info
274 parameter. Adjust to use it.
275 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
276 parameter regs_info. Adjust to use it.
277 (linux_fetch_registers): Get the current inferior's regs_info, and
279 (linux_store_registers): Ditto.
280 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
281 (initialize_low): Don't initialize the target_regsets here. Call
283 * linux-low.h (target_regsets): Delete declaration.
284 (struct regsets_info): New.
285 (struct usrregs_info): New.
286 (struct regs_info): New.
287 (struct process_info_private) <new_inferior>: New field.
288 (struct linux_target_ops): Delete the num_regs, regmap, and
289 regset_bitmap fields. New field regs_info.
290 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
291 * i387-fp.c (num_xmm_registers): Delete.
292 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
293 calls to new interface.
294 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
295 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
296 Infer the number of xmm registers from the regcache's target
298 * i387-fp.h (num_xmm_registers): Delete.
299 * inferiors.c (add_thread): Don't install the thread's regcache
301 * proc-service.c (gregset_info): Fetch the current inferior's
302 regs_info. Adjust to use it.
303 * regcache.c: Include tdesc.h.
304 (register_bytes, reg_defs, num_registers)
305 (gdbserver_expedite_regs): Delete.
306 (get_thread_regcache): If the thread doesn't have a regcache yet,
307 create one, instead of aborting gdbserver.
308 (regcache_invalidate_one): Rename to ...
309 (regcache_invalidate_thread): ... this.
310 (regcache_invalidate_one): New.
311 (regcache_invalidate): Only invalidate registers of the current
313 (init_register_cache): Add target_desc parameter, and use it.
314 (new_register_cache): Ditto. Assert the target description has a
315 non zero registers_size.
316 (regcache_cpy): Add assertions. Adjust.
317 (realloc_register_cache, set_register_cache): Delete.
318 (registers_to_string, registers_from_string): Adjust.
319 (find_register_by_name, find_regno, find_register_by_number)
320 (register_cache_size): Add target_desc parameter, and use it.
321 (free_register_cache_thread, free_register_cache_thread_one)
322 (regcache_release, register_cache_size): New.
323 (register_size): Add target_desc parameter, and use it.
324 (register_data, supply_register, supply_register_zeroed)
325 (supply_regblock, supply_register_by_name, collect_register)
326 (collect_register_as_string, collect_register_by_name): Adjust.
327 * regcache.h (struct target_desc): Forward declare.
328 (struct regcache) <tdesc>: New field.
329 (init_register_cache, new_register_cache): Add target_desc
331 (regcache_invalidate_thread): Declare.
332 (regcache_invalidate_one): Delete declaration.
333 (regcache_release): Declare.
334 (find_register_by_number, register_cache_size, register_size)
335 (find_regno): Add target_desc parameter.
336 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
338 * remote-utils.c: Include tdesc.h.
339 (outreg, prepare_resume_reply): Adjust.
340 * server.c: Include tdesc.h.
341 (gdbserver_xmltarget): Delete declaration.
342 (get_features_xml, process_serial_event): Adjust.
343 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
345 (struct process_info) <tdesc>: New field.
346 (ipa_tdesc): Declare.
349 * tracepoint.c: Include tdesc.h.
350 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
351 (get_context_regcache): Adjust to pass ipa_tdesc down.
352 (do_action_at_tracepoint): Adjust to get the register cache size
353 from the context regcache's description.
354 (traceframe_walk_blocks): Adjust to get the register cache size
355 from the current trace frame's description.
356 (traceframe_get_pc): Adjust to get current trace frame's
357 description and pass it down.
358 (gdb_collect): Adjust to get the register cache size from the
360 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
361 (gdbserver_xmltarget): Delete.
362 (initialize_low_tracepoint): Set the ipa's target description.
363 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
364 (initialize_low_tracepoint): Set the ipa's target description.
365 * linux-x86-low.c: Include tdesc.h.
366 [__x86_64__] (is_64bit_tdesc): New.
367 (ps_get_thread_area, x86_get_thread_area): Use it.
368 (i386_cannot_store_register): Rename to ...
369 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
370 (i386_cannot_fetch_register): Rename to ...
371 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
372 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
374 (target_regsets): Rename to ...
375 (x86_regsets): ... this.
376 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
378 (x86_siginfo_fixup): Use is_64bit_tdesc.
379 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
380 (tdesc_x32_avx_linux, tdesc_x32_linux)
381 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
383 (x86_linux_update_xmltarget): Delete.
384 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
385 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
386 (AMD64_LINUX_USER64_CS): New.
387 (x86_linux_read_description): New, based on
388 x86_linux_update_xmltarget.
389 (same_process_callback): New.
390 (x86_arch_setup_process_callback): New.
391 (x86_linux_update_xmltarget): New.
392 (x86_regsets_info): New.
393 (amd64_linux_regs_info): New.
394 (i386_linux_usrregs_info): New.
395 (i386_linux_regs_info): New.
396 (x86_linux_regs_info): New.
397 (x86_arch_setup): Reimplement.
398 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
399 (x86_emit_ops): Ditto.
400 (the_low_target): Adjust. Install x86_linux_regs_info,
401 x86_cannot_fetch_register, and x86_cannot_store_register.
402 (initialize_low_arch): New.
403 * linux-ia64-low.c (tdesc_ia64): Declare.
404 (ia64_fetch_register): Adjust.
405 (ia64_usrregs_info, regs_info): New globals.
406 (ia64_regs_info): New function.
407 (the_low_target): Adjust.
408 (initialize_low_arch): New function.
409 * linux-sparc-low.c (tdesc_sparc64): Declare.
410 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
412 (sparc_arch_setup): New function.
413 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
414 (the_low_target): Adjust.
415 (initialize_low_arch): New function.
416 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
417 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
418 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
419 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
420 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
421 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
422 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
423 (tdesc_powerpc_isa205_vsx64l): Declare.
424 (ppc_cannot_store_register, ppc_collect_ptrace_register)
425 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
426 (ppc_set_pc, ppc_get_hwcap): Adjust.
427 (ppc_usrregs_info): Forward declare.
428 (!__powerpc64__) ppc_regmap_adjusted: New global.
429 (ppc_arch_setup): Adjust to the current process'es target
431 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
432 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
433 (ppc_store_evrregset): Adjust.
434 (target_regsets): Rename to ...
435 (ppc_regsets): ... this, and make static.
436 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
437 (ppc_regs_info): New function.
438 (the_low_target): Adjust.
439 (initialize_low_arch): New function.
440 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
441 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
442 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
443 (tdesc_s390x_linux64v2): Declare.
444 (s390_collect_ptrace_register, s390_supply_ptrace_register)
445 (s390_fill_gregset, s390_store_last_break): Adjust.
446 (target_regsets): Rename to ...
447 (s390_regsets): ... this, and make static.
448 (s390_get_pc, s390_set_pc): Adjust.
449 (s390_get_hwcap): New target_desc parameter, and use it.
450 [__s390x__] (have_hwcap_s390_high_gprs): New global.
451 (s390_arch_setup): Adjust to set the current process'es target
452 description. Don't adjust the regmap.
453 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
454 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
455 (regs_info_3264): New globals.
456 (s390_regs_info): New function.
457 (the_low_target): Adjust.
458 (initialize_low_arch): New function.
459 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
460 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
461 [__mips64] (init_registers_mips_linux)
462 (init_registers_mips_dsp_linux): Delete defines.
463 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
464 (have_dsp): New global.
465 (mips_read_description): New, based on mips_arch_setup.
466 (mips_arch_setup): Reimplement.
467 (get_usrregs_info): New function.
468 (mips_cannot_fetch_register, mips_cannot_store_register)
469 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
470 (mips_fill_fpregset, mips_store_fpregset): Adjust.
471 (target_regsets): Rename to ...
472 (mips_regsets): ... this, and make static.
473 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
474 (dsp_regs_info, regs_info): New globals.
475 (mips_regs_info): New function.
476 (the_low_target): Adjust.
477 (initialize_low_arch): New function.
478 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
479 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
481 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
482 (arm_read_description): New, with bits factored from
484 (arm_arch_setup): Reimplement.
485 (target_regsets): Rename to ...
486 (arm_regsets): ... this, and make static.
487 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
488 (arm_regs_info): New function.
489 (the_low_target): Adjust.
490 (initialize_low_arch): New function.
491 * linux-m68k-low.c (tdesc_m68k): Declare.
492 (target_regsets): Rename to ...
493 (m68k_regsets): ... this, and make static.
494 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
495 (m68k_regs_info): New function.
496 (m68k_arch_setup): New function.
497 (the_low_target): Adjust.
498 (initialize_low_arch): New function.
499 * linux-sh-low.c (tdesc_sharch): Declare.
500 (target_regsets): Rename to ...
501 (sh_regsets): ... this, and make static.
502 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
503 (sh_regs_info, sh_arch_setup): New functions.
504 (the_low_target): Adjust.
505 (initialize_low_arch): New function.
506 * linux-bfin-low.c (tdesc_bfin): Declare.
507 (bfin_arch_setup): New function.
508 (bfin_usrregs_info, regs_info): New globals.
509 (bfin_regs_info): New function.
510 (the_low_target): Adjust.
511 (initialize_low_arch): New function.
512 * linux-cris-low.c (tdesc_cris): Declare.
513 (cris_arch_setup): New function.
514 (cris_usrregs_info, regs_info): New globals.
515 (cris_regs_info): New function.
516 (the_low_target): Adjust.
517 (initialize_low_arch): New function.
518 * linux-cris-low.c (tdesc_crisv32): Declare.
519 (cris_arch_setup): New function.
520 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
521 (cris_regs_info): New function.
522 (the_low_target): Adjust.
523 (initialize_low_arch): New function.
524 * linux-m32r-low.c (tdesc_m32r): Declare.
525 (m32r_arch_setup): New function.
526 (m32r_usrregs_info, regs_info): New globals.
527 (m32r_regs_info): Adjust.
528 (initialize_low_arch): New function.
529 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
530 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
531 (tic6x_usrregs_info): Forward declare.
532 (tic6x_read_description): New function, based on ...
533 (tic6x_arch_setup): ... this. Reimplement.
534 (target_regsets): Rename to ...
535 (tic6x_regsets): ... this, and make static.
536 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
537 (tic6x_regs_info): New function.
538 (the_low_target): Adjust.
539 (initialize_low_arch): New function.
540 * linux-xtensa-low.c (tdesc_xtensa): Declare.
541 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
542 (target_regsets): Rename to ...
543 (xtensa_regsets): ... this, and make static.
544 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
546 (xtensa_arch_setup, xtensa_regs_info): New functions.
547 (the_low_target): Adjust.
548 (initialize_low_arch): New function.
549 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
550 (nios2_arch_setup): Set the current process'es tdesc.
551 (target_regsets): Rename to ...
552 (nios2_regsets): ... this.
553 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
554 (nios2_regs_info): New function.
555 (the_low_target): Adjust.
556 (initialize_low_arch): New function.
557 * linux-aarch64-low.c (tdesc_aarch64): Declare.
558 (aarch64_arch_setup): Set the current process'es tdesc.
559 (target_regsets): Rename to ...
560 (aarch64_regsets): ... this.
561 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
562 (aarch64_regs_info): New function.
563 (the_low_target): Adjust.
564 (initialize_low_arch): New function.
565 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
567 (target_regsets): Rename to ...
568 (tile_regsets): ... this.
569 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
570 (tile_regs_info): New function.
571 (tile_arch_setup): Set the current process'es tdesc.
572 (the_low_target): Adjust.
573 (initialize_low_arch): New function.
574 * spu-low.c (tdesc_spu): Declare.
575 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
576 * win32-arm-low.c (tdesc_arm): Declare.
577 (arm_arch_setup): New function.
578 (the_low_target): Install arm_arch_setup instead of
580 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
581 (init_windows_x86): Rename to ...
582 (i386_arch_setup): ... this. Set `win32_tdesc'.
583 (the_low_target): Adjust.
584 * win32-low.c (win32_tdesc): New global.
585 (child_add_thread): Don't create the thread cache here.
586 (do_initial_child_stuff): Set the new process'es tdesc.
587 * win32-low.h (struct target_desc): Forward declare.
588 (win32_tdesc): Declare.
589 * lynx-i386-low.c (tdesc_i386): Declare global.
590 (lynx_i386_arch_setup): Set `lynx_tdesc'.
591 * lynx-low.c (lynx_tdesc): New global.
592 (lynx_add_process): Set the new process'es tdesc.
593 * lynx-low.h (struct target_desc): Forward declare.
594 (lynx_tdesc): Declare global.
595 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
596 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
597 * nto-low.c (nto_tdesc): New global.
598 (do_attach): Set the new process'es tdesc.
599 * nto-low.h (struct target_desc): Forward declare.
600 (nto_tdesc): Declare.
601 * nto-x86-low.c (tdesc_i386): Declare.
602 (nto_x86_arch_setup): Set `nto_tdesc'.
604 2013-06-04 Gary Benson <gbenson@redhat.com>
606 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
607 to qSupported response when appropriate.
608 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
609 with nonzero-length annex.
610 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
611 arguments supplied in annex.
613 2013-05-31 Doug Evans <dje@google.com>
616 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
617 64 bits in 64-cross-32 environment.
619 2013-05-28 Pedro Alves <palves@redhat.com>
621 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
622 (aarch64-without-fpu.c): Delete rule.
623 * configure.srv (aarch64*-*-linux*): Remove references to
624 aarch64-without-fpu.o and aarch64-without-fpu.xml.
625 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
628 2013-05-24 Pedro Alves <palves@redhat.com>
630 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
631 instead of strchr/decode_address. Error if the range isn't split
632 with a ','. Don't assume there's be a ':' in the action.
634 2013-05-23 Yao Qi <yao@codesourcery.com>
635 Pedro Alves <palves@redhat.com>
637 * linux-low.c (lwp_in_step_range): New function.
638 (linux_wait_1): If the thread was range stepping and stopped
639 outside the stepping range, report the stop to GDB. Otherwise,
640 continue stepping. Add range stepping debug output.
641 (linux_set_resume_request): Copy the step range from the resume
643 (linux_supports_range_stepping): New.
644 (linux_target_ops) <supports_range_stepping>: Set to
645 linux_supports_range_stepping.
646 * linux-low.h (struct linux_target_ops)
647 <supports_range_stepping>: New field.
648 (struct lwp_info) <step_range_start, step_range_end>: New fields.
649 * linux-x86-low.c (x86_supports_range_stepping): New.
650 (the_low_target) <supports_range_stepping>: Set to
651 x86_supports_range_stepping.
652 * server.c (handle_v_cont): Handle 'r' action.
653 (handle_v_requests): Append ";r" if the target supports range
655 * target.h (struct thread_resume) <step_range_start,
656 step_range_end>: New fields.
657 (struct target_ops) <supports_range_stepping>:
659 (target_supports_range_stepping): New macro.
661 2013-05-17 Joel Brobecker <brobecker@adacore.com>
663 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
664 confusion in comment.
666 2013-05-17 Joel Brobecker <brobecker@adacore.com>
668 * lynx-low.c (struct process_info_private): New type.
669 (lynx_add_process): New function.
670 (lynx_create_inferior, lynx_attach): Replace calls to
671 add_process by calls to lynx_add_process.
672 (lynx_resume): If PTID is null, then try using
673 current_process()->private->last_wait_event_ptid.
675 (lynx_clear_inferiors): Delete. The contents of that function
676 has been inlined in lynx_mourn;
677 (lynx_wait_1): Save the ptid in the process's private data.
678 (lynx_mourn): Free the process' private data. Replace call
679 to lynx_clear_inferiors by call to clear_inferiors.
681 2013-05-17 Yao Qi <yao@codesourcery.com>
683 * i386-low.c (i386_length_and_rw_bits): Move the comment to
686 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
688 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
689 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
690 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
691 PT_TEXT_END_ADDR guards. Update comments.
692 (linux_target_op) <read_offsets>: Conditionally define to
693 linux_read_offsets if the target is UCLIBC and if it defines
694 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
696 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
697 Andrew Jenner <andrew@codesourcery.com>
699 * Makefile.in (SFILES): Add linux-nios2-low.c.
700 (clean): Add action to delete nios2-linux.c.
701 (nios2-linux.c): New rule.
702 * configure.srv: Add nios2*-*-linux*.
703 * linux-nios2-low.c: New.
705 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
707 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
709 2013-04-25 Hui Zhu <hui@codesourcery.com>
712 * ax.c (ax_printf): Add fflush.
714 2013-04-22 Tom Tromey <tromey@redhat.com>
716 * Makefile.in (SFILES): Add filestuff.c.
717 (OBS): Add filestuff.o.
718 (filestuff.o): New target.
719 * config.in, configure: Rebuild.
720 * configure.ac: Check for fdwalk, pipe2.
722 2013-04-17 Pedro Alves <palves@redhat.com>
724 * configure.ac (USE_THREAD_DB): Delete variable.
725 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
726 Don't AC_SUBST USE_THREAD_DB.
727 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
728 * config.in, configure: Regenerate.
730 2013-04-16 Pedro Alves <palves@redhat.com>
732 * linux-low.h (struct lwp_info) <thread_known>: Move under
733 the USE_THREAD_DB #ifdef.
735 2013-04-16 Pedro Alves <palves@redhat.com>
737 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
738 (linux-low.o): Delete rule.
739 * linux-low.h: Always include "gdb_thread_db.h" instead of
740 conditionally including thread_db.h.
741 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
744 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
746 * Makefile.in (install-only): Fix make install regression.
748 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
750 Convert man pages to texinfo, new gdbinit.5 texinfo page.
751 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
753 * gdbserver.1: Remove.
755 2013-03-22 Pedro Alves <palves@redhat.com>
757 * linux-low.c (handle_extended_wait): Don't call
758 linux_enable_event_reporting.
760 2013-03-15 Tony Theodore <tonyt@logyst.com>
763 * Makefile.in (SHELL): Use @SHELL@.
765 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
767 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
770 2013-03-13 Joel Brobecker <brobecker@adacore.com>
772 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
773 Remove extraneous NULL element.
775 2013-03-13 Yao Qi <yao@codesourcery.com>
777 * tracepoint.c (traceframe_read_tsv): Look for the last matched
778 'V' block in trace frame.
780 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
782 * target.h (struct target_ops): Add btrace ops.
783 (target_supports_btrace): New macro.
784 (target_enable_btrace): New macro.
785 (target_disable_btrace): New macro.
786 (target_read_btrace): New macro.
787 * gdbthread.h (struct thread_info): Add btrace field.
788 * server.c: Include btrace-common.h.
789 (handle_btrace_general_set): New function.
790 (handle_btrace_enable): New function.
791 (handle_btrace_disable): New function.
792 (handle_general_set): Call handle_btrace_general_set.
793 (handle_qxfer_btrace): New function.
794 (struct qxfer qxfer_packets[]): Add btrace entry.
795 * inferiors.c (remove_thread): Disable btrace.
796 * linux-low: Include linux-btrace.h.
797 (linux_low_enable_btrace): New function.
798 (linux_low_read_btrace): New function.
799 (linux_target_ops): Add btrace ops.
800 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
801 Add srv_linux_btrace=yes.
802 (x86_64-*-linux*): Add linux-btrace.o.
803 Add srv_linux_btrace=yes.
804 * configure.ac: Define HAVE_LINUX_BTRACE.
805 * config.in: Regenerated.
806 * configure: Regenerated.
808 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
810 * server.c (handle_qxfer): Preserve error message if -3 is
812 (qxfer): Document the -3 return value.
814 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
816 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
817 (linux_btrace_h): New variable.
818 (linux-btrace.o): New rule.
820 2013-03-08 Stan Shebs <stan@codesourcery.com>
821 Hafiz Abid Qadeer <abidh@codesourcery.com>
823 * tracepoint.c (trace_buffer_size): New global.
824 (DEFAULT_TRACE_BUFFER_SIZE): New define.
825 (init_trace_buffer): Change to one-argument function. Allocate
827 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
828 handle QTBuffer:size packet.
829 (cmd_bigqtbuffer_size): New function.
830 (initialize_tracepoint): Call init_trace_buffer with
831 DEFAULT_TRACE_BUFFER_SIZE.
832 * server.c (handle_query): Add QTBuffer:size in the
835 2013-03-07 Yao Qi <yao@codesourcery.com>
837 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
838 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
840 (cmd_qtsp): Adjust condition. Do post increment.
841 Set cur_action and cur_step_action back to 0.
843 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
846 * linux-low.c (linux_write_memory): Return early success if LEN is
849 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
851 * configure.srv: Add x86_64-*-cygwin* as target.
853 2013-02-28 Tom Tromey <tromey@redhat.com>
855 * configure.ac: Invoke AC_SYS_LARGEFILE.
856 * configure, config.in: Rebuild.
858 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
860 * win32-low.c: Throughout, fix format strings and casts of
861 printf-like functions to avoid type related warnings on all
863 (get_child_debug_event): Print dwDebugEventCode as hex since
864 that's how it's usually documented.
866 2013-02-28 Yao Qi <yao@codesourcery.com>
868 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
871 2013-02-27 Jiong Wang <jiwang@tilera.com>
873 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
874 (reg-tilegx32.c): New rule.
875 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
876 * linux-tile-low.c (tile_arch_setup): New function. Invoke
877 different register info initializer according to elf class.
878 (init_registers_tilgx32): New function. The tilegx32 register info
880 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
881 (tile_store_gregset): Likewise.
883 2013-02-27 Yao Qi <yao@codesourcery.com>
885 * server.c (process_point_options): Print debug message when
886 debug_threads is true.
888 2013-02-26 Yao Qi <yao@codesourcery.com>
890 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
892 2013-02-19 Pedro Alves <palves@redhat.com>
893 Kai Tietz <ktietz@redhat.com>
897 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
898 instead of strtoul to extract address from packet.
899 (process_serial_event) <'z'>: Likewise.
901 2013-02-18 Yao Qi <yao@codesourcery.com>
903 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
905 2013-02-14 Pedro Alves <palves@redhat.com>
909 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
910 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
912 2013-02-14 Pedro Alves <palves@redhat.com>
914 * tracepoint.c (cmd_qtdpsrc): Use savestring.
916 2013-02-14 Pedro Alves <palves@redhat.com>
918 * tracepoint.c (save_string): Delete.
919 (add_tracepoint_action): Use savestring instead of save_string.
921 2013-02-12 Pedro Alves <palves@redhat.com>
923 * linux-xtensa-low.c: Ditto.
924 * xtensa-xtregs.c: Ditto.
926 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
928 * thread-db.c (thread_db_get_tls_address): NULL pointer check
931 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
933 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
934 aarch64_num_wp_regs and aarch64_num_bp_regs to
935 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
937 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
939 * linux-aarch64-low.c (ps_get_thread_area): Replace
940 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
942 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
943 Marcus Shawcroft <marcus.shawcroft@arm.com>
944 Nigel Stephens <nigel.stephens@arm.com>
945 Yufeng Zhang <yufeng.zhang@arm.com>
947 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
948 (aarch64.c, aarch64-without-fpu.c): New targets.
949 * configure.srv (aarch64*-*-linux*): New.
950 * linux-aarch64-low.c: New file.
952 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
954 * linux-low.c (handle_extended_wait, linux_create_inferior)
955 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
956 (dequeue_one_deferred_signal, linux_resume_one_thread)
957 (fetch_register, linux_write_memory, linux_enable_event_reporting)
958 (linux_tracefork_grandchild, linux_test_for_tracefork)
959 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
960 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
961 where the argument is 0.
963 2013-01-25 Yao Qi <yao@codesourcery.com>
965 * event-loop.c: Include "queue.h".
966 (gdb_event_p): New typedef.
967 (struct gdb_event) <next_event>: Remove.
968 (event_queue): Change to QUEUE(gdb_event_p).
969 (async_queue_event): Remove.
970 (gdb_event_xfree): New.
971 (initialize_event_loop): New.
972 (process_event): Use API from QUEUE.
973 (wait_for_event): Likewise.
974 * server.c (main): Call initialize_event_loop.
975 * server.h (initialize_event_loop): Declare.
977 2013-01-18 Yao Qi <yao@codesourcery.com>
979 * ax.h (struct eval_agent_expr_context): New.
980 (gdb_eval_agent_expr): Update declaration.
981 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
982 TFRAME. Add new argument CTX.
983 * server.h (struct eval_agent_expr_context): Declare.
984 (agent_mem_read, agent_tsv_read): Update declaration.
985 (agent_mem_read_string): Likewise.
986 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
987 (add_traceframe_block): Add new argument TPOINT.
988 Increase TPOINT->traceframe_usage.
989 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
990 eval_tracepoint_agent_expr.
991 (condition_true_at_tracepoint): Likewise.
992 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
993 (agent_mem_read_string, agent_tsv_read): Likewise.
995 2013-01-16 Yao Qi <yao@codesourcery.com>
997 * linux-low.c (linux_resume_one_lwp): Don't check
998 'lwp->bp_reinsert != 0'.
1000 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1001 Pedro Alves <palves@redhat.com>
1003 * lynx-low.c (ptrace_request_to_str): Define a temporary
1004 macro and use it to simplify this function's implementation.
1006 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1008 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1011 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1013 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1015 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1017 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1019 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1021 * lynx-low.c (lynx_resume): Use the resume_info parameter
1022 to determine the ptid for the lynx_ptrace call, unless
1023 it is equal to minus_one_ptid, in which case we use the
1024 ptid of the current_inferior.
1025 (lynx_wait_1): After having received a thread create/exit
1026 event, resume the inferior's execution using the signaling
1027 thread's ptid, rather than the old ptid.
1029 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1031 * lynx-low.c (lynx_resume): Delete variable ret.
1033 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1035 * gdbreplay.c (gdbreplay_version): Update copyright year.
1036 * server.c (gdbserver_version): Likewise.
1038 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1040 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1043 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1045 * lynx-low.c (ptrace_request_to_str): Add handling for
1048 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1050 * lynx-low.c (lynx_attach): Delete variable new_process.
1052 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1054 * lynx-low.c (lynx_create_inferior): Delete variable
1057 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1059 * lynx-low.c (ptrace_request_to_str): Do not handle
1060 PTRACE_GETTHREADLIST if this macro does not exist.
1062 2012-12-15 Yao Qi <yao@codesourcery.com>
1064 * Makefile.in (OBS): Add notif.o.
1065 * notif.c, notif.h: New.
1066 * server.c: Include "notif.h".
1067 (struct vstop_notif) <next>: Remove.
1069 (queue_stop_reply): Update.
1070 (push_event, send_next_stop_reply): Remove.
1071 (discard_queued_stop_replies): Update.
1072 (notif_stop): New variable.
1073 (handle_v_stopped): Remove.
1074 (handle_v_requests): Don't call handle_v_stopped. Call
1075 handle_ack_notif instead.
1076 (queue_stop_reply_callback): Call notif_event_enque instead
1077 of queue_stop_reply.
1078 (handle_status): Don't call send_next_stop_reply, call
1079 notif_write_event instead.
1080 (kill_inferior_callback): Likewise.
1081 (detach_or_kill_inferior_callback): Likewise.
1082 (main): Call initialize_notif.
1083 (process_serial_event): Call QUEUE_is_empty.
1084 (handle_target_event): Call notif_push instead of push event.
1085 * server.h (push_event): Remove declaration.
1087 2012-12-10 Tom Tromey <tromey@redhat.com>
1089 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1090 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1093 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1094 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1095 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1096 (amd64-linux-ipa.o, ax.o): Rewrite.
1097 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1098 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1099 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1100 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1101 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1102 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1103 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1104 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1105 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1106 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1107 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1108 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1109 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1110 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1111 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1112 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1113 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1114 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1115 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1116 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1117 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1118 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1119 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1120 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1121 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1122 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1123 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1124 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1125 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1126 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1127 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1128 (reg-tilegx.o): Remove.
1129 (all_object_files): New macro.
1130 Include .deps files.
1131 * aclocal.m4, configure: Rebuild.
1132 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1133 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1134 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1136 2012-12-05 Tom Tromey <tromey@redhat.com>
1139 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1141 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1143 * configure.ac: Check for linux/perf_event.h.
1144 * config.in: Regenerated.
1145 * configure: Regenerated.
1147 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1149 * hostio.c (handle_readlink): Decrease buffer size
1150 parameter passed to readlink by one byte.
1152 2012-11-26 Yao Qi <yao@codesourcery.com>
1154 * configure.ac (build_warnings): Append '-Wempty-body'.
1155 * configure: Regenerated.
1156 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1159 2012-11-15 Pierre Muller <muller@sourceware.org>
1161 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1162 * config.in: Regenerate.
1163 * configure: Regenerate.
1164 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1165 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1166 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1167 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1169 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1170 instead of <sys/wait.h> header.
1171 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1173 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1175 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1176 (various make rules): Remove -DGDBSERVER
1178 2012-11-09 Yao Qi <yao@codesourcery.com>
1180 * spu-low.c (current_ptid): Move it to ..
1181 * gdbthread.h: ... here. New.
1182 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1183 * server.c (myresume, process_serial_event): Likewise.
1184 * thread-db.c (thread_db_find_new_threads): Likewise.
1185 * tracepoint.c (run_inferior_command): Likewise.
1187 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1189 * server.c (handle_search_memory_1): Include access length in
1192 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1194 * linux-crisv32-low.c: Fix compile errors.
1196 2012-09-04 Yao Qi <yao@codesourcery.com>
1198 * tracepoint.c (cmd_qtsv): Adjust debug message.
1199 Don't check CUR_TPOINT.
1201 2012-08-28 Yao Qi <yao@codesourcery.com>
1203 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1204 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1205 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1206 Remove declarations of xmalloc, xreallloc, xstrdup and
1208 * Makefile.in (libiberty_h): New.
1209 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1210 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1212 2012-08-23 Yao Qi <yao@codesourcery.com>
1214 * server.h: Remove declaration of 'xsnprintf'.
1216 2012-08-22 Keith Seitz <keiths@redhat.com>
1218 * server.h: Include build-gnulib-gbserver/config.h.
1219 * gdbreplay.c: Likewise.
1221 2012-08-08 Doug Evans <dje@google.com>
1223 * Makefile.in (SFILES): Add gdb_vecs.c.
1224 (OBS): Add gdb_vecs.o.
1225 (gdb_vecs_h, host_defs_h): New variables.
1226 (thread-db.o): Add $(gdb_vecs_h) dependency.
1227 (gdb_vecs.o): New rule.
1228 * thread-db.c: #include "gdb_vecs.h".
1229 (thread_db_load_search): Use a vector to iterate over path elements.
1230 Handle text appearing after "$pdir".
1232 * configure.ac: Add check for strstr.
1233 * config.in: Regenerate.
1234 * configure: Regenerate.
1236 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1238 * hostio.c (handle_pread): If pread fails, fall back to attempting
1240 (handle_pwrite): Likewise for pwrite.
1242 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1244 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1245 between unsupported TYPE and unimplementable ADDR/LEN combination.
1246 (arm_insert_point): Act on new return value.
1248 2012-07-31 Pedro Alves <palves@redhat.com>
1250 * server.c (process_point_options): Only skip tokens if we find
1251 one that is unrecognized. Don't treat 'X' specially while
1252 skipping unrecognized tokens.
1254 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1256 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1257 to 4-byte-align HW breakpoint addresses for Thumb.
1259 2012-07-27 Yao Qi <yao@codesourcery.com>
1263 * server.h: Declare gdb_agent_about_to_close.
1264 * target.c (kill_inferior): Include "agent.h".
1265 New. Send command 'kill'.
1266 * target.h (kill_inferior): Removed macro.
1267 * tracepoint.c (gdb_agent_about_to_close): New.
1268 (gdb_agent_helper_thread): Handle command 'close'.
1269 Wait endlessly until the inferior stops.
1270 Install gdb_agent_remove_socket to atexit hook.
1271 (agent_socket_name): New static variable.
1272 (gdb_agent_socket_init): Replace local variable 'name' with
1273 'agent_socket_name'.
1274 (gdb_agent_remove_socket): New.
1276 2012-07-27 Yao Qi <yao@codesourcery.com>
1278 * server.c (process_point_options): Stop at 'X' when parsing.
1280 2012-07-19 Michael Eager <eager@eagercon.com>
1282 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1284 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1285 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1286 hardware breakpoint.
1288 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1290 * gdbserver/linux-low.c (initialize_low): Call
1291 linux_ptrace_init_warnings.
1293 2012-07-02 Doug Evans <dje@google.com>
1295 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1298 2012-07-02 Stan Shebs <stan@codesourcery.com>
1300 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1301 (ax.o): Add it to build rule.
1303 (OBS): Add format.o.
1304 (IPA_OBS): Add format.o.
1305 * server.c (handle_query): Claim support for breakpoint commands.
1306 (process_point_options): Add command case.
1307 (process_serial_event): Leave running if there are printfs in
1309 * mem-break.h (any_persistent_commands): Declare.
1310 (add_breakpoint_commands): Declare.
1311 (gdb_no_commands_at_breakpoint): Declare.
1312 (run_breakpoint_commands): Declare.
1313 * mem-break.c (struct point_command_list): New struct.
1314 (struct breakpoint): New field command_list.
1315 (any_persistent_commands): New function.
1316 (add_commands_to_breakpoint): New function.
1317 (add_breakpoint_commands): New function.
1318 (gdb_no_commands_at_breakpoint): New function.
1319 (run_breakpoint_commands): New function.
1320 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1322 * ax.c: Include format.h.
1323 (ax_printf): New function.
1324 (gdb_eval_agent_expr): Add printf opcode.
1326 2012-06-13 Yao Qi <yao@codesourcery.com>
1328 * server.c (start_inferior): Remove duplicated writes to fields
1329 'last_resume_kind' and 'last_status' of 'current_inferior'.
1331 2012-06-12 Yao Qi <yao@codesourcery.com>
1332 Pedro Alves <palves@redhat.com>
1334 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1336 * server.c (handle_v_cont): Extend comment.
1338 2012-06-11 Yao Qi <yao@codesourcery.com>
1340 * linux-low.c (linux_attach): Add 'static'.
1342 2012-06-06 Yao Qi <yao@codesourcery.com>
1344 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1346 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1348 Fix gcc -flto compilation warning.
1349 * server.c (main): Make variable multi_mode and attach volatile.
1351 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1353 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1354 if the platform doesn't know about it.
1356 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1358 * Makefile.in (SFILES): Add linux-tile-low.c.
1359 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1360 * configure.srv: Handle tilegx-*-linux*.
1361 * linux-tile-low.c: New file.
1363 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1365 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1367 2012-05-24 Pedro Alves <palves@redhat.com>
1371 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1373 2012-05-24 Pedro Alves <palves@redhat.com>
1377 Replace target_signal with gdb_signal throughout.
1379 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1381 * linux-low.c (linux_store_registers): Avoid the copying sequence
1382 when no data has been retrieved by ptrace.
1384 2012-05-22 Will Deacon <will.deacon@arm.com>
1386 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1387 Include asm/ptrace.h.
1388 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1391 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1393 * linux-low.c (linux_store_registers): Don't re-retrieve data
1394 with ptrace that has already been obtained from /proc. Always
1395 copy any data retrieved with ptrace to the buffer supplied.
1397 2012-05-11 Yao Qi <yao@codesourcery.com>
1398 Pedro Alves <palves@redhat.com>
1400 * linux-low.c (enum stopping_threads_kind): New.
1401 (stopping_threads): Change type to `enum stopping_threads_kind'.
1402 (handle_extended_wait): If stopping and suspending threads, leave
1403 the new_lwp suspended too.
1404 (linux_wait_for_event): Adjust.
1405 (stop_all_lwps): Set `stopping_threads' to
1406 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1407 whether we're suspending threads or just stopping them. Assert no
1410 2012-04-29 Yao Qi <yao@codesourcery.com>
1412 * server.h: Move some code to ...
1413 * gdbthread.h: ... here. New.
1414 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1415 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1416 (nto-low.o, win32-low.o): Likewise.
1417 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1418 * regcache.c, remote-utils.c, server.c: Likewise.
1419 * target.c, tracepoint.c, win32-low.c: Likewise.
1421 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1423 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1424 (PTRACE_ARG4_TYPE): Likewise.
1425 (PTRACE_XFER_TYPE): Likewise.
1426 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1427 ptrace to PTRACE_ARG3_TYPE.
1428 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1429 (PTRACE_ARG4_TYPE): Likewise.
1430 (PTRACE_XFER_TYPE): Likewise.
1431 (linux_detach_one_lwp): Cast fourth argument of
1432 ptrace to long then PTRACE_ARG4_TYPE.
1433 (regsets_fetch_inferior_registers): Cast third argument of
1434 ptrace to long then PTRACE_ARG3_TYPE.
1435 (regsets_store_inferior_registers): Likewise.
1437 2012-04-20 Pedro Alves <palves@redhat.com>
1439 * configure: Regenerate.
1441 2012-04-19 Pedro Alves <palves@redhat.com>
1443 * Makefile.in (GNULIB_BUILDDIR): New.
1444 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1445 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1446 (all, install-only, uninstall, clean-info, all-lib, clean): No
1447 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1448 (maintainer-clean realclean distclean): Use subdir_do.
1450 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1451 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1452 * acinclude.m4: Include acx_configure_dir.m4.
1453 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1454 calls. Call AC_PROG_RANLIB. Configure gnulib using
1457 (GNULIB_STDINT_H): Adjust.
1458 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1459 * gdbreplay.c: Include build-gnulib/config.h.
1460 * server.h: Likewise.
1461 * aclocal.m4: Regenerate.
1462 * config.in: Regenerate.
1463 * configure: Regenerate.
1465 2012-04-19 Pedro Alves <palves@redhat.com>
1467 * Makefile.in (LIBGNU, INCGNU): Adjust.
1468 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1469 (all, install-only, uninstall, clean-info, all-lib, clean)
1470 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1471 * configure.ac: Adjust AC_OUTPUT output.
1472 * aclocal.m4: Regenerate.
1473 * configure: Regenerate.
1475 2012-04-19 Pedro Alves <palves@redhat.com>
1477 * Makefile.in (generated_files): New.
1478 (server_h): Remove the explicit dependency on config.h, and depend
1479 on $generated_files.
1481 2012-04-19 Pedro Alves <palves@redhat.com>
1483 * Makefile.in (INCGNU): Add -Ignulib.
1485 2012-04-19 Pedro Alves <palves@redhat.com>
1487 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1488 (INCGNU): ... this, and spell out -I here.
1489 (GNULIB_LIB): Rename to ...
1491 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1493 2012-04-19 Pedro Alves <palves@redhat.com>
1495 * config.in: Regenerate.
1497 2012-04-19 Pedro Alves <palves@redhat.com>
1499 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1500 * server.h (memmem): Remove declaration.
1501 * config.in: Regenerate.
1502 * configure: Regenerate.
1504 2012-04-19 Yao Qi <yao@codesourcery.com>
1506 * Makefile.in (SFILES): Add common/vec.c.
1510 2012-04-19 Yao Qi <yao@codesourcery.com>
1512 * remote-utils.c (prepare_resume_reply): Replace with macro
1513 target_core_of_thread.
1514 * server.c (handle_qxfer_threads_proper): Likewise.
1515 * target.h (traget_core_of_thread): New macro.
1517 2012-04-18 Pedro Alves <palves@redhat.com>
1519 * aclocal.m4: Regenerate.
1520 * configure: Regenerate.
1522 2012-04-16 Yao Qi <yao@codesourcery.com>
1524 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1525 duplicated on address.
1527 2012-04-16 Yao Qi <yao@codesourcery.com>
1529 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1530 (struct tracepoint_action_ops) <send>: New field.
1531 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1532 (agent_expr_send, x_tracepoint_action_send): New.
1533 (l_tracepoint_action_send): New.
1534 (cmd_qtdp): Download and install tracepoint
1535 according to `use_agent'.
1536 (run_inferior_command): Add one more parameter `len'.
1538 (tracepoint_send_agent): New.
1539 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1541 2012-04-16 Yao Qi <yao@codesourcery.com>
1543 * tracepoint.c (download_tracepoints): Moved to ...
1544 (cmd_qtstart): ... here.
1546 2012-04-14 Yao Qi <yao@codesourcery.com>
1548 * tracepoint.c: Include inttypes.h.
1549 (struct collect_memory_action): Use sized types.
1550 (struct tracepoint): Likewise.
1551 (cmd_qtdp, stop_tracing): Update print specifiers.
1552 (cmd_qtp, response_tracepoint): Likewise.
1553 (collect_data_at_tracepoint): Likewise.
1554 (collect_data_at_step): Likewise.
1556 2012-04-14 Yao Qi <yao@codesourcery.com>
1558 Import gnulib module inttypes.
1559 * aclocal.m4, config.in, configure: Regenerated.
1561 2012-04-14 Yao Qi <yao@codesourcery.com>
1563 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1564 Makefile and config.status at last.
1566 2012-04-13 Yao Qi <yao@codesourcery.com>
1568 * tracepoint.c: Include stdint.h unconditionally.
1570 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1572 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1573 on BFD_HAVE_SYS_PROCFS_TYPE.
1574 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1575 * configure: Regenerate.
1576 * config.in: Likewise.
1578 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1580 * Makefile.in (clean): Also remove x32.c x32-linux.c
1581 x32-avx.c x32-avx-linux.c.
1582 (x32.o): New target.
1584 (x32-linux.o): Likewise.
1585 (x32-linux.c): Likewise.
1586 (x32-avx.o): Likewise.
1587 (x32-avx.c): Likewise.
1588 (x32-avx-linux.o): Likewise.
1589 (x32-avx-linux.c): Likewise.
1591 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1592 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1593 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1594 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1595 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1596 i386/x32-avx-linux.xml.
1598 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1599 (init_registers_x32_avx_linux): Likwise.
1600 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1601 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1603 2012-04-13 Pedro Alves <palves@redhat.com>
1605 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1606 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1607 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1608 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1611 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1613 * linux-x86-low.c (compat_x32_clock_t): New.
1614 (compat_x32_siginfo_t): Likewise.
1615 (compat_x32_siginfo_from_siginfo): Likewise.
1616 (siginfo_from_compat_x32_siginfo): Likewise.
1617 (linux_is_elf64): Likewise.
1618 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1619 and siginfo_from_compat_x32_siginfo for x32.
1620 (x86_arch_setup): Set linux_is_elf64.
1622 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1625 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1627 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1628 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1629 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1630 compatible with process.
1632 2012-04-12 Yao Qi <yao@codesourcery.com>
1634 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1635 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1636 (install-only, install-info, clean): Handle sub dir gnulib.
1637 (all-lib, am--refresh): New targets.
1638 (memmem.o): Remove target.
1639 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1640 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1641 (AC_REPLACE_FUNCS): Remove memmem.
1642 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1643 (AC_OUTPUT): Generate Makefile in gnulib/.
1644 * aclocal.m4, config.in, configure: Regenerated.
1646 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1648 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1650 2012-04-05 Pedro Alves <palves@redhat.com>
1652 -Werror=strict-aliasing
1654 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1657 2012-04-04 Pedro Alves <palves@redhat.com>
1659 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1660 (sparc_store_gregset_from_stack, sparc_store_gregset)
1661 (sparc_breakpoint_at): Fix formatting.
1663 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1665 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1667 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1668 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1669 * config.in: Regenerate.
1670 * configure: Likewise.
1672 2012-03-29 Pedro Alves <palves@redhat.com>
1674 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1675 Correct ptrace arguments.
1677 2012-03-28 Pedro Alves <palves@redhat.com>
1679 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1680 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1681 (IA64_FR1_REGNUM): New defines.
1682 (ia64_fetch_register): New.
1683 (the_low_target): Install it.
1684 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1686 * linux-low.c (linux_fetch_registers): Try the
1687 the_low_target.fetch_register hook first.
1689 * linux-arm-low.c (the_low_target): Adjust.
1690 * linux-bfin-low.c (the_low_target): Adjust.
1691 * linux-cris-low.c (the_low_target): Adjust.
1692 * linux-crisv32-low.c (the_low_target): Adjust.
1693 * linux-m32r-low.c (the_low_target): Adjust.
1694 * linux-m68k-low.c (the_low_target): Adjust.
1695 * linux-mips-low.c (the_low_target): Adjust.
1696 * linux-ppc-low.c (the_low_target): Adjust.
1697 * linux-s390-low.c (the_low_target): Adjust.
1698 * linux-sh-low.c (the_low_target): Adjust.
1699 * linux-sparc-low.c (the_low_target): Adjust.
1700 * linux-tic6x-low.c (the_low_target): Adjust.
1701 * linux-x86-low.c (the_low_target): Adjust.
1702 * linux-xtensa-low.c (the_low_target): Adjust.
1704 2012-03-26 Pedro Alves <palves@redhat.com>
1706 * server.c (handle_qxfer_libraries): Don't bail early if
1707 the_target->qxfer_libraries_svr4 is not NULL.
1709 2012-03-26 Pedro Alves <palves@redhat.com>
1711 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1713 2012-03-23 Pedro Alves <palves@redhat.com>
1715 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1716 "library-list-svr4" element's start tag when the the DSO list is
1719 2012-03-23 Pedro Alves <palves@redhat.com>
1721 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1722 a variable whose type size is the same as the inferior's pointer
1725 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1727 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1729 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1730 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1731 * linux-low.h: Include <signal.h>.
1732 (struct siginfo): Remove forward declaration.
1733 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1736 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1738 * .gitignore: Ignore more files.
1740 2012-03-19 Pedro Alves <palves@redhat.com>
1741 Jan Kratochvil <jan.kratochvil@redhat.com>
1743 * server.c (cont_thread, general_thread): Add describing comments.
1744 (start_inferior): Clear `cont_thread'.
1745 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1748 2012-03-15 Yao Qi <yao@codesourcery.com>
1750 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1752 (cmd_qtdp): ... here.
1754 2012-03-15 Yao Qi <yao@codesourcery.com>
1756 * tracepoint.c (struct tracepoint_action_ops): New.
1757 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1758 (m_tracepoint_action_download): New.
1759 (r_tracepoint_action_download): New.
1760 (x_tracepoint_action_download): New.
1761 (l_tracepoint_action_download): New.
1762 (add_tracepoint_action): Install `action->ops' according type.
1763 (download_tracepoint_1): Move code `download' function pointer
1764 of various tracepoint_action_ops.
1766 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1768 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1769 linux_ptrace_attach_warnings.
1771 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1773 * Makefile.in (linux-ptrace.o): New.
1774 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1775 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1776 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1777 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1778 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1780 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1782 2012-03-08 Yao Qi <yao@codesourcery.com>
1783 Pedro Alves <palves@redhat.com>
1785 Fix PR server/13392.
1786 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1788 * tracepoint.c (remove_tracepoint): New.
1789 (cmd_qtdp): Call remove_tracepoint when failed to install.
1791 2012-03-07 Pedro Alves <palves@redhat.com>
1793 * linux-low.c (get_detach_signal): New.
1794 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1795 Pass on pending signals to PTRACE_DETACH. Check the result of the
1797 * server.c (program_signals, program_signals_p): New.
1798 (handle_general_set): Handle QProgramSignals.
1799 * server.h (program_signals, program_signals_p): Declare.
1801 2012-03-05 Pedro Alves <palves@redhat.com>
1802 Jan Kratochvil <jan.kratochvil@redhat.com>
1804 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1807 2012-03-03 Yao Qi <yao@codesourcery.com>
1809 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1810 agent_look_up_symbols.
1812 2012-03-03 Yao Qi <yao@codesourcery.com>
1814 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1815 (linux-x86-low.o): Likewise.
1816 * server.h: Remove in_process_agent_loaded.
1817 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1821 2012-03-03 Yao Qi <yao@codesourcery.com>
1823 * tracepoint.c (gdb_agent_capability): New global.
1824 (in_process_agent_loaded_ust): Renamed to
1825 `in_process_agent_supports_ust'.
1827 (in_process_agent_supports_ust): Call agent_capability_check.
1828 (clear_installed_tracepoints): Assert that agent supports
1831 2012-03-03 Yao Qi <yao@codesourcery.com>
1833 * linux-low.c (linux_supports_agent): New.
1834 (linux_target_ops): Initialize field `supports_agent' with
1835 linux_supports_agent.
1836 * target.h (struct target_ops) <supports_agent>: New.
1837 (target_supports_agent): New macro.
1838 * server.c (handle_general_set): Handle packet 'QAgent'.
1839 (handle_query): Send `QAgent+'.
1840 * Makefile.in (server.o): Depends on agent.h.
1842 2012-03-03 Yao Qi <yao@codesourcery.com>
1844 * Makefile.in (OBS): Add agent.o.
1845 Add new rule for agent.o.
1846 Track dependence of tracepoint.c on agent.h.
1847 * tracepoint.c (run_inferior_command_1):
1848 (run_inferior_command): Call agent_run_command.
1849 (gdb_ust_connect_sync_socket): Deleted. Move it to
1851 (resume_thread, stop_thread): Likewise.
1852 (gdb_ust_socket_init): Renamed to ...
1853 (gdb_agent_socket_init): ... New.
1854 (gdb_ust_thread): Renamed to ...
1855 (gdb_agent_helper_thread): ... New.
1856 (gdb_ust_init): Move some code to ...
1857 (gdb_agent_init): ... here. New.
1858 [HAVE_UST]: Call gdb_ust_init.
1859 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1860 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1861 * config.in, configure: Regenerated.
1863 2012-03-02 Pedro Alves <palves@redhat.com>
1865 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1866 * linux-low.c (struct simple_pid_list): New.
1867 (stopped_pids): New a struct simple_pid_list pointer.
1868 (add_to_pid_list, pull_pid_from_list): New.
1869 (handle_extended_wait): Don't assume the first signal new children
1870 report is SIGSTOP. Adjust call to pull_pid_from_list.
1871 (linux_wait_for_lwp): Adjust.
1873 2012-03-02 Yao Qi <yao@codesourcery.com>
1875 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1878 2012-03-02 Yao Qi <yao@codesourcery.com>
1880 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1881 `stop_pc' and `tpoint'. Update caller.
1883 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1885 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1886 * linux-low.c (use_linux_regsets): New macro.
1887 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1888 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1889 (linux_register_in_regsets): New function.
1890 (usr_fetch_inferior_registers): Skip registers covered by
1892 (usr_store_inferior_registers): Likewise.
1893 (usr_fetch_inferior_registers): New macro.
1894 (usr_store_inferior_registers): Likewise.
1895 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1896 (linux_store_registers): Likewise.
1897 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1899 (init_registers_mips64_dsp_linux): Likewise.
1900 (init_registers_mips_linux): New macro.
1901 (init_registers_mips_dsp_linux): Likewise.
1902 (mips_dsp_num_regs): Likewise.
1903 (DSP_BASE, DSP_CONTROL): New fallback macros.
1904 (mips_base_regs): New macro.
1905 (mips_regmap): Use it. Fix the size.
1906 (mips_dsp_regmap): New variable.
1907 (mips_dsp_regset_bitmap): Likewise.
1908 (mips_arch_setup): New function.
1909 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1911 (mips_cannot_store_register): Likewise.
1912 (the_low_target): Update .arch_setup, .num_regs and .regmap
1913 initializers. Add .regset_bitmap initializer.
1914 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1916 * linux-bfin-low.c (the_low_target): Likewise.
1917 * linux-cris-low.c (the_low_target): Likewise.
1918 * linux-crisv32-low.c (the_low_target): Likewise.
1919 * linux-ia64-low.c (the_low_target): Likewise.
1920 * linux-m32r-low.c (the_low_target): Likewise.
1921 * linux-m68k-low.c (the_low_target): Likewise.
1922 * linux-ppc-low.c (the_low_target): Likewise.
1923 * linux-s390-low.c (the_low_target): Likewise.
1924 * linux-sh-low.c (the_low_target): Likewise.
1925 * linux-sparc-low.c (the_low_target): Likewise.
1926 * linux-tic6x-low.c (the_low_target): Likewise.
1927 * linux-x86-low.c (the_low_target): Likewise.
1928 * linux-xtensa-low.c (the_low_target): Likewise.
1929 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1930 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1931 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1933 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1934 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1936 2012-02-29 Yao Qi <yao@codesourcery.com>
1937 Pedro Alves <palves@redhat.com>
1939 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1940 `step_over_finished' is true.
1942 2012-02-27 Pedro Alves <palves@redhat.com>
1944 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1945 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1947 2012-02-27 Pedro Alves <palves@redhat.com>
1950 * linux-low.c (pid_is_stopped): New.
1951 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1953 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1955 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1958 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1960 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1962 2012-02-24 Luis Machado <lgustavo@codesourcery>
1964 * server.c (handle_query): Advertise support for target-side
1965 breakpoint condition evaluation.
1966 (process_point_options): New function.
1967 (process_serial_event): When inserting a breakpoint, check for
1968 a target-side condition that should be evaluated.
1970 * mem-break.c: Include regcache.h and ax.h.
1971 (point_cond_list_t): New data structure.
1972 (breakpoint) <cond_list>: New field.
1973 (find_gdb_breakpoint_at): Make non-static.
1974 (delete_gdb_breakpoint_at): Clear any target-side
1976 (clear_gdb_breakpoint_conditions): New function.
1977 (add_condition_to_breakpoint): Likewise.
1978 (add_breakpoint_condition): Likewise.
1979 (gdb_condition_true_at_breakpoint): Likewise.
1980 (gdb_breakpoint_here): Return result directly instead
1981 of going through a local variable.
1983 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1984 (clear_gdb_breakpoint_conditions): Likewise.
1985 (add_breakpoint_condition): Likewise.
1986 (gdb_condition_true_at_breakpoint): Likewise.
1988 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1989 (need_step_over_p): Take target-side breakpoint condition into
1992 2012-02-24 Luis Machado <lgustavo@codesourcery>
1994 * server.h: Include tracepoint.h.
1995 (agent_mem_read, agent_get_trace_state_variable_value,
1996 agent_set_trace_state_variable_value,
1997 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1998 get_set_tsv_func_addr): New prototypes.
2000 * ax.h: New include file.
2001 * ax.c: New source file.
2003 * tracepoint.c: Include ax.h.
2004 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2005 agent_expr, eval_result_type): Move to ax.h.
2006 (parse_agent_expr): Rename to ...
2007 (gdb_parse_agent_expr): ... this, make it non-static and move
2009 (unparse_agent_expr) Rename to ...
2010 (gdb_unparse_agent_expr): ... this, make it non-static and move
2012 (eval_agent_expr): Rename to ...
2013 (eval_tracepoint_agent_expr): ... this.
2014 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2015 forward declarations.
2016 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2017 (agent_get_trace_state_variable_value): New function.
2018 (agent_set_trace_state_variable_value): New function.
2019 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2020 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2021 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2022 (condition_true_at_tracepoint): Likewise.
2023 (parse_agent_expr): Rename to ...
2024 (gdb_parse_agent_expr): ... this and move to ax.c.
2025 (unparse_agent_expr): Rename to ...
2026 (gdb_unparse_agent_expr): ... this and move to ax.c.
2027 (gdb_agent_op_name): Move to ax.c.
2028 (eval_agent_expr): Rename to ...
2029 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2031 (eval_tracepoint_agent_expr): New function.
2032 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2034 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2036 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2037 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2038 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2039 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2040 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2041 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2042 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2043 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2044 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2045 (compile_bytecodes): Remove forward declaration.
2046 (is_goto_target): Move to ax.c.
2047 (compile_bytecodes): Move to ax.c and call
2048 agent_get_trace_state_variable_value (...) and
2049 agent_set_trace_state_variable_value (...).
2051 * Makefile.in: Update ax.c and IPA dependencies.
2053 2012-02-24 Pedro Alves <palves@redhat.com>
2055 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2056 (cmd_bigqtbuffer_circular): ... this. Only handle
2057 'QTBuffer:circular:'.
2058 (handle_tracepoint_general_set): Adjust.
2060 2012-02-16 Yao Qi <yao@codesourcery.com>
2062 * inferiors.c: Move code to ...
2063 * dll.c: .... here. New.
2064 * server.h: Declare clear_dlls.
2065 * Makefile.in (SFILES): Add dll.c.
2069 2012-02-11 Yao Qi <yao@codesourcery.com>
2071 * server.c: (handle_monitor_command): Add a new parameter
2073 (handle_query): Update caller.
2075 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2077 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2078 * configure, config.in: Regenerate.
2079 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2082 2012-02-02 Pedro Alves <palves@redhat.com>
2084 Try SIGKILL first, then PTRACE_KILL.
2085 * linux-low.c (linux_kill_one_lwp): New.
2086 (linux_kill_one_lwp): Rename to ...
2087 (kill_one_lwp_callback): ... this. Use the new
2090 2012-02-02 Pedro Alves <palves@redhat.com>
2092 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2095 2012-01-27 Pedro Alves <palves@redhat.com>
2097 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2098 (elf_64_file_p): Make static.
2099 (linux_pid_exe_is_elf_64_file): New.
2100 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2101 Delete declarations.
2102 (linux_pid_exe_is_elf_64_file): Declare.
2103 * linux-x86-low.c (x86_arch_setup): Use
2104 linux_pid_exe_is_elf_64_file.
2106 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2108 * linux-low.c (linux_wait_for_event_1): Rename to ...
2109 (linux_wait_for_event): ... here and merge it with former
2110 linux_wait_for_event - new variable wait_ptid, use it.
2111 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2113 2012-01-23 Pedro Alves <palves@redhat.com>
2115 * server.c (main): Avoid yet another case of infinite loop while
2116 detaching/killing after a longjmp.
2118 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2121 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2123 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2125 * hostio.c (handle_readlink): New function.
2126 (handle_vFile): Call it to handle "vFile:readlink" packets.
2128 2012-01-20 Pedro Alves <palves@redhat.com>
2129 Ulrich Weigand <ulrich.weigand@linaro.org>
2131 * server.c (handle_v_requests): Only support vAttach and vRun to
2132 start multiple processes when in extended protocol mode.
2134 2012-01-17 Pedro Alves <palves@redhat.com>
2136 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2137 memalign plus mprotect to allocate the scratch buffer.
2139 2012-01-13 Pedro Alves <palves@redhat.com>
2141 * server.c (attach_inferior): Clear `cont_thread'.
2143 2012-01-13 Pedro Alves <palves@redhat.com>
2145 * server.c (main): Avoid infinite loop while detaching/killing
2148 2012-01-09 Doug Evans <dje@google.com>
2150 * server.c (start_inferior): Set last_ptid in --wrapper case.
2152 2012-01-06 Yao Qi <yao@codesourcery.com>
2154 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2156 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2158 2012-01-04 Yao Qi <yao@codesourcery.com>
2160 * tracepoint.c (cmd_qtdp): Print debug message
2161 for static tracepoint.
2163 2012-01-04 Yao Qi <yao@codesourcery.com>
2165 * tracepoint.c (trace_vdebug): Differentiate debug message
2166 between gdbserver and IPA.
2168 2012-01-03 Yao Qi <yao@codesourcery.com>
2170 * tracepoint.c (tracepoint_was_hit): Don't collect for
2173 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2175 * terminal.h: Reformat copyright header.
2177 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2179 * server.c (gdbserver_version): Update copyright year.
2180 * gdbreplay.c (gdbreplay_version): Likewise.
2182 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2184 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2187 2011-12-18 Hui Zhu <teawater@gmail.com>
2188 * linux-low.c (linux_create_inferior): Save return value to ret.
2190 2011-12-18 Hui Zhu <teawater@gmail.com>
2192 * linux-low.c (linux_create_inferior): Save return value to ret.
2194 2011-12-16 Doug Evans <dje@google.com>
2196 * linux-low.c (linux_create_inferior): If stdio connection,
2197 redirect stdin from /dev/null, stdout to stderr.
2198 * remote-utils.c (remote_is_stdio): New static global.
2199 (remote_connection_is_stdio): New function.
2200 (remote_prepare): Handle stdio connection.
2201 (remote_open): Ditto.
2202 (remote_close): Don't close stdin for stdio connections.
2203 (read_prim,write_prim): New functions. Replace all calls to
2204 read/write to these.
2205 * server.c (main): Watch for "-" argument. Move call to
2206 remote_prepare before start_inferior.
2207 * server.h (STDIO_CONNECTION_NAME): New macro.
2208 (remote_connection_is_stdio): Declare.
2210 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2211 in debugging output.
2213 2011-12-15 Yao Qi <yao@codesourcery.com>
2215 * tracepoint.c: Include sys/syscall.h.
2216 (gdb_ust_thread): Remove preprocessor conditional.
2218 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2220 * linux-low.c (linux_detach_one_lwp): Call
2221 the_low_target.prepare_to_resume before detaching.
2223 2011-12-14 Yao Qi <yao@codesourcery.com>
2225 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2228 2011-12-14 Yao Qi <yao@codesourcery.com>
2230 * i386-low.c (i386_low_stopped_data_address): Initialize local
2233 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2237 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2238 DR_CONTROL unless necessary. Extend comments.
2239 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2240 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2242 2011-12-13 Yao Qi <yao@codesourcery.com>
2244 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2246 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2248 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2250 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2251 Print new debug message for such case.
2253 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2255 Fix overlapping memcpy.
2256 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2257 the read_inferior_memory transfer.
2258 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2259 write_inferior_memory transfer.
2260 (set_fast_tracepoint_jump): New variable buf. Use it for the
2261 read_inferior_memory and write_inferior_memory transfers.
2262 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2263 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2264 Use it for the write_inferior_memory transfer.
2265 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2268 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2270 * linux-low.c (fetch_register, store_register): Make code
2271 consistent, fix formatting.
2273 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2275 * linux-low.c (usr_store_inferior_registers): Factor out code
2276 to handle individual registers into...
2277 (store_register): ... this new function.
2279 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2281 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2282 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2283 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2284 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2285 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2286 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2287 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2288 (srv_xmlfiles): Add new XML files.
2290 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2292 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2293 (init_registers_s390_linux32v1): Add prototype.
2294 (init_registers_s390_linux32v2): Likewise.
2295 (init_registers_s390_linux64v1): Likewise.
2296 (init_registers_s390_linux64v2): Likewise.
2297 (init_registers_s390x_linux64v1): Likewise.
2298 (init_registers_s390x_linux64v2): Likewise.
2299 (s390_num_regs): Increment to 52.
2300 (s390_regmap): Add orig_r2 register.
2301 (s390_num_regs_3264): Increment to 68.
2302 (s390_regmap_3264): Add orig_r2 register.
2303 (s390_collect_ptrace_register): Handle orig_r2 register.
2304 (s390_supply_ptrace_register): Likewise.
2305 (s390_fill_last_break): New function.
2306 (s390_store_last_break): Likewise.
2307 (s390_fill_system_call): New function.
2308 (s390_store_system_call): Likewise.
2309 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2311 (s390_check_regset): New function.
2312 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2313 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2314 Update target_regsets for available register sets.
2316 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2317 Jan Kratochvil <jan.kratochvil@redhat.com>
2319 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2320 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2322 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2323 * linux-low.h (struct process_info_private): New member r_debug.
2324 * server.c (handle_qxfer_libraries): Call
2325 the_target->qxfer_libraries_svr4.
2326 (handle_qxfer_libraries_svr4): New function.
2327 (qxfer_packets): New entry "libraries-svr4".
2328 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2329 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2330 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2331 PACKET_qXfer_libraries_svr4.
2333 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2335 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2336 PSW address/mask between 8-byte and 16-byte formats.
2337 (s390_supply_ptrace_register): Likewise.
2338 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2339 basic addressing mode bit.
2341 2011-11-24 Stan Shebs <stan@codesourcery.com>
2343 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2345 2011-11-17 Stan Shebs <stan@codesourcery.com>
2347 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2348 (tracing_start_time): New global.
2349 (tracing_stop_time): New global.
2350 (tracing_user_name): New global.
2351 (tracing_notes): New global.
2352 (tracing_stop_note): New global.
2353 (cmd_qtstart): Set traceframe_usage, start_time.
2354 (stop_tracing): Set stop_time.
2355 (cmd_qtstatus): Report additional status.
2356 (cmd_qtp): New function.
2357 (handle_tracepoint_query): Call it.
2358 (cmd_qtnotes): New function.
2359 (handle_tracepoint_general_set): Call it.
2360 (get_timestamp): Rename from tsv_get_timestamp.
2362 2011-11-14 Stan Shebs <stan@codesourcery.com>
2363 Kwok Cheung Yeung <kcy@codesourcery.com>
2365 * linux-x86-low.c (small_jump_insn): New.
2366 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2367 trampoline and error message, build a trampoline and issue a small
2368 jump instruction to it.
2369 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2370 trampoline and error message.
2371 (x86_get_min_fast_tracepoint_insn_len): New.
2372 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2373 * linux-low.h (struct linux_target_ops): Add arguments to
2374 install_fast_tracepoint_jump_pad operation, add new operation.
2375 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2377 (linux_get_min_fast_tracepoint_insn_len): New function.
2378 (linux_target_op): Add new operation.
2379 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2380 (gdb_trampoline_buffer_end): Ditto.
2381 (gdb_trampoline_buffer_error): Ditto.
2382 (struct ipa_sym_addresses): Add fields for new IPA variables.
2383 (symbol_list): Add entries for new IPA variables.
2384 (struct tracepoint): Add fields to hold the address range of the
2385 trampoline used by the tracepoint.
2386 (trampoline_buffer_head): New static variable.
2387 (trampoline_buffer_tail): Ditto.
2388 (claim_trampoline_space): New function.
2389 (have_fast_tracepoint_trampoline_buffer): New function.
2390 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2392 (install_fast_tracepoint): Ditto, also add error buffer argument.
2393 (cmd_qtminftpilen): New function.
2394 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2395 (fast_tracepoint_from_trampoline_address): New function.
2396 (fast_tracepoint_collecting): Handle trampoline as part of jump
2398 (set_trampoline_buffer_space): New function.
2399 (initialize_tracepoint): Initialize new IPA variables.
2400 * target.h (struct target_ops): Add arguments to
2401 install_fast_tracepoint_jump_pad operation, add new
2402 get_min_fast_tracepoint_insn_len operation.
2403 (target_get_min_fast_tracepoint_insn_len): New.
2404 (install_fast_tracepoint_jump_pad): Add arguments.
2405 * server.h (IPA_BUFSIZ): Define.
2406 * linux-i386-ipa.c: Include extra header files.
2407 (initialize_fast_tracepoint_trampoline_buffer): New function.
2408 (initialize_low_tracepoint): Call it.
2409 * server.h (set_trampoline_buffer_space): Declare.
2410 (claim_trampoline_space): Ditto.
2411 (have_fast_tracepoint_trampoline_buffer): Ditto.
2413 2011-11-14 Yao Qi <yao@codesourcery.com>
2415 * server.c (handle_query): Handle InstallInTrace for qSupported.
2416 * tracepoint.c (add_tracepoint): Sort list.
2417 (install_tracepoint, download_tracepoint): New.
2418 (cmd_qtdp): Call them to install and download tracepoints.
2419 (sort_tracepoints): Removed.
2420 (cmd_qtstart): Update.
2422 2011-11-14 Yao Qi <yao@codesourcery.com>
2424 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2425 * mem-break.h: Declare.
2426 * tracepoint.c (cmd_qtstart): Move some code to ...
2427 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2429 (download_tracepoints): Move some code to ...
2430 (download_tracepoint_1): ... here. New.
2432 2011-11-08 Yao Qi <yao@codesourcery.com>
2434 * remote-utils.c (relocate_instruction): A comment fix.
2436 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2438 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2439 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2440 dr_status_mirror and dr_control_mirror from debug_reg_state.
2441 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2442 (i386_initial_stuff): Remove use of deleted globals.
2443 (i386_get_thread_context, i386_set_thread_context,
2444 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2445 from debug_reg_state.
2447 2011-11-05 Yao Qi <yao@codesourcery.com>
2449 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2450 address as TPOINT's.
2452 2011-11-02 Stan Shebs <stan@codesourcery.com>
2454 * tracepoint.c (agent_mem_read_string): New function.
2455 (eval_agent_expr): Call it for tracenz.
2456 * server.c (handle_query): Report support for tracenz.
2458 2011-11-02 Yao Qi <yao@codesourcery.com>
2460 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2462 2011-11-02 Yao Qi <yao@codesourcery.com>
2464 * target.h: Fix a typo in comment.
2466 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2468 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2469 clobber the breakpoints' shadows with fast tracepoint jumps.
2470 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2471 * target.c (write_inferior_memory): Also pass MYADDR down to
2474 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2476 * configure.ac: Check support for personality routine.
2477 * configure: Regenerate.
2478 * config.in: Likewise.
2479 * linux-low.c: Include <sys/personality.h>.
2480 Define ADDR_NO_RANDOMIZE if necessary.
2481 (linux_create_inferior): Disable address space randomization when
2482 forking inferior, if requested.
2483 (linux_supports_disable_randomization): New function.
2484 (linux_target_ops): Install it.
2485 * server.h (disable_randomization): Declare.
2486 * server.c (disable_randomization): New global variable.
2487 (handle_general_set): Handle QDisableRandomization.
2488 (handle_query): Likewise for qSupported.
2489 (main): Support --disable-randomization and --no-disable-randomization
2490 command line arguments.
2491 * target.h (struct target_ops): Add supports_disable_randomization.
2492 (target_supports_disable_randomization): New macro.
2494 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2496 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2498 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2499 [!PT_GETDSBT] (target_loadmap): New definition.
2500 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2501 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2502 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2503 and PT_GETDSBT to LINUX_LOADMAP.
2504 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2505 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2507 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2509 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2510 (arm_linux_hwbp_cap): New static variable.
2511 (arm_linux_get_hwbp_cap): Replace by ...
2512 (arm_linux_init_hwbp_cap): ... this new function.
2513 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2514 (arm_linux_get_hw_watchpoint_count): Likewise.
2515 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2516 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2517 (arm_prepare_to_resume): Use perror_with_name instead of error.
2519 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2521 * linux-arm-low.c: Include <signal.h>.
2522 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2523 (struct arm_linux_hwbp_cap): New data type.
2524 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2525 (struct arm_linux_hw_breakpoint): New data type.
2526 (MAX_BPTS, MAX_WPTS): Define.
2527 (struct arch_process_info, struct arch_lwp_info): New data types.
2528 (arm_linux_get_hwbp_cap): New function.
2529 (arm_linux_get_hw_breakpoint_count): Likewise.
2530 (arm_linux_get_hw_watchpoint_count): Likewise.
2531 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2532 (arm_hwbp_control_initialize): Likewise.
2533 (arm_hwbp_control_is_enabled): Likewise.
2534 (arm_hwbp_control_is_initialized): Likewise.
2535 (arm_hwbp_control_disable): Likewise.
2536 (arm_linux_hw_breakpoint_equal): Likewise.
2537 (arm_linux_hw_point_initialize): Likewise.
2538 (struct update_registers_data): New data structure.
2539 (update_registers_callback: New function.
2540 (arm_insert_point): Likewise.
2541 (arm_remove_point): Likewise.
2542 (arm_stopped_by_watchpoint): Likewise.
2543 (arm_stopped_data_address): Likewise.
2544 (arm_new_process): Likewise.
2545 (arm_new_thread): Likewise.
2546 (arm_prepare_to_resume): Likewise.
2547 (the_low_target): Register arm_insert_point, arm_remove_point,
2548 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2549 arm_new_thread, and arm_prepare_to_resume.
2551 2011-09-15 Stan Shebs <stan@codesourcery.com>
2553 * server.h (struct emit_ops): Add compare-goto fields.
2554 * tracepoint.c (gdb_agent_op_sizes): New table.
2555 (emit_eq_goto): New function.
2556 (emit_ne_goto): New function.
2557 (emit_lt_goto): New function.
2558 (emit_le_goto): New function.
2559 (emit_gt_goto): New function.
2560 (emit_ge_goto): New function.
2561 (is_goto_target): New function.
2562 (compile_bytecodes): Recognize special cases of compare-goto
2563 combinations and call specialized emitters for them.
2564 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2565 (amd64_emit_ne_goto): New function.
2566 (amd64_emit_lt_goto): New function.
2567 (amd64_emit_le_goto): New function.
2568 (amd64_emit_gt_goto): New function.
2569 (amd64_emit_ge_goto): New function.
2570 (amd64_emit_ops): Add the new functions.
2571 (i386_emit_eq_goto): New function.
2572 (i386_emit_ne_goto): New function.
2573 (i386_emit_lt_goto): New function.
2574 (i386_emit_le_goto): New function.
2575 (i386_emit_gt_goto): New function.
2576 (i386_emit_ge_goto): New function.
2577 (i386_emit_ops): Add the new functions.
2579 2011-09-08 Stan Shebs <stan@codesourcery.com>
2581 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2582 (i386_emit_epilogue): Restore %ebx.
2584 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2586 * server.c (step_thread): Remove definition.
2587 (process_serial_event): Don't handle Hs.
2588 * server.h (step_thread): Remove declaration.
2589 * target.c (set_desired_inferior): Remove use of step_thread.
2591 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2593 * linux-low.c: Include linux-procfs.h.
2594 (linux_attach_lwp_1): Update comments.
2595 (linux_attach): Scan for existing threads when attaching to a
2596 process that is the tgid.
2597 * Makefile.in: Update dependencies.
2599 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2601 * configure.srv: Add linux-procfs.o dependencies.
2603 2011-08-14 Yao Qi <yao@codesourcery.com>
2605 * target.h (struct target_ops): Fix indent.
2606 * win32-low.c (win32_target_ops): Fix comment.
2608 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2609 Yao Qi <yao@codesourcery.com>
2611 * Makefile.in (clean): Remove tic6x-*.c files.
2612 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2613 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2614 (tic6x-c64xp-linux.c): Likewise.
2615 * configure.srv: Add support for tic6x-*-uclinux.
2616 * linux-tic6x-low.c: New.
2617 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2619 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2620 Yao Qi <yao@codesourcery.com>
2622 * target.h (struct target_ops): Add read_loadmap.
2623 * linux-low.c (struct target_loadseg): New type.
2624 (struct target_loadmap): New type.
2625 (linux_read_loadmap): New function.
2626 (linux_target_ops): Add linux_read_loadmap.
2627 * server.c (handle_query): Support qXfer:fdpic:read packet.
2628 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2631 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2633 * win32-low.c: Include <stdint.h>.
2635 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2637 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2638 to the inferior here.
2639 (i386_remove_aligned_watchpoint): Ditto.
2640 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2641 fit part of the watchpoint in the debug registers.
2642 (i386_update_inferior_debug_regs): New.
2643 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2644 registers, and only update the inferior on success.
2645 (i386_low_remove_watchpoint): Ditto.
2647 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2649 * linux-low.c (compare_ints, unique, list_threads, show_process,
2650 linux_core_of_thread): Delete.
2651 (linux_target_ops): Change linux_core_of_thread to
2652 linux_common_core_of_thread.
2653 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2654 * utils.c (malloc_failure): Change type of argument.
2655 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2656 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2657 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2658 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2659 (IPA_OBJS): Add common-utils-ipa.o.
2660 (ptid_h, linux_osdata_h): New macros.
2661 (server_h): Add common/common-utils.h, common/xml-utils.h,
2662 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2664 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2665 ptid.o, buffer.o): New rules.
2666 (linux-low.o): Add common/linux-osdata.h as a dependency.
2667 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2668 * configure.ac: Add AC_HEADER_DIRENT check.
2669 * config.in: Regenerate.
2670 * configure: Regenerate.
2671 * remote-utils.c (xml_escape_text): Delete.
2672 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2673 buffer_xml_printf): Move to common/buffer.c.
2674 * server.c (main): Remove call to initialize_inferiors.
2675 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2676 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2677 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2678 internal_error, gdb_assert, gdb_assert_fail): Delete.
2679 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2680 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2682 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2683 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2684 initialize_inferiors): Delete.
2686 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2688 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2691 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2693 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2695 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2697 2011-05-26 Yao Qi <yao@codesourcery.com>
2699 * Makefile.in (thread-db.o): Track dependence to
2700 common/gdb_thread_db.h.
2701 * thread-db.c: include gdb_thread_db.h from right place.
2703 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2705 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2706 __FILE__ and __LINE__ to internal_error.
2708 2011-05-13 Doug Evans <dje@google.com>
2710 * thread-db.c (try_thread_db_load_from_sdir): New function.
2711 (try_thread_db_load_from_dir): New function.
2712 (thread_db_load_search): Handle $sdir, ignore $pdir.
2713 Remove trying of system directories if search of
2714 libthread-db-search-path fails, that is now done via $sdir.
2716 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2718 * server.c (handle_query): Add EnableDisableTracepoints to the list
2719 of supported features.
2720 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2722 (cmd_qtenable_disable): New.
2723 (cmd_qtstart): Install tracepoints even if disabled.
2724 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2725 receiving a QTEnable or QTDisable packet.
2726 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2727 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2729 (gdb_probe): Skip data collection if static tracepoint is disabled.
2731 2011-05-10 Doug Evans <dje@google.com>
2733 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2735 2011-05-04 Doug Evans <dje@google.com>
2737 * linux-low.c (linux_join): Skip process lookup.
2738 * spu-low.c (spu_join): Ditto.
2739 * server.c (join_inferiors_callback): Delete.
2740 (process_serial_event): For 'D' packet (detach) call join_inferior
2743 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2745 * README: Don't mention xscale*-*-linux*.
2746 * configure.srv (xscale*-*-linux*): Don't handle target.
2748 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2750 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2752 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2753 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2754 (i386_emit_void_call_2): Likewise.
2756 2011-04-26 Yao Qi <yao@codesourcery.com>
2758 * linux-low.c: Move common macros to linux-ptrace.h.
2759 Include linux-ptrace.h.
2760 * Makefile.in (linux_ptrace_h): New.
2761 (linux-low.o): Depends on linux-ptrace.h.
2763 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2765 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2766 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2767 (remote_prepare): New function with most of the TCP code from ...
2768 (remote_open): ... here. Detect PORT here unconditionally. Move also
2769 setting transport_is_reliable.
2770 * server.c (run_once): New variable.
2771 (gdbserver_usage): Document it.
2772 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2773 the first run if RUN_ONCE.
2774 * server.h (run_once, remote_prepare): New declarations.
2776 2011-04-19 Tom Tromey <tromey@redhat.com>
2778 * win32-low.c (handle_load_dll): Remove duplicate "the".
2780 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2782 Remove support for old Cygwin 1.5 versions.
2783 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2784 function to avoid warning.
2785 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2788 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2790 * gdbserver/server.h (Macro _): Define it if not available.
2792 2011-03-14 Michael Snyder <msnyder@vmware.com>
2794 * hostio.c (handle_close): Remove unnecessary null test.
2796 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2798 * Makefile.in (maintainer-clean realclean distclean): Remove
2799 "make ... subdir_do" command.
2801 2011-03-10 Michael Snyder <msnyder@vmware.com>
2803 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2805 * server.c (handle_v_run): Free alloced buffer on early return.
2807 2011-03-09 Yao Qi <yao@codesourcery.com>
2810 2011-03-04 Yao Qi <yao@codesourcery.com>
2812 * Makefile.in: Remove GNU make feature --directory.
2814 2011-03-05 Yao Qi <yao@codesourcery.com>
2816 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2817 (subdir_do): New make target. Copied from gdb/Makefile.
2818 (maintainer-clean, realclean, distclean, clean): Call corresponding
2819 make targets in common/Makefile.
2821 2011-02-11 Yao Qi <yao@codesourcery.com>
2823 * configure.ac: Call AC_PROG_RANLIB.
2824 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2825 * configure: Regenerate.
2827 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2829 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2831 2011-03-06 Yao Qi <yao@codesourcery.com>
2833 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2835 2011-03-05 Yao Qi <yao@codesourcery.com>
2837 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2838 (subdir_do): New make target. Copied from gdb/Makefile.
2839 (maintainer-clean, realclean, distclean, clean): Call corresponding
2840 make targets in common/Makefile.
2842 2011-03-04 Yao Qi <yao@codesourcery.com>
2844 * Makefile.in: Remove GNU make feature --directory.
2846 2011-03-04 Michael Snyder <msnyder@vmware.com>
2848 * server.c (queue_stop_reply): Call xmalloc not malloc.
2850 2011-03-02 Michael Snyder <msnyder@vmware.com>
2852 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2854 2011-02-28 Michael Snyder <msnyder@vmware.com>
2856 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2857 (cmd_qtframe): Ditto.
2858 (cmd_qtbuffer): Ditto.
2859 (cmd_bigqtbuffer): Ditto.
2861 * utils.c (decimal2str): Initialize 'width' to nine, then
2864 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2866 * hostio.c (require_data): Free *data, not data.
2868 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2870 * hostio.c (require_data): Use free, not xfree.
2872 2011-02-27 Michael Snyder <msnyder@vmware.com>
2874 * server.c (handle_query): Discard unused value.
2876 * hostio.c (require_data): Free malloc memory before returning
2879 2011-02-26 Michael Snyder <msnyder@vmware.com>
2881 * linux-low.c (list_threads): Call closedir for dirent.
2883 2011-02-27 Michael Snyder <msnyder@vmware.com>
2885 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2886 a case statement falls through.
2888 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2890 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2893 2011-02-26 Michael Snyder <msnyder@vmware.com>
2895 * utils.c (decimal2str): Eliminate dead code and dead param.
2896 (pulongest): Drop dead param from call to decimal2str.
2899 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2901 Revert the following patch (not approved yet):
2902 2011-02-21 Hui Zhu <teawater@gmail.com>
2903 * tracepoint.c (tp_printf): New function.
2904 (eval_agent_expr): Handle gdb_agent_op_printf.
2906 2011-02-21 Hui Zhu <teawater@gmail.com>
2908 * tracepoint.c (tp_printf): New function.
2909 (eval_agent_expr): Handle gdb_agent_op_printf.
2911 2011-02-18 Tom Tromey <tromey@redhat.com>
2913 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2914 (tracepoint.o): Likewise.
2915 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2916 (gdb_agent_op_names): Likewise.
2918 2011-02-18 Tom Tromey <tromey@redhat.com>
2920 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2921 gdb_agent_op_rot>: New constants.
2922 (gdb_agent_op_names): Add pick and roll.
2923 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2926 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2928 * aclocal.m4: Regenerated with aclocal-1.11.1.
2930 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2932 * server.c (handle_qxfer_traceframe_info): New.
2933 (qxfer_packets): Register "traceframe-info".
2934 (handle_query): Report support for qXfer:traceframe-info:read+.
2935 * tracepoint.c (match_blocktype): New.
2936 (traceframe_find_block_type): Rename to ...
2937 (traceframe_walk_blocks): ... this. Add callback filter argument,
2939 (traceframe_find_block_type): New, reimplemented on top of
2940 traceframe_walk_blocks.
2941 (build_traceframe_info_xml): New.
2942 (traceframe_read_info): New.
2943 * server.h (traceframe_read_info): Declare.
2945 2011-02-11 Yao Qi <yao@codesourcery.com>
2947 * configure.ac: Call AC_PROG_RANLIB.
2948 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2949 * configure: Regenerate.
2951 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2953 * server.c (gdb_read_memory): Change return semantics to allow
2955 (handle_search_memory_1): Adjust.
2956 (process_serial_event) <'m' packet>: Handle partial transfers.
2957 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2959 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2961 * regcache.c (init_register_cache): Initialize
2962 regcache->register_status.
2963 (free_register_cache): Release regcache->register_status.
2964 (regcache_cpy): Copy register_status.
2965 (registers_to_string): Print 'x's for unavailable registers.
2966 (supply_register): Mark the register's status valid or
2967 unavailable, depending on whether a buffer was passed in or not.
2968 (supply_register_zeroed): New.
2969 (supply_regblock): Mark the registers' status valid or
2970 unavailable, depending on whether a buffer was passed in or not.
2971 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2972 (struct regcache): New `register_status' field.
2973 (supply_register_zeroed): Declare.
2974 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2975 supply_register_zeroed, rather than passing a NULL buffer to
2977 * tracepoint.c (fetch_traceframe_registers): Update comment.
2979 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2981 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2984 2011-01-25 Pedro Alves <pedro@codesourcery.com>
2986 * server.h (decode_xfer_write): Change prototype.
2987 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2988 and don't extract the annex here.
2989 * server.c (decode_xfer_read): Remove `annex' parameter,
2990 and don't extract the annex here.
2992 (struct qxfer): New.
2993 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2994 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2995 (handle_qxfer_statictrace): New functions, abstracted out from
2996 handle_query, and made to use the struct qxfer interface.
2997 (handle_threads_qxfer_proper): Rename to ...
2998 (handle_qxfer_threads_proper): ... this.
2999 (handle_threads_qxfer): Rename to ...
3000 (handle_qxfer_threads): ... this. Adjust.
3001 (qxfer_packets): New array.
3002 (handle_qxfer): New function.
3003 (handle_query): Use handle_qxfer.
3005 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3007 * gdbreplay.c: Shorten lines of >= 80 columns.
3008 * linux-low.c: Ditto.
3009 * linux-ppc-low.c: Ditto.
3010 * linux-s390-low.c: Ditto.
3011 * linux-sparc-low.c: Ditto.
3012 * linux-x86-low.c: Ditto.
3013 * linux-xtensa-low.c: Ditto.
3014 * mem-break.c: Ditto.
3016 * regcache.h: Ditto.
3017 * remote-utils.c: Ditto.
3020 * thread-db.c: Ditto.
3021 * tracepoint.c: Ditto.
3023 * win32-low.h: Ditto.
3025 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3027 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3030 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3032 * server.c (gdbserver_version): Update copyright year in version
3034 * gdbreplay.c (gdbreplay_version): Ditto.
3036 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3038 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3039 * linux-bfin-low.c: New file.
3040 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3041 PT_DATA_ADDR for BFIN targets.
3042 * Makefile.in (SFILES): Add linux-bfin-low.c.
3043 (clean): Remove reg-bfin.c.
3044 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3045 * README: Mention supported Blackfin targets.
3047 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3049 * .gitignore: New file.
3051 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3053 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3055 2010-10-22 Jie Zhang <jie@codesourcery.com>
3057 * Makefile.in: Add FLAGS_TO_PASS variable.
3058 (install): Remove dependency of install-only and recursively
3059 invoke make for install-only.
3061 2010-10-04 Doug Evans <dje@google.com>
3063 * Makefile.in (uninstall): Use $(DESTDIR).
3065 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3069 * linux-x86-low.c (compat_siginfo_from_siginfo)
3070 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3071 si_code is < 0. Check for si_code == SI_TIMER before checking for
3074 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3076 * lynx-i386-low.c: New file.
3077 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3079 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3081 * lynx-low.c (ptrace_request_to_str): Remove handling for
3082 request values that have been removed in LynxOS 5.x.
3084 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3086 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3089 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3091 * configure.ac: Add --enable-inprocess-agent option.
3092 * configure: Rebuilt.
3094 2010-09-06 Yao Qi <yao@codesourcery.com>
3096 * linux-low.c (linux_kill): Remove unused variable.
3097 (linux_stabilize_threads): Likewise.
3098 * server.c (start_inferior): Likewise.
3099 (queue_stop_reply_callback): Likewise.
3100 * tracepoint.c (do_action_at_tracepoint): Likewise.
3102 2010-09-06 Yao Qi <yao@codesourcery.com>
3104 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3107 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3109 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3111 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3113 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3116 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3118 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3119 gdbserver/lynx-ppc-low.c: New files.
3120 * Makefile.in (lynx_low_h): New variable.
3121 (lynx-low.o, lynx-ppc-low.o): New rules.
3122 * configure.ac: On LynxOS, link with -lnetinet.
3123 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3124 * configure: regenerate.
3126 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3128 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3129 * configure.ac: Add check for vasprintf and vsnprintf.
3130 * configure, config.in: Regenerate.
3131 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3133 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3135 * gdbreplay.c: Move include of alloca.h up, next to include of
3137 * server.h: Add include of malloc.h.
3138 * mem-break.c: Remove include of malloc.h.
3139 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3141 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3143 * Makefile.in (memmem.o): Build with -Wno-error.
3145 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3147 * utils.c (xsnprintf): Make non-static.
3148 * server.h: Add xsnprintf declaration.
3149 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3150 replace calls to snprintf by calls to xsnprintf throughout.
3152 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3154 * configure.ac: Add configure check for alloca.
3155 * configure, config.in: Regenerate.
3156 * server.h: Include alloca.h if it exists.
3157 * gdbreplay.c: Include alloca.h if it exists.
3159 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3161 * linux-low.c (__SIGRTMIN): Define if not already defined.
3162 (linux_create_inferior): Check for __ANDROID__ rather than
3164 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3165 are already deferred.
3166 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3167 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3168 stopped and already has a pending signal to report.
3169 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3170 a pending signal to report or is moving out of a jump pad.
3171 (linux_init_signals): Check for __ANDROID__ rather than
3174 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3176 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3177 debug_threads check. Avoid a linear search when not doing debug
3180 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3182 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3183 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3184 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3185 (process_event): Change local fd's type to gdb_fildes_t.
3186 (create_file_handler): Adjust prototype.
3187 (delete_file_handler): Adjust prototype.
3188 (handle_file_event): Adjust prototype. Use pfildes.
3189 (create_file_event): Adjsut prototype.
3190 * remote-utils.c (remote_desc, listen_desc): Change type to
3192 * server.h: New gdb_fildes_t typedef.
3193 [USE_WIN32API]: Include winsock2.h.
3194 (delete_file_handler, add_file_handler): Adjust prototypes.
3196 * utils.c (pfildes): New.
3198 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3200 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3201 * configure: Regenerate.
3203 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3205 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3206 (linux_done_accessing_memory): ... this.
3207 (linux_target_ops): Adjust.
3208 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3209 * nto-low.c (nto_target_ops): Adjust comment.
3210 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3211 * spu-low.c (spu_target_ops): Adjust comment.
3212 * target.h (target_ops): Rename unprepare_to_access_memory field
3213 to done_accessing_memory.
3214 (unprepare_to_access_memory): Rename to ...
3215 (done_accessing_memory): ... this.
3217 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3219 * linux-low.c (linux_prepare_to_access_memory): New.
3220 (linux_unprepare_to_access_memory): New.
3221 (linux_target_ops): Install them.
3222 * server.c (read_memory): Rename to ...
3223 (gdb_read_memory): ... this. Use
3224 prepare_to_access_memory/prepare_to_access_memory.
3225 (write_memory): Rename to ...
3226 (gdb_write_memory): ... this. Use
3227 prepare_to_access_memory/prepare_to_access_memory.
3228 (handle_search_memory_1): Adjust.
3229 (process_serial_event): Adjust.
3230 * target.h (struct target_ops): New fields
3231 prepare_to_access_memory and unprepare_to_access_memory.
3232 (prepare_to_access_memory, unprepare_to_access_memory): New.
3233 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3234 prepare_to_access_memory/prepare_to_access_memory.
3235 * nto-low.c (nto_target_ops): Adjust.
3236 * spu-low.c (spu_target_ops): Adjust.
3237 * win32-low.c (win32_target_ops): Adjust.
3239 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3241 * Makefile.in (WARN_CFLAGS): Get it from configure.
3242 (WERROR_CFLAGS): New.
3243 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3244 * configure.ac: Introduce --enable-werror, which adds -Werror to
3245 the compiler command line. Enabled by default. Disable with
3246 --disable-werror. Add -Wdeclaration-after-statement
3247 Wpointer-arith and -Wformat-nonliteral to warning flags.
3248 * configure: Regenerate.
3250 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3252 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3254 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3256 * gdbreplay.c (remote_error): New.
3258 (expect): Use gdbchar. Check for error reading from GDB.
3259 Clarify sync error output.
3260 (play): Check for errors writing to GDB.
3261 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3262 * remote-utils.c (getpkt): Check for errors writing to the remote
3265 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3267 * linux-low.c (linux_wait_1): Move non-debugging code out of
3268 `debug_threads' control.
3270 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3272 * linux-low.c (linux_wait_1): Don't set last_status here.
3273 * server.c (push_event, queue_stop_reply_callback): Assert we're
3274 not pushing a TARGET_WAITKIND_IGNORE event.
3275 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3276 (myresume, handle_target_event): Set the thread's last_resume_kind
3277 and last_status from the target returned status.
3279 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3283 * linux-x86-low.c (update_debug_registers_callback): New.
3284 (i386_dr_low_set_addr): Use it.
3285 (i386_dr_low_get_addr): New.
3286 (i386_dr_low_set_control): Use update_debug_registers_callback.
3287 (i386_dr_low_get_control): New.
3288 (i386_dr_low_get_status): Adjust.
3289 * linux-low.c (linux_stop_lwp): New.
3290 * linux-low.h (linux_stop_lwp): Declare.
3292 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3293 argument instead of a i386_debug_reg_state.
3294 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3295 a i386_debug_reg_state.
3296 (i386_insert_aligned_watchpoint): Adjust.
3297 (i386_remove_aligned_watchpoint): Adjust.
3298 (i386_low_stopped_data_address): Read the debug registers from the
3299 inferior instead of from the mirrors.
3300 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3301 (i386_dr_low_get_addr): Declare.
3302 (i386_dr_low_get_control): Declare.
3303 (i386_dr_low_get_status): Change prototype.
3305 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3306 (i386_dr_low_get_addr): New.
3307 (i386_dr_low_get_control): New.
3308 (i386_dr_low_get_status): Adjust prototype. Return
3310 (i386_initial_stuff): Clear dr_status_mirror and
3312 (i386_get_thread_context): Adjust.
3313 (i386_set_thread_context): Adjust.
3314 (i386_thread_added): Adjust.
3316 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3318 * linux-low.h (linux_thread_area): Delete declaration.
3320 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3322 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3323 after its termination.
3325 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3327 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3328 (gdb_wants_all_stopped): Delete.
3329 (linux_wait_1): Don't call them.
3330 * server.c (handle_v_cont): Tag all threads as want-stopped.
3331 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3332 stopped as "client-wants-stopped".
3334 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3336 * Makefile.in (signals_h): New.
3337 (server_h): Depend on it.
3338 (server.o): Don't depend on $(signals_def).
3339 (signals.o): Depend on $(signals_def).
3341 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3343 * Makefile.in (signals_def): New.
3344 (server_h): Append include/gdb/signals.h and signals_def.
3345 (server.o): Append signals_def.
3347 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3349 * server.c (handle_target_event): Use target_signal_to_host for
3350 resume_info.sig initialization.
3351 * target.h (struct thread_resume) <sig>: New comment.
3353 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3355 * server.c (handle_query): strcpy() the returned string from paddress()
3356 instead of sprintf().
3357 * utils.c (paddress): Return phex_nz().
3359 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3361 * server.c (handle_v_cont): Call mourn_inferior if process
3363 (myresume): Likewise.
3365 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3367 Static tracepoints, and integration with UST.
3369 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3370 * mem-break.c (uninsert_all_breakpoints)
3371 (reinsert_all_breakpoints): New.
3372 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3373 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3374 (gdb_agent_ust_loaded, helper_thread_id)
3375 (gdb_agent_helper_thread_id): New macros.
3376 (struct ipa_sym_addresses): Add addr_ust_loaded,
3377 addr_helper_thread_id, addr_cmd_buf.
3378 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3379 (in_process_agent_loaded_ust): New.
3380 (write_e_ust_not_loaded): New.
3381 (maybe_write_ipa_ust_not_loaded): New.
3382 (struct collect_static_trace_data_action): New.
3383 (enum tracepoint_type) <static_tracepoint>: New.
3384 (struct tracepoint) <handle>: Mention static tracepoints.
3385 (struct static_tracepoint_ctx): New.
3386 (CMD_BUF_SIZE): New.
3387 (add_tracepoint_action): Handle static tracepoint actions.
3388 (unprobe_marker_at): New.
3389 (clear_installed_tracepoints): Handle static tracepoints.
3390 (cmd_qtdp): Handle static tracepoints.
3391 (probe_marker_at): New.
3392 (cmd_qtstart): Handle static tracepoints.
3393 (response_tracepoint): Handle static tracepoints.
3394 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3395 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3396 (get_context_regcache): Handle static tracepoints.
3397 (do_action_at_tracepoint): Handle static tracepoint actions.
3398 (traceframe_find_block_type): Handle static trace data blocks.
3399 (traceframe_read_sdata): New.
3400 (download_tracepoints): Download static tracepoint actions.
3401 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3402 (GDB_PROBE_NAME): New.
3407 (ust_marker_to_static_tracepoint): New.
3409 (collect_ust_data_at_tracepoint): New.
3410 (gdb_ust_probe): New.
3411 (UNIX_PATH_MAX, SOCK_DIR): New.
3412 (gdb_ust_connect_sync_socket): New.
3413 (resume_thread, stop_thread): New.
3414 (run_inferior_command): New.
3415 (init_named_socket): New.
3416 (gdb_ust_socket_init): New.
3417 (cstr_to_hexstr): New.
3419 (first_marker, next_marker): New.
3420 (response_ust_marker): New.
3421 (cmd_qtfstm, cmd_qtsstm): New.
3422 (unprobe_marker_at, probe_marker_at): New.
3423 (cmd_qtstmat, gdb_ust_thread): New.
3424 (gdb_ust_init): New.
3425 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3426 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3428 (x86_64_st_collect_regmap): New.
3429 (X86_64_NUM_ST_COLLECT_GREGS): New.
3430 (AMD64_RIP_REGNUM): New.
3431 (supply_static_tracepoint_registers): New.
3432 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3434 (i386_st_collect_regmap): New.
3435 (i386_NUM_ST_COLLECT_GREGS): New.
3436 (supply_static_tracepoint_registers): New.
3437 * server.c (handle_query): Handle qXfer:statictrace:read.
3438 <qSupported>: Report support for StaticTracepoints, and
3439 qXfer:statictrace:read features.
3440 * server.h (traceframe_read_sdata)
3441 (supply_static_tracepoint_registers): Declare.
3442 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3443 (unpack_varlen_hex): Include in IPA build.
3444 * Makefile.in (ustlibs, ustinc): New.
3445 (IPA_OBJS): Add remote-utils-ipa.o.
3446 ($(IPA_LIB)): Link -ldl and -lpthread.
3448 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3449 * config.in, configure: Regenerate.
3451 2010-06-20 Ian Lance Taylor <iant@google.com>
3452 Pedro Alves <pedro@codesourcery.com>
3454 * linux-x86-low.c (always_true): Delete.
3455 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3456 trying to fool the compiler with always_true.
3458 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3460 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3461 conditions in gdbserver.
3463 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3465 * spu-low.c (spu_read_memory): Wrap around local store limit.
3466 (spu_write_memory): Likewise.
3468 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3470 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3471 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3473 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3475 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3476 uses with LONGEST uses.
3478 2010-06-14 Stan Shebs <stan@codesourcery.com>
3479 Pedro Alves <pedro@codesourcery.com>
3483 * linux-x86-low.c: Include limits.h.
3488 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3489 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3490 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3491 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3492 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3493 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3494 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3495 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3496 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3497 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3498 (amd64_emit_void_call_2): New.
3499 (amd64_emit_ops): New.
3500 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3501 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3502 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3503 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3504 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3505 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3506 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3507 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3508 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3509 (i386_emit_stack_adjust, i386_emit_int_call_1)
3510 (i386_emit_void_call_2): New.
3511 (i386_emit_ops): New.
3512 (x86_emit_ops): New.
3513 (the_low_target): Install x86_emit_ops.
3514 * server.h (struct emit_ops): New.
3515 (get_raw_reg_func_addr): Declare.
3516 (current_insn_ptr, emit_error): Declare.
3517 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3518 (set_trace_state_variable_value): New defines.
3519 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3520 addr_get_trace_state_variable_value and
3521 addr_set_trace_state_variable_value.
3522 (symbol_list): New fields for get_raw_reg,
3523 get_trace_state_variable_value and set_trace_state_variable_value.
3524 (condfn): New typedef.
3525 (struct tracepoint): New field `compiled_cond'.
3526 (do_action_at_tracepoint): Clear compiled_cond.
3527 (get_trace_state_variable_value, set_trace_state_variable_value):
3529 (condition_true_at_tracepoint): If there's a compiled condition,
3531 (current_insn_ptr, emit_error): New globals.
3532 (struct bytecode_address): New.
3533 (get_raw_reg_func_addr): New.
3534 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3535 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3536 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3537 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3538 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3539 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3540 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3541 (compile_tracepoint_condition, compile_bytecodes): New.
3542 * target.h (emit_ops): Forward declare.
3543 (struct target_ops): New field emit_ops.
3544 (target_emit_ops): New.
3545 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3546 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3547 * linux-low.c (linux_emit_ops): New.
3548 (linux_target_ops): Install it.
3549 * linux-low.h (struct linux_target_ops): New field emit_ops.
3551 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3553 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3554 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3556 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3557 Stan Shebs <stan@codesourcery.com>
3559 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3560 (all): Depend on $(extra_libraries).
3561 (install-only): Install the IPA.
3562 (IPA_OBJS, IPA_LIB): New.
3563 (clean): Remove the IPA lib.
3564 (IPAGENT_CFLAGS): New.
3565 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3566 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3567 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3568 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3569 * configure.ac: Check for atomic builtins support in the compiler.
3570 (IPA_DEPFILES, extra_libraries): Define.
3571 * configure.srv (ipa_obj): Add description.
3572 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3573 (i[34567]86-*-linux*): Set ipa_obj.
3574 (x86_64-*-linux*): Set ipa_obj.
3575 * linux-low.c (stabilizing_threads): New.
3576 (supports_fast_tracepoints): New.
3577 (linux_detach): Stabilize threads before detaching.
3578 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3579 the lwp is either not stabilizing, or is moving out of a jump pad.
3580 (linux_fast_tracepoint_collecting): New.
3581 (maybe_move_out_of_jump_pad): New.
3582 (enqueue_one_deferred_signal): New.
3583 (dequeue_one_deferred_signal): New.
3584 (linux_wait_for_event_1): If moving out of a jump pad, defer
3585 pending signals to later.
3586 (linux_stabilize_threads): New.
3587 (linux_wait_1): Check if threads need moving out of jump pads, and
3589 (stuck_in_jump_pad_callback): New.
3590 (move_out_of_jump_pad_callback): New.
3592 (linux_resume_one_lwp): Handle moving out of jump pads.
3593 (linux_set_resume_request): Dequeue deferred signals.
3594 (need_step_over_p): Also step over fast tracepoint jumps.
3595 (start_step_over): Also uninsert fast tracepoint jumps.
3596 (finish_step_over): Also reinsert fast tracepoint jumps.
3597 (linux_install_fast_tracepoint_jump): New.
3598 (linux_target_ops): Install linux_stabilize_threads and
3599 linux_install_fast_tracepoint_jump_pad.
3600 * linux-low.h (linux_target_ops) <get_thread_area,
3601 install_fast_tracepoint_jump_pad>: New fields.
3602 (struct lwp_info) <collecting_fast_tracepoint,
3603 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3604 (linux_get_thread_area): Declare.
3605 * linux-x86-low.c (jump_insn): New.
3606 (x86_get_thread_area): New.
3607 (append_insns): New.
3609 (amd64_install_fast_tracepoint_jump_pad): New.
3610 (i386_install_fast_tracepoint_jump_pad): New.
3611 (x86_install_fast_tracepoint_jump_pad): New.
3612 (the_low_target): Install x86_get_thread_area and
3613 x86_install_fast_tracepoint_jump_pad.
3614 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3615 (struct fast_tracepoint_jump): New.
3616 (fast_tracepoint_jump_insn): New.
3617 (fast_tracepoint_jump_shadow): New.
3618 (find_fast_tracepoint_jump_at): New.
3619 (fast_tracepoint_jump_here): New.
3620 (delete_fast_tracepoint_jump): New.
3621 (set_fast_tracepoint_jump): New.
3622 (uninsert_fast_tracepoint_jumps_at): New.
3623 (reinsert_fast_tracepoint_jumps_at): New.
3624 (set_breakpoint_at): Use write_inferior_memory.
3625 (uninsert_raw_breakpoint): Use write_inferior_memory.
3626 (check_mem_read): Mask out fast tracepoint jumps.
3627 (check_mem_write): Mask out fast tracepoint jumps.
3628 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3629 (set_fast_tracepoint_jump): Declare.
3630 (delete_fast_tracepoint_jump)
3631 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3632 (reinsert_fast_tracepoint_jumps_at): Declare.
3633 * regcache.c: Don't compile many functions when building the
3634 in-process agent library.
3635 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3636 the register buffer in the heap.
3637 (free_register_cache): If the register buffer isn't owned by the
3638 regcache, don't free it.
3639 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3640 pre-existing register caches.
3641 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3643 (convert_ascii_to_int): : Constify `from' parameter type.
3644 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3645 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3646 the needed buffer in-place.
3647 (relocate_instruction): New.
3648 * server.c (handle_query) <qSymbols>: If the target supports
3649 tracepoints, give it a chance of looking up symbols. Report
3650 support for fast tracepoints.
3651 (handle_status): Stabilize threads.
3652 (process_serial_event): Adjust.
3653 * server.h (struct fast_tracepoint_jump): Forward declare.
3654 (struct process_info) <fast_tracepoint_jumps>: New field.
3655 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3656 (decode_X_packet, decode_M_packet): Adjust.
3657 (relocate_instruction): Declare.
3658 (in_process_agent_loaded): Declare.
3659 (tracepoint_look_up_symbols): Declare.
3660 (struct fast_tpoint_collect_status): Declare.
3661 (fast_tracepoint_collecting): Declare.
3662 (force_unlock_trace_buffer): Declare.
3663 (handle_tracepoint_bkpts): Declare.
3664 (initialize_low_tracepoint)
3665 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3666 * target.h (struct target_ops) <stabilize_threads,
3667 install_fast_tracepoint_jump_pad>: New fields.
3668 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3669 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3670 [HAVE_STDINT_H]: Include stdint.h.
3671 (trace_debug_1): Rename to ...
3672 (trace_vdebug): ... this.
3673 (trace_debug): Rename to ...
3674 (trace_debug_1): ... this. Add `level' parameter.
3676 (ATTR_USED, ATTR_NOINLINE): New.
3677 (IP_AGENT_EXPORT): New.
3678 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3679 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3680 (about_to_request_buffer_space, trace_buffer_is_full)
3681 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3682 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3683 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3684 (traceframe_write_count, traceframes_created)
3685 (trace_state_variables)
3686 New renaming defines.
3687 (struct ipa_sym_addresses): New.
3688 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3690 (ipa_sym_addrs): New.
3691 (all_tracepoint_symbols_looked_up): New.
3692 (in_process_agent_loaded): New.
3693 (write_e_ipa_not_loaded): New.
3694 (maybe_write_ipa_not_loaded): New.
3695 (tracepoint_look_up_symbols): New.
3696 (debug_threads) [IN_PROCESS_AGENT]: New.
3697 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3698 (UNKNOWN_SIDE_EFFECTS): New.
3699 (stop_tracing): New.
3700 (flush_trace_buffer): New.
3701 (stop_tracing_bkpt): New.
3702 (flush_trace_buffer_bkpt): New.
3703 (read_inferior_integer): New.
3704 (read_inferior_uinteger): New.
3705 (read_inferior_data_pointer): New.
3706 (write_inferior_data_pointer): New.
3707 (write_inferior_integer): New.
3708 (write_inferior_uinteger): New.
3709 (struct collect_static_trace_data_action): Delete.
3710 (enum tracepoint_type): New.
3711 (struct tracepoint) <type>: New field `type'.
3712 <actions_str, step_actions, step_actions_str>: Only include in
3714 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3715 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3716 (tracepoints): Use IP_AGENT_EXPORT.
3717 (last_tracepoint): Don't include in the IPA.
3718 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3719 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3720 (alloced_trace_state_variables): New.
3721 (trace_state_variables): Use IP_AGENT_EXPORT.
3722 (traceframe_t): Delete unused variable.
3723 (circular_trace_buffer): Don't include in the IPA.
3724 (trace_buffer_start): Delete.
3725 (struct trace_buffer_control): New.
3726 (trace_buffer_free): Delete.
3727 (struct ipa_trace_buffer_control): New.
3728 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3729 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3731 (trace_buffer_ctrl): New.
3732 (TRACE_BUFFER_CTRL_CURR): New.
3733 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3734 Reimplement as macros.
3735 (trace_buffer_wrap): Delete.
3736 (traceframe_write_count, traceframe_read_count)
3737 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3738 (struct tracepoint_hit_ctx) <type>: New field.
3739 (struct fast_tracepoint_ctx): New.
3740 (memory_barrier): New.
3742 (record_tracepoint_error): Update atomically in the IPA.
3743 (clear_inferior_trace_buffer): New.
3744 (about_to_request_buffer_space): New.
3745 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3746 updating the same buffer.
3747 (add_tracepoint): Default the tracepoint's type to trap
3748 tracepoint, and orig_size to -1.
3749 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3751 (create_trace_state_variable): New parameter `gdb'. Handle it.
3752 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3753 (cmd_qtdp): Handle fast tracepoints.
3755 (max_jump_pad_size): New.
3756 (gdb_jump_pad_head): New.
3757 (get_jump_space_head): New.
3758 (claim_jump_space): New.
3759 (sort_tracepoints): New.
3760 (MAX_JUMP_SIZE): New.
3761 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3763 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3764 support. Upload fast traceframes, and delete internal IPA
3766 (stop_tracing_handler): New.
3767 (flush_trace_buffer_handler): New.
3768 (cmd_qtstop): Upload fast tracepoints.
3769 (response_tracepoint): Handle fast tracepoints.
3770 (tracepoint_finished_step): Upload fast traceframes. Set the
3771 tracepoint hit context's tracepoint type.
3772 (handle_tracepoint_bkpts): New.
3773 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3774 type. Add comment about fast tracepoints.
3775 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3776 non-existing action_str field.
3777 (get_context_regcache): Handle fast tracepoints.
3778 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3780 (fast_tracepoint_from_jump_pad_address): New.
3781 (fast_tracepoint_from_ipa_tpoint_address): New.
3782 (collecting_t): New.
3783 (force_unlock_trace_buffer): New.
3784 (fast_tracepoint_collecting): New.
3787 (write_inferior_data_ptr): New.
3788 (target_tp_heap): New.
3789 (target_malloc): New.
3790 (download_agent_expr): New.
3792 (download_tracepoints): New.
3793 (download_trace_state_variables): New.
3794 (upload_fast_traceframes): New.
3795 (IPA_FIRST_TRACEFRAME): New.
3796 (IPA_NEXT_TRACEFRAME_1): New.
3797 (IPA_NEXT_TRACEFRAME): New.
3798 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3799 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3800 (gdb_jump_pad_buffer_end): New.
3801 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3802 (initialize_tracepoint): Adjust.
3803 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3804 buffer. Initialize the low module.
3805 * utils.c (PREFIX, TOOLNAME): New.
3806 (malloc_failure): Use PREFIX.
3807 (error): In the IPA, an error causes an exit.
3808 (fatal, warning): Use PREFIX.
3809 (internal_error): Use TOOLNAME.
3810 (NUMCELLS): Increase to 10.
3811 * configure, config.in: Regenerate.
3813 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3815 * server.c (handle_query) <qSupported>: Do two passes over the
3816 qSupported string to avoid nesting strtok.
3818 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3820 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3822 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3824 * configure: Regenerate.
3825 * proc-service.list: New.
3827 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3829 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3832 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3834 * gdbreplay.c (remote_open): Check error return from socket() call by
3835 its equality to -1 not by it being negative.
3836 * remote-utils.c (remote_open): Likewise.
3838 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3840 * config.h: Regenerate.
3842 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3844 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3845 doesn't provide PTRACE_GET_THREAD_AREA.
3847 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3849 * linux-m68k-low.c: Include <asm/ptrace.h>
3850 (ps_get_thread_area): Implement.
3852 2010-05-03 Doug Evans <dje@google.com>
3854 * event-loop.c (struct callback_event): New struct.
3855 (callback_list): New global.
3856 (append_callback_event, delete_callback_event): New functions.
3857 (process_callback): New function.
3858 (start_event_loop): Call it.
3859 * remote-utils.c (NOT_SCHEDULED): Define.
3860 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3861 moved out of readchar.
3862 (readchar): Rewrite. Call reschedule before returning.
3863 (reset_readchar): New function.
3864 (remote_close): Call it.
3865 (process_remaining, reschedule): New functions.
3866 * server.h (callback_handler_func): New typedef.
3867 (append_callback_event, delete_callback_event): Declare.
3869 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3871 * proc-service.c (ps_pglobal_lookup): Use
3872 thread_db_look_up_one_symbol.
3873 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3874 parameter. Use it instead of all_symbols_looked_up.
3875 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3877 (all_symbols_looked_up): Don't declare.
3878 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3879 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3881 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3882 Set all_symbols_looked_up here.
3883 (thread_db_look_up_one_symbol): New.
3884 (thread_db_get_tls_address): Adjust.
3885 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3886 thread_db object on the heap, and tentatively set it in the
3888 (thread_db_init): Don't set all_symbols_looked_up here.
3889 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3891 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3893 * linux-low.c (linux_kill, linux_detach): Adjust.
3894 (status_pending_p_callback): Remove redundant statement. Check
3895 for !TARGET_WAITIKIND_IGNORE, instead of
3896 TARGET_WAITKIND_STOPPED.
3897 (handle_tracepoints): Make sure LWP is locked. Adjust.
3898 (linux_wait_for_event_1): Adjust.
3899 (linux_cancel_breakpoints): New.
3900 (unsuspend_one_lwp): New.
3901 (unsuspend_all_lwps): New.
3902 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3903 (send_sigstop_callback): Change return type to int, add new
3904 `except' parameter and handle it.
3905 (suspend_and_send_sigstop_callback): New.
3906 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3907 pass them down. If SUSPEND, also increment the lwp's suspend
3909 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3910 (need_step_over_p): Don't consider suspended LWPs.
3911 (start_step_over): Adjust.
3912 (proceed_one_lwp): Change return type to int, add new `except'
3913 parameter and handle it.
3914 (unsuspend_and_proceed_one_lwp): New.
3915 (proceed_all_lwps): Use find_inferior instead of
3917 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3918 also decrement the suspend count of LWPs. Pass `except' down,
3919 instead of hacking its suspend count.
3920 (linux_pause_all): Add `freeze' parameter. Adjust.
3921 (linux_unpause_all): New.
3922 (linux_target_ops): Install linux_unpause_all.
3923 * server.c (handle_status): Adjust.
3924 * target.h (struct target_ops): New fields `unpause_all' and
3925 `cancel_breakpoints'. Add new parameter to `pause_all'.
3926 (pause_all): Add new `freeze' parameter.
3928 (cancel_breakpoints): New.
3929 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3931 (cmd_qtstart): Pause threads.
3932 (stop_tracing): Pause threads, and cancel breakpoints.
3933 * win32-low.c (win32_target_ops): Adjust.
3935 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3937 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3938 the inferior right away from here...
3939 (linux_wait_1): ... to here, and adjust to check the thread's
3940 last_resume_kind instead of the lwp's step or stop_expected flags.
3942 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3944 * README: Use consistent `GDB' and `GDBserver' spellings.
3946 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3948 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3949 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3950 (linux_detach_one_lwp): Assume the lwp is stopped.
3951 (any_thread_of): Delete.
3952 (linux_detach): Stop all lwps here. Don't blindly delete all
3954 (delete_lwp_callback): New.
3955 (linux_mourn): Delete all lwps of the process that is gone.
3956 (linux_wait_1): Don't delete the last lwp of the process here.
3957 * mem-break.h (mark_breakpoints_out): Declare.
3958 * mem-break.c (mark_breakpoints_out): New.
3959 (free_all_breakpoints): Use it.
3960 * server.c (handle_target_event): If the process is gone, mark
3962 * thread-db.c (struct thread_db) <create_bp>: New field.
3963 (thread_db_enable_reporting): Fix prototype. Store a thread event
3964 breakpoint reference in the thread_db struct.
3965 (thread_db_load_search): Clear the thread_db object.
3966 (try_thread_db_load_1): Ditto.
3967 (switch_to_process): New.
3968 (disable_thread_event_reporting): Use it.
3969 (remove_thread_event_breakpoints): New.
3970 (thread_db_detach, thread_db_mourn): Use it.
3972 2010-05-01 Pedro Alves <pedro@codesourcery.com>
3974 * linux-low.c (linux_enable_event_reporting): New.
3975 (linux_wait_for_event_1, handle_extended_wait): Use it.
3977 2010-04-30 Pedro Alves <pedro@codesourcery.com>
3979 * linux-low.c (linux_kill_one_lwp, linux_kill)
3980 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3981 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3982 SIGSTOP even if the LWP is stopped.
3983 (send_sigstop_callback): New.
3984 (stop_all_lwps): Use send_sigstop_callback instead.
3985 (linux_resume_one_thread): Adjust.
3986 (proceed_one_lwp): Still proceed an LWP that the client has
3987 requested to stop, if we haven't reported it as stopped yet. Make
3988 sure that LWPs the client want stopped, have a pending SIGSTOP.
3990 2010-04-26 Doug Evans <dje@google.com>
3992 * server.c (handle_general_set): Make static.
3994 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3995 Print received char after testing for error/eof instead of before.
3996 (input_interrupt): Tweak comment.
3998 2010-04-23 Doug Evans <dje@google.com>
4000 * server.c (start_inferior): Print inferior argv if --debug.
4002 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4004 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4005 * nto-x86-low.c: Include server.h
4007 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4009 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4010 be consistent with other sources of this directory.
4011 (init_registers_amd64): Correct name of source file of this function
4014 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4016 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4019 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4021 * win32-i386-low.c: Add 64-bit support.
4022 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4023 (init_registers_amd64): Declare.
4024 (mappings): Add 64-bit version of array.
4025 (init_windows_x86): New function.
4026 (the_low_target): Change init_arch field to init_windows_x86.
4028 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4030 * win32-low.c: Adapt to support also 64-bit architecture.
4031 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4032 (get_image_name): Use SIZE_T type for local variable `done'.
4033 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4034 (toolhelp_get_dll_name): Idem.
4035 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4036 Use uintptr_t typecast to avoid warning.
4037 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4038 (handle_exception): Use phex_nz to avoid warning.
4039 (win32_wait): Remove unused local variable `process'.
4041 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4043 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4046 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4048 * configure.ac: Use `ws2_32' library for srv_mingw.
4049 * configure: Regenerate.
4050 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4051 * remote-utils.c: Likewise.
4053 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4055 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4056 if __x86_64__ is defined.
4058 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4060 * configure: Regenerate.
4062 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4064 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4065 * target.h (target_ops): New get_tib_address field.
4066 * win32-low.h (win32_thread_info): Add thread_local_base field.
4067 * win32-low.c (child_add_thread): Add tlb argument.
4068 Set thread_local_base field to TLB.
4069 (get_child_debug_event): Adapt to child_add_thread change.
4070 (win32_get_tib_address): New function.
4071 (win32_target_ops): Set get_tib_address field to
4072 win32_get_tib_address.
4073 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4075 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4077 * linux-low.c (linux_mourn): Also remove the process.
4078 * server.c (handle_target_event): Don't remove the process here.
4079 * nto-low.c (nto_mourn): New.
4080 (nto_target_ops): Install it.
4081 * spu-low.c (spu_mourn): New.
4082 (spu_target_ops): Install it.
4083 * win32-low.c (win32_mourn): New.
4084 (win32_target_ops): Install it.
4086 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4088 * server.h (buffer_xml_printf): Remove redundant `;'.
4090 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4092 * regcache.c (set_register_cache): Invalidate regcaches before
4093 changing the register cache layout.
4094 (regcache_invalidate_one): Allow a NULL regcache.
4095 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4096 regcaches before changing the register cache layout or the target
4099 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4101 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4102 variable warning on Linux/x86-64.
4104 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4106 GDBserver disconnected tracing support.
4108 * linux-low.c (linux_remove_process): Delete.
4109 (add_lwp): Don't set last_resume_kind here.
4110 (linux_kill): Use `mourn'.
4111 (linux_detach): Use `thread_db_detach', and `mourn'.
4113 (linux_attach_lwp_1): Adjust comment.
4114 (linux_attach): last_resume_kind moved the thread_info; adjust.
4115 (status_pending_p_callback): Adjust.
4116 (linux_wait_for_event_1): Adjust.
4117 (count_events_callback, select_singlestep_lwp_callback)
4118 (select_event_lwp_callback, cancel_breakpoints_callback)
4119 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4120 (proceed_one_lwp): Adjust.
4121 (linux_async): Add debug output.
4122 (linux_thread_stopped): New.
4123 (linux_pause_all): New.
4124 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4126 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4127 (thread_db_free): Delete declaration.
4128 (thread_db_detach, thread_db_mourn): Declare.
4129 * thread-db.c (thread_db_init): Use thread_db_mourn.
4130 (thread_db_free): Delete, split in two.
4131 (disable_thread_event_reporting): New.
4132 (thread_db_detach): New.
4133 (thread_db_mourn): New.
4135 * server.h (struct thread_info) <last_resume_kind>: New field.
4136 <attached>: Add comment.
4137 <gdb_detached>: New field.
4138 (handler_func): Change return type to int.
4139 (handle_serial_event, handle_target_event): Ditto.
4140 (gdb_connected): Declare.
4142 (disconnected_tracing): Declare.
4143 (stop_tracing): Declare.
4145 * server.c (handle_query) <qSupported>: Report support for
4146 disconnected tracing.
4147 (queue_stop_reply_callback): Account for running threads.
4148 (gdb_wants_thread_stopped): New.
4149 (gdb_wants_all_threads_stopped): New.
4150 (gdb_reattached_process): New.
4151 (handle_status): Clear the `gdb_detached' flag of all processes.
4152 In all-stop, stop all threads.
4153 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4154 (process_serial_event): If the remote connection breaks, or if an
4155 exit was forced with "monitor exit", force an event loop exit.
4156 Handle disconnected tracing on detach.
4157 (handle_serial_event): Adjust.
4158 (handle_target_event): If GDB isn't connected, forward events back
4159 to the inferior, unless the last process exited, in which case,
4160 exit gdbserver. Adjust interface.
4162 * remote-utils.c (remote_open): Don't block in accept. Instead
4163 register an event loop source on the listen socket file
4164 descriptor. Refactor bits into ...
4165 (listen_desc): ... this new global.
4166 (gdb_connected): ... this new function.
4167 (enable_async_notification): ... this new function.
4168 (handle_accept_event): ... this new function.
4169 (remote_close): Clear remote_desc.
4171 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4173 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4175 (mourn_inferior): Define.
4176 (target_process_qsupported): Avoid the dangling else problem.
4177 (thread_stopped): Define.
4178 (pause_all): Define.
4179 (target_waitstatus_to_string): Declare.
4180 * target.c (target_waitstatus_to_string): New.
4182 * tracepoint.c (tracing): Make extern.
4183 (disconnected_tracing): New.
4184 (stop_tracing): Make extern. Handle tracing stops due to GDB
4186 (cmd_qtdisconnected): New.
4187 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4188 (handle_tracepoint_general_set): Handle QTDisconnected.
4190 * event-loop.c (event_handler_func): Change return type to int.
4191 (process_event): Bail out if the event handler wants the event
4193 (handle_file_event): Ditto.
4194 (start_event_loop): Bail out if the event handler wants the event
4197 * nto-low.c (nto_target_ops): Adjust.
4198 * spu-low.c (spu_wait): Don't remove the process here.
4199 (spu_target_ops): Adjust.
4200 * win32-low.c (win32_wait): Don't remove the process here.
4201 (win32_target_ops): Adjust.
4203 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4205 * regcache.c (realloc_register_cache): Invalidate inferior's
4206 regcache before recreating it.
4208 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4210 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4212 2010-04-09 Stan Shebs <stan@codesourcery.com>
4213 Pedro Alves <pedro@codesourcery.com>
4215 * server.h (LONGEST): New.
4216 (struct thread_info) <while_stepping>: New field.
4217 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4219 (initialize_tracepoint, handle_tracepoint_general_set)
4220 (handle_tracepoint_query, tracepoint_finished_step)
4221 (tracepoint_was_hit, release_while_stepping_state_list):
4222 (current_traceframe): Declare.
4223 * server.c (handle_general_set): Handle tracepoint packets.
4225 (write_memory): New.
4226 (handle_search_memory_1): Use read_memory.
4227 (handle_query): Report support for conditional tracepoints, trace
4228 state variables, and tracepoint sources. Handle tracepoint
4230 (main): Initialize the tracepoints module.
4231 (process_serial_event): Handle traceframe reads/writes.
4233 * linux-low.c (handle_tracepoints): New.
4234 (linux_wait_1): Call it.
4235 (linux_resume_one_lwp): Handle while-stepping.
4236 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4237 (linux_target_ops): Install them.
4238 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4240 * linux-x86-low.c (x86_supports_tracepoints): New.
4241 (the_low_target). Install it.
4243 * mem-break.h (delete_breakpoint): Declare.
4244 * mem-break.c (delete_breakpoint): Make external.
4246 * target.h (struct target_ops): Add `supports_tracepoints',
4247 `read_pc', and `write_pc' fields.
4248 (target_supports_tracepoints): Define.
4249 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4252 * regcache.h (struct regcache) <registers_owned>: New field.
4253 (init_register_cache, regcache_cpy): Declare.
4254 (regcache_read_pc, regcache_write_pc): Declare.
4255 (register_cache_size): Declare.
4256 (supply_regblock): Declare.
4257 * regcache.c (init_register_cache): New.
4258 (new_register_cache): Use it.
4259 (regcache_cpy): New.
4260 (register_cache_size): New.
4261 (supply_regblock): New.
4262 (regcache_read_pc, regcache_write_pc): New.
4264 * tracepoint.c: New.
4266 * Makefile.in (OBS): Add tracepoint.o.
4267 (tracepoint.o): New rule.
4269 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4271 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4273 (i386-mmx.c): Likewise.
4274 (i386-mmx-linux.o): Likewise.
4275 (i386-mmx-linux.c): Likewise.
4277 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4278 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4279 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4280 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4282 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4283 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4284 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4286 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4288 * Makefile.in (clean): Updated.
4290 (i386-avx.c): Likewise.
4291 (i386-avx-linux.o): Likewise.
4292 (i386-avx-linux.c): Likewise.
4293 (amd64-avx.o): Likewise.
4294 (amd64-avx.c): Likewise.
4295 (amd64-avx-linux.o): Likewise.
4296 (amd64-avx-linux.c): Likewise.
4298 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4299 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4300 (srv_amd64_regobj): Add amd64-avx.o.
4301 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4302 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4303 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4304 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4305 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4306 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4307 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4309 * i387-fp.c: Include "i386-xstate.h".
4311 (i387_cache_to_xsave): Likewise.
4312 (i387_xsave_to_cache): Likewise.
4313 (x86_xcr0): Likewise.
4315 * i387-fp.h (i387_cache_to_xsave): Likewise.
4316 (i387_xsave_to_cache): Likewise.
4317 (x86_xcr0): Likewise.
4319 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4320 * linux-crisv32-low.c (target_regsets): Likewise.
4321 * linux-m68k-low.c (target_regsets): Likewise.
4322 * linux-mips-low.c (target_regsets): Likewise.
4323 * linux-ppc-low.c (target_regsets): Likewise.
4324 * linux-s390-low.c (target_regsets): Likewise.
4325 * linux-sh-low.c (target_regsets): Likewise.
4326 * linux-sparc-low.c (target_regsets): Likewise.
4327 * linux-xtensa-low.c (target_regsets): Likewise.
4329 * linux-low.c: Include <sys/uio.h>.
4330 (regsets_fetch_inferior_registers): Support nt_type.
4331 (regsets_store_inferior_registers): Likewise.
4332 (linux_process_qsupported): New.
4333 (linux_target_ops): Add linux_process_qsupported.
4335 * linux-low.h (regset_info): Add nt_type.
4336 (linux_target_ops): Add process_qsupported.
4338 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4340 (init_registers_i386_avx_linux): New.
4341 (init_registers_amd64_avx_linux): Likewise.
4342 (xmltarget_i386_linux_no_xml): Likewise.
4343 (xmltarget_amd64_linux_no_xml): Likewise.
4344 (PTRACE_GETREGSET): Likewise.
4345 (PTRACE_SETREGSET): Likewise.
4346 (x86_fill_xstateregset): Likewise.
4347 (x86_store_xstateregset): Likewise.
4348 (use_xml): Likewise.
4349 (x86_linux_update_xmltarget): Likewise.
4350 (x86_linux_process_qsupported): Likewise.
4351 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4352 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4353 init_registers_i386_linux here. Call
4354 x86_linux_update_xmltarget.
4355 (the_low_target): Add x86_linux_process_qsupported.
4357 * server.c (handle_query): Call target_process_qsupported.
4359 * target.h (target_ops): Add process_qsupported.
4360 (target_process_qsupported): New.
4362 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4364 * inferiors.c (add_thread): Set last_status kind to
4365 TARGET_WAITKIND_IGNORE.
4366 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4367 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4368 (linux_wait_1): Move `thread' local definition to block that uses
4369 it. Don't NULL initialize `event_child'.
4370 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4371 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4372 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4374 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4376 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4377 an extended waitstatus, or by a watchpoint.
4378 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4379 thread was stepping or has been stopped by a watchpoint.
4381 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4383 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4384 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4385 of another, then delete the previous, and validate all
4387 (validate_inserted_breakpoint): New.
4388 (delete_disabled_breakpoints): New.
4389 (validate_breakpoints): New.
4390 (check_mem_read): Validate breakpoints before trusting their
4391 shadow. Delete disabled breakpoints.
4392 (check_mem_write): Validate breakpoints before trusting they
4393 should be inserted. Delete disabled breakpoints.
4394 * mem-break.h (validate_breakpoints):
4395 * server.c (handle_query): Validate breakpoints when we see a
4398 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4400 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4401 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4402 if we could tell there's a GDB breakpoint at stop_pc.
4403 (need_step_over_p): Don't do a step over if we find a GDB
4404 breakpoint at the resume PC.
4406 * mem-break.c (struct raw_breakpoint): New.
4407 (enum bkpt_type): New type `gdb_breakpoint'.
4408 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4409 fields. New field `raw'.
4410 (find_raw_breakpoint_at): New.
4411 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4413 (set_breakpoint_at): Adjust.
4414 (delete_raw_breakpoint): New.
4415 (release_breakpoint): New.
4416 (delete_breakpoint): Rename to...
4417 (delete_breakpoint_1): ... this. Add proc parameter. Use
4418 release_breakpoint. Return ENOENT.
4419 (delete_breakpoint): Reimplement.
4420 (find_breakpoint_at): Delete.
4421 (find_gdb_breakpoint_at): New.
4422 (delete_breakpoint_at): Delete.
4423 (set_gdb_breakpoint_at): New.
4424 (delete_gdb_breakpoint_at): New.
4425 (gdb_breakpoint_here): New.
4426 (set_reinsert_breakpoint): Use release_breakpoint.
4427 (uninsert_breakpoint): Rename to ...
4428 (uninsert_raw_breakpoint): ... this.
4429 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4430 (reinsert_raw_breakpoint): Change parameter type to
4432 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4434 (check_breakpoints): Adjust. Use release_breakpoint.
4435 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4436 (breakpoint_inserted_here): Ditto.
4437 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4438 Don't trust the breakpoint's shadow if it is not inserted.
4439 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4440 (delete_all_breakpoints): Adjust.
4441 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4442 use delete_breakpoint_1.
4444 * mem-break.h (breakpoints_supported): Delete declaration.
4445 (set_gdb_breakpoint_at): Declare.
4446 (gdb_breakpoint_here): Declare.
4447 (delete_breakpoint_at): Delete.
4448 (delete_gdb_breakpoint_at): Declare.
4450 * server.h (struct raw_breakpoint): Forward declare.
4451 (struct process_info): New field `raw_breakpoints'.
4453 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4456 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4458 * linux-low.c (status_pending_p_callback): Fix comment.
4459 (linux_wait_for_event_1): Move most of the internal breakpoint
4460 handling from here...
4461 (linux_wait_1): ... to here.
4462 (count_events_callback): New.
4463 (select_singlestep_lwp_callback): New.
4464 (select_event_lwp_callback): New.
4465 (cancel_breakpoints_callback): New.
4466 (select_event_lwp): New.
4467 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4468 priority to all LWPs that have had events that should be reported
4469 to the client. Cancel breakpoints when about to reporting the
4470 event to the client, not while stopping lwps. No longer cancel
4471 finished single-steps here.
4472 (cancel_finished_single_step): Delete.
4473 (cancel_finished_single_steps): Delete.
4475 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4477 * mem-break.c (enum bkpt_type): New.
4478 (struct breakpoint): New field `type'.
4479 (set_breakpoint_at): Change return type to struct breakpoint
4480 pointer. Set type to `other_breakpoint' by default.
4481 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4482 in the breakpoint list.
4483 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4484 (reinsert_breakpoint): Rename to ...
4485 (reinsert_raw_breakpoint): ... this.
4486 (reinsert_breakpoints_at): Adjust.
4487 * mem-break.h (struct breakpoint): Declare.
4488 (set_breakpoint_at): Change return type to struct breakpoint
4491 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4493 * server.c (handle_query): Assign, not compare.
4495 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4497 Teach linux gdbserver to step-over-breakpoints.
4499 * linux-low.c (can_hardware_single_step): New.
4500 (supports_breakpoints): New.
4501 (handle_extended_wait): If stopping threads, read the stop pc of
4504 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4505 low target doesn't support retrieving the PC.
4506 (add_lwp): Set last_resume_kind to resume_continue.
4507 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4508 (linux_attach): Don't clear stop_expected. Set the lwp's
4509 last_resume_kind to resume_stop.
4510 (linux_detach_one_lwp): Don't check for removed breakpoints.
4511 (check_removed_breakpoint): Delete.
4512 (status_pending_p): Rename to ...
4513 (status_pending_p_callback): ... this. Don't check for removed
4514 breakpoints. Don't consider threads that are stopped from GDB's
4516 (linux_wait_for_lwp): Always read the stop_pc here.
4517 (cancel_breakpoint): New.
4518 (step_over_bkpt): New global.
4519 (linux_wait_for_event_1): Implement stepping over breakpoints.
4520 (gdb_wants_lwp_stopped): New.
4521 (gdb_wants_all_stopped): New.
4522 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4523 single-step traps here. Store the thread's last reported target
4525 (send_sigstop): Don't clear stop_expected. Always set it,
4527 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4528 (cancel_finished_single_step): New.
4529 (cancel_finished_single_steps): New.
4530 (wait_for_sigstop): Don't cancel finished single-step traps here.
4531 (linux_resume_one_lwp): Don't check for removed breakpoints.
4532 Don't set `step' on non-hardware step archs.
4533 (linux_set_resume_request): Ignore resume_stop requests if already
4534 stopping or stopped. Set the lwp's last_resume_kind.
4535 (resume_status_pending_p): Don't check for removed breakpoints.
4536 (need_step_over_p): New.
4537 (start_step_over): New.
4538 (finish_step_over): New.
4539 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4540 requests. Clear the thread's last reported target waitstatus.
4541 Don't use the `suspended' flag. Don't consider pending breakpoints.
4542 (linux_resume): Start a step-over if necessary.
4543 (proceed_one_lwp): New.
4544 (proceed_all_lwps): New.
4545 (unstop_all_lwps): New.
4546 * linux-low.h (struct lwp_info): Rewrite comment for the
4547 `suspended' flag. Add the `stop_pc' field. Delete the
4548 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4549 Add `'last_resume_kind' and `need_step_over' fields.
4550 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4551 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4552 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4553 (set_raw_breakpoint_at): New.
4554 (set_breakpoint_at): Rewrite to use it.
4555 (reinsert_breakpoint_handler): Delete.
4556 (set_reinsert_breakpoint): New.
4557 (reinsert_breakpoint_by_bp): Delete.
4558 (delete_reinsert_breakpoints): New.
4559 (uninsert_breakpoint): Rewrite.
4560 (uninsert_breakpoints_at): New.
4561 (reinsert_breakpoint): Rewrite.
4562 (reinsert_breakpoints_at): New.
4563 (check_breakpoints): Rewrite.
4564 (breakpoint_here): New.
4565 (breakpoint_inserted_here): New.
4566 (check_mem_read): Adjust.
4567 * mem-break.h (breakpoints_supported, breakpoint_here)
4568 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4569 (reinsert_breakpoint_by_bp): Delete declaration.
4570 (delete_reinsert_breakpoints): Declare.
4571 (reinsert_breakpoint): Delete declaration.
4572 (reinsert_breakpoints_at): Declare.
4573 (uninsert_breakpoint): Delete declaration.
4574 (uninsert_breakpoints_at): Declare.
4575 (check_breakpoints): Adjust prototype.
4576 * server.h: Adjust include order.
4577 (struct thread_info): Declare here. Add a `last_status' field.
4579 2010-03-23 Michael Snyder <msnyder@vmware.com>
4581 * server.c (crc32): New function.
4582 (handle_query): Add handling for 'qCRC:' request.
4584 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4586 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4587 lwp had been stopped by a watchpoint.
4589 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4591 * server.h (internal_error): Declare.
4592 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4593 * utils.c (internal_error): New function.
4595 2010-03-15 Andreas Schwab <schwab@redhat.com>
4597 * configure.srv: Fix typo setting srv_regobj.
4599 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4601 * linux-low.c (fetch_register): Avoid passing a non string literal
4603 (usr_store_inferior_registers): Ditto.
4605 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4607 * linux-low.c (linux_write_memory): Bail out early if peeking
4610 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4612 * linux-low.h (struct lwp_info): New fields
4613 `stopped_by_watchpoint' and `stopped_data_address'.
4614 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4615 here, and cache them in the lwp object.
4616 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4618 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4620 (linux_stopped_by_watchpoint): Rewrite.
4621 (linux_stopped_data_address): Rewrite.
4623 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4625 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4626 switching the current inferior, not before.
4628 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4630 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4631 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4632 i386-linux.c and amd64-linux.c.
4633 (reg-i386.o): Removed.
4634 (reg-i386.c): Likewise.
4635 (reg-i386-linux.o): Likewise.
4636 (reg-i386-linux.c): Likewise.
4637 (reg-x86-64.o): Likewise.
4638 (reg-x86-64.c): Likewise.
4639 (reg-x86-64-linux.o): Likewise.
4640 (reg-x86-64-linux.c): Likewise.
4643 (i386-linux.o): Likewise.
4644 (i386-linux.c): Likewise.
4645 (amd64.o): Likewise.
4646 (amd64.c): Likewise.
4647 (amd64-linux.o): Likewise.
4648 (amd64-linux.c): Likewise.
4650 * configure.srv (srv_i386_regobj): New.
4651 (srv_i386_linux_regobj): Likewise.
4652 (srv_amd64_regobj): Likewise.
4653 (srv_amd64_linux_regobj): Likewise.
4654 (srv_i386_32bit_xmlfiles): Likewise.
4655 (srv_i386_64bit_xmlfiles): Likewise.
4656 (srv_i386_xmlfiles): Likewise.
4657 (srv_amd64_xmlfiles): Likewise.
4658 (srv_i386_linux_xmlfiles): Likewise.
4659 (srv_amd64_linux_xmlfiles): Likewise.
4660 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4661 srv_xmlfiles to $srv_i386_xmlfiles.
4662 (i[34567]86-*-mingw32ce*): Likewise.
4663 (i[34567]86-*-mingw*): Likewise.
4664 (i[34567]86-*-nto*): Likewise.
4665 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4666 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4667 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4668 (x86_64-*-linux*): Likewise.
4670 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4671 (init_registers_amd64_linux): New.
4672 (x86_arch_setup): Replace init_registers_x86_64_linux with
4673 init_registers_amd64_linux.
4675 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4677 * configure.ac: Check for libdl. If it is not available link against
4678 static libthread_db.
4679 * configure: Regenerate.
4681 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4685 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4686 handing a read watchpoint.
4687 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4689 2010-02-12 Doug Evans <dje@google.com>
4691 * linux-low.c (linux_supports_tracefork_flag): Document.
4692 (linux_look_up_symbols): Add comment.
4694 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4696 * regcache.c (supply_register): Clear regcache if buf is NULL.
4698 2010-02-02 Nicolas Roche <roche@sourceware.org>
4699 Joel Brobecker <brobecker@adacore.com>
4701 * inferiors.c (find_inferior): Add function documentation.
4702 (unloaded_dll): Handle the case where the unloaded dll has not
4703 been previously registered in the dll list.
4705 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4707 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4708 (thumb2_breakpoint): New.
4709 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4711 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4713 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4714 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4717 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4719 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4721 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4723 * linux-s390-low.c (s390_collect_ptrace_register)
4724 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4726 2010-01-21 Doug Evans <dje@google.com>
4728 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4729 (PTRACE_ARG4_TYPE): New macro.
4730 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4731 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4732 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4733 (usr_store_inferior_registers): Ditto.
4734 (linux_read_memory, linux_write_memory): Ditto.
4735 (linux_test_for_tracefork): Ditto.
4737 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4738 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4740 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4742 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4745 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4747 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4748 prototype to take a regcache. Adjust.
4750 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4752 * regcache.h (struct thread_info): Forward declare.
4753 (struct regcache): New.
4754 (new_register_cache): Adjust prototype.
4755 (get_thread_regcache): Declare.
4756 (free_register_cache): Adjust prototype.
4757 (registers_to_string, registers_from_string): Ditto.
4758 (supply_register, supply_register_by_name, collect_register)
4759 (collect_register_as_string, collect_register_by_name): Ditto.
4760 * regcache.c (struct inferior_regcache_data): Delete.
4761 (get_regcache): Rename to ...
4762 (get_thread_regcache): ... this. Adjust. Switch inferior before
4764 (regcache_invalidate_one): Adjust.
4765 (regcache_invalidate): Fix prototype.
4766 (new_register_cache): Return the new register cache.
4767 (free_register_cache): Change prototype.
4768 (realloc_register_cache): Adjust.
4769 (registers_to_string): Change prototype to take a regcache. Adjust.
4770 (registers_from_string): Ditto.
4771 (register_data): Ditto.
4772 (supply_register): Ditto.
4773 (supply_register_by_name): Ditto.
4774 (collect_register): Ditto.
4775 (collect_register_as_string): Ditto.
4776 (collect_register_by_name): Ditto.
4777 * server.c (process_serial_event): Adjust.
4778 * linux-low.h (regset_fill_func, regset_store_func): Change
4780 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4782 * linux-low.c (get_stop_pc): Adjust.
4783 (check_removed_breakpoint): Adjust.
4784 (linux_wait_for_event): Adjust.
4785 (linux_resume_one_lwp): Adjust.
4786 (fetch_register): Add regcache parameter. Adjust.
4787 (usr_store_inferior_registers): Ditto.
4788 (regsets_fetch_inferior_registers): Ditto.
4789 (regsets_store_inferior_registers): Ditto.
4790 (linux_fetch_registers, linux_store_registers): Ditto.
4791 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4793 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4795 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4796 prototype to take a regcache.
4797 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4798 * remote-utils.c (convert_ascii_to_int, outreg)
4799 (prepare_resume_reply): Change prototype to take a regcache.
4801 * target.h (struct target_ops) <fetch_registers, store_registers>:
4802 Change prototype to take a regcache.
4803 (fetch_inferior_registers, store_inferior_registers): Change
4804 prototype to take a regcache. Adjust.
4805 * proc-service.c (ps_lgetregs): Adjust.
4806 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4807 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4808 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4809 take a regcache. Adjust.
4810 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4811 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4812 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4813 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4814 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4815 (cris_cannot_fetch_register):
4816 (cris_breakpoint_at): Change prototype to take a regcache.
4818 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4819 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4820 to take a regcache. Adjust.
4821 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4823 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4824 take a regcache. Adjust.
4825 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4826 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4827 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4828 * linux-mips-low.c (mips_get_pc):
4829 (mips_set_pc): Change prototype to take a regcache. Adjust.
4830 (mips_reinsert_addr): Adjust.
4831 (mips_collect_register): Change prototype to take a regcache.
4833 (mips_supply_register):
4834 (mips_collect_register_32bit, mips_supply_register_32bit)
4835 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4836 (mips_store_fpregset): Ditto.
4837 * linux-ppc-low.c (ppc_supply_ptrace_register)
4838 (ppc_supply_ptrace_register): Ditto.
4839 (parse_spufs_run): Adjust.
4840 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4841 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4842 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4843 take a regcache. Adjust.
4844 * linux-s390-low.c (s390_collect_ptrace_register)
4845 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4846 (s390_set_pc): Change prototype to take a regcache. Adjust.
4847 (s390_arch_setup): Adjust.
4848 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4849 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4850 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4851 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4852 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4854 (sparc_breakpoint_at): Adjust.
4855 * linux-xtensa-low.c (xtensa_fill_gregset):
4856 (xtensa_store_gregset):
4857 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4858 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4859 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4860 prototype to take a regcache. Adjust.
4861 * win32-arm-low.c (arm_fetch_inferior_register)
4862 (arm_store_inferior_register): Change prototype to take a
4864 * win32-i386-low.c (i386_fetch_inferior_register)
4865 (i386_store_inferior_register): Change prototype to take a
4867 * win32-low.c (child_fetch_inferior_registers)
4868 (child_store_inferior_registers): Change prototype to take a
4870 (win32_wait): Adjust.
4871 (win32_fetch_inferior_registers): Change prototype to take a
4873 (win32_store_inferior_registers): Adjust.
4874 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4875 store_inferior_register>: Change prototype to take a regcache.
4877 2010-01-20 Doug Evans <dje@google.com>
4879 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4881 (linux_wait_for_event1, linux_init_signals): Ditto.
4882 (W_STOPCODE): Provide definition if missing.
4884 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4886 * linux-low.c (linux_core_of_thread): New.
4887 (compare_ints, show_process, list_threads): New.
4888 (linux_qxfer_osdata): Report threads and cores.
4889 (linux_target_op): Register linux_core_of_thread.
4890 * remote-utils.c (prepare_resume_reply): Report the core.
4891 (buffer_xml_printf): Support %d specifier.
4892 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4894 (handle_query): Handle qXfer:threads. Announce availability
4896 * target.h (struct target_ops): New field core_of_thread.
4898 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4900 * Makefile.in (clean): Remove new generated files.
4901 (reg-s390.o, reg-s390.c): Remove rules.
4902 (reg-s390x.o, reg-s390x.c): Likewise.
4903 (s390-linux32.o, s390-linux32.c): Add rules.
4904 (s390-linux64.o, s390-linux64.c): Likewise.
4905 (s390x-linux64.o, s390x-linux64.c): Likewise.
4906 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4907 * linux-s390-low.c: Include <elf.h>.
4908 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4909 (init_registers_s390): Remove prototype.
4910 (init_registers_s390x): Likewise.
4911 (init_registers_s390_linux32): Add prototype.
4912 (init_registers_s390_linux64): Likewise.
4913 (init_registers_s390x_linux64): Likewise.
4914 (s390_num_regs_3264): New define.
4915 (s390_regmap_3264): New global variable.
4916 (s390_cannot_fetch_register): Remove obsolete check.
4917 (s390_cannot_store_register): Likewise.
4918 (s390_collect_ptrace_register): Handle upper/lower register halves.
4919 (s390_supply_ptrace_register): Likewise.
4920 (s390_fill_gregset): Update to register number changes.
4921 (s390_get_hwcap): New routine.
4922 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4923 Install appropriate regmap and register set.
4925 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4927 * server.c (gdbserver_version): Update copyright year to 2010.
4928 * gdbreplay.c (gdbreplay_version): Likewise.
4930 2009-12-28 Doug Evans <dje@google.com>
4932 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4933 elf/external.h. Include <elf.h> instead but only if necessary.
4935 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4937 * linux-low.c (linux_remove_process): Remove `detaching'
4938 parameter. Don't release/detach from thread_db here.
4939 (linux_kill): Release/detach from thread_db here, ...
4940 (linux_detach): ... and here, before actually detaching.
4941 (linux_wait_1): ... and here, when a process exits.
4942 * thread-db.c (any_thread_of): New.
4943 (thread_db_free): Switch the current inferior to a thread of the
4946 2009-12-21 Doug Evans <dje@google.com>
4948 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4950 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4951 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4952 warning ifndef __NR_tkill. Move setting of errno there too.
4953 Delete unnecessary resetting of errno after syscall.
4954 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4956 * configure.ac: Check for dladdr.
4957 * config.in: Regenerate.
4958 * configure: Regenerate.
4959 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4960 (try_thread_db_load): Update.
4962 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4964 2009-12-18 Doug Evans <dje@google.com>
4966 * event-loop.c: Include unistd.h if it exists.
4968 * linux-low.c (my_waitpid): Move definition away from being in
4969 between linux_tracefork_child/linux_test_for_tracefork.
4971 * gdb_proc_service.h (psaddr_t): Fix type.
4972 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4973 signature to match glibc.
4975 2009-12-16 Doug Evans <dje@google.com>
4977 * linux-low.c (linux_read_memory): Fix argument to read.
4979 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4981 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4982 events, don't leave current_inferior pointing at null.
4984 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4986 * win32-low.c (LOG): Delete.
4987 (OUTMSG): Output to stderr.
4988 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4989 on compile time LOG macro.
4990 (win32_wait): Fix debug output.
4992 2009-11-26 Pedro Alves <pedro@codesourcery.com>
4994 * win32-low.c (win32_add_one_solib): If the dll name is
4995 "ntdll.dll", prepend the system directory to the dll path.
4997 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4999 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5001 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5002 Vladimir Prus <vladimir@codesourcery.com>
5004 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5005 * configure.ac: Check for __mcoldfire__ and set
5006 gdb_cv_m68k_is_coldfire.
5007 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5008 reg-cf.o and reg-m68k.o.
5009 * configure: Regenerated.
5011 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5013 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5014 Pass it to thread_db_free.
5015 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5016 proper `detaching' argument to linux_remove_process.
5017 * linux-low.h (thread_db_free): Add `detaching' parameter.
5018 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5020 (thread_db_free): Add `detaching' parameter. Only
5021 call td_ta_clear_event if detaching from process.
5023 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5025 * thread-db.c (thread_db_free): Fix typo.
5027 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5030 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5032 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5034 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5035 with an i686 compiler.
5036 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5038 * configure: Rebuilt.
5040 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5044 * server.c (handle_search_memory_1): Correct read_addr initialization
5045 in loop for searching subsequent chunks.
5047 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5049 * configure.ac: New --with-libthread-db option.
5050 * thread-db.c: Allow direct dependence on libthread_db.
5051 (thread_db_free): Adjust.
5052 * config.in: Regenerate.
5053 * configure: Likewise.
5055 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5058 * thread-db.c (attach_thread): New function.
5059 (maybe_attach_thread): Return success/failure.
5060 (find_new_threads_callback): Adjust.
5061 (thread_db_find_new_threads): Loop until no new threads.
5063 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5065 * proc-service.c (ps_lgetregs): Formatting.
5067 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5069 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5070 * configure.ac: Adjust.
5071 * linux-low.h (struct process_info_private): Move members to struct
5073 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5074 * linux-low.c (linux_remove_process): Adjust.
5075 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5076 * server.c (handle_query): Move code ...
5077 (handle_monitor_command): ... here. New function.
5078 * target.h (struct target_ops): New member.
5079 * thread-db.c (struct thread_db): New.
5080 (libthread_db_search_path): New variable.
5081 (thread_db_create_event, thread_db_enable_reporting)
5082 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5083 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5084 (try_thread_db_load_1, dladdr_to_soname): New functions.
5085 (try_thread_db_load, thread_db_load_search): New functions.
5086 (thread_db_init): Search for libthread_db.
5087 (thread_db_free): New function.
5088 (thread_db_handle_monitor_command): Likewise.
5089 * config.in: Regenerate.
5090 * configure: Regenerate.
5092 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5094 * spu-low.c (spu_kill): Wait for inferior to terminate.
5095 Call clear_inferiors.
5096 (spu_detach): Call clear_inferiors.
5098 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5100 * aclocal.m4: Regenerate.
5101 * config.in: Likewise.
5102 * configure: Likewise.
5104 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5106 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5107 (parse_spufs_run): New function.
5108 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5109 (ppc_breakpoint_at): Handle SPU breakpoints.
5111 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5113 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5114 (SPUFS_MAGIC): Define.
5115 (spu_enumerate_spu_ids): New function.
5116 (linux_qxfer_spu): New function.
5117 (linux_target_ops): Install linux_qxfer_spu.
5119 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5121 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5122 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5123 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5124 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5125 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5126 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5127 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5128 (init_registers_powerpc_cell32l): Add prototype.
5129 (init_registers_powerpc_cell64l): Likewise.
5130 (ppc_arch_setup): Detect Cell/B.E. architecture.
5132 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5134 * Makefile.in (datarootdir): New variable.
5136 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5138 * linux-low.c (linux_write_memory): Update debugging output.
5139 * Makefile.in (clean): Add new descriptions.
5140 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5141 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5142 * configure.srv: Add new files for arm*-*-linux*.
5143 * linux-arm-low.c: Add new declarations.
5144 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5145 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5146 (HWCAP_VFPv3D16): New.
5147 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5148 instead of __IWMMXT__.
5149 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5150 (arm_arch_setup): New.
5151 (target_regsets): Remove #ifdef. Add VFP regset.
5152 (the_low_target): Use arm_arch_setup.
5154 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5156 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5157 the main thread again.
5159 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5161 Adding Neutrino gdbserver.
5162 * configure: Regenerated.
5163 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5164 * configure.srv (i[34567]86-*-nto*): New target.
5165 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5166 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5167 (nto_comctrl) [__QNX__]: New function.
5168 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5170 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5172 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5175 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5176 Pedro Alves <pedro@codesourcery.com>
5178 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5179 don't support CONTEXT_EXTENDED_REGISTERS.
5180 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5181 (the_low_target): Install them.
5182 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5183 failing with ERROR_PIPE_NOT_CONNECTED.
5185 2009-06-30 Doug Evans <dje@google.com>
5186 Pierre Muller <muller@ics.u-strasbg.fr>
5188 Add h/w watchpoint support to x86-linux, win32-i386.
5189 * Makefile.in (SFILES): Add i386-low.c
5190 (i386_low_h): Define.
5191 (i386-low.o): Add dependencies.
5192 (linux-x86-low.o): Add i386-low.h dependency.
5193 (win32-i386-low.o): Ditto.
5194 * i386-low.c: New file.
5195 * i386-low.h: New file.
5196 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5197 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5198 * linux-low.c (linux_add_process): Initialize arch_private.
5199 (linux_remove_process): Free arch_private.
5200 (add_lwp): Initialize arch_private.
5201 (delete_lwp): Free arch_private.
5202 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5204 * linux-low.h (process_info_private): New member arch_private.
5205 (lwp_info): New member arch_private.
5206 (linux_target_ops): New members new_process, new_thread,
5208 (ptid_of): New macro.
5209 * linux-x86-low.c: Include stddef.h, i386-low.h.
5210 (arch_process_info): New struct.
5211 (arch_lwp_info): New struct.
5212 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5213 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5214 (i386_dr_low_get_status): New function.
5215 (x86_insert_point, x86_remove_point): New functions.
5216 (x86_stopped_by_watchpoint): New function.
5217 (x86_stopped_data_address): New function.
5218 (x86_linux_new_process, x86_linux_new_thread): New functions.
5219 (x86_linux_prepare_to_resume): New function.
5220 (the_low_target): Add entries for insert_point, remove_point,
5221 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5223 * server.c (debug_hw_points): New global.
5224 (monitor_show_help): Document set debug-hw-points.
5225 (handle_query): Process "set debug-hw-points".
5226 * server.h (debug_hw_points): Declare.
5227 (paddress): Declare.
5228 * utils.c (NUMCELLS, CELLSIZE): New macros.
5229 (get_sell, xsnprintf, paddress): New functions.
5230 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5231 remove_point, stopped_by_watchpoint, stopped_data_address.
5232 * win32-i386-low.c: Include i386-low.h.
5233 (debug_reg_state): Replaces dr.
5234 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5235 (i386_dr_low_get_status): New function.
5236 (i386_insert_point, i386_remove_point): New functions.
5237 (i386_stopped_by_watchpoint): New function.
5238 (i386_stopped_data_address): New function.
5239 (i386_initial_stuff): Update.
5240 (get_thread_context,set_thread_context,i386_thread_added): Update.
5241 (the_low_target): Add entries for insert_point,
5242 remove_point, stopped_by_watchpoint, stopped_data_address.
5243 * win32-low.c (win32_insert_watchpoint): New function.
5244 (win32_remove_watchpoint): New function.
5245 (win32_stopped_by_watchpoint): New function.
5246 (win32_stopped_data_address): New function.
5247 (win32_target_ops): Add entries for insert_watchpoint,
5248 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5249 * win32-low.h (win32_target_ops): New members insert_point,
5250 remove_point, stopped_by_watchpoint, stopped_data_address.
5252 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5254 * server.c (process_serial_event): Re-return unsupported, not
5255 error, if the type isn't recognized. Re-allow supporting only
5256 insert or remove packets. Also call require_running for
5257 breakpoints. Add missing break statement to default case. Tidy.
5258 * target.h (struct target_ops): Rename insert_watchpoint to
5259 insert_point, and remove_watchpoint to remove_point.
5261 * linux-low.h (struct linux_target_ops): Likewise.
5262 * linux-low.c (linux_insert_watchpoint): Rename to ...
5263 (linux_insert_point): ... this. Adjust.
5264 (linux_remove_watchpoint): Rename to ...
5265 (linux_remove_point): ... this. Adjust.
5266 (linux_target_ops): Adjust.
5267 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5268 (cris_insert_point): ... this.
5269 (cris_remove_watchpoint): Rename to ...
5270 (cris_remove_point): ... this.
5271 (the_low_target): Adjust.
5273 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5275 * server.c (handle_v_kill): Pass signal_pid to
5276 kill_inferior if multi_process is zero.
5278 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5280 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5281 * target.h (target_ops): Comment for *_watchpoint to make it clear
5282 the functions can get types '0' and '1'.
5284 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5286 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5287 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5288 * regcache.c (get_regcache): Likewise.
5289 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5290 * win32-low.c (child_fetch_inferior_registers): Remove check for
5293 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5294 Pedro Alves <pedro@codesourcery.com>
5296 * target.h (struct target_ops) <supports_multi_process>: New
5298 (target_supports_multi_process): New.
5299 * server.c (handle_query): Even if GDB reports support, only
5300 enable multi-process if the target also supports it. Report
5301 multi-process support only if the target backend supports it.
5302 * linux-low.c (linux_supports_multi_process): New function.
5303 (linux_target_ops): Install it as target_supports_multi_process
5306 2009-05-24 Doug Evans <dje@google.com>
5308 Global renaming of find_thread_pid to find_thread_ptid.
5309 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5310 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5311 All callers updated.
5313 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5314 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5317 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5318 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5319 (linux_resume_one_lwp): Ditto.
5321 2009-05-23 Doug Evans <dje@google.com>
5323 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5324 from struct inferior_list_entry * to struct lwp_info *.
5325 All callers updated.
5327 2009-05-13 Doug Evans <dje@google.com>
5329 * linux-x86-low.c: Don't include assert.h.
5330 (x86_siginfo_fixup): Use fatal, not assert.
5331 (x86_arch_setup): Fix comment.
5333 2009-05-12 Doug Evans <dje@google.com>
5335 Biarch support for i386/amd64 gdbserver.
5336 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5337 Add linux-x86-low.c.
5338 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5339 (linux-x86-low.o): Add.
5340 * linux-x86-64-low.c: Delete.
5341 * linux-i386-low.c: Delete.
5342 * linux-x86-low.c: New file.
5343 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5345 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5347 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5348 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5349 (linux_child_pid_to_exec_file): New function.
5350 (elf_64_header_p, elf_64_file_p): New functions.
5351 (siginfo_fixup): New function.
5352 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5353 give target a chance to convert layout.
5354 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5355 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5357 2009-05-07 Doug Evans <dje@google.com>
5359 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5360 (regsets_store_inferior_registers): Ditto.
5362 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5366 * linux-low.c (must_set_ptrace_flags): Delete.
5367 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5369 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5370 `lwp->must_set_ptrace_flags' instead.
5371 (linux_wait_for_event_1): Set ptrace options here.
5372 (linux_wait_1): ... not here.
5374 2009-04-30 Doug Evans <dje@google.com>
5376 * inferiors.c (started_inferior_callback): New function.
5377 (attached_inferior_callback): New function.
5378 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5379 * server.c (print_started_pid, print_attached_pid): New functions.
5380 (detach_or_kill_for_exit): New function.
5381 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5382 * server.h (have_started_inferiors_p): Declare.
5383 (have_attached_inferiors_p): Declare.
5385 * inferiors.c (remove_process): Fix memory leak, free process.
5386 * linux-low.c (linux_remove_process): New function.
5387 (linux_kill): Call it instead of remove_process.
5388 (linux_detach, linux_wait_1): Ditto.
5390 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5392 * configure.srv: Add x86 Windows CE target.
5394 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5396 * inferiors.c (get_thread_process): Make global.
5397 * server.h (get_thread_process): Add prototype.
5398 * thread-db.c (find_one_thread): Use get_thread_process
5399 instead of current_process.
5400 (thread_db_get_tls_address): Do not crash if called when
5401 thread layer is not yet initialized.
5403 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5405 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5406 * spu-low.c (current_tid): Rename to ...
5407 (current_ptid): ... this.
5408 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5409 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5410 ptid_get_lwp (current_ptid) instead of current_tid.
5411 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5412 instead of current_tid. Use find_process_pid to verify pid
5413 argument is valid. Pass proper argument to remove_process.
5414 (spu_thread_alive): Compare current_ptid instead of current_tid.
5415 (spu_resume): Likewise.
5417 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5419 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5422 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5424 Implement the multiprocess extensions, and add linux multiprocess
5427 * server.h (ULONGEST): Declare.
5428 (struct ptid, ptid_t): New.
5429 (minus_one_ptid, null_ptid): Declare.
5430 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5431 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5432 (struct inferior_list_entry): Change `id' type from unsigned from
5434 (struct sym_cache, struct breakpoint, struct
5435 process_info_private): Forward declare.
5436 (struct process_info): Declare.
5437 (current_process): Declare.
5438 (all_processes): Declare.
5439 (initialize_inferiors): Declare.
5440 (add_thread): Adjust to use ptid_t.
5441 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5442 (add_process, remove_process, find_thread_pid): Declare.
5443 (find_inferior_id): Adjust to use ptid_t.
5444 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5445 (multi_process): Declare.
5446 (push_event): Adjust to use ptid_t.
5447 (read_ptid, write_ptid): Declare.
5448 (prepare_resume_reply): Adjust to use ptid_t.
5449 (clear_symbol_cache): Declare.
5450 * inferiors.c (all_processes): New.
5451 (null_ptid, minus_one_ptid): New.
5452 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5453 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5454 (add_thread): Change unsigned long to ptid. Remove gdb_id
5456 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5457 (gdb_id_to_thread): Rename to ...
5458 (find_thread_pid): ... this. Change unsigned long to ptid.
5459 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5460 (loaded_dll, pull_pid_from_list): Adjust.
5461 (add_process, remove_process, find_process_pid)
5462 (get_thread_process, current_process, initialize_inferiors): New.
5463 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5464 (struct target_waitstatus) <related_pid>: Ditto.
5465 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5467 (struct target_ops) <join>: Add `pid' argument.
5468 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5469 (struct target_ops) <wait>: Add `ptid' field. Change return type
5471 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5472 (mywait): Add `ptid' argument. Change return type to ptid_t.
5473 (target_pid_to_str): Declare.
5474 * target.c (set_desired_inferior): Adjust to use ptids.
5475 (mywait): Add new `ptid' argument. Adjust.
5476 (target_pid_to_str): New.
5477 * mem-break.h (free_all_breakpoints): Declare.
5478 * mem-break.c (breakpoints): Delelete.
5479 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5480 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5481 to use per-process breakpoint list.
5482 (free_all_breakpoints): New.
5483 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5484 (symbol_cache, all_symbols_looked_up): Delete.
5486 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5488 (prepare_resume_reply): Change ptid argument's type from unsigned
5489 long to ptid_t. Adjust. Implement W;process and X;process.
5490 (free_sym_cache, clear_symbol_cache): New.
5491 (look_up_one_symbol): Adjust to per-process symbol cache. *
5492 * server.c (cont_thread, general_thread, step_thread): Change type
5495 (multi_process): New.
5496 (last_ptid): Change type to ptid_t.
5497 (struct vstop_notif) <ptid>: Change type to ptid_t.
5498 (queue_stop_reply, push_event): Change `ptid' argument's type to
5500 (discard_queued_stop_replies): Add `pid' argument.
5501 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5502 changes. Don't reference the `attached' global.
5503 (attach_inferior): Adjust to mywait interface changes.
5504 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5505 features. Handle and report "multiprocess+". Handle
5507 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5509 (handle_v_kill): New.
5510 (handle_v_stopped): Adjust to use target_pid_to_str.
5511 (handle_v_requests): Allow multiple attaches and runs when
5512 multiprocess extensions are in effect. Handle "vKill".
5513 (myresume): Adjust to use ptids.
5514 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5515 (handle_status): Adjust to discard_queued_stop_replies interface
5517 (first_thread_of, kill_inferior_callback)
5518 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5519 (main): Call initialize_inferiors. Adjust to use ptids, killing
5520 and detaching from all inferiors. Handle multiprocess packet
5522 * linux-low.h: Include gdb_proc_service.h.
5523 (struct process_info_private): New.
5524 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5525 <lwpid_of>: Use ptid_get_lwp.
5526 (get_lwp_thread): Adjust.
5527 (struct lwp_info): Add `dead' member.
5528 (find_lwp_pid): Declare.
5529 * linux-low.c (thread_db_active): Delete.
5530 (new_inferior): Adjust comment.
5531 (inferior_pid): Delete.
5532 (linux_add_process): New.
5533 (handle_extended_wait): Adjust.
5534 (add_lwp): Change unsigned long to ptid.
5535 (linux_create_inferior): Add process to processes table. Adjust
5536 to use ptids. Don't set new_inferior here.
5537 (linux_attach_lwp): Rename to ...
5538 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5539 it. Adjust to use ptids.
5540 (linux_attach_lwp): New.
5541 (linux_attach): Add process to processes table. Don't set
5543 (struct counter): New.
5544 (second_thread_of_pid_p, last_thread_of_process_p): New.
5545 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5547 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5548 processes. Remove process from process table.
5549 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5550 to multiple processes.
5551 (any_thread_of): New.
5552 (linux_detach): Add `pid' argument, and handle it. Remove process
5553 from processes table.
5554 (linux_join): Add `pid' argument. Handle it.
5555 (linux_thread_alive): Change unsighed long argument to ptid_t.
5556 Consider dead lwps as not being alive.
5557 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5558 threads we're not interested in.
5559 (same_lwp, find_lwp_pid): New.
5560 (linux_wait_for_lwp): Change `pid' argument's type from int to
5562 (linux_wait_for_event): Rename to ...
5563 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5564 from int to ptid_t. Adjust.
5565 (linux_wait_for_event): New.
5566 (linux_wait_1): Add `ptid' argument. Change return type to
5567 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5568 that exit from the process table.
5569 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5571 (mark_lwp_dead): New.
5572 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5573 stopping all threads, mark its main lwp as dead.
5574 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5576 (fetch_register, usr_store_inferior_registers)
5577 (regsets_fetch_inferior_registers)
5578 (regsets_store_inferior_registers, linux_read_memory)
5579 (linux_write_memory): Inline `inferior_pid'.
5580 (linux_look_up_symbols): Adjust to use per-process
5582 (linux_request_interrupt): Adjust to use ptids.
5583 (linux_read_auxv): Inline `inferior_pid'.
5584 (initialize_low): Don't reference thread_db_active.
5585 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5586 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5587 (ps_getpid): Return the pid of the current inferior.
5588 * thread-db.c (proc_handle, thread_agent): Delete.
5589 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5591 (find_one_thread): Change argument type to ptid_t. Adjust to
5593 (maybe_attach_thread): Adjust to per-process data and ptids.
5594 (thread_db_find_new_threads): Ditto.
5595 (thread_db_init): Ditto.
5596 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5597 processes table. Adjust to use ptids.
5598 (spu_kill, spu_detach): Adjust interface. Remove process from
5600 (spu_join, spu_thread_alive): Adjust interface.
5601 (spu_wait): Adjust interface. Remove process from processes
5602 table. Adjust to use ptids.
5603 * win32-low.c (current_inferior_tid): Delete.
5604 (current_inferior_ptid): New.
5605 (debug_event_ptid): New.
5606 (thread_rec): Take a ptid. Adjust.
5607 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5608 (child_delete_thread): Ditto.
5609 (do_initial_child_stuff): Add `attached' argument. Add process to
5611 (child_fetch_inferior_registers, child_store_inferior_registers):
5613 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5614 (win32_attach): Pass 1 to do_initial_child_stuff.
5615 (win32_kill): Adjust interface. Remove process from processes
5617 (win32_detach): Ditto.
5618 (win32_join): Adjust interface.
5619 (win32_thread_alive): Take a ptid.
5620 (win32_resume): Adjust to use ptids.
5621 (get_child_debug_event): Ditto.
5622 (win32_wait): Adjust interface. Remove exiting process from
5625 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5627 Non-stop mode support.
5629 * server.h (non_stop): Declare.
5630 (gdb_client_data, handler_func): Declare.
5631 (delete_file_handler, add_file_handler, start_event_loop):
5633 (handle_serial_event, handle_target_event, push_event)
5634 (putpkt_notif): Declare.
5635 * target.h (enum resume_kind): New.
5636 (struct thread_resume): Replace `step' field by `kind' field.
5637 (TARGET_WNOHANG): Define.
5638 (struct target_ops) <wait>: Add `options' argument.
5639 <supports_non_stop, async, start_non_stop>: New fields.
5640 (target_supports_non_stop, target_async): New.
5641 (start_non_stop): Declare.
5642 (mywait): Add `options' argument.
5643 * target.c (mywait): Add `options' argument. Print child exit
5645 (start_non_stop): New.
5646 * server.c (non_stop, own_buf, mem_buf): New globals.
5647 (struct vstop_notif): New.
5648 (notif_queue): New global.
5649 (queue_stop_reply, push_event, discard_queued_stop_replies)
5650 (send_next_stop_reply): New.
5651 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5653 (attach_inferior): In non-stop mode, don't wait for the target
5655 (handle_general_set): Handle QNonStop.
5656 (handle_query): When handling qC, return the current general
5657 thread, instead of the first thread of the list.
5658 (handle_query): If the backend supports non-stop mode, include
5659 QNonStop+ in the qSupported query response.
5660 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5662 (handle_v_attach, handle_v_run): Handle non-stop mode.
5663 (handle_v_stopped): New.
5664 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5665 (myresume): Adjust to use resume_kind. Handle non-stop.
5666 (queue_stop_reply_callback): New.
5667 (handle_status): Handle non-stop mode.
5668 (main): Clear non_stop flag on reconnection. Use the event-loop.
5669 Refactor serial protocol handling from here ...
5670 (process_serial_event): ... to this new function. When GDB
5671 selects any thread, select one here. In non-stop mode, wait until
5672 GDB acks all pending events before exiting.
5673 (handle_serial_event, handle_target_event): New.
5674 * remote-utils.c (remote_open): Install remote_desc in the event
5676 (remote_close): Remove remote_desc from the event loop.
5677 (putpkt_binary): Rename to...
5678 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5679 (putpkt_binary): New as wrapper around putpkt_binary_1.
5680 (putpkt_notif): New.
5681 (prepare_resume_reply): In non-stop mode, don't change the
5683 * event-loop.c: New.
5684 * Makefile.in (OBJ): Add event-loop.o.
5685 (event-loop.o): New rule.
5687 * linux-low.h (pid_of): Moved here.
5689 (get_lwp_thread): Use lwpid_of.
5690 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5691 * linux-low.c (pid_of): Delete.
5692 (inferior_pid): Use lwpid_of.
5693 (linux_event_pipe): New.
5694 (target_is_async_p): New.
5696 (handle_extended_wait): Use lwpid_of.
5697 (add_lwp): Don't set lwpid field.
5698 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5699 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5700 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5701 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5702 first. Adjust to linux_wait_for_event interface changes. Use
5704 (linux_detach): Don't delete the main lwp here.
5705 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5706 (status_pending_p): Don't consider explicitly suspended lwps.
5707 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5708 pointer. Add OPTIONS argument. Change return type to int. Use
5709 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5710 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5711 pointer. Add status pointer argument. Return a pid instead of a
5712 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5713 changes. In non-stop mode, don't switch to a random thread.
5714 (linux_wait): Rename to...
5715 (linux_wait_1): ... this. Add target_options argument, and handle
5716 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5717 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5718 clean exit and signal exit code. Don't stop all threads in
5719 non-stop mode. In all-stop mode, only stop all threads when
5720 reporting a stop to GDB. Handle explicit thread stop requests.
5721 (async_file_flush, async_file_mark): New.
5723 (send_sigstop): Use lwpid_of.
5724 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5725 interface changes. In non-stop mode, don't switch to a random
5727 (linux_resume_one_lwp): Use lwpid_of.
5728 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5729 (linux_resume_one_thread): ... this. Handle resume_stop. In
5730 non-stop mode, don't look for pending flag in all threads.
5731 (resume_status_pending_p): Don't consider explicitly suspended
5733 (my_waitpid): Reimplement. Emulate __WALL.
5734 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5736 (sigchld_handler, linux_supports_non_stop, linux_async)
5737 (linux_start_non_stop): New.
5738 (linux_target_ops): Register linux_supports_non_stop, linux_async
5739 and linux_start_non_stop.
5740 (initialize_low): Install SIGCHLD handler.
5741 * thread-db.c (thread_db_create_event, find_one_thread)
5742 (thread_db_get_tls_address): Use lwpid_of.
5743 * win32-low.c (win32_detach): Adjust to use resume_kind.
5744 (win32_wait): Add `options' argument.
5745 * spu-low.c (spu_resume): Adjust to use resume_kind.
5746 (spu_wait): Add `options' argument.
5748 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5750 Decouple target code from remote protocol.
5752 * target.h (enum target_waitkind): New.
5753 (struct target_waitstatus): New.
5754 (struct target_ops) <wait>: Return an unsigned long. Take a
5755 target_waitstatus pointer instead of a char pointer.
5757 * target.c (mywait): Change prototype to return an unsigned long.
5758 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5759 * server.h (thread_from_wait, old_thread_from_wait): Delete
5761 (prepare_resume_reply): Change prototype to take a
5763 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5764 (last_status, last_ptid): New.
5765 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5766 pid instead of a signal.
5767 (attach_inferior): Remove "status" and "signal" parameters.
5769 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5771 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5772 (handle_v_requests, myresume): Remove "status" and "signal"
5774 (handle_status): New.
5775 (main): Delete local `status'. Adjust.
5776 * remote-utils.c: Include target.h.
5777 (prepare_resume_reply): Change prototype to take a
5778 target_waitstatus. Adjust.
5780 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5782 * spu-low.c (spu_wait): Adjust.
5783 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5785 (win32_wait): Adjust.
5787 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5789 * target.h (struct thread_resume): Delete leave_stopped member.
5790 (struct target_ops): Add a `n' argument to the `resume' callback.
5791 * server.c (start_inferior): Adjust.
5792 (handle_v_cont, myresume): Adjust.
5793 * linux-low.c (check_removed_breakpoint): Adjust to resume
5794 interface change, and to removed leave_stopped field.
5795 (resume_ptr): Delete.
5796 (struct thread_resume_array): New.
5797 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5798 resume interface change.
5799 (linux_continue_one_thread, linux_queue_one_thread)
5800 (resume_status_pending_p): Check if the resume field is NULL
5801 instead of checking the leave_stopped member.
5802 (linux_resume): Adjust to the target resume interface change.
5803 * spu-low.c (spu_resume): Adjust to the target resume interface
5805 * win32-low.c (win32_detach, win32_resume): Ditto.
5807 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5809 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5811 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5813 (linux_continue_one_thread): Only preserve the stepping flag if
5814 there's a pending breakpoint.
5816 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5818 * server.c (main): After the inferior having exited, call
5819 remote_close before exiting gdbserver.
5821 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5823 Fix size of FPSCR in Power 7 processors.
5824 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5825 (PPC_FEATURE_HAS_DFP): New #define.
5826 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5829 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5831 * server.c (handle_query) Whitespace and formatting.
5833 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5835 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5836 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5837 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5838 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5839 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5840 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5841 Makefile.in, configure.ac: Fix whitespace throughout.
5842 * configure: Regenerate.
5844 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5846 * inferiors.c (find_inferior): Make it safe for the callback
5847 function to delete the currently iterated inferior.
5849 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5851 * Makefile.in (linuw_low_h): Move higher.
5852 (thread-db.o): Depend on $(linux_low_h).
5854 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5856 Rename "process" to "lwp" throughout.
5858 * linux-low.c (all_processes): Rename to...
5859 (all_lwps): ... this.
5860 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5861 (add_process): Rename to ...
5862 (add_lwp): ... this. Adjust.
5863 (linux_create_inferior): Adjust.
5864 (linux_attach_lwp): Adjust.
5865 (linux_attach): Adjust.
5866 (linux_kill_one_process): Rename to ...
5867 (linux_kill_one_lwp): ... this. Adjust.
5868 (linux_kill): Adjust.
5869 (linux_detach_one_process): Rename to ...
5870 (linux_detach_one_lwp): ... this. Adjust.
5871 (linux_detach): Adjust.
5872 (check_removed_breakpoint): Adjust.
5873 (status_pending_p): Adjust.
5874 (linux_wait_for_process): Rename to ...
5875 (linux_wait_for_lwp): ... this. Adjust.
5876 (linux_wait_for_event): Adjust.
5877 (send_sigstop): Adjust.
5878 (wait_for_sigstop): Adjust.
5879 (stop_all_processes): Rename to ...
5880 (stop_all_lwps): ... this.
5881 (linux_resume_one_process): Rename to ...
5882 (linux_resume_one_lwp): ... this. Adjust.
5883 (linux_set_resume_request, linux_continue_one_thread)
5884 (linux_queue_one_thread, resume_status_pending_p)
5885 (usr_store_inferior_registers, regsets_store_inferior_registers)
5886 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5888 * linux-low.h (get_process): Rename to ...
5889 (get_lwp): ... this. Adjust.
5890 (get_thread_process): Rename to ...
5891 (get_thread_lwp): ... this. Adjust.
5892 (get_process_thread): Rename to ...
5893 (get_lwp_thread): ... this. Adjust.
5894 (struct process_info): Rename to ...
5895 (struct lwp_info): ... this.
5896 (all_processes): Rename to ...
5897 (all_lwps): ... this.
5898 * proc-service.c (ps_lgetregs): Adjust.
5899 * thread-db.c (thread_db_create_event, find_one_thread)
5900 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5902 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5904 * server.c (handle_query): Handle "qAttached".
5906 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5908 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5909 GPLv3, update license URL.
5911 2009-03-01 Doug Evans <dje@google.com>
5913 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5914 (server_h): Add gdb_signals.h.
5915 (signals.o): Update.
5916 * server.h (target_signal_from_host,target_signal_to_host_p)
5917 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5919 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5921 * remote-utils.c (getpkt): Also generate remote-debug
5922 information if noack_mode is set.
5924 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5926 * server.c (handle_query): Report qXfer:siginfo:read and
5927 qXfer:siginfo:write as supported and handle them.
5928 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5929 * linux-low.c (linux_xfer_siginfo): New.
5930 (linux_target_ops): Set it.
5932 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5934 * server.c (gdbserver_usage): Mention --remote-debug.
5935 (main): Accept '--remote-debug' switch.
5937 2009-01-18 Doug Evans <dje@google.com>
5939 * regcache.c (new_register_cache): No need to check result of xcalloc.
5940 * server.c (handle_search_memory): Back out calls to xmalloc,
5941 result is checked and error is returned to user upon failure.
5942 (handle_query): Ditto. Add more checks for result of malloc.
5943 (handle_v_cont): Check result of malloc, report error back to
5945 (handle_v_run): Ditto. Call freeargv.
5946 * server.h (freeargv): Declare.
5947 * utils.c (freeargv): New fn.
5949 2009-01-15 Doug Evans <dje@google.com>
5951 * gdbreplay.c (perror_with_name): Make arg const char *.
5952 * server.h (target_signal_to_name): Make return type const char *.
5953 * thread-db.c (thread_db_err_str): Make return type const char *.
5954 * utils.c (perror_with_name): Make arg const char *.
5956 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5958 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5959 when handling a EXIT_PROCESS_DEBUG_EVENT.
5961 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5963 * gdbreplay.c (gdbreplay_version): Update copyright year.
5964 * server.c (gdbserver_version): Likewise.
5966 2009-01-05 Doug Evans <dje@google.com>
5968 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5969 (handle_extended_wait): Improve comment.
5971 2008-12-13 Doug Evans <dje@google.com>
5973 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5974 * server.h (ATTR_MALLOC): New macro.
5975 (xmalloc,xcalloc,xstrdup): Declare.
5976 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5977 * inferiors.c: Ditto.
5978 * linux-low.c: Ditto.
5979 * mem-break.c: Ditto.
5980 * regcache.c: Ditto.
5981 * remote-utils.c: Ditto.
5984 * win32-low.c: Ditto.
5986 2008-12-12 Doug Evans <dje@google.com>
5988 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5989 in debugging printf.
5991 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5993 2008-12-09 Doug Evans <dje@google.com>
5995 * linux-low.h (struct process_info): Delete member tid, unused.
5996 * thread-db.c (find_one_thread): Update.
5997 (maybe_attach_thread): Update.
5999 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6001 * target.h (struct target_ops): Add qxfer_osdata member.
6002 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6004 (linux_qxfer_osdata): New functions.
6005 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6007 * server.c (handle_query): Handle "qXfer:osdata:read:".
6008 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6009 (buffer_xml_printf): New functions.
6010 * server.h (struct buffer): New.
6011 (buffer_grow_str, buffer_grow_str0): New macros.
6012 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6013 (buffer_xml_printf): Declare.
6015 2008-11-24 Doug Evans <dje@google.com>
6017 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6019 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6021 * server.c (handle_v_run): Always use the supplied argument list.
6023 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6025 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6026 (xtensa_regmap_table): Add entry for scompare1.
6028 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6030 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6031 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6032 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6033 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6034 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6035 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6036 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6037 XML target descriptions.
6038 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6039 when inferior is running on an ISA 2.05 or later processor. Add
6040 special case to return offset for full 64-bit slot of FPSCR when
6043 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6045 * Makefile.in (SFILES, clean): Added sparc64 files.
6046 (reg-sparc64.o, reg-sparc64.c): New.
6047 * configure.srv (sparc*-*-linux*): New configuration.
6048 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6049 syscall arguments for SPARC.
6050 (regsets_store_inferior_registers): Likewise.
6051 * linux-sparc-low.c: New file.
6053 2008-10-21 Doug Evans <dje@google.com>
6055 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6056 (READLINE_DIR,READLINE_DEP): Delete.
6057 (INTERNAL_CFLAGS): Update.
6058 (LINTFLAGS): Update.
6060 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6062 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6063 whole argv from the last run, not just argv[0].
6065 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6067 * regcache.c (new_register_cache): Return NULL if the register
6068 cache size isn't known yet.
6069 (free_register_cache): Avoid dereferencing a NULL regcache.
6071 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6073 * configure.srv: Merge MIPS and MIPS64.
6075 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6077 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6079 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6081 * Makefile.in: Add required vsx dependencies.
6083 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6084 Declare init_registers_powerpc_vsx32l.
6085 Declare init_registers_powerpc_vsx64l.
6086 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6087 (ppc_arch_setup): Check for VSX in hwcap.
6088 (ppc_fill_vsxregset): New function.
6089 (ppc_store_vsxregset): New function.
6090 Add new VSX entry in regset_info target_regsets.
6092 * configure.srv: Add new VSX dependencies.
6094 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6096 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6097 (remote_open): Set or clear transport_is_reliable.
6098 (putpkt_binary): Don't expect acks in noack mode.
6099 (getpkt): Don't send ack/nac in noack mode.
6100 * server.c (handle_general_set): Handle QStartNoAckMode.
6101 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6103 (main): Reset noack_mode on every connection.
6104 * server.h (noack_mode): Declare.
6106 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6108 * Makefile.in (GDBREPLAY_OBS): New variable.
6109 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6111 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6112 Daniel Jacobowitz <dan@codesourcery.com>
6114 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6115 (usr_store_inferior_registers): Likewise.
6116 (regsets_store_inferior_registers): Likewise.
6118 2008-07-31 Rolf Jansen <rj@surtec.com>
6119 Pedro Alves <pedro@codesourcery.com>
6121 * configure.ac: Check for memmem declaration.
6122 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6123 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6124 (disable_packet_qfThreadInfo): Unconditionally compile.
6125 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6126 * configure, config.in: Regenerate.
6128 2008-07-28 Doug Kwan <dougkwan@google.com>
6130 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6131 (linux_write_memory): Remove declaration of errno.
6133 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6135 * linux-low.c (handle_extended_wait): Do not use "status"
6136 variable uninitialized.
6138 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6140 * server.c (handle_v_attach): Inhibit reporting dll changes.
6142 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6144 * remote-utils.c (prepare_resume_reply): If requested, don't
6145 output "thread:TID" in the T stop reply.
6147 * server.c (disable_packet_vCont, disable_packet_Tthread)
6148 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6149 (handle_query): If requested, disable support for qC, qfThreadInfo
6151 (handle_v_requests): If requested, disable support for vCont.
6152 (gdbserver_show_disableable): New.
6153 (main): Handle --disable-packet and --disable-packet=LIST.
6155 * server.h (disable_packet_vCont, disable_packet_Tthread)
6156 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6158 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6160 * server.c (gdbserver_usage): Mention --version.
6162 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6164 * Makefile.in (gdbreplay.o): New rule.
6166 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6168 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6169 message, not gdbserver.
6171 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6172 Nathan Sidwell <nathan@codesourcery.com>
6173 Joseph Myers <joseph@codesourcery.com>
6175 * acinclude.m4: Include ../../config/acx.m4.
6176 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6177 * configure, config.in: Regenerate.
6178 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6179 * server.c (gdbserver_version): Print PKGVERSION.
6180 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6181 (main): Adjust gdbserver_usage calls.
6182 * gdbreplay.c (version, host_name): Add declarations.
6183 (gdbreplay_version, gdbreplay_usage): New.
6184 (main): Accept --version and --help options.
6186 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6188 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6189 (arm_breakpoint_at): Handle Thumb.
6190 (the_low_target): Add comment.
6192 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6194 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6196 2008-05-09 Doug Evans <dje@google.com>
6198 * server.h (decode_search_memory_packet): Declare.
6199 * remote-utils.c (decode_search_memory_packet): New fn.
6200 * server.c (handle_search_memory_1): New fn.
6201 (handle_search_memory): New fn.
6202 (handle_query): Process qSearch:memory packets.
6204 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6206 * regcache.c (registers_length): Remove.
6207 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6208 full register packet.
6209 * regcache.h (registers_length): Remove prototype.
6210 * server.h (PBUFSIZ): Define to 16384.
6212 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6214 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6215 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6216 powerpc-64l.o, and powerpc-altivec64l.o.
6217 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6218 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6219 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6220 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6221 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6224 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6225 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6226 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6227 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6228 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6229 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6230 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6231 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6232 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6233 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6236 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6237 (init_registers_powerpc_32l): ... this new prototype.
6238 (init_registers_powerpc_32): Remove, replace by ...
6239 (init_registers_powerpc_altivec32l): ... this new prototype.
6240 (init_registers_powerpc_e500): Remove, replace by ...
6241 (init_registers_powerpc_e500l): ... this new prototype.
6242 (init_registers_ppc64): Remove, replace by ...
6243 (init_registers_powerpc_64l): ... this new prototype.
6244 (init_registers_powerpc_64): Remove, replace by ...
6245 (init_registers_powerpc_altivec64l): ... this new prototype.
6246 (ppc_num_regs): Set to 73.
6247 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6248 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6249 (ppc_cannot_store_register): Handle orig_r3 and trap.
6250 (ppc_arch_setup): Update init_registers_... calls.
6251 (ppc_fill_gregset): Handle orig_r3 and trap.
6253 * inferiors.c (clear_inferiors): Reset current_inferior.
6255 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6257 * acinclude.m4: Add override.m4.
6258 * configure: Regenerate.
6260 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6262 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6263 initial call to init_register_ppc64.
6265 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6267 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6268 single powerpc*-*-linux* case.
6269 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6271 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6273 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6274 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6276 * linux-ppc-low.c: Include <elf.h>.
6277 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6278 (ppc_hwcap): New global variable.
6279 (ppc_regmap): Remove __SPE__ #ifdef sections.
6280 (ppc_regmap_e500): New global variable.
6281 (ppc_cannot_store_register): Update __SPE__ special case.
6282 (ppc_get_hwcap): New function.
6283 (ppc_arch_setup): Use it to determine whether inferior supports
6284 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6285 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6286 Do not access registers if target does not support AltiVec.
6287 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6288 Do not access registers if target does not support SPE.
6289 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6291 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6293 * linux-low.c (disabled_regsets, num_regsets): New.
6294 (use_regsets_p): Delete.
6295 (linux_wait_for_process): Clear disabled_regsets.
6296 (regsets_fetch_inferior_registers): Check and set it.
6297 (regsets_store_inferior_registers): Likewise.
6298 (linux_fetch_registers, linux_store_registers): Do not use
6300 (initialize_low): Allocate disabled_regsets.
6302 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6304 * Makefile.in (LIBOBJS): New.
6306 (memmem.o): New rule.
6307 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6308 * configure: Regenerated.
6310 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6312 * server.c (handle_query): Never return "unsupported" for
6313 qXfer:features:read queries.
6315 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6317 * server.c (get_features_xml): Fix inverted condition.
6318 (handle_query): Always support qXfer:feature:read.
6320 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6322 * server.c (wrapper_argv): New.
6323 (start_inferior): Handle wrapper_argv. If set, expect an extra
6325 (gdbserver_usage): Document --wrapper.
6326 (main): Parse --wrapper.
6328 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6330 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6331 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6332 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6333 (ppc_set_pc): Likewise.
6334 (ppc_arch_setup): New function.
6335 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6336 of collect_register.
6337 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6339 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6341 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6342 instead of linux-ppc64-low.o.
6343 * linux-ppc64-low.c: Remove file.
6344 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6345 (linux-ppc64-low.o): Remove rule.
6347 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6348 (init_registers_powerpc_64): Likewise.
6349 (ppc_regmap): Conditionally define depending on __powerpc64__.
6350 (ppc_cannot_store_register): Do not special-case "fpscr" when
6351 compiled on __powerpc64__.
6352 (ppc_collect_ptrace_register): New function.
6353 (ppc_supply_ptrace_register): New function.
6354 (ppc_breakpoint): Change type to "unsigned int".
6355 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6356 (the_low_target): Conditionally provide initializers for the
6357 arch_setup member depending on __powerpc64__. Install
6358 collect_ptrace_register and supply_ptrace_register members.
6360 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6362 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6363 * server.c (gdbserver_xmltarget): Define.
6364 (get_features_xml): Use it to replace "target.xml" and arch_string.
6366 * configure.srv: Remove srv_xmltarget. Add XML files that were
6367 mentioned there to srv_xmlfiles instead. Remove conditional tests
6368 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6369 srv_xmlfiles and srv_regobj to include all possible choices.
6370 * configure.ac (srv_xmltarget): Remove.
6371 (srv_xmlfiles): Do not add "target.xml".
6372 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6373 checks for supplementary target information.
6374 * configure: Regenerate.
6375 * Makefile.in (XML_TARGET): Remove.
6376 (target.xml): Remove rule.
6377 (clean): Do not clean up target.xml.
6378 (.PRECIOUS): Do not mention target.xml.
6380 * target.h (struct target_ops): Remove arch_string member.
6381 * linux-low.c (linux_arch_string): Remove.
6382 (linux_target_ops): Remove arch_string initializer.
6383 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6384 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6385 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6386 * spu-low.c (spu_arch_string): Remove.
6387 (spu_target_ops): Remove arch_string initializer.
6388 * win32-low.c (win32_arch_string): Remove.
6389 (win32_target_ops): Remove arch_string initializer.
6390 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6391 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6392 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6394 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6396 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6397 by collect_ptrace_register and supply_ptrace_register hooks.
6398 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6399 instead of checking for the_low_target.left_pad_xfer.
6400 (usr_store_inferior_registers): Use collect_ptrace_register callback
6401 instead of checking for the_low_target.left_pad_xfer.
6403 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6404 (s390_supply_ptrace_register): Likewise.
6405 (s390_fill_gregset): Call s390_collect_ptrace_register.
6406 (the_low_target): Update.
6408 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6409 (ppc_supply_ptrace_register): Likewise.
6410 (the_low_target): Update.
6412 * linux-i386-low.c (the_low_target): Update.
6413 * linux-x86-64-low.c (the_low_target): Update.
6415 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6417 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6418 reg-s390.o and reg-s390x.o.
6420 * linux-low.c (new_inferior): New global variable.
6421 (linux_create_inferior, linux_attach): Set it.
6422 (linux_wait_for_process): Call the_low_target.arch_setup after the
6423 target has stopped for the first time.
6424 (initialize_low): Do not call the_low_target.arch_setup.
6426 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6427 (s390_set_pc): Likewise.
6428 (s390_arch_setup): New function.
6429 (the_low_target): Use s390_arch_setup as arch_setup routine.
6431 * regcache.c (realloc_register_cache): New function.
6432 (set_register_cache): Call it for each existing regcache.
6434 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6436 * server.h (init_registers): Remove prototype.
6438 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6439 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6440 instead of init_registers ().
6441 * linux-arm-low.c (init_registers_arm): Add prototype.
6442 (init_registers_arm_with_iwmmxt): Likewise.
6443 (the_low_target): Add initializer for arch_setup field.
6444 * linux-cris-low.c (init_registers_cris): Add prototype.
6445 (the_low_target): Add initializer for arch_setup field.
6446 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6447 (the_low_target): Add initializer for arch_setup field.
6448 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6449 (the_low_target): Add initializer for arch_setup field.
6450 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6451 (the_low_target): Add initializer for arch_setup field.
6452 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6453 (the_low_target): Add initializer for arch_setup field.
6454 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6455 (the_low_target): Add initializer for arch_setup field.
6456 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6457 (init_registers_mips64_linux): Likewise.
6458 (the_low_target): Add initializer for arch_setup field.
6459 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6460 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6461 (the_low_target): Add initializer for arch_setup field.
6462 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6463 (init_registers_powerpc_64): Likewise.
6464 (the_low_target): Add initializer for arch_setup field.
6465 * linux-s390-low.c (init_registers_s390): Add prototype.
6466 (init_registers_s390x): Likewise.
6467 (the_low_target): Add initializer for arch_setup field.
6468 * linux-sh-low.c (init_registers_sh): Add prototype.
6469 (the_low_target): Add initializer for arch_setup field.
6470 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6471 (the_low_target): Add initializer for arch_setup field.
6472 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6473 (the_low_target): Add initializer for arch_setup field.
6475 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6476 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6477 instead of init_registers ().
6478 * win32-arm-low.c (init_registers_arm): Add prototype.
6479 (the_low_target): Add initializer for arch_setup field.
6480 * win32-i386-low.c (init_registers_i386): Add prototype.
6481 (the_low_target): Add initializer for arch_setup field.
6483 * spu-low.c (init_registers_spu): Add prototype.
6484 (initialize_low): Call initialie_registers_spu () instead of
6485 initialize_registers ().
6487 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6489 * server.c (handle_v_requests): When handling the vRun and vAttach
6490 packets, if already debugging a process, don't kill it. Return an
6493 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6495 * server.c (handle_query): Correct length check.
6497 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6499 * win32-low.c (do_initial_child_stuff): Add process handle
6500 parameter. Set current_process_handle and current_process_id from the
6501 parameters. Clear globals.
6502 (win32_create_inferior): Don't set current_process_handle and
6503 current_process_id here. Instead pass them on the call to
6504 do_initial_child_stuff.
6505 (win32_attach): Likewise.
6506 (win32_clear_inferiors): New.
6507 (win32_kill): Don't close the current process handle or the
6508 current thread handle here. Instead call win32_clear_inferiors.
6509 (win32_detach): Don't open a new handle to the process. Call
6510 win32_clear_inferiors.
6511 (win32_join): Don't rely on current_process_handle; open a new
6512 handle using the process id.
6513 (win32_wait): Call win32_clear_inferiors when the inferior process
6516 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6518 * server.c (monitor_show_help): Add "exit".
6520 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6522 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6523 (clean): Add reg-xtensa.c.
6524 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6525 * configure.srv (xtensa*-*-linux*) New target.
6526 * linux-xtensa-low.c: New.
6527 * xtensa-xtregs.c: New.
6529 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6531 * hostio.c: Don't include errno.h.
6532 (errno_to_fileio_errno): Move to hostio-errno.
6533 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6534 error number outputting to the target->hostio_last_error callback.
6535 (hostio_packet_error): Use FILEIO_EINVAL directly.
6536 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6537 calls to hostio_error.
6538 * hostio-errno.c: New.
6539 * server.h (hostio_last_error_from_errno): Declare.
6540 * target.h (target_ops): Add hostio_last_error member.
6541 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6542 as hostio_last_error handler.
6543 * spu-low.c (spu_target_ops): Likewise.
6544 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6545 (wince_hostio_last_error): New functions.
6546 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6547 as hostio_last_error handler.
6548 (win32_target_ops) [!_WIN32_WCE]: Register
6549 hostio_last_error_from_errno as hostio_last_error handler.
6550 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6551 (hostio-errno.o): New rule.
6552 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6553 * configure.srv (srv_hostio_err_objs): New variable. Default to
6555 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6556 * configure: Regenerate.
6558 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6560 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6561 (linux_kill, linux_detach): Clean up the process list.
6562 * remote-utils.c (remote_open): Improve port number parsing.
6563 (putpkt_binary, input_interrupt): Only send interrupts if the target
6565 * server.c (extended_protocol): Make static.
6566 (attached): Define earlier.
6567 (exit_requested, response_needed, program_argv): New variables.
6568 (target_running): New.
6569 (start_inferior): Clear attached here.
6570 (attach_inferior): Set attached here.
6571 (require_running): Define.
6572 (handle_query): Use require_running and target_running. Implement
6574 (handle_v_attach, handle_v_run): New.
6575 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6576 (gdbserver_usage): Update.
6577 (main): Redo argument parsing. Handle --debug and --multi. Handle
6578 --attach along with other options or after the port. Save
6579 program_argv. Support no initial program. Resynchronize
6580 communication with GDB after an error. Handle "monitor exit".
6581 Use require_running and target_running. Always allow the extended
6582 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6583 restart in extended mode.
6584 * README: Refer to the GDB manual. Update --attach usage.
6586 2007-12-20 Andreas Schwab <schwab@suse.de>
6588 * linux-low.c (STACK_SIZE): Define.
6589 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6590 (linux_test_for_tracefork): Likewise.
6592 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6594 * linux-low.c (linux_wait_for_event): Update messages. Do not
6595 reinsert auto-delete breakpoints.
6596 * mem-break.c (struct breakpoint): Change return type of handler to
6598 (set_breakpoint_at): Update handler type.
6599 (reinsert_breakpoint_handler): Return 1 instead of calling
6601 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6603 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6604 * mem-break.h (set_breakpoint_at): Update handler type.
6605 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6606 * win32-low.c (auto_delete_breakpoint): New.
6607 (get_child_debug_event): Use it.
6609 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6611 * configure.ac: Check for pread and pwrite.
6612 * hostio.c (handle_pread): Fall back to lseek and read.
6613 (handle_pwrite): Fall back to lseek and write.
6614 * config.in, configure: Regenerated.
6616 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6618 * server.c (myresume): Add own_buf argument.
6619 (main): Update calls.
6621 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6623 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6624 * remote-utils.c (remote_open): Do not call disable_async_io.
6625 (block_async_io): Delete.
6626 (unblock_async_io): Make static.
6627 (initialize_async_io): New.
6628 * server.c (handle_v_cont): Handle async I/O here.
6629 (myresume): Likewise. Move other common resume tasks here...
6630 (main): ... from here. Call initialize_async_io. Disable async
6631 I/O before the main loop.
6632 * server.h (initialize_async_io): Declare.
6633 (block_async_io, unblock_async_io): Delete prototypes.
6634 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6636 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6638 * remote-utils.c (readchar): Allow binary data in received messages.
6640 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6642 * win32-low.c (attaching): New global.
6643 (win32_create_inferior): Clear the `attaching' global.
6644 (win32_attach): Set the `attaching' global.
6645 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6646 attaching. Only set a breakpoint at the entry point if not
6649 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6651 * server.c (main): Don't report dll events on the initial
6652 connection on attaches.
6654 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6656 * server.c (main): Relax numerical bases supported for the pid of
6657 the --attach command line argument.
6659 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6661 * win32-low.c (win32_attach): Call OpenProcess before
6662 DebugActiveProcess, not after. Add last error output to error
6665 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6667 * win32-low.c (win32_get_thread_context)
6668 (win32_set_thread_context): New functions.
6669 (thread_rec): Use win32_get_thread_context.
6670 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6671 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6674 2007-12-03 Leo Zayas
6675 Pedro Alves <pedro_alves@portugalmail.pt>
6677 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6679 (child_add_thread): Minor cleanup.
6680 (child_continue): Resume artificially suspended threads before
6681 calling ContinueDebugEvent.
6682 (suspend_one_thread): New.
6683 (fake_breakpoint_event): New.
6684 (get_child_debug_event): Change return type to int. Check here if
6685 gdb sent an interrupt request. If a soft interrupt was requested,
6686 fake a breakpoint event. Return 0 if there is no event to handle,
6688 (win32_wait): Don't check here if gdb sent an interrupt request.
6689 Ensure there is a valid event to handle.
6690 (win32_request_interrupt): Add soft interruption method as last
6693 2007-12-03 Leo Zayas
6694 Pedro Alves <pedro_alves@portugalmail.pt>
6696 * win32-low.h (win32_thread_info): Add descriptions to the
6697 structure members. Replace `suspend_count' counter by a
6699 * win32-low.c (thread_rec): Update condition of when to get the
6700 context from the inferior. Rely on ContextFlags being set if it
6701 has already been retrieved. Only suspend the inferior thread if
6702 we haven't already. Warn if that fails.
6703 (continue_one_thread): s/suspend_count/suspended/. Only call
6704 ResumeThread once. Warn if that fails.
6706 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6708 * win32-low.c (win32_wait): Don't read from the inferior when it
6711 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6713 * Makefile.in (win32_low_h): New variable.
6714 (win32-low.o): Add dependency on $(win32_low_h).
6715 (win32-arm-low.o, win32-i386-low.o): New rules.
6717 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6719 * hostio.c: Correct copyright year.
6721 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6723 * Makefile.in (OBS): Add hostio.o.
6724 (hostio.o): New rule.
6725 * server.h (handle_vFile): Declare.
6726 * hostio.c: New file.
6727 * server.c (handle_v_requests): Take packet_len and new_packet_len
6728 for binary packets. Call handle_vFile.
6729 (main): Update call to handle_v_requests.
6731 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6733 * linux-low.c: Include <sched.h>.
6735 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6737 * linux-low.c (linux_tracefork_grandchild): New.
6738 (linux_tracefork_child): Use clone.
6739 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6741 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6743 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6745 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6747 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6749 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6751 * inferiors.c (change_inferior_id): Delete.
6752 (add_pid_to_list, pull_pid_from_list): New.
6753 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6754 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6755 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6756 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6757 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6758 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6759 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6760 (using_threads): Always set to 1.
6761 (handle_extended_wait): New.
6762 (add_process): Do not set TID.
6763 (linux_create_inferior): Set must_set_ptrace_flags.
6764 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6765 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6766 (linux_thread_alive): Rename TID argument to LWPID.
6767 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6768 (linux_wait_for_event): Do not use TID or check using_threads. Update
6769 call to dead_thread_notify. Call handle_extended_wait.
6770 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6771 (send_sigstop): Delete sigstop_sent.
6772 (wait_for_sigstop): Avoid TID.
6773 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6774 (linux_test_for_tracefork): New.
6775 (linux_lookup_signals): Use thread_db_active and
6776 linux_supports_tracefork_flag.
6777 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6778 * linux-low.h (get_process_thread): Avoid TID.
6779 (struct process_ifo): Move thread_known and tid to the end. Remove
6781 (linux_attach_lwp, thread_db_init): Update prototypes.
6782 * server.h (change_inferior_id): Delete prototype.
6783 (add_pid_to_list, pull_pid_from_list): New prototypes.
6784 * thread-db.c (thread_db_use_events): New.
6785 (find_first_thread): Rename to...
6786 (find_one_thread): ...this. Update callers and messages. Do not
6787 call fatal. Check thread_db_use_events. Do not call
6788 change_inferior_id or new_thread_notify.
6789 (maybe_attach_thread): Update. Do not call new_thread_notify.
6790 (thread_db_init): Set thread_db_use_events. Check use_events.
6791 * utils.c (fatal, warning): Correct message prefix.
6793 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6795 * Makefile.in (clean): Remove new files.
6796 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6797 (powerpc-64.o, powerpc-64.c): New rules.
6798 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6799 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6801 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6803 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6804 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6805 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6806 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6807 (target_regsets): Add AltiVec and SPE register sets.
6808 * configure.ac: Check for AltiVec and SPE.
6809 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6810 (ppc_fill_vrregset, ppc_store_vrregset): New.
6811 (target_regsets): Add AltiVec register set.
6812 * configure: Regenerated.
6814 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6816 * linux-low.c (O_LARGEFILE): Define.
6817 (linux_read_memory): Use /proc/PID/mem.
6818 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6819 * configure, config.in: Regenerated.
6821 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6823 * linux-low.c (linux_wait_for_event): Do not pass signals while
6826 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6828 * win32-low.c (create_process): New.
6829 (win32_create_inferior): Use create_process instead of
6830 CreateProcess. If create_process failed retry appending an ".exe"
6831 suffix. Store the GetLastError result immediatelly after
6832 create_process calls and use it on the call to error.
6834 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6836 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6838 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6840 * configure.ac: Switch license to GPLv3.
6842 2007-08-01 Michael Snyder <msnyder@access-company.com>
6844 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6846 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6848 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6850 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6851 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6852 CloseToolhelp32Snapshot.
6853 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6854 CloseToolhelp32Snapshot.
6856 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6858 * server.c (main): Check for inferior exit before main loop.
6860 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6862 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6863 instead of on tmp_desc.
6865 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6866 Daniel Jacobowitz <dan@codesourcery.com>
6868 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6869 (add_thread): Minor cleanups.
6870 (clear_inferiors): Move lower in the file. Clear the DLL
6872 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6873 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6874 (xml_escape_text): New.
6875 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6877 (handle_v_cont): Report errors.
6878 (gdbserver_version): Update.
6879 (main): Correct size of own_buf. Do not report initial DLL events.
6880 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6881 (unloaded_dll, xml_escape_text): New.
6882 * win32-low.c (enum target_waitkind): Update comments.
6883 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6884 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6885 (win32_EnumProcessModules, win32_GetModuleInformation)
6886 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6887 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6888 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6889 (win32_Module32First, win32_Module32Next, load_toolhelp)
6890 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6891 (get_child_debug_event): Handle DLL events.
6892 (win32_wait): Likewise.
6894 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6896 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6897 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6899 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6901 * win32-low.c (handle_output_debug_string): Ignore event if not
6904 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6906 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6908 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6910 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6912 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6914 * inferiors.c (change_inferior_id): Add comment.
6915 * linux-low.c (check_removed_breakpoint): Add an early
6916 prototype. Improve debug output.
6917 (linux_attach): Doc update.
6918 (linux_detach_one_process, linux_detach): Clean up before releasing
6920 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6921 * linux-low.h (struct process_info): Doc improvement.
6922 * mem-break.c (delete_all_breakpoints): New.
6923 * mem-break.h (delete_all_breakpoints): New prototype.
6924 * thread-db.c (find_first_thread): New.
6925 (thread_db_create_event): Call it instead of
6926 thread_db_find_new_threads. Clean up unused variables.
6927 (maybe_attach_thread): Remove first thread handling.
6928 (thread_db_find_new_threads): Use find_first_thread.
6929 (thread_db_get_tls_address): Likewise.
6931 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6933 * thread-db.c (thread_db_find_new_threads): Add prototype.
6934 (thread_db_create_event): Check for the main thread before adding
6936 (maybe_attach_thread): Only enable event reporting if TID == 0.
6937 (thread_db_get_tls_address): Check for new threads.
6939 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6941 * linux-low.c (linux_create_inferior): Try execv before execvp.
6942 * spu-low.c (spu_create_inferior): Likewise.
6944 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6946 * linux-low.c (linux_create_inferior): Change execv to execvp.
6947 * spu-low.c (spu_create_inferior): Likewies.
6949 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6951 * Makefile.in (clean): Clean new files instead of deleted ones.
6952 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6953 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6955 * configure.srv: Specify XML files and new regformats for MIPS and
6957 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6958 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6959 an entry for the restart register.
6960 (mips_cannot_fetch_register, mips_cannot_store_register)
6961 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6962 register names to match the XML descriptions.
6963 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6964 restart register instead of $0.
6966 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6967 Markus Deuling <deuling@de.ibm.com>
6969 * remote-utils.c (decode_xfer_write): New function.
6970 * server.h (decode_xfer_write): Add prototype.
6971 * server.c (handle_query): Add PACKET_LEN argument. Support
6972 qXfer:spu:read and qXfer:spu:write packets.
6973 (main): Pass packet_len to handle_query.
6974 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6975 * target.h (target_ops): Add qxfer_spu.
6977 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6979 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6980 accessing non-seekable spufs files.
6982 2007-05-16 Markus Deuling <deuling@de.ibm.com>
6984 * server.c (handle_query): Add reply for qC packet.
6986 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6987 Leo Zayas <lerele@champenstudios@com>
6989 * server.h (check_remote_input_interrupt_request): New function.
6990 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6991 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6992 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6993 (check_remote_input_interrupt_request): New function.
6994 * server.h (check_remote_input_interrupt_request): Declare.
6995 * win32-low.c (winapi_DebugBreakProcess,
6996 winapi_GenerateConsoleCtrlEvent): New typedefs.
6997 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6999 (win32_wait): Check for remote interrupt request
7000 with check_remote_input_interrupt_request.
7001 (win32_request_interrupt): New function.
7002 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7004 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7006 * win32-low.c (debug_registers_changed,
7007 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7008 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7009 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7010 (thread_rec): Get context using the low target.
7011 (child_add_thread): Call thread_added on the low target,
7012 which does the same thing.
7014 (do_initial_child_stuff): Remove debug registers references.
7015 Set context using the low target. Resume threads after
7016 setting the contexts.
7017 (child_continue): Remove dead variable. Remove debug
7018 registers references.
7019 (child_fetch_inferior_registers): Go through the low target.
7020 (do_child_store_inferior_registers): Remove.
7021 (child_store_inferior_registers): Go through the low target.
7022 (win32_resume): Remove debug registers references.
7023 Set context using the low target.
7024 (handle_exception): Change return type to void. Don't record
7025 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7026 first chance exception.
7027 (get_child_debug_event): Change return type to void. Remove
7028 goto loop. Always return after waiting for debug event.
7029 (win32_wait): Convert to switch statement. Handle spurious
7032 * win32-i386-low.c (debug_registers_changed,
7033 debug_registers_used): New.
7034 (initial_stuff): Rename to ...
7035 (i386_initial_stuff): ... this. Clear debug registers
7037 (store_debug_registers): Delete.
7038 (i386_get_thread_context): New.
7039 (load_debug_registers): Delete.
7040 (i386_set_thread_context): New.
7041 (i386_thread_added): New.
7042 (single_step): Rename to ...
7043 (i386_single_step): ... this.
7044 (do_fetch_inferior_registers): Rename to ...
7045 (i386_fetch_inferior_register): ... this.
7046 (i386_store_inferior_register): New.
7047 (the_low_target): Adapt to new interface.
7049 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7050 (arm_get_thread_context): New.
7051 (arm_set_thread_context): New.
7053 (do_fetch_inferior_registers): Rename to ...
7054 (arm_fetch_inferior_register): ... this.
7055 (arm_store_inferior_register): New.
7056 (arm_wince_breakpoint): Reimplement as unsigned long.
7057 (arm_wince_breakpoint_len): Define.
7058 (the_low_target): Adapt to new interface.
7060 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7061 load_debug_registers. Add get_thread_context, set_thread_context,
7062 thread_added and store_inferior_register. Rename
7063 fetch_inferior_registers to fetch_inferior_register.
7064 (regptr): Remove declaration.
7066 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7068 * linux-low.c (linux_detach): Change return type to int. Return 0.
7069 * spu-low.c (spu_detach): Likewise.
7071 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7073 * target.h (target_ops): Change return type of detach to int.
7075 (join_inferior): New.
7076 * server.c (main): Don't skip detach support on mingw32.
7077 If the inferior doesn't support detaching return error.
7078 Call join_inferior instead of using waitpid.
7079 * linux-low.c (linux_join): New.
7080 (linux_target_op): Add linux_join.
7081 * spu-low.c (spu_join): New.
7082 (spu_target_ops): Add spu_join.
7083 * win32-low.c (win32_detach): Adapt to new interface.
7084 Reopen current_process_handle before detaching. Issue a child
7085 resume before detaching.
7087 (win32_target_op): Add win32_join.
7089 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7091 * win32-low.c (win32-attach): Fix return value.
7092 * target.h (target_ops): Describe ATTACH return values.
7094 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7096 * win32-low.c (GETPROCADDRESS): Define.
7097 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7098 (winapi_DebugSetProcessKillOnExit): Likewise.
7099 (win32_create_inferior): Force usage of ansi CreateProcessA.
7100 (win32_attach): Use GETPROCADDRESS.
7101 (win32_detach): Likewise.
7103 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7105 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7107 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7109 * win32-low.c: Commit leftover changes from 2007-03-29.
7111 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7113 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7114 fields short instead of int. Add explicit padding.
7115 (i387_cache_to_fsave): Remove unnecessary casts.
7116 (i387_fsave_to_cache): Doc fix.
7117 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7119 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7121 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7122 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7124 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7126 * configure.srv (arm*-*-mingw32ce*): Move near the other
7129 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7131 * configure.ac: Add errno checking.
7132 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7133 sys/file.h and malloc.h.
7134 (AC_CHECK_DECLS): Add perror.
7135 (srv_mingwce): Handle.
7136 * configure.srv (i[34567]86-*-cygwin*): Add
7137 win32-i386-low.o to srv_tgtobj.
7138 (i[34567]86-*-mingw*): Likewise.
7139 (arm*-*-mingw32ce*): Add case.
7140 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7141 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7142 [__MINGW32CE__] (strerror): New function.
7143 [__MINGW32CE__] (errno): Define to GetLastError.
7144 [__MINGW32CE__] (COUNTOF): New macro.
7145 (remote_open): Remove extra close call.
7146 * mem-break.c (delete_breakpoint_at): New function.
7147 * mem-break.h (delete_breakpoint_at): Declare.
7148 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7149 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7150 [USE_WIN32API] (read, write): Add char* casts.
7151 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7152 * server.h: Include wincecompat.h on Windows CE.
7153 [HAVE_ERRNO_H]: Check.
7154 (perror): Declare if not declared.
7155 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7156 (perror_with_name): Remove errno declaration.
7157 * wincecompat.h: New.
7158 * wincecompat.c: New.
7160 * win32-arm-low.c: New.
7161 * win32-i386-low.c: New.
7162 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7163 (OUTMSG2): Make it safe.
7165 (COUNTOF): New macro.
7166 (NUM_REGS): Get it from the low target.
7167 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7168 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7169 (thread_rec): Let low target handle debug registers.
7170 (child_add_thread): Likewise.
7171 (child_init_thread_list): Likewise.
7172 (continue_one_thread): Likewise.
7174 (do_child_fetch_inferior_registers): Move to ...
7175 * win32-i386-low.c: ... here, and rename to ...
7176 (do_fetch_inferior_registers): ... this.
7177 * win32-low.c (child_fetch_inferior_registers):
7178 Go through the low target.
7179 (do_child_store_inferior_registers): Use regptr.
7180 (strwinerror): New function.
7181 (win32_create_inferior): Handle Windows CE.
7182 Use strwinerror instead of strerror on Windows error
7183 codes. Add program to the error output.
7184 Don't close the main thread handle on Windows CE.
7185 (win32_attach): Use coredll.dll on Windows CE.
7186 (win32_kill): Close current process and current
7188 (win32_detach): Use coredll.dll on Windows CE.
7189 (win32_resume): Let low target handle debug registers, and
7191 (handle_exception): Add/Remove initial breakpoint. Avoid
7192 non-existant WSTOPSIG on Windows CE.
7193 (win32_read_inferior_memory): Cast to remove warning.
7194 (win32_arch_string): Go through the low target.
7195 (initialize_low): Call set_breakpoint_data with the low
7196 target's breakpoint.
7197 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7198 FOP_REGNUM, mappings): Move to ...
7199 * win32-i386-low.c: ... here.
7200 * win32-low.c (win32_thread_info): Move to ...
7201 * win32-low.h: ... here.
7202 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7203 win32-arm-low.c and wincecompat.c.
7204 (all:): Add $EXEEXT.
7205 (install-only:): Likewise.
7206 (gdbserver:): Likewise.
7207 (gdbreplay:): Likewise.
7208 * config.in: Regenerate.
7209 * configure: Regenerate.
7211 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7213 * win32-low.c: Rename typedef thread_info to
7214 win32_thread_info throughout.
7216 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7218 * win32-i386-low.c: Rename to ...
7219 * win32-low.c: ... this.
7220 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7221 * Makefile.in: Likewise.
7223 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7225 * remote-utils.c (monitor_output): Constify msg parameter.
7226 * server.h (monitor_output): Likewise.
7227 * win32-i386-low.c (handle_output_debug_string): New.
7228 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7229 handle_output_debug_string.
7230 (get_child_debug_event): Likewise.
7232 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7234 * server.c (main): Correct strtoul check.
7236 2007-03-27 Jon Ringle <jon@ringle.org>
7238 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7240 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7242 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7244 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7246 * terminal.h: Check HAVE_SGTTY_H.
7248 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7250 * remote-utils.c (remote_open): Print out the assigned port number.
7252 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7254 * remote-utils.c (monitor_output): New function.
7255 * server.c (debug_threads): Define here.
7256 (monitor_show_help): New function.
7257 (handle_query): Handle qRcmd.
7258 (main): Do not handle 'd' packet.
7259 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7260 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7263 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7265 * Makefile.in (EXEEXT): New.
7266 (clean): Use $(EXEEXT).
7268 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7270 * target.h (target_ops): Rename send_signal to request_interrupt,
7271 and remove enum target_signal parameter.
7272 * linux-low.c (linux_request_interrupt): Rename from
7273 linux_send_signal, and always send SIGINT.
7274 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7275 and always send SIGINT.
7276 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7278 (input_interrupt): Likewise.
7280 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7282 * server.c (get_features_xml): Check if target implemented
7284 * win32-i386-low.c (win32_arch_string): New.
7285 (win32_target_ops): Add win32_arch_string as arch_string member.
7287 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7289 * spu-low.c (spu_arch_string): New.
7290 (spu_target_ops): Add spu_arch_string.
7292 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7294 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7295 * configure.ac: Do not check for terminal.h.
7296 * configure, config.in: Regenerated.
7298 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7300 * Makefile.in (OBS): Add $(XML_BUILTIN).
7301 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7303 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7304 (arm-with-iwmmxt.c): New.
7305 * config.in, configure: Regenerate.
7306 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7307 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7308 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7309 (arm*-*-linux*): Add iWMMXt and regset support.
7310 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7311 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7312 (arm_store_wmmxregset, target_regsets): New.
7313 * server.c (get_features_xml): Take annex argument. Check builtin
7315 (handle_query): Handle multiple annexes.
7317 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7319 * remote-utils.c [USE_WIN32API] (read, write): Define.
7320 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7323 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7325 * linux-i386-low.c (the_low_target): Set arch_string.
7326 * linux-x86-64-low.c (the_low_target): Likewise.
7327 * linux-low.c (linux_arch_string): New.
7328 (linux_target_ops): Add it.
7329 * linux-low.h (struct linux_target_ops): Add arch_string.
7330 * server.c (write_qxfer_response): Use const void * for DATA.
7331 (get_features_xml): New.
7332 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7333 * target.h (struct target_ops): Add arch_string method.
7335 2007-01-03 Denis Pilat <denis.pilat@st.com>
7336 Daniel Jacobowitz <dan@codesourcery.com>
7338 * linux-low.c (linux_kill): Handle being called with no threads.
7339 * win32-i386-low.c (win32_kill): Likewise.
7340 (get_child_debug_event): Clear current_process_handle.
7342 2006-12-30 Denis PILAT <denis.pilat@st.com>
7343 Daniel Jacobowitz <dan@codesourcery.com>
7345 * remote-utils.c (remote_open): Check the type of specified
7346 serial port devices before opening them.
7347 * server.c (main): Kill the inferior if an error occurs during
7348 the first remote_open.
7350 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7352 * README: Update supported targets.
7354 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7356 * Makefile.in (clean): Remove reg-mips64.c.
7357 (reg-mips64.c, reg-mips64.o): New rules.
7358 * configure.srv: Handle mips64. Include regset support for mips.
7359 * linux-mips-low.c (union mips_register): New.
7360 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7361 (mips_breakpoint, mips_breakpoint_at): Use int.
7362 (mips_collect_register, mips_supply_register)
7363 (mips_collect_register_32bit, mips_supply_register_32bit)
7364 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7365 (mips_store_fpregset, target_regsets): New.
7366 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7368 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7370 * configure.srv: Add target "spu*-*-*".
7371 * Makefile.in (clean): Remove reg-spu.c.
7372 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7373 * spu-low.c: New file.
7375 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7377 * configure.ac: Correct td_thr_tls_get_addr test.
7378 * configure: Regenerated.
7380 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7382 * linux-low.c (linux_wait_for_event): Reformat. Use the
7384 * remote-utils.c (decode_address_to_semicolon): New.
7385 * server.c (pass_signals, handle_general_set): New.
7386 (handle_query): Mention QPassSignals for qSupported.
7387 (main): Call handle_general_set.
7388 * server.h (pass_signals, decode_address_to_semicolon): New.
7390 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7392 * server.c (handle_query): Correct error handling for read_auxv.
7394 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7396 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7397 and srv_linux_thread_db to yes.
7398 * linux-s390-low.c (s390_fill_gregset): New function.
7399 (target_regsets): Define data structure.
7401 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7403 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7404 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7405 * config.in, configure: Regenerated.
7406 * inferiors.c (gdb_id_to_thread): New function.
7407 (gdb_id_to_thread_id): Use it.
7408 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7409 * linux-low.h (struct process_info): Add th member.
7410 (thread_db_get_tls_address): New prototype.
7411 * remote-utils.c (decode_address): Make non-static.
7412 * server.c (handle_query): Handle qGetTLSAddr.
7413 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7414 * target.h (struct target_ops): Add get_tls_address.
7415 * thread-db.c (maybe_attach_thread): Save the thread handle.
7416 (thread_db_get_tls_address): New.
7418 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7420 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7421 (linux_resume_one_process): Take a siginfo_t *. Update all
7422 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7423 (struct pending_signals): Add a siginfo_t.
7424 (linux_wait_for_process): Always set last_status.
7425 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7426 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7427 * linux-low.h (struct process_info): Add last_status.
7429 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7431 * remote-utils.c (try_rle): New function.
7432 (putpkt_binary): Use it.
7434 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7436 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7437 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7438 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7439 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7440 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7443 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7445 * server.c (terminal_fd): New variable.
7446 (old_foreground_pgrp): Likewise.
7447 (restore_old_foreground_pgrp): New function.
7448 (start_inferior): Record the terminal file descriptor in terminal_fd
7449 and its original foreground group in old_foreground_pgrp. Register
7450 restore_old_foreground_pgrp with atexit().
7452 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7454 * server.c (handle_query): Correct qPart to qXfer.
7456 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7458 * configure.ac: Check for more headers which are missing on
7459 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7460 * configure.srv: Add Cygwin and mingw32.
7461 * remote-utils.c: Don't include headers unconditionally which
7462 are missing on mingw32. Include <winsock.h> for mingw32.
7463 (remote_open): Adjust for mingw32 support. Flush
7464 standard error after writing to it.
7465 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7466 (unblock_async_io, enable_async_io, disable_async_io)
7467 (readchar, getpkt): Update for Winsock support.
7468 (prepare_resume_reply): Expect a protocol signal number.
7469 * server.c: Disable <sys/wait.h> on mingw32.
7470 (start_inferior): Adjust for mingw32 support. Flush
7471 standard error after writing to it.
7472 (attach_inferior): Likewise. Use protocol signal
7474 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7476 * win32-i386-low.c: New file.
7477 * Makefile.in (XM_CLIBS): Set.
7478 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7479 (win32-i386-low.o): New dependency rule.
7480 * linux-low.c (linux_wait): Use target signal numbers.
7481 * target.h (struct target_ops): Doc fix.
7482 * server.h (target_signal_to_name): New prototype.
7483 * gdbreplay.c: Don't include headers unconditionally which
7484 are missing on mingw32. Include <winsock.h> for mingw32.
7485 (remote_close, remote_open): Adjust for Winsock support.
7486 * configure, config.in: Regenerated.
7488 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7490 * server.c (decode_xfer_read, write_qxfer_response): New.
7491 (handle_query): Take a packet length argument. Handle
7492 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7493 the qSupported response.
7494 (main): Update call to handle_query.
7496 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7498 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7499 (putpkt_binary): Renamed from putpkt and adjusted for binary
7501 (putpkt): New wrapper for putpkt_binary.
7502 (readchar): Don't mask off the high bit.
7503 (decode_X_packet): New function.
7504 * server.c (main): Call putpkt_binary if a handler sets the packet
7505 length. Save the length of the incoming packet. Handle 'X'.
7506 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7508 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7510 * server.c (handle_query): Handle qSupported.
7512 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7514 * remote-utils.c (all_symbols_looked_up): New variable.
7515 (look_up_one_symbol): Check it.
7516 * server.h (look_up_one_symbol): New declaration.
7517 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7519 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7521 * Makefile.in (linux-arm-low.o): Update dependencies.
7522 * linux-arm-low.c: Include "gdb_proc_service.h".
7523 (PTRACE_GET_THREAD_AREA): Define.
7524 (ps_get_thread_area): New function.
7526 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7528 * configure.srv (m68k*-*-uclinux*): New target.
7529 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7530 (linux_resume_one_process): Remove extraneous cast.
7531 (linux_read_offsets): New.
7532 (linux_target_op): Add linux_read_offsets on mmuless systems.
7533 * server.c (handle_query): Add qOffsets logic.
7534 * target.h (struct target_ops): Add read_offsets.
7536 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7538 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7539 (PTRACE_GET_THREAD_AREA): Define.
7540 (ps_get_thread_area): New function.
7541 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7542 (linux-x86-64-low.o): Update.
7544 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7546 * configure.ac: Remove checks for prfpregset_t.
7547 * gdb_proc_service.h: New file.
7548 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7549 new "gdb_proc_service.h".
7550 * proc-service.c: Likewise.
7551 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7552 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7553 * Makefile.in (gdb_proc_service_h): Updated.
7554 * configure, config.in: Regenerated.
7556 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7558 * remote-utils.c (prepare_resume_reply): Move declaration
7559 of gdb_id_from_wait to the top of the block.
7561 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7563 * linux-low.c (regsets_store_inferior_registers): Read the regset
7564 from the target before filling it.
7566 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7568 * server.c (attach_inferior): Return SIGTRAP for a successful
7571 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7573 * Makefile.in (OBS): Add version.o.
7574 (STAGESTUFF): Delete.
7575 (version.o): Add dependencies.
7576 (version.c): Replace rule.
7577 (clean): Remove version.c.
7578 * server.c (gdbserver_version): New.
7579 (gdbserver_usage): Use printf.
7580 (main): Handle --version and --help.
7581 * server.h (version, host_name): Add declarations.
7583 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7595 * linux-x86-64-low.c:
7598 * linux-ppc64-low.c:
7607 * linux-crisv32-low.c:
7619 * gdbserver.1: Add (C) after Copyright. Update the FSF
7622 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7624 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7625 (arm_breakpoint_at): Recognize both breakpoints.
7626 (the_low_target): Use the correct breakpoint instruction.
7628 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7630 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7631 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7632 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7633 (the_low_target): Update.
7635 2005-10-25 Andreas Schwab <schwab@suse.de>
7637 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7639 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7640 (ia64_num_regs): Reduce to 462.
7642 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7644 * acinclude.m4: Correct quoting.
7645 * aclocal.m4: Regenerated.
7647 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7648 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7649 (thread_db_init): Call thread_db_err_str.
7650 * configure.ac: Check for TD_VERSION.
7651 * config.in, configure: Regenerated.
7653 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7655 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7657 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7659 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7660 is not available. Define HAVE_PTRACE_GETREGS if it is.
7661 * config.in, configure: Regenerated.
7662 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7663 * linux-i386-low.c, linux-m68k-low.c: Update to use
7664 HAVE_PTRACE_GETREGS.
7665 * linux-low.c (regsets_fetch_inferior_registers)
7666 (regsets_store_inferior_registers): Only return 0 if we processed
7668 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7669 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7671 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7673 * inferiors.c (struct thread_info): Add gdb_id.
7674 (add_thread): Add gdb_id argument.
7675 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7676 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7677 calls to add_thread.
7678 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7679 * server.c (handle_query): Use thread_to_gdb_id.
7680 (handle_v_cont, main): Use gdb_id_to_thread_id.
7681 * server.h (add_thread): Update prototype.
7682 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7685 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7687 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7688 left-padded registers.
7689 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7690 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7692 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7694 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7695 * configure: Regenerate.
7696 * config.in: Regenerate.
7697 * server.h (NEED_DECLARATION_STRERROR):
7698 Replace with !HAVE_DECL_STRERROR.
7700 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7702 * linux-low.c (linux_wait, linux_send_signal): Don't test
7703 an unsigned long variable for > 0 if it could be MAX_ULONG.
7704 * server.c (myresume): Likewise.
7705 * target.c (set_desired_inferior): Likewise.
7707 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7709 * configure.ac: Simplify and improve check for socklen_t.
7710 * configure, config.in: Regenerate.
7712 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7714 * acconfig.h: Remove.
7715 * configure.ac: Add a test for socklen_t. Use three-argument
7716 AC_DEFINE throughout.
7717 * config.in: Regenerated using autoheader 2.59.
7718 * configure: Regenerated.
7720 * gdbreplay.c (socklen_t): Provide a default.
7721 (remote_open): Use socklen_t.
7722 * remote-utils.c (socklen_t): Provide a default.
7723 (remote_open): Use socklen_t.
7724 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7727 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7729 * linux-low.c (linux_read_memory, linux_write_memory)
7730 (linux_read_auxv): Likewise.
7731 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7732 (check_mem_write): Likewise.
7733 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7735 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7736 (registers_from_string, register_data): Likewise.
7737 * server.c (handle_query, main): Likewise.
7738 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7739 (decode_M_packet): Likewise.
7740 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7741 * target.h (struct target_ops): Update read_memory, write_memory,
7743 (read_inferior_memory, write_inferior_memory): Update.
7744 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7746 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7747 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7748 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7749 linux-s390-low.c, linux-sh-low.c: Update for changes in
7750 read_inferior_memory and the_low_target->breakpoint.
7752 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7754 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7755 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7756 * configure.srv: Add powerpc64-*-linux*.
7757 * linux-ppc64-low.c: New file.
7759 2005-05-23 Orjan Friberg <orjanf@axis.com>
7761 * linux-cris-low.c: New file with support for CRIS.
7762 * linux-crisv32-low.c: Ditto for CRISv32.
7763 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7764 (clean): Add reg-cris.c and reg-crisv32.c.
7765 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7766 reg-crisv32.o, and reg-crisv32.c to make rules.
7767 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7770 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7772 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7773 of sizeof (PTRACE_XFER_TYPE).
7774 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7776 2005-05-12 Orjan Friberg <orjanf@axis.com>
7778 * target.h (struct target_ops): Add insert_watchpoint,
7779 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7780 pointers for hardware watchpoint support.
7781 * linux-low.h (struct linux_target_ops): Ditto.
7782 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7783 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7784 to linux_target_ops.
7785 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7787 * server.c (main): Recognize 'Z' and 'z' packets.
7789 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7791 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7792 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7793 (the_low_target): Add new members.
7795 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7797 * proc-service.c (ps_lgetregs): Search all_processes instead of
7800 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7802 * server.c (start_inferior): Change return type to int.
7803 (attach_inferior): Change sigptr to int *.
7804 (handle_v_cont, handle_v_requests): Change signal to int *.
7805 (main): Change signal to int.
7807 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7809 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7810 * configure.srv: Add m32r*-*-linux*.
7811 * linux-m32r-low.c: New file.
7813 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7815 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7817 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7819 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7820 Take unsigned long arguments for PIDs.
7821 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7822 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7823 (wait_for_sigstop, linux_resume_one_process)
7824 (regsets_fetch_inferior_registers, linux_send_signal)
7825 (linux_read_auxv): Likewise. Update the types of variables holding
7826 PIDs. Update format string specifiers.
7827 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7828 * remote-utils.c (prepare_resume_reply): Likewise.
7829 * server.c (cont_thread, general_thread, step_thread)
7830 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7832 (handle_query): Update format specifiers.
7833 (handle_v_cont, main): Use strtoul for thread IDs.
7834 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7835 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7836 (general_thread, step_thread, thread_from_wait)
7837 (old_thread_from_wait): Update.
7838 * target.h (struct thread_resume): Use unsigned long for THREAD.
7839 (struct target_ops): Use unsigned long for arguments to attach and
7842 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7844 * acinclude.m4: Include bfd/bfd.m4 directly.
7845 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7846 <agriffis@toolchain.org>.
7847 * aclocal.m4, configure: Regenerated.
7849 2005-01-07 Andrew Cagney <cagney@gnu.org>
7851 * configure.ac: Rename configure.in, require autoconf 2.59.
7852 * configure: Re-generate.
7854 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7856 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7858 * aclocal.m4: Regenerated.
7859 * configure: Regenerated.
7861 2004-11-21 Andreas Schwab <schwab@suse.de>
7863 * linux-m68k-low.c (m68k_num_gregs): Define.
7864 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7865 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7866 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7867 (m68k_breakpoint_at): New. Add to the_low_target.
7869 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7870 srv_linux_thread_db to yes.
7872 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7874 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7875 (ARCH_SET_FS): Likewise.
7876 (ARCH_GET_FS): Likewise.
7877 (ARCH_GET_GS): Likewise.
7879 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7881 * linux-i386-low.c (ps_get_thread_area): New.
7882 * linux-x86-64-low.c (ps_get_thread_area): New.
7883 * linux-low.c: Include <sys/syscall.h>.
7884 (linux_kill_one_process): Don't kill the first thread here.
7885 (linux_kill): Kill the first thread here.
7886 (kill_lwp): New function.
7887 (send_sigstop, linux_send_signal): Use it.
7888 * proc-service.c: Clean up #ifdefs.
7889 (fpregset_info): Delete.
7890 (ps_lgetregs): Update and enable implementation.
7891 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7893 * remote-utils.c (struct sym_cache, symbol_cache): New.
7894 (input_interrupt): Print a clearer message.
7895 (async_io_enabled): New variable.
7896 (enable_async_io, disable_async_io): Use it. Update comments.
7897 (look_up_one_symbol): Use the symbol cache.
7898 * thread-db.c (thread_db_look_up_symbols): New function.
7899 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7901 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7903 * configure.in: Test for -rdynamic.
7904 * configure: Regenerated.
7905 * Makefile (INTERNAL_LDFLAGS): New.
7906 (gdbserver, gdbreplay): Use it.
7908 2004-09-02 Andrew Cagney <cagney@gnu.org>
7910 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7912 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7914 * linux-low.c (linux_wait): Clear all_processes list also.
7916 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7918 * linux-low.c: Include <errno.h>. Remove extern declaration of
7921 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7923 * gdbreplay.c, server.h, utils.c: Update copyright years.
7925 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7927 * server.c (main): Print child status or termination signal from
7928 variable 'signal', not 'sig'.
7930 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7932 * linux-low.c (linux_read_memory): Change return type to
7933 int. Check for and return error from ptrace().
7934 * target.c (read_inferior_memory): Change return type to int. Pass
7935 back return status from the_target->read_memory().
7936 * target.h (struct target_ops): Adapt *read_memory() prototype.
7938 (read_inferior_memory): Adapt prototype.
7939 * server.c (main): Return an error packet if
7940 read_inferior_memory() returns an error.
7942 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7944 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7945 Unify with other clean targets.
7947 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7949 * server.c (handle_v_cont): Call set_desired_inferior.
7951 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7953 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7955 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7957 * linux-low.c (linux_wait): Unblock async I/O.
7958 (linux_resume): Block and enable async I/O.
7959 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7960 * server.h (block_async_io, unblock_async_io): Add prototypes.
7962 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7964 * remote-utils.c (remote_open): Print a status notice after
7966 * server.c (attach_inferior): Print a status notice after
7969 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7971 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7973 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
7975 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7977 * server.c, target.h: Update copyright years.
7979 2004-02-25 Roland McGrath <roland@redhat.com>
7981 * target.h (struct target_ops): New member `read_auxv'.
7982 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7983 * linux-low.c (linux_read_auxv): New function.
7984 (linux_target_ops): Initialize `read_auxv' member to that.
7986 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7988 Committed by Jim Blandy <jimb@redhat.com>.
7990 * linux-s390-low.c (s390_num_regs): Update.
7991 (s390_regmap): Remove control registers. Use __s390x__ predefine
7992 instead of GPR_SIZE to distiguish s390 and s390x targets.
7994 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
7996 * linux-low.c: Update copyright year.
7997 (check_removed_breakpoint): Clear pending_is_breakpoint.
7998 (linux_set_resume_request, linux_queue_one_thread)
7999 (resume_status_pending_p): New functions.
8000 (linux_continue_one_thread): Use process->resume.
8001 (linux_resume): Only resume threads if there are no pending events.
8002 * linux-low.h (struct process_info): Add resume request
8005 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8007 * regcache.c (new_register_cache): Clear the allocated register
8008 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8010 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8012 * linux-low.c (linux_resume): Take a struct thread_resume *
8014 (linux_wait): Update call.
8015 (resume_ptr): New static variable.
8016 (linux_continue_one_thread): Renamed from
8017 linux_continue_one_process. Use resume_ptr.
8018 (linux_resume): Use linux_continue_one_thread.
8019 * server.c (handle_v_cont, handle_v_requests): New functions.
8020 (myresume): New function.
8021 (main): Handle 'v' case.
8022 * target.h (struct thread_resume): New type.
8023 (struct target_ops): Change argument of "resume" to struct
8025 (myresume): Delete macro.
8027 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8029 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8030 (uninstall): Support DESTDIR.
8032 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8034 * configure.srv: Add xscale*linux copy of arm*linux entry.
8036 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8038 * linux-arm-low.c (arm_reinsert_addr): New function.
8039 (the_low_target): Add arm_reinsert_addr.
8041 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8043 * mem-break.c: Remove whitespace at end of file.
8045 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8047 * configure.in: Check whether we need to prototype strerror.
8048 * server.h: Optionally prototype strerror.
8049 * gdbreplay.c (perror_with_name): Use strerror.
8050 * linux-low.c (linux_attach_lwp): Use strerror.
8051 * utils.c (perror_with_name): Use strerror.
8052 * config.in, configure: Regenerated.
8054 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8056 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8057 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8059 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8061 * Makefile.in (SFILES): Update.
8062 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8063 low-sun3.c: Remove files.
8065 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8067 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8068 (linux_detach_one_process, linux_detach): New functions.
8069 (linux_target_ops): Add linux_detach.
8070 * server.c (main): Handle 'D' packet.
8071 * target.h (struct target_ops): Add "detach" member.
8072 (detach_inferior): Define.
8074 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8076 From Kelley Cook <kelleycook@wideopenwest.com>:
8077 * configure.srv: Accept i[34567]86 variants.
8079 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8081 * linux-low.c (linux_wait_for_event): Correct comment typos.
8082 (linux_resume_one_process): Call check_removed_breakpoint.
8083 (linux_send_signal): New function.
8084 (linux_target_ops): Add linux_send_signal.
8085 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8087 * target.h (struct target_ops): Add send_signal.
8089 2003-05-29 Jim Blandy <jimb@redhat.com>
8091 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8092 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8093 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8094 away part of the register's value.
8096 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8098 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8099 (linux_wait_for_event, linux_init_signals): Likewise.
8101 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8103 * configure.in: Check for stdlib.h.
8104 * configure: Regenerated.
8105 * config.in: Regenerated.
8107 2003-01-04 Andreas Schwab <schwab@suse.de>
8109 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8111 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8113 * Makefile.in: Remove obsolete code.
8115 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8117 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8118 defined(PT_FPR0_HI).
8120 2002-11-17 Stuart Hughes <seh@zee2.com>
8122 * linux-arm-low.c (arm_num_regs): Increase.
8123 (arm_regmap): Include status register.
8125 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8127 * linux-low.c (register_addr): Remove incorrect -1 check.
8129 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8131 * linux-low.c (linux_create_inferior): Call setpgid. Return
8133 (unstopped_p, linux_signal_pid): Remove.
8134 (linux_target_ops): Remove linux_signal_pid.
8135 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8136 global instead of target method.
8137 * target.h (struct target_ops): Remove signal_pid. Update comment
8138 for create_inferior.
8139 * server.c (signal_pid): New variable.
8140 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8141 gdbserver. Set the child to be the foreground process group.
8142 (attach_inferior): Set signal_pid.
8144 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8146 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8148 2002-08-20 Jim Blandy <jimb@redhat.com>
8150 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8153 2002-08-01 Andrew Cagney <cagney@redhat.com>
8155 * Makefile.in: Make chill references obsolete.
8157 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8159 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8160 * configure: Regenerate.
8161 * config.in: Regenerate.
8163 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8165 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8166 (perror_with_name, remote_close, remote_open, expect, play): Static.
8168 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8170 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8171 byte offsets instead of an array of indexes.
8172 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8174 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8176 * regcache.c: Add comment.
8178 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8180 * thread-db.c: New file.
8181 * proc-service.c: New file.
8182 * acinclude.m4: New file.
8183 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8184 proc-service.o, and thread-db.o.
8185 (linux-low.o): Add USE_THREAD_DB.
8186 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8187 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8188 * aclocal.m4: Regenerated.
8189 * config.in: Regenerated.
8190 * configure: Regenerated.
8191 * configure.in: Check for proc_service.h, sys/procfs.h,
8192 thread_db.h, and linux/elf.h headrs.
8193 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8194 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8195 Check for -lthread_db and thread support.
8196 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8197 PowerPC, and SuperH.
8198 * i387-fp.c: Constify arguments.
8199 * i387-fp.h: Likewise.
8200 * inferiors.c: (struct thread_info): Renamed from
8201 `struct inferior_info'. Remove PID member. Use generic inferior
8202 list header. All uses updated.
8203 (inferiors, signal_pid): Removed.
8204 (all_threads): New variable.
8205 (get_thread): Define.
8206 (add_inferior_to_list): New function.
8207 (for_each_inferior): New function.
8208 (change_inferior_id): New function.
8209 (add_inferior): Removed.
8210 (remove_inferior): New function.
8211 (add_thread): New function.
8212 (free_one_thread): New function.
8213 (remove_thread): New function.
8214 (clear_inferiors): Use for_each_inferior and free_one_thread.
8215 (find_inferior): New function.
8216 (find_inferior_id): New function.
8217 (inferior_target_data): Update argument type.
8218 (set_inferior_target_data): Likewise.
8219 (inferior_regcache_data): Likewise.
8220 (set_inferior_regcache_data): Likewise.
8221 * linux-low.c (linux_bp_reinsert): Remove.
8222 (all_processes, stopping_threads, using_thrads)
8223 (struct pending_signals, debug_threads, pid_of): New.
8224 (inferior_pid): Replace with macro.
8225 (struct inferior_linux_data): Remove.
8226 (get_stop_pc, add_process): New functions.
8227 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8228 Use add_process and add_thread.
8229 (linux_attach_lwp): New function, based on old linux_attach. Use
8230 add_process and add_thread. Set stop_expected for new threads.
8231 (linux_attach): New function.
8232 (linux_kill_one_process): New function.
8233 (linux_kill): Kill all LWPs.
8234 (linux_thread_alive): Use find_inferior_id.
8235 (check_removed_breakpoints, status_pending_p): New functions.
8236 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8237 Update. Use WNOHANG. Wait for cloned processes also. Update process
8238 struct for the found process.
8239 (linux_wait_for_event): New function.
8240 (linux_wait): Use it. Support LWPs.
8241 (send_sigstop, wait_for_sigstop, stop_all_processes)
8242 (linux_resume_one_process, linux_continue_one_process): New functions.
8243 (linux_resume): Support LWPs.
8244 (REGISTER_RAW_SIZE): Remove.
8245 (fetch_register): Use register_size instead. Call supply_register.
8246 (usr_store_inferior_registers): Likewise. Call collect_register.
8248 (regsets_fetch_inferior_registers): Improve error message.
8249 (regsets_store_inferior_registers): Add debugging.
8250 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8251 (unstopped_p, linux_signal_pid): New functions.
8252 (linux_target_ops): Add linux_signal_pid.
8253 (linux_init_signals): New function.
8254 (initialize_low): Call it. Initialize using_threads.
8255 * regcache.c (inferior_regcache_data): Add valid
8257 (get_regcache): Fetch registers lazily. Add fetch argument
8258 and update all callers.
8259 (regcache_invalidate_one, regcache_invalidate): New
8261 (new_register_cache): Renamed from create_register_cache.
8262 Return the new regcache.
8263 (free_register_cache): Change argument to a void *.
8264 (registers_to_string, registers_from_string): Call get_regcache
8265 with fetch flag set.
8266 (register_data): Make static. Pass fetch flag to get_regcache.
8267 (supply_register): Call get_regcache with fetch flag clear.
8268 (collect_register): Call get_regcache with fetch flag set.
8269 (collect_register_as_string): New function.
8270 * regcache.h: Update.
8271 * remote-utils.c (putpkt): Flush after debug output and use
8273 Handle input interrupts while waiting for an ACK.
8274 (input_interrupt): Use signal_pid method.
8275 (getpkt): Flush after debug output and use stderr.
8276 (outreg): Use collect_register_as_string.
8277 (new_thread_notify, dead_thread_notify): New functions.
8278 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8280 (look_up_one_symbol): Flush after debug output.
8281 * server.c (step_thread, server_waiting): New variables.
8282 (start_inferior): Don't use signal_pid. Update call to mywait.
8283 (attach_inferior): Update call to mywait.
8284 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8285 (main): Don't fetch/store registers explicitly. Use
8286 set_desired_inferior. Support proposed ``Hs'' packet. Update
8289 (struct inferior_list, struct_inferior_list_entry): New.
8290 * target.c (set_desired_inferior): New.
8291 (write_inferior_memory): Constify.
8292 (mywait): New function.
8294 (struct target_ops): New signal_pid method.
8295 (mywait): Removed macro, added prototype.
8297 * linux-low.h (regset_func): Removed.
8298 (regset_fill_func, regset_store_func): New.
8299 (enum regset_type): New.
8300 (struct regset_info): Add type field. Use new operation types.
8301 (struct linux_target_ops): stop_pc renamed to get_pc.
8302 Add decr_pc_after_break and breakpoint_at.
8303 (get_process, get_thread_proess, get_process_thread)
8304 (strut process_info, all_processes, linux_attach_lwp)
8305 (thread_db_init): New.
8307 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8308 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8309 (the_low_target): Add new members.
8310 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8311 (i386_store_fpxregset): Constify.
8312 (target_regsets): Add new kind identifier.
8313 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8314 (i386_set_pc): Add debugging.
8315 (i386_breakpoint_at): New function.
8316 (the_low_target): Add new members.
8317 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8318 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8319 (mips_breakpoint_at): New.
8320 (the_low_target): Add new members.
8321 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8322 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8323 (the_low_target): Add new members.
8324 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8325 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8326 (the_low_target): Add new members.
8327 * linux-x86-64-low.c (target_regsets): Add new kind
8330 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8332 From Martin Pool <mbp@samba.org>:
8333 * server.c (gdbserver_usage): New function.
8336 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8338 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8341 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8343 * Makefile.in: Remove obsolete code.
8345 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8347 * linux-low.c (regsets_fetch_inferior_registers),
8348 (regsets_store_inferior_registers): Removed cast to int from
8350 * regcache.h: Added declaration of struct inferior_info.
8352 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8354 * inferiors.c (struct inferior_info): Add regcache_data.
8355 (add_inferior): Call create_register_cache.
8356 (clear_inferiors): Call free_register_cache.
8357 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8358 * regcache.c (struct inferior_regcache_data): New.
8359 (registers): Remove.
8360 (get_regcache): New function.
8361 (create_register_cache, free_register_cache): New functions.
8362 (set_register_cache): Don't initialize the register cache here.
8363 (registers_to_string, registers_from_string, register_data): Call
8365 * regcache.h: Add prototypes.
8366 * server.h: Likewise.
8368 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8370 * mem-break.c: New file.
8371 * mem-break.h: New file.
8372 * Makefile.in: Add mem-break.o rule; update server.h
8374 * inferiors.c (struct inferior_info): Add target_data
8376 (clear_inferiors): Free target_data member if set.
8377 (inferior_target_data, set_inferior_target_data): New functions.
8378 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8379 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8380 * linux-low.c (linux_bp_reinsert): New variable.
8381 (struct inferior_linux_data): New.
8382 (linux_create_inferior): Use set_inferior_target_data.
8383 (linux_attach): Likewise. Call add_inferior.
8384 (linux_wait_for_one_inferior): New function.
8385 (linux_wait): Call it.
8386 (linux_write_memory): Add const.
8387 (initialize_low): Call set_breakpoint_data.
8388 * linux-low.h (struct linux_target_ops): Add breakpoint
8390 * server.c (attach_inferior): Remove extra add_inferior
8392 * server.h: Include mem-break.h. Update inferior.c
8394 * target.c (read_inferior_memory)
8395 (write_inferior_memory): New functions.
8396 * target.h (read_inferior_memory)
8397 (write_inferior_memory): Change macros to prototypes.
8398 (struct target_ops): Update comments. Add const to write_memory
8401 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8403 * linux-low.c (usr_store_inferior_registers): Support
8404 registers which are allowed to fail to store.
8405 * linux-low.h (linux_target_ops): Likewise.
8406 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8407 (ppc_cannot_store_register): FPSCR may not be storable.
8409 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8411 * server.h: Include <string.h> if HAVE_STRING_H.
8412 * ChangeLog: Correct paths in last ChangeLog entry.
8414 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8416 * linux-low.h: Remove obsolete prototypes.
8417 (struct linux_target_ops): New.
8418 (extern the_low_target): New.
8419 * linux-low.c (num_regs, regmap): Remove declarations.
8420 (register_addr): Use the_low_target explicitly.
8421 (fetch_register): Likewise.
8422 (usr_fetch_inferior_registers): Likewise.
8423 (usr_store_inferior_registers): Likewise.
8424 * linux-arm-low.c (num_regs): Remove.
8425 (arm_num_regs): Define.
8426 (arm_regmap): Renamed from regmap, made static.
8427 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8429 (arm_cannot_store_register): Renamed from cannot_store_register,
8431 (the_low_target): New.
8432 * linux-i386-low.c (num_regs): Remove.
8433 (i386_num_regs): Define.
8434 (i386_regmap): Renamed from regmap, made static.
8435 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8437 (i386_cannot_store_register): Renamed from cannot_store_register,
8439 (the_low_target): New.
8440 * linux-ia64-low.c (num_regs): Remove.
8441 (ia64_num_regs): Define.
8442 (ia64_regmap): Renamed from regmap, made static.
8443 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8445 (ia64_cannot_store_register): Renamed from cannot_store_register,
8447 (the_low_target): New.
8448 * linux-m68k-low.c (num_regs): Remove.
8449 (m68k_num_regs): Define.
8450 (m68k_regmap): Renamed from regmap, made static.
8451 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8453 (m68k_cannot_store_register): Renamed from cannot_store_register,
8455 (the_low_target): New.
8456 * linux-mips-low.c (num_regs): Remove.
8457 (mips_num_regs): Define.
8458 (mips_regmap): Renamed from regmap, made static.
8459 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8461 (mips_cannot_store_register): Renamed from cannot_store_register,
8463 (the_low_target): New.
8464 * linux-ppc-low.c (num_regs): Remove.
8465 (ppc_num_regs): Define.
8466 (ppc_regmap): Renamed from regmap, made static.
8467 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8469 (ppc_cannot_store_register): Renamed from cannot_store_register,
8471 (the_low_target): New.
8472 * linux-s390-low.c (num_regs): Remove.
8473 (s390_num_regs): Define.
8474 (s390_regmap): Renamed from regmap, made static.
8475 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8477 (s390_cannot_store_register): Renamed from cannot_store_register,
8479 (the_low_target): New.
8480 * linux-sh-low.c (num_regs): Remove.
8481 (sh_num_regs): Define.
8482 (sh_regmap): Renamed from regmap, made static.
8483 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8485 (sh_cannot_store_register): Renamed from cannot_store_register,
8487 (the_low_target): New.
8488 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8489 (the_low_target): New.
8491 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8493 * Makefile.in: Add stamp-h target.
8494 * configure.in: Create stamp-h.
8495 * configure: Regenerated.
8497 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8499 * inferiors.c: New file.
8500 * target.c: New file.
8501 * target.h: New file.
8502 * Makefile.in: Add target.o and inferiors.o. Update
8504 * linux-low.c (inferior_pid): New static variable,
8505 moved from server.c.
8506 (linux_create_inferior): Renamed from create_inferior.
8507 Call add_inferior. Return 0 on success instead of a PID.
8508 (linux_attach): Renamed from myattach.
8509 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8510 (linux_thread_alive): Renamed from mythread_alive.
8511 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8513 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8514 (regsets_store_inferior_registers): Correct error message.
8515 Add missing ``return 0''.
8516 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8517 (linux_store_registers): Renamed from store_inferior_registers.
8518 (linux_read_memory): Renamed from read_inferior_memory.
8519 (linux_write_memory): Renamed from write_inferior_memory.
8520 (linux_target_ops): New structure.
8521 (initialize_low): Call set_target_ops ().
8522 * remote-utils.c (unhexify): New function.
8523 (hexify): New function.
8524 (input_interrupt): Send signals to ``signal_pid''.
8525 * server.c (inferior_pid): Remove.
8526 (start_inferior): Update create_inferior call.
8527 (attach_inferior): Call add_inferior.
8528 (handle_query): New function.
8529 (main): Call handle_query for `q' packets.
8530 * server.h: Include "target.h". Remove obsolete prototypes.
8531 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8533 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8535 * Makefile.in: Add WARN_CFLAGS. Update configury
8537 * configure.in: Check for <string.h>
8538 * configure: Regenerate.
8539 * config.in: Regenerate.
8540 * gdbreplay.c: Include needed system headers.
8541 (remote_open): Remove strchr prototype.
8542 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8543 * regcache.c (supply_register): Change buf argument to const void *.
8544 (supply_register_by_name): Likewise.
8545 (collect_register): Change buf argument to void *.
8546 (collect_register_by_name): Likewise.
8547 * regcache.h: Add missing prototypes.
8548 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8549 * server.c (handle_query): New function.
8550 (attached): New static variable, moved out of main.
8551 (main): Quiet longjmp clobber warnings.
8552 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8553 * utils.c (error): Remove NORETURN.