1 2013-09-05 Pedro Alves <palves@redhat.com>
3 * server.h (perror_with_name, error, fatal, warning, paddress)
4 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8 2013-09-05 Pedro Alves <palves@redhat.com>
10 * server.h (remote_debug, noack_mode, transport_is_reliable)
11 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
12 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
14 (write_enn, initialize_async_io, enable_async_io)
15 (disable_async_io, check_remote_input_interrupt_request)
16 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
17 (dead_thread_notify, prepare_resume_reply)
18 (decode_address_to_semicolon, decode_address, decode_m_packet)
19 (decode_M_packet, decode_X_packet, decode_xfer_write)
20 (decode_search_memory_packet, unhexify, hexify)
21 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
22 (look_up_one_symbol, relocate_instruction)
23 (monitor_output): Move to remote-utils.h, and include it.
24 * remote-utils.h: New file.
26 2013-09-05 Pedro Alves <palves@redhat.com>
28 * server.h (_): Delete.
30 2013-09-02 Pedro Alves <palves@redhat.com>
32 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
33 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
35 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
37 2013-09-02 Pierre Muller <muller@sourceware.org>
39 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
40 or WriteProcessMemory complete successfully and handle
41 ERROR_PARTIAL_COPY error.
43 2013-09-02 Pedro Alves <palves@redhat.com>
45 * server.c (gdb_read_memory): Return -1 on traceframe memory read
48 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
51 * linux-low.c: Include filestuff.h.
52 (linux_create_inferior) <pid == 0>: Call close_most_fds.
53 * lynx-low.c: Include filestuff.h.
54 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
55 * server.c: Include filestuff.h.
56 (main): Call notice_open_fds.
57 * spu-low.c: Include filestuff.h.
58 (spu_create_inferior) <pid == 0>: Call close_most_fds.
60 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
62 * Makefile.in: Explain why ../target and ../nat are not
63 listed as include file search paths.
64 (linux-waitpid.o): New object file rule.
65 * configure.srv (srv_native_linux_obj): New variable.
66 Replace all occurrences of linux native object files with
67 $srv_native_linux_obj.
68 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
69 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
70 (linux_enable_event_reporting): Remove declaration.
71 (my_waitpid): Moved to common/linux-waitpid.c.
72 (linux_wait_for_event): Pass ptid when calling
73 linux_enable_event_reporting.
74 (linux_supports_tracefork_flag): Remove.
75 (linux_enable_event_reporting): Likewise.
76 (linux_tracefork_grandchild): Remove.
77 (STACK_SIZE): Moved to common/linux-ptrace.c.
78 (linux_tracefork_child): Remove.
79 (linux_test_for_tracefork): Remove.
80 (linux_look_up_symbols): Call linux_supports_traceclone.
81 (initialize_low): Remove call to linux_test_for_tracefork.
82 * linux-low.h (PTRACE_TYPE_ARG3): Move to
83 common/linux-ptrace.h.
84 (PTRACE_TYPE_ARG4): Likewise.
85 Include linux-ptrace.h.
87 2013-08-21 Pedro Alves <palves@redhat.com>
89 * config.in: Renegerate.
91 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
93 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
94 (SFILES): Remove $(srcdir)/common/target-common.c and
95 add $(srcdir)/target/waitstatus.c.
96 (OBS): Remove target-common.o and add waitstatus.o.
97 (server_h): Remove $(srcdir)/../common/target-common.h and
98 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
99 and $(srcdir)/../target/waitstatus.h.
100 (target-common.o): Remove.
101 (waitstatus.o): New target object file.
102 * target.h: Do not include target-common.h and
103 include target/resume.h, target/wait.h and
106 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
108 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
110 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
111 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
113 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
114 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
116 2013-07-27 Jie Zhang <jie@codesourcery.com>
117 Daniel Jacobowitz <dan@codesourcery.com>
118 Yao Qi <yao@codesourcery.com>
120 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
121 (mips-linux-watch.o): New rule.
122 (mips_linux_watch_h): New variable.
123 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
125 * linux-mips-low.c: Include mips-linux-watch.h.
126 (struct arch_process_info, struct arch_lwp_info): New.
127 (update_watch_registers_callback): New function.
128 (mips_linux_new_process, mips_linux_new_thread) New functions.
129 (mips_linux_prepare_to_resume, mips_insert_point): New
131 (mips_remove_point, mips_stopped_by_watchpoint): New
133 (rsp_bp_type_to_target_hw_bp_type): New function.
134 (mips_stopped_data_address): New function.
135 (the_low_target): Add watchpoint support functions.
137 2013-07-27 Yao Qi <yao@codesourcery.com>
139 * i386-low.c: Include break-common.h.
140 (enum target_hw_bp_type): Remove.
142 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
144 * Makefile.in (SFILES): /common/target-common.c.
145 (OBS): Add target-common.o.
146 (server_h): Add $(srcdir)/../common/target-common.h.
147 (target-common.o): New target.
148 * server.c (queue_stop_reply_callback): Free
149 status string after use.
150 * target.c (target_waitstatus_to_string): Remove.
151 * target.h: Include target-common.h.
152 (resume_kind): Likewise.
153 (target_waitkind): Likewise.
154 (target_waitstatus): Likewise.
155 (TARGET_WNOHANG): Likewise.
157 2013-07-04 Yao Qi <yao@codesourcery.com>
159 * Makefile.in (host_alias): Use @host_noncanonical@.
160 (target_alias): Use @target_noncanonical@.
161 * configure.ac: Use ACX_NONCANONICAL_TARGET and
162 ACX_NONCANONICAL_HOST.
163 * configure: Regenerated.
166 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
168 * configure.ac (version_host, version_target): Set and AC_SUBST them.
169 * configure: Rebuild.
170 * Makefile.in (version_host, version_target): Get from configure.
171 (version.c): Use $(version_host) and $(version_target).
173 2013-07-03 Pedro Alves <palves@redhat.com>
175 * Makefile.in (config.status): Depend on development.sh.
176 * acinclude.m4: Include libmcheck.m4.
177 * configure: Regenerate.
179 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
181 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
182 attribute inside the parentheses.
183 (winapi_DebugSetProcessKillOnExit): Ditto.
184 (winapi_DebugBreakProcess): Ditto.
185 (winapi_GenerateConsoleCtrlEvent): Ditto.
187 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
189 * notif.h (notif_event): Add a dummy member to avoid compiler
192 2013-07-01 Pedro Alves <palves@redhat.com>
194 * hostio.c (HOSTIO_PATH_MAX): Define.
195 (require_filename, handle_open, handle_unlink, handle_readlink):
198 2013-07-01 Pedro Alves <palves@redhat.com>
200 * server.h: Include "pathmax.h".
201 * linux-low.c: Don't include sys/param.h.
202 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
204 * win32-low.c: Don't include sys/param.h.
205 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
207 2013-07-01 Pedro Alves <palves@redhat.com>
209 * event-loop.c: Don't check HAVE_UNISTD_H before including
211 * gdbreplay.c: Likewise.
212 * remote-utils.c: Likewise.
213 * server.c: Likewise.
214 * configure.ac: Don't check for unistd.h.
215 * configure: Regenerate.
217 2013-06-28 Tom Tromey <tromey@redhat.com>
219 * Makefile.in (version.c): Use version.in, not
222 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
224 * configure.ac (version_host, version_target): Set and AC_SUBST them.
225 * configure: Rebuild.
226 * Makefile.in (version_host, version_target): Get from configure.
227 (version.c): Use $(version_host) and $(version_target).
229 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
231 Fix trace-status to output user name without trailing colon.
232 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
234 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
236 Fix trace-status to output proper start-time and stop-time.
237 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
238 output start time and stop time in hex as gdb expects.
240 2013-06-26 Pedro Alves <pedro@codesourcery.com>
242 * tracepoint.c (build_traceframe_info_xml): Output trace state
243 variables present in the trace buffer.
245 2013-06-24 Tom Tromey <tromey@redhat.com>
247 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
250 * gdbreplay.c: Include version.h.
251 (version, host_name): Don't declare.
252 * server.h: Include version.h.
253 (version, host_name): Don't declare.
255 2013-06-12 Pedro Alves <palves@redhat.com>
257 * linux-x86-low.c (linux_is_elf64): Delete global.
258 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
259 with local linux_pid_exe_is_elf_64_file use.
261 2013-06-11 Pedro Alves <palves@redhat.com>
263 * linux-low.c (regset_disabled, disable_regset): New functions.
264 (regsets_fetch_inferior_registers)
265 (regsets_store_inferior_registers): Use them.
266 (initialize_regsets_info); Don't allocate the disabled_regsets
268 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
271 2013-06-11 Pedro Alves <palves@redhat.com>
273 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
276 2013-06-11 Pedro Alves <palves@redhat.com>
278 * linux-x86-low.c (initialize_low_arch): Call
279 init_registers_x32_avx_linux.
281 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
283 Fix compatibility with Android Bionic.
284 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
287 2013-06-07 Pedro Alves <palves@redhat.com>
290 * Makefile.in (OBS): Add tdesc.o.
291 (IPA_OBJS): Add tdesc-ipa.o.
292 (tdesc-ipa.o): New rule.
293 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
295 * linux-low.c (new_inferior): Delete.
296 (disabled_regsets, num_regsets): Delete.
297 (linux_add_process): Adjust to set the new per-process
299 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
300 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
301 was a stop. When calling arch_setup, switch the current inferior
302 to the thread that got an event.
303 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
304 (regsets_fetch_inferior_registers)
305 (regsets_store_inferior_registers): New regsets_info parameter.
307 (linux_register_in_regsets): New regs_info parameter. Adjust to
309 (register_addr, fetch_register, store_register): New usrregs_info
310 parameter. Adjust to use it.
311 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
312 parameter regs_info. Adjust to use it.
313 (linux_fetch_registers): Get the current inferior's regs_info, and
315 (linux_store_registers): Ditto.
316 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
317 (initialize_low): Don't initialize the target_regsets here. Call
319 * linux-low.h (target_regsets): Delete declaration.
320 (struct regsets_info): New.
321 (struct usrregs_info): New.
322 (struct regs_info): New.
323 (struct process_info_private) <new_inferior>: New field.
324 (struct linux_target_ops): Delete the num_regs, regmap, and
325 regset_bitmap fields. New field regs_info.
326 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
327 * i387-fp.c (num_xmm_registers): Delete.
328 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
329 calls to new interface.
330 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
331 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
332 Infer the number of xmm registers from the regcache's target
334 * i387-fp.h (num_xmm_registers): Delete.
335 * inferiors.c (add_thread): Don't install the thread's regcache
337 * proc-service.c (gregset_info): Fetch the current inferior's
338 regs_info. Adjust to use it.
339 * regcache.c: Include tdesc.h.
340 (register_bytes, reg_defs, num_registers)
341 (gdbserver_expedite_regs): Delete.
342 (get_thread_regcache): If the thread doesn't have a regcache yet,
343 create one, instead of aborting gdbserver.
344 (regcache_invalidate_one): Rename to ...
345 (regcache_invalidate_thread): ... this.
346 (regcache_invalidate_one): New.
347 (regcache_invalidate): Only invalidate registers of the current
349 (init_register_cache): Add target_desc parameter, and use it.
350 (new_register_cache): Ditto. Assert the target description has a
351 non zero registers_size.
352 (regcache_cpy): Add assertions. Adjust.
353 (realloc_register_cache, set_register_cache): Delete.
354 (registers_to_string, registers_from_string): Adjust.
355 (find_register_by_name, find_regno, find_register_by_number)
356 (register_cache_size): Add target_desc parameter, and use it.
357 (free_register_cache_thread, free_register_cache_thread_one)
358 (regcache_release, register_cache_size): New.
359 (register_size): Add target_desc parameter, and use it.
360 (register_data, supply_register, supply_register_zeroed)
361 (supply_regblock, supply_register_by_name, collect_register)
362 (collect_register_as_string, collect_register_by_name): Adjust.
363 * regcache.h (struct target_desc): Forward declare.
364 (struct regcache) <tdesc>: New field.
365 (init_register_cache, new_register_cache): Add target_desc
367 (regcache_invalidate_thread): Declare.
368 (regcache_invalidate_one): Delete declaration.
369 (regcache_release): Declare.
370 (find_register_by_number, register_cache_size, register_size)
371 (find_regno): Add target_desc parameter.
372 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
374 * remote-utils.c: Include tdesc.h.
375 (outreg, prepare_resume_reply): Adjust.
376 * server.c: Include tdesc.h.
377 (gdbserver_xmltarget): Delete declaration.
378 (get_features_xml, process_serial_event): Adjust.
379 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
381 (struct process_info) <tdesc>: New field.
382 (ipa_tdesc): Declare.
385 * tracepoint.c: Include tdesc.h.
386 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
387 (get_context_regcache): Adjust to pass ipa_tdesc down.
388 (do_action_at_tracepoint): Adjust to get the register cache size
389 from the context regcache's description.
390 (traceframe_walk_blocks): Adjust to get the register cache size
391 from the current trace frame's description.
392 (traceframe_get_pc): Adjust to get current trace frame's
393 description and pass it down.
394 (gdb_collect): Adjust to get the register cache size from the
396 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
397 (gdbserver_xmltarget): Delete.
398 (initialize_low_tracepoint): Set the ipa's target description.
399 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
400 (initialize_low_tracepoint): Set the ipa's target description.
401 * linux-x86-low.c: Include tdesc.h.
402 [__x86_64__] (is_64bit_tdesc): New.
403 (ps_get_thread_area, x86_get_thread_area): Use it.
404 (i386_cannot_store_register): Rename to ...
405 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
406 (i386_cannot_fetch_register): Rename to ...
407 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
408 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
410 (target_regsets): Rename to ...
411 (x86_regsets): ... this.
412 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
414 (x86_siginfo_fixup): Use is_64bit_tdesc.
415 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
416 (tdesc_x32_avx_linux, tdesc_x32_linux)
417 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
419 (x86_linux_update_xmltarget): Delete.
420 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
421 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
422 (AMD64_LINUX_USER64_CS): New.
423 (x86_linux_read_description): New, based on
424 x86_linux_update_xmltarget.
425 (same_process_callback): New.
426 (x86_arch_setup_process_callback): New.
427 (x86_linux_update_xmltarget): New.
428 (x86_regsets_info): New.
429 (amd64_linux_regs_info): New.
430 (i386_linux_usrregs_info): New.
431 (i386_linux_regs_info): New.
432 (x86_linux_regs_info): New.
433 (x86_arch_setup): Reimplement.
434 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
435 (x86_emit_ops): Ditto.
436 (the_low_target): Adjust. Install x86_linux_regs_info,
437 x86_cannot_fetch_register, and x86_cannot_store_register.
438 (initialize_low_arch): New.
439 * linux-ia64-low.c (tdesc_ia64): Declare.
440 (ia64_fetch_register): Adjust.
441 (ia64_usrregs_info, regs_info): New globals.
442 (ia64_regs_info): New function.
443 (the_low_target): Adjust.
444 (initialize_low_arch): New function.
445 * linux-sparc-low.c (tdesc_sparc64): Declare.
446 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
448 (sparc_arch_setup): New function.
449 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
450 (the_low_target): Adjust.
451 (initialize_low_arch): New function.
452 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
453 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
454 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
455 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
456 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
457 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
458 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
459 (tdesc_powerpc_isa205_vsx64l): Declare.
460 (ppc_cannot_store_register, ppc_collect_ptrace_register)
461 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
462 (ppc_set_pc, ppc_get_hwcap): Adjust.
463 (ppc_usrregs_info): Forward declare.
464 (!__powerpc64__) ppc_regmap_adjusted: New global.
465 (ppc_arch_setup): Adjust to the current process'es target
467 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
468 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
469 (ppc_store_evrregset): Adjust.
470 (target_regsets): Rename to ...
471 (ppc_regsets): ... this, and make static.
472 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
473 (ppc_regs_info): New function.
474 (the_low_target): Adjust.
475 (initialize_low_arch): New function.
476 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
477 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
478 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
479 (tdesc_s390x_linux64v2): Declare.
480 (s390_collect_ptrace_register, s390_supply_ptrace_register)
481 (s390_fill_gregset, s390_store_last_break): Adjust.
482 (target_regsets): Rename to ...
483 (s390_regsets): ... this, and make static.
484 (s390_get_pc, s390_set_pc): Adjust.
485 (s390_get_hwcap): New target_desc parameter, and use it.
486 [__s390x__] (have_hwcap_s390_high_gprs): New global.
487 (s390_arch_setup): Adjust to set the current process'es target
488 description. Don't adjust the regmap.
489 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
490 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
491 (regs_info_3264): New globals.
492 (s390_regs_info): New function.
493 (the_low_target): Adjust.
494 (initialize_low_arch): New function.
495 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
496 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
497 [__mips64] (init_registers_mips_linux)
498 (init_registers_mips_dsp_linux): Delete defines.
499 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
500 (have_dsp): New global.
501 (mips_read_description): New, based on mips_arch_setup.
502 (mips_arch_setup): Reimplement.
503 (get_usrregs_info): New function.
504 (mips_cannot_fetch_register, mips_cannot_store_register)
505 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
506 (mips_fill_fpregset, mips_store_fpregset): Adjust.
507 (target_regsets): Rename to ...
508 (mips_regsets): ... this, and make static.
509 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
510 (dsp_regs_info, regs_info): New globals.
511 (mips_regs_info): New function.
512 (the_low_target): Adjust.
513 (initialize_low_arch): New function.
514 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
515 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
517 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
518 (arm_read_description): New, with bits factored from
520 (arm_arch_setup): Reimplement.
521 (target_regsets): Rename to ...
522 (arm_regsets): ... this, and make static.
523 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
524 (arm_regs_info): New function.
525 (the_low_target): Adjust.
526 (initialize_low_arch): New function.
527 * linux-m68k-low.c (tdesc_m68k): Declare.
528 (target_regsets): Rename to ...
529 (m68k_regsets): ... this, and make static.
530 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
531 (m68k_regs_info): New function.
532 (m68k_arch_setup): New function.
533 (the_low_target): Adjust.
534 (initialize_low_arch): New function.
535 * linux-sh-low.c (tdesc_sharch): Declare.
536 (target_regsets): Rename to ...
537 (sh_regsets): ... this, and make static.
538 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
539 (sh_regs_info, sh_arch_setup): New functions.
540 (the_low_target): Adjust.
541 (initialize_low_arch): New function.
542 * linux-bfin-low.c (tdesc_bfin): Declare.
543 (bfin_arch_setup): New function.
544 (bfin_usrregs_info, regs_info): New globals.
545 (bfin_regs_info): New function.
546 (the_low_target): Adjust.
547 (initialize_low_arch): New function.
548 * linux-cris-low.c (tdesc_cris): Declare.
549 (cris_arch_setup): New function.
550 (cris_usrregs_info, regs_info): New globals.
551 (cris_regs_info): New function.
552 (the_low_target): Adjust.
553 (initialize_low_arch): New function.
554 * linux-cris-low.c (tdesc_crisv32): Declare.
555 (cris_arch_setup): New function.
556 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
557 (cris_regs_info): New function.
558 (the_low_target): Adjust.
559 (initialize_low_arch): New function.
560 * linux-m32r-low.c (tdesc_m32r): Declare.
561 (m32r_arch_setup): New function.
562 (m32r_usrregs_info, regs_info): New globals.
563 (m32r_regs_info): Adjust.
564 (initialize_low_arch): New function.
565 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
566 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
567 (tic6x_usrregs_info): Forward declare.
568 (tic6x_read_description): New function, based on ...
569 (tic6x_arch_setup): ... this. Reimplement.
570 (target_regsets): Rename to ...
571 (tic6x_regsets): ... this, and make static.
572 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
573 (tic6x_regs_info): New function.
574 (the_low_target): Adjust.
575 (initialize_low_arch): New function.
576 * linux-xtensa-low.c (tdesc_xtensa): Declare.
577 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
578 (target_regsets): Rename to ...
579 (xtensa_regsets): ... this, and make static.
580 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
582 (xtensa_arch_setup, xtensa_regs_info): New functions.
583 (the_low_target): Adjust.
584 (initialize_low_arch): New function.
585 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
586 (nios2_arch_setup): Set the current process'es tdesc.
587 (target_regsets): Rename to ...
588 (nios2_regsets): ... this.
589 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
590 (nios2_regs_info): New function.
591 (the_low_target): Adjust.
592 (initialize_low_arch): New function.
593 * linux-aarch64-low.c (tdesc_aarch64): Declare.
594 (aarch64_arch_setup): Set the current process'es tdesc.
595 (target_regsets): Rename to ...
596 (aarch64_regsets): ... this.
597 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
598 (aarch64_regs_info): New function.
599 (the_low_target): Adjust.
600 (initialize_low_arch): New function.
601 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
603 (target_regsets): Rename to ...
604 (tile_regsets): ... this.
605 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
606 (tile_regs_info): New function.
607 (tile_arch_setup): Set the current process'es tdesc.
608 (the_low_target): Adjust.
609 (initialize_low_arch): New function.
610 * spu-low.c (tdesc_spu): Declare.
611 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
612 * win32-arm-low.c (tdesc_arm): Declare.
613 (arm_arch_setup): New function.
614 (the_low_target): Install arm_arch_setup instead of
616 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
617 (init_windows_x86): Rename to ...
618 (i386_arch_setup): ... this. Set `win32_tdesc'.
619 (the_low_target): Adjust.
620 * win32-low.c (win32_tdesc): New global.
621 (child_add_thread): Don't create the thread cache here.
622 (do_initial_child_stuff): Set the new process'es tdesc.
623 * win32-low.h (struct target_desc): Forward declare.
624 (win32_tdesc): Declare.
625 * lynx-i386-low.c (tdesc_i386): Declare global.
626 (lynx_i386_arch_setup): Set `lynx_tdesc'.
627 * lynx-low.c (lynx_tdesc): New global.
628 (lynx_add_process): Set the new process'es tdesc.
629 * lynx-low.h (struct target_desc): Forward declare.
630 (lynx_tdesc): Declare global.
631 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
632 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
633 * nto-low.c (nto_tdesc): New global.
634 (do_attach): Set the new process'es tdesc.
635 * nto-low.h (struct target_desc): Forward declare.
636 (nto_tdesc): Declare.
637 * nto-x86-low.c (tdesc_i386): Declare.
638 (nto_x86_arch_setup): Set `nto_tdesc'.
640 2013-06-04 Gary Benson <gbenson@redhat.com>
642 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
643 to qSupported response when appropriate.
644 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
645 with nonzero-length annex.
646 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
647 arguments supplied in annex.
649 2013-05-31 Doug Evans <dje@google.com>
652 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
653 64 bits in 64-cross-32 environment.
655 2013-05-28 Pedro Alves <palves@redhat.com>
657 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
658 (aarch64-without-fpu.c): Delete rule.
659 * configure.srv (aarch64*-*-linux*): Remove references to
660 aarch64-without-fpu.o and aarch64-without-fpu.xml.
661 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
664 2013-05-24 Pedro Alves <palves@redhat.com>
666 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
667 instead of strchr/decode_address. Error if the range isn't split
668 with a ','. Don't assume there's be a ':' in the action.
670 2013-05-23 Yao Qi <yao@codesourcery.com>
671 Pedro Alves <palves@redhat.com>
673 * linux-low.c (lwp_in_step_range): New function.
674 (linux_wait_1): If the thread was range stepping and stopped
675 outside the stepping range, report the stop to GDB. Otherwise,
676 continue stepping. Add range stepping debug output.
677 (linux_set_resume_request): Copy the step range from the resume
679 (linux_supports_range_stepping): New.
680 (linux_target_ops) <supports_range_stepping>: Set to
681 linux_supports_range_stepping.
682 * linux-low.h (struct linux_target_ops)
683 <supports_range_stepping>: New field.
684 (struct lwp_info) <step_range_start, step_range_end>: New fields.
685 * linux-x86-low.c (x86_supports_range_stepping): New.
686 (the_low_target) <supports_range_stepping>: Set to
687 x86_supports_range_stepping.
688 * server.c (handle_v_cont): Handle 'r' action.
689 (handle_v_requests): Append ";r" if the target supports range
691 * target.h (struct thread_resume) <step_range_start,
692 step_range_end>: New fields.
693 (struct target_ops) <supports_range_stepping>:
695 (target_supports_range_stepping): New macro.
697 2013-05-17 Joel Brobecker <brobecker@adacore.com>
699 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
700 confusion in comment.
702 2013-05-17 Joel Brobecker <brobecker@adacore.com>
704 * lynx-low.c (struct process_info_private): New type.
705 (lynx_add_process): New function.
706 (lynx_create_inferior, lynx_attach): Replace calls to
707 add_process by calls to lynx_add_process.
708 (lynx_resume): If PTID is null, then try using
709 current_process()->private->last_wait_event_ptid.
711 (lynx_clear_inferiors): Delete. The contents of that function
712 has been inlined in lynx_mourn;
713 (lynx_wait_1): Save the ptid in the process's private data.
714 (lynx_mourn): Free the process' private data. Replace call
715 to lynx_clear_inferiors by call to clear_inferiors.
717 2013-05-17 Yao Qi <yao@codesourcery.com>
719 * i386-low.c (i386_length_and_rw_bits): Move the comment to
722 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
724 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
725 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
726 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
727 PT_TEXT_END_ADDR guards. Update comments.
728 (linux_target_op) <read_offsets>: Conditionally define to
729 linux_read_offsets if the target is UCLIBC and if it defines
730 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
732 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
733 Andrew Jenner <andrew@codesourcery.com>
735 * Makefile.in (SFILES): Add linux-nios2-low.c.
736 (clean): Add action to delete nios2-linux.c.
737 (nios2-linux.c): New rule.
738 * configure.srv: Add nios2*-*-linux*.
739 * linux-nios2-low.c: New.
741 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
743 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
745 2013-04-25 Hui Zhu <hui@codesourcery.com>
748 * ax.c (ax_printf): Add fflush.
750 2013-04-22 Tom Tromey <tromey@redhat.com>
752 * Makefile.in (SFILES): Add filestuff.c.
753 (OBS): Add filestuff.o.
754 (filestuff.o): New target.
755 * config.in, configure: Rebuild.
756 * configure.ac: Check for fdwalk, pipe2.
758 2013-04-17 Pedro Alves <palves@redhat.com>
760 * configure.ac (USE_THREAD_DB): Delete variable.
761 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
762 Don't AC_SUBST USE_THREAD_DB.
763 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
764 * config.in, configure: Regenerate.
766 2013-04-16 Pedro Alves <palves@redhat.com>
768 * linux-low.h (struct lwp_info) <thread_known>: Move under
769 the USE_THREAD_DB #ifdef.
771 2013-04-16 Pedro Alves <palves@redhat.com>
773 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
774 (linux-low.o): Delete rule.
775 * linux-low.h: Always include "gdb_thread_db.h" instead of
776 conditionally including thread_db.h.
777 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
780 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
782 * Makefile.in (install-only): Fix make install regression.
784 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
786 Convert man pages to texinfo, new gdbinit.5 texinfo page.
787 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
789 * gdbserver.1: Remove.
791 2013-03-22 Pedro Alves <palves@redhat.com>
793 * linux-low.c (handle_extended_wait): Don't call
794 linux_enable_event_reporting.
796 2013-03-15 Tony Theodore <tonyt@logyst.com>
799 * Makefile.in (SHELL): Use @SHELL@.
801 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
803 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
806 2013-03-13 Joel Brobecker <brobecker@adacore.com>
808 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
809 Remove extraneous NULL element.
811 2013-03-13 Yao Qi <yao@codesourcery.com>
813 * tracepoint.c (traceframe_read_tsv): Look for the last matched
814 'V' block in trace frame.
816 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
818 * target.h (struct target_ops): Add btrace ops.
819 (target_supports_btrace): New macro.
820 (target_enable_btrace): New macro.
821 (target_disable_btrace): New macro.
822 (target_read_btrace): New macro.
823 * gdbthread.h (struct thread_info): Add btrace field.
824 * server.c: Include btrace-common.h.
825 (handle_btrace_general_set): New function.
826 (handle_btrace_enable): New function.
827 (handle_btrace_disable): New function.
828 (handle_general_set): Call handle_btrace_general_set.
829 (handle_qxfer_btrace): New function.
830 (struct qxfer qxfer_packets[]): Add btrace entry.
831 * inferiors.c (remove_thread): Disable btrace.
832 * linux-low: Include linux-btrace.h.
833 (linux_low_enable_btrace): New function.
834 (linux_low_read_btrace): New function.
835 (linux_target_ops): Add btrace ops.
836 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
837 Add srv_linux_btrace=yes.
838 (x86_64-*-linux*): Add linux-btrace.o.
839 Add srv_linux_btrace=yes.
840 * configure.ac: Define HAVE_LINUX_BTRACE.
841 * config.in: Regenerated.
842 * configure: Regenerated.
844 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
846 * server.c (handle_qxfer): Preserve error message if -3 is
848 (qxfer): Document the -3 return value.
850 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
852 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
853 (linux_btrace_h): New variable.
854 (linux-btrace.o): New rule.
856 2013-03-08 Stan Shebs <stan@codesourcery.com>
857 Hafiz Abid Qadeer <abidh@codesourcery.com>
859 * tracepoint.c (trace_buffer_size): New global.
860 (DEFAULT_TRACE_BUFFER_SIZE): New define.
861 (init_trace_buffer): Change to one-argument function. Allocate
863 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
864 handle QTBuffer:size packet.
865 (cmd_bigqtbuffer_size): New function.
866 (initialize_tracepoint): Call init_trace_buffer with
867 DEFAULT_TRACE_BUFFER_SIZE.
868 * server.c (handle_query): Add QTBuffer:size in the
871 2013-03-07 Yao Qi <yao@codesourcery.com>
873 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
874 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
876 (cmd_qtsp): Adjust condition. Do post increment.
877 Set cur_action and cur_step_action back to 0.
879 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
882 * linux-low.c (linux_write_memory): Return early success if LEN is
885 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
887 * configure.srv: Add x86_64-*-cygwin* as target.
889 2013-02-28 Tom Tromey <tromey@redhat.com>
891 * configure.ac: Invoke AC_SYS_LARGEFILE.
892 * configure, config.in: Rebuild.
894 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
896 * win32-low.c: Throughout, fix format strings and casts of
897 printf-like functions to avoid type related warnings on all
899 (get_child_debug_event): Print dwDebugEventCode as hex since
900 that's how it's usually documented.
902 2013-02-28 Yao Qi <yao@codesourcery.com>
904 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
907 2013-02-27 Jiong Wang <jiwang@tilera.com>
909 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
910 (reg-tilegx32.c): New rule.
911 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
912 * linux-tile-low.c (tile_arch_setup): New function. Invoke
913 different register info initializer according to elf class.
914 (init_registers_tilgx32): New function. The tilegx32 register info
916 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
917 (tile_store_gregset): Likewise.
919 2013-02-27 Yao Qi <yao@codesourcery.com>
921 * server.c (process_point_options): Print debug message when
922 debug_threads is true.
924 2013-02-26 Yao Qi <yao@codesourcery.com>
926 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
928 2013-02-19 Pedro Alves <palves@redhat.com>
929 Kai Tietz <ktietz@redhat.com>
933 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
934 instead of strtoul to extract address from packet.
935 (process_serial_event) <'z'>: Likewise.
937 2013-02-18 Yao Qi <yao@codesourcery.com>
939 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
941 2013-02-14 Pedro Alves <palves@redhat.com>
945 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
946 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
948 2013-02-14 Pedro Alves <palves@redhat.com>
950 * tracepoint.c (cmd_qtdpsrc): Use savestring.
952 2013-02-14 Pedro Alves <palves@redhat.com>
954 * tracepoint.c (save_string): Delete.
955 (add_tracepoint_action): Use savestring instead of save_string.
957 2013-02-12 Pedro Alves <palves@redhat.com>
959 * linux-xtensa-low.c: Ditto.
960 * xtensa-xtregs.c: Ditto.
962 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
964 * thread-db.c (thread_db_get_tls_address): NULL pointer check
967 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
969 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
970 aarch64_num_wp_regs and aarch64_num_bp_regs to
971 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
973 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
975 * linux-aarch64-low.c (ps_get_thread_area): Replace
976 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
978 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
979 Marcus Shawcroft <marcus.shawcroft@arm.com>
980 Nigel Stephens <nigel.stephens@arm.com>
981 Yufeng Zhang <yufeng.zhang@arm.com>
983 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
984 (aarch64.c, aarch64-without-fpu.c): New targets.
985 * configure.srv (aarch64*-*-linux*): New.
986 * linux-aarch64-low.c: New file.
988 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
990 * linux-low.c (handle_extended_wait, linux_create_inferior)
991 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
992 (dequeue_one_deferred_signal, linux_resume_one_thread)
993 (fetch_register, linux_write_memory, linux_enable_event_reporting)
994 (linux_tracefork_grandchild, linux_test_for_tracefork)
995 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
996 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
997 where the argument is 0.
999 2013-01-25 Yao Qi <yao@codesourcery.com>
1001 * event-loop.c: Include "queue.h".
1002 (gdb_event_p): New typedef.
1003 (struct gdb_event) <next_event>: Remove.
1004 (event_queue): Change to QUEUE(gdb_event_p).
1005 (async_queue_event): Remove.
1006 (gdb_event_xfree): New.
1007 (initialize_event_loop): New.
1008 (process_event): Use API from QUEUE.
1009 (wait_for_event): Likewise.
1010 * server.c (main): Call initialize_event_loop.
1011 * server.h (initialize_event_loop): Declare.
1013 2013-01-18 Yao Qi <yao@codesourcery.com>
1015 * ax.h (struct eval_agent_expr_context): New.
1016 (gdb_eval_agent_expr): Update declaration.
1017 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1018 TFRAME. Add new argument CTX.
1019 * server.h (struct eval_agent_expr_context): Declare.
1020 (agent_mem_read, agent_tsv_read): Update declaration.
1021 (agent_mem_read_string): Likewise.
1022 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1023 (add_traceframe_block): Add new argument TPOINT.
1024 Increase TPOINT->traceframe_usage.
1025 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1026 eval_tracepoint_agent_expr.
1027 (condition_true_at_tracepoint): Likewise.
1028 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1029 (agent_mem_read_string, agent_tsv_read): Likewise.
1031 2013-01-16 Yao Qi <yao@codesourcery.com>
1033 * linux-low.c (linux_resume_one_lwp): Don't check
1034 'lwp->bp_reinsert != 0'.
1036 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1037 Pedro Alves <palves@redhat.com>
1039 * lynx-low.c (ptrace_request_to_str): Define a temporary
1040 macro and use it to simplify this function's implementation.
1042 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1044 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1047 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1049 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1051 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1053 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1055 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1057 * lynx-low.c (lynx_resume): Use the resume_info parameter
1058 to determine the ptid for the lynx_ptrace call, unless
1059 it is equal to minus_one_ptid, in which case we use the
1060 ptid of the current_inferior.
1061 (lynx_wait_1): After having received a thread create/exit
1062 event, resume the inferior's execution using the signaling
1063 thread's ptid, rather than the old ptid.
1065 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1067 * lynx-low.c (lynx_resume): Delete variable ret.
1069 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1071 * gdbreplay.c (gdbreplay_version): Update copyright year.
1072 * server.c (gdbserver_version): Likewise.
1074 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1076 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1079 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1081 * lynx-low.c (ptrace_request_to_str): Add handling for
1084 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1086 * lynx-low.c (lynx_attach): Delete variable new_process.
1088 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1090 * lynx-low.c (lynx_create_inferior): Delete variable
1093 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1095 * lynx-low.c (ptrace_request_to_str): Do not handle
1096 PTRACE_GETTHREADLIST if this macro does not exist.
1098 2012-12-15 Yao Qi <yao@codesourcery.com>
1100 * Makefile.in (OBS): Add notif.o.
1101 * notif.c, notif.h: New.
1102 * server.c: Include "notif.h".
1103 (struct vstop_notif) <next>: Remove.
1105 (queue_stop_reply): Update.
1106 (push_event, send_next_stop_reply): Remove.
1107 (discard_queued_stop_replies): Update.
1108 (notif_stop): New variable.
1109 (handle_v_stopped): Remove.
1110 (handle_v_requests): Don't call handle_v_stopped. Call
1111 handle_ack_notif instead.
1112 (queue_stop_reply_callback): Call notif_event_enque instead
1113 of queue_stop_reply.
1114 (handle_status): Don't call send_next_stop_reply, call
1115 notif_write_event instead.
1116 (kill_inferior_callback): Likewise.
1117 (detach_or_kill_inferior_callback): Likewise.
1118 (main): Call initialize_notif.
1119 (process_serial_event): Call QUEUE_is_empty.
1120 (handle_target_event): Call notif_push instead of push event.
1121 * server.h (push_event): Remove declaration.
1123 2012-12-10 Tom Tromey <tromey@redhat.com>
1125 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1126 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1129 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1130 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1131 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1132 (amd64-linux-ipa.o, ax.o): Rewrite.
1133 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1134 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1135 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1136 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1137 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1138 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1139 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1140 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1141 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1142 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1143 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1144 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1145 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1146 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1147 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1148 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1149 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1150 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1151 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1152 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1153 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1154 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1155 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1156 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1157 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1158 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1159 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1160 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1161 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1162 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1163 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1164 (reg-tilegx.o): Remove.
1165 (all_object_files): New macro.
1166 Include .deps files.
1167 * aclocal.m4, configure: Rebuild.
1168 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1169 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1170 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1172 2012-12-05 Tom Tromey <tromey@redhat.com>
1175 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1177 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1179 * configure.ac: Check for linux/perf_event.h.
1180 * config.in: Regenerated.
1181 * configure: Regenerated.
1183 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1185 * hostio.c (handle_readlink): Decrease buffer size
1186 parameter passed to readlink by one byte.
1188 2012-11-26 Yao Qi <yao@codesourcery.com>
1190 * configure.ac (build_warnings): Append '-Wempty-body'.
1191 * configure: Regenerated.
1192 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1195 2012-11-15 Pierre Muller <muller@sourceware.org>
1197 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1198 * config.in: Regenerate.
1199 * configure: Regenerate.
1200 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1201 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1202 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1203 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1205 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1206 instead of <sys/wait.h> header.
1207 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1209 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1211 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1212 (various make rules): Remove -DGDBSERVER
1214 2012-11-09 Yao Qi <yao@codesourcery.com>
1216 * spu-low.c (current_ptid): Move it to ..
1217 * gdbthread.h: ... here. New.
1218 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1219 * server.c (myresume, process_serial_event): Likewise.
1220 * thread-db.c (thread_db_find_new_threads): Likewise.
1221 * tracepoint.c (run_inferior_command): Likewise.
1223 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1225 * server.c (handle_search_memory_1): Include access length in
1228 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1230 * linux-crisv32-low.c: Fix compile errors.
1232 2012-09-04 Yao Qi <yao@codesourcery.com>
1234 * tracepoint.c (cmd_qtsv): Adjust debug message.
1235 Don't check CUR_TPOINT.
1237 2012-08-28 Yao Qi <yao@codesourcery.com>
1239 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1240 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1241 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1242 Remove declarations of xmalloc, xreallloc, xstrdup and
1244 * Makefile.in (libiberty_h): New.
1245 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1246 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1248 2012-08-23 Yao Qi <yao@codesourcery.com>
1250 * server.h: Remove declaration of 'xsnprintf'.
1252 2012-08-22 Keith Seitz <keiths@redhat.com>
1254 * server.h: Include build-gnulib-gbserver/config.h.
1255 * gdbreplay.c: Likewise.
1257 2012-08-08 Doug Evans <dje@google.com>
1259 * Makefile.in (SFILES): Add gdb_vecs.c.
1260 (OBS): Add gdb_vecs.o.
1261 (gdb_vecs_h, host_defs_h): New variables.
1262 (thread-db.o): Add $(gdb_vecs_h) dependency.
1263 (gdb_vecs.o): New rule.
1264 * thread-db.c: #include "gdb_vecs.h".
1265 (thread_db_load_search): Use a vector to iterate over path elements.
1266 Handle text appearing after "$pdir".
1268 * configure.ac: Add check for strstr.
1269 * config.in: Regenerate.
1270 * configure: Regenerate.
1272 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1274 * hostio.c (handle_pread): If pread fails, fall back to attempting
1276 (handle_pwrite): Likewise for pwrite.
1278 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1280 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1281 between unsupported TYPE and unimplementable ADDR/LEN combination.
1282 (arm_insert_point): Act on new return value.
1284 2012-07-31 Pedro Alves <palves@redhat.com>
1286 * server.c (process_point_options): Only skip tokens if we find
1287 one that is unrecognized. Don't treat 'X' specially while
1288 skipping unrecognized tokens.
1290 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1292 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1293 to 4-byte-align HW breakpoint addresses for Thumb.
1295 2012-07-27 Yao Qi <yao@codesourcery.com>
1299 * server.h: Declare gdb_agent_about_to_close.
1300 * target.c (kill_inferior): Include "agent.h".
1301 New. Send command 'kill'.
1302 * target.h (kill_inferior): Removed macro.
1303 * tracepoint.c (gdb_agent_about_to_close): New.
1304 (gdb_agent_helper_thread): Handle command 'close'.
1305 Wait endlessly until the inferior stops.
1306 Install gdb_agent_remove_socket to atexit hook.
1307 (agent_socket_name): New static variable.
1308 (gdb_agent_socket_init): Replace local variable 'name' with
1309 'agent_socket_name'.
1310 (gdb_agent_remove_socket): New.
1312 2012-07-27 Yao Qi <yao@codesourcery.com>
1314 * server.c (process_point_options): Stop at 'X' when parsing.
1316 2012-07-19 Michael Eager <eager@eagercon.com>
1318 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1320 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1321 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1322 hardware breakpoint.
1324 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1326 * gdbserver/linux-low.c (initialize_low): Call
1327 linux_ptrace_init_warnings.
1329 2012-07-02 Doug Evans <dje@google.com>
1331 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1334 2012-07-02 Stan Shebs <stan@codesourcery.com>
1336 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1337 (ax.o): Add it to build rule.
1339 (OBS): Add format.o.
1340 (IPA_OBS): Add format.o.
1341 * server.c (handle_query): Claim support for breakpoint commands.
1342 (process_point_options): Add command case.
1343 (process_serial_event): Leave running if there are printfs in
1345 * mem-break.h (any_persistent_commands): Declare.
1346 (add_breakpoint_commands): Declare.
1347 (gdb_no_commands_at_breakpoint): Declare.
1348 (run_breakpoint_commands): Declare.
1349 * mem-break.c (struct point_command_list): New struct.
1350 (struct breakpoint): New field command_list.
1351 (any_persistent_commands): New function.
1352 (add_commands_to_breakpoint): New function.
1353 (add_breakpoint_commands): New function.
1354 (gdb_no_commands_at_breakpoint): New function.
1355 (run_breakpoint_commands): New function.
1356 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1358 * ax.c: Include format.h.
1359 (ax_printf): New function.
1360 (gdb_eval_agent_expr): Add printf opcode.
1362 2012-06-13 Yao Qi <yao@codesourcery.com>
1364 * server.c (start_inferior): Remove duplicated writes to fields
1365 'last_resume_kind' and 'last_status' of 'current_inferior'.
1367 2012-06-12 Yao Qi <yao@codesourcery.com>
1368 Pedro Alves <palves@redhat.com>
1370 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1372 * server.c (handle_v_cont): Extend comment.
1374 2012-06-11 Yao Qi <yao@codesourcery.com>
1376 * linux-low.c (linux_attach): Add 'static'.
1378 2012-06-06 Yao Qi <yao@codesourcery.com>
1380 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1382 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1384 Fix gcc -flto compilation warning.
1385 * server.c (main): Make variable multi_mode and attach volatile.
1387 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1389 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1390 if the platform doesn't know about it.
1392 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1394 * Makefile.in (SFILES): Add linux-tile-low.c.
1395 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1396 * configure.srv: Handle tilegx-*-linux*.
1397 * linux-tile-low.c: New file.
1399 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1401 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1403 2012-05-24 Pedro Alves <palves@redhat.com>
1407 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1409 2012-05-24 Pedro Alves <palves@redhat.com>
1413 Replace target_signal with gdb_signal throughout.
1415 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1417 * linux-low.c (linux_store_registers): Avoid the copying sequence
1418 when no data has been retrieved by ptrace.
1420 2012-05-22 Will Deacon <will.deacon@arm.com>
1422 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1423 Include asm/ptrace.h.
1424 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1427 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1429 * linux-low.c (linux_store_registers): Don't re-retrieve data
1430 with ptrace that has already been obtained from /proc. Always
1431 copy any data retrieved with ptrace to the buffer supplied.
1433 2012-05-11 Yao Qi <yao@codesourcery.com>
1434 Pedro Alves <palves@redhat.com>
1436 * linux-low.c (enum stopping_threads_kind): New.
1437 (stopping_threads): Change type to `enum stopping_threads_kind'.
1438 (handle_extended_wait): If stopping and suspending threads, leave
1439 the new_lwp suspended too.
1440 (linux_wait_for_event): Adjust.
1441 (stop_all_lwps): Set `stopping_threads' to
1442 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1443 whether we're suspending threads or just stopping them. Assert no
1446 2012-04-29 Yao Qi <yao@codesourcery.com>
1448 * server.h: Move some code to ...
1449 * gdbthread.h: ... here. New.
1450 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1451 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1452 (nto-low.o, win32-low.o): Likewise.
1453 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1454 * regcache.c, remote-utils.c, server.c: Likewise.
1455 * target.c, tracepoint.c, win32-low.c: Likewise.
1457 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1459 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1460 (PTRACE_ARG4_TYPE): Likewise.
1461 (PTRACE_XFER_TYPE): Likewise.
1462 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1463 ptrace to PTRACE_ARG3_TYPE.
1464 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1465 (PTRACE_ARG4_TYPE): Likewise.
1466 (PTRACE_XFER_TYPE): Likewise.
1467 (linux_detach_one_lwp): Cast fourth argument of
1468 ptrace to long then PTRACE_ARG4_TYPE.
1469 (regsets_fetch_inferior_registers): Cast third argument of
1470 ptrace to long then PTRACE_ARG3_TYPE.
1471 (regsets_store_inferior_registers): Likewise.
1473 2012-04-20 Pedro Alves <palves@redhat.com>
1475 * configure: Regenerate.
1477 2012-04-19 Pedro Alves <palves@redhat.com>
1479 * Makefile.in (GNULIB_BUILDDIR): New.
1480 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1481 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1482 (all, install-only, uninstall, clean-info, all-lib, clean): No
1483 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1484 (maintainer-clean realclean distclean): Use subdir_do.
1486 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1487 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1488 * acinclude.m4: Include acx_configure_dir.m4.
1489 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1490 calls. Call AC_PROG_RANLIB. Configure gnulib using
1493 (GNULIB_STDINT_H): Adjust.
1494 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1495 * gdbreplay.c: Include build-gnulib/config.h.
1496 * server.h: Likewise.
1497 * aclocal.m4: Regenerate.
1498 * config.in: Regenerate.
1499 * configure: Regenerate.
1501 2012-04-19 Pedro Alves <palves@redhat.com>
1503 * Makefile.in (LIBGNU, INCGNU): Adjust.
1504 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1505 (all, install-only, uninstall, clean-info, all-lib, clean)
1506 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1507 * configure.ac: Adjust AC_OUTPUT output.
1508 * aclocal.m4: Regenerate.
1509 * configure: Regenerate.
1511 2012-04-19 Pedro Alves <palves@redhat.com>
1513 * Makefile.in (generated_files): New.
1514 (server_h): Remove the explicit dependency on config.h, and depend
1515 on $generated_files.
1517 2012-04-19 Pedro Alves <palves@redhat.com>
1519 * Makefile.in (INCGNU): Add -Ignulib.
1521 2012-04-19 Pedro Alves <palves@redhat.com>
1523 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1524 (INCGNU): ... this, and spell out -I here.
1525 (GNULIB_LIB): Rename to ...
1527 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1529 2012-04-19 Pedro Alves <palves@redhat.com>
1531 * config.in: Regenerate.
1533 2012-04-19 Pedro Alves <palves@redhat.com>
1535 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1536 * server.h (memmem): Remove declaration.
1537 * config.in: Regenerate.
1538 * configure: Regenerate.
1540 2012-04-19 Yao Qi <yao@codesourcery.com>
1542 * Makefile.in (SFILES): Add common/vec.c.
1546 2012-04-19 Yao Qi <yao@codesourcery.com>
1548 * remote-utils.c (prepare_resume_reply): Replace with macro
1549 target_core_of_thread.
1550 * server.c (handle_qxfer_threads_proper): Likewise.
1551 * target.h (traget_core_of_thread): New macro.
1553 2012-04-18 Pedro Alves <palves@redhat.com>
1555 * aclocal.m4: Regenerate.
1556 * configure: Regenerate.
1558 2012-04-16 Yao Qi <yao@codesourcery.com>
1560 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1561 duplicated on address.
1563 2012-04-16 Yao Qi <yao@codesourcery.com>
1565 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1566 (struct tracepoint_action_ops) <send>: New field.
1567 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1568 (agent_expr_send, x_tracepoint_action_send): New.
1569 (l_tracepoint_action_send): New.
1570 (cmd_qtdp): Download and install tracepoint
1571 according to `use_agent'.
1572 (run_inferior_command): Add one more parameter `len'.
1574 (tracepoint_send_agent): New.
1575 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1577 2012-04-16 Yao Qi <yao@codesourcery.com>
1579 * tracepoint.c (download_tracepoints): Moved to ...
1580 (cmd_qtstart): ... here.
1582 2012-04-14 Yao Qi <yao@codesourcery.com>
1584 * tracepoint.c: Include inttypes.h.
1585 (struct collect_memory_action): Use sized types.
1586 (struct tracepoint): Likewise.
1587 (cmd_qtdp, stop_tracing): Update print specifiers.
1588 (cmd_qtp, response_tracepoint): Likewise.
1589 (collect_data_at_tracepoint): Likewise.
1590 (collect_data_at_step): Likewise.
1592 2012-04-14 Yao Qi <yao@codesourcery.com>
1594 Import gnulib module inttypes.
1595 * aclocal.m4, config.in, configure: Regenerated.
1597 2012-04-14 Yao Qi <yao@codesourcery.com>
1599 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1600 Makefile and config.status at last.
1602 2012-04-13 Yao Qi <yao@codesourcery.com>
1604 * tracepoint.c: Include stdint.h unconditionally.
1606 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1608 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1609 on BFD_HAVE_SYS_PROCFS_TYPE.
1610 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1611 * configure: Regenerate.
1612 * config.in: Likewise.
1614 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1616 * Makefile.in (clean): Also remove x32.c x32-linux.c
1617 x32-avx.c x32-avx-linux.c.
1618 (x32.o): New target.
1620 (x32-linux.o): Likewise.
1621 (x32-linux.c): Likewise.
1622 (x32-avx.o): Likewise.
1623 (x32-avx.c): Likewise.
1624 (x32-avx-linux.o): Likewise.
1625 (x32-avx-linux.c): Likewise.
1627 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1628 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1629 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1630 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1631 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1632 i386/x32-avx-linux.xml.
1634 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1635 (init_registers_x32_avx_linux): Likwise.
1636 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1637 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1639 2012-04-13 Pedro Alves <palves@redhat.com>
1641 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1642 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1643 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1644 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1647 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1649 * linux-x86-low.c (compat_x32_clock_t): New.
1650 (compat_x32_siginfo_t): Likewise.
1651 (compat_x32_siginfo_from_siginfo): Likewise.
1652 (siginfo_from_compat_x32_siginfo): Likewise.
1653 (linux_is_elf64): Likewise.
1654 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1655 and siginfo_from_compat_x32_siginfo for x32.
1656 (x86_arch_setup): Set linux_is_elf64.
1658 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1661 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1663 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1664 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1665 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1666 compatible with process.
1668 2012-04-12 Yao Qi <yao@codesourcery.com>
1670 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1671 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1672 (install-only, install-info, clean): Handle sub dir gnulib.
1673 (all-lib, am--refresh): New targets.
1674 (memmem.o): Remove target.
1675 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1676 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1677 (AC_REPLACE_FUNCS): Remove memmem.
1678 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1679 (AC_OUTPUT): Generate Makefile in gnulib/.
1680 * aclocal.m4, config.in, configure: Regenerated.
1682 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1684 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1686 2012-04-05 Pedro Alves <palves@redhat.com>
1688 -Werror=strict-aliasing
1690 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1693 2012-04-04 Pedro Alves <palves@redhat.com>
1695 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1696 (sparc_store_gregset_from_stack, sparc_store_gregset)
1697 (sparc_breakpoint_at): Fix formatting.
1699 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1701 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1703 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1704 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1705 * config.in: Regenerate.
1706 * configure: Likewise.
1708 2012-03-29 Pedro Alves <palves@redhat.com>
1710 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1711 Correct ptrace arguments.
1713 2012-03-28 Pedro Alves <palves@redhat.com>
1715 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1716 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1717 (IA64_FR1_REGNUM): New defines.
1718 (ia64_fetch_register): New.
1719 (the_low_target): Install it.
1720 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1722 * linux-low.c (linux_fetch_registers): Try the
1723 the_low_target.fetch_register hook first.
1725 * linux-arm-low.c (the_low_target): Adjust.
1726 * linux-bfin-low.c (the_low_target): Adjust.
1727 * linux-cris-low.c (the_low_target): Adjust.
1728 * linux-crisv32-low.c (the_low_target): Adjust.
1729 * linux-m32r-low.c (the_low_target): Adjust.
1730 * linux-m68k-low.c (the_low_target): Adjust.
1731 * linux-mips-low.c (the_low_target): Adjust.
1732 * linux-ppc-low.c (the_low_target): Adjust.
1733 * linux-s390-low.c (the_low_target): Adjust.
1734 * linux-sh-low.c (the_low_target): Adjust.
1735 * linux-sparc-low.c (the_low_target): Adjust.
1736 * linux-tic6x-low.c (the_low_target): Adjust.
1737 * linux-x86-low.c (the_low_target): Adjust.
1738 * linux-xtensa-low.c (the_low_target): Adjust.
1740 2012-03-26 Pedro Alves <palves@redhat.com>
1742 * server.c (handle_qxfer_libraries): Don't bail early if
1743 the_target->qxfer_libraries_svr4 is not NULL.
1745 2012-03-26 Pedro Alves <palves@redhat.com>
1747 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1749 2012-03-23 Pedro Alves <palves@redhat.com>
1751 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1752 "library-list-svr4" element's start tag when the the DSO list is
1755 2012-03-23 Pedro Alves <palves@redhat.com>
1757 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1758 a variable whose type size is the same as the inferior's pointer
1761 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1763 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1765 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1766 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1767 * linux-low.h: Include <signal.h>.
1768 (struct siginfo): Remove forward declaration.
1769 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1772 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1774 * .gitignore: Ignore more files.
1776 2012-03-19 Pedro Alves <palves@redhat.com>
1777 Jan Kratochvil <jan.kratochvil@redhat.com>
1779 * server.c (cont_thread, general_thread): Add describing comments.
1780 (start_inferior): Clear `cont_thread'.
1781 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1784 2012-03-15 Yao Qi <yao@codesourcery.com>
1786 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1788 (cmd_qtdp): ... here.
1790 2012-03-15 Yao Qi <yao@codesourcery.com>
1792 * tracepoint.c (struct tracepoint_action_ops): New.
1793 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1794 (m_tracepoint_action_download): New.
1795 (r_tracepoint_action_download): New.
1796 (x_tracepoint_action_download): New.
1797 (l_tracepoint_action_download): New.
1798 (add_tracepoint_action): Install `action->ops' according type.
1799 (download_tracepoint_1): Move code `download' function pointer
1800 of various tracepoint_action_ops.
1802 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1804 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1805 linux_ptrace_attach_warnings.
1807 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1809 * Makefile.in (linux-ptrace.o): New.
1810 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1811 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1812 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1813 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1814 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1816 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1818 2012-03-08 Yao Qi <yao@codesourcery.com>
1819 Pedro Alves <palves@redhat.com>
1821 Fix PR server/13392.
1822 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1824 * tracepoint.c (remove_tracepoint): New.
1825 (cmd_qtdp): Call remove_tracepoint when failed to install.
1827 2012-03-07 Pedro Alves <palves@redhat.com>
1829 * linux-low.c (get_detach_signal): New.
1830 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1831 Pass on pending signals to PTRACE_DETACH. Check the result of the
1833 * server.c (program_signals, program_signals_p): New.
1834 (handle_general_set): Handle QProgramSignals.
1835 * server.h (program_signals, program_signals_p): Declare.
1837 2012-03-05 Pedro Alves <palves@redhat.com>
1838 Jan Kratochvil <jan.kratochvil@redhat.com>
1840 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1843 2012-03-03 Yao Qi <yao@codesourcery.com>
1845 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1846 agent_look_up_symbols.
1848 2012-03-03 Yao Qi <yao@codesourcery.com>
1850 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1851 (linux-x86-low.o): Likewise.
1852 * server.h: Remove in_process_agent_loaded.
1853 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1857 2012-03-03 Yao Qi <yao@codesourcery.com>
1859 * tracepoint.c (gdb_agent_capability): New global.
1860 (in_process_agent_loaded_ust): Renamed to
1861 `in_process_agent_supports_ust'.
1863 (in_process_agent_supports_ust): Call agent_capability_check.
1864 (clear_installed_tracepoints): Assert that agent supports
1867 2012-03-03 Yao Qi <yao@codesourcery.com>
1869 * linux-low.c (linux_supports_agent): New.
1870 (linux_target_ops): Initialize field `supports_agent' with
1871 linux_supports_agent.
1872 * target.h (struct target_ops) <supports_agent>: New.
1873 (target_supports_agent): New macro.
1874 * server.c (handle_general_set): Handle packet 'QAgent'.
1875 (handle_query): Send `QAgent+'.
1876 * Makefile.in (server.o): Depends on agent.h.
1878 2012-03-03 Yao Qi <yao@codesourcery.com>
1880 * Makefile.in (OBS): Add agent.o.
1881 Add new rule for agent.o.
1882 Track dependence of tracepoint.c on agent.h.
1883 * tracepoint.c (run_inferior_command_1):
1884 (run_inferior_command): Call agent_run_command.
1885 (gdb_ust_connect_sync_socket): Deleted. Move it to
1887 (resume_thread, stop_thread): Likewise.
1888 (gdb_ust_socket_init): Renamed to ...
1889 (gdb_agent_socket_init): ... New.
1890 (gdb_ust_thread): Renamed to ...
1891 (gdb_agent_helper_thread): ... New.
1892 (gdb_ust_init): Move some code to ...
1893 (gdb_agent_init): ... here. New.
1894 [HAVE_UST]: Call gdb_ust_init.
1895 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1896 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1897 * config.in, configure: Regenerated.
1899 2012-03-02 Pedro Alves <palves@redhat.com>
1901 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1902 * linux-low.c (struct simple_pid_list): New.
1903 (stopped_pids): New a struct simple_pid_list pointer.
1904 (add_to_pid_list, pull_pid_from_list): New.
1905 (handle_extended_wait): Don't assume the first signal new children
1906 report is SIGSTOP. Adjust call to pull_pid_from_list.
1907 (linux_wait_for_lwp): Adjust.
1909 2012-03-02 Yao Qi <yao@codesourcery.com>
1911 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1914 2012-03-02 Yao Qi <yao@codesourcery.com>
1916 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1917 `stop_pc' and `tpoint'. Update caller.
1919 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1921 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1922 * linux-low.c (use_linux_regsets): New macro.
1923 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1924 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1925 (linux_register_in_regsets): New function.
1926 (usr_fetch_inferior_registers): Skip registers covered by
1928 (usr_store_inferior_registers): Likewise.
1929 (usr_fetch_inferior_registers): New macro.
1930 (usr_store_inferior_registers): Likewise.
1931 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1932 (linux_store_registers): Likewise.
1933 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1935 (init_registers_mips64_dsp_linux): Likewise.
1936 (init_registers_mips_linux): New macro.
1937 (init_registers_mips_dsp_linux): Likewise.
1938 (mips_dsp_num_regs): Likewise.
1939 (DSP_BASE, DSP_CONTROL): New fallback macros.
1940 (mips_base_regs): New macro.
1941 (mips_regmap): Use it. Fix the size.
1942 (mips_dsp_regmap): New variable.
1943 (mips_dsp_regset_bitmap): Likewise.
1944 (mips_arch_setup): New function.
1945 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1947 (mips_cannot_store_register): Likewise.
1948 (the_low_target): Update .arch_setup, .num_regs and .regmap
1949 initializers. Add .regset_bitmap initializer.
1950 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1952 * linux-bfin-low.c (the_low_target): Likewise.
1953 * linux-cris-low.c (the_low_target): Likewise.
1954 * linux-crisv32-low.c (the_low_target): Likewise.
1955 * linux-ia64-low.c (the_low_target): Likewise.
1956 * linux-m32r-low.c (the_low_target): Likewise.
1957 * linux-m68k-low.c (the_low_target): Likewise.
1958 * linux-ppc-low.c (the_low_target): Likewise.
1959 * linux-s390-low.c (the_low_target): Likewise.
1960 * linux-sh-low.c (the_low_target): Likewise.
1961 * linux-sparc-low.c (the_low_target): Likewise.
1962 * linux-tic6x-low.c (the_low_target): Likewise.
1963 * linux-x86-low.c (the_low_target): Likewise.
1964 * linux-xtensa-low.c (the_low_target): Likewise.
1965 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1966 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1967 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1969 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1970 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1972 2012-02-29 Yao Qi <yao@codesourcery.com>
1973 Pedro Alves <palves@redhat.com>
1975 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1976 `step_over_finished' is true.
1978 2012-02-27 Pedro Alves <palves@redhat.com>
1980 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1981 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1983 2012-02-27 Pedro Alves <palves@redhat.com>
1986 * linux-low.c (pid_is_stopped): New.
1987 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1989 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
1991 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1994 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1996 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1998 2012-02-24 Luis Machado <lgustavo@codesourcery>
2000 * server.c (handle_query): Advertise support for target-side
2001 breakpoint condition evaluation.
2002 (process_point_options): New function.
2003 (process_serial_event): When inserting a breakpoint, check for
2004 a target-side condition that should be evaluated.
2006 * mem-break.c: Include regcache.h and ax.h.
2007 (point_cond_list_t): New data structure.
2008 (breakpoint) <cond_list>: New field.
2009 (find_gdb_breakpoint_at): Make non-static.
2010 (delete_gdb_breakpoint_at): Clear any target-side
2012 (clear_gdb_breakpoint_conditions): New function.
2013 (add_condition_to_breakpoint): Likewise.
2014 (add_breakpoint_condition): Likewise.
2015 (gdb_condition_true_at_breakpoint): Likewise.
2016 (gdb_breakpoint_here): Return result directly instead
2017 of going through a local variable.
2019 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2020 (clear_gdb_breakpoint_conditions): Likewise.
2021 (add_breakpoint_condition): Likewise.
2022 (gdb_condition_true_at_breakpoint): Likewise.
2024 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2025 (need_step_over_p): Take target-side breakpoint condition into
2028 2012-02-24 Luis Machado <lgustavo@codesourcery>
2030 * server.h: Include tracepoint.h.
2031 (agent_mem_read, agent_get_trace_state_variable_value,
2032 agent_set_trace_state_variable_value,
2033 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2034 get_set_tsv_func_addr): New prototypes.
2036 * ax.h: New include file.
2037 * ax.c: New source file.
2039 * tracepoint.c: Include ax.h.
2040 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2041 agent_expr, eval_result_type): Move to ax.h.
2042 (parse_agent_expr): Rename to ...
2043 (gdb_parse_agent_expr): ... this, make it non-static and move
2045 (unparse_agent_expr) Rename to ...
2046 (gdb_unparse_agent_expr): ... this, make it non-static and move
2048 (eval_agent_expr): Rename to ...
2049 (eval_tracepoint_agent_expr): ... this.
2050 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2051 forward declarations.
2052 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2053 (agent_get_trace_state_variable_value): New function.
2054 (agent_set_trace_state_variable_value): New function.
2055 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2056 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2057 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2058 (condition_true_at_tracepoint): Likewise.
2059 (parse_agent_expr): Rename to ...
2060 (gdb_parse_agent_expr): ... this and move to ax.c.
2061 (unparse_agent_expr): Rename to ...
2062 (gdb_unparse_agent_expr): ... this and move to ax.c.
2063 (gdb_agent_op_name): Move to ax.c.
2064 (eval_agent_expr): Rename to ...
2065 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2067 (eval_tracepoint_agent_expr): New function.
2068 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2070 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2072 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2073 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2074 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2075 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2076 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2077 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2078 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2079 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2080 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2081 (compile_bytecodes): Remove forward declaration.
2082 (is_goto_target): Move to ax.c.
2083 (compile_bytecodes): Move to ax.c and call
2084 agent_get_trace_state_variable_value (...) and
2085 agent_set_trace_state_variable_value (...).
2087 * Makefile.in: Update ax.c and IPA dependencies.
2089 2012-02-24 Pedro Alves <palves@redhat.com>
2091 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2092 (cmd_bigqtbuffer_circular): ... this. Only handle
2093 'QTBuffer:circular:'.
2094 (handle_tracepoint_general_set): Adjust.
2096 2012-02-16 Yao Qi <yao@codesourcery.com>
2098 * inferiors.c: Move code to ...
2099 * dll.c: .... here. New.
2100 * server.h: Declare clear_dlls.
2101 * Makefile.in (SFILES): Add dll.c.
2105 2012-02-11 Yao Qi <yao@codesourcery.com>
2107 * server.c: (handle_monitor_command): Add a new parameter
2109 (handle_query): Update caller.
2111 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2113 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2114 * configure, config.in: Regenerate.
2115 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2118 2012-02-02 Pedro Alves <palves@redhat.com>
2120 Try SIGKILL first, then PTRACE_KILL.
2121 * linux-low.c (linux_kill_one_lwp): New.
2122 (linux_kill_one_lwp): Rename to ...
2123 (kill_one_lwp_callback): ... this. Use the new
2126 2012-02-02 Pedro Alves <palves@redhat.com>
2128 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2131 2012-01-27 Pedro Alves <palves@redhat.com>
2133 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2134 (elf_64_file_p): Make static.
2135 (linux_pid_exe_is_elf_64_file): New.
2136 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2137 Delete declarations.
2138 (linux_pid_exe_is_elf_64_file): Declare.
2139 * linux-x86-low.c (x86_arch_setup): Use
2140 linux_pid_exe_is_elf_64_file.
2142 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2144 * linux-low.c (linux_wait_for_event_1): Rename to ...
2145 (linux_wait_for_event): ... here and merge it with former
2146 linux_wait_for_event - new variable wait_ptid, use it.
2147 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2149 2012-01-23 Pedro Alves <palves@redhat.com>
2151 * server.c (main): Avoid yet another case of infinite loop while
2152 detaching/killing after a longjmp.
2154 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2157 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2159 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2161 * hostio.c (handle_readlink): New function.
2162 (handle_vFile): Call it to handle "vFile:readlink" packets.
2164 2012-01-20 Pedro Alves <palves@redhat.com>
2165 Ulrich Weigand <ulrich.weigand@linaro.org>
2167 * server.c (handle_v_requests): Only support vAttach and vRun to
2168 start multiple processes when in extended protocol mode.
2170 2012-01-17 Pedro Alves <palves@redhat.com>
2172 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2173 memalign plus mprotect to allocate the scratch buffer.
2175 2012-01-13 Pedro Alves <palves@redhat.com>
2177 * server.c (attach_inferior): Clear `cont_thread'.
2179 2012-01-13 Pedro Alves <palves@redhat.com>
2181 * server.c (main): Avoid infinite loop while detaching/killing
2184 2012-01-09 Doug Evans <dje@google.com>
2186 * server.c (start_inferior): Set last_ptid in --wrapper case.
2188 2012-01-06 Yao Qi <yao@codesourcery.com>
2190 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2192 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2194 2012-01-04 Yao Qi <yao@codesourcery.com>
2196 * tracepoint.c (cmd_qtdp): Print debug message
2197 for static tracepoint.
2199 2012-01-04 Yao Qi <yao@codesourcery.com>
2201 * tracepoint.c (trace_vdebug): Differentiate debug message
2202 between gdbserver and IPA.
2204 2012-01-03 Yao Qi <yao@codesourcery.com>
2206 * tracepoint.c (tracepoint_was_hit): Don't collect for
2209 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2211 * terminal.h: Reformat copyright header.
2213 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2215 * server.c (gdbserver_version): Update copyright year.
2216 * gdbreplay.c (gdbreplay_version): Likewise.
2218 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2220 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2223 2011-12-18 Hui Zhu <teawater@gmail.com>
2224 * linux-low.c (linux_create_inferior): Save return value to ret.
2226 2011-12-18 Hui Zhu <teawater@gmail.com>
2228 * linux-low.c (linux_create_inferior): Save return value to ret.
2230 2011-12-16 Doug Evans <dje@google.com>
2232 * linux-low.c (linux_create_inferior): If stdio connection,
2233 redirect stdin from /dev/null, stdout to stderr.
2234 * remote-utils.c (remote_is_stdio): New static global.
2235 (remote_connection_is_stdio): New function.
2236 (remote_prepare): Handle stdio connection.
2237 (remote_open): Ditto.
2238 (remote_close): Don't close stdin for stdio connections.
2239 (read_prim,write_prim): New functions. Replace all calls to
2240 read/write to these.
2241 * server.c (main): Watch for "-" argument. Move call to
2242 remote_prepare before start_inferior.
2243 * server.h (STDIO_CONNECTION_NAME): New macro.
2244 (remote_connection_is_stdio): Declare.
2246 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2247 in debugging output.
2249 2011-12-15 Yao Qi <yao@codesourcery.com>
2251 * tracepoint.c: Include sys/syscall.h.
2252 (gdb_ust_thread): Remove preprocessor conditional.
2254 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2256 * linux-low.c (linux_detach_one_lwp): Call
2257 the_low_target.prepare_to_resume before detaching.
2259 2011-12-14 Yao Qi <yao@codesourcery.com>
2261 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2264 2011-12-14 Yao Qi <yao@codesourcery.com>
2266 * i386-low.c (i386_low_stopped_data_address): Initialize local
2269 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2273 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2274 DR_CONTROL unless necessary. Extend comments.
2275 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2276 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2278 2011-12-13 Yao Qi <yao@codesourcery.com>
2280 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2282 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2284 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2286 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2287 Print new debug message for such case.
2289 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2291 Fix overlapping memcpy.
2292 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2293 the read_inferior_memory transfer.
2294 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2295 write_inferior_memory transfer.
2296 (set_fast_tracepoint_jump): New variable buf. Use it for the
2297 read_inferior_memory and write_inferior_memory transfers.
2298 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2299 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2300 Use it for the write_inferior_memory transfer.
2301 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2304 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2306 * linux-low.c (fetch_register, store_register): Make code
2307 consistent, fix formatting.
2309 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2311 * linux-low.c (usr_store_inferior_registers): Factor out code
2312 to handle individual registers into...
2313 (store_register): ... this new function.
2315 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2317 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2318 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2319 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2320 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2321 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2322 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2323 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2324 (srv_xmlfiles): Add new XML files.
2326 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2328 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2329 (init_registers_s390_linux32v1): Add prototype.
2330 (init_registers_s390_linux32v2): Likewise.
2331 (init_registers_s390_linux64v1): Likewise.
2332 (init_registers_s390_linux64v2): Likewise.
2333 (init_registers_s390x_linux64v1): Likewise.
2334 (init_registers_s390x_linux64v2): Likewise.
2335 (s390_num_regs): Increment to 52.
2336 (s390_regmap): Add orig_r2 register.
2337 (s390_num_regs_3264): Increment to 68.
2338 (s390_regmap_3264): Add orig_r2 register.
2339 (s390_collect_ptrace_register): Handle orig_r2 register.
2340 (s390_supply_ptrace_register): Likewise.
2341 (s390_fill_last_break): New function.
2342 (s390_store_last_break): Likewise.
2343 (s390_fill_system_call): New function.
2344 (s390_store_system_call): Likewise.
2345 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2347 (s390_check_regset): New function.
2348 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2349 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2350 Update target_regsets for available register sets.
2352 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2353 Jan Kratochvil <jan.kratochvil@redhat.com>
2355 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2356 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2358 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2359 * linux-low.h (struct process_info_private): New member r_debug.
2360 * server.c (handle_qxfer_libraries): Call
2361 the_target->qxfer_libraries_svr4.
2362 (handle_qxfer_libraries_svr4): New function.
2363 (qxfer_packets): New entry "libraries-svr4".
2364 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2365 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2366 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2367 PACKET_qXfer_libraries_svr4.
2369 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2371 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2372 PSW address/mask between 8-byte and 16-byte formats.
2373 (s390_supply_ptrace_register): Likewise.
2374 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2375 basic addressing mode bit.
2377 2011-11-24 Stan Shebs <stan@codesourcery.com>
2379 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2381 2011-11-17 Stan Shebs <stan@codesourcery.com>
2383 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2384 (tracing_start_time): New global.
2385 (tracing_stop_time): New global.
2386 (tracing_user_name): New global.
2387 (tracing_notes): New global.
2388 (tracing_stop_note): New global.
2389 (cmd_qtstart): Set traceframe_usage, start_time.
2390 (stop_tracing): Set stop_time.
2391 (cmd_qtstatus): Report additional status.
2392 (cmd_qtp): New function.
2393 (handle_tracepoint_query): Call it.
2394 (cmd_qtnotes): New function.
2395 (handle_tracepoint_general_set): Call it.
2396 (get_timestamp): Rename from tsv_get_timestamp.
2398 2011-11-14 Stan Shebs <stan@codesourcery.com>
2399 Kwok Cheung Yeung <kcy@codesourcery.com>
2401 * linux-x86-low.c (small_jump_insn): New.
2402 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2403 trampoline and error message, build a trampoline and issue a small
2404 jump instruction to it.
2405 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2406 trampoline and error message.
2407 (x86_get_min_fast_tracepoint_insn_len): New.
2408 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2409 * linux-low.h (struct linux_target_ops): Add arguments to
2410 install_fast_tracepoint_jump_pad operation, add new operation.
2411 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2413 (linux_get_min_fast_tracepoint_insn_len): New function.
2414 (linux_target_op): Add new operation.
2415 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2416 (gdb_trampoline_buffer_end): Ditto.
2417 (gdb_trampoline_buffer_error): Ditto.
2418 (struct ipa_sym_addresses): Add fields for new IPA variables.
2419 (symbol_list): Add entries for new IPA variables.
2420 (struct tracepoint): Add fields to hold the address range of the
2421 trampoline used by the tracepoint.
2422 (trampoline_buffer_head): New static variable.
2423 (trampoline_buffer_tail): Ditto.
2424 (claim_trampoline_space): New function.
2425 (have_fast_tracepoint_trampoline_buffer): New function.
2426 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2428 (install_fast_tracepoint): Ditto, also add error buffer argument.
2429 (cmd_qtminftpilen): New function.
2430 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2431 (fast_tracepoint_from_trampoline_address): New function.
2432 (fast_tracepoint_collecting): Handle trampoline as part of jump
2434 (set_trampoline_buffer_space): New function.
2435 (initialize_tracepoint): Initialize new IPA variables.
2436 * target.h (struct target_ops): Add arguments to
2437 install_fast_tracepoint_jump_pad operation, add new
2438 get_min_fast_tracepoint_insn_len operation.
2439 (target_get_min_fast_tracepoint_insn_len): New.
2440 (install_fast_tracepoint_jump_pad): Add arguments.
2441 * server.h (IPA_BUFSIZ): Define.
2442 * linux-i386-ipa.c: Include extra header files.
2443 (initialize_fast_tracepoint_trampoline_buffer): New function.
2444 (initialize_low_tracepoint): Call it.
2445 * server.h (set_trampoline_buffer_space): Declare.
2446 (claim_trampoline_space): Ditto.
2447 (have_fast_tracepoint_trampoline_buffer): Ditto.
2449 2011-11-14 Yao Qi <yao@codesourcery.com>
2451 * server.c (handle_query): Handle InstallInTrace for qSupported.
2452 * tracepoint.c (add_tracepoint): Sort list.
2453 (install_tracepoint, download_tracepoint): New.
2454 (cmd_qtdp): Call them to install and download tracepoints.
2455 (sort_tracepoints): Removed.
2456 (cmd_qtstart): Update.
2458 2011-11-14 Yao Qi <yao@codesourcery.com>
2460 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2461 * mem-break.h: Declare.
2462 * tracepoint.c (cmd_qtstart): Move some code to ...
2463 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2465 (download_tracepoints): Move some code to ...
2466 (download_tracepoint_1): ... here. New.
2468 2011-11-08 Yao Qi <yao@codesourcery.com>
2470 * remote-utils.c (relocate_instruction): A comment fix.
2472 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2474 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2475 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2476 dr_status_mirror and dr_control_mirror from debug_reg_state.
2477 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2478 (i386_initial_stuff): Remove use of deleted globals.
2479 (i386_get_thread_context, i386_set_thread_context,
2480 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2481 from debug_reg_state.
2483 2011-11-05 Yao Qi <yao@codesourcery.com>
2485 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2486 address as TPOINT's.
2488 2011-11-02 Stan Shebs <stan@codesourcery.com>
2490 * tracepoint.c (agent_mem_read_string): New function.
2491 (eval_agent_expr): Call it for tracenz.
2492 * server.c (handle_query): Report support for tracenz.
2494 2011-11-02 Yao Qi <yao@codesourcery.com>
2496 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2498 2011-11-02 Yao Qi <yao@codesourcery.com>
2500 * target.h: Fix a typo in comment.
2502 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2504 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2505 clobber the breakpoints' shadows with fast tracepoint jumps.
2506 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2507 * target.c (write_inferior_memory): Also pass MYADDR down to
2510 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2512 * configure.ac: Check support for personality routine.
2513 * configure: Regenerate.
2514 * config.in: Likewise.
2515 * linux-low.c: Include <sys/personality.h>.
2516 Define ADDR_NO_RANDOMIZE if necessary.
2517 (linux_create_inferior): Disable address space randomization when
2518 forking inferior, if requested.
2519 (linux_supports_disable_randomization): New function.
2520 (linux_target_ops): Install it.
2521 * server.h (disable_randomization): Declare.
2522 * server.c (disable_randomization): New global variable.
2523 (handle_general_set): Handle QDisableRandomization.
2524 (handle_query): Likewise for qSupported.
2525 (main): Support --disable-randomization and --no-disable-randomization
2526 command line arguments.
2527 * target.h (struct target_ops): Add supports_disable_randomization.
2528 (target_supports_disable_randomization): New macro.
2530 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2532 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2534 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2535 [!PT_GETDSBT] (target_loadmap): New definition.
2536 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2537 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2538 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2539 and PT_GETDSBT to LINUX_LOADMAP.
2540 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2541 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2543 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2545 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2546 (arm_linux_hwbp_cap): New static variable.
2547 (arm_linux_get_hwbp_cap): Replace by ...
2548 (arm_linux_init_hwbp_cap): ... this new function.
2549 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2550 (arm_linux_get_hw_watchpoint_count): Likewise.
2551 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2552 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2553 (arm_prepare_to_resume): Use perror_with_name instead of error.
2555 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2557 * linux-arm-low.c: Include <signal.h>.
2558 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2559 (struct arm_linux_hwbp_cap): New data type.
2560 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2561 (struct arm_linux_hw_breakpoint): New data type.
2562 (MAX_BPTS, MAX_WPTS): Define.
2563 (struct arch_process_info, struct arch_lwp_info): New data types.
2564 (arm_linux_get_hwbp_cap): New function.
2565 (arm_linux_get_hw_breakpoint_count): Likewise.
2566 (arm_linux_get_hw_watchpoint_count): Likewise.
2567 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2568 (arm_hwbp_control_initialize): Likewise.
2569 (arm_hwbp_control_is_enabled): Likewise.
2570 (arm_hwbp_control_is_initialized): Likewise.
2571 (arm_hwbp_control_disable): Likewise.
2572 (arm_linux_hw_breakpoint_equal): Likewise.
2573 (arm_linux_hw_point_initialize): Likewise.
2574 (struct update_registers_data): New data structure.
2575 (update_registers_callback: New function.
2576 (arm_insert_point): Likewise.
2577 (arm_remove_point): Likewise.
2578 (arm_stopped_by_watchpoint): Likewise.
2579 (arm_stopped_data_address): Likewise.
2580 (arm_new_process): Likewise.
2581 (arm_new_thread): Likewise.
2582 (arm_prepare_to_resume): Likewise.
2583 (the_low_target): Register arm_insert_point, arm_remove_point,
2584 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2585 arm_new_thread, and arm_prepare_to_resume.
2587 2011-09-15 Stan Shebs <stan@codesourcery.com>
2589 * server.h (struct emit_ops): Add compare-goto fields.
2590 * tracepoint.c (gdb_agent_op_sizes): New table.
2591 (emit_eq_goto): New function.
2592 (emit_ne_goto): New function.
2593 (emit_lt_goto): New function.
2594 (emit_le_goto): New function.
2595 (emit_gt_goto): New function.
2596 (emit_ge_goto): New function.
2597 (is_goto_target): New function.
2598 (compile_bytecodes): Recognize special cases of compare-goto
2599 combinations and call specialized emitters for them.
2600 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2601 (amd64_emit_ne_goto): New function.
2602 (amd64_emit_lt_goto): New function.
2603 (amd64_emit_le_goto): New function.
2604 (amd64_emit_gt_goto): New function.
2605 (amd64_emit_ge_goto): New function.
2606 (amd64_emit_ops): Add the new functions.
2607 (i386_emit_eq_goto): New function.
2608 (i386_emit_ne_goto): New function.
2609 (i386_emit_lt_goto): New function.
2610 (i386_emit_le_goto): New function.
2611 (i386_emit_gt_goto): New function.
2612 (i386_emit_ge_goto): New function.
2613 (i386_emit_ops): Add the new functions.
2615 2011-09-08 Stan Shebs <stan@codesourcery.com>
2617 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2618 (i386_emit_epilogue): Restore %ebx.
2620 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2622 * server.c (step_thread): Remove definition.
2623 (process_serial_event): Don't handle Hs.
2624 * server.h (step_thread): Remove declaration.
2625 * target.c (set_desired_inferior): Remove use of step_thread.
2627 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2629 * linux-low.c: Include linux-procfs.h.
2630 (linux_attach_lwp_1): Update comments.
2631 (linux_attach): Scan for existing threads when attaching to a
2632 process that is the tgid.
2633 * Makefile.in: Update dependencies.
2635 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2637 * configure.srv: Add linux-procfs.o dependencies.
2639 2011-08-14 Yao Qi <yao@codesourcery.com>
2641 * target.h (struct target_ops): Fix indent.
2642 * win32-low.c (win32_target_ops): Fix comment.
2644 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2645 Yao Qi <yao@codesourcery.com>
2647 * Makefile.in (clean): Remove tic6x-*.c files.
2648 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2649 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2650 (tic6x-c64xp-linux.c): Likewise.
2651 * configure.srv: Add support for tic6x-*-uclinux.
2652 * linux-tic6x-low.c: New.
2653 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2655 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2656 Yao Qi <yao@codesourcery.com>
2658 * target.h (struct target_ops): Add read_loadmap.
2659 * linux-low.c (struct target_loadseg): New type.
2660 (struct target_loadmap): New type.
2661 (linux_read_loadmap): New function.
2662 (linux_target_ops): Add linux_read_loadmap.
2663 * server.c (handle_query): Support qXfer:fdpic:read packet.
2664 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2667 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2669 * win32-low.c: Include <stdint.h>.
2671 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2673 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2674 to the inferior here.
2675 (i386_remove_aligned_watchpoint): Ditto.
2676 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2677 fit part of the watchpoint in the debug registers.
2678 (i386_update_inferior_debug_regs): New.
2679 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2680 registers, and only update the inferior on success.
2681 (i386_low_remove_watchpoint): Ditto.
2683 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2685 * linux-low.c (compare_ints, unique, list_threads, show_process,
2686 linux_core_of_thread): Delete.
2687 (linux_target_ops): Change linux_core_of_thread to
2688 linux_common_core_of_thread.
2689 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2690 * utils.c (malloc_failure): Change type of argument.
2691 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2692 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2693 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2694 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2695 (IPA_OBJS): Add common-utils-ipa.o.
2696 (ptid_h, linux_osdata_h): New macros.
2697 (server_h): Add common/common-utils.h, common/xml-utils.h,
2698 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2700 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2701 ptid.o, buffer.o): New rules.
2702 (linux-low.o): Add common/linux-osdata.h as a dependency.
2703 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2704 * configure.ac: Add AC_HEADER_DIRENT check.
2705 * config.in: Regenerate.
2706 * configure: Regenerate.
2707 * remote-utils.c (xml_escape_text): Delete.
2708 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2709 buffer_xml_printf): Move to common/buffer.c.
2710 * server.c (main): Remove call to initialize_inferiors.
2711 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2712 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2713 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2714 internal_error, gdb_assert, gdb_assert_fail): Delete.
2715 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2716 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2718 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2719 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2720 initialize_inferiors): Delete.
2722 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2724 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2727 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2729 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2731 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2733 2011-05-26 Yao Qi <yao@codesourcery.com>
2735 * Makefile.in (thread-db.o): Track dependence to
2736 common/gdb_thread_db.h.
2737 * thread-db.c: include gdb_thread_db.h from right place.
2739 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2741 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2742 __FILE__ and __LINE__ to internal_error.
2744 2011-05-13 Doug Evans <dje@google.com>
2746 * thread-db.c (try_thread_db_load_from_sdir): New function.
2747 (try_thread_db_load_from_dir): New function.
2748 (thread_db_load_search): Handle $sdir, ignore $pdir.
2749 Remove trying of system directories if search of
2750 libthread-db-search-path fails, that is now done via $sdir.
2752 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2754 * server.c (handle_query): Add EnableDisableTracepoints to the list
2755 of supported features.
2756 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2758 (cmd_qtenable_disable): New.
2759 (cmd_qtstart): Install tracepoints even if disabled.
2760 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2761 receiving a QTEnable or QTDisable packet.
2762 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2763 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2765 (gdb_probe): Skip data collection if static tracepoint is disabled.
2767 2011-05-10 Doug Evans <dje@google.com>
2769 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2771 2011-05-04 Doug Evans <dje@google.com>
2773 * linux-low.c (linux_join): Skip process lookup.
2774 * spu-low.c (spu_join): Ditto.
2775 * server.c (join_inferiors_callback): Delete.
2776 (process_serial_event): For 'D' packet (detach) call join_inferior
2779 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2781 * README: Don't mention xscale*-*-linux*.
2782 * configure.srv (xscale*-*-linux*): Don't handle target.
2784 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2786 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2788 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2789 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2790 (i386_emit_void_call_2): Likewise.
2792 2011-04-26 Yao Qi <yao@codesourcery.com>
2794 * linux-low.c: Move common macros to linux-ptrace.h.
2795 Include linux-ptrace.h.
2796 * Makefile.in (linux_ptrace_h): New.
2797 (linux-low.o): Depends on linux-ptrace.h.
2799 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2801 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2802 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2803 (remote_prepare): New function with most of the TCP code from ...
2804 (remote_open): ... here. Detect PORT here unconditionally. Move also
2805 setting transport_is_reliable.
2806 * server.c (run_once): New variable.
2807 (gdbserver_usage): Document it.
2808 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2809 the first run if RUN_ONCE.
2810 * server.h (run_once, remote_prepare): New declarations.
2812 2011-04-19 Tom Tromey <tromey@redhat.com>
2814 * win32-low.c (handle_load_dll): Remove duplicate "the".
2816 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2818 Remove support for old Cygwin 1.5 versions.
2819 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2820 function to avoid warning.
2821 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2824 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2826 * gdbserver/server.h (Macro _): Define it if not available.
2828 2011-03-14 Michael Snyder <msnyder@vmware.com>
2830 * hostio.c (handle_close): Remove unnecessary null test.
2832 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2834 * Makefile.in (maintainer-clean realclean distclean): Remove
2835 "make ... subdir_do" command.
2837 2011-03-10 Michael Snyder <msnyder@vmware.com>
2839 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2841 * server.c (handle_v_run): Free alloced buffer on early return.
2843 2011-03-09 Yao Qi <yao@codesourcery.com>
2846 2011-03-04 Yao Qi <yao@codesourcery.com>
2848 * Makefile.in: Remove GNU make feature --directory.
2850 2011-03-05 Yao Qi <yao@codesourcery.com>
2852 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2853 (subdir_do): New make target. Copied from gdb/Makefile.
2854 (maintainer-clean, realclean, distclean, clean): Call corresponding
2855 make targets in common/Makefile.
2857 2011-02-11 Yao Qi <yao@codesourcery.com>
2859 * configure.ac: Call AC_PROG_RANLIB.
2860 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2861 * configure: Regenerate.
2863 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2865 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2867 2011-03-06 Yao Qi <yao@codesourcery.com>
2869 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2871 2011-03-05 Yao Qi <yao@codesourcery.com>
2873 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2874 (subdir_do): New make target. Copied from gdb/Makefile.
2875 (maintainer-clean, realclean, distclean, clean): Call corresponding
2876 make targets in common/Makefile.
2878 2011-03-04 Yao Qi <yao@codesourcery.com>
2880 * Makefile.in: Remove GNU make feature --directory.
2882 2011-03-04 Michael Snyder <msnyder@vmware.com>
2884 * server.c (queue_stop_reply): Call xmalloc not malloc.
2886 2011-03-02 Michael Snyder <msnyder@vmware.com>
2888 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2890 2011-02-28 Michael Snyder <msnyder@vmware.com>
2892 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2893 (cmd_qtframe): Ditto.
2894 (cmd_qtbuffer): Ditto.
2895 (cmd_bigqtbuffer): Ditto.
2897 * utils.c (decimal2str): Initialize 'width' to nine, then
2900 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2902 * hostio.c (require_data): Free *data, not data.
2904 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2906 * hostio.c (require_data): Use free, not xfree.
2908 2011-02-27 Michael Snyder <msnyder@vmware.com>
2910 * server.c (handle_query): Discard unused value.
2912 * hostio.c (require_data): Free malloc memory before returning
2915 2011-02-26 Michael Snyder <msnyder@vmware.com>
2917 * linux-low.c (list_threads): Call closedir for dirent.
2919 2011-02-27 Michael Snyder <msnyder@vmware.com>
2921 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2922 a case statement falls through.
2924 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2926 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2929 2011-02-26 Michael Snyder <msnyder@vmware.com>
2931 * utils.c (decimal2str): Eliminate dead code and dead param.
2932 (pulongest): Drop dead param from call to decimal2str.
2935 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2937 Revert the following patch (not approved yet):
2938 2011-02-21 Hui Zhu <teawater@gmail.com>
2939 * tracepoint.c (tp_printf): New function.
2940 (eval_agent_expr): Handle gdb_agent_op_printf.
2942 2011-02-21 Hui Zhu <teawater@gmail.com>
2944 * tracepoint.c (tp_printf): New function.
2945 (eval_agent_expr): Handle gdb_agent_op_printf.
2947 2011-02-18 Tom Tromey <tromey@redhat.com>
2949 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2950 (tracepoint.o): Likewise.
2951 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2952 (gdb_agent_op_names): Likewise.
2954 2011-02-18 Tom Tromey <tromey@redhat.com>
2956 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2957 gdb_agent_op_rot>: New constants.
2958 (gdb_agent_op_names): Add pick and roll.
2959 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2962 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2964 * aclocal.m4: Regenerated with aclocal-1.11.1.
2966 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2968 * server.c (handle_qxfer_traceframe_info): New.
2969 (qxfer_packets): Register "traceframe-info".
2970 (handle_query): Report support for qXfer:traceframe-info:read+.
2971 * tracepoint.c (match_blocktype): New.
2972 (traceframe_find_block_type): Rename to ...
2973 (traceframe_walk_blocks): ... this. Add callback filter argument,
2975 (traceframe_find_block_type): New, reimplemented on top of
2976 traceframe_walk_blocks.
2977 (build_traceframe_info_xml): New.
2978 (traceframe_read_info): New.
2979 * server.h (traceframe_read_info): Declare.
2981 2011-02-11 Yao Qi <yao@codesourcery.com>
2983 * configure.ac: Call AC_PROG_RANLIB.
2984 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2985 * configure: Regenerate.
2987 2011-02-07 Pedro Alves <pedro@codesourcery.com>
2989 * server.c (gdb_read_memory): Change return semantics to allow
2991 (handle_search_memory_1): Adjust.
2992 (process_serial_event) <'m' packet>: Handle partial transfers.
2993 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2995 2011-01-28 Pedro Alves <pedro@codesourcery.com>
2997 * regcache.c (init_register_cache): Initialize
2998 regcache->register_status.
2999 (free_register_cache): Release regcache->register_status.
3000 (regcache_cpy): Copy register_status.
3001 (registers_to_string): Print 'x's for unavailable registers.
3002 (supply_register): Mark the register's status valid or
3003 unavailable, depending on whether a buffer was passed in or not.
3004 (supply_register_zeroed): New.
3005 (supply_regblock): Mark the registers' status valid or
3006 unavailable, depending on whether a buffer was passed in or not.
3007 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3008 (struct regcache): New `register_status' field.
3009 (supply_register_zeroed): Declare.
3010 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3011 supply_register_zeroed, rather than passing a NULL buffer to
3013 * tracepoint.c (fetch_traceframe_registers): Update comment.
3015 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3017 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3020 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3022 * server.h (decode_xfer_write): Change prototype.
3023 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3024 and don't extract the annex here.
3025 * server.c (decode_xfer_read): Remove `annex' parameter,
3026 and don't extract the annex here.
3028 (struct qxfer): New.
3029 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3030 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3031 (handle_qxfer_statictrace): New functions, abstracted out from
3032 handle_query, and made to use the struct qxfer interface.
3033 (handle_threads_qxfer_proper): Rename to ...
3034 (handle_qxfer_threads_proper): ... this.
3035 (handle_threads_qxfer): Rename to ...
3036 (handle_qxfer_threads): ... this. Adjust.
3037 (qxfer_packets): New array.
3038 (handle_qxfer): New function.
3039 (handle_query): Use handle_qxfer.
3041 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3043 * gdbreplay.c: Shorten lines of >= 80 columns.
3044 * linux-low.c: Ditto.
3045 * linux-ppc-low.c: Ditto.
3046 * linux-s390-low.c: Ditto.
3047 * linux-sparc-low.c: Ditto.
3048 * linux-x86-low.c: Ditto.
3049 * linux-xtensa-low.c: Ditto.
3050 * mem-break.c: Ditto.
3052 * regcache.h: Ditto.
3053 * remote-utils.c: Ditto.
3056 * thread-db.c: Ditto.
3057 * tracepoint.c: Ditto.
3059 * win32-low.h: Ditto.
3061 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3063 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3066 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3068 * server.c (gdbserver_version): Update copyright year in version
3070 * gdbreplay.c (gdbreplay_version): Ditto.
3072 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3074 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3075 * linux-bfin-low.c: New file.
3076 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3077 PT_DATA_ADDR for BFIN targets.
3078 * Makefile.in (SFILES): Add linux-bfin-low.c.
3079 (clean): Remove reg-bfin.c.
3080 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3081 * README: Mention supported Blackfin targets.
3083 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3085 * .gitignore: New file.
3087 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3089 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3091 2010-10-22 Jie Zhang <jie@codesourcery.com>
3093 * Makefile.in: Add FLAGS_TO_PASS variable.
3094 (install): Remove dependency of install-only and recursively
3095 invoke make for install-only.
3097 2010-10-04 Doug Evans <dje@google.com>
3099 * Makefile.in (uninstall): Use $(DESTDIR).
3101 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3105 * linux-x86-low.c (compat_siginfo_from_siginfo)
3106 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3107 si_code is < 0. Check for si_code == SI_TIMER before checking for
3110 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3112 * lynx-i386-low.c: New file.
3113 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3115 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3117 * lynx-low.c (ptrace_request_to_str): Remove handling for
3118 request values that have been removed in LynxOS 5.x.
3120 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3122 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3125 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3127 * configure.ac: Add --enable-inprocess-agent option.
3128 * configure: Rebuilt.
3130 2010-09-06 Yao Qi <yao@codesourcery.com>
3132 * linux-low.c (linux_kill): Remove unused variable.
3133 (linux_stabilize_threads): Likewise.
3134 * server.c (start_inferior): Likewise.
3135 (queue_stop_reply_callback): Likewise.
3136 * tracepoint.c (do_action_at_tracepoint): Likewise.
3138 2010-09-06 Yao Qi <yao@codesourcery.com>
3140 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3143 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3145 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3147 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3149 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3152 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3154 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3155 gdbserver/lynx-ppc-low.c: New files.
3156 * Makefile.in (lynx_low_h): New variable.
3157 (lynx-low.o, lynx-ppc-low.o): New rules.
3158 * configure.ac: On LynxOS, link with -lnetinet.
3159 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3160 * configure: regenerate.
3162 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3164 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3165 * configure.ac: Add check for vasprintf and vsnprintf.
3166 * configure, config.in: Regenerate.
3167 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3169 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3171 * gdbreplay.c: Move include of alloca.h up, next to include of
3173 * server.h: Add include of malloc.h.
3174 * mem-break.c: Remove include of malloc.h.
3175 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3177 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3179 * Makefile.in (memmem.o): Build with -Wno-error.
3181 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3183 * utils.c (xsnprintf): Make non-static.
3184 * server.h: Add xsnprintf declaration.
3185 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3186 replace calls to snprintf by calls to xsnprintf throughout.
3188 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3190 * configure.ac: Add configure check for alloca.
3191 * configure, config.in: Regenerate.
3192 * server.h: Include alloca.h if it exists.
3193 * gdbreplay.c: Include alloca.h if it exists.
3195 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3197 * linux-low.c (__SIGRTMIN): Define if not already defined.
3198 (linux_create_inferior): Check for __ANDROID__ rather than
3200 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3201 are already deferred.
3202 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3203 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3204 stopped and already has a pending signal to report.
3205 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3206 a pending signal to report or is moving out of a jump pad.
3207 (linux_init_signals): Check for __ANDROID__ rather than
3210 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3212 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3213 debug_threads check. Avoid a linear search when not doing debug
3216 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3218 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3219 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3220 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3221 (process_event): Change local fd's type to gdb_fildes_t.
3222 (create_file_handler): Adjust prototype.
3223 (delete_file_handler): Adjust prototype.
3224 (handle_file_event): Adjust prototype. Use pfildes.
3225 (create_file_event): Adjsut prototype.
3226 * remote-utils.c (remote_desc, listen_desc): Change type to
3228 * server.h: New gdb_fildes_t typedef.
3229 [USE_WIN32API]: Include winsock2.h.
3230 (delete_file_handler, add_file_handler): Adjust prototypes.
3232 * utils.c (pfildes): New.
3234 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3236 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3237 * configure: Regenerate.
3239 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3241 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3242 (linux_done_accessing_memory): ... this.
3243 (linux_target_ops): Adjust.
3244 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3245 * nto-low.c (nto_target_ops): Adjust comment.
3246 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3247 * spu-low.c (spu_target_ops): Adjust comment.
3248 * target.h (target_ops): Rename unprepare_to_access_memory field
3249 to done_accessing_memory.
3250 (unprepare_to_access_memory): Rename to ...
3251 (done_accessing_memory): ... this.
3253 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3255 * linux-low.c (linux_prepare_to_access_memory): New.
3256 (linux_unprepare_to_access_memory): New.
3257 (linux_target_ops): Install them.
3258 * server.c (read_memory): Rename to ...
3259 (gdb_read_memory): ... this. Use
3260 prepare_to_access_memory/prepare_to_access_memory.
3261 (write_memory): Rename to ...
3262 (gdb_write_memory): ... this. Use
3263 prepare_to_access_memory/prepare_to_access_memory.
3264 (handle_search_memory_1): Adjust.
3265 (process_serial_event): Adjust.
3266 * target.h (struct target_ops): New fields
3267 prepare_to_access_memory and unprepare_to_access_memory.
3268 (prepare_to_access_memory, unprepare_to_access_memory): New.
3269 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3270 prepare_to_access_memory/prepare_to_access_memory.
3271 * nto-low.c (nto_target_ops): Adjust.
3272 * spu-low.c (spu_target_ops): Adjust.
3273 * win32-low.c (win32_target_ops): Adjust.
3275 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3277 * Makefile.in (WARN_CFLAGS): Get it from configure.
3278 (WERROR_CFLAGS): New.
3279 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3280 * configure.ac: Introduce --enable-werror, which adds -Werror to
3281 the compiler command line. Enabled by default. Disable with
3282 --disable-werror. Add -Wdeclaration-after-statement
3283 Wpointer-arith and -Wformat-nonliteral to warning flags.
3284 * configure: Regenerate.
3286 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3288 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3290 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3292 * gdbreplay.c (remote_error): New.
3294 (expect): Use gdbchar. Check for error reading from GDB.
3295 Clarify sync error output.
3296 (play): Check for errors writing to GDB.
3297 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3298 * remote-utils.c (getpkt): Check for errors writing to the remote
3301 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3303 * linux-low.c (linux_wait_1): Move non-debugging code out of
3304 `debug_threads' control.
3306 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3308 * linux-low.c (linux_wait_1): Don't set last_status here.
3309 * server.c (push_event, queue_stop_reply_callback): Assert we're
3310 not pushing a TARGET_WAITKIND_IGNORE event.
3311 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3312 (myresume, handle_target_event): Set the thread's last_resume_kind
3313 and last_status from the target returned status.
3315 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3319 * linux-x86-low.c (update_debug_registers_callback): New.
3320 (i386_dr_low_set_addr): Use it.
3321 (i386_dr_low_get_addr): New.
3322 (i386_dr_low_set_control): Use update_debug_registers_callback.
3323 (i386_dr_low_get_control): New.
3324 (i386_dr_low_get_status): Adjust.
3325 * linux-low.c (linux_stop_lwp): New.
3326 * linux-low.h (linux_stop_lwp): Declare.
3328 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3329 argument instead of a i386_debug_reg_state.
3330 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3331 a i386_debug_reg_state.
3332 (i386_insert_aligned_watchpoint): Adjust.
3333 (i386_remove_aligned_watchpoint): Adjust.
3334 (i386_low_stopped_data_address): Read the debug registers from the
3335 inferior instead of from the mirrors.
3336 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3337 (i386_dr_low_get_addr): Declare.
3338 (i386_dr_low_get_control): Declare.
3339 (i386_dr_low_get_status): Change prototype.
3341 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3342 (i386_dr_low_get_addr): New.
3343 (i386_dr_low_get_control): New.
3344 (i386_dr_low_get_status): Adjust prototype. Return
3346 (i386_initial_stuff): Clear dr_status_mirror and
3348 (i386_get_thread_context): Adjust.
3349 (i386_set_thread_context): Adjust.
3350 (i386_thread_added): Adjust.
3352 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3354 * linux-low.h (linux_thread_area): Delete declaration.
3356 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3358 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3359 after its termination.
3361 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3363 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3364 (gdb_wants_all_stopped): Delete.
3365 (linux_wait_1): Don't call them.
3366 * server.c (handle_v_cont): Tag all threads as want-stopped.
3367 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3368 stopped as "client-wants-stopped".
3370 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3372 * Makefile.in (signals_h): New.
3373 (server_h): Depend on it.
3374 (server.o): Don't depend on $(signals_def).
3375 (signals.o): Depend on $(signals_def).
3377 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3379 * Makefile.in (signals_def): New.
3380 (server_h): Append include/gdb/signals.h and signals_def.
3381 (server.o): Append signals_def.
3383 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3385 * server.c (handle_target_event): Use target_signal_to_host for
3386 resume_info.sig initialization.
3387 * target.h (struct thread_resume) <sig>: New comment.
3389 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3391 * server.c (handle_query): strcpy() the returned string from paddress()
3392 instead of sprintf().
3393 * utils.c (paddress): Return phex_nz().
3395 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3397 * server.c (handle_v_cont): Call mourn_inferior if process
3399 (myresume): Likewise.
3401 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3403 Static tracepoints, and integration with UST.
3405 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3406 * mem-break.c (uninsert_all_breakpoints)
3407 (reinsert_all_breakpoints): New.
3408 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3409 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3410 (gdb_agent_ust_loaded, helper_thread_id)
3411 (gdb_agent_helper_thread_id): New macros.
3412 (struct ipa_sym_addresses): Add addr_ust_loaded,
3413 addr_helper_thread_id, addr_cmd_buf.
3414 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3415 (in_process_agent_loaded_ust): New.
3416 (write_e_ust_not_loaded): New.
3417 (maybe_write_ipa_ust_not_loaded): New.
3418 (struct collect_static_trace_data_action): New.
3419 (enum tracepoint_type) <static_tracepoint>: New.
3420 (struct tracepoint) <handle>: Mention static tracepoints.
3421 (struct static_tracepoint_ctx): New.
3422 (CMD_BUF_SIZE): New.
3423 (add_tracepoint_action): Handle static tracepoint actions.
3424 (unprobe_marker_at): New.
3425 (clear_installed_tracepoints): Handle static tracepoints.
3426 (cmd_qtdp): Handle static tracepoints.
3427 (probe_marker_at): New.
3428 (cmd_qtstart): Handle static tracepoints.
3429 (response_tracepoint): Handle static tracepoints.
3430 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3431 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3432 (get_context_regcache): Handle static tracepoints.
3433 (do_action_at_tracepoint): Handle static tracepoint actions.
3434 (traceframe_find_block_type): Handle static trace data blocks.
3435 (traceframe_read_sdata): New.
3436 (download_tracepoints): Download static tracepoint actions.
3437 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3438 (GDB_PROBE_NAME): New.
3443 (ust_marker_to_static_tracepoint): New.
3445 (collect_ust_data_at_tracepoint): New.
3446 (gdb_ust_probe): New.
3447 (UNIX_PATH_MAX, SOCK_DIR): New.
3448 (gdb_ust_connect_sync_socket): New.
3449 (resume_thread, stop_thread): New.
3450 (run_inferior_command): New.
3451 (init_named_socket): New.
3452 (gdb_ust_socket_init): New.
3453 (cstr_to_hexstr): New.
3455 (first_marker, next_marker): New.
3456 (response_ust_marker): New.
3457 (cmd_qtfstm, cmd_qtsstm): New.
3458 (unprobe_marker_at, probe_marker_at): New.
3459 (cmd_qtstmat, gdb_ust_thread): New.
3460 (gdb_ust_init): New.
3461 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3462 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3464 (x86_64_st_collect_regmap): New.
3465 (X86_64_NUM_ST_COLLECT_GREGS): New.
3466 (AMD64_RIP_REGNUM): New.
3467 (supply_static_tracepoint_registers): New.
3468 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3470 (i386_st_collect_regmap): New.
3471 (i386_NUM_ST_COLLECT_GREGS): New.
3472 (supply_static_tracepoint_registers): New.
3473 * server.c (handle_query): Handle qXfer:statictrace:read.
3474 <qSupported>: Report support for StaticTracepoints, and
3475 qXfer:statictrace:read features.
3476 * server.h (traceframe_read_sdata)
3477 (supply_static_tracepoint_registers): Declare.
3478 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3479 (unpack_varlen_hex): Include in IPA build.
3480 * Makefile.in (ustlibs, ustinc): New.
3481 (IPA_OBJS): Add remote-utils-ipa.o.
3482 ($(IPA_LIB)): Link -ldl and -lpthread.
3484 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3485 * config.in, configure: Regenerate.
3487 2010-06-20 Ian Lance Taylor <iant@google.com>
3488 Pedro Alves <pedro@codesourcery.com>
3490 * linux-x86-low.c (always_true): Delete.
3491 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3492 trying to fool the compiler with always_true.
3494 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3496 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3497 conditions in gdbserver.
3499 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3501 * spu-low.c (spu_read_memory): Wrap around local store limit.
3502 (spu_write_memory): Likewise.
3504 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3506 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3507 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3509 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3511 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3512 uses with LONGEST uses.
3514 2010-06-14 Stan Shebs <stan@codesourcery.com>
3515 Pedro Alves <pedro@codesourcery.com>
3519 * linux-x86-low.c: Include limits.h.
3524 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3525 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3526 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3527 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3528 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3529 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3530 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3531 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3532 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3533 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3534 (amd64_emit_void_call_2): New.
3535 (amd64_emit_ops): New.
3536 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3537 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3538 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3539 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3540 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3541 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3542 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3543 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3544 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3545 (i386_emit_stack_adjust, i386_emit_int_call_1)
3546 (i386_emit_void_call_2): New.
3547 (i386_emit_ops): New.
3548 (x86_emit_ops): New.
3549 (the_low_target): Install x86_emit_ops.
3550 * server.h (struct emit_ops): New.
3551 (get_raw_reg_func_addr): Declare.
3552 (current_insn_ptr, emit_error): Declare.
3553 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3554 (set_trace_state_variable_value): New defines.
3555 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3556 addr_get_trace_state_variable_value and
3557 addr_set_trace_state_variable_value.
3558 (symbol_list): New fields for get_raw_reg,
3559 get_trace_state_variable_value and set_trace_state_variable_value.
3560 (condfn): New typedef.
3561 (struct tracepoint): New field `compiled_cond'.
3562 (do_action_at_tracepoint): Clear compiled_cond.
3563 (get_trace_state_variable_value, set_trace_state_variable_value):
3565 (condition_true_at_tracepoint): If there's a compiled condition,
3567 (current_insn_ptr, emit_error): New globals.
3568 (struct bytecode_address): New.
3569 (get_raw_reg_func_addr): New.
3570 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3571 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3572 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3573 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3574 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3575 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3576 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3577 (compile_tracepoint_condition, compile_bytecodes): New.
3578 * target.h (emit_ops): Forward declare.
3579 (struct target_ops): New field emit_ops.
3580 (target_emit_ops): New.
3581 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3582 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3583 * linux-low.c (linux_emit_ops): New.
3584 (linux_target_ops): Install it.
3585 * linux-low.h (struct linux_target_ops): New field emit_ops.
3587 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3589 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3590 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3592 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3593 Stan Shebs <stan@codesourcery.com>
3595 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3596 (all): Depend on $(extra_libraries).
3597 (install-only): Install the IPA.
3598 (IPA_OBJS, IPA_LIB): New.
3599 (clean): Remove the IPA lib.
3600 (IPAGENT_CFLAGS): New.
3601 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3602 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3603 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3604 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3605 * configure.ac: Check for atomic builtins support in the compiler.
3606 (IPA_DEPFILES, extra_libraries): Define.
3607 * configure.srv (ipa_obj): Add description.
3608 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3609 (i[34567]86-*-linux*): Set ipa_obj.
3610 (x86_64-*-linux*): Set ipa_obj.
3611 * linux-low.c (stabilizing_threads): New.
3612 (supports_fast_tracepoints): New.
3613 (linux_detach): Stabilize threads before detaching.
3614 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3615 the lwp is either not stabilizing, or is moving out of a jump pad.
3616 (linux_fast_tracepoint_collecting): New.
3617 (maybe_move_out_of_jump_pad): New.
3618 (enqueue_one_deferred_signal): New.
3619 (dequeue_one_deferred_signal): New.
3620 (linux_wait_for_event_1): If moving out of a jump pad, defer
3621 pending signals to later.
3622 (linux_stabilize_threads): New.
3623 (linux_wait_1): Check if threads need moving out of jump pads, and
3625 (stuck_in_jump_pad_callback): New.
3626 (move_out_of_jump_pad_callback): New.
3628 (linux_resume_one_lwp): Handle moving out of jump pads.
3629 (linux_set_resume_request): Dequeue deferred signals.
3630 (need_step_over_p): Also step over fast tracepoint jumps.
3631 (start_step_over): Also uninsert fast tracepoint jumps.
3632 (finish_step_over): Also reinsert fast tracepoint jumps.
3633 (linux_install_fast_tracepoint_jump): New.
3634 (linux_target_ops): Install linux_stabilize_threads and
3635 linux_install_fast_tracepoint_jump_pad.
3636 * linux-low.h (linux_target_ops) <get_thread_area,
3637 install_fast_tracepoint_jump_pad>: New fields.
3638 (struct lwp_info) <collecting_fast_tracepoint,
3639 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3640 (linux_get_thread_area): Declare.
3641 * linux-x86-low.c (jump_insn): New.
3642 (x86_get_thread_area): New.
3643 (append_insns): New.
3645 (amd64_install_fast_tracepoint_jump_pad): New.
3646 (i386_install_fast_tracepoint_jump_pad): New.
3647 (x86_install_fast_tracepoint_jump_pad): New.
3648 (the_low_target): Install x86_get_thread_area and
3649 x86_install_fast_tracepoint_jump_pad.
3650 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3651 (struct fast_tracepoint_jump): New.
3652 (fast_tracepoint_jump_insn): New.
3653 (fast_tracepoint_jump_shadow): New.
3654 (find_fast_tracepoint_jump_at): New.
3655 (fast_tracepoint_jump_here): New.
3656 (delete_fast_tracepoint_jump): New.
3657 (set_fast_tracepoint_jump): New.
3658 (uninsert_fast_tracepoint_jumps_at): New.
3659 (reinsert_fast_tracepoint_jumps_at): New.
3660 (set_breakpoint_at): Use write_inferior_memory.
3661 (uninsert_raw_breakpoint): Use write_inferior_memory.
3662 (check_mem_read): Mask out fast tracepoint jumps.
3663 (check_mem_write): Mask out fast tracepoint jumps.
3664 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3665 (set_fast_tracepoint_jump): Declare.
3666 (delete_fast_tracepoint_jump)
3667 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3668 (reinsert_fast_tracepoint_jumps_at): Declare.
3669 * regcache.c: Don't compile many functions when building the
3670 in-process agent library.
3671 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3672 the register buffer in the heap.
3673 (free_register_cache): If the register buffer isn't owned by the
3674 regcache, don't free it.
3675 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3676 pre-existing register caches.
3677 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3679 (convert_ascii_to_int): : Constify `from' parameter type.
3680 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3681 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3682 the needed buffer in-place.
3683 (relocate_instruction): New.
3684 * server.c (handle_query) <qSymbols>: If the target supports
3685 tracepoints, give it a chance of looking up symbols. Report
3686 support for fast tracepoints.
3687 (handle_status): Stabilize threads.
3688 (process_serial_event): Adjust.
3689 * server.h (struct fast_tracepoint_jump): Forward declare.
3690 (struct process_info) <fast_tracepoint_jumps>: New field.
3691 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3692 (decode_X_packet, decode_M_packet): Adjust.
3693 (relocate_instruction): Declare.
3694 (in_process_agent_loaded): Declare.
3695 (tracepoint_look_up_symbols): Declare.
3696 (struct fast_tpoint_collect_status): Declare.
3697 (fast_tracepoint_collecting): Declare.
3698 (force_unlock_trace_buffer): Declare.
3699 (handle_tracepoint_bkpts): Declare.
3700 (initialize_low_tracepoint)
3701 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3702 * target.h (struct target_ops) <stabilize_threads,
3703 install_fast_tracepoint_jump_pad>: New fields.
3704 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3705 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3706 [HAVE_STDINT_H]: Include stdint.h.
3707 (trace_debug_1): Rename to ...
3708 (trace_vdebug): ... this.
3709 (trace_debug): Rename to ...
3710 (trace_debug_1): ... this. Add `level' parameter.
3712 (ATTR_USED, ATTR_NOINLINE): New.
3713 (IP_AGENT_EXPORT): New.
3714 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3715 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3716 (about_to_request_buffer_space, trace_buffer_is_full)
3717 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3718 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3719 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3720 (traceframe_write_count, traceframes_created)
3721 (trace_state_variables)
3722 New renaming defines.
3723 (struct ipa_sym_addresses): New.
3724 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3726 (ipa_sym_addrs): New.
3727 (all_tracepoint_symbols_looked_up): New.
3728 (in_process_agent_loaded): New.
3729 (write_e_ipa_not_loaded): New.
3730 (maybe_write_ipa_not_loaded): New.
3731 (tracepoint_look_up_symbols): New.
3732 (debug_threads) [IN_PROCESS_AGENT]: New.
3733 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3734 (UNKNOWN_SIDE_EFFECTS): New.
3735 (stop_tracing): New.
3736 (flush_trace_buffer): New.
3737 (stop_tracing_bkpt): New.
3738 (flush_trace_buffer_bkpt): New.
3739 (read_inferior_integer): New.
3740 (read_inferior_uinteger): New.
3741 (read_inferior_data_pointer): New.
3742 (write_inferior_data_pointer): New.
3743 (write_inferior_integer): New.
3744 (write_inferior_uinteger): New.
3745 (struct collect_static_trace_data_action): Delete.
3746 (enum tracepoint_type): New.
3747 (struct tracepoint) <type>: New field `type'.
3748 <actions_str, step_actions, step_actions_str>: Only include in
3750 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3751 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3752 (tracepoints): Use IP_AGENT_EXPORT.
3753 (last_tracepoint): Don't include in the IPA.
3754 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3755 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3756 (alloced_trace_state_variables): New.
3757 (trace_state_variables): Use IP_AGENT_EXPORT.
3758 (traceframe_t): Delete unused variable.
3759 (circular_trace_buffer): Don't include in the IPA.
3760 (trace_buffer_start): Delete.
3761 (struct trace_buffer_control): New.
3762 (trace_buffer_free): Delete.
3763 (struct ipa_trace_buffer_control): New.
3764 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3765 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3767 (trace_buffer_ctrl): New.
3768 (TRACE_BUFFER_CTRL_CURR): New.
3769 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3770 Reimplement as macros.
3771 (trace_buffer_wrap): Delete.
3772 (traceframe_write_count, traceframe_read_count)
3773 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3774 (struct tracepoint_hit_ctx) <type>: New field.
3775 (struct fast_tracepoint_ctx): New.
3776 (memory_barrier): New.
3778 (record_tracepoint_error): Update atomically in the IPA.
3779 (clear_inferior_trace_buffer): New.
3780 (about_to_request_buffer_space): New.
3781 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3782 updating the same buffer.
3783 (add_tracepoint): Default the tracepoint's type to trap
3784 tracepoint, and orig_size to -1.
3785 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3787 (create_trace_state_variable): New parameter `gdb'. Handle it.
3788 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3789 (cmd_qtdp): Handle fast tracepoints.
3791 (max_jump_pad_size): New.
3792 (gdb_jump_pad_head): New.
3793 (get_jump_space_head): New.
3794 (claim_jump_space): New.
3795 (sort_tracepoints): New.
3796 (MAX_JUMP_SIZE): New.
3797 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3799 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3800 support. Upload fast traceframes, and delete internal IPA
3802 (stop_tracing_handler): New.
3803 (flush_trace_buffer_handler): New.
3804 (cmd_qtstop): Upload fast tracepoints.
3805 (response_tracepoint): Handle fast tracepoints.
3806 (tracepoint_finished_step): Upload fast traceframes. Set the
3807 tracepoint hit context's tracepoint type.
3808 (handle_tracepoint_bkpts): New.
3809 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3810 type. Add comment about fast tracepoints.
3811 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3812 non-existing action_str field.
3813 (get_context_regcache): Handle fast tracepoints.
3814 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3816 (fast_tracepoint_from_jump_pad_address): New.
3817 (fast_tracepoint_from_ipa_tpoint_address): New.
3818 (collecting_t): New.
3819 (force_unlock_trace_buffer): New.
3820 (fast_tracepoint_collecting): New.
3823 (write_inferior_data_ptr): New.
3824 (target_tp_heap): New.
3825 (target_malloc): New.
3826 (download_agent_expr): New.
3828 (download_tracepoints): New.
3829 (download_trace_state_variables): New.
3830 (upload_fast_traceframes): New.
3831 (IPA_FIRST_TRACEFRAME): New.
3832 (IPA_NEXT_TRACEFRAME_1): New.
3833 (IPA_NEXT_TRACEFRAME): New.
3834 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3835 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3836 (gdb_jump_pad_buffer_end): New.
3837 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3838 (initialize_tracepoint): Adjust.
3839 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3840 buffer. Initialize the low module.
3841 * utils.c (PREFIX, TOOLNAME): New.
3842 (malloc_failure): Use PREFIX.
3843 (error): In the IPA, an error causes an exit.
3844 (fatal, warning): Use PREFIX.
3845 (internal_error): Use TOOLNAME.
3846 (NUMCELLS): Increase to 10.
3847 * configure, config.in: Regenerate.
3849 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3851 * server.c (handle_query) <qSupported>: Do two passes over the
3852 qSupported string to avoid nesting strtok.
3854 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3856 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3858 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3860 * configure: Regenerate.
3861 * proc-service.list: New.
3863 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3865 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3868 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3870 * gdbreplay.c (remote_open): Check error return from socket() call by
3871 its equality to -1 not by it being negative.
3872 * remote-utils.c (remote_open): Likewise.
3874 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3876 * config.h: Regenerate.
3878 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3880 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3881 doesn't provide PTRACE_GET_THREAD_AREA.
3883 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3885 * linux-m68k-low.c: Include <asm/ptrace.h>
3886 (ps_get_thread_area): Implement.
3888 2010-05-03 Doug Evans <dje@google.com>
3890 * event-loop.c (struct callback_event): New struct.
3891 (callback_list): New global.
3892 (append_callback_event, delete_callback_event): New functions.
3893 (process_callback): New function.
3894 (start_event_loop): Call it.
3895 * remote-utils.c (NOT_SCHEDULED): Define.
3896 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3897 moved out of readchar.
3898 (readchar): Rewrite. Call reschedule before returning.
3899 (reset_readchar): New function.
3900 (remote_close): Call it.
3901 (process_remaining, reschedule): New functions.
3902 * server.h (callback_handler_func): New typedef.
3903 (append_callback_event, delete_callback_event): Declare.
3905 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3907 * proc-service.c (ps_pglobal_lookup): Use
3908 thread_db_look_up_one_symbol.
3909 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3910 parameter. Use it instead of all_symbols_looked_up.
3911 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3913 (all_symbols_looked_up): Don't declare.
3914 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3915 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3917 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3918 Set all_symbols_looked_up here.
3919 (thread_db_look_up_one_symbol): New.
3920 (thread_db_get_tls_address): Adjust.
3921 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3922 thread_db object on the heap, and tentatively set it in the
3924 (thread_db_init): Don't set all_symbols_looked_up here.
3925 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3927 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3929 * linux-low.c (linux_kill, linux_detach): Adjust.
3930 (status_pending_p_callback): Remove redundant statement. Check
3931 for !TARGET_WAITIKIND_IGNORE, instead of
3932 TARGET_WAITKIND_STOPPED.
3933 (handle_tracepoints): Make sure LWP is locked. Adjust.
3934 (linux_wait_for_event_1): Adjust.
3935 (linux_cancel_breakpoints): New.
3936 (unsuspend_one_lwp): New.
3937 (unsuspend_all_lwps): New.
3938 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3939 (send_sigstop_callback): Change return type to int, add new
3940 `except' parameter and handle it.
3941 (suspend_and_send_sigstop_callback): New.
3942 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3943 pass them down. If SUSPEND, also increment the lwp's suspend
3945 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3946 (need_step_over_p): Don't consider suspended LWPs.
3947 (start_step_over): Adjust.
3948 (proceed_one_lwp): Change return type to int, add new `except'
3949 parameter and handle it.
3950 (unsuspend_and_proceed_one_lwp): New.
3951 (proceed_all_lwps): Use find_inferior instead of
3953 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3954 also decrement the suspend count of LWPs. Pass `except' down,
3955 instead of hacking its suspend count.
3956 (linux_pause_all): Add `freeze' parameter. Adjust.
3957 (linux_unpause_all): New.
3958 (linux_target_ops): Install linux_unpause_all.
3959 * server.c (handle_status): Adjust.
3960 * target.h (struct target_ops): New fields `unpause_all' and
3961 `cancel_breakpoints'. Add new parameter to `pause_all'.
3962 (pause_all): Add new `freeze' parameter.
3964 (cancel_breakpoints): New.
3965 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3967 (cmd_qtstart): Pause threads.
3968 (stop_tracing): Pause threads, and cancel breakpoints.
3969 * win32-low.c (win32_target_ops): Adjust.
3971 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3973 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3974 the inferior right away from here...
3975 (linux_wait_1): ... to here, and adjust to check the thread's
3976 last_resume_kind instead of the lwp's step or stop_expected flags.
3978 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3980 * README: Use consistent `GDB' and `GDBserver' spellings.
3982 2010-05-02 Pedro Alves <pedro@codesourcery.com>
3984 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3985 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3986 (linux_detach_one_lwp): Assume the lwp is stopped.
3987 (any_thread_of): Delete.
3988 (linux_detach): Stop all lwps here. Don't blindly delete all
3990 (delete_lwp_callback): New.
3991 (linux_mourn): Delete all lwps of the process that is gone.
3992 (linux_wait_1): Don't delete the last lwp of the process here.
3993 * mem-break.h (mark_breakpoints_out): Declare.
3994 * mem-break.c (mark_breakpoints_out): New.
3995 (free_all_breakpoints): Use it.
3996 * server.c (handle_target_event): If the process is gone, mark
3998 * thread-db.c (struct thread_db) <create_bp>: New field.
3999 (thread_db_enable_reporting): Fix prototype. Store a thread event
4000 breakpoint reference in the thread_db struct.
4001 (thread_db_load_search): Clear the thread_db object.
4002 (try_thread_db_load_1): Ditto.
4003 (switch_to_process): New.
4004 (disable_thread_event_reporting): Use it.
4005 (remove_thread_event_breakpoints): New.
4006 (thread_db_detach, thread_db_mourn): Use it.
4008 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4010 * linux-low.c (linux_enable_event_reporting): New.
4011 (linux_wait_for_event_1, handle_extended_wait): Use it.
4013 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4015 * linux-low.c (linux_kill_one_lwp, linux_kill)
4016 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4017 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4018 SIGSTOP even if the LWP is stopped.
4019 (send_sigstop_callback): New.
4020 (stop_all_lwps): Use send_sigstop_callback instead.
4021 (linux_resume_one_thread): Adjust.
4022 (proceed_one_lwp): Still proceed an LWP that the client has
4023 requested to stop, if we haven't reported it as stopped yet. Make
4024 sure that LWPs the client want stopped, have a pending SIGSTOP.
4026 2010-04-26 Doug Evans <dje@google.com>
4028 * server.c (handle_general_set): Make static.
4030 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4031 Print received char after testing for error/eof instead of before.
4032 (input_interrupt): Tweak comment.
4034 2010-04-23 Doug Evans <dje@google.com>
4036 * server.c (start_inferior): Print inferior argv if --debug.
4038 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4040 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4041 * nto-x86-low.c: Include server.h
4043 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4045 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4046 be consistent with other sources of this directory.
4047 (init_registers_amd64): Correct name of source file of this function
4050 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4052 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4055 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4057 * win32-i386-low.c: Add 64-bit support.
4058 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4059 (init_registers_amd64): Declare.
4060 (mappings): Add 64-bit version of array.
4061 (init_windows_x86): New function.
4062 (the_low_target): Change init_arch field to init_windows_x86.
4064 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4066 * win32-low.c: Adapt to support also 64-bit architecture.
4067 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4068 (get_image_name): Use SIZE_T type for local variable `done'.
4069 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4070 (toolhelp_get_dll_name): Idem.
4071 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4072 Use uintptr_t typecast to avoid warning.
4073 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4074 (handle_exception): Use phex_nz to avoid warning.
4075 (win32_wait): Remove unused local variable `process'.
4077 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4079 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4082 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4084 * configure.ac: Use `ws2_32' library for srv_mingw.
4085 * configure: Regenerate.
4086 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4087 * remote-utils.c: Likewise.
4089 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4091 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4092 if __x86_64__ is defined.
4094 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4096 * configure: Regenerate.
4098 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4100 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4101 * target.h (target_ops): New get_tib_address field.
4102 * win32-low.h (win32_thread_info): Add thread_local_base field.
4103 * win32-low.c (child_add_thread): Add tlb argument.
4104 Set thread_local_base field to TLB.
4105 (get_child_debug_event): Adapt to child_add_thread change.
4106 (win32_get_tib_address): New function.
4107 (win32_target_ops): Set get_tib_address field to
4108 win32_get_tib_address.
4109 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4111 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4113 * linux-low.c (linux_mourn): Also remove the process.
4114 * server.c (handle_target_event): Don't remove the process here.
4115 * nto-low.c (nto_mourn): New.
4116 (nto_target_ops): Install it.
4117 * spu-low.c (spu_mourn): New.
4118 (spu_target_ops): Install it.
4119 * win32-low.c (win32_mourn): New.
4120 (win32_target_ops): Install it.
4122 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4124 * server.h (buffer_xml_printf): Remove redundant `;'.
4126 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4128 * regcache.c (set_register_cache): Invalidate regcaches before
4129 changing the register cache layout.
4130 (regcache_invalidate_one): Allow a NULL regcache.
4131 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4132 regcaches before changing the register cache layout or the target
4135 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4137 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4138 variable warning on Linux/x86-64.
4140 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4142 GDBserver disconnected tracing support.
4144 * linux-low.c (linux_remove_process): Delete.
4145 (add_lwp): Don't set last_resume_kind here.
4146 (linux_kill): Use `mourn'.
4147 (linux_detach): Use `thread_db_detach', and `mourn'.
4149 (linux_attach_lwp_1): Adjust comment.
4150 (linux_attach): last_resume_kind moved the thread_info; adjust.
4151 (status_pending_p_callback): Adjust.
4152 (linux_wait_for_event_1): Adjust.
4153 (count_events_callback, select_singlestep_lwp_callback)
4154 (select_event_lwp_callback, cancel_breakpoints_callback)
4155 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4156 (proceed_one_lwp): Adjust.
4157 (linux_async): Add debug output.
4158 (linux_thread_stopped): New.
4159 (linux_pause_all): New.
4160 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4162 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4163 (thread_db_free): Delete declaration.
4164 (thread_db_detach, thread_db_mourn): Declare.
4165 * thread-db.c (thread_db_init): Use thread_db_mourn.
4166 (thread_db_free): Delete, split in two.
4167 (disable_thread_event_reporting): New.
4168 (thread_db_detach): New.
4169 (thread_db_mourn): New.
4171 * server.h (struct thread_info) <last_resume_kind>: New field.
4172 <attached>: Add comment.
4173 <gdb_detached>: New field.
4174 (handler_func): Change return type to int.
4175 (handle_serial_event, handle_target_event): Ditto.
4176 (gdb_connected): Declare.
4178 (disconnected_tracing): Declare.
4179 (stop_tracing): Declare.
4181 * server.c (handle_query) <qSupported>: Report support for
4182 disconnected tracing.
4183 (queue_stop_reply_callback): Account for running threads.
4184 (gdb_wants_thread_stopped): New.
4185 (gdb_wants_all_threads_stopped): New.
4186 (gdb_reattached_process): New.
4187 (handle_status): Clear the `gdb_detached' flag of all processes.
4188 In all-stop, stop all threads.
4189 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4190 (process_serial_event): If the remote connection breaks, or if an
4191 exit was forced with "monitor exit", force an event loop exit.
4192 Handle disconnected tracing on detach.
4193 (handle_serial_event): Adjust.
4194 (handle_target_event): If GDB isn't connected, forward events back
4195 to the inferior, unless the last process exited, in which case,
4196 exit gdbserver. Adjust interface.
4198 * remote-utils.c (remote_open): Don't block in accept. Instead
4199 register an event loop source on the listen socket file
4200 descriptor. Refactor bits into ...
4201 (listen_desc): ... this new global.
4202 (gdb_connected): ... this new function.
4203 (enable_async_notification): ... this new function.
4204 (handle_accept_event): ... this new function.
4205 (remote_close): Clear remote_desc.
4207 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4209 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4211 (mourn_inferior): Define.
4212 (target_process_qsupported): Avoid the dangling else problem.
4213 (thread_stopped): Define.
4214 (pause_all): Define.
4215 (target_waitstatus_to_string): Declare.
4216 * target.c (target_waitstatus_to_string): New.
4218 * tracepoint.c (tracing): Make extern.
4219 (disconnected_tracing): New.
4220 (stop_tracing): Make extern. Handle tracing stops due to GDB
4222 (cmd_qtdisconnected): New.
4223 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4224 (handle_tracepoint_general_set): Handle QTDisconnected.
4226 * event-loop.c (event_handler_func): Change return type to int.
4227 (process_event): Bail out if the event handler wants the event
4229 (handle_file_event): Ditto.
4230 (start_event_loop): Bail out if the event handler wants the event
4233 * nto-low.c (nto_target_ops): Adjust.
4234 * spu-low.c (spu_wait): Don't remove the process here.
4235 (spu_target_ops): Adjust.
4236 * win32-low.c (win32_wait): Don't remove the process here.
4237 (win32_target_ops): Adjust.
4239 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4241 * regcache.c (realloc_register_cache): Invalidate inferior's
4242 regcache before recreating it.
4244 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4246 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4248 2010-04-09 Stan Shebs <stan@codesourcery.com>
4249 Pedro Alves <pedro@codesourcery.com>
4251 * server.h (LONGEST): New.
4252 (struct thread_info) <while_stepping>: New field.
4253 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4255 (initialize_tracepoint, handle_tracepoint_general_set)
4256 (handle_tracepoint_query, tracepoint_finished_step)
4257 (tracepoint_was_hit, release_while_stepping_state_list):
4258 (current_traceframe): Declare.
4259 * server.c (handle_general_set): Handle tracepoint packets.
4261 (write_memory): New.
4262 (handle_search_memory_1): Use read_memory.
4263 (handle_query): Report support for conditional tracepoints, trace
4264 state variables, and tracepoint sources. Handle tracepoint
4266 (main): Initialize the tracepoints module.
4267 (process_serial_event): Handle traceframe reads/writes.
4269 * linux-low.c (handle_tracepoints): New.
4270 (linux_wait_1): Call it.
4271 (linux_resume_one_lwp): Handle while-stepping.
4272 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4273 (linux_target_ops): Install them.
4274 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4276 * linux-x86-low.c (x86_supports_tracepoints): New.
4277 (the_low_target). Install it.
4279 * mem-break.h (delete_breakpoint): Declare.
4280 * mem-break.c (delete_breakpoint): Make external.
4282 * target.h (struct target_ops): Add `supports_tracepoints',
4283 `read_pc', and `write_pc' fields.
4284 (target_supports_tracepoints): Define.
4285 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4288 * regcache.h (struct regcache) <registers_owned>: New field.
4289 (init_register_cache, regcache_cpy): Declare.
4290 (regcache_read_pc, regcache_write_pc): Declare.
4291 (register_cache_size): Declare.
4292 (supply_regblock): Declare.
4293 * regcache.c (init_register_cache): New.
4294 (new_register_cache): Use it.
4295 (regcache_cpy): New.
4296 (register_cache_size): New.
4297 (supply_regblock): New.
4298 (regcache_read_pc, regcache_write_pc): New.
4300 * tracepoint.c: New.
4302 * Makefile.in (OBS): Add tracepoint.o.
4303 (tracepoint.o): New rule.
4305 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4307 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4309 (i386-mmx.c): Likewise.
4310 (i386-mmx-linux.o): Likewise.
4311 (i386-mmx-linux.c): Likewise.
4313 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4314 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4315 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4316 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4318 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4319 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4320 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4322 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4324 * Makefile.in (clean): Updated.
4326 (i386-avx.c): Likewise.
4327 (i386-avx-linux.o): Likewise.
4328 (i386-avx-linux.c): Likewise.
4329 (amd64-avx.o): Likewise.
4330 (amd64-avx.c): Likewise.
4331 (amd64-avx-linux.o): Likewise.
4332 (amd64-avx-linux.c): Likewise.
4334 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4335 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4336 (srv_amd64_regobj): Add amd64-avx.o.
4337 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4338 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4339 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4340 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4341 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4342 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4343 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4345 * i387-fp.c: Include "i386-xstate.h".
4347 (i387_cache_to_xsave): Likewise.
4348 (i387_xsave_to_cache): Likewise.
4349 (x86_xcr0): Likewise.
4351 * i387-fp.h (i387_cache_to_xsave): Likewise.
4352 (i387_xsave_to_cache): Likewise.
4353 (x86_xcr0): Likewise.
4355 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4356 * linux-crisv32-low.c (target_regsets): Likewise.
4357 * linux-m68k-low.c (target_regsets): Likewise.
4358 * linux-mips-low.c (target_regsets): Likewise.
4359 * linux-ppc-low.c (target_regsets): Likewise.
4360 * linux-s390-low.c (target_regsets): Likewise.
4361 * linux-sh-low.c (target_regsets): Likewise.
4362 * linux-sparc-low.c (target_regsets): Likewise.
4363 * linux-xtensa-low.c (target_regsets): Likewise.
4365 * linux-low.c: Include <sys/uio.h>.
4366 (regsets_fetch_inferior_registers): Support nt_type.
4367 (regsets_store_inferior_registers): Likewise.
4368 (linux_process_qsupported): New.
4369 (linux_target_ops): Add linux_process_qsupported.
4371 * linux-low.h (regset_info): Add nt_type.
4372 (linux_target_ops): Add process_qsupported.
4374 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4376 (init_registers_i386_avx_linux): New.
4377 (init_registers_amd64_avx_linux): Likewise.
4378 (xmltarget_i386_linux_no_xml): Likewise.
4379 (xmltarget_amd64_linux_no_xml): Likewise.
4380 (PTRACE_GETREGSET): Likewise.
4381 (PTRACE_SETREGSET): Likewise.
4382 (x86_fill_xstateregset): Likewise.
4383 (x86_store_xstateregset): Likewise.
4384 (use_xml): Likewise.
4385 (x86_linux_update_xmltarget): Likewise.
4386 (x86_linux_process_qsupported): Likewise.
4387 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4388 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4389 init_registers_i386_linux here. Call
4390 x86_linux_update_xmltarget.
4391 (the_low_target): Add x86_linux_process_qsupported.
4393 * server.c (handle_query): Call target_process_qsupported.
4395 * target.h (target_ops): Add process_qsupported.
4396 (target_process_qsupported): New.
4398 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4400 * inferiors.c (add_thread): Set last_status kind to
4401 TARGET_WAITKIND_IGNORE.
4402 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4403 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4404 (linux_wait_1): Move `thread' local definition to block that uses
4405 it. Don't NULL initialize `event_child'.
4406 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4407 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4408 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4410 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4412 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4413 an extended waitstatus, or by a watchpoint.
4414 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4415 thread was stepping or has been stopped by a watchpoint.
4417 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4419 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4420 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4421 of another, then delete the previous, and validate all
4423 (validate_inserted_breakpoint): New.
4424 (delete_disabled_breakpoints): New.
4425 (validate_breakpoints): New.
4426 (check_mem_read): Validate breakpoints before trusting their
4427 shadow. Delete disabled breakpoints.
4428 (check_mem_write): Validate breakpoints before trusting they
4429 should be inserted. Delete disabled breakpoints.
4430 * mem-break.h (validate_breakpoints):
4431 * server.c (handle_query): Validate breakpoints when we see a
4434 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4436 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4437 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4438 if we could tell there's a GDB breakpoint at stop_pc.
4439 (need_step_over_p): Don't do a step over if we find a GDB
4440 breakpoint at the resume PC.
4442 * mem-break.c (struct raw_breakpoint): New.
4443 (enum bkpt_type): New type `gdb_breakpoint'.
4444 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4445 fields. New field `raw'.
4446 (find_raw_breakpoint_at): New.
4447 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4449 (set_breakpoint_at): Adjust.
4450 (delete_raw_breakpoint): New.
4451 (release_breakpoint): New.
4452 (delete_breakpoint): Rename to...
4453 (delete_breakpoint_1): ... this. Add proc parameter. Use
4454 release_breakpoint. Return ENOENT.
4455 (delete_breakpoint): Reimplement.
4456 (find_breakpoint_at): Delete.
4457 (find_gdb_breakpoint_at): New.
4458 (delete_breakpoint_at): Delete.
4459 (set_gdb_breakpoint_at): New.
4460 (delete_gdb_breakpoint_at): New.
4461 (gdb_breakpoint_here): New.
4462 (set_reinsert_breakpoint): Use release_breakpoint.
4463 (uninsert_breakpoint): Rename to ...
4464 (uninsert_raw_breakpoint): ... this.
4465 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4466 (reinsert_raw_breakpoint): Change parameter type to
4468 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4470 (check_breakpoints): Adjust. Use release_breakpoint.
4471 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4472 (breakpoint_inserted_here): Ditto.
4473 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4474 Don't trust the breakpoint's shadow if it is not inserted.
4475 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4476 (delete_all_breakpoints): Adjust.
4477 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4478 use delete_breakpoint_1.
4480 * mem-break.h (breakpoints_supported): Delete declaration.
4481 (set_gdb_breakpoint_at): Declare.
4482 (gdb_breakpoint_here): Declare.
4483 (delete_breakpoint_at): Delete.
4484 (delete_gdb_breakpoint_at): Declare.
4486 * server.h (struct raw_breakpoint): Forward declare.
4487 (struct process_info): New field `raw_breakpoints'.
4489 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4492 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4494 * linux-low.c (status_pending_p_callback): Fix comment.
4495 (linux_wait_for_event_1): Move most of the internal breakpoint
4496 handling from here...
4497 (linux_wait_1): ... to here.
4498 (count_events_callback): New.
4499 (select_singlestep_lwp_callback): New.
4500 (select_event_lwp_callback): New.
4501 (cancel_breakpoints_callback): New.
4502 (select_event_lwp): New.
4503 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4504 priority to all LWPs that have had events that should be reported
4505 to the client. Cancel breakpoints when about to reporting the
4506 event to the client, not while stopping lwps. No longer cancel
4507 finished single-steps here.
4508 (cancel_finished_single_step): Delete.
4509 (cancel_finished_single_steps): Delete.
4511 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4513 * mem-break.c (enum bkpt_type): New.
4514 (struct breakpoint): New field `type'.
4515 (set_breakpoint_at): Change return type to struct breakpoint
4516 pointer. Set type to `other_breakpoint' by default.
4517 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4518 in the breakpoint list.
4519 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4520 (reinsert_breakpoint): Rename to ...
4521 (reinsert_raw_breakpoint): ... this.
4522 (reinsert_breakpoints_at): Adjust.
4523 * mem-break.h (struct breakpoint): Declare.
4524 (set_breakpoint_at): Change return type to struct breakpoint
4527 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4529 * server.c (handle_query): Assign, not compare.
4531 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4533 Teach linux gdbserver to step-over-breakpoints.
4535 * linux-low.c (can_hardware_single_step): New.
4536 (supports_breakpoints): New.
4537 (handle_extended_wait): If stopping threads, read the stop pc of
4540 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4541 low target doesn't support retrieving the PC.
4542 (add_lwp): Set last_resume_kind to resume_continue.
4543 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4544 (linux_attach): Don't clear stop_expected. Set the lwp's
4545 last_resume_kind to resume_stop.
4546 (linux_detach_one_lwp): Don't check for removed breakpoints.
4547 (check_removed_breakpoint): Delete.
4548 (status_pending_p): Rename to ...
4549 (status_pending_p_callback): ... this. Don't check for removed
4550 breakpoints. Don't consider threads that are stopped from GDB's
4552 (linux_wait_for_lwp): Always read the stop_pc here.
4553 (cancel_breakpoint): New.
4554 (step_over_bkpt): New global.
4555 (linux_wait_for_event_1): Implement stepping over breakpoints.
4556 (gdb_wants_lwp_stopped): New.
4557 (gdb_wants_all_stopped): New.
4558 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4559 single-step traps here. Store the thread's last reported target
4561 (send_sigstop): Don't clear stop_expected. Always set it,
4563 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4564 (cancel_finished_single_step): New.
4565 (cancel_finished_single_steps): New.
4566 (wait_for_sigstop): Don't cancel finished single-step traps here.
4567 (linux_resume_one_lwp): Don't check for removed breakpoints.
4568 Don't set `step' on non-hardware step archs.
4569 (linux_set_resume_request): Ignore resume_stop requests if already
4570 stopping or stopped. Set the lwp's last_resume_kind.
4571 (resume_status_pending_p): Don't check for removed breakpoints.
4572 (need_step_over_p): New.
4573 (start_step_over): New.
4574 (finish_step_over): New.
4575 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4576 requests. Clear the thread's last reported target waitstatus.
4577 Don't use the `suspended' flag. Don't consider pending breakpoints.
4578 (linux_resume): Start a step-over if necessary.
4579 (proceed_one_lwp): New.
4580 (proceed_all_lwps): New.
4581 (unstop_all_lwps): New.
4582 * linux-low.h (struct lwp_info): Rewrite comment for the
4583 `suspended' flag. Add the `stop_pc' field. Delete the
4584 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4585 Add `'last_resume_kind' and `need_step_over' fields.
4586 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4587 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4588 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4589 (set_raw_breakpoint_at): New.
4590 (set_breakpoint_at): Rewrite to use it.
4591 (reinsert_breakpoint_handler): Delete.
4592 (set_reinsert_breakpoint): New.
4593 (reinsert_breakpoint_by_bp): Delete.
4594 (delete_reinsert_breakpoints): New.
4595 (uninsert_breakpoint): Rewrite.
4596 (uninsert_breakpoints_at): New.
4597 (reinsert_breakpoint): Rewrite.
4598 (reinsert_breakpoints_at): New.
4599 (check_breakpoints): Rewrite.
4600 (breakpoint_here): New.
4601 (breakpoint_inserted_here): New.
4602 (check_mem_read): Adjust.
4603 * mem-break.h (breakpoints_supported, breakpoint_here)
4604 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4605 (reinsert_breakpoint_by_bp): Delete declaration.
4606 (delete_reinsert_breakpoints): Declare.
4607 (reinsert_breakpoint): Delete declaration.
4608 (reinsert_breakpoints_at): Declare.
4609 (uninsert_breakpoint): Delete declaration.
4610 (uninsert_breakpoints_at): Declare.
4611 (check_breakpoints): Adjust prototype.
4612 * server.h: Adjust include order.
4613 (struct thread_info): Declare here. Add a `last_status' field.
4615 2010-03-23 Michael Snyder <msnyder@vmware.com>
4617 * server.c (crc32): New function.
4618 (handle_query): Add handling for 'qCRC:' request.
4620 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4622 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4623 lwp had been stopped by a watchpoint.
4625 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4627 * server.h (internal_error): Declare.
4628 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4629 * utils.c (internal_error): New function.
4631 2010-03-15 Andreas Schwab <schwab@redhat.com>
4633 * configure.srv: Fix typo setting srv_regobj.
4635 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4637 * linux-low.c (fetch_register): Avoid passing a non string literal
4639 (usr_store_inferior_registers): Ditto.
4641 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4643 * linux-low.c (linux_write_memory): Bail out early if peeking
4646 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4648 * linux-low.h (struct lwp_info): New fields
4649 `stopped_by_watchpoint' and `stopped_data_address'.
4650 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4651 here, and cache them in the lwp object.
4652 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4654 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4656 (linux_stopped_by_watchpoint): Rewrite.
4657 (linux_stopped_data_address): Rewrite.
4659 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4661 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4662 switching the current inferior, not before.
4664 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4666 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4667 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4668 i386-linux.c and amd64-linux.c.
4669 (reg-i386.o): Removed.
4670 (reg-i386.c): Likewise.
4671 (reg-i386-linux.o): Likewise.
4672 (reg-i386-linux.c): Likewise.
4673 (reg-x86-64.o): Likewise.
4674 (reg-x86-64.c): Likewise.
4675 (reg-x86-64-linux.o): Likewise.
4676 (reg-x86-64-linux.c): Likewise.
4679 (i386-linux.o): Likewise.
4680 (i386-linux.c): Likewise.
4681 (amd64.o): Likewise.
4682 (amd64.c): Likewise.
4683 (amd64-linux.o): Likewise.
4684 (amd64-linux.c): Likewise.
4686 * configure.srv (srv_i386_regobj): New.
4687 (srv_i386_linux_regobj): Likewise.
4688 (srv_amd64_regobj): Likewise.
4689 (srv_amd64_linux_regobj): Likewise.
4690 (srv_i386_32bit_xmlfiles): Likewise.
4691 (srv_i386_64bit_xmlfiles): Likewise.
4692 (srv_i386_xmlfiles): Likewise.
4693 (srv_amd64_xmlfiles): Likewise.
4694 (srv_i386_linux_xmlfiles): Likewise.
4695 (srv_amd64_linux_xmlfiles): Likewise.
4696 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4697 srv_xmlfiles to $srv_i386_xmlfiles.
4698 (i[34567]86-*-mingw32ce*): Likewise.
4699 (i[34567]86-*-mingw*): Likewise.
4700 (i[34567]86-*-nto*): Likewise.
4701 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4702 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4703 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4704 (x86_64-*-linux*): Likewise.
4706 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4707 (init_registers_amd64_linux): New.
4708 (x86_arch_setup): Replace init_registers_x86_64_linux with
4709 init_registers_amd64_linux.
4711 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4713 * configure.ac: Check for libdl. If it is not available link against
4714 static libthread_db.
4715 * configure: Regenerate.
4717 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4721 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4722 handing a read watchpoint.
4723 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4725 2010-02-12 Doug Evans <dje@google.com>
4727 * linux-low.c (linux_supports_tracefork_flag): Document.
4728 (linux_look_up_symbols): Add comment.
4730 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4732 * regcache.c (supply_register): Clear regcache if buf is NULL.
4734 2010-02-02 Nicolas Roche <roche@sourceware.org>
4735 Joel Brobecker <brobecker@adacore.com>
4737 * inferiors.c (find_inferior): Add function documentation.
4738 (unloaded_dll): Handle the case where the unloaded dll has not
4739 been previously registered in the dll list.
4741 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4743 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4744 (thumb2_breakpoint): New.
4745 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4747 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4749 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4750 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4753 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4755 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4757 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4759 * linux-s390-low.c (s390_collect_ptrace_register)
4760 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4762 2010-01-21 Doug Evans <dje@google.com>
4764 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4765 (PTRACE_ARG4_TYPE): New macro.
4766 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4767 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4768 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4769 (usr_store_inferior_registers): Ditto.
4770 (linux_read_memory, linux_write_memory): Ditto.
4771 (linux_test_for_tracefork): Ditto.
4773 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4774 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4776 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4778 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4781 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4783 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4784 prototype to take a regcache. Adjust.
4786 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4788 * regcache.h (struct thread_info): Forward declare.
4789 (struct regcache): New.
4790 (new_register_cache): Adjust prototype.
4791 (get_thread_regcache): Declare.
4792 (free_register_cache): Adjust prototype.
4793 (registers_to_string, registers_from_string): Ditto.
4794 (supply_register, supply_register_by_name, collect_register)
4795 (collect_register_as_string, collect_register_by_name): Ditto.
4796 * regcache.c (struct inferior_regcache_data): Delete.
4797 (get_regcache): Rename to ...
4798 (get_thread_regcache): ... this. Adjust. Switch inferior before
4800 (regcache_invalidate_one): Adjust.
4801 (regcache_invalidate): Fix prototype.
4802 (new_register_cache): Return the new register cache.
4803 (free_register_cache): Change prototype.
4804 (realloc_register_cache): Adjust.
4805 (registers_to_string): Change prototype to take a regcache. Adjust.
4806 (registers_from_string): Ditto.
4807 (register_data): Ditto.
4808 (supply_register): Ditto.
4809 (supply_register_by_name): Ditto.
4810 (collect_register): Ditto.
4811 (collect_register_as_string): Ditto.
4812 (collect_register_by_name): Ditto.
4813 * server.c (process_serial_event): Adjust.
4814 * linux-low.h (regset_fill_func, regset_store_func): Change
4816 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4818 * linux-low.c (get_stop_pc): Adjust.
4819 (check_removed_breakpoint): Adjust.
4820 (linux_wait_for_event): Adjust.
4821 (linux_resume_one_lwp): Adjust.
4822 (fetch_register): Add regcache parameter. Adjust.
4823 (usr_store_inferior_registers): Ditto.
4824 (regsets_fetch_inferior_registers): Ditto.
4825 (regsets_store_inferior_registers): Ditto.
4826 (linux_fetch_registers, linux_store_registers): Ditto.
4827 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4829 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4831 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4832 prototype to take a regcache.
4833 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4834 * remote-utils.c (convert_ascii_to_int, outreg)
4835 (prepare_resume_reply): Change prototype to take a regcache.
4837 * target.h (struct target_ops) <fetch_registers, store_registers>:
4838 Change prototype to take a regcache.
4839 (fetch_inferior_registers, store_inferior_registers): Change
4840 prototype to take a regcache. Adjust.
4841 * proc-service.c (ps_lgetregs): Adjust.
4842 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4843 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4844 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4845 take a regcache. Adjust.
4846 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4847 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4848 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4849 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4850 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4851 (cris_cannot_fetch_register):
4852 (cris_breakpoint_at): Change prototype to take a regcache.
4854 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4855 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4856 to take a regcache. Adjust.
4857 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4859 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4860 take a regcache. Adjust.
4861 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4862 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4863 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4864 * linux-mips-low.c (mips_get_pc):
4865 (mips_set_pc): Change prototype to take a regcache. Adjust.
4866 (mips_reinsert_addr): Adjust.
4867 (mips_collect_register): Change prototype to take a regcache.
4869 (mips_supply_register):
4870 (mips_collect_register_32bit, mips_supply_register_32bit)
4871 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4872 (mips_store_fpregset): Ditto.
4873 * linux-ppc-low.c (ppc_supply_ptrace_register)
4874 (ppc_supply_ptrace_register): Ditto.
4875 (parse_spufs_run): Adjust.
4876 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4877 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4878 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4879 take a regcache. Adjust.
4880 * linux-s390-low.c (s390_collect_ptrace_register)
4881 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4882 (s390_set_pc): Change prototype to take a regcache. Adjust.
4883 (s390_arch_setup): Adjust.
4884 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4885 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4886 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4887 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4888 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4890 (sparc_breakpoint_at): Adjust.
4891 * linux-xtensa-low.c (xtensa_fill_gregset):
4892 (xtensa_store_gregset):
4893 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4894 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4895 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4896 prototype to take a regcache. Adjust.
4897 * win32-arm-low.c (arm_fetch_inferior_register)
4898 (arm_store_inferior_register): Change prototype to take a
4900 * win32-i386-low.c (i386_fetch_inferior_register)
4901 (i386_store_inferior_register): Change prototype to take a
4903 * win32-low.c (child_fetch_inferior_registers)
4904 (child_store_inferior_registers): Change prototype to take a
4906 (win32_wait): Adjust.
4907 (win32_fetch_inferior_registers): Change prototype to take a
4909 (win32_store_inferior_registers): Adjust.
4910 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4911 store_inferior_register>: Change prototype to take a regcache.
4913 2010-01-20 Doug Evans <dje@google.com>
4915 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4917 (linux_wait_for_event1, linux_init_signals): Ditto.
4918 (W_STOPCODE): Provide definition if missing.
4920 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4922 * linux-low.c (linux_core_of_thread): New.
4923 (compare_ints, show_process, list_threads): New.
4924 (linux_qxfer_osdata): Report threads and cores.
4925 (linux_target_op): Register linux_core_of_thread.
4926 * remote-utils.c (prepare_resume_reply): Report the core.
4927 (buffer_xml_printf): Support %d specifier.
4928 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4930 (handle_query): Handle qXfer:threads. Announce availability
4932 * target.h (struct target_ops): New field core_of_thread.
4934 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4936 * Makefile.in (clean): Remove new generated files.
4937 (reg-s390.o, reg-s390.c): Remove rules.
4938 (reg-s390x.o, reg-s390x.c): Likewise.
4939 (s390-linux32.o, s390-linux32.c): Add rules.
4940 (s390-linux64.o, s390-linux64.c): Likewise.
4941 (s390x-linux64.o, s390x-linux64.c): Likewise.
4942 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4943 * linux-s390-low.c: Include <elf.h>.
4944 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4945 (init_registers_s390): Remove prototype.
4946 (init_registers_s390x): Likewise.
4947 (init_registers_s390_linux32): Add prototype.
4948 (init_registers_s390_linux64): Likewise.
4949 (init_registers_s390x_linux64): Likewise.
4950 (s390_num_regs_3264): New define.
4951 (s390_regmap_3264): New global variable.
4952 (s390_cannot_fetch_register): Remove obsolete check.
4953 (s390_cannot_store_register): Likewise.
4954 (s390_collect_ptrace_register): Handle upper/lower register halves.
4955 (s390_supply_ptrace_register): Likewise.
4956 (s390_fill_gregset): Update to register number changes.
4957 (s390_get_hwcap): New routine.
4958 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4959 Install appropriate regmap and register set.
4961 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4963 * server.c (gdbserver_version): Update copyright year to 2010.
4964 * gdbreplay.c (gdbreplay_version): Likewise.
4966 2009-12-28 Doug Evans <dje@google.com>
4968 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4969 elf/external.h. Include <elf.h> instead but only if necessary.
4971 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4973 * linux-low.c (linux_remove_process): Remove `detaching'
4974 parameter. Don't release/detach from thread_db here.
4975 (linux_kill): Release/detach from thread_db here, ...
4976 (linux_detach): ... and here, before actually detaching.
4977 (linux_wait_1): ... and here, when a process exits.
4978 * thread-db.c (any_thread_of): New.
4979 (thread_db_free): Switch the current inferior to a thread of the
4982 2009-12-21 Doug Evans <dje@google.com>
4984 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4986 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4987 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4988 warning ifndef __NR_tkill. Move setting of errno there too.
4989 Delete unnecessary resetting of errno after syscall.
4990 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4992 * configure.ac: Check for dladdr.
4993 * config.in: Regenerate.
4994 * configure: Regenerate.
4995 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4996 (try_thread_db_load): Update.
4998 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5000 2009-12-18 Doug Evans <dje@google.com>
5002 * event-loop.c: Include unistd.h if it exists.
5004 * linux-low.c (my_waitpid): Move definition away from being in
5005 between linux_tracefork_child/linux_test_for_tracefork.
5007 * gdb_proc_service.h (psaddr_t): Fix type.
5008 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5009 signature to match glibc.
5011 2009-12-16 Doug Evans <dje@google.com>
5013 * linux-low.c (linux_read_memory): Fix argument to read.
5015 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5017 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5018 events, don't leave current_inferior pointing at null.
5020 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5022 * win32-low.c (LOG): Delete.
5023 (OUTMSG): Output to stderr.
5024 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5025 on compile time LOG macro.
5026 (win32_wait): Fix debug output.
5028 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5030 * win32-low.c (win32_add_one_solib): If the dll name is
5031 "ntdll.dll", prepend the system directory to the dll path.
5033 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5035 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5037 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5038 Vladimir Prus <vladimir@codesourcery.com>
5040 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5041 * configure.ac: Check for __mcoldfire__ and set
5042 gdb_cv_m68k_is_coldfire.
5043 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5044 reg-cf.o and reg-m68k.o.
5045 * configure: Regenerated.
5047 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5049 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5050 Pass it to thread_db_free.
5051 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5052 proper `detaching' argument to linux_remove_process.
5053 * linux-low.h (thread_db_free): Add `detaching' parameter.
5054 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5056 (thread_db_free): Add `detaching' parameter. Only
5057 call td_ta_clear_event if detaching from process.
5059 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5061 * thread-db.c (thread_db_free): Fix typo.
5063 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5066 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5068 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5070 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5071 with an i686 compiler.
5072 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5074 * configure: Rebuilt.
5076 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5080 * server.c (handle_search_memory_1): Correct read_addr initialization
5081 in loop for searching subsequent chunks.
5083 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5085 * configure.ac: New --with-libthread-db option.
5086 * thread-db.c: Allow direct dependence on libthread_db.
5087 (thread_db_free): Adjust.
5088 * config.in: Regenerate.
5089 * configure: Likewise.
5091 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5094 * thread-db.c (attach_thread): New function.
5095 (maybe_attach_thread): Return success/failure.
5096 (find_new_threads_callback): Adjust.
5097 (thread_db_find_new_threads): Loop until no new threads.
5099 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5101 * proc-service.c (ps_lgetregs): Formatting.
5103 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5105 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5106 * configure.ac: Adjust.
5107 * linux-low.h (struct process_info_private): Move members to struct
5109 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5110 * linux-low.c (linux_remove_process): Adjust.
5111 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5112 * server.c (handle_query): Move code ...
5113 (handle_monitor_command): ... here. New function.
5114 * target.h (struct target_ops): New member.
5115 * thread-db.c (struct thread_db): New.
5116 (libthread_db_search_path): New variable.
5117 (thread_db_create_event, thread_db_enable_reporting)
5118 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5119 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5120 (try_thread_db_load_1, dladdr_to_soname): New functions.
5121 (try_thread_db_load, thread_db_load_search): New functions.
5122 (thread_db_init): Search for libthread_db.
5123 (thread_db_free): New function.
5124 (thread_db_handle_monitor_command): Likewise.
5125 * config.in: Regenerate.
5126 * configure: Regenerate.
5128 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5130 * spu-low.c (spu_kill): Wait for inferior to terminate.
5131 Call clear_inferiors.
5132 (spu_detach): Call clear_inferiors.
5134 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5136 * aclocal.m4: Regenerate.
5137 * config.in: Likewise.
5138 * configure: Likewise.
5140 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5142 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5143 (parse_spufs_run): New function.
5144 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5145 (ppc_breakpoint_at): Handle SPU breakpoints.
5147 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5149 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5150 (SPUFS_MAGIC): Define.
5151 (spu_enumerate_spu_ids): New function.
5152 (linux_qxfer_spu): New function.
5153 (linux_target_ops): Install linux_qxfer_spu.
5155 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5157 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5158 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5159 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5160 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5161 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5162 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5163 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5164 (init_registers_powerpc_cell32l): Add prototype.
5165 (init_registers_powerpc_cell64l): Likewise.
5166 (ppc_arch_setup): Detect Cell/B.E. architecture.
5168 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5170 * Makefile.in (datarootdir): New variable.
5172 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5174 * linux-low.c (linux_write_memory): Update debugging output.
5175 * Makefile.in (clean): Add new descriptions.
5176 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5177 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5178 * configure.srv: Add new files for arm*-*-linux*.
5179 * linux-arm-low.c: Add new declarations.
5180 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5181 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5182 (HWCAP_VFPv3D16): New.
5183 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5184 instead of __IWMMXT__.
5185 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5186 (arm_arch_setup): New.
5187 (target_regsets): Remove #ifdef. Add VFP regset.
5188 (the_low_target): Use arm_arch_setup.
5190 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5192 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5193 the main thread again.
5195 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5197 Adding Neutrino gdbserver.
5198 * configure: Regenerated.
5199 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5200 * configure.srv (i[34567]86-*-nto*): New target.
5201 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5202 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5203 (nto_comctrl) [__QNX__]: New function.
5204 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5206 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5208 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5211 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5212 Pedro Alves <pedro@codesourcery.com>
5214 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5215 don't support CONTEXT_EXTENDED_REGISTERS.
5216 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5217 (the_low_target): Install them.
5218 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5219 failing with ERROR_PIPE_NOT_CONNECTED.
5221 2009-06-30 Doug Evans <dje@google.com>
5222 Pierre Muller <muller@ics.u-strasbg.fr>
5224 Add h/w watchpoint support to x86-linux, win32-i386.
5225 * Makefile.in (SFILES): Add i386-low.c
5226 (i386_low_h): Define.
5227 (i386-low.o): Add dependencies.
5228 (linux-x86-low.o): Add i386-low.h dependency.
5229 (win32-i386-low.o): Ditto.
5230 * i386-low.c: New file.
5231 * i386-low.h: New file.
5232 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5233 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5234 * linux-low.c (linux_add_process): Initialize arch_private.
5235 (linux_remove_process): Free arch_private.
5236 (add_lwp): Initialize arch_private.
5237 (delete_lwp): Free arch_private.
5238 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5240 * linux-low.h (process_info_private): New member arch_private.
5241 (lwp_info): New member arch_private.
5242 (linux_target_ops): New members new_process, new_thread,
5244 (ptid_of): New macro.
5245 * linux-x86-low.c: Include stddef.h, i386-low.h.
5246 (arch_process_info): New struct.
5247 (arch_lwp_info): New struct.
5248 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5249 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5250 (i386_dr_low_get_status): New function.
5251 (x86_insert_point, x86_remove_point): New functions.
5252 (x86_stopped_by_watchpoint): New function.
5253 (x86_stopped_data_address): New function.
5254 (x86_linux_new_process, x86_linux_new_thread): New functions.
5255 (x86_linux_prepare_to_resume): New function.
5256 (the_low_target): Add entries for insert_point, remove_point,
5257 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5259 * server.c (debug_hw_points): New global.
5260 (monitor_show_help): Document set debug-hw-points.
5261 (handle_query): Process "set debug-hw-points".
5262 * server.h (debug_hw_points): Declare.
5263 (paddress): Declare.
5264 * utils.c (NUMCELLS, CELLSIZE): New macros.
5265 (get_sell, xsnprintf, paddress): New functions.
5266 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5267 remove_point, stopped_by_watchpoint, stopped_data_address.
5268 * win32-i386-low.c: Include i386-low.h.
5269 (debug_reg_state): Replaces dr.
5270 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5271 (i386_dr_low_get_status): New function.
5272 (i386_insert_point, i386_remove_point): New functions.
5273 (i386_stopped_by_watchpoint): New function.
5274 (i386_stopped_data_address): New function.
5275 (i386_initial_stuff): Update.
5276 (get_thread_context,set_thread_context,i386_thread_added): Update.
5277 (the_low_target): Add entries for insert_point,
5278 remove_point, stopped_by_watchpoint, stopped_data_address.
5279 * win32-low.c (win32_insert_watchpoint): New function.
5280 (win32_remove_watchpoint): New function.
5281 (win32_stopped_by_watchpoint): New function.
5282 (win32_stopped_data_address): New function.
5283 (win32_target_ops): Add entries for insert_watchpoint,
5284 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5285 * win32-low.h (win32_target_ops): New members insert_point,
5286 remove_point, stopped_by_watchpoint, stopped_data_address.
5288 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5290 * server.c (process_serial_event): Re-return unsupported, not
5291 error, if the type isn't recognized. Re-allow supporting only
5292 insert or remove packets. Also call require_running for
5293 breakpoints. Add missing break statement to default case. Tidy.
5294 * target.h (struct target_ops): Rename insert_watchpoint to
5295 insert_point, and remove_watchpoint to remove_point.
5297 * linux-low.h (struct linux_target_ops): Likewise.
5298 * linux-low.c (linux_insert_watchpoint): Rename to ...
5299 (linux_insert_point): ... this. Adjust.
5300 (linux_remove_watchpoint): Rename to ...
5301 (linux_remove_point): ... this. Adjust.
5302 (linux_target_ops): Adjust.
5303 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5304 (cris_insert_point): ... this.
5305 (cris_remove_watchpoint): Rename to ...
5306 (cris_remove_point): ... this.
5307 (the_low_target): Adjust.
5309 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5311 * server.c (handle_v_kill): Pass signal_pid to
5312 kill_inferior if multi_process is zero.
5314 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5316 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5317 * target.h (target_ops): Comment for *_watchpoint to make it clear
5318 the functions can get types '0' and '1'.
5320 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5322 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5323 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5324 * regcache.c (get_regcache): Likewise.
5325 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5326 * win32-low.c (child_fetch_inferior_registers): Remove check for
5329 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5330 Pedro Alves <pedro@codesourcery.com>
5332 * target.h (struct target_ops) <supports_multi_process>: New
5334 (target_supports_multi_process): New.
5335 * server.c (handle_query): Even if GDB reports support, only
5336 enable multi-process if the target also supports it. Report
5337 multi-process support only if the target backend supports it.
5338 * linux-low.c (linux_supports_multi_process): New function.
5339 (linux_target_ops): Install it as target_supports_multi_process
5342 2009-05-24 Doug Evans <dje@google.com>
5344 Global renaming of find_thread_pid to find_thread_ptid.
5345 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5346 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5347 All callers updated.
5349 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5350 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5353 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5354 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5355 (linux_resume_one_lwp): Ditto.
5357 2009-05-23 Doug Evans <dje@google.com>
5359 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5360 from struct inferior_list_entry * to struct lwp_info *.
5361 All callers updated.
5363 2009-05-13 Doug Evans <dje@google.com>
5365 * linux-x86-low.c: Don't include assert.h.
5366 (x86_siginfo_fixup): Use fatal, not assert.
5367 (x86_arch_setup): Fix comment.
5369 2009-05-12 Doug Evans <dje@google.com>
5371 Biarch support for i386/amd64 gdbserver.
5372 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5373 Add linux-x86-low.c.
5374 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5375 (linux-x86-low.o): Add.
5376 * linux-x86-64-low.c: Delete.
5377 * linux-i386-low.c: Delete.
5378 * linux-x86-low.c: New file.
5379 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5381 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5383 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5384 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5385 (linux_child_pid_to_exec_file): New function.
5386 (elf_64_header_p, elf_64_file_p): New functions.
5387 (siginfo_fixup): New function.
5388 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5389 give target a chance to convert layout.
5390 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5391 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5393 2009-05-07 Doug Evans <dje@google.com>
5395 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5396 (regsets_store_inferior_registers): Ditto.
5398 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5402 * linux-low.c (must_set_ptrace_flags): Delete.
5403 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5405 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5406 `lwp->must_set_ptrace_flags' instead.
5407 (linux_wait_for_event_1): Set ptrace options here.
5408 (linux_wait_1): ... not here.
5410 2009-04-30 Doug Evans <dje@google.com>
5412 * inferiors.c (started_inferior_callback): New function.
5413 (attached_inferior_callback): New function.
5414 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5415 * server.c (print_started_pid, print_attached_pid): New functions.
5416 (detach_or_kill_for_exit): New function.
5417 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5418 * server.h (have_started_inferiors_p): Declare.
5419 (have_attached_inferiors_p): Declare.
5421 * inferiors.c (remove_process): Fix memory leak, free process.
5422 * linux-low.c (linux_remove_process): New function.
5423 (linux_kill): Call it instead of remove_process.
5424 (linux_detach, linux_wait_1): Ditto.
5426 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5428 * configure.srv: Add x86 Windows CE target.
5430 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5432 * inferiors.c (get_thread_process): Make global.
5433 * server.h (get_thread_process): Add prototype.
5434 * thread-db.c (find_one_thread): Use get_thread_process
5435 instead of current_process.
5436 (thread_db_get_tls_address): Do not crash if called when
5437 thread layer is not yet initialized.
5439 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5441 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5442 * spu-low.c (current_tid): Rename to ...
5443 (current_ptid): ... this.
5444 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5445 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5446 ptid_get_lwp (current_ptid) instead of current_tid.
5447 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5448 instead of current_tid. Use find_process_pid to verify pid
5449 argument is valid. Pass proper argument to remove_process.
5450 (spu_thread_alive): Compare current_ptid instead of current_tid.
5451 (spu_resume): Likewise.
5453 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5455 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5458 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5460 Implement the multiprocess extensions, and add linux multiprocess
5463 * server.h (ULONGEST): Declare.
5464 (struct ptid, ptid_t): New.
5465 (minus_one_ptid, null_ptid): Declare.
5466 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5467 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5468 (struct inferior_list_entry): Change `id' type from unsigned from
5470 (struct sym_cache, struct breakpoint, struct
5471 process_info_private): Forward declare.
5472 (struct process_info): Declare.
5473 (current_process): Declare.
5474 (all_processes): Declare.
5475 (initialize_inferiors): Declare.
5476 (add_thread): Adjust to use ptid_t.
5477 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5478 (add_process, remove_process, find_thread_pid): Declare.
5479 (find_inferior_id): Adjust to use ptid_t.
5480 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5481 (multi_process): Declare.
5482 (push_event): Adjust to use ptid_t.
5483 (read_ptid, write_ptid): Declare.
5484 (prepare_resume_reply): Adjust to use ptid_t.
5485 (clear_symbol_cache): Declare.
5486 * inferiors.c (all_processes): New.
5487 (null_ptid, minus_one_ptid): New.
5488 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5489 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5490 (add_thread): Change unsigned long to ptid. Remove gdb_id
5492 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5493 (gdb_id_to_thread): Rename to ...
5494 (find_thread_pid): ... this. Change unsigned long to ptid.
5495 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5496 (loaded_dll, pull_pid_from_list): Adjust.
5497 (add_process, remove_process, find_process_pid)
5498 (get_thread_process, current_process, initialize_inferiors): New.
5499 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5500 (struct target_waitstatus) <related_pid>: Ditto.
5501 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5503 (struct target_ops) <join>: Add `pid' argument.
5504 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5505 (struct target_ops) <wait>: Add `ptid' field. Change return type
5507 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5508 (mywait): Add `ptid' argument. Change return type to ptid_t.
5509 (target_pid_to_str): Declare.
5510 * target.c (set_desired_inferior): Adjust to use ptids.
5511 (mywait): Add new `ptid' argument. Adjust.
5512 (target_pid_to_str): New.
5513 * mem-break.h (free_all_breakpoints): Declare.
5514 * mem-break.c (breakpoints): Delelete.
5515 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5516 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5517 to use per-process breakpoint list.
5518 (free_all_breakpoints): New.
5519 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5520 (symbol_cache, all_symbols_looked_up): Delete.
5522 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5524 (prepare_resume_reply): Change ptid argument's type from unsigned
5525 long to ptid_t. Adjust. Implement W;process and X;process.
5526 (free_sym_cache, clear_symbol_cache): New.
5527 (look_up_one_symbol): Adjust to per-process symbol cache. *
5528 * server.c (cont_thread, general_thread, step_thread): Change type
5531 (multi_process): New.
5532 (last_ptid): Change type to ptid_t.
5533 (struct vstop_notif) <ptid>: Change type to ptid_t.
5534 (queue_stop_reply, push_event): Change `ptid' argument's type to
5536 (discard_queued_stop_replies): Add `pid' argument.
5537 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5538 changes. Don't reference the `attached' global.
5539 (attach_inferior): Adjust to mywait interface changes.
5540 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5541 features. Handle and report "multiprocess+". Handle
5543 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5545 (handle_v_kill): New.
5546 (handle_v_stopped): Adjust to use target_pid_to_str.
5547 (handle_v_requests): Allow multiple attaches and runs when
5548 multiprocess extensions are in effect. Handle "vKill".
5549 (myresume): Adjust to use ptids.
5550 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5551 (handle_status): Adjust to discard_queued_stop_replies interface
5553 (first_thread_of, kill_inferior_callback)
5554 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5555 (main): Call initialize_inferiors. Adjust to use ptids, killing
5556 and detaching from all inferiors. Handle multiprocess packet
5558 * linux-low.h: Include gdb_proc_service.h.
5559 (struct process_info_private): New.
5560 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5561 <lwpid_of>: Use ptid_get_lwp.
5562 (get_lwp_thread): Adjust.
5563 (struct lwp_info): Add `dead' member.
5564 (find_lwp_pid): Declare.
5565 * linux-low.c (thread_db_active): Delete.
5566 (new_inferior): Adjust comment.
5567 (inferior_pid): Delete.
5568 (linux_add_process): New.
5569 (handle_extended_wait): Adjust.
5570 (add_lwp): Change unsigned long to ptid.
5571 (linux_create_inferior): Add process to processes table. Adjust
5572 to use ptids. Don't set new_inferior here.
5573 (linux_attach_lwp): Rename to ...
5574 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5575 it. Adjust to use ptids.
5576 (linux_attach_lwp): New.
5577 (linux_attach): Add process to processes table. Don't set
5579 (struct counter): New.
5580 (second_thread_of_pid_p, last_thread_of_process_p): New.
5581 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5583 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5584 processes. Remove process from process table.
5585 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5586 to multiple processes.
5587 (any_thread_of): New.
5588 (linux_detach): Add `pid' argument, and handle it. Remove process
5589 from processes table.
5590 (linux_join): Add `pid' argument. Handle it.
5591 (linux_thread_alive): Change unsighed long argument to ptid_t.
5592 Consider dead lwps as not being alive.
5593 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5594 threads we're not interested in.
5595 (same_lwp, find_lwp_pid): New.
5596 (linux_wait_for_lwp): Change `pid' argument's type from int to
5598 (linux_wait_for_event): Rename to ...
5599 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5600 from int to ptid_t. Adjust.
5601 (linux_wait_for_event): New.
5602 (linux_wait_1): Add `ptid' argument. Change return type to
5603 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5604 that exit from the process table.
5605 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5607 (mark_lwp_dead): New.
5608 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5609 stopping all threads, mark its main lwp as dead.
5610 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5612 (fetch_register, usr_store_inferior_registers)
5613 (regsets_fetch_inferior_registers)
5614 (regsets_store_inferior_registers, linux_read_memory)
5615 (linux_write_memory): Inline `inferior_pid'.
5616 (linux_look_up_symbols): Adjust to use per-process
5618 (linux_request_interrupt): Adjust to use ptids.
5619 (linux_read_auxv): Inline `inferior_pid'.
5620 (initialize_low): Don't reference thread_db_active.
5621 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5622 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5623 (ps_getpid): Return the pid of the current inferior.
5624 * thread-db.c (proc_handle, thread_agent): Delete.
5625 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5627 (find_one_thread): Change argument type to ptid_t. Adjust to
5629 (maybe_attach_thread): Adjust to per-process data and ptids.
5630 (thread_db_find_new_threads): Ditto.
5631 (thread_db_init): Ditto.
5632 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5633 processes table. Adjust to use ptids.
5634 (spu_kill, spu_detach): Adjust interface. Remove process from
5636 (spu_join, spu_thread_alive): Adjust interface.
5637 (spu_wait): Adjust interface. Remove process from processes
5638 table. Adjust to use ptids.
5639 * win32-low.c (current_inferior_tid): Delete.
5640 (current_inferior_ptid): New.
5641 (debug_event_ptid): New.
5642 (thread_rec): Take a ptid. Adjust.
5643 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5644 (child_delete_thread): Ditto.
5645 (do_initial_child_stuff): Add `attached' argument. Add process to
5647 (child_fetch_inferior_registers, child_store_inferior_registers):
5649 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5650 (win32_attach): Pass 1 to do_initial_child_stuff.
5651 (win32_kill): Adjust interface. Remove process from processes
5653 (win32_detach): Ditto.
5654 (win32_join): Adjust interface.
5655 (win32_thread_alive): Take a ptid.
5656 (win32_resume): Adjust to use ptids.
5657 (get_child_debug_event): Ditto.
5658 (win32_wait): Adjust interface. Remove exiting process from
5661 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5663 Non-stop mode support.
5665 * server.h (non_stop): Declare.
5666 (gdb_client_data, handler_func): Declare.
5667 (delete_file_handler, add_file_handler, start_event_loop):
5669 (handle_serial_event, handle_target_event, push_event)
5670 (putpkt_notif): Declare.
5671 * target.h (enum resume_kind): New.
5672 (struct thread_resume): Replace `step' field by `kind' field.
5673 (TARGET_WNOHANG): Define.
5674 (struct target_ops) <wait>: Add `options' argument.
5675 <supports_non_stop, async, start_non_stop>: New fields.
5676 (target_supports_non_stop, target_async): New.
5677 (start_non_stop): Declare.
5678 (mywait): Add `options' argument.
5679 * target.c (mywait): Add `options' argument. Print child exit
5681 (start_non_stop): New.
5682 * server.c (non_stop, own_buf, mem_buf): New globals.
5683 (struct vstop_notif): New.
5684 (notif_queue): New global.
5685 (queue_stop_reply, push_event, discard_queued_stop_replies)
5686 (send_next_stop_reply): New.
5687 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5689 (attach_inferior): In non-stop mode, don't wait for the target
5691 (handle_general_set): Handle QNonStop.
5692 (handle_query): When handling qC, return the current general
5693 thread, instead of the first thread of the list.
5694 (handle_query): If the backend supports non-stop mode, include
5695 QNonStop+ in the qSupported query response.
5696 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5698 (handle_v_attach, handle_v_run): Handle non-stop mode.
5699 (handle_v_stopped): New.
5700 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5701 (myresume): Adjust to use resume_kind. Handle non-stop.
5702 (queue_stop_reply_callback): New.
5703 (handle_status): Handle non-stop mode.
5704 (main): Clear non_stop flag on reconnection. Use the event-loop.
5705 Refactor serial protocol handling from here ...
5706 (process_serial_event): ... to this new function. When GDB
5707 selects any thread, select one here. In non-stop mode, wait until
5708 GDB acks all pending events before exiting.
5709 (handle_serial_event, handle_target_event): New.
5710 * remote-utils.c (remote_open): Install remote_desc in the event
5712 (remote_close): Remove remote_desc from the event loop.
5713 (putpkt_binary): Rename to...
5714 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5715 (putpkt_binary): New as wrapper around putpkt_binary_1.
5716 (putpkt_notif): New.
5717 (prepare_resume_reply): In non-stop mode, don't change the
5719 * event-loop.c: New.
5720 * Makefile.in (OBJ): Add event-loop.o.
5721 (event-loop.o): New rule.
5723 * linux-low.h (pid_of): Moved here.
5725 (get_lwp_thread): Use lwpid_of.
5726 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5727 * linux-low.c (pid_of): Delete.
5728 (inferior_pid): Use lwpid_of.
5729 (linux_event_pipe): New.
5730 (target_is_async_p): New.
5732 (handle_extended_wait): Use lwpid_of.
5733 (add_lwp): Don't set lwpid field.
5734 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5735 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5736 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5737 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5738 first. Adjust to linux_wait_for_event interface changes. Use
5740 (linux_detach): Don't delete the main lwp here.
5741 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5742 (status_pending_p): Don't consider explicitly suspended lwps.
5743 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5744 pointer. Add OPTIONS argument. Change return type to int. Use
5745 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5746 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5747 pointer. Add status pointer argument. Return a pid instead of a
5748 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5749 changes. In non-stop mode, don't switch to a random thread.
5750 (linux_wait): Rename to...
5751 (linux_wait_1): ... this. Add target_options argument, and handle
5752 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5753 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5754 clean exit and signal exit code. Don't stop all threads in
5755 non-stop mode. In all-stop mode, only stop all threads when
5756 reporting a stop to GDB. Handle explicit thread stop requests.
5757 (async_file_flush, async_file_mark): New.
5759 (send_sigstop): Use lwpid_of.
5760 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5761 interface changes. In non-stop mode, don't switch to a random
5763 (linux_resume_one_lwp): Use lwpid_of.
5764 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5765 (linux_resume_one_thread): ... this. Handle resume_stop. In
5766 non-stop mode, don't look for pending flag in all threads.
5767 (resume_status_pending_p): Don't consider explicitly suspended
5769 (my_waitpid): Reimplement. Emulate __WALL.
5770 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5772 (sigchld_handler, linux_supports_non_stop, linux_async)
5773 (linux_start_non_stop): New.
5774 (linux_target_ops): Register linux_supports_non_stop, linux_async
5775 and linux_start_non_stop.
5776 (initialize_low): Install SIGCHLD handler.
5777 * thread-db.c (thread_db_create_event, find_one_thread)
5778 (thread_db_get_tls_address): Use lwpid_of.
5779 * win32-low.c (win32_detach): Adjust to use resume_kind.
5780 (win32_wait): Add `options' argument.
5781 * spu-low.c (spu_resume): Adjust to use resume_kind.
5782 (spu_wait): Add `options' argument.
5784 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5786 Decouple target code from remote protocol.
5788 * target.h (enum target_waitkind): New.
5789 (struct target_waitstatus): New.
5790 (struct target_ops) <wait>: Return an unsigned long. Take a
5791 target_waitstatus pointer instead of a char pointer.
5793 * target.c (mywait): Change prototype to return an unsigned long.
5794 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5795 * server.h (thread_from_wait, old_thread_from_wait): Delete
5797 (prepare_resume_reply): Change prototype to take a
5799 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5800 (last_status, last_ptid): New.
5801 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5802 pid instead of a signal.
5803 (attach_inferior): Remove "status" and "signal" parameters.
5805 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5807 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5808 (handle_v_requests, myresume): Remove "status" and "signal"
5810 (handle_status): New.
5811 (main): Delete local `status'. Adjust.
5812 * remote-utils.c: Include target.h.
5813 (prepare_resume_reply): Change prototype to take a
5814 target_waitstatus. Adjust.
5816 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5818 * spu-low.c (spu_wait): Adjust.
5819 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5821 (win32_wait): Adjust.
5823 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5825 * target.h (struct thread_resume): Delete leave_stopped member.
5826 (struct target_ops): Add a `n' argument to the `resume' callback.
5827 * server.c (start_inferior): Adjust.
5828 (handle_v_cont, myresume): Adjust.
5829 * linux-low.c (check_removed_breakpoint): Adjust to resume
5830 interface change, and to removed leave_stopped field.
5831 (resume_ptr): Delete.
5832 (struct thread_resume_array): New.
5833 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5834 resume interface change.
5835 (linux_continue_one_thread, linux_queue_one_thread)
5836 (resume_status_pending_p): Check if the resume field is NULL
5837 instead of checking the leave_stopped member.
5838 (linux_resume): Adjust to the target resume interface change.
5839 * spu-low.c (spu_resume): Adjust to the target resume interface
5841 * win32-low.c (win32_detach, win32_resume): Ditto.
5843 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5845 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5847 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5849 (linux_continue_one_thread): Only preserve the stepping flag if
5850 there's a pending breakpoint.
5852 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5854 * server.c (main): After the inferior having exited, call
5855 remote_close before exiting gdbserver.
5857 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5859 Fix size of FPSCR in Power 7 processors.
5860 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5861 (PPC_FEATURE_HAS_DFP): New #define.
5862 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5865 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5867 * server.c (handle_query) Whitespace and formatting.
5869 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5871 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5872 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5873 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5874 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5875 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5876 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5877 Makefile.in, configure.ac: Fix whitespace throughout.
5878 * configure: Regenerate.
5880 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5882 * inferiors.c (find_inferior): Make it safe for the callback
5883 function to delete the currently iterated inferior.
5885 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5887 * Makefile.in (linuw_low_h): Move higher.
5888 (thread-db.o): Depend on $(linux_low_h).
5890 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5892 Rename "process" to "lwp" throughout.
5894 * linux-low.c (all_processes): Rename to...
5895 (all_lwps): ... this.
5896 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5897 (add_process): Rename to ...
5898 (add_lwp): ... this. Adjust.
5899 (linux_create_inferior): Adjust.
5900 (linux_attach_lwp): Adjust.
5901 (linux_attach): Adjust.
5902 (linux_kill_one_process): Rename to ...
5903 (linux_kill_one_lwp): ... this. Adjust.
5904 (linux_kill): Adjust.
5905 (linux_detach_one_process): Rename to ...
5906 (linux_detach_one_lwp): ... this. Adjust.
5907 (linux_detach): Adjust.
5908 (check_removed_breakpoint): Adjust.
5909 (status_pending_p): Adjust.
5910 (linux_wait_for_process): Rename to ...
5911 (linux_wait_for_lwp): ... this. Adjust.
5912 (linux_wait_for_event): Adjust.
5913 (send_sigstop): Adjust.
5914 (wait_for_sigstop): Adjust.
5915 (stop_all_processes): Rename to ...
5916 (stop_all_lwps): ... this.
5917 (linux_resume_one_process): Rename to ...
5918 (linux_resume_one_lwp): ... this. Adjust.
5919 (linux_set_resume_request, linux_continue_one_thread)
5920 (linux_queue_one_thread, resume_status_pending_p)
5921 (usr_store_inferior_registers, regsets_store_inferior_registers)
5922 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5924 * linux-low.h (get_process): Rename to ...
5925 (get_lwp): ... this. Adjust.
5926 (get_thread_process): Rename to ...
5927 (get_thread_lwp): ... this. Adjust.
5928 (get_process_thread): Rename to ...
5929 (get_lwp_thread): ... this. Adjust.
5930 (struct process_info): Rename to ...
5931 (struct lwp_info): ... this.
5932 (all_processes): Rename to ...
5933 (all_lwps): ... this.
5934 * proc-service.c (ps_lgetregs): Adjust.
5935 * thread-db.c (thread_db_create_event, find_one_thread)
5936 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5938 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5940 * server.c (handle_query): Handle "qAttached".
5942 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5944 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5945 GPLv3, update license URL.
5947 2009-03-01 Doug Evans <dje@google.com>
5949 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5950 (server_h): Add gdb_signals.h.
5951 (signals.o): Update.
5952 * server.h (target_signal_from_host,target_signal_to_host_p)
5953 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5955 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5957 * remote-utils.c (getpkt): Also generate remote-debug
5958 information if noack_mode is set.
5960 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5962 * server.c (handle_query): Report qXfer:siginfo:read and
5963 qXfer:siginfo:write as supported and handle them.
5964 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5965 * linux-low.c (linux_xfer_siginfo): New.
5966 (linux_target_ops): Set it.
5968 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5970 * server.c (gdbserver_usage): Mention --remote-debug.
5971 (main): Accept '--remote-debug' switch.
5973 2009-01-18 Doug Evans <dje@google.com>
5975 * regcache.c (new_register_cache): No need to check result of xcalloc.
5976 * server.c (handle_search_memory): Back out calls to xmalloc,
5977 result is checked and error is returned to user upon failure.
5978 (handle_query): Ditto. Add more checks for result of malloc.
5979 (handle_v_cont): Check result of malloc, report error back to
5981 (handle_v_run): Ditto. Call freeargv.
5982 * server.h (freeargv): Declare.
5983 * utils.c (freeargv): New fn.
5985 2009-01-15 Doug Evans <dje@google.com>
5987 * gdbreplay.c (perror_with_name): Make arg const char *.
5988 * server.h (target_signal_to_name): Make return type const char *.
5989 * thread-db.c (thread_db_err_str): Make return type const char *.
5990 * utils.c (perror_with_name): Make arg const char *.
5992 2009-01-14 Pedro Alves <pedro@codesourcery.com>
5994 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5995 when handling a EXIT_PROCESS_DEBUG_EVENT.
5997 2009-01-06 Joel Brobecker <brobecker@adacore.com>
5999 * gdbreplay.c (gdbreplay_version): Update copyright year.
6000 * server.c (gdbserver_version): Likewise.
6002 2009-01-05 Doug Evans <dje@google.com>
6004 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6005 (handle_extended_wait): Improve comment.
6007 2008-12-13 Doug Evans <dje@google.com>
6009 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6010 * server.h (ATTR_MALLOC): New macro.
6011 (xmalloc,xcalloc,xstrdup): Declare.
6012 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6013 * inferiors.c: Ditto.
6014 * linux-low.c: Ditto.
6015 * mem-break.c: Ditto.
6016 * regcache.c: Ditto.
6017 * remote-utils.c: Ditto.
6020 * win32-low.c: Ditto.
6022 2008-12-12 Doug Evans <dje@google.com>
6024 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6025 in debugging printf.
6027 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6029 2008-12-09 Doug Evans <dje@google.com>
6031 * linux-low.h (struct process_info): Delete member tid, unused.
6032 * thread-db.c (find_one_thread): Update.
6033 (maybe_attach_thread): Update.
6035 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6037 * target.h (struct target_ops): Add qxfer_osdata member.
6038 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6040 (linux_qxfer_osdata): New functions.
6041 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6043 * server.c (handle_query): Handle "qXfer:osdata:read:".
6044 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6045 (buffer_xml_printf): New functions.
6046 * server.h (struct buffer): New.
6047 (buffer_grow_str, buffer_grow_str0): New macros.
6048 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6049 (buffer_xml_printf): Declare.
6051 2008-11-24 Doug Evans <dje@google.com>
6053 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6055 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6057 * server.c (handle_v_run): Always use the supplied argument list.
6059 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6061 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6062 (xtensa_regmap_table): Add entry for scompare1.
6064 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6066 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6067 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6068 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6069 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6070 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6071 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6072 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6073 XML target descriptions.
6074 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6075 when inferior is running on an ISA 2.05 or later processor. Add
6076 special case to return offset for full 64-bit slot of FPSCR when
6079 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6081 * Makefile.in (SFILES, clean): Added sparc64 files.
6082 (reg-sparc64.o, reg-sparc64.c): New.
6083 * configure.srv (sparc*-*-linux*): New configuration.
6084 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6085 syscall arguments for SPARC.
6086 (regsets_store_inferior_registers): Likewise.
6087 * linux-sparc-low.c: New file.
6089 2008-10-21 Doug Evans <dje@google.com>
6091 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6092 (READLINE_DIR,READLINE_DEP): Delete.
6093 (INTERNAL_CFLAGS): Update.
6094 (LINTFLAGS): Update.
6096 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6098 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6099 whole argv from the last run, not just argv[0].
6101 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6103 * regcache.c (new_register_cache): Return NULL if the register
6104 cache size isn't known yet.
6105 (free_register_cache): Avoid dereferencing a NULL regcache.
6107 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6109 * configure.srv: Merge MIPS and MIPS64.
6111 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6113 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6115 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6117 * Makefile.in: Add required vsx dependencies.
6119 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6120 Declare init_registers_powerpc_vsx32l.
6121 Declare init_registers_powerpc_vsx64l.
6122 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6123 (ppc_arch_setup): Check for VSX in hwcap.
6124 (ppc_fill_vsxregset): New function.
6125 (ppc_store_vsxregset): New function.
6126 Add new VSX entry in regset_info target_regsets.
6128 * configure.srv: Add new VSX dependencies.
6130 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6132 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6133 (remote_open): Set or clear transport_is_reliable.
6134 (putpkt_binary): Don't expect acks in noack mode.
6135 (getpkt): Don't send ack/nac in noack mode.
6136 * server.c (handle_general_set): Handle QStartNoAckMode.
6137 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6139 (main): Reset noack_mode on every connection.
6140 * server.h (noack_mode): Declare.
6142 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6144 * Makefile.in (GDBREPLAY_OBS): New variable.
6145 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6147 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6148 Daniel Jacobowitz <dan@codesourcery.com>
6150 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6151 (usr_store_inferior_registers): Likewise.
6152 (regsets_store_inferior_registers): Likewise.
6154 2008-07-31 Rolf Jansen <rj@surtec.com>
6155 Pedro Alves <pedro@codesourcery.com>
6157 * configure.ac: Check for memmem declaration.
6158 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6159 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6160 (disable_packet_qfThreadInfo): Unconditionally compile.
6161 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6162 * configure, config.in: Regenerate.
6164 2008-07-28 Doug Kwan <dougkwan@google.com>
6166 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6167 (linux_write_memory): Remove declaration of errno.
6169 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6171 * linux-low.c (handle_extended_wait): Do not use "status"
6172 variable uninitialized.
6174 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6176 * server.c (handle_v_attach): Inhibit reporting dll changes.
6178 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6180 * remote-utils.c (prepare_resume_reply): If requested, don't
6181 output "thread:TID" in the T stop reply.
6183 * server.c (disable_packet_vCont, disable_packet_Tthread)
6184 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6185 (handle_query): If requested, disable support for qC, qfThreadInfo
6187 (handle_v_requests): If requested, disable support for vCont.
6188 (gdbserver_show_disableable): New.
6189 (main): Handle --disable-packet and --disable-packet=LIST.
6191 * server.h (disable_packet_vCont, disable_packet_Tthread)
6192 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6194 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6196 * server.c (gdbserver_usage): Mention --version.
6198 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6200 * Makefile.in (gdbreplay.o): New rule.
6202 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6204 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6205 message, not gdbserver.
6207 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6208 Nathan Sidwell <nathan@codesourcery.com>
6209 Joseph Myers <joseph@codesourcery.com>
6211 * acinclude.m4: Include ../../config/acx.m4.
6212 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6213 * configure, config.in: Regenerate.
6214 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6215 * server.c (gdbserver_version): Print PKGVERSION.
6216 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6217 (main): Adjust gdbserver_usage calls.
6218 * gdbreplay.c (version, host_name): Add declarations.
6219 (gdbreplay_version, gdbreplay_usage): New.
6220 (main): Accept --version and --help options.
6222 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6224 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6225 (arm_breakpoint_at): Handle Thumb.
6226 (the_low_target): Add comment.
6228 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6230 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6232 2008-05-09 Doug Evans <dje@google.com>
6234 * server.h (decode_search_memory_packet): Declare.
6235 * remote-utils.c (decode_search_memory_packet): New fn.
6236 * server.c (handle_search_memory_1): New fn.
6237 (handle_search_memory): New fn.
6238 (handle_query): Process qSearch:memory packets.
6240 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6242 * regcache.c (registers_length): Remove.
6243 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6244 full register packet.
6245 * regcache.h (registers_length): Remove prototype.
6246 * server.h (PBUFSIZ): Define to 16384.
6248 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6250 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6251 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6252 powerpc-64l.o, and powerpc-altivec64l.o.
6253 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6254 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6255 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6256 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6257 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6260 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6261 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6262 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6263 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6264 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6265 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6266 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6267 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6268 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6269 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6272 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6273 (init_registers_powerpc_32l): ... this new prototype.
6274 (init_registers_powerpc_32): Remove, replace by ...
6275 (init_registers_powerpc_altivec32l): ... this new prototype.
6276 (init_registers_powerpc_e500): Remove, replace by ...
6277 (init_registers_powerpc_e500l): ... this new prototype.
6278 (init_registers_ppc64): Remove, replace by ...
6279 (init_registers_powerpc_64l): ... this new prototype.
6280 (init_registers_powerpc_64): Remove, replace by ...
6281 (init_registers_powerpc_altivec64l): ... this new prototype.
6282 (ppc_num_regs): Set to 73.
6283 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6284 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6285 (ppc_cannot_store_register): Handle orig_r3 and trap.
6286 (ppc_arch_setup): Update init_registers_... calls.
6287 (ppc_fill_gregset): Handle orig_r3 and trap.
6289 * inferiors.c (clear_inferiors): Reset current_inferior.
6291 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6293 * acinclude.m4: Add override.m4.
6294 * configure: Regenerate.
6296 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6298 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6299 initial call to init_register_ppc64.
6301 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6303 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6304 single powerpc*-*-linux* case.
6305 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6307 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6309 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6310 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6312 * linux-ppc-low.c: Include <elf.h>.
6313 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6314 (ppc_hwcap): New global variable.
6315 (ppc_regmap): Remove __SPE__ #ifdef sections.
6316 (ppc_regmap_e500): New global variable.
6317 (ppc_cannot_store_register): Update __SPE__ special case.
6318 (ppc_get_hwcap): New function.
6319 (ppc_arch_setup): Use it to determine whether inferior supports
6320 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6321 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6322 Do not access registers if target does not support AltiVec.
6323 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6324 Do not access registers if target does not support SPE.
6325 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6327 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6329 * linux-low.c (disabled_regsets, num_regsets): New.
6330 (use_regsets_p): Delete.
6331 (linux_wait_for_process): Clear disabled_regsets.
6332 (regsets_fetch_inferior_registers): Check and set it.
6333 (regsets_store_inferior_registers): Likewise.
6334 (linux_fetch_registers, linux_store_registers): Do not use
6336 (initialize_low): Allocate disabled_regsets.
6338 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6340 * Makefile.in (LIBOBJS): New.
6342 (memmem.o): New rule.
6343 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6344 * configure: Regenerated.
6346 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6348 * server.c (handle_query): Never return "unsupported" for
6349 qXfer:features:read queries.
6351 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6353 * server.c (get_features_xml): Fix inverted condition.
6354 (handle_query): Always support qXfer:feature:read.
6356 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6358 * server.c (wrapper_argv): New.
6359 (start_inferior): Handle wrapper_argv. If set, expect an extra
6361 (gdbserver_usage): Document --wrapper.
6362 (main): Parse --wrapper.
6364 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6366 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6367 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6368 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6369 (ppc_set_pc): Likewise.
6370 (ppc_arch_setup): New function.
6371 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6372 of collect_register.
6373 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6375 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6377 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6378 instead of linux-ppc64-low.o.
6379 * linux-ppc64-low.c: Remove file.
6380 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6381 (linux-ppc64-low.o): Remove rule.
6383 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6384 (init_registers_powerpc_64): Likewise.
6385 (ppc_regmap): Conditionally define depending on __powerpc64__.
6386 (ppc_cannot_store_register): Do not special-case "fpscr" when
6387 compiled on __powerpc64__.
6388 (ppc_collect_ptrace_register): New function.
6389 (ppc_supply_ptrace_register): New function.
6390 (ppc_breakpoint): Change type to "unsigned int".
6391 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6392 (the_low_target): Conditionally provide initializers for the
6393 arch_setup member depending on __powerpc64__. Install
6394 collect_ptrace_register and supply_ptrace_register members.
6396 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6398 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6399 * server.c (gdbserver_xmltarget): Define.
6400 (get_features_xml): Use it to replace "target.xml" and arch_string.
6402 * configure.srv: Remove srv_xmltarget. Add XML files that were
6403 mentioned there to srv_xmlfiles instead. Remove conditional tests
6404 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6405 srv_xmlfiles and srv_regobj to include all possible choices.
6406 * configure.ac (srv_xmltarget): Remove.
6407 (srv_xmlfiles): Do not add "target.xml".
6408 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6409 checks for supplementary target information.
6410 * configure: Regenerate.
6411 * Makefile.in (XML_TARGET): Remove.
6412 (target.xml): Remove rule.
6413 (clean): Do not clean up target.xml.
6414 (.PRECIOUS): Do not mention target.xml.
6416 * target.h (struct target_ops): Remove arch_string member.
6417 * linux-low.c (linux_arch_string): Remove.
6418 (linux_target_ops): Remove arch_string initializer.
6419 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6420 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6421 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6422 * spu-low.c (spu_arch_string): Remove.
6423 (spu_target_ops): Remove arch_string initializer.
6424 * win32-low.c (win32_arch_string): Remove.
6425 (win32_target_ops): Remove arch_string initializer.
6426 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6427 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6428 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6430 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6432 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6433 by collect_ptrace_register and supply_ptrace_register hooks.
6434 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6435 instead of checking for the_low_target.left_pad_xfer.
6436 (usr_store_inferior_registers): Use collect_ptrace_register callback
6437 instead of checking for the_low_target.left_pad_xfer.
6439 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6440 (s390_supply_ptrace_register): Likewise.
6441 (s390_fill_gregset): Call s390_collect_ptrace_register.
6442 (the_low_target): Update.
6444 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6445 (ppc_supply_ptrace_register): Likewise.
6446 (the_low_target): Update.
6448 * linux-i386-low.c (the_low_target): Update.
6449 * linux-x86-64-low.c (the_low_target): Update.
6451 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6453 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6454 reg-s390.o and reg-s390x.o.
6456 * linux-low.c (new_inferior): New global variable.
6457 (linux_create_inferior, linux_attach): Set it.
6458 (linux_wait_for_process): Call the_low_target.arch_setup after the
6459 target has stopped for the first time.
6460 (initialize_low): Do not call the_low_target.arch_setup.
6462 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6463 (s390_set_pc): Likewise.
6464 (s390_arch_setup): New function.
6465 (the_low_target): Use s390_arch_setup as arch_setup routine.
6467 * regcache.c (realloc_register_cache): New function.
6468 (set_register_cache): Call it for each existing regcache.
6470 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6472 * server.h (init_registers): Remove prototype.
6474 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6475 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6476 instead of init_registers ().
6477 * linux-arm-low.c (init_registers_arm): Add prototype.
6478 (init_registers_arm_with_iwmmxt): Likewise.
6479 (the_low_target): Add initializer for arch_setup field.
6480 * linux-cris-low.c (init_registers_cris): Add prototype.
6481 (the_low_target): Add initializer for arch_setup field.
6482 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6483 (the_low_target): Add initializer for arch_setup field.
6484 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6485 (the_low_target): Add initializer for arch_setup field.
6486 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6487 (the_low_target): Add initializer for arch_setup field.
6488 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6489 (the_low_target): Add initializer for arch_setup field.
6490 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6491 (the_low_target): Add initializer for arch_setup field.
6492 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6493 (init_registers_mips64_linux): Likewise.
6494 (the_low_target): Add initializer for arch_setup field.
6495 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6496 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6497 (the_low_target): Add initializer for arch_setup field.
6498 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6499 (init_registers_powerpc_64): Likewise.
6500 (the_low_target): Add initializer for arch_setup field.
6501 * linux-s390-low.c (init_registers_s390): Add prototype.
6502 (init_registers_s390x): Likewise.
6503 (the_low_target): Add initializer for arch_setup field.
6504 * linux-sh-low.c (init_registers_sh): Add prototype.
6505 (the_low_target): Add initializer for arch_setup field.
6506 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6507 (the_low_target): Add initializer for arch_setup field.
6508 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6509 (the_low_target): Add initializer for arch_setup field.
6511 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6512 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6513 instead of init_registers ().
6514 * win32-arm-low.c (init_registers_arm): Add prototype.
6515 (the_low_target): Add initializer for arch_setup field.
6516 * win32-i386-low.c (init_registers_i386): Add prototype.
6517 (the_low_target): Add initializer for arch_setup field.
6519 * spu-low.c (init_registers_spu): Add prototype.
6520 (initialize_low): Call initialie_registers_spu () instead of
6521 initialize_registers ().
6523 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6525 * server.c (handle_v_requests): When handling the vRun and vAttach
6526 packets, if already debugging a process, don't kill it. Return an
6529 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6531 * server.c (handle_query): Correct length check.
6533 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6535 * win32-low.c (do_initial_child_stuff): Add process handle
6536 parameter. Set current_process_handle and current_process_id from the
6537 parameters. Clear globals.
6538 (win32_create_inferior): Don't set current_process_handle and
6539 current_process_id here. Instead pass them on the call to
6540 do_initial_child_stuff.
6541 (win32_attach): Likewise.
6542 (win32_clear_inferiors): New.
6543 (win32_kill): Don't close the current process handle or the
6544 current thread handle here. Instead call win32_clear_inferiors.
6545 (win32_detach): Don't open a new handle to the process. Call
6546 win32_clear_inferiors.
6547 (win32_join): Don't rely on current_process_handle; open a new
6548 handle using the process id.
6549 (win32_wait): Call win32_clear_inferiors when the inferior process
6552 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6554 * server.c (monitor_show_help): Add "exit".
6556 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6558 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6559 (clean): Add reg-xtensa.c.
6560 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6561 * configure.srv (xtensa*-*-linux*) New target.
6562 * linux-xtensa-low.c: New.
6563 * xtensa-xtregs.c: New.
6565 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6567 * hostio.c: Don't include errno.h.
6568 (errno_to_fileio_errno): Move to hostio-errno.
6569 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6570 error number outputting to the target->hostio_last_error callback.
6571 (hostio_packet_error): Use FILEIO_EINVAL directly.
6572 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6573 calls to hostio_error.
6574 * hostio-errno.c: New.
6575 * server.h (hostio_last_error_from_errno): Declare.
6576 * target.h (target_ops): Add hostio_last_error member.
6577 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6578 as hostio_last_error handler.
6579 * spu-low.c (spu_target_ops): Likewise.
6580 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6581 (wince_hostio_last_error): New functions.
6582 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6583 as hostio_last_error handler.
6584 (win32_target_ops) [!_WIN32_WCE]: Register
6585 hostio_last_error_from_errno as hostio_last_error handler.
6586 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6587 (hostio-errno.o): New rule.
6588 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6589 * configure.srv (srv_hostio_err_objs): New variable. Default to
6591 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6592 * configure: Regenerate.
6594 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6596 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6597 (linux_kill, linux_detach): Clean up the process list.
6598 * remote-utils.c (remote_open): Improve port number parsing.
6599 (putpkt_binary, input_interrupt): Only send interrupts if the target
6601 * server.c (extended_protocol): Make static.
6602 (attached): Define earlier.
6603 (exit_requested, response_needed, program_argv): New variables.
6604 (target_running): New.
6605 (start_inferior): Clear attached here.
6606 (attach_inferior): Set attached here.
6607 (require_running): Define.
6608 (handle_query): Use require_running and target_running. Implement
6610 (handle_v_attach, handle_v_run): New.
6611 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6612 (gdbserver_usage): Update.
6613 (main): Redo argument parsing. Handle --debug and --multi. Handle
6614 --attach along with other options or after the port. Save
6615 program_argv. Support no initial program. Resynchronize
6616 communication with GDB after an error. Handle "monitor exit".
6617 Use require_running and target_running. Always allow the extended
6618 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6619 restart in extended mode.
6620 * README: Refer to the GDB manual. Update --attach usage.
6622 2007-12-20 Andreas Schwab <schwab@suse.de>
6624 * linux-low.c (STACK_SIZE): Define.
6625 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6626 (linux_test_for_tracefork): Likewise.
6628 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6630 * linux-low.c (linux_wait_for_event): Update messages. Do not
6631 reinsert auto-delete breakpoints.
6632 * mem-break.c (struct breakpoint): Change return type of handler to
6634 (set_breakpoint_at): Update handler type.
6635 (reinsert_breakpoint_handler): Return 1 instead of calling
6637 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6639 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6640 * mem-break.h (set_breakpoint_at): Update handler type.
6641 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6642 * win32-low.c (auto_delete_breakpoint): New.
6643 (get_child_debug_event): Use it.
6645 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6647 * configure.ac: Check for pread and pwrite.
6648 * hostio.c (handle_pread): Fall back to lseek and read.
6649 (handle_pwrite): Fall back to lseek and write.
6650 * config.in, configure: Regenerated.
6652 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6654 * server.c (myresume): Add own_buf argument.
6655 (main): Update calls.
6657 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6659 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6660 * remote-utils.c (remote_open): Do not call disable_async_io.
6661 (block_async_io): Delete.
6662 (unblock_async_io): Make static.
6663 (initialize_async_io): New.
6664 * server.c (handle_v_cont): Handle async I/O here.
6665 (myresume): Likewise. Move other common resume tasks here...
6666 (main): ... from here. Call initialize_async_io. Disable async
6667 I/O before the main loop.
6668 * server.h (initialize_async_io): Declare.
6669 (block_async_io, unblock_async_io): Delete prototypes.
6670 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6672 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6674 * remote-utils.c (readchar): Allow binary data in received messages.
6676 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6678 * win32-low.c (attaching): New global.
6679 (win32_create_inferior): Clear the `attaching' global.
6680 (win32_attach): Set the `attaching' global.
6681 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6682 attaching. Only set a breakpoint at the entry point if not
6685 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6687 * server.c (main): Don't report dll events on the initial
6688 connection on attaches.
6690 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6692 * server.c (main): Relax numerical bases supported for the pid of
6693 the --attach command line argument.
6695 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6697 * win32-low.c (win32_attach): Call OpenProcess before
6698 DebugActiveProcess, not after. Add last error output to error
6701 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6703 * win32-low.c (win32_get_thread_context)
6704 (win32_set_thread_context): New functions.
6705 (thread_rec): Use win32_get_thread_context.
6706 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6707 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6710 2007-12-03 Leo Zayas
6711 Pedro Alves <pedro_alves@portugalmail.pt>
6713 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6715 (child_add_thread): Minor cleanup.
6716 (child_continue): Resume artificially suspended threads before
6717 calling ContinueDebugEvent.
6718 (suspend_one_thread): New.
6719 (fake_breakpoint_event): New.
6720 (get_child_debug_event): Change return type to int. Check here if
6721 gdb sent an interrupt request. If a soft interrupt was requested,
6722 fake a breakpoint event. Return 0 if there is no event to handle,
6724 (win32_wait): Don't check here if gdb sent an interrupt request.
6725 Ensure there is a valid event to handle.
6726 (win32_request_interrupt): Add soft interruption method as last
6729 2007-12-03 Leo Zayas
6730 Pedro Alves <pedro_alves@portugalmail.pt>
6732 * win32-low.h (win32_thread_info): Add descriptions to the
6733 structure members. Replace `suspend_count' counter by a
6735 * win32-low.c (thread_rec): Update condition of when to get the
6736 context from the inferior. Rely on ContextFlags being set if it
6737 has already been retrieved. Only suspend the inferior thread if
6738 we haven't already. Warn if that fails.
6739 (continue_one_thread): s/suspend_count/suspended/. Only call
6740 ResumeThread once. Warn if that fails.
6742 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6744 * win32-low.c (win32_wait): Don't read from the inferior when it
6747 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6749 * Makefile.in (win32_low_h): New variable.
6750 (win32-low.o): Add dependency on $(win32_low_h).
6751 (win32-arm-low.o, win32-i386-low.o): New rules.
6753 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6755 * hostio.c: Correct copyright year.
6757 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6759 * Makefile.in (OBS): Add hostio.o.
6760 (hostio.o): New rule.
6761 * server.h (handle_vFile): Declare.
6762 * hostio.c: New file.
6763 * server.c (handle_v_requests): Take packet_len and new_packet_len
6764 for binary packets. Call handle_vFile.
6765 (main): Update call to handle_v_requests.
6767 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6769 * linux-low.c: Include <sched.h>.
6771 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6773 * linux-low.c (linux_tracefork_grandchild): New.
6774 (linux_tracefork_child): Use clone.
6775 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6777 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6779 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6781 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6783 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6785 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6787 * inferiors.c (change_inferior_id): Delete.
6788 (add_pid_to_list, pull_pid_from_list): New.
6789 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6790 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6791 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6792 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6793 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6794 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6795 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6796 (using_threads): Always set to 1.
6797 (handle_extended_wait): New.
6798 (add_process): Do not set TID.
6799 (linux_create_inferior): Set must_set_ptrace_flags.
6800 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6801 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6802 (linux_thread_alive): Rename TID argument to LWPID.
6803 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6804 (linux_wait_for_event): Do not use TID or check using_threads. Update
6805 call to dead_thread_notify. Call handle_extended_wait.
6806 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6807 (send_sigstop): Delete sigstop_sent.
6808 (wait_for_sigstop): Avoid TID.
6809 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6810 (linux_test_for_tracefork): New.
6811 (linux_lookup_signals): Use thread_db_active and
6812 linux_supports_tracefork_flag.
6813 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6814 * linux-low.h (get_process_thread): Avoid TID.
6815 (struct process_ifo): Move thread_known and tid to the end. Remove
6817 (linux_attach_lwp, thread_db_init): Update prototypes.
6818 * server.h (change_inferior_id): Delete prototype.
6819 (add_pid_to_list, pull_pid_from_list): New prototypes.
6820 * thread-db.c (thread_db_use_events): New.
6821 (find_first_thread): Rename to...
6822 (find_one_thread): ...this. Update callers and messages. Do not
6823 call fatal. Check thread_db_use_events. Do not call
6824 change_inferior_id or new_thread_notify.
6825 (maybe_attach_thread): Update. Do not call new_thread_notify.
6826 (thread_db_init): Set thread_db_use_events. Check use_events.
6827 * utils.c (fatal, warning): Correct message prefix.
6829 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6831 * Makefile.in (clean): Remove new files.
6832 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6833 (powerpc-64.o, powerpc-64.c): New rules.
6834 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6835 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6837 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6839 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6840 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6841 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6842 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6843 (target_regsets): Add AltiVec and SPE register sets.
6844 * configure.ac: Check for AltiVec and SPE.
6845 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6846 (ppc_fill_vrregset, ppc_store_vrregset): New.
6847 (target_regsets): Add AltiVec register set.
6848 * configure: Regenerated.
6850 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6852 * linux-low.c (O_LARGEFILE): Define.
6853 (linux_read_memory): Use /proc/PID/mem.
6854 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6855 * configure, config.in: Regenerated.
6857 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6859 * linux-low.c (linux_wait_for_event): Do not pass signals while
6862 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6864 * win32-low.c (create_process): New.
6865 (win32_create_inferior): Use create_process instead of
6866 CreateProcess. If create_process failed retry appending an ".exe"
6867 suffix. Store the GetLastError result immediatelly after
6868 create_process calls and use it on the call to error.
6870 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6872 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6874 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6876 * configure.ac: Switch license to GPLv3.
6878 2007-08-01 Michael Snyder <msnyder@access-company.com>
6880 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6882 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6884 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6886 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6887 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6888 CloseToolhelp32Snapshot.
6889 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6890 CloseToolhelp32Snapshot.
6892 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6894 * server.c (main): Check for inferior exit before main loop.
6896 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6898 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6899 instead of on tmp_desc.
6901 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6902 Daniel Jacobowitz <dan@codesourcery.com>
6904 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6905 (add_thread): Minor cleanups.
6906 (clear_inferiors): Move lower in the file. Clear the DLL
6908 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6909 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6910 (xml_escape_text): New.
6911 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6913 (handle_v_cont): Report errors.
6914 (gdbserver_version): Update.
6915 (main): Correct size of own_buf. Do not report initial DLL events.
6916 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6917 (unloaded_dll, xml_escape_text): New.
6918 * win32-low.c (enum target_waitkind): Update comments.
6919 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6920 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6921 (win32_EnumProcessModules, win32_GetModuleInformation)
6922 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6923 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6924 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6925 (win32_Module32First, win32_Module32Next, load_toolhelp)
6926 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6927 (get_child_debug_event): Handle DLL events.
6928 (win32_wait): Likewise.
6930 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6932 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6933 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6935 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6937 * win32-low.c (handle_output_debug_string): Ignore event if not
6940 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6942 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6944 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6946 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6948 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6950 * inferiors.c (change_inferior_id): Add comment.
6951 * linux-low.c (check_removed_breakpoint): Add an early
6952 prototype. Improve debug output.
6953 (linux_attach): Doc update.
6954 (linux_detach_one_process, linux_detach): Clean up before releasing
6956 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6957 * linux-low.h (struct process_info): Doc improvement.
6958 * mem-break.c (delete_all_breakpoints): New.
6959 * mem-break.h (delete_all_breakpoints): New prototype.
6960 * thread-db.c (find_first_thread): New.
6961 (thread_db_create_event): Call it instead of
6962 thread_db_find_new_threads. Clean up unused variables.
6963 (maybe_attach_thread): Remove first thread handling.
6964 (thread_db_find_new_threads): Use find_first_thread.
6965 (thread_db_get_tls_address): Likewise.
6967 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6969 * thread-db.c (thread_db_find_new_threads): Add prototype.
6970 (thread_db_create_event): Check for the main thread before adding
6972 (maybe_attach_thread): Only enable event reporting if TID == 0.
6973 (thread_db_get_tls_address): Check for new threads.
6975 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6977 * linux-low.c (linux_create_inferior): Try execv before execvp.
6978 * spu-low.c (spu_create_inferior): Likewise.
6980 2007-06-13 Mike Frysinger <vapier@gentoo.org>
6982 * linux-low.c (linux_create_inferior): Change execv to execvp.
6983 * spu-low.c (spu_create_inferior): Likewies.
6985 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6987 * Makefile.in (clean): Clean new files instead of deleted ones.
6988 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6989 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6991 * configure.srv: Specify XML files and new regformats for MIPS and
6993 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6994 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6995 an entry for the restart register.
6996 (mips_cannot_fetch_register, mips_cannot_store_register)
6997 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6998 register names to match the XML descriptions.
6999 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7000 restart register instead of $0.
7002 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7003 Markus Deuling <deuling@de.ibm.com>
7005 * remote-utils.c (decode_xfer_write): New function.
7006 * server.h (decode_xfer_write): Add prototype.
7007 * server.c (handle_query): Add PACKET_LEN argument. Support
7008 qXfer:spu:read and qXfer:spu:write packets.
7009 (main): Pass packet_len to handle_query.
7010 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7011 * target.h (target_ops): Add qxfer_spu.
7013 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7015 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7016 accessing non-seekable spufs files.
7018 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7020 * server.c (handle_query): Add reply for qC packet.
7022 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7023 Leo Zayas <lerele@champenstudios@com>
7025 * server.h (check_remote_input_interrupt_request): New function.
7026 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7027 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7028 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7029 (check_remote_input_interrupt_request): New function.
7030 * server.h (check_remote_input_interrupt_request): Declare.
7031 * win32-low.c (winapi_DebugBreakProcess,
7032 winapi_GenerateConsoleCtrlEvent): New typedefs.
7033 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7035 (win32_wait): Check for remote interrupt request
7036 with check_remote_input_interrupt_request.
7037 (win32_request_interrupt): New function.
7038 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7040 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7042 * win32-low.c (debug_registers_changed,
7043 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7044 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7045 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7046 (thread_rec): Get context using the low target.
7047 (child_add_thread): Call thread_added on the low target,
7048 which does the same thing.
7050 (do_initial_child_stuff): Remove debug registers references.
7051 Set context using the low target. Resume threads after
7052 setting the contexts.
7053 (child_continue): Remove dead variable. Remove debug
7054 registers references.
7055 (child_fetch_inferior_registers): Go through the low target.
7056 (do_child_store_inferior_registers): Remove.
7057 (child_store_inferior_registers): Go through the low target.
7058 (win32_resume): Remove debug registers references.
7059 Set context using the low target.
7060 (handle_exception): Change return type to void. Don't record
7061 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7062 first chance exception.
7063 (get_child_debug_event): Change return type to void. Remove
7064 goto loop. Always return after waiting for debug event.
7065 (win32_wait): Convert to switch statement. Handle spurious
7068 * win32-i386-low.c (debug_registers_changed,
7069 debug_registers_used): New.
7070 (initial_stuff): Rename to ...
7071 (i386_initial_stuff): ... this. Clear debug registers
7073 (store_debug_registers): Delete.
7074 (i386_get_thread_context): New.
7075 (load_debug_registers): Delete.
7076 (i386_set_thread_context): New.
7077 (i386_thread_added): New.
7078 (single_step): Rename to ...
7079 (i386_single_step): ... this.
7080 (do_fetch_inferior_registers): Rename to ...
7081 (i386_fetch_inferior_register): ... this.
7082 (i386_store_inferior_register): New.
7083 (the_low_target): Adapt to new interface.
7085 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7086 (arm_get_thread_context): New.
7087 (arm_set_thread_context): New.
7089 (do_fetch_inferior_registers): Rename to ...
7090 (arm_fetch_inferior_register): ... this.
7091 (arm_store_inferior_register): New.
7092 (arm_wince_breakpoint): Reimplement as unsigned long.
7093 (arm_wince_breakpoint_len): Define.
7094 (the_low_target): Adapt to new interface.
7096 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7097 load_debug_registers. Add get_thread_context, set_thread_context,
7098 thread_added and store_inferior_register. Rename
7099 fetch_inferior_registers to fetch_inferior_register.
7100 (regptr): Remove declaration.
7102 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7104 * linux-low.c (linux_detach): Change return type to int. Return 0.
7105 * spu-low.c (spu_detach): Likewise.
7107 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7109 * target.h (target_ops): Change return type of detach to int.
7111 (join_inferior): New.
7112 * server.c (main): Don't skip detach support on mingw32.
7113 If the inferior doesn't support detaching return error.
7114 Call join_inferior instead of using waitpid.
7115 * linux-low.c (linux_join): New.
7116 (linux_target_op): Add linux_join.
7117 * spu-low.c (spu_join): New.
7118 (spu_target_ops): Add spu_join.
7119 * win32-low.c (win32_detach): Adapt to new interface.
7120 Reopen current_process_handle before detaching. Issue a child
7121 resume before detaching.
7123 (win32_target_op): Add win32_join.
7125 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7127 * win32-low.c (win32-attach): Fix return value.
7128 * target.h (target_ops): Describe ATTACH return values.
7130 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7132 * win32-low.c (GETPROCADDRESS): Define.
7133 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7134 (winapi_DebugSetProcessKillOnExit): Likewise.
7135 (win32_create_inferior): Force usage of ansi CreateProcessA.
7136 (win32_attach): Use GETPROCADDRESS.
7137 (win32_detach): Likewise.
7139 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7141 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7143 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7145 * win32-low.c: Commit leftover changes from 2007-03-29.
7147 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7149 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7150 fields short instead of int. Add explicit padding.
7151 (i387_cache_to_fsave): Remove unnecessary casts.
7152 (i387_fsave_to_cache): Doc fix.
7153 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7155 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7157 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7158 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7160 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7162 * configure.srv (arm*-*-mingw32ce*): Move near the other
7165 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7167 * configure.ac: Add errno checking.
7168 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7169 sys/file.h and malloc.h.
7170 (AC_CHECK_DECLS): Add perror.
7171 (srv_mingwce): Handle.
7172 * configure.srv (i[34567]86-*-cygwin*): Add
7173 win32-i386-low.o to srv_tgtobj.
7174 (i[34567]86-*-mingw*): Likewise.
7175 (arm*-*-mingw32ce*): Add case.
7176 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7177 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7178 [__MINGW32CE__] (strerror): New function.
7179 [__MINGW32CE__] (errno): Define to GetLastError.
7180 [__MINGW32CE__] (COUNTOF): New macro.
7181 (remote_open): Remove extra close call.
7182 * mem-break.c (delete_breakpoint_at): New function.
7183 * mem-break.h (delete_breakpoint_at): Declare.
7184 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7185 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7186 [USE_WIN32API] (read, write): Add char* casts.
7187 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7188 * server.h: Include wincecompat.h on Windows CE.
7189 [HAVE_ERRNO_H]: Check.
7190 (perror): Declare if not declared.
7191 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7192 (perror_with_name): Remove errno declaration.
7193 * wincecompat.h: New.
7194 * wincecompat.c: New.
7196 * win32-arm-low.c: New.
7197 * win32-i386-low.c: New.
7198 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7199 (OUTMSG2): Make it safe.
7201 (COUNTOF): New macro.
7202 (NUM_REGS): Get it from the low target.
7203 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7204 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7205 (thread_rec): Let low target handle debug registers.
7206 (child_add_thread): Likewise.
7207 (child_init_thread_list): Likewise.
7208 (continue_one_thread): Likewise.
7210 (do_child_fetch_inferior_registers): Move to ...
7211 * win32-i386-low.c: ... here, and rename to ...
7212 (do_fetch_inferior_registers): ... this.
7213 * win32-low.c (child_fetch_inferior_registers):
7214 Go through the low target.
7215 (do_child_store_inferior_registers): Use regptr.
7216 (strwinerror): New function.
7217 (win32_create_inferior): Handle Windows CE.
7218 Use strwinerror instead of strerror on Windows error
7219 codes. Add program to the error output.
7220 Don't close the main thread handle on Windows CE.
7221 (win32_attach): Use coredll.dll on Windows CE.
7222 (win32_kill): Close current process and current
7224 (win32_detach): Use coredll.dll on Windows CE.
7225 (win32_resume): Let low target handle debug registers, and
7227 (handle_exception): Add/Remove initial breakpoint. Avoid
7228 non-existant WSTOPSIG on Windows CE.
7229 (win32_read_inferior_memory): Cast to remove warning.
7230 (win32_arch_string): Go through the low target.
7231 (initialize_low): Call set_breakpoint_data with the low
7232 target's breakpoint.
7233 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7234 FOP_REGNUM, mappings): Move to ...
7235 * win32-i386-low.c: ... here.
7236 * win32-low.c (win32_thread_info): Move to ...
7237 * win32-low.h: ... here.
7238 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7239 win32-arm-low.c and wincecompat.c.
7240 (all:): Add $EXEEXT.
7241 (install-only:): Likewise.
7242 (gdbserver:): Likewise.
7243 (gdbreplay:): Likewise.
7244 * config.in: Regenerate.
7245 * configure: Regenerate.
7247 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7249 * win32-low.c: Rename typedef thread_info to
7250 win32_thread_info throughout.
7252 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7254 * win32-i386-low.c: Rename to ...
7255 * win32-low.c: ... this.
7256 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7257 * Makefile.in: Likewise.
7259 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7261 * remote-utils.c (monitor_output): Constify msg parameter.
7262 * server.h (monitor_output): Likewise.
7263 * win32-i386-low.c (handle_output_debug_string): New.
7264 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7265 handle_output_debug_string.
7266 (get_child_debug_event): Likewise.
7268 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7270 * server.c (main): Correct strtoul check.
7272 2007-03-27 Jon Ringle <jon@ringle.org>
7274 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7276 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7278 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7280 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7282 * terminal.h: Check HAVE_SGTTY_H.
7284 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7286 * remote-utils.c (remote_open): Print out the assigned port number.
7288 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7290 * remote-utils.c (monitor_output): New function.
7291 * server.c (debug_threads): Define here.
7292 (monitor_show_help): New function.
7293 (handle_query): Handle qRcmd.
7294 (main): Do not handle 'd' packet.
7295 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7296 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7299 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7301 * Makefile.in (EXEEXT): New.
7302 (clean): Use $(EXEEXT).
7304 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7306 * target.h (target_ops): Rename send_signal to request_interrupt,
7307 and remove enum target_signal parameter.
7308 * linux-low.c (linux_request_interrupt): Rename from
7309 linux_send_signal, and always send SIGINT.
7310 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7311 and always send SIGINT.
7312 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7314 (input_interrupt): Likewise.
7316 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7318 * server.c (get_features_xml): Check if target implemented
7320 * win32-i386-low.c (win32_arch_string): New.
7321 (win32_target_ops): Add win32_arch_string as arch_string member.
7323 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7325 * spu-low.c (spu_arch_string): New.
7326 (spu_target_ops): Add spu_arch_string.
7328 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7330 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7331 * configure.ac: Do not check for terminal.h.
7332 * configure, config.in: Regenerated.
7334 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7336 * Makefile.in (OBS): Add $(XML_BUILTIN).
7337 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7339 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7340 (arm-with-iwmmxt.c): New.
7341 * config.in, configure: Regenerate.
7342 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7343 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7344 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7345 (arm*-*-linux*): Add iWMMXt and regset support.
7346 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7347 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7348 (arm_store_wmmxregset, target_regsets): New.
7349 * server.c (get_features_xml): Take annex argument. Check builtin
7351 (handle_query): Handle multiple annexes.
7353 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7355 * remote-utils.c [USE_WIN32API] (read, write): Define.
7356 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7359 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7361 * linux-i386-low.c (the_low_target): Set arch_string.
7362 * linux-x86-64-low.c (the_low_target): Likewise.
7363 * linux-low.c (linux_arch_string): New.
7364 (linux_target_ops): Add it.
7365 * linux-low.h (struct linux_target_ops): Add arch_string.
7366 * server.c (write_qxfer_response): Use const void * for DATA.
7367 (get_features_xml): New.
7368 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7369 * target.h (struct target_ops): Add arch_string method.
7371 2007-01-03 Denis Pilat <denis.pilat@st.com>
7372 Daniel Jacobowitz <dan@codesourcery.com>
7374 * linux-low.c (linux_kill): Handle being called with no threads.
7375 * win32-i386-low.c (win32_kill): Likewise.
7376 (get_child_debug_event): Clear current_process_handle.
7378 2006-12-30 Denis PILAT <denis.pilat@st.com>
7379 Daniel Jacobowitz <dan@codesourcery.com>
7381 * remote-utils.c (remote_open): Check the type of specified
7382 serial port devices before opening them.
7383 * server.c (main): Kill the inferior if an error occurs during
7384 the first remote_open.
7386 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7388 * README: Update supported targets.
7390 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7392 * Makefile.in (clean): Remove reg-mips64.c.
7393 (reg-mips64.c, reg-mips64.o): New rules.
7394 * configure.srv: Handle mips64. Include regset support for mips.
7395 * linux-mips-low.c (union mips_register): New.
7396 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7397 (mips_breakpoint, mips_breakpoint_at): Use int.
7398 (mips_collect_register, mips_supply_register)
7399 (mips_collect_register_32bit, mips_supply_register_32bit)
7400 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7401 (mips_store_fpregset, target_regsets): New.
7402 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7404 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7406 * configure.srv: Add target "spu*-*-*".
7407 * Makefile.in (clean): Remove reg-spu.c.
7408 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7409 * spu-low.c: New file.
7411 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7413 * configure.ac: Correct td_thr_tls_get_addr test.
7414 * configure: Regenerated.
7416 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7418 * linux-low.c (linux_wait_for_event): Reformat. Use the
7420 * remote-utils.c (decode_address_to_semicolon): New.
7421 * server.c (pass_signals, handle_general_set): New.
7422 (handle_query): Mention QPassSignals for qSupported.
7423 (main): Call handle_general_set.
7424 * server.h (pass_signals, decode_address_to_semicolon): New.
7426 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7428 * server.c (handle_query): Correct error handling for read_auxv.
7430 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7432 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7433 and srv_linux_thread_db to yes.
7434 * linux-s390-low.c (s390_fill_gregset): New function.
7435 (target_regsets): Define data structure.
7437 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7439 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7440 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7441 * config.in, configure: Regenerated.
7442 * inferiors.c (gdb_id_to_thread): New function.
7443 (gdb_id_to_thread_id): Use it.
7444 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7445 * linux-low.h (struct process_info): Add th member.
7446 (thread_db_get_tls_address): New prototype.
7447 * remote-utils.c (decode_address): Make non-static.
7448 * server.c (handle_query): Handle qGetTLSAddr.
7449 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7450 * target.h (struct target_ops): Add get_tls_address.
7451 * thread-db.c (maybe_attach_thread): Save the thread handle.
7452 (thread_db_get_tls_address): New.
7454 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7456 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7457 (linux_resume_one_process): Take a siginfo_t *. Update all
7458 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7459 (struct pending_signals): Add a siginfo_t.
7460 (linux_wait_for_process): Always set last_status.
7461 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7462 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7463 * linux-low.h (struct process_info): Add last_status.
7465 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7467 * remote-utils.c (try_rle): New function.
7468 (putpkt_binary): Use it.
7470 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7472 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7473 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7474 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7475 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7476 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7479 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7481 * server.c (terminal_fd): New variable.
7482 (old_foreground_pgrp): Likewise.
7483 (restore_old_foreground_pgrp): New function.
7484 (start_inferior): Record the terminal file descriptor in terminal_fd
7485 and its original foreground group in old_foreground_pgrp. Register
7486 restore_old_foreground_pgrp with atexit().
7488 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7490 * server.c (handle_query): Correct qPart to qXfer.
7492 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7494 * configure.ac: Check for more headers which are missing on
7495 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7496 * configure.srv: Add Cygwin and mingw32.
7497 * remote-utils.c: Don't include headers unconditionally which
7498 are missing on mingw32. Include <winsock.h> for mingw32.
7499 (remote_open): Adjust for mingw32 support. Flush
7500 standard error after writing to it.
7501 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7502 (unblock_async_io, enable_async_io, disable_async_io)
7503 (readchar, getpkt): Update for Winsock support.
7504 (prepare_resume_reply): Expect a protocol signal number.
7505 * server.c: Disable <sys/wait.h> on mingw32.
7506 (start_inferior): Adjust for mingw32 support. Flush
7507 standard error after writing to it.
7508 (attach_inferior): Likewise. Use protocol signal
7510 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7512 * win32-i386-low.c: New file.
7513 * Makefile.in (XM_CLIBS): Set.
7514 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7515 (win32-i386-low.o): New dependency rule.
7516 * linux-low.c (linux_wait): Use target signal numbers.
7517 * target.h (struct target_ops): Doc fix.
7518 * server.h (target_signal_to_name): New prototype.
7519 * gdbreplay.c: Don't include headers unconditionally which
7520 are missing on mingw32. Include <winsock.h> for mingw32.
7521 (remote_close, remote_open): Adjust for Winsock support.
7522 * configure, config.in: Regenerated.
7524 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7526 * server.c (decode_xfer_read, write_qxfer_response): New.
7527 (handle_query): Take a packet length argument. Handle
7528 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7529 the qSupported response.
7530 (main): Update call to handle_query.
7532 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7534 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7535 (putpkt_binary): Renamed from putpkt and adjusted for binary
7537 (putpkt): New wrapper for putpkt_binary.
7538 (readchar): Don't mask off the high bit.
7539 (decode_X_packet): New function.
7540 * server.c (main): Call putpkt_binary if a handler sets the packet
7541 length. Save the length of the incoming packet. Handle 'X'.
7542 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7544 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7546 * server.c (handle_query): Handle qSupported.
7548 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7550 * remote-utils.c (all_symbols_looked_up): New variable.
7551 (look_up_one_symbol): Check it.
7552 * server.h (look_up_one_symbol): New declaration.
7553 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7555 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7557 * Makefile.in (linux-arm-low.o): Update dependencies.
7558 * linux-arm-low.c: Include "gdb_proc_service.h".
7559 (PTRACE_GET_THREAD_AREA): Define.
7560 (ps_get_thread_area): New function.
7562 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7564 * configure.srv (m68k*-*-uclinux*): New target.
7565 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7566 (linux_resume_one_process): Remove extraneous cast.
7567 (linux_read_offsets): New.
7568 (linux_target_op): Add linux_read_offsets on mmuless systems.
7569 * server.c (handle_query): Add qOffsets logic.
7570 * target.h (struct target_ops): Add read_offsets.
7572 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7574 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7575 (PTRACE_GET_THREAD_AREA): Define.
7576 (ps_get_thread_area): New function.
7577 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7578 (linux-x86-64-low.o): Update.
7580 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7582 * configure.ac: Remove checks for prfpregset_t.
7583 * gdb_proc_service.h: New file.
7584 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7585 new "gdb_proc_service.h".
7586 * proc-service.c: Likewise.
7587 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7588 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7589 * Makefile.in (gdb_proc_service_h): Updated.
7590 * configure, config.in: Regenerated.
7592 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7594 * remote-utils.c (prepare_resume_reply): Move declaration
7595 of gdb_id_from_wait to the top of the block.
7597 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7599 * linux-low.c (regsets_store_inferior_registers): Read the regset
7600 from the target before filling it.
7602 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7604 * server.c (attach_inferior): Return SIGTRAP for a successful
7607 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7609 * Makefile.in (OBS): Add version.o.
7610 (STAGESTUFF): Delete.
7611 (version.o): Add dependencies.
7612 (version.c): Replace rule.
7613 (clean): Remove version.c.
7614 * server.c (gdbserver_version): New.
7615 (gdbserver_usage): Use printf.
7616 (main): Handle --version and --help.
7617 * server.h (version, host_name): Add declarations.
7619 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7631 * linux-x86-64-low.c:
7634 * linux-ppc64-low.c:
7643 * linux-crisv32-low.c:
7655 * gdbserver.1: Add (C) after Copyright. Update the FSF
7658 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7660 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7661 (arm_breakpoint_at): Recognize both breakpoints.
7662 (the_low_target): Use the correct breakpoint instruction.
7664 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7666 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7667 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7668 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7669 (the_low_target): Update.
7671 2005-10-25 Andreas Schwab <schwab@suse.de>
7673 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7675 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7676 (ia64_num_regs): Reduce to 462.
7678 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7680 * acinclude.m4: Correct quoting.
7681 * aclocal.m4: Regenerated.
7683 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7684 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7685 (thread_db_init): Call thread_db_err_str.
7686 * configure.ac: Check for TD_VERSION.
7687 * config.in, configure: Regenerated.
7689 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7691 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7693 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7695 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7696 is not available. Define HAVE_PTRACE_GETREGS if it is.
7697 * config.in, configure: Regenerated.
7698 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7699 * linux-i386-low.c, linux-m68k-low.c: Update to use
7700 HAVE_PTRACE_GETREGS.
7701 * linux-low.c (regsets_fetch_inferior_registers)
7702 (regsets_store_inferior_registers): Only return 0 if we processed
7704 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7705 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7707 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7709 * inferiors.c (struct thread_info): Add gdb_id.
7710 (add_thread): Add gdb_id argument.
7711 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7712 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7713 calls to add_thread.
7714 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7715 * server.c (handle_query): Use thread_to_gdb_id.
7716 (handle_v_cont, main): Use gdb_id_to_thread_id.
7717 * server.h (add_thread): Update prototype.
7718 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7721 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7723 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7724 left-padded registers.
7725 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7726 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7728 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7730 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7731 * configure: Regenerate.
7732 * config.in: Regenerate.
7733 * server.h (NEED_DECLARATION_STRERROR):
7734 Replace with !HAVE_DECL_STRERROR.
7736 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7738 * linux-low.c (linux_wait, linux_send_signal): Don't test
7739 an unsigned long variable for > 0 if it could be MAX_ULONG.
7740 * server.c (myresume): Likewise.
7741 * target.c (set_desired_inferior): Likewise.
7743 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7745 * configure.ac: Simplify and improve check for socklen_t.
7746 * configure, config.in: Regenerate.
7748 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7750 * acconfig.h: Remove.
7751 * configure.ac: Add a test for socklen_t. Use three-argument
7752 AC_DEFINE throughout.
7753 * config.in: Regenerated using autoheader 2.59.
7754 * configure: Regenerated.
7756 * gdbreplay.c (socklen_t): Provide a default.
7757 (remote_open): Use socklen_t.
7758 * remote-utils.c (socklen_t): Provide a default.
7759 (remote_open): Use socklen_t.
7760 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7763 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7765 * linux-low.c (linux_read_memory, linux_write_memory)
7766 (linux_read_auxv): Likewise.
7767 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7768 (check_mem_write): Likewise.
7769 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7771 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7772 (registers_from_string, register_data): Likewise.
7773 * server.c (handle_query, main): Likewise.
7774 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7775 (decode_M_packet): Likewise.
7776 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7777 * target.h (struct target_ops): Update read_memory, write_memory,
7779 (read_inferior_memory, write_inferior_memory): Update.
7780 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7782 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7783 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7784 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7785 linux-s390-low.c, linux-sh-low.c: Update for changes in
7786 read_inferior_memory and the_low_target->breakpoint.
7788 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7790 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7791 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7792 * configure.srv: Add powerpc64-*-linux*.
7793 * linux-ppc64-low.c: New file.
7795 2005-05-23 Orjan Friberg <orjanf@axis.com>
7797 * linux-cris-low.c: New file with support for CRIS.
7798 * linux-crisv32-low.c: Ditto for CRISv32.
7799 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7800 (clean): Add reg-cris.c and reg-crisv32.c.
7801 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7802 reg-crisv32.o, and reg-crisv32.c to make rules.
7803 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7806 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7808 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7809 of sizeof (PTRACE_XFER_TYPE).
7810 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7812 2005-05-12 Orjan Friberg <orjanf@axis.com>
7814 * target.h (struct target_ops): Add insert_watchpoint,
7815 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7816 pointers for hardware watchpoint support.
7817 * linux-low.h (struct linux_target_ops): Ditto.
7818 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7819 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7820 to linux_target_ops.
7821 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7823 * server.c (main): Recognize 'Z' and 'z' packets.
7825 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7827 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7828 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7829 (the_low_target): Add new members.
7831 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7833 * proc-service.c (ps_lgetregs): Search all_processes instead of
7836 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7838 * server.c (start_inferior): Change return type to int.
7839 (attach_inferior): Change sigptr to int *.
7840 (handle_v_cont, handle_v_requests): Change signal to int *.
7841 (main): Change signal to int.
7843 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7845 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7846 * configure.srv: Add m32r*-*-linux*.
7847 * linux-m32r-low.c: New file.
7849 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7851 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7853 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7855 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7856 Take unsigned long arguments for PIDs.
7857 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7858 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7859 (wait_for_sigstop, linux_resume_one_process)
7860 (regsets_fetch_inferior_registers, linux_send_signal)
7861 (linux_read_auxv): Likewise. Update the types of variables holding
7862 PIDs. Update format string specifiers.
7863 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7864 * remote-utils.c (prepare_resume_reply): Likewise.
7865 * server.c (cont_thread, general_thread, step_thread)
7866 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7868 (handle_query): Update format specifiers.
7869 (handle_v_cont, main): Use strtoul for thread IDs.
7870 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7871 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7872 (general_thread, step_thread, thread_from_wait)
7873 (old_thread_from_wait): Update.
7874 * target.h (struct thread_resume): Use unsigned long for THREAD.
7875 (struct target_ops): Use unsigned long for arguments to attach and
7878 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7880 * acinclude.m4: Include bfd/bfd.m4 directly.
7881 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7882 <agriffis@toolchain.org>.
7883 * aclocal.m4, configure: Regenerated.
7885 2005-01-07 Andrew Cagney <cagney@gnu.org>
7887 * configure.ac: Rename configure.in, require autoconf 2.59.
7888 * configure: Re-generate.
7890 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7892 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7894 * aclocal.m4: Regenerated.
7895 * configure: Regenerated.
7897 2004-11-21 Andreas Schwab <schwab@suse.de>
7899 * linux-m68k-low.c (m68k_num_gregs): Define.
7900 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7901 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7902 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7903 (m68k_breakpoint_at): New. Add to the_low_target.
7905 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7906 srv_linux_thread_db to yes.
7908 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7910 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7911 (ARCH_SET_FS): Likewise.
7912 (ARCH_GET_FS): Likewise.
7913 (ARCH_GET_GS): Likewise.
7915 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7917 * linux-i386-low.c (ps_get_thread_area): New.
7918 * linux-x86-64-low.c (ps_get_thread_area): New.
7919 * linux-low.c: Include <sys/syscall.h>.
7920 (linux_kill_one_process): Don't kill the first thread here.
7921 (linux_kill): Kill the first thread here.
7922 (kill_lwp): New function.
7923 (send_sigstop, linux_send_signal): Use it.
7924 * proc-service.c: Clean up #ifdefs.
7925 (fpregset_info): Delete.
7926 (ps_lgetregs): Update and enable implementation.
7927 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7929 * remote-utils.c (struct sym_cache, symbol_cache): New.
7930 (input_interrupt): Print a clearer message.
7931 (async_io_enabled): New variable.
7932 (enable_async_io, disable_async_io): Use it. Update comments.
7933 (look_up_one_symbol): Use the symbol cache.
7934 * thread-db.c (thread_db_look_up_symbols): New function.
7935 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7937 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7939 * configure.in: Test for -rdynamic.
7940 * configure: Regenerated.
7941 * Makefile (INTERNAL_LDFLAGS): New.
7942 (gdbserver, gdbreplay): Use it.
7944 2004-09-02 Andrew Cagney <cagney@gnu.org>
7946 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7948 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7950 * linux-low.c (linux_wait): Clear all_processes list also.
7952 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7954 * linux-low.c: Include <errno.h>. Remove extern declaration of
7957 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7959 * gdbreplay.c, server.h, utils.c: Update copyright years.
7961 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7963 * server.c (main): Print child status or termination signal from
7964 variable 'signal', not 'sig'.
7966 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7968 * linux-low.c (linux_read_memory): Change return type to
7969 int. Check for and return error from ptrace().
7970 * target.c (read_inferior_memory): Change return type to int. Pass
7971 back return status from the_target->read_memory().
7972 * target.h (struct target_ops): Adapt *read_memory() prototype.
7974 (read_inferior_memory): Adapt prototype.
7975 * server.c (main): Return an error packet if
7976 read_inferior_memory() returns an error.
7978 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
7980 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7981 Unify with other clean targets.
7983 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7985 * server.c (handle_v_cont): Call set_desired_inferior.
7987 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7989 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7991 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
7993 * linux-low.c (linux_wait): Unblock async I/O.
7994 (linux_resume): Block and enable async I/O.
7995 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7996 * server.h (block_async_io, unblock_async_io): Add prototypes.
7998 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8000 * remote-utils.c (remote_open): Print a status notice after
8002 * server.c (attach_inferior): Print a status notice after
8005 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8007 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8009 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8011 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8013 * server.c, target.h: Update copyright years.
8015 2004-02-25 Roland McGrath <roland@redhat.com>
8017 * target.h (struct target_ops): New member `read_auxv'.
8018 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8019 * linux-low.c (linux_read_auxv): New function.
8020 (linux_target_ops): Initialize `read_auxv' member to that.
8022 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8024 Committed by Jim Blandy <jimb@redhat.com>.
8026 * linux-s390-low.c (s390_num_regs): Update.
8027 (s390_regmap): Remove control registers. Use __s390x__ predefine
8028 instead of GPR_SIZE to distiguish s390 and s390x targets.
8030 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8032 * linux-low.c: Update copyright year.
8033 (check_removed_breakpoint): Clear pending_is_breakpoint.
8034 (linux_set_resume_request, linux_queue_one_thread)
8035 (resume_status_pending_p): New functions.
8036 (linux_continue_one_thread): Use process->resume.
8037 (linux_resume): Only resume threads if there are no pending events.
8038 * linux-low.h (struct process_info): Add resume request
8041 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8043 * regcache.c (new_register_cache): Clear the allocated register
8044 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8046 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8048 * linux-low.c (linux_resume): Take a struct thread_resume *
8050 (linux_wait): Update call.
8051 (resume_ptr): New static variable.
8052 (linux_continue_one_thread): Renamed from
8053 linux_continue_one_process. Use resume_ptr.
8054 (linux_resume): Use linux_continue_one_thread.
8055 * server.c (handle_v_cont, handle_v_requests): New functions.
8056 (myresume): New function.
8057 (main): Handle 'v' case.
8058 * target.h (struct thread_resume): New type.
8059 (struct target_ops): Change argument of "resume" to struct
8061 (myresume): Delete macro.
8063 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8065 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8066 (uninstall): Support DESTDIR.
8068 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8070 * configure.srv: Add xscale*linux copy of arm*linux entry.
8072 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8074 * linux-arm-low.c (arm_reinsert_addr): New function.
8075 (the_low_target): Add arm_reinsert_addr.
8077 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8079 * mem-break.c: Remove whitespace at end of file.
8081 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8083 * configure.in: Check whether we need to prototype strerror.
8084 * server.h: Optionally prototype strerror.
8085 * gdbreplay.c (perror_with_name): Use strerror.
8086 * linux-low.c (linux_attach_lwp): Use strerror.
8087 * utils.c (perror_with_name): Use strerror.
8088 * config.in, configure: Regenerated.
8090 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8092 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8093 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8095 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8097 * Makefile.in (SFILES): Update.
8098 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8099 low-sun3.c: Remove files.
8101 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8103 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8104 (linux_detach_one_process, linux_detach): New functions.
8105 (linux_target_ops): Add linux_detach.
8106 * server.c (main): Handle 'D' packet.
8107 * target.h (struct target_ops): Add "detach" member.
8108 (detach_inferior): Define.
8110 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8112 From Kelley Cook <kelleycook@wideopenwest.com>:
8113 * configure.srv: Accept i[34567]86 variants.
8115 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8117 * linux-low.c (linux_wait_for_event): Correct comment typos.
8118 (linux_resume_one_process): Call check_removed_breakpoint.
8119 (linux_send_signal): New function.
8120 (linux_target_ops): Add linux_send_signal.
8121 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8123 * target.h (struct target_ops): Add send_signal.
8125 2003-05-29 Jim Blandy <jimb@redhat.com>
8127 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8128 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8129 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8130 away part of the register's value.
8132 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8134 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8135 (linux_wait_for_event, linux_init_signals): Likewise.
8137 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8139 * configure.in: Check for stdlib.h.
8140 * configure: Regenerated.
8141 * config.in: Regenerated.
8143 2003-01-04 Andreas Schwab <schwab@suse.de>
8145 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8147 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8149 * Makefile.in: Remove obsolete code.
8151 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8153 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8154 defined(PT_FPR0_HI).
8156 2002-11-17 Stuart Hughes <seh@zee2.com>
8158 * linux-arm-low.c (arm_num_regs): Increase.
8159 (arm_regmap): Include status register.
8161 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8163 * linux-low.c (register_addr): Remove incorrect -1 check.
8165 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8167 * linux-low.c (linux_create_inferior): Call setpgid. Return
8169 (unstopped_p, linux_signal_pid): Remove.
8170 (linux_target_ops): Remove linux_signal_pid.
8171 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8172 global instead of target method.
8173 * target.h (struct target_ops): Remove signal_pid. Update comment
8174 for create_inferior.
8175 * server.c (signal_pid): New variable.
8176 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8177 gdbserver. Set the child to be the foreground process group.
8178 (attach_inferior): Set signal_pid.
8180 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8182 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8184 2002-08-20 Jim Blandy <jimb@redhat.com>
8186 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8189 2002-08-01 Andrew Cagney <cagney@redhat.com>
8191 * Makefile.in: Make chill references obsolete.
8193 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8195 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8196 * configure: Regenerate.
8197 * config.in: Regenerate.
8199 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8201 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8202 (perror_with_name, remote_close, remote_open, expect, play): Static.
8204 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8206 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8207 byte offsets instead of an array of indexes.
8208 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8210 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8212 * regcache.c: Add comment.
8214 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8216 * thread-db.c: New file.
8217 * proc-service.c: New file.
8218 * acinclude.m4: New file.
8219 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8220 proc-service.o, and thread-db.o.
8221 (linux-low.o): Add USE_THREAD_DB.
8222 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8223 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8224 * aclocal.m4: Regenerated.
8225 * config.in: Regenerated.
8226 * configure: Regenerated.
8227 * configure.in: Check for proc_service.h, sys/procfs.h,
8228 thread_db.h, and linux/elf.h headrs.
8229 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8230 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8231 Check for -lthread_db and thread support.
8232 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8233 PowerPC, and SuperH.
8234 * i387-fp.c: Constify arguments.
8235 * i387-fp.h: Likewise.
8236 * inferiors.c: (struct thread_info): Renamed from
8237 `struct inferior_info'. Remove PID member. Use generic inferior
8238 list header. All uses updated.
8239 (inferiors, signal_pid): Removed.
8240 (all_threads): New variable.
8241 (get_thread): Define.
8242 (add_inferior_to_list): New function.
8243 (for_each_inferior): New function.
8244 (change_inferior_id): New function.
8245 (add_inferior): Removed.
8246 (remove_inferior): New function.
8247 (add_thread): New function.
8248 (free_one_thread): New function.
8249 (remove_thread): New function.
8250 (clear_inferiors): Use for_each_inferior and free_one_thread.
8251 (find_inferior): New function.
8252 (find_inferior_id): New function.
8253 (inferior_target_data): Update argument type.
8254 (set_inferior_target_data): Likewise.
8255 (inferior_regcache_data): Likewise.
8256 (set_inferior_regcache_data): Likewise.
8257 * linux-low.c (linux_bp_reinsert): Remove.
8258 (all_processes, stopping_threads, using_thrads)
8259 (struct pending_signals, debug_threads, pid_of): New.
8260 (inferior_pid): Replace with macro.
8261 (struct inferior_linux_data): Remove.
8262 (get_stop_pc, add_process): New functions.
8263 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8264 Use add_process and add_thread.
8265 (linux_attach_lwp): New function, based on old linux_attach. Use
8266 add_process and add_thread. Set stop_expected for new threads.
8267 (linux_attach): New function.
8268 (linux_kill_one_process): New function.
8269 (linux_kill): Kill all LWPs.
8270 (linux_thread_alive): Use find_inferior_id.
8271 (check_removed_breakpoints, status_pending_p): New functions.
8272 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8273 Update. Use WNOHANG. Wait for cloned processes also. Update process
8274 struct for the found process.
8275 (linux_wait_for_event): New function.
8276 (linux_wait): Use it. Support LWPs.
8277 (send_sigstop, wait_for_sigstop, stop_all_processes)
8278 (linux_resume_one_process, linux_continue_one_process): New functions.
8279 (linux_resume): Support LWPs.
8280 (REGISTER_RAW_SIZE): Remove.
8281 (fetch_register): Use register_size instead. Call supply_register.
8282 (usr_store_inferior_registers): Likewise. Call collect_register.
8284 (regsets_fetch_inferior_registers): Improve error message.
8285 (regsets_store_inferior_registers): Add debugging.
8286 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8287 (unstopped_p, linux_signal_pid): New functions.
8288 (linux_target_ops): Add linux_signal_pid.
8289 (linux_init_signals): New function.
8290 (initialize_low): Call it. Initialize using_threads.
8291 * regcache.c (inferior_regcache_data): Add valid
8293 (get_regcache): Fetch registers lazily. Add fetch argument
8294 and update all callers.
8295 (regcache_invalidate_one, regcache_invalidate): New
8297 (new_register_cache): Renamed from create_register_cache.
8298 Return the new regcache.
8299 (free_register_cache): Change argument to a void *.
8300 (registers_to_string, registers_from_string): Call get_regcache
8301 with fetch flag set.
8302 (register_data): Make static. Pass fetch flag to get_regcache.
8303 (supply_register): Call get_regcache with fetch flag clear.
8304 (collect_register): Call get_regcache with fetch flag set.
8305 (collect_register_as_string): New function.
8306 * regcache.h: Update.
8307 * remote-utils.c (putpkt): Flush after debug output and use
8309 Handle input interrupts while waiting for an ACK.
8310 (input_interrupt): Use signal_pid method.
8311 (getpkt): Flush after debug output and use stderr.
8312 (outreg): Use collect_register_as_string.
8313 (new_thread_notify, dead_thread_notify): New functions.
8314 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8316 (look_up_one_symbol): Flush after debug output.
8317 * server.c (step_thread, server_waiting): New variables.
8318 (start_inferior): Don't use signal_pid. Update call to mywait.
8319 (attach_inferior): Update call to mywait.
8320 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8321 (main): Don't fetch/store registers explicitly. Use
8322 set_desired_inferior. Support proposed ``Hs'' packet. Update
8325 (struct inferior_list, struct_inferior_list_entry): New.
8326 * target.c (set_desired_inferior): New.
8327 (write_inferior_memory): Constify.
8328 (mywait): New function.
8330 (struct target_ops): New signal_pid method.
8331 (mywait): Removed macro, added prototype.
8333 * linux-low.h (regset_func): Removed.
8334 (regset_fill_func, regset_store_func): New.
8335 (enum regset_type): New.
8336 (struct regset_info): Add type field. Use new operation types.
8337 (struct linux_target_ops): stop_pc renamed to get_pc.
8338 Add decr_pc_after_break and breakpoint_at.
8339 (get_process, get_thread_proess, get_process_thread)
8340 (strut process_info, all_processes, linux_attach_lwp)
8341 (thread_db_init): New.
8343 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8344 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8345 (the_low_target): Add new members.
8346 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8347 (i386_store_fpxregset): Constify.
8348 (target_regsets): Add new kind identifier.
8349 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8350 (i386_set_pc): Add debugging.
8351 (i386_breakpoint_at): New function.
8352 (the_low_target): Add new members.
8353 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8354 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8355 (mips_breakpoint_at): New.
8356 (the_low_target): Add new members.
8357 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8358 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8359 (the_low_target): Add new members.
8360 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8361 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8362 (the_low_target): Add new members.
8363 * linux-x86-64-low.c (target_regsets): Add new kind
8366 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8368 From Martin Pool <mbp@samba.org>:
8369 * server.c (gdbserver_usage): New function.
8372 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8374 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8377 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8379 * Makefile.in: Remove obsolete code.
8381 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8383 * linux-low.c (regsets_fetch_inferior_registers),
8384 (regsets_store_inferior_registers): Removed cast to int from
8386 * regcache.h: Added declaration of struct inferior_info.
8388 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8390 * inferiors.c (struct inferior_info): Add regcache_data.
8391 (add_inferior): Call create_register_cache.
8392 (clear_inferiors): Call free_register_cache.
8393 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8394 * regcache.c (struct inferior_regcache_data): New.
8395 (registers): Remove.
8396 (get_regcache): New function.
8397 (create_register_cache, free_register_cache): New functions.
8398 (set_register_cache): Don't initialize the register cache here.
8399 (registers_to_string, registers_from_string, register_data): Call
8401 * regcache.h: Add prototypes.
8402 * server.h: Likewise.
8404 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8406 * mem-break.c: New file.
8407 * mem-break.h: New file.
8408 * Makefile.in: Add mem-break.o rule; update server.h
8410 * inferiors.c (struct inferior_info): Add target_data
8412 (clear_inferiors): Free target_data member if set.
8413 (inferior_target_data, set_inferior_target_data): New functions.
8414 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8415 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8416 * linux-low.c (linux_bp_reinsert): New variable.
8417 (struct inferior_linux_data): New.
8418 (linux_create_inferior): Use set_inferior_target_data.
8419 (linux_attach): Likewise. Call add_inferior.
8420 (linux_wait_for_one_inferior): New function.
8421 (linux_wait): Call it.
8422 (linux_write_memory): Add const.
8423 (initialize_low): Call set_breakpoint_data.
8424 * linux-low.h (struct linux_target_ops): Add breakpoint
8426 * server.c (attach_inferior): Remove extra add_inferior
8428 * server.h: Include mem-break.h. Update inferior.c
8430 * target.c (read_inferior_memory)
8431 (write_inferior_memory): New functions.
8432 * target.h (read_inferior_memory)
8433 (write_inferior_memory): Change macros to prototypes.
8434 (struct target_ops): Update comments. Add const to write_memory
8437 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8439 * linux-low.c (usr_store_inferior_registers): Support
8440 registers which are allowed to fail to store.
8441 * linux-low.h (linux_target_ops): Likewise.
8442 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8443 (ppc_cannot_store_register): FPSCR may not be storable.
8445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8447 * server.h: Include <string.h> if HAVE_STRING_H.
8448 * ChangeLog: Correct paths in last ChangeLog entry.
8450 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8452 * linux-low.h: Remove obsolete prototypes.
8453 (struct linux_target_ops): New.
8454 (extern the_low_target): New.
8455 * linux-low.c (num_regs, regmap): Remove declarations.
8456 (register_addr): Use the_low_target explicitly.
8457 (fetch_register): Likewise.
8458 (usr_fetch_inferior_registers): Likewise.
8459 (usr_store_inferior_registers): Likewise.
8460 * linux-arm-low.c (num_regs): Remove.
8461 (arm_num_regs): Define.
8462 (arm_regmap): Renamed from regmap, made static.
8463 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8465 (arm_cannot_store_register): Renamed from cannot_store_register,
8467 (the_low_target): New.
8468 * linux-i386-low.c (num_regs): Remove.
8469 (i386_num_regs): Define.
8470 (i386_regmap): Renamed from regmap, made static.
8471 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8473 (i386_cannot_store_register): Renamed from cannot_store_register,
8475 (the_low_target): New.
8476 * linux-ia64-low.c (num_regs): Remove.
8477 (ia64_num_regs): Define.
8478 (ia64_regmap): Renamed from regmap, made static.
8479 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8481 (ia64_cannot_store_register): Renamed from cannot_store_register,
8483 (the_low_target): New.
8484 * linux-m68k-low.c (num_regs): Remove.
8485 (m68k_num_regs): Define.
8486 (m68k_regmap): Renamed from regmap, made static.
8487 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8489 (m68k_cannot_store_register): Renamed from cannot_store_register,
8491 (the_low_target): New.
8492 * linux-mips-low.c (num_regs): Remove.
8493 (mips_num_regs): Define.
8494 (mips_regmap): Renamed from regmap, made static.
8495 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8497 (mips_cannot_store_register): Renamed from cannot_store_register,
8499 (the_low_target): New.
8500 * linux-ppc-low.c (num_regs): Remove.
8501 (ppc_num_regs): Define.
8502 (ppc_regmap): Renamed from regmap, made static.
8503 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8505 (ppc_cannot_store_register): Renamed from cannot_store_register,
8507 (the_low_target): New.
8508 * linux-s390-low.c (num_regs): Remove.
8509 (s390_num_regs): Define.
8510 (s390_regmap): Renamed from regmap, made static.
8511 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8513 (s390_cannot_store_register): Renamed from cannot_store_register,
8515 (the_low_target): New.
8516 * linux-sh-low.c (num_regs): Remove.
8517 (sh_num_regs): Define.
8518 (sh_regmap): Renamed from regmap, made static.
8519 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8521 (sh_cannot_store_register): Renamed from cannot_store_register,
8523 (the_low_target): New.
8524 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8525 (the_low_target): New.
8527 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8529 * Makefile.in: Add stamp-h target.
8530 * configure.in: Create stamp-h.
8531 * configure: Regenerated.
8533 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8535 * inferiors.c: New file.
8536 * target.c: New file.
8537 * target.h: New file.
8538 * Makefile.in: Add target.o and inferiors.o. Update
8540 * linux-low.c (inferior_pid): New static variable,
8541 moved from server.c.
8542 (linux_create_inferior): Renamed from create_inferior.
8543 Call add_inferior. Return 0 on success instead of a PID.
8544 (linux_attach): Renamed from myattach.
8545 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8546 (linux_thread_alive): Renamed from mythread_alive.
8547 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8549 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8550 (regsets_store_inferior_registers): Correct error message.
8551 Add missing ``return 0''.
8552 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8553 (linux_store_registers): Renamed from store_inferior_registers.
8554 (linux_read_memory): Renamed from read_inferior_memory.
8555 (linux_write_memory): Renamed from write_inferior_memory.
8556 (linux_target_ops): New structure.
8557 (initialize_low): Call set_target_ops ().
8558 * remote-utils.c (unhexify): New function.
8559 (hexify): New function.
8560 (input_interrupt): Send signals to ``signal_pid''.
8561 * server.c (inferior_pid): Remove.
8562 (start_inferior): Update create_inferior call.
8563 (attach_inferior): Call add_inferior.
8564 (handle_query): New function.
8565 (main): Call handle_query for `q' packets.
8566 * server.h: Include "target.h". Remove obsolete prototypes.
8567 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8569 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8571 * Makefile.in: Add WARN_CFLAGS. Update configury
8573 * configure.in: Check for <string.h>
8574 * configure: Regenerate.
8575 * config.in: Regenerate.
8576 * gdbreplay.c: Include needed system headers.
8577 (remote_open): Remove strchr prototype.
8578 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8579 * regcache.c (supply_register): Change buf argument to const void *.
8580 (supply_register_by_name): Likewise.
8581 (collect_register): Change buf argument to void *.
8582 (collect_register_by_name): Likewise.
8583 * regcache.h: Add missing prototypes.
8584 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8585 * server.c (handle_query): New function.
8586 (attached): New static variable, moved out of main.
8587 (main): Quiet longjmp clobber warnings.
8588 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8589 * utils.c (error): Remove NORETURN.