1 2013-09-05 Pedro Alves <palves@redhat.com>
3 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7 (handle_tracepoint_general_set, handle_tracepoint_query)
8 (tracepoint_finished_step, tracepoint_was_hit)
9 (release_while_stepping_state_list, current_traceframe)
10 (in_readonly_region, traceframe_read_mem)
11 (fetch_traceframe_registers, traceframe_read_sdata)
12 (traceframe_read_info, struct fast_tpoint_collect_status)
13 (fast_tracepoint_collecting, force_unlock_trace_buffer)
14 (handle_tracepoit_bkpts, initialize_low_tracepoint)
15 (supply_fast_tracepoint_registers)
16 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
17 (ipa_tdesc, claim_trampoline_space)
18 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
19 (agent_mem_read, agent_get_trace_state_variable_value)
20 (agent_set_trace_state_variable_value, agent_tsv_read)
21 (agent_mem_read_string, get_raw_reg_func_addr)
22 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
23 * tracepoint.h: ... this new file.
25 2013-09-05 Pedro Alves <palves@redhat.com>
27 * server.h (perror_with_name, error, fatal, warning, paddress)
28 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
32 2013-09-05 Pedro Alves <palves@redhat.com>
34 * server.h (remote_debug, noack_mode, transport_is_reliable)
35 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
36 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
37 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
38 (write_enn, initialize_async_io, enable_async_io)
39 (disable_async_io, check_remote_input_interrupt_request)
40 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
41 (dead_thread_notify, prepare_resume_reply)
42 (decode_address_to_semicolon, decode_address, decode_m_packet)
43 (decode_M_packet, decode_X_packet, decode_xfer_write)
44 (decode_search_memory_packet, unhexify, hexify)
45 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
46 (look_up_one_symbol, relocate_instruction)
47 (monitor_output): Move to remote-utils.h, and include it.
48 * remote-utils.h: New file.
50 2013-09-05 Pedro Alves <palves@redhat.com>
52 * server.h (_): Delete.
54 2013-09-02 Pedro Alves <palves@redhat.com>
56 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
57 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
59 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
61 2013-09-02 Pierre Muller <muller@sourceware.org>
63 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
64 or WriteProcessMemory complete successfully and handle
65 ERROR_PARTIAL_COPY error.
67 2013-09-02 Pedro Alves <palves@redhat.com>
69 * server.c (gdb_read_memory): Return -1 on traceframe memory read
72 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
75 * linux-low.c: Include filestuff.h.
76 (linux_create_inferior) <pid == 0>: Call close_most_fds.
77 * lynx-low.c: Include filestuff.h.
78 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
79 * server.c: Include filestuff.h.
80 (main): Call notice_open_fds.
81 * spu-low.c: Include filestuff.h.
82 (spu_create_inferior) <pid == 0>: Call close_most_fds.
84 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
86 * Makefile.in: Explain why ../target and ../nat are not
87 listed as include file search paths.
88 (linux-waitpid.o): New object file rule.
89 * configure.srv (srv_native_linux_obj): New variable.
90 Replace all occurrences of linux native object files with
91 $srv_native_linux_obj.
92 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
93 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
94 (linux_enable_event_reporting): Remove declaration.
95 (my_waitpid): Moved to common/linux-waitpid.c.
96 (linux_wait_for_event): Pass ptid when calling
97 linux_enable_event_reporting.
98 (linux_supports_tracefork_flag): Remove.
99 (linux_enable_event_reporting): Likewise.
100 (linux_tracefork_grandchild): Remove.
101 (STACK_SIZE): Moved to common/linux-ptrace.c.
102 (linux_tracefork_child): Remove.
103 (linux_test_for_tracefork): Remove.
104 (linux_look_up_symbols): Call linux_supports_traceclone.
105 (initialize_low): Remove call to linux_test_for_tracefork.
106 * linux-low.h (PTRACE_TYPE_ARG3): Move to
107 common/linux-ptrace.h.
108 (PTRACE_TYPE_ARG4): Likewise.
109 Include linux-ptrace.h.
111 2013-08-21 Pedro Alves <palves@redhat.com>
113 * config.in: Renegerate.
115 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
117 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
118 (SFILES): Remove $(srcdir)/common/target-common.c and
119 add $(srcdir)/target/waitstatus.c.
120 (OBS): Remove target-common.o and add waitstatus.o.
121 (server_h): Remove $(srcdir)/../common/target-common.h and
122 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
123 and $(srcdir)/../target/waitstatus.h.
124 (target-common.o): Remove.
125 (waitstatus.o): New target object file.
126 * target.h: Do not include target-common.h and
127 include target/resume.h, target/wait.h and
130 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
132 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
134 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
135 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
137 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
138 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
140 2013-07-27 Jie Zhang <jie@codesourcery.com>
141 Daniel Jacobowitz <dan@codesourcery.com>
142 Yao Qi <yao@codesourcery.com>
144 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
145 (mips-linux-watch.o): New rule.
146 (mips_linux_watch_h): New variable.
147 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
149 * linux-mips-low.c: Include mips-linux-watch.h.
150 (struct arch_process_info, struct arch_lwp_info): New.
151 (update_watch_registers_callback): New function.
152 (mips_linux_new_process, mips_linux_new_thread) New functions.
153 (mips_linux_prepare_to_resume, mips_insert_point): New
155 (mips_remove_point, mips_stopped_by_watchpoint): New
157 (rsp_bp_type_to_target_hw_bp_type): New function.
158 (mips_stopped_data_address): New function.
159 (the_low_target): Add watchpoint support functions.
161 2013-07-27 Yao Qi <yao@codesourcery.com>
163 * i386-low.c: Include break-common.h.
164 (enum target_hw_bp_type): Remove.
166 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
168 * Makefile.in (SFILES): /common/target-common.c.
169 (OBS): Add target-common.o.
170 (server_h): Add $(srcdir)/../common/target-common.h.
171 (target-common.o): New target.
172 * server.c (queue_stop_reply_callback): Free
173 status string after use.
174 * target.c (target_waitstatus_to_string): Remove.
175 * target.h: Include target-common.h.
176 (resume_kind): Likewise.
177 (target_waitkind): Likewise.
178 (target_waitstatus): Likewise.
179 (TARGET_WNOHANG): Likewise.
181 2013-07-04 Yao Qi <yao@codesourcery.com>
183 * Makefile.in (host_alias): Use @host_noncanonical@.
184 (target_alias): Use @target_noncanonical@.
185 * configure.ac: Use ACX_NONCANONICAL_TARGET and
186 ACX_NONCANONICAL_HOST.
187 * configure: Regenerated.
190 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
192 * configure.ac (version_host, version_target): Set and AC_SUBST them.
193 * configure: Rebuild.
194 * Makefile.in (version_host, version_target): Get from configure.
195 (version.c): Use $(version_host) and $(version_target).
197 2013-07-03 Pedro Alves <palves@redhat.com>
199 * Makefile.in (config.status): Depend on development.sh.
200 * acinclude.m4: Include libmcheck.m4.
201 * configure: Regenerate.
203 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
205 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
206 attribute inside the parentheses.
207 (winapi_DebugSetProcessKillOnExit): Ditto.
208 (winapi_DebugBreakProcess): Ditto.
209 (winapi_GenerateConsoleCtrlEvent): Ditto.
211 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
213 * notif.h (notif_event): Add a dummy member to avoid compiler
216 2013-07-01 Pedro Alves <palves@redhat.com>
218 * hostio.c (HOSTIO_PATH_MAX): Define.
219 (require_filename, handle_open, handle_unlink, handle_readlink):
222 2013-07-01 Pedro Alves <palves@redhat.com>
224 * server.h: Include "pathmax.h".
225 * linux-low.c: Don't include sys/param.h.
226 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
228 * win32-low.c: Don't include sys/param.h.
229 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
231 2013-07-01 Pedro Alves <palves@redhat.com>
233 * event-loop.c: Don't check HAVE_UNISTD_H before including
235 * gdbreplay.c: Likewise.
236 * remote-utils.c: Likewise.
237 * server.c: Likewise.
238 * configure.ac: Don't check for unistd.h.
239 * configure: Regenerate.
241 2013-06-28 Tom Tromey <tromey@redhat.com>
243 * Makefile.in (version.c): Use version.in, not
246 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
248 * configure.ac (version_host, version_target): Set and AC_SUBST them.
249 * configure: Rebuild.
250 * Makefile.in (version_host, version_target): Get from configure.
251 (version.c): Use $(version_host) and $(version_target).
253 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
255 Fix trace-status to output user name without trailing colon.
256 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
258 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
260 Fix trace-status to output proper start-time and stop-time.
261 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
262 output start time and stop time in hex as gdb expects.
264 2013-06-26 Pedro Alves <pedro@codesourcery.com>
266 * tracepoint.c (build_traceframe_info_xml): Output trace state
267 variables present in the trace buffer.
269 2013-06-24 Tom Tromey <tromey@redhat.com>
271 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
274 * gdbreplay.c: Include version.h.
275 (version, host_name): Don't declare.
276 * server.h: Include version.h.
277 (version, host_name): Don't declare.
279 2013-06-12 Pedro Alves <palves@redhat.com>
281 * linux-x86-low.c (linux_is_elf64): Delete global.
282 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
283 with local linux_pid_exe_is_elf_64_file use.
285 2013-06-11 Pedro Alves <palves@redhat.com>
287 * linux-low.c (regset_disabled, disable_regset): New functions.
288 (regsets_fetch_inferior_registers)
289 (regsets_store_inferior_registers): Use them.
290 (initialize_regsets_info); Don't allocate the disabled_regsets
292 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
295 2013-06-11 Pedro Alves <palves@redhat.com>
297 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
300 2013-06-11 Pedro Alves <palves@redhat.com>
302 * linux-x86-low.c (initialize_low_arch): Call
303 init_registers_x32_avx_linux.
305 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
307 Fix compatibility with Android Bionic.
308 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
311 2013-06-07 Pedro Alves <palves@redhat.com>
314 * Makefile.in (OBS): Add tdesc.o.
315 (IPA_OBJS): Add tdesc-ipa.o.
316 (tdesc-ipa.o): New rule.
317 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
319 * linux-low.c (new_inferior): Delete.
320 (disabled_regsets, num_regsets): Delete.
321 (linux_add_process): Adjust to set the new per-process
323 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
324 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
325 was a stop. When calling arch_setup, switch the current inferior
326 to the thread that got an event.
327 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
328 (regsets_fetch_inferior_registers)
329 (regsets_store_inferior_registers): New regsets_info parameter.
331 (linux_register_in_regsets): New regs_info parameter. Adjust to
333 (register_addr, fetch_register, store_register): New usrregs_info
334 parameter. Adjust to use it.
335 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
336 parameter regs_info. Adjust to use it.
337 (linux_fetch_registers): Get the current inferior's regs_info, and
339 (linux_store_registers): Ditto.
340 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
341 (initialize_low): Don't initialize the target_regsets here. Call
343 * linux-low.h (target_regsets): Delete declaration.
344 (struct regsets_info): New.
345 (struct usrregs_info): New.
346 (struct regs_info): New.
347 (struct process_info_private) <new_inferior>: New field.
348 (struct linux_target_ops): Delete the num_regs, regmap, and
349 regset_bitmap fields. New field regs_info.
350 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
351 * i387-fp.c (num_xmm_registers): Delete.
352 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
353 calls to new interface.
354 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
355 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
356 Infer the number of xmm registers from the regcache's target
358 * i387-fp.h (num_xmm_registers): Delete.
359 * inferiors.c (add_thread): Don't install the thread's regcache
361 * proc-service.c (gregset_info): Fetch the current inferior's
362 regs_info. Adjust to use it.
363 * regcache.c: Include tdesc.h.
364 (register_bytes, reg_defs, num_registers)
365 (gdbserver_expedite_regs): Delete.
366 (get_thread_regcache): If the thread doesn't have a regcache yet,
367 create one, instead of aborting gdbserver.
368 (regcache_invalidate_one): Rename to ...
369 (regcache_invalidate_thread): ... this.
370 (regcache_invalidate_one): New.
371 (regcache_invalidate): Only invalidate registers of the current
373 (init_register_cache): Add target_desc parameter, and use it.
374 (new_register_cache): Ditto. Assert the target description has a
375 non zero registers_size.
376 (regcache_cpy): Add assertions. Adjust.
377 (realloc_register_cache, set_register_cache): Delete.
378 (registers_to_string, registers_from_string): Adjust.
379 (find_register_by_name, find_regno, find_register_by_number)
380 (register_cache_size): Add target_desc parameter, and use it.
381 (free_register_cache_thread, free_register_cache_thread_one)
382 (regcache_release, register_cache_size): New.
383 (register_size): Add target_desc parameter, and use it.
384 (register_data, supply_register, supply_register_zeroed)
385 (supply_regblock, supply_register_by_name, collect_register)
386 (collect_register_as_string, collect_register_by_name): Adjust.
387 * regcache.h (struct target_desc): Forward declare.
388 (struct regcache) <tdesc>: New field.
389 (init_register_cache, new_register_cache): Add target_desc
391 (regcache_invalidate_thread): Declare.
392 (regcache_invalidate_one): Delete declaration.
393 (regcache_release): Declare.
394 (find_register_by_number, register_cache_size, register_size)
395 (find_regno): Add target_desc parameter.
396 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
398 * remote-utils.c: Include tdesc.h.
399 (outreg, prepare_resume_reply): Adjust.
400 * server.c: Include tdesc.h.
401 (gdbserver_xmltarget): Delete declaration.
402 (get_features_xml, process_serial_event): Adjust.
403 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
405 (struct process_info) <tdesc>: New field.
406 (ipa_tdesc): Declare.
409 * tracepoint.c: Include tdesc.h.
410 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
411 (get_context_regcache): Adjust to pass ipa_tdesc down.
412 (do_action_at_tracepoint): Adjust to get the register cache size
413 from the context regcache's description.
414 (traceframe_walk_blocks): Adjust to get the register cache size
415 from the current trace frame's description.
416 (traceframe_get_pc): Adjust to get current trace frame's
417 description and pass it down.
418 (gdb_collect): Adjust to get the register cache size from the
420 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
421 (gdbserver_xmltarget): Delete.
422 (initialize_low_tracepoint): Set the ipa's target description.
423 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
424 (initialize_low_tracepoint): Set the ipa's target description.
425 * linux-x86-low.c: Include tdesc.h.
426 [__x86_64__] (is_64bit_tdesc): New.
427 (ps_get_thread_area, x86_get_thread_area): Use it.
428 (i386_cannot_store_register): Rename to ...
429 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
430 (i386_cannot_fetch_register): Rename to ...
431 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
432 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
434 (target_regsets): Rename to ...
435 (x86_regsets): ... this.
436 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
438 (x86_siginfo_fixup): Use is_64bit_tdesc.
439 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
440 (tdesc_x32_avx_linux, tdesc_x32_linux)
441 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
443 (x86_linux_update_xmltarget): Delete.
444 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
445 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
446 (AMD64_LINUX_USER64_CS): New.
447 (x86_linux_read_description): New, based on
448 x86_linux_update_xmltarget.
449 (same_process_callback): New.
450 (x86_arch_setup_process_callback): New.
451 (x86_linux_update_xmltarget): New.
452 (x86_regsets_info): New.
453 (amd64_linux_regs_info): New.
454 (i386_linux_usrregs_info): New.
455 (i386_linux_regs_info): New.
456 (x86_linux_regs_info): New.
457 (x86_arch_setup): Reimplement.
458 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
459 (x86_emit_ops): Ditto.
460 (the_low_target): Adjust. Install x86_linux_regs_info,
461 x86_cannot_fetch_register, and x86_cannot_store_register.
462 (initialize_low_arch): New.
463 * linux-ia64-low.c (tdesc_ia64): Declare.
464 (ia64_fetch_register): Adjust.
465 (ia64_usrregs_info, regs_info): New globals.
466 (ia64_regs_info): New function.
467 (the_low_target): Adjust.
468 (initialize_low_arch): New function.
469 * linux-sparc-low.c (tdesc_sparc64): Declare.
470 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
472 (sparc_arch_setup): New function.
473 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
474 (the_low_target): Adjust.
475 (initialize_low_arch): New function.
476 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
477 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
478 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
479 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
480 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
481 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
482 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
483 (tdesc_powerpc_isa205_vsx64l): Declare.
484 (ppc_cannot_store_register, ppc_collect_ptrace_register)
485 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
486 (ppc_set_pc, ppc_get_hwcap): Adjust.
487 (ppc_usrregs_info): Forward declare.
488 (!__powerpc64__) ppc_regmap_adjusted: New global.
489 (ppc_arch_setup): Adjust to the current process'es target
491 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
492 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
493 (ppc_store_evrregset): Adjust.
494 (target_regsets): Rename to ...
495 (ppc_regsets): ... this, and make static.
496 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
497 (ppc_regs_info): New function.
498 (the_low_target): Adjust.
499 (initialize_low_arch): New function.
500 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
501 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
502 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
503 (tdesc_s390x_linux64v2): Declare.
504 (s390_collect_ptrace_register, s390_supply_ptrace_register)
505 (s390_fill_gregset, s390_store_last_break): Adjust.
506 (target_regsets): Rename to ...
507 (s390_regsets): ... this, and make static.
508 (s390_get_pc, s390_set_pc): Adjust.
509 (s390_get_hwcap): New target_desc parameter, and use it.
510 [__s390x__] (have_hwcap_s390_high_gprs): New global.
511 (s390_arch_setup): Adjust to set the current process'es target
512 description. Don't adjust the regmap.
513 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
514 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
515 (regs_info_3264): New globals.
516 (s390_regs_info): New function.
517 (the_low_target): Adjust.
518 (initialize_low_arch): New function.
519 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
520 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
521 [__mips64] (init_registers_mips_linux)
522 (init_registers_mips_dsp_linux): Delete defines.
523 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
524 (have_dsp): New global.
525 (mips_read_description): New, based on mips_arch_setup.
526 (mips_arch_setup): Reimplement.
527 (get_usrregs_info): New function.
528 (mips_cannot_fetch_register, mips_cannot_store_register)
529 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
530 (mips_fill_fpregset, mips_store_fpregset): Adjust.
531 (target_regsets): Rename to ...
532 (mips_regsets): ... this, and make static.
533 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
534 (dsp_regs_info, regs_info): New globals.
535 (mips_regs_info): New function.
536 (the_low_target): Adjust.
537 (initialize_low_arch): New function.
538 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
539 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
541 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
542 (arm_read_description): New, with bits factored from
544 (arm_arch_setup): Reimplement.
545 (target_regsets): Rename to ...
546 (arm_regsets): ... this, and make static.
547 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
548 (arm_regs_info): New function.
549 (the_low_target): Adjust.
550 (initialize_low_arch): New function.
551 * linux-m68k-low.c (tdesc_m68k): Declare.
552 (target_regsets): Rename to ...
553 (m68k_regsets): ... this, and make static.
554 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
555 (m68k_regs_info): New function.
556 (m68k_arch_setup): New function.
557 (the_low_target): Adjust.
558 (initialize_low_arch): New function.
559 * linux-sh-low.c (tdesc_sharch): Declare.
560 (target_regsets): Rename to ...
561 (sh_regsets): ... this, and make static.
562 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
563 (sh_regs_info, sh_arch_setup): New functions.
564 (the_low_target): Adjust.
565 (initialize_low_arch): New function.
566 * linux-bfin-low.c (tdesc_bfin): Declare.
567 (bfin_arch_setup): New function.
568 (bfin_usrregs_info, regs_info): New globals.
569 (bfin_regs_info): New function.
570 (the_low_target): Adjust.
571 (initialize_low_arch): New function.
572 * linux-cris-low.c (tdesc_cris): Declare.
573 (cris_arch_setup): New function.
574 (cris_usrregs_info, regs_info): New globals.
575 (cris_regs_info): New function.
576 (the_low_target): Adjust.
577 (initialize_low_arch): New function.
578 * linux-cris-low.c (tdesc_crisv32): Declare.
579 (cris_arch_setup): New function.
580 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
581 (cris_regs_info): New function.
582 (the_low_target): Adjust.
583 (initialize_low_arch): New function.
584 * linux-m32r-low.c (tdesc_m32r): Declare.
585 (m32r_arch_setup): New function.
586 (m32r_usrregs_info, regs_info): New globals.
587 (m32r_regs_info): Adjust.
588 (initialize_low_arch): New function.
589 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
590 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
591 (tic6x_usrregs_info): Forward declare.
592 (tic6x_read_description): New function, based on ...
593 (tic6x_arch_setup): ... this. Reimplement.
594 (target_regsets): Rename to ...
595 (tic6x_regsets): ... this, and make static.
596 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
597 (tic6x_regs_info): New function.
598 (the_low_target): Adjust.
599 (initialize_low_arch): New function.
600 * linux-xtensa-low.c (tdesc_xtensa): Declare.
601 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
602 (target_regsets): Rename to ...
603 (xtensa_regsets): ... this, and make static.
604 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
606 (xtensa_arch_setup, xtensa_regs_info): New functions.
607 (the_low_target): Adjust.
608 (initialize_low_arch): New function.
609 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
610 (nios2_arch_setup): Set the current process'es tdesc.
611 (target_regsets): Rename to ...
612 (nios2_regsets): ... this.
613 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
614 (nios2_regs_info): New function.
615 (the_low_target): Adjust.
616 (initialize_low_arch): New function.
617 * linux-aarch64-low.c (tdesc_aarch64): Declare.
618 (aarch64_arch_setup): Set the current process'es tdesc.
619 (target_regsets): Rename to ...
620 (aarch64_regsets): ... this.
621 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
622 (aarch64_regs_info): New function.
623 (the_low_target): Adjust.
624 (initialize_low_arch): New function.
625 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
627 (target_regsets): Rename to ...
628 (tile_regsets): ... this.
629 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
630 (tile_regs_info): New function.
631 (tile_arch_setup): Set the current process'es tdesc.
632 (the_low_target): Adjust.
633 (initialize_low_arch): New function.
634 * spu-low.c (tdesc_spu): Declare.
635 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
636 * win32-arm-low.c (tdesc_arm): Declare.
637 (arm_arch_setup): New function.
638 (the_low_target): Install arm_arch_setup instead of
640 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
641 (init_windows_x86): Rename to ...
642 (i386_arch_setup): ... this. Set `win32_tdesc'.
643 (the_low_target): Adjust.
644 * win32-low.c (win32_tdesc): New global.
645 (child_add_thread): Don't create the thread cache here.
646 (do_initial_child_stuff): Set the new process'es tdesc.
647 * win32-low.h (struct target_desc): Forward declare.
648 (win32_tdesc): Declare.
649 * lynx-i386-low.c (tdesc_i386): Declare global.
650 (lynx_i386_arch_setup): Set `lynx_tdesc'.
651 * lynx-low.c (lynx_tdesc): New global.
652 (lynx_add_process): Set the new process'es tdesc.
653 * lynx-low.h (struct target_desc): Forward declare.
654 (lynx_tdesc): Declare global.
655 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
656 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
657 * nto-low.c (nto_tdesc): New global.
658 (do_attach): Set the new process'es tdesc.
659 * nto-low.h (struct target_desc): Forward declare.
660 (nto_tdesc): Declare.
661 * nto-x86-low.c (tdesc_i386): Declare.
662 (nto_x86_arch_setup): Set `nto_tdesc'.
664 2013-06-04 Gary Benson <gbenson@redhat.com>
666 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
667 to qSupported response when appropriate.
668 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
669 with nonzero-length annex.
670 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
671 arguments supplied in annex.
673 2013-05-31 Doug Evans <dje@google.com>
676 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
677 64 bits in 64-cross-32 environment.
679 2013-05-28 Pedro Alves <palves@redhat.com>
681 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
682 (aarch64-without-fpu.c): Delete rule.
683 * configure.srv (aarch64*-*-linux*): Remove references to
684 aarch64-without-fpu.o and aarch64-without-fpu.xml.
685 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
688 2013-05-24 Pedro Alves <palves@redhat.com>
690 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
691 instead of strchr/decode_address. Error if the range isn't split
692 with a ','. Don't assume there's be a ':' in the action.
694 2013-05-23 Yao Qi <yao@codesourcery.com>
695 Pedro Alves <palves@redhat.com>
697 * linux-low.c (lwp_in_step_range): New function.
698 (linux_wait_1): If the thread was range stepping and stopped
699 outside the stepping range, report the stop to GDB. Otherwise,
700 continue stepping. Add range stepping debug output.
701 (linux_set_resume_request): Copy the step range from the resume
703 (linux_supports_range_stepping): New.
704 (linux_target_ops) <supports_range_stepping>: Set to
705 linux_supports_range_stepping.
706 * linux-low.h (struct linux_target_ops)
707 <supports_range_stepping>: New field.
708 (struct lwp_info) <step_range_start, step_range_end>: New fields.
709 * linux-x86-low.c (x86_supports_range_stepping): New.
710 (the_low_target) <supports_range_stepping>: Set to
711 x86_supports_range_stepping.
712 * server.c (handle_v_cont): Handle 'r' action.
713 (handle_v_requests): Append ";r" if the target supports range
715 * target.h (struct thread_resume) <step_range_start,
716 step_range_end>: New fields.
717 (struct target_ops) <supports_range_stepping>:
719 (target_supports_range_stepping): New macro.
721 2013-05-17 Joel Brobecker <brobecker@adacore.com>
723 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
724 confusion in comment.
726 2013-05-17 Joel Brobecker <brobecker@adacore.com>
728 * lynx-low.c (struct process_info_private): New type.
729 (lynx_add_process): New function.
730 (lynx_create_inferior, lynx_attach): Replace calls to
731 add_process by calls to lynx_add_process.
732 (lynx_resume): If PTID is null, then try using
733 current_process()->private->last_wait_event_ptid.
735 (lynx_clear_inferiors): Delete. The contents of that function
736 has been inlined in lynx_mourn;
737 (lynx_wait_1): Save the ptid in the process's private data.
738 (lynx_mourn): Free the process' private data. Replace call
739 to lynx_clear_inferiors by call to clear_inferiors.
741 2013-05-17 Yao Qi <yao@codesourcery.com>
743 * i386-low.c (i386_length_and_rw_bits): Move the comment to
746 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
748 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
749 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
750 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
751 PT_TEXT_END_ADDR guards. Update comments.
752 (linux_target_op) <read_offsets>: Conditionally define to
753 linux_read_offsets if the target is UCLIBC and if it defines
754 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
756 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
757 Andrew Jenner <andrew@codesourcery.com>
759 * Makefile.in (SFILES): Add linux-nios2-low.c.
760 (clean): Add action to delete nios2-linux.c.
761 (nios2-linux.c): New rule.
762 * configure.srv: Add nios2*-*-linux*.
763 * linux-nios2-low.c: New.
765 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
767 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
769 2013-04-25 Hui Zhu <hui@codesourcery.com>
772 * ax.c (ax_printf): Add fflush.
774 2013-04-22 Tom Tromey <tromey@redhat.com>
776 * Makefile.in (SFILES): Add filestuff.c.
777 (OBS): Add filestuff.o.
778 (filestuff.o): New target.
779 * config.in, configure: Rebuild.
780 * configure.ac: Check for fdwalk, pipe2.
782 2013-04-17 Pedro Alves <palves@redhat.com>
784 * configure.ac (USE_THREAD_DB): Delete variable.
785 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
786 Don't AC_SUBST USE_THREAD_DB.
787 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
788 * config.in, configure: Regenerate.
790 2013-04-16 Pedro Alves <palves@redhat.com>
792 * linux-low.h (struct lwp_info) <thread_known>: Move under
793 the USE_THREAD_DB #ifdef.
795 2013-04-16 Pedro Alves <palves@redhat.com>
797 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
798 (linux-low.o): Delete rule.
799 * linux-low.h: Always include "gdb_thread_db.h" instead of
800 conditionally including thread_db.h.
801 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
804 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
806 * Makefile.in (install-only): Fix make install regression.
808 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
810 Convert man pages to texinfo, new gdbinit.5 texinfo page.
811 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
813 * gdbserver.1: Remove.
815 2013-03-22 Pedro Alves <palves@redhat.com>
817 * linux-low.c (handle_extended_wait): Don't call
818 linux_enable_event_reporting.
820 2013-03-15 Tony Theodore <tonyt@logyst.com>
823 * Makefile.in (SHELL): Use @SHELL@.
825 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
827 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
830 2013-03-13 Joel Brobecker <brobecker@adacore.com>
832 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
833 Remove extraneous NULL element.
835 2013-03-13 Yao Qi <yao@codesourcery.com>
837 * tracepoint.c (traceframe_read_tsv): Look for the last matched
838 'V' block in trace frame.
840 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
842 * target.h (struct target_ops): Add btrace ops.
843 (target_supports_btrace): New macro.
844 (target_enable_btrace): New macro.
845 (target_disable_btrace): New macro.
846 (target_read_btrace): New macro.
847 * gdbthread.h (struct thread_info): Add btrace field.
848 * server.c: Include btrace-common.h.
849 (handle_btrace_general_set): New function.
850 (handle_btrace_enable): New function.
851 (handle_btrace_disable): New function.
852 (handle_general_set): Call handle_btrace_general_set.
853 (handle_qxfer_btrace): New function.
854 (struct qxfer qxfer_packets[]): Add btrace entry.
855 * inferiors.c (remove_thread): Disable btrace.
856 * linux-low: Include linux-btrace.h.
857 (linux_low_enable_btrace): New function.
858 (linux_low_read_btrace): New function.
859 (linux_target_ops): Add btrace ops.
860 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
861 Add srv_linux_btrace=yes.
862 (x86_64-*-linux*): Add linux-btrace.o.
863 Add srv_linux_btrace=yes.
864 * configure.ac: Define HAVE_LINUX_BTRACE.
865 * config.in: Regenerated.
866 * configure: Regenerated.
868 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
870 * server.c (handle_qxfer): Preserve error message if -3 is
872 (qxfer): Document the -3 return value.
874 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
876 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
877 (linux_btrace_h): New variable.
878 (linux-btrace.o): New rule.
880 2013-03-08 Stan Shebs <stan@codesourcery.com>
881 Hafiz Abid Qadeer <abidh@codesourcery.com>
883 * tracepoint.c (trace_buffer_size): New global.
884 (DEFAULT_TRACE_BUFFER_SIZE): New define.
885 (init_trace_buffer): Change to one-argument function. Allocate
887 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
888 handle QTBuffer:size packet.
889 (cmd_bigqtbuffer_size): New function.
890 (initialize_tracepoint): Call init_trace_buffer with
891 DEFAULT_TRACE_BUFFER_SIZE.
892 * server.c (handle_query): Add QTBuffer:size in the
895 2013-03-07 Yao Qi <yao@codesourcery.com>
897 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
898 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
900 (cmd_qtsp): Adjust condition. Do post increment.
901 Set cur_action and cur_step_action back to 0.
903 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
906 * linux-low.c (linux_write_memory): Return early success if LEN is
909 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
911 * configure.srv: Add x86_64-*-cygwin* as target.
913 2013-02-28 Tom Tromey <tromey@redhat.com>
915 * configure.ac: Invoke AC_SYS_LARGEFILE.
916 * configure, config.in: Rebuild.
918 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
920 * win32-low.c: Throughout, fix format strings and casts of
921 printf-like functions to avoid type related warnings on all
923 (get_child_debug_event): Print dwDebugEventCode as hex since
924 that's how it's usually documented.
926 2013-02-28 Yao Qi <yao@codesourcery.com>
928 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
931 2013-02-27 Jiong Wang <jiwang@tilera.com>
933 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
934 (reg-tilegx32.c): New rule.
935 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
936 * linux-tile-low.c (tile_arch_setup): New function. Invoke
937 different register info initializer according to elf class.
938 (init_registers_tilgx32): New function. The tilegx32 register info
940 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
941 (tile_store_gregset): Likewise.
943 2013-02-27 Yao Qi <yao@codesourcery.com>
945 * server.c (process_point_options): Print debug message when
946 debug_threads is true.
948 2013-02-26 Yao Qi <yao@codesourcery.com>
950 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
952 2013-02-19 Pedro Alves <palves@redhat.com>
953 Kai Tietz <ktietz@redhat.com>
957 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
958 instead of strtoul to extract address from packet.
959 (process_serial_event) <'z'>: Likewise.
961 2013-02-18 Yao Qi <yao@codesourcery.com>
963 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
965 2013-02-14 Pedro Alves <palves@redhat.com>
969 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
970 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
972 2013-02-14 Pedro Alves <palves@redhat.com>
974 * tracepoint.c (cmd_qtdpsrc): Use savestring.
976 2013-02-14 Pedro Alves <palves@redhat.com>
978 * tracepoint.c (save_string): Delete.
979 (add_tracepoint_action): Use savestring instead of save_string.
981 2013-02-12 Pedro Alves <palves@redhat.com>
983 * linux-xtensa-low.c: Ditto.
984 * xtensa-xtregs.c: Ditto.
986 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
988 * thread-db.c (thread_db_get_tls_address): NULL pointer check
991 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
993 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
994 aarch64_num_wp_regs and aarch64_num_bp_regs to
995 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
997 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
999 * linux-aarch64-low.c (ps_get_thread_area): Replace
1000 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1002 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1003 Marcus Shawcroft <marcus.shawcroft@arm.com>
1004 Nigel Stephens <nigel.stephens@arm.com>
1005 Yufeng Zhang <yufeng.zhang@arm.com>
1007 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1008 (aarch64.c, aarch64-without-fpu.c): New targets.
1009 * configure.srv (aarch64*-*-linux*): New.
1010 * linux-aarch64-low.c: New file.
1012 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1014 * linux-low.c (handle_extended_wait, linux_create_inferior)
1015 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1016 (dequeue_one_deferred_signal, linux_resume_one_thread)
1017 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1018 (linux_tracefork_grandchild, linux_test_for_tracefork)
1019 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1020 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1021 where the argument is 0.
1023 2013-01-25 Yao Qi <yao@codesourcery.com>
1025 * event-loop.c: Include "queue.h".
1026 (gdb_event_p): New typedef.
1027 (struct gdb_event) <next_event>: Remove.
1028 (event_queue): Change to QUEUE(gdb_event_p).
1029 (async_queue_event): Remove.
1030 (gdb_event_xfree): New.
1031 (initialize_event_loop): New.
1032 (process_event): Use API from QUEUE.
1033 (wait_for_event): Likewise.
1034 * server.c (main): Call initialize_event_loop.
1035 * server.h (initialize_event_loop): Declare.
1037 2013-01-18 Yao Qi <yao@codesourcery.com>
1039 * ax.h (struct eval_agent_expr_context): New.
1040 (gdb_eval_agent_expr): Update declaration.
1041 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1042 TFRAME. Add new argument CTX.
1043 * server.h (struct eval_agent_expr_context): Declare.
1044 (agent_mem_read, agent_tsv_read): Update declaration.
1045 (agent_mem_read_string): Likewise.
1046 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1047 (add_traceframe_block): Add new argument TPOINT.
1048 Increase TPOINT->traceframe_usage.
1049 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1050 eval_tracepoint_agent_expr.
1051 (condition_true_at_tracepoint): Likewise.
1052 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1053 (agent_mem_read_string, agent_tsv_read): Likewise.
1055 2013-01-16 Yao Qi <yao@codesourcery.com>
1057 * linux-low.c (linux_resume_one_lwp): Don't check
1058 'lwp->bp_reinsert != 0'.
1060 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1061 Pedro Alves <palves@redhat.com>
1063 * lynx-low.c (ptrace_request_to_str): Define a temporary
1064 macro and use it to simplify this function's implementation.
1066 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1068 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1071 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1073 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1075 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1077 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1079 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1081 * lynx-low.c (lynx_resume): Use the resume_info parameter
1082 to determine the ptid for the lynx_ptrace call, unless
1083 it is equal to minus_one_ptid, in which case we use the
1084 ptid of the current_inferior.
1085 (lynx_wait_1): After having received a thread create/exit
1086 event, resume the inferior's execution using the signaling
1087 thread's ptid, rather than the old ptid.
1089 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1091 * lynx-low.c (lynx_resume): Delete variable ret.
1093 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1095 * gdbreplay.c (gdbreplay_version): Update copyright year.
1096 * server.c (gdbserver_version): Likewise.
1098 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1100 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1103 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1105 * lynx-low.c (ptrace_request_to_str): Add handling for
1108 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1110 * lynx-low.c (lynx_attach): Delete variable new_process.
1112 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1114 * lynx-low.c (lynx_create_inferior): Delete variable
1117 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1119 * lynx-low.c (ptrace_request_to_str): Do not handle
1120 PTRACE_GETTHREADLIST if this macro does not exist.
1122 2012-12-15 Yao Qi <yao@codesourcery.com>
1124 * Makefile.in (OBS): Add notif.o.
1125 * notif.c, notif.h: New.
1126 * server.c: Include "notif.h".
1127 (struct vstop_notif) <next>: Remove.
1129 (queue_stop_reply): Update.
1130 (push_event, send_next_stop_reply): Remove.
1131 (discard_queued_stop_replies): Update.
1132 (notif_stop): New variable.
1133 (handle_v_stopped): Remove.
1134 (handle_v_requests): Don't call handle_v_stopped. Call
1135 handle_ack_notif instead.
1136 (queue_stop_reply_callback): Call notif_event_enque instead
1137 of queue_stop_reply.
1138 (handle_status): Don't call send_next_stop_reply, call
1139 notif_write_event instead.
1140 (kill_inferior_callback): Likewise.
1141 (detach_or_kill_inferior_callback): Likewise.
1142 (main): Call initialize_notif.
1143 (process_serial_event): Call QUEUE_is_empty.
1144 (handle_target_event): Call notif_push instead of push event.
1145 * server.h (push_event): Remove declaration.
1147 2012-12-10 Tom Tromey <tromey@redhat.com>
1149 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1150 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1153 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1154 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1155 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1156 (amd64-linux-ipa.o, ax.o): Rewrite.
1157 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1158 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1159 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1160 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1161 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1162 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1163 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1164 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1165 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1166 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1167 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1168 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1169 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1170 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1171 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1172 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1173 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1174 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1175 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1176 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1177 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1178 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1179 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1180 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1181 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1182 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1183 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1184 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1185 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1186 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1187 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1188 (reg-tilegx.o): Remove.
1189 (all_object_files): New macro.
1190 Include .deps files.
1191 * aclocal.m4, configure: Rebuild.
1192 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1193 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1194 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1196 2012-12-05 Tom Tromey <tromey@redhat.com>
1199 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1201 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1203 * configure.ac: Check for linux/perf_event.h.
1204 * config.in: Regenerated.
1205 * configure: Regenerated.
1207 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1209 * hostio.c (handle_readlink): Decrease buffer size
1210 parameter passed to readlink by one byte.
1212 2012-11-26 Yao Qi <yao@codesourcery.com>
1214 * configure.ac (build_warnings): Append '-Wempty-body'.
1215 * configure: Regenerated.
1216 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1219 2012-11-15 Pierre Muller <muller@sourceware.org>
1221 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1222 * config.in: Regenerate.
1223 * configure: Regenerate.
1224 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1225 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1226 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1227 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1229 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1230 instead of <sys/wait.h> header.
1231 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1233 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1235 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1236 (various make rules): Remove -DGDBSERVER
1238 2012-11-09 Yao Qi <yao@codesourcery.com>
1240 * spu-low.c (current_ptid): Move it to ..
1241 * gdbthread.h: ... here. New.
1242 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1243 * server.c (myresume, process_serial_event): Likewise.
1244 * thread-db.c (thread_db_find_new_threads): Likewise.
1245 * tracepoint.c (run_inferior_command): Likewise.
1247 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1249 * server.c (handle_search_memory_1): Include access length in
1252 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1254 * linux-crisv32-low.c: Fix compile errors.
1256 2012-09-04 Yao Qi <yao@codesourcery.com>
1258 * tracepoint.c (cmd_qtsv): Adjust debug message.
1259 Don't check CUR_TPOINT.
1261 2012-08-28 Yao Qi <yao@codesourcery.com>
1263 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1264 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1265 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1266 Remove declarations of xmalloc, xreallloc, xstrdup and
1268 * Makefile.in (libiberty_h): New.
1269 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1270 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1272 2012-08-23 Yao Qi <yao@codesourcery.com>
1274 * server.h: Remove declaration of 'xsnprintf'.
1276 2012-08-22 Keith Seitz <keiths@redhat.com>
1278 * server.h: Include build-gnulib-gbserver/config.h.
1279 * gdbreplay.c: Likewise.
1281 2012-08-08 Doug Evans <dje@google.com>
1283 * Makefile.in (SFILES): Add gdb_vecs.c.
1284 (OBS): Add gdb_vecs.o.
1285 (gdb_vecs_h, host_defs_h): New variables.
1286 (thread-db.o): Add $(gdb_vecs_h) dependency.
1287 (gdb_vecs.o): New rule.
1288 * thread-db.c: #include "gdb_vecs.h".
1289 (thread_db_load_search): Use a vector to iterate over path elements.
1290 Handle text appearing after "$pdir".
1292 * configure.ac: Add check for strstr.
1293 * config.in: Regenerate.
1294 * configure: Regenerate.
1296 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1298 * hostio.c (handle_pread): If pread fails, fall back to attempting
1300 (handle_pwrite): Likewise for pwrite.
1302 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1304 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1305 between unsupported TYPE and unimplementable ADDR/LEN combination.
1306 (arm_insert_point): Act on new return value.
1308 2012-07-31 Pedro Alves <palves@redhat.com>
1310 * server.c (process_point_options): Only skip tokens if we find
1311 one that is unrecognized. Don't treat 'X' specially while
1312 skipping unrecognized tokens.
1314 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1316 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1317 to 4-byte-align HW breakpoint addresses for Thumb.
1319 2012-07-27 Yao Qi <yao@codesourcery.com>
1323 * server.h: Declare gdb_agent_about_to_close.
1324 * target.c (kill_inferior): Include "agent.h".
1325 New. Send command 'kill'.
1326 * target.h (kill_inferior): Removed macro.
1327 * tracepoint.c (gdb_agent_about_to_close): New.
1328 (gdb_agent_helper_thread): Handle command 'close'.
1329 Wait endlessly until the inferior stops.
1330 Install gdb_agent_remove_socket to atexit hook.
1331 (agent_socket_name): New static variable.
1332 (gdb_agent_socket_init): Replace local variable 'name' with
1333 'agent_socket_name'.
1334 (gdb_agent_remove_socket): New.
1336 2012-07-27 Yao Qi <yao@codesourcery.com>
1338 * server.c (process_point_options): Stop at 'X' when parsing.
1340 2012-07-19 Michael Eager <eager@eagercon.com>
1342 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1344 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1345 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1346 hardware breakpoint.
1348 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1350 * gdbserver/linux-low.c (initialize_low): Call
1351 linux_ptrace_init_warnings.
1353 2012-07-02 Doug Evans <dje@google.com>
1355 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1358 2012-07-02 Stan Shebs <stan@codesourcery.com>
1360 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1361 (ax.o): Add it to build rule.
1363 (OBS): Add format.o.
1364 (IPA_OBS): Add format.o.
1365 * server.c (handle_query): Claim support for breakpoint commands.
1366 (process_point_options): Add command case.
1367 (process_serial_event): Leave running if there are printfs in
1369 * mem-break.h (any_persistent_commands): Declare.
1370 (add_breakpoint_commands): Declare.
1371 (gdb_no_commands_at_breakpoint): Declare.
1372 (run_breakpoint_commands): Declare.
1373 * mem-break.c (struct point_command_list): New struct.
1374 (struct breakpoint): New field command_list.
1375 (any_persistent_commands): New function.
1376 (add_commands_to_breakpoint): New function.
1377 (add_breakpoint_commands): New function.
1378 (gdb_no_commands_at_breakpoint): New function.
1379 (run_breakpoint_commands): New function.
1380 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1382 * ax.c: Include format.h.
1383 (ax_printf): New function.
1384 (gdb_eval_agent_expr): Add printf opcode.
1386 2012-06-13 Yao Qi <yao@codesourcery.com>
1388 * server.c (start_inferior): Remove duplicated writes to fields
1389 'last_resume_kind' and 'last_status' of 'current_inferior'.
1391 2012-06-12 Yao Qi <yao@codesourcery.com>
1392 Pedro Alves <palves@redhat.com>
1394 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1396 * server.c (handle_v_cont): Extend comment.
1398 2012-06-11 Yao Qi <yao@codesourcery.com>
1400 * linux-low.c (linux_attach): Add 'static'.
1402 2012-06-06 Yao Qi <yao@codesourcery.com>
1404 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1406 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1408 Fix gcc -flto compilation warning.
1409 * server.c (main): Make variable multi_mode and attach volatile.
1411 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1413 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1414 if the platform doesn't know about it.
1416 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1418 * Makefile.in (SFILES): Add linux-tile-low.c.
1419 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1420 * configure.srv: Handle tilegx-*-linux*.
1421 * linux-tile-low.c: New file.
1423 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1425 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1427 2012-05-24 Pedro Alves <palves@redhat.com>
1431 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1433 2012-05-24 Pedro Alves <palves@redhat.com>
1437 Replace target_signal with gdb_signal throughout.
1439 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1441 * linux-low.c (linux_store_registers): Avoid the copying sequence
1442 when no data has been retrieved by ptrace.
1444 2012-05-22 Will Deacon <will.deacon@arm.com>
1446 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1447 Include asm/ptrace.h.
1448 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1451 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1453 * linux-low.c (linux_store_registers): Don't re-retrieve data
1454 with ptrace that has already been obtained from /proc. Always
1455 copy any data retrieved with ptrace to the buffer supplied.
1457 2012-05-11 Yao Qi <yao@codesourcery.com>
1458 Pedro Alves <palves@redhat.com>
1460 * linux-low.c (enum stopping_threads_kind): New.
1461 (stopping_threads): Change type to `enum stopping_threads_kind'.
1462 (handle_extended_wait): If stopping and suspending threads, leave
1463 the new_lwp suspended too.
1464 (linux_wait_for_event): Adjust.
1465 (stop_all_lwps): Set `stopping_threads' to
1466 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1467 whether we're suspending threads or just stopping them. Assert no
1470 2012-04-29 Yao Qi <yao@codesourcery.com>
1472 * server.h: Move some code to ...
1473 * gdbthread.h: ... here. New.
1474 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1475 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1476 (nto-low.o, win32-low.o): Likewise.
1477 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1478 * regcache.c, remote-utils.c, server.c: Likewise.
1479 * target.c, tracepoint.c, win32-low.c: Likewise.
1481 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1483 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1484 (PTRACE_ARG4_TYPE): Likewise.
1485 (PTRACE_XFER_TYPE): Likewise.
1486 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1487 ptrace to PTRACE_ARG3_TYPE.
1488 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1489 (PTRACE_ARG4_TYPE): Likewise.
1490 (PTRACE_XFER_TYPE): Likewise.
1491 (linux_detach_one_lwp): Cast fourth argument of
1492 ptrace to long then PTRACE_ARG4_TYPE.
1493 (regsets_fetch_inferior_registers): Cast third argument of
1494 ptrace to long then PTRACE_ARG3_TYPE.
1495 (regsets_store_inferior_registers): Likewise.
1497 2012-04-20 Pedro Alves <palves@redhat.com>
1499 * configure: Regenerate.
1501 2012-04-19 Pedro Alves <palves@redhat.com>
1503 * Makefile.in (GNULIB_BUILDDIR): New.
1504 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1505 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1506 (all, install-only, uninstall, clean-info, all-lib, clean): No
1507 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1508 (maintainer-clean realclean distclean): Use subdir_do.
1510 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1511 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1512 * acinclude.m4: Include acx_configure_dir.m4.
1513 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1514 calls. Call AC_PROG_RANLIB. Configure gnulib using
1517 (GNULIB_STDINT_H): Adjust.
1518 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1519 * gdbreplay.c: Include build-gnulib/config.h.
1520 * server.h: Likewise.
1521 * aclocal.m4: Regenerate.
1522 * config.in: Regenerate.
1523 * configure: Regenerate.
1525 2012-04-19 Pedro Alves <palves@redhat.com>
1527 * Makefile.in (LIBGNU, INCGNU): Adjust.
1528 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1529 (all, install-only, uninstall, clean-info, all-lib, clean)
1530 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1531 * configure.ac: Adjust AC_OUTPUT output.
1532 * aclocal.m4: Regenerate.
1533 * configure: Regenerate.
1535 2012-04-19 Pedro Alves <palves@redhat.com>
1537 * Makefile.in (generated_files): New.
1538 (server_h): Remove the explicit dependency on config.h, and depend
1539 on $generated_files.
1541 2012-04-19 Pedro Alves <palves@redhat.com>
1543 * Makefile.in (INCGNU): Add -Ignulib.
1545 2012-04-19 Pedro Alves <palves@redhat.com>
1547 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1548 (INCGNU): ... this, and spell out -I here.
1549 (GNULIB_LIB): Rename to ...
1551 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1553 2012-04-19 Pedro Alves <palves@redhat.com>
1555 * config.in: Regenerate.
1557 2012-04-19 Pedro Alves <palves@redhat.com>
1559 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1560 * server.h (memmem): Remove declaration.
1561 * config.in: Regenerate.
1562 * configure: Regenerate.
1564 2012-04-19 Yao Qi <yao@codesourcery.com>
1566 * Makefile.in (SFILES): Add common/vec.c.
1570 2012-04-19 Yao Qi <yao@codesourcery.com>
1572 * remote-utils.c (prepare_resume_reply): Replace with macro
1573 target_core_of_thread.
1574 * server.c (handle_qxfer_threads_proper): Likewise.
1575 * target.h (traget_core_of_thread): New macro.
1577 2012-04-18 Pedro Alves <palves@redhat.com>
1579 * aclocal.m4: Regenerate.
1580 * configure: Regenerate.
1582 2012-04-16 Yao Qi <yao@codesourcery.com>
1584 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1585 duplicated on address.
1587 2012-04-16 Yao Qi <yao@codesourcery.com>
1589 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1590 (struct tracepoint_action_ops) <send>: New field.
1591 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1592 (agent_expr_send, x_tracepoint_action_send): New.
1593 (l_tracepoint_action_send): New.
1594 (cmd_qtdp): Download and install tracepoint
1595 according to `use_agent'.
1596 (run_inferior_command): Add one more parameter `len'.
1598 (tracepoint_send_agent): New.
1599 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1601 2012-04-16 Yao Qi <yao@codesourcery.com>
1603 * tracepoint.c (download_tracepoints): Moved to ...
1604 (cmd_qtstart): ... here.
1606 2012-04-14 Yao Qi <yao@codesourcery.com>
1608 * tracepoint.c: Include inttypes.h.
1609 (struct collect_memory_action): Use sized types.
1610 (struct tracepoint): Likewise.
1611 (cmd_qtdp, stop_tracing): Update print specifiers.
1612 (cmd_qtp, response_tracepoint): Likewise.
1613 (collect_data_at_tracepoint): Likewise.
1614 (collect_data_at_step): Likewise.
1616 2012-04-14 Yao Qi <yao@codesourcery.com>
1618 Import gnulib module inttypes.
1619 * aclocal.m4, config.in, configure: Regenerated.
1621 2012-04-14 Yao Qi <yao@codesourcery.com>
1623 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1624 Makefile and config.status at last.
1626 2012-04-13 Yao Qi <yao@codesourcery.com>
1628 * tracepoint.c: Include stdint.h unconditionally.
1630 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1632 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1633 on BFD_HAVE_SYS_PROCFS_TYPE.
1634 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1635 * configure: Regenerate.
1636 * config.in: Likewise.
1638 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1640 * Makefile.in (clean): Also remove x32.c x32-linux.c
1641 x32-avx.c x32-avx-linux.c.
1642 (x32.o): New target.
1644 (x32-linux.o): Likewise.
1645 (x32-linux.c): Likewise.
1646 (x32-avx.o): Likewise.
1647 (x32-avx.c): Likewise.
1648 (x32-avx-linux.o): Likewise.
1649 (x32-avx-linux.c): Likewise.
1651 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1652 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1653 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1654 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1655 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1656 i386/x32-avx-linux.xml.
1658 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1659 (init_registers_x32_avx_linux): Likwise.
1660 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1661 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1663 2012-04-13 Pedro Alves <palves@redhat.com>
1665 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1666 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1667 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1668 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1671 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1673 * linux-x86-low.c (compat_x32_clock_t): New.
1674 (compat_x32_siginfo_t): Likewise.
1675 (compat_x32_siginfo_from_siginfo): Likewise.
1676 (siginfo_from_compat_x32_siginfo): Likewise.
1677 (linux_is_elf64): Likewise.
1678 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1679 and siginfo_from_compat_x32_siginfo for x32.
1680 (x86_arch_setup): Set linux_is_elf64.
1682 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1685 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1687 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1688 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1689 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1690 compatible with process.
1692 2012-04-12 Yao Qi <yao@codesourcery.com>
1694 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1695 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1696 (install-only, install-info, clean): Handle sub dir gnulib.
1697 (all-lib, am--refresh): New targets.
1698 (memmem.o): Remove target.
1699 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1700 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1701 (AC_REPLACE_FUNCS): Remove memmem.
1702 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1703 (AC_OUTPUT): Generate Makefile in gnulib/.
1704 * aclocal.m4, config.in, configure: Regenerated.
1706 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1708 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1710 2012-04-05 Pedro Alves <palves@redhat.com>
1712 -Werror=strict-aliasing
1714 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1717 2012-04-04 Pedro Alves <palves@redhat.com>
1719 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1720 (sparc_store_gregset_from_stack, sparc_store_gregset)
1721 (sparc_breakpoint_at): Fix formatting.
1723 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1725 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1727 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1728 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1729 * config.in: Regenerate.
1730 * configure: Likewise.
1732 2012-03-29 Pedro Alves <palves@redhat.com>
1734 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1735 Correct ptrace arguments.
1737 2012-03-28 Pedro Alves <palves@redhat.com>
1739 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1740 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1741 (IA64_FR1_REGNUM): New defines.
1742 (ia64_fetch_register): New.
1743 (the_low_target): Install it.
1744 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1746 * linux-low.c (linux_fetch_registers): Try the
1747 the_low_target.fetch_register hook first.
1749 * linux-arm-low.c (the_low_target): Adjust.
1750 * linux-bfin-low.c (the_low_target): Adjust.
1751 * linux-cris-low.c (the_low_target): Adjust.
1752 * linux-crisv32-low.c (the_low_target): Adjust.
1753 * linux-m32r-low.c (the_low_target): Adjust.
1754 * linux-m68k-low.c (the_low_target): Adjust.
1755 * linux-mips-low.c (the_low_target): Adjust.
1756 * linux-ppc-low.c (the_low_target): Adjust.
1757 * linux-s390-low.c (the_low_target): Adjust.
1758 * linux-sh-low.c (the_low_target): Adjust.
1759 * linux-sparc-low.c (the_low_target): Adjust.
1760 * linux-tic6x-low.c (the_low_target): Adjust.
1761 * linux-x86-low.c (the_low_target): Adjust.
1762 * linux-xtensa-low.c (the_low_target): Adjust.
1764 2012-03-26 Pedro Alves <palves@redhat.com>
1766 * server.c (handle_qxfer_libraries): Don't bail early if
1767 the_target->qxfer_libraries_svr4 is not NULL.
1769 2012-03-26 Pedro Alves <palves@redhat.com>
1771 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1773 2012-03-23 Pedro Alves <palves@redhat.com>
1775 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1776 "library-list-svr4" element's start tag when the the DSO list is
1779 2012-03-23 Pedro Alves <palves@redhat.com>
1781 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1782 a variable whose type size is the same as the inferior's pointer
1785 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1787 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1789 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1790 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1791 * linux-low.h: Include <signal.h>.
1792 (struct siginfo): Remove forward declaration.
1793 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1796 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1798 * .gitignore: Ignore more files.
1800 2012-03-19 Pedro Alves <palves@redhat.com>
1801 Jan Kratochvil <jan.kratochvil@redhat.com>
1803 * server.c (cont_thread, general_thread): Add describing comments.
1804 (start_inferior): Clear `cont_thread'.
1805 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1808 2012-03-15 Yao Qi <yao@codesourcery.com>
1810 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1812 (cmd_qtdp): ... here.
1814 2012-03-15 Yao Qi <yao@codesourcery.com>
1816 * tracepoint.c (struct tracepoint_action_ops): New.
1817 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1818 (m_tracepoint_action_download): New.
1819 (r_tracepoint_action_download): New.
1820 (x_tracepoint_action_download): New.
1821 (l_tracepoint_action_download): New.
1822 (add_tracepoint_action): Install `action->ops' according type.
1823 (download_tracepoint_1): Move code `download' function pointer
1824 of various tracepoint_action_ops.
1826 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1828 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1829 linux_ptrace_attach_warnings.
1831 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1833 * Makefile.in (linux-ptrace.o): New.
1834 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1835 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1836 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1837 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1838 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1840 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1842 2012-03-08 Yao Qi <yao@codesourcery.com>
1843 Pedro Alves <palves@redhat.com>
1845 Fix PR server/13392.
1846 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1848 * tracepoint.c (remove_tracepoint): New.
1849 (cmd_qtdp): Call remove_tracepoint when failed to install.
1851 2012-03-07 Pedro Alves <palves@redhat.com>
1853 * linux-low.c (get_detach_signal): New.
1854 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1855 Pass on pending signals to PTRACE_DETACH. Check the result of the
1857 * server.c (program_signals, program_signals_p): New.
1858 (handle_general_set): Handle QProgramSignals.
1859 * server.h (program_signals, program_signals_p): Declare.
1861 2012-03-05 Pedro Alves <palves@redhat.com>
1862 Jan Kratochvil <jan.kratochvil@redhat.com>
1864 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1867 2012-03-03 Yao Qi <yao@codesourcery.com>
1869 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1870 agent_look_up_symbols.
1872 2012-03-03 Yao Qi <yao@codesourcery.com>
1874 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1875 (linux-x86-low.o): Likewise.
1876 * server.h: Remove in_process_agent_loaded.
1877 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1881 2012-03-03 Yao Qi <yao@codesourcery.com>
1883 * tracepoint.c (gdb_agent_capability): New global.
1884 (in_process_agent_loaded_ust): Renamed to
1885 `in_process_agent_supports_ust'.
1887 (in_process_agent_supports_ust): Call agent_capability_check.
1888 (clear_installed_tracepoints): Assert that agent supports
1891 2012-03-03 Yao Qi <yao@codesourcery.com>
1893 * linux-low.c (linux_supports_agent): New.
1894 (linux_target_ops): Initialize field `supports_agent' with
1895 linux_supports_agent.
1896 * target.h (struct target_ops) <supports_agent>: New.
1897 (target_supports_agent): New macro.
1898 * server.c (handle_general_set): Handle packet 'QAgent'.
1899 (handle_query): Send `QAgent+'.
1900 * Makefile.in (server.o): Depends on agent.h.
1902 2012-03-03 Yao Qi <yao@codesourcery.com>
1904 * Makefile.in (OBS): Add agent.o.
1905 Add new rule for agent.o.
1906 Track dependence of tracepoint.c on agent.h.
1907 * tracepoint.c (run_inferior_command_1):
1908 (run_inferior_command): Call agent_run_command.
1909 (gdb_ust_connect_sync_socket): Deleted. Move it to
1911 (resume_thread, stop_thread): Likewise.
1912 (gdb_ust_socket_init): Renamed to ...
1913 (gdb_agent_socket_init): ... New.
1914 (gdb_ust_thread): Renamed to ...
1915 (gdb_agent_helper_thread): ... New.
1916 (gdb_ust_init): Move some code to ...
1917 (gdb_agent_init): ... here. New.
1918 [HAVE_UST]: Call gdb_ust_init.
1919 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1920 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1921 * config.in, configure: Regenerated.
1923 2012-03-02 Pedro Alves <palves@redhat.com>
1925 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1926 * linux-low.c (struct simple_pid_list): New.
1927 (stopped_pids): New a struct simple_pid_list pointer.
1928 (add_to_pid_list, pull_pid_from_list): New.
1929 (handle_extended_wait): Don't assume the first signal new children
1930 report is SIGSTOP. Adjust call to pull_pid_from_list.
1931 (linux_wait_for_lwp): Adjust.
1933 2012-03-02 Yao Qi <yao@codesourcery.com>
1935 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1938 2012-03-02 Yao Qi <yao@codesourcery.com>
1940 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1941 `stop_pc' and `tpoint'. Update caller.
1943 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1945 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1946 * linux-low.c (use_linux_regsets): New macro.
1947 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1948 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1949 (linux_register_in_regsets): New function.
1950 (usr_fetch_inferior_registers): Skip registers covered by
1952 (usr_store_inferior_registers): Likewise.
1953 (usr_fetch_inferior_registers): New macro.
1954 (usr_store_inferior_registers): Likewise.
1955 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1956 (linux_store_registers): Likewise.
1957 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1959 (init_registers_mips64_dsp_linux): Likewise.
1960 (init_registers_mips_linux): New macro.
1961 (init_registers_mips_dsp_linux): Likewise.
1962 (mips_dsp_num_regs): Likewise.
1963 (DSP_BASE, DSP_CONTROL): New fallback macros.
1964 (mips_base_regs): New macro.
1965 (mips_regmap): Use it. Fix the size.
1966 (mips_dsp_regmap): New variable.
1967 (mips_dsp_regset_bitmap): Likewise.
1968 (mips_arch_setup): New function.
1969 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1971 (mips_cannot_store_register): Likewise.
1972 (the_low_target): Update .arch_setup, .num_regs and .regmap
1973 initializers. Add .regset_bitmap initializer.
1974 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1976 * linux-bfin-low.c (the_low_target): Likewise.
1977 * linux-cris-low.c (the_low_target): Likewise.
1978 * linux-crisv32-low.c (the_low_target): Likewise.
1979 * linux-ia64-low.c (the_low_target): Likewise.
1980 * linux-m32r-low.c (the_low_target): Likewise.
1981 * linux-m68k-low.c (the_low_target): Likewise.
1982 * linux-ppc-low.c (the_low_target): Likewise.
1983 * linux-s390-low.c (the_low_target): Likewise.
1984 * linux-sh-low.c (the_low_target): Likewise.
1985 * linux-sparc-low.c (the_low_target): Likewise.
1986 * linux-tic6x-low.c (the_low_target): Likewise.
1987 * linux-x86-low.c (the_low_target): Likewise.
1988 * linux-xtensa-low.c (the_low_target): Likewise.
1989 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1990 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1991 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1993 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1994 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1996 2012-02-29 Yao Qi <yao@codesourcery.com>
1997 Pedro Alves <palves@redhat.com>
1999 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2000 `step_over_finished' is true.
2002 2012-02-27 Pedro Alves <palves@redhat.com>
2004 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2005 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2007 2012-02-27 Pedro Alves <palves@redhat.com>
2010 * linux-low.c (pid_is_stopped): New.
2011 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2013 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2015 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2018 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2020 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2022 2012-02-24 Luis Machado <lgustavo@codesourcery>
2024 * server.c (handle_query): Advertise support for target-side
2025 breakpoint condition evaluation.
2026 (process_point_options): New function.
2027 (process_serial_event): When inserting a breakpoint, check for
2028 a target-side condition that should be evaluated.
2030 * mem-break.c: Include regcache.h and ax.h.
2031 (point_cond_list_t): New data structure.
2032 (breakpoint) <cond_list>: New field.
2033 (find_gdb_breakpoint_at): Make non-static.
2034 (delete_gdb_breakpoint_at): Clear any target-side
2036 (clear_gdb_breakpoint_conditions): New function.
2037 (add_condition_to_breakpoint): Likewise.
2038 (add_breakpoint_condition): Likewise.
2039 (gdb_condition_true_at_breakpoint): Likewise.
2040 (gdb_breakpoint_here): Return result directly instead
2041 of going through a local variable.
2043 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2044 (clear_gdb_breakpoint_conditions): Likewise.
2045 (add_breakpoint_condition): Likewise.
2046 (gdb_condition_true_at_breakpoint): Likewise.
2048 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2049 (need_step_over_p): Take target-side breakpoint condition into
2052 2012-02-24 Luis Machado <lgustavo@codesourcery>
2054 * server.h: Include tracepoint.h.
2055 (agent_mem_read, agent_get_trace_state_variable_value,
2056 agent_set_trace_state_variable_value,
2057 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2058 get_set_tsv_func_addr): New prototypes.
2060 * ax.h: New include file.
2061 * ax.c: New source file.
2063 * tracepoint.c: Include ax.h.
2064 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2065 agent_expr, eval_result_type): Move to ax.h.
2066 (parse_agent_expr): Rename to ...
2067 (gdb_parse_agent_expr): ... this, make it non-static and move
2069 (unparse_agent_expr) Rename to ...
2070 (gdb_unparse_agent_expr): ... this, make it non-static and move
2072 (eval_agent_expr): Rename to ...
2073 (eval_tracepoint_agent_expr): ... this.
2074 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2075 forward declarations.
2076 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2077 (agent_get_trace_state_variable_value): New function.
2078 (agent_set_trace_state_variable_value): New function.
2079 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2080 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2081 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2082 (condition_true_at_tracepoint): Likewise.
2083 (parse_agent_expr): Rename to ...
2084 (gdb_parse_agent_expr): ... this and move to ax.c.
2085 (unparse_agent_expr): Rename to ...
2086 (gdb_unparse_agent_expr): ... this and move to ax.c.
2087 (gdb_agent_op_name): Move to ax.c.
2088 (eval_agent_expr): Rename to ...
2089 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2091 (eval_tracepoint_agent_expr): New function.
2092 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2094 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2096 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2097 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2098 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2099 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2100 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2101 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2102 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2103 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2104 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2105 (compile_bytecodes): Remove forward declaration.
2106 (is_goto_target): Move to ax.c.
2107 (compile_bytecodes): Move to ax.c and call
2108 agent_get_trace_state_variable_value (...) and
2109 agent_set_trace_state_variable_value (...).
2111 * Makefile.in: Update ax.c and IPA dependencies.
2113 2012-02-24 Pedro Alves <palves@redhat.com>
2115 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2116 (cmd_bigqtbuffer_circular): ... this. Only handle
2117 'QTBuffer:circular:'.
2118 (handle_tracepoint_general_set): Adjust.
2120 2012-02-16 Yao Qi <yao@codesourcery.com>
2122 * inferiors.c: Move code to ...
2123 * dll.c: .... here. New.
2124 * server.h: Declare clear_dlls.
2125 * Makefile.in (SFILES): Add dll.c.
2129 2012-02-11 Yao Qi <yao@codesourcery.com>
2131 * server.c: (handle_monitor_command): Add a new parameter
2133 (handle_query): Update caller.
2135 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2137 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2138 * configure, config.in: Regenerate.
2139 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2142 2012-02-02 Pedro Alves <palves@redhat.com>
2144 Try SIGKILL first, then PTRACE_KILL.
2145 * linux-low.c (linux_kill_one_lwp): New.
2146 (linux_kill_one_lwp): Rename to ...
2147 (kill_one_lwp_callback): ... this. Use the new
2150 2012-02-02 Pedro Alves <palves@redhat.com>
2152 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2155 2012-01-27 Pedro Alves <palves@redhat.com>
2157 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2158 (elf_64_file_p): Make static.
2159 (linux_pid_exe_is_elf_64_file): New.
2160 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2161 Delete declarations.
2162 (linux_pid_exe_is_elf_64_file): Declare.
2163 * linux-x86-low.c (x86_arch_setup): Use
2164 linux_pid_exe_is_elf_64_file.
2166 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2168 * linux-low.c (linux_wait_for_event_1): Rename to ...
2169 (linux_wait_for_event): ... here and merge it with former
2170 linux_wait_for_event - new variable wait_ptid, use it.
2171 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2173 2012-01-23 Pedro Alves <palves@redhat.com>
2175 * server.c (main): Avoid yet another case of infinite loop while
2176 detaching/killing after a longjmp.
2178 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2181 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2183 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2185 * hostio.c (handle_readlink): New function.
2186 (handle_vFile): Call it to handle "vFile:readlink" packets.
2188 2012-01-20 Pedro Alves <palves@redhat.com>
2189 Ulrich Weigand <ulrich.weigand@linaro.org>
2191 * server.c (handle_v_requests): Only support vAttach and vRun to
2192 start multiple processes when in extended protocol mode.
2194 2012-01-17 Pedro Alves <palves@redhat.com>
2196 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2197 memalign plus mprotect to allocate the scratch buffer.
2199 2012-01-13 Pedro Alves <palves@redhat.com>
2201 * server.c (attach_inferior): Clear `cont_thread'.
2203 2012-01-13 Pedro Alves <palves@redhat.com>
2205 * server.c (main): Avoid infinite loop while detaching/killing
2208 2012-01-09 Doug Evans <dje@google.com>
2210 * server.c (start_inferior): Set last_ptid in --wrapper case.
2212 2012-01-06 Yao Qi <yao@codesourcery.com>
2214 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2216 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2218 2012-01-04 Yao Qi <yao@codesourcery.com>
2220 * tracepoint.c (cmd_qtdp): Print debug message
2221 for static tracepoint.
2223 2012-01-04 Yao Qi <yao@codesourcery.com>
2225 * tracepoint.c (trace_vdebug): Differentiate debug message
2226 between gdbserver and IPA.
2228 2012-01-03 Yao Qi <yao@codesourcery.com>
2230 * tracepoint.c (tracepoint_was_hit): Don't collect for
2233 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2235 * terminal.h: Reformat copyright header.
2237 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2239 * server.c (gdbserver_version): Update copyright year.
2240 * gdbreplay.c (gdbreplay_version): Likewise.
2242 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2244 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2247 2011-12-18 Hui Zhu <teawater@gmail.com>
2248 * linux-low.c (linux_create_inferior): Save return value to ret.
2250 2011-12-18 Hui Zhu <teawater@gmail.com>
2252 * linux-low.c (linux_create_inferior): Save return value to ret.
2254 2011-12-16 Doug Evans <dje@google.com>
2256 * linux-low.c (linux_create_inferior): If stdio connection,
2257 redirect stdin from /dev/null, stdout to stderr.
2258 * remote-utils.c (remote_is_stdio): New static global.
2259 (remote_connection_is_stdio): New function.
2260 (remote_prepare): Handle stdio connection.
2261 (remote_open): Ditto.
2262 (remote_close): Don't close stdin for stdio connections.
2263 (read_prim,write_prim): New functions. Replace all calls to
2264 read/write to these.
2265 * server.c (main): Watch for "-" argument. Move call to
2266 remote_prepare before start_inferior.
2267 * server.h (STDIO_CONNECTION_NAME): New macro.
2268 (remote_connection_is_stdio): Declare.
2270 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2271 in debugging output.
2273 2011-12-15 Yao Qi <yao@codesourcery.com>
2275 * tracepoint.c: Include sys/syscall.h.
2276 (gdb_ust_thread): Remove preprocessor conditional.
2278 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2280 * linux-low.c (linux_detach_one_lwp): Call
2281 the_low_target.prepare_to_resume before detaching.
2283 2011-12-14 Yao Qi <yao@codesourcery.com>
2285 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2288 2011-12-14 Yao Qi <yao@codesourcery.com>
2290 * i386-low.c (i386_low_stopped_data_address): Initialize local
2293 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2297 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2298 DR_CONTROL unless necessary. Extend comments.
2299 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2300 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2302 2011-12-13 Yao Qi <yao@codesourcery.com>
2304 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2306 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2308 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2310 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2311 Print new debug message for such case.
2313 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2315 Fix overlapping memcpy.
2316 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2317 the read_inferior_memory transfer.
2318 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2319 write_inferior_memory transfer.
2320 (set_fast_tracepoint_jump): New variable buf. Use it for the
2321 read_inferior_memory and write_inferior_memory transfers.
2322 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2323 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2324 Use it for the write_inferior_memory transfer.
2325 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2328 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2330 * linux-low.c (fetch_register, store_register): Make code
2331 consistent, fix formatting.
2333 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2335 * linux-low.c (usr_store_inferior_registers): Factor out code
2336 to handle individual registers into...
2337 (store_register): ... this new function.
2339 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2341 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2342 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2343 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2344 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2345 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2346 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2347 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2348 (srv_xmlfiles): Add new XML files.
2350 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2352 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2353 (init_registers_s390_linux32v1): Add prototype.
2354 (init_registers_s390_linux32v2): Likewise.
2355 (init_registers_s390_linux64v1): Likewise.
2356 (init_registers_s390_linux64v2): Likewise.
2357 (init_registers_s390x_linux64v1): Likewise.
2358 (init_registers_s390x_linux64v2): Likewise.
2359 (s390_num_regs): Increment to 52.
2360 (s390_regmap): Add orig_r2 register.
2361 (s390_num_regs_3264): Increment to 68.
2362 (s390_regmap_3264): Add orig_r2 register.
2363 (s390_collect_ptrace_register): Handle orig_r2 register.
2364 (s390_supply_ptrace_register): Likewise.
2365 (s390_fill_last_break): New function.
2366 (s390_store_last_break): Likewise.
2367 (s390_fill_system_call): New function.
2368 (s390_store_system_call): Likewise.
2369 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2371 (s390_check_regset): New function.
2372 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2373 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2374 Update target_regsets for available register sets.
2376 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2377 Jan Kratochvil <jan.kratochvil@redhat.com>
2379 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2380 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2382 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2383 * linux-low.h (struct process_info_private): New member r_debug.
2384 * server.c (handle_qxfer_libraries): Call
2385 the_target->qxfer_libraries_svr4.
2386 (handle_qxfer_libraries_svr4): New function.
2387 (qxfer_packets): New entry "libraries-svr4".
2388 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2389 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2390 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2391 PACKET_qXfer_libraries_svr4.
2393 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2395 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2396 PSW address/mask between 8-byte and 16-byte formats.
2397 (s390_supply_ptrace_register): Likewise.
2398 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2399 basic addressing mode bit.
2401 2011-11-24 Stan Shebs <stan@codesourcery.com>
2403 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2405 2011-11-17 Stan Shebs <stan@codesourcery.com>
2407 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2408 (tracing_start_time): New global.
2409 (tracing_stop_time): New global.
2410 (tracing_user_name): New global.
2411 (tracing_notes): New global.
2412 (tracing_stop_note): New global.
2413 (cmd_qtstart): Set traceframe_usage, start_time.
2414 (stop_tracing): Set stop_time.
2415 (cmd_qtstatus): Report additional status.
2416 (cmd_qtp): New function.
2417 (handle_tracepoint_query): Call it.
2418 (cmd_qtnotes): New function.
2419 (handle_tracepoint_general_set): Call it.
2420 (get_timestamp): Rename from tsv_get_timestamp.
2422 2011-11-14 Stan Shebs <stan@codesourcery.com>
2423 Kwok Cheung Yeung <kcy@codesourcery.com>
2425 * linux-x86-low.c (small_jump_insn): New.
2426 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2427 trampoline and error message, build a trampoline and issue a small
2428 jump instruction to it.
2429 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2430 trampoline and error message.
2431 (x86_get_min_fast_tracepoint_insn_len): New.
2432 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2433 * linux-low.h (struct linux_target_ops): Add arguments to
2434 install_fast_tracepoint_jump_pad operation, add new operation.
2435 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2437 (linux_get_min_fast_tracepoint_insn_len): New function.
2438 (linux_target_op): Add new operation.
2439 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2440 (gdb_trampoline_buffer_end): Ditto.
2441 (gdb_trampoline_buffer_error): Ditto.
2442 (struct ipa_sym_addresses): Add fields for new IPA variables.
2443 (symbol_list): Add entries for new IPA variables.
2444 (struct tracepoint): Add fields to hold the address range of the
2445 trampoline used by the tracepoint.
2446 (trampoline_buffer_head): New static variable.
2447 (trampoline_buffer_tail): Ditto.
2448 (claim_trampoline_space): New function.
2449 (have_fast_tracepoint_trampoline_buffer): New function.
2450 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2452 (install_fast_tracepoint): Ditto, also add error buffer argument.
2453 (cmd_qtminftpilen): New function.
2454 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2455 (fast_tracepoint_from_trampoline_address): New function.
2456 (fast_tracepoint_collecting): Handle trampoline as part of jump
2458 (set_trampoline_buffer_space): New function.
2459 (initialize_tracepoint): Initialize new IPA variables.
2460 * target.h (struct target_ops): Add arguments to
2461 install_fast_tracepoint_jump_pad operation, add new
2462 get_min_fast_tracepoint_insn_len operation.
2463 (target_get_min_fast_tracepoint_insn_len): New.
2464 (install_fast_tracepoint_jump_pad): Add arguments.
2465 * server.h (IPA_BUFSIZ): Define.
2466 * linux-i386-ipa.c: Include extra header files.
2467 (initialize_fast_tracepoint_trampoline_buffer): New function.
2468 (initialize_low_tracepoint): Call it.
2469 * server.h (set_trampoline_buffer_space): Declare.
2470 (claim_trampoline_space): Ditto.
2471 (have_fast_tracepoint_trampoline_buffer): Ditto.
2473 2011-11-14 Yao Qi <yao@codesourcery.com>
2475 * server.c (handle_query): Handle InstallInTrace for qSupported.
2476 * tracepoint.c (add_tracepoint): Sort list.
2477 (install_tracepoint, download_tracepoint): New.
2478 (cmd_qtdp): Call them to install and download tracepoints.
2479 (sort_tracepoints): Removed.
2480 (cmd_qtstart): Update.
2482 2011-11-14 Yao Qi <yao@codesourcery.com>
2484 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2485 * mem-break.h: Declare.
2486 * tracepoint.c (cmd_qtstart): Move some code to ...
2487 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2489 (download_tracepoints): Move some code to ...
2490 (download_tracepoint_1): ... here. New.
2492 2011-11-08 Yao Qi <yao@codesourcery.com>
2494 * remote-utils.c (relocate_instruction): A comment fix.
2496 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2498 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2499 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2500 dr_status_mirror and dr_control_mirror from debug_reg_state.
2501 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2502 (i386_initial_stuff): Remove use of deleted globals.
2503 (i386_get_thread_context, i386_set_thread_context,
2504 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2505 from debug_reg_state.
2507 2011-11-05 Yao Qi <yao@codesourcery.com>
2509 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2510 address as TPOINT's.
2512 2011-11-02 Stan Shebs <stan@codesourcery.com>
2514 * tracepoint.c (agent_mem_read_string): New function.
2515 (eval_agent_expr): Call it for tracenz.
2516 * server.c (handle_query): Report support for tracenz.
2518 2011-11-02 Yao Qi <yao@codesourcery.com>
2520 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2522 2011-11-02 Yao Qi <yao@codesourcery.com>
2524 * target.h: Fix a typo in comment.
2526 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2528 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2529 clobber the breakpoints' shadows with fast tracepoint jumps.
2530 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2531 * target.c (write_inferior_memory): Also pass MYADDR down to
2534 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2536 * configure.ac: Check support for personality routine.
2537 * configure: Regenerate.
2538 * config.in: Likewise.
2539 * linux-low.c: Include <sys/personality.h>.
2540 Define ADDR_NO_RANDOMIZE if necessary.
2541 (linux_create_inferior): Disable address space randomization when
2542 forking inferior, if requested.
2543 (linux_supports_disable_randomization): New function.
2544 (linux_target_ops): Install it.
2545 * server.h (disable_randomization): Declare.
2546 * server.c (disable_randomization): New global variable.
2547 (handle_general_set): Handle QDisableRandomization.
2548 (handle_query): Likewise for qSupported.
2549 (main): Support --disable-randomization and --no-disable-randomization
2550 command line arguments.
2551 * target.h (struct target_ops): Add supports_disable_randomization.
2552 (target_supports_disable_randomization): New macro.
2554 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2556 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2558 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2559 [!PT_GETDSBT] (target_loadmap): New definition.
2560 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2561 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2562 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2563 and PT_GETDSBT to LINUX_LOADMAP.
2564 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2565 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2567 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2569 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2570 (arm_linux_hwbp_cap): New static variable.
2571 (arm_linux_get_hwbp_cap): Replace by ...
2572 (arm_linux_init_hwbp_cap): ... this new function.
2573 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2574 (arm_linux_get_hw_watchpoint_count): Likewise.
2575 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2576 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2577 (arm_prepare_to_resume): Use perror_with_name instead of error.
2579 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2581 * linux-arm-low.c: Include <signal.h>.
2582 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2583 (struct arm_linux_hwbp_cap): New data type.
2584 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2585 (struct arm_linux_hw_breakpoint): New data type.
2586 (MAX_BPTS, MAX_WPTS): Define.
2587 (struct arch_process_info, struct arch_lwp_info): New data types.
2588 (arm_linux_get_hwbp_cap): New function.
2589 (arm_linux_get_hw_breakpoint_count): Likewise.
2590 (arm_linux_get_hw_watchpoint_count): Likewise.
2591 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2592 (arm_hwbp_control_initialize): Likewise.
2593 (arm_hwbp_control_is_enabled): Likewise.
2594 (arm_hwbp_control_is_initialized): Likewise.
2595 (arm_hwbp_control_disable): Likewise.
2596 (arm_linux_hw_breakpoint_equal): Likewise.
2597 (arm_linux_hw_point_initialize): Likewise.
2598 (struct update_registers_data): New data structure.
2599 (update_registers_callback: New function.
2600 (arm_insert_point): Likewise.
2601 (arm_remove_point): Likewise.
2602 (arm_stopped_by_watchpoint): Likewise.
2603 (arm_stopped_data_address): Likewise.
2604 (arm_new_process): Likewise.
2605 (arm_new_thread): Likewise.
2606 (arm_prepare_to_resume): Likewise.
2607 (the_low_target): Register arm_insert_point, arm_remove_point,
2608 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2609 arm_new_thread, and arm_prepare_to_resume.
2611 2011-09-15 Stan Shebs <stan@codesourcery.com>
2613 * server.h (struct emit_ops): Add compare-goto fields.
2614 * tracepoint.c (gdb_agent_op_sizes): New table.
2615 (emit_eq_goto): New function.
2616 (emit_ne_goto): New function.
2617 (emit_lt_goto): New function.
2618 (emit_le_goto): New function.
2619 (emit_gt_goto): New function.
2620 (emit_ge_goto): New function.
2621 (is_goto_target): New function.
2622 (compile_bytecodes): Recognize special cases of compare-goto
2623 combinations and call specialized emitters for them.
2624 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2625 (amd64_emit_ne_goto): New function.
2626 (amd64_emit_lt_goto): New function.
2627 (amd64_emit_le_goto): New function.
2628 (amd64_emit_gt_goto): New function.
2629 (amd64_emit_ge_goto): New function.
2630 (amd64_emit_ops): Add the new functions.
2631 (i386_emit_eq_goto): New function.
2632 (i386_emit_ne_goto): New function.
2633 (i386_emit_lt_goto): New function.
2634 (i386_emit_le_goto): New function.
2635 (i386_emit_gt_goto): New function.
2636 (i386_emit_ge_goto): New function.
2637 (i386_emit_ops): Add the new functions.
2639 2011-09-08 Stan Shebs <stan@codesourcery.com>
2641 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2642 (i386_emit_epilogue): Restore %ebx.
2644 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2646 * server.c (step_thread): Remove definition.
2647 (process_serial_event): Don't handle Hs.
2648 * server.h (step_thread): Remove declaration.
2649 * target.c (set_desired_inferior): Remove use of step_thread.
2651 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2653 * linux-low.c: Include linux-procfs.h.
2654 (linux_attach_lwp_1): Update comments.
2655 (linux_attach): Scan for existing threads when attaching to a
2656 process that is the tgid.
2657 * Makefile.in: Update dependencies.
2659 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2661 * configure.srv: Add linux-procfs.o dependencies.
2663 2011-08-14 Yao Qi <yao@codesourcery.com>
2665 * target.h (struct target_ops): Fix indent.
2666 * win32-low.c (win32_target_ops): Fix comment.
2668 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2669 Yao Qi <yao@codesourcery.com>
2671 * Makefile.in (clean): Remove tic6x-*.c files.
2672 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2673 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2674 (tic6x-c64xp-linux.c): Likewise.
2675 * configure.srv: Add support for tic6x-*-uclinux.
2676 * linux-tic6x-low.c: New.
2677 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2679 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2680 Yao Qi <yao@codesourcery.com>
2682 * target.h (struct target_ops): Add read_loadmap.
2683 * linux-low.c (struct target_loadseg): New type.
2684 (struct target_loadmap): New type.
2685 (linux_read_loadmap): New function.
2686 (linux_target_ops): Add linux_read_loadmap.
2687 * server.c (handle_query): Support qXfer:fdpic:read packet.
2688 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2691 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2693 * win32-low.c: Include <stdint.h>.
2695 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2697 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2698 to the inferior here.
2699 (i386_remove_aligned_watchpoint): Ditto.
2700 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2701 fit part of the watchpoint in the debug registers.
2702 (i386_update_inferior_debug_regs): New.
2703 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2704 registers, and only update the inferior on success.
2705 (i386_low_remove_watchpoint): Ditto.
2707 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2709 * linux-low.c (compare_ints, unique, list_threads, show_process,
2710 linux_core_of_thread): Delete.
2711 (linux_target_ops): Change linux_core_of_thread to
2712 linux_common_core_of_thread.
2713 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2714 * utils.c (malloc_failure): Change type of argument.
2715 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2716 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2717 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2718 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2719 (IPA_OBJS): Add common-utils-ipa.o.
2720 (ptid_h, linux_osdata_h): New macros.
2721 (server_h): Add common/common-utils.h, common/xml-utils.h,
2722 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2724 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2725 ptid.o, buffer.o): New rules.
2726 (linux-low.o): Add common/linux-osdata.h as a dependency.
2727 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2728 * configure.ac: Add AC_HEADER_DIRENT check.
2729 * config.in: Regenerate.
2730 * configure: Regenerate.
2731 * remote-utils.c (xml_escape_text): Delete.
2732 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2733 buffer_xml_printf): Move to common/buffer.c.
2734 * server.c (main): Remove call to initialize_inferiors.
2735 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2736 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2737 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2738 internal_error, gdb_assert, gdb_assert_fail): Delete.
2739 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2740 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2742 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2743 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2744 initialize_inferiors): Delete.
2746 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2748 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2751 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2753 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2755 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2757 2011-05-26 Yao Qi <yao@codesourcery.com>
2759 * Makefile.in (thread-db.o): Track dependence to
2760 common/gdb_thread_db.h.
2761 * thread-db.c: include gdb_thread_db.h from right place.
2763 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2765 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2766 __FILE__ and __LINE__ to internal_error.
2768 2011-05-13 Doug Evans <dje@google.com>
2770 * thread-db.c (try_thread_db_load_from_sdir): New function.
2771 (try_thread_db_load_from_dir): New function.
2772 (thread_db_load_search): Handle $sdir, ignore $pdir.
2773 Remove trying of system directories if search of
2774 libthread-db-search-path fails, that is now done via $sdir.
2776 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2778 * server.c (handle_query): Add EnableDisableTracepoints to the list
2779 of supported features.
2780 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2782 (cmd_qtenable_disable): New.
2783 (cmd_qtstart): Install tracepoints even if disabled.
2784 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2785 receiving a QTEnable or QTDisable packet.
2786 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2787 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2789 (gdb_probe): Skip data collection if static tracepoint is disabled.
2791 2011-05-10 Doug Evans <dje@google.com>
2793 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2795 2011-05-04 Doug Evans <dje@google.com>
2797 * linux-low.c (linux_join): Skip process lookup.
2798 * spu-low.c (spu_join): Ditto.
2799 * server.c (join_inferiors_callback): Delete.
2800 (process_serial_event): For 'D' packet (detach) call join_inferior
2803 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2805 * README: Don't mention xscale*-*-linux*.
2806 * configure.srv (xscale*-*-linux*): Don't handle target.
2808 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2810 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2812 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2813 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2814 (i386_emit_void_call_2): Likewise.
2816 2011-04-26 Yao Qi <yao@codesourcery.com>
2818 * linux-low.c: Move common macros to linux-ptrace.h.
2819 Include linux-ptrace.h.
2820 * Makefile.in (linux_ptrace_h): New.
2821 (linux-low.o): Depends on linux-ptrace.h.
2823 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2825 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2826 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2827 (remote_prepare): New function with most of the TCP code from ...
2828 (remote_open): ... here. Detect PORT here unconditionally. Move also
2829 setting transport_is_reliable.
2830 * server.c (run_once): New variable.
2831 (gdbserver_usage): Document it.
2832 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2833 the first run if RUN_ONCE.
2834 * server.h (run_once, remote_prepare): New declarations.
2836 2011-04-19 Tom Tromey <tromey@redhat.com>
2838 * win32-low.c (handle_load_dll): Remove duplicate "the".
2840 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2842 Remove support for old Cygwin 1.5 versions.
2843 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2844 function to avoid warning.
2845 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2848 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2850 * gdbserver/server.h (Macro _): Define it if not available.
2852 2011-03-14 Michael Snyder <msnyder@vmware.com>
2854 * hostio.c (handle_close): Remove unnecessary null test.
2856 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2858 * Makefile.in (maintainer-clean realclean distclean): Remove
2859 "make ... subdir_do" command.
2861 2011-03-10 Michael Snyder <msnyder@vmware.com>
2863 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2865 * server.c (handle_v_run): Free alloced buffer on early return.
2867 2011-03-09 Yao Qi <yao@codesourcery.com>
2870 2011-03-04 Yao Qi <yao@codesourcery.com>
2872 * Makefile.in: Remove GNU make feature --directory.
2874 2011-03-05 Yao Qi <yao@codesourcery.com>
2876 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2877 (subdir_do): New make target. Copied from gdb/Makefile.
2878 (maintainer-clean, realclean, distclean, clean): Call corresponding
2879 make targets in common/Makefile.
2881 2011-02-11 Yao Qi <yao@codesourcery.com>
2883 * configure.ac: Call AC_PROG_RANLIB.
2884 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2885 * configure: Regenerate.
2887 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2889 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2891 2011-03-06 Yao Qi <yao@codesourcery.com>
2893 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2895 2011-03-05 Yao Qi <yao@codesourcery.com>
2897 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2898 (subdir_do): New make target. Copied from gdb/Makefile.
2899 (maintainer-clean, realclean, distclean, clean): Call corresponding
2900 make targets in common/Makefile.
2902 2011-03-04 Yao Qi <yao@codesourcery.com>
2904 * Makefile.in: Remove GNU make feature --directory.
2906 2011-03-04 Michael Snyder <msnyder@vmware.com>
2908 * server.c (queue_stop_reply): Call xmalloc not malloc.
2910 2011-03-02 Michael Snyder <msnyder@vmware.com>
2912 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2914 2011-02-28 Michael Snyder <msnyder@vmware.com>
2916 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2917 (cmd_qtframe): Ditto.
2918 (cmd_qtbuffer): Ditto.
2919 (cmd_bigqtbuffer): Ditto.
2921 * utils.c (decimal2str): Initialize 'width' to nine, then
2924 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2926 * hostio.c (require_data): Free *data, not data.
2928 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2930 * hostio.c (require_data): Use free, not xfree.
2932 2011-02-27 Michael Snyder <msnyder@vmware.com>
2934 * server.c (handle_query): Discard unused value.
2936 * hostio.c (require_data): Free malloc memory before returning
2939 2011-02-26 Michael Snyder <msnyder@vmware.com>
2941 * linux-low.c (list_threads): Call closedir for dirent.
2943 2011-02-27 Michael Snyder <msnyder@vmware.com>
2945 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2946 a case statement falls through.
2948 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2950 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2953 2011-02-26 Michael Snyder <msnyder@vmware.com>
2955 * utils.c (decimal2str): Eliminate dead code and dead param.
2956 (pulongest): Drop dead param from call to decimal2str.
2959 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2961 Revert the following patch (not approved yet):
2962 2011-02-21 Hui Zhu <teawater@gmail.com>
2963 * tracepoint.c (tp_printf): New function.
2964 (eval_agent_expr): Handle gdb_agent_op_printf.
2966 2011-02-21 Hui Zhu <teawater@gmail.com>
2968 * tracepoint.c (tp_printf): New function.
2969 (eval_agent_expr): Handle gdb_agent_op_printf.
2971 2011-02-18 Tom Tromey <tromey@redhat.com>
2973 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2974 (tracepoint.o): Likewise.
2975 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2976 (gdb_agent_op_names): Likewise.
2978 2011-02-18 Tom Tromey <tromey@redhat.com>
2980 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2981 gdb_agent_op_rot>: New constants.
2982 (gdb_agent_op_names): Add pick and roll.
2983 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2986 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2988 * aclocal.m4: Regenerated with aclocal-1.11.1.
2990 2011-02-14 Pedro Alves <pedro@codesourcery.com>
2992 * server.c (handle_qxfer_traceframe_info): New.
2993 (qxfer_packets): Register "traceframe-info".
2994 (handle_query): Report support for qXfer:traceframe-info:read+.
2995 * tracepoint.c (match_blocktype): New.
2996 (traceframe_find_block_type): Rename to ...
2997 (traceframe_walk_blocks): ... this. Add callback filter argument,
2999 (traceframe_find_block_type): New, reimplemented on top of
3000 traceframe_walk_blocks.
3001 (build_traceframe_info_xml): New.
3002 (traceframe_read_info): New.
3003 * server.h (traceframe_read_info): Declare.
3005 2011-02-11 Yao Qi <yao@codesourcery.com>
3007 * configure.ac: Call AC_PROG_RANLIB.
3008 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3009 * configure: Regenerate.
3011 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3013 * server.c (gdb_read_memory): Change return semantics to allow
3015 (handle_search_memory_1): Adjust.
3016 (process_serial_event) <'m' packet>: Handle partial transfers.
3017 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3019 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3021 * regcache.c (init_register_cache): Initialize
3022 regcache->register_status.
3023 (free_register_cache): Release regcache->register_status.
3024 (regcache_cpy): Copy register_status.
3025 (registers_to_string): Print 'x's for unavailable registers.
3026 (supply_register): Mark the register's status valid or
3027 unavailable, depending on whether a buffer was passed in or not.
3028 (supply_register_zeroed): New.
3029 (supply_regblock): Mark the registers' status valid or
3030 unavailable, depending on whether a buffer was passed in or not.
3031 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3032 (struct regcache): New `register_status' field.
3033 (supply_register_zeroed): Declare.
3034 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3035 supply_register_zeroed, rather than passing a NULL buffer to
3037 * tracepoint.c (fetch_traceframe_registers): Update comment.
3039 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3041 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3044 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3046 * server.h (decode_xfer_write): Change prototype.
3047 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3048 and don't extract the annex here.
3049 * server.c (decode_xfer_read): Remove `annex' parameter,
3050 and don't extract the annex here.
3052 (struct qxfer): New.
3053 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3054 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3055 (handle_qxfer_statictrace): New functions, abstracted out from
3056 handle_query, and made to use the struct qxfer interface.
3057 (handle_threads_qxfer_proper): Rename to ...
3058 (handle_qxfer_threads_proper): ... this.
3059 (handle_threads_qxfer): Rename to ...
3060 (handle_qxfer_threads): ... this. Adjust.
3061 (qxfer_packets): New array.
3062 (handle_qxfer): New function.
3063 (handle_query): Use handle_qxfer.
3065 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3067 * gdbreplay.c: Shorten lines of >= 80 columns.
3068 * linux-low.c: Ditto.
3069 * linux-ppc-low.c: Ditto.
3070 * linux-s390-low.c: Ditto.
3071 * linux-sparc-low.c: Ditto.
3072 * linux-x86-low.c: Ditto.
3073 * linux-xtensa-low.c: Ditto.
3074 * mem-break.c: Ditto.
3076 * regcache.h: Ditto.
3077 * remote-utils.c: Ditto.
3080 * thread-db.c: Ditto.
3081 * tracepoint.c: Ditto.
3083 * win32-low.h: Ditto.
3085 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3087 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3090 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3092 * server.c (gdbserver_version): Update copyright year in version
3094 * gdbreplay.c (gdbreplay_version): Ditto.
3096 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3098 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3099 * linux-bfin-low.c: New file.
3100 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3101 PT_DATA_ADDR for BFIN targets.
3102 * Makefile.in (SFILES): Add linux-bfin-low.c.
3103 (clean): Remove reg-bfin.c.
3104 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3105 * README: Mention supported Blackfin targets.
3107 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3109 * .gitignore: New file.
3111 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3113 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3115 2010-10-22 Jie Zhang <jie@codesourcery.com>
3117 * Makefile.in: Add FLAGS_TO_PASS variable.
3118 (install): Remove dependency of install-only and recursively
3119 invoke make for install-only.
3121 2010-10-04 Doug Evans <dje@google.com>
3123 * Makefile.in (uninstall): Use $(DESTDIR).
3125 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3129 * linux-x86-low.c (compat_siginfo_from_siginfo)
3130 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3131 si_code is < 0. Check for si_code == SI_TIMER before checking for
3134 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3136 * lynx-i386-low.c: New file.
3137 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3139 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3141 * lynx-low.c (ptrace_request_to_str): Remove handling for
3142 request values that have been removed in LynxOS 5.x.
3144 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3146 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3149 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3151 * configure.ac: Add --enable-inprocess-agent option.
3152 * configure: Rebuilt.
3154 2010-09-06 Yao Qi <yao@codesourcery.com>
3156 * linux-low.c (linux_kill): Remove unused variable.
3157 (linux_stabilize_threads): Likewise.
3158 * server.c (start_inferior): Likewise.
3159 (queue_stop_reply_callback): Likewise.
3160 * tracepoint.c (do_action_at_tracepoint): Likewise.
3162 2010-09-06 Yao Qi <yao@codesourcery.com>
3164 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3167 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3169 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3171 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3173 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3176 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3178 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3179 gdbserver/lynx-ppc-low.c: New files.
3180 * Makefile.in (lynx_low_h): New variable.
3181 (lynx-low.o, lynx-ppc-low.o): New rules.
3182 * configure.ac: On LynxOS, link with -lnetinet.
3183 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3184 * configure: regenerate.
3186 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3188 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3189 * configure.ac: Add check for vasprintf and vsnprintf.
3190 * configure, config.in: Regenerate.
3191 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3193 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3195 * gdbreplay.c: Move include of alloca.h up, next to include of
3197 * server.h: Add include of malloc.h.
3198 * mem-break.c: Remove include of malloc.h.
3199 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3201 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3203 * Makefile.in (memmem.o): Build with -Wno-error.
3205 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3207 * utils.c (xsnprintf): Make non-static.
3208 * server.h: Add xsnprintf declaration.
3209 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3210 replace calls to snprintf by calls to xsnprintf throughout.
3212 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3214 * configure.ac: Add configure check for alloca.
3215 * configure, config.in: Regenerate.
3216 * server.h: Include alloca.h if it exists.
3217 * gdbreplay.c: Include alloca.h if it exists.
3219 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3221 * linux-low.c (__SIGRTMIN): Define if not already defined.
3222 (linux_create_inferior): Check for __ANDROID__ rather than
3224 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3225 are already deferred.
3226 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3227 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3228 stopped and already has a pending signal to report.
3229 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3230 a pending signal to report or is moving out of a jump pad.
3231 (linux_init_signals): Check for __ANDROID__ rather than
3234 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3236 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3237 debug_threads check. Avoid a linear search when not doing debug
3240 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3242 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3243 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3244 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3245 (process_event): Change local fd's type to gdb_fildes_t.
3246 (create_file_handler): Adjust prototype.
3247 (delete_file_handler): Adjust prototype.
3248 (handle_file_event): Adjust prototype. Use pfildes.
3249 (create_file_event): Adjsut prototype.
3250 * remote-utils.c (remote_desc, listen_desc): Change type to
3252 * server.h: New gdb_fildes_t typedef.
3253 [USE_WIN32API]: Include winsock2.h.
3254 (delete_file_handler, add_file_handler): Adjust prototypes.
3256 * utils.c (pfildes): New.
3258 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3260 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3261 * configure: Regenerate.
3263 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3265 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3266 (linux_done_accessing_memory): ... this.
3267 (linux_target_ops): Adjust.
3268 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3269 * nto-low.c (nto_target_ops): Adjust comment.
3270 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3271 * spu-low.c (spu_target_ops): Adjust comment.
3272 * target.h (target_ops): Rename unprepare_to_access_memory field
3273 to done_accessing_memory.
3274 (unprepare_to_access_memory): Rename to ...
3275 (done_accessing_memory): ... this.
3277 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3279 * linux-low.c (linux_prepare_to_access_memory): New.
3280 (linux_unprepare_to_access_memory): New.
3281 (linux_target_ops): Install them.
3282 * server.c (read_memory): Rename to ...
3283 (gdb_read_memory): ... this. Use
3284 prepare_to_access_memory/prepare_to_access_memory.
3285 (write_memory): Rename to ...
3286 (gdb_write_memory): ... this. Use
3287 prepare_to_access_memory/prepare_to_access_memory.
3288 (handle_search_memory_1): Adjust.
3289 (process_serial_event): Adjust.
3290 * target.h (struct target_ops): New fields
3291 prepare_to_access_memory and unprepare_to_access_memory.
3292 (prepare_to_access_memory, unprepare_to_access_memory): New.
3293 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3294 prepare_to_access_memory/prepare_to_access_memory.
3295 * nto-low.c (nto_target_ops): Adjust.
3296 * spu-low.c (spu_target_ops): Adjust.
3297 * win32-low.c (win32_target_ops): Adjust.
3299 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3301 * Makefile.in (WARN_CFLAGS): Get it from configure.
3302 (WERROR_CFLAGS): New.
3303 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3304 * configure.ac: Introduce --enable-werror, which adds -Werror to
3305 the compiler command line. Enabled by default. Disable with
3306 --disable-werror. Add -Wdeclaration-after-statement
3307 Wpointer-arith and -Wformat-nonliteral to warning flags.
3308 * configure: Regenerate.
3310 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3312 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3314 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3316 * gdbreplay.c (remote_error): New.
3318 (expect): Use gdbchar. Check for error reading from GDB.
3319 Clarify sync error output.
3320 (play): Check for errors writing to GDB.
3321 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3322 * remote-utils.c (getpkt): Check for errors writing to the remote
3325 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3327 * linux-low.c (linux_wait_1): Move non-debugging code out of
3328 `debug_threads' control.
3330 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3332 * linux-low.c (linux_wait_1): Don't set last_status here.
3333 * server.c (push_event, queue_stop_reply_callback): Assert we're
3334 not pushing a TARGET_WAITKIND_IGNORE event.
3335 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3336 (myresume, handle_target_event): Set the thread's last_resume_kind
3337 and last_status from the target returned status.
3339 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3343 * linux-x86-low.c (update_debug_registers_callback): New.
3344 (i386_dr_low_set_addr): Use it.
3345 (i386_dr_low_get_addr): New.
3346 (i386_dr_low_set_control): Use update_debug_registers_callback.
3347 (i386_dr_low_get_control): New.
3348 (i386_dr_low_get_status): Adjust.
3349 * linux-low.c (linux_stop_lwp): New.
3350 * linux-low.h (linux_stop_lwp): Declare.
3352 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3353 argument instead of a i386_debug_reg_state.
3354 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3355 a i386_debug_reg_state.
3356 (i386_insert_aligned_watchpoint): Adjust.
3357 (i386_remove_aligned_watchpoint): Adjust.
3358 (i386_low_stopped_data_address): Read the debug registers from the
3359 inferior instead of from the mirrors.
3360 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3361 (i386_dr_low_get_addr): Declare.
3362 (i386_dr_low_get_control): Declare.
3363 (i386_dr_low_get_status): Change prototype.
3365 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3366 (i386_dr_low_get_addr): New.
3367 (i386_dr_low_get_control): New.
3368 (i386_dr_low_get_status): Adjust prototype. Return
3370 (i386_initial_stuff): Clear dr_status_mirror and
3372 (i386_get_thread_context): Adjust.
3373 (i386_set_thread_context): Adjust.
3374 (i386_thread_added): Adjust.
3376 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3378 * linux-low.h (linux_thread_area): Delete declaration.
3380 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3382 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3383 after its termination.
3385 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3387 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3388 (gdb_wants_all_stopped): Delete.
3389 (linux_wait_1): Don't call them.
3390 * server.c (handle_v_cont): Tag all threads as want-stopped.
3391 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3392 stopped as "client-wants-stopped".
3394 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3396 * Makefile.in (signals_h): New.
3397 (server_h): Depend on it.
3398 (server.o): Don't depend on $(signals_def).
3399 (signals.o): Depend on $(signals_def).
3401 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3403 * Makefile.in (signals_def): New.
3404 (server_h): Append include/gdb/signals.h and signals_def.
3405 (server.o): Append signals_def.
3407 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3409 * server.c (handle_target_event): Use target_signal_to_host for
3410 resume_info.sig initialization.
3411 * target.h (struct thread_resume) <sig>: New comment.
3413 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3415 * server.c (handle_query): strcpy() the returned string from paddress()
3416 instead of sprintf().
3417 * utils.c (paddress): Return phex_nz().
3419 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3421 * server.c (handle_v_cont): Call mourn_inferior if process
3423 (myresume): Likewise.
3425 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3427 Static tracepoints, and integration with UST.
3429 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3430 * mem-break.c (uninsert_all_breakpoints)
3431 (reinsert_all_breakpoints): New.
3432 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3433 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3434 (gdb_agent_ust_loaded, helper_thread_id)
3435 (gdb_agent_helper_thread_id): New macros.
3436 (struct ipa_sym_addresses): Add addr_ust_loaded,
3437 addr_helper_thread_id, addr_cmd_buf.
3438 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3439 (in_process_agent_loaded_ust): New.
3440 (write_e_ust_not_loaded): New.
3441 (maybe_write_ipa_ust_not_loaded): New.
3442 (struct collect_static_trace_data_action): New.
3443 (enum tracepoint_type) <static_tracepoint>: New.
3444 (struct tracepoint) <handle>: Mention static tracepoints.
3445 (struct static_tracepoint_ctx): New.
3446 (CMD_BUF_SIZE): New.
3447 (add_tracepoint_action): Handle static tracepoint actions.
3448 (unprobe_marker_at): New.
3449 (clear_installed_tracepoints): Handle static tracepoints.
3450 (cmd_qtdp): Handle static tracepoints.
3451 (probe_marker_at): New.
3452 (cmd_qtstart): Handle static tracepoints.
3453 (response_tracepoint): Handle static tracepoints.
3454 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3455 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3456 (get_context_regcache): Handle static tracepoints.
3457 (do_action_at_tracepoint): Handle static tracepoint actions.
3458 (traceframe_find_block_type): Handle static trace data blocks.
3459 (traceframe_read_sdata): New.
3460 (download_tracepoints): Download static tracepoint actions.
3461 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3462 (GDB_PROBE_NAME): New.
3467 (ust_marker_to_static_tracepoint): New.
3469 (collect_ust_data_at_tracepoint): New.
3470 (gdb_ust_probe): New.
3471 (UNIX_PATH_MAX, SOCK_DIR): New.
3472 (gdb_ust_connect_sync_socket): New.
3473 (resume_thread, stop_thread): New.
3474 (run_inferior_command): New.
3475 (init_named_socket): New.
3476 (gdb_ust_socket_init): New.
3477 (cstr_to_hexstr): New.
3479 (first_marker, next_marker): New.
3480 (response_ust_marker): New.
3481 (cmd_qtfstm, cmd_qtsstm): New.
3482 (unprobe_marker_at, probe_marker_at): New.
3483 (cmd_qtstmat, gdb_ust_thread): New.
3484 (gdb_ust_init): New.
3485 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3486 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3488 (x86_64_st_collect_regmap): New.
3489 (X86_64_NUM_ST_COLLECT_GREGS): New.
3490 (AMD64_RIP_REGNUM): New.
3491 (supply_static_tracepoint_registers): New.
3492 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3494 (i386_st_collect_regmap): New.
3495 (i386_NUM_ST_COLLECT_GREGS): New.
3496 (supply_static_tracepoint_registers): New.
3497 * server.c (handle_query): Handle qXfer:statictrace:read.
3498 <qSupported>: Report support for StaticTracepoints, and
3499 qXfer:statictrace:read features.
3500 * server.h (traceframe_read_sdata)
3501 (supply_static_tracepoint_registers): Declare.
3502 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3503 (unpack_varlen_hex): Include in IPA build.
3504 * Makefile.in (ustlibs, ustinc): New.
3505 (IPA_OBJS): Add remote-utils-ipa.o.
3506 ($(IPA_LIB)): Link -ldl and -lpthread.
3508 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3509 * config.in, configure: Regenerate.
3511 2010-06-20 Ian Lance Taylor <iant@google.com>
3512 Pedro Alves <pedro@codesourcery.com>
3514 * linux-x86-low.c (always_true): Delete.
3515 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3516 trying to fool the compiler with always_true.
3518 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3520 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3521 conditions in gdbserver.
3523 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3525 * spu-low.c (spu_read_memory): Wrap around local store limit.
3526 (spu_write_memory): Likewise.
3528 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3530 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3531 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3533 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3535 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3536 uses with LONGEST uses.
3538 2010-06-14 Stan Shebs <stan@codesourcery.com>
3539 Pedro Alves <pedro@codesourcery.com>
3543 * linux-x86-low.c: Include limits.h.
3548 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3549 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3550 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3551 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3552 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3553 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3554 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3555 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3556 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3557 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3558 (amd64_emit_void_call_2): New.
3559 (amd64_emit_ops): New.
3560 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3561 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3562 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3563 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3564 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3565 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3566 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3567 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3568 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3569 (i386_emit_stack_adjust, i386_emit_int_call_1)
3570 (i386_emit_void_call_2): New.
3571 (i386_emit_ops): New.
3572 (x86_emit_ops): New.
3573 (the_low_target): Install x86_emit_ops.
3574 * server.h (struct emit_ops): New.
3575 (get_raw_reg_func_addr): Declare.
3576 (current_insn_ptr, emit_error): Declare.
3577 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3578 (set_trace_state_variable_value): New defines.
3579 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3580 addr_get_trace_state_variable_value and
3581 addr_set_trace_state_variable_value.
3582 (symbol_list): New fields for get_raw_reg,
3583 get_trace_state_variable_value and set_trace_state_variable_value.
3584 (condfn): New typedef.
3585 (struct tracepoint): New field `compiled_cond'.
3586 (do_action_at_tracepoint): Clear compiled_cond.
3587 (get_trace_state_variable_value, set_trace_state_variable_value):
3589 (condition_true_at_tracepoint): If there's a compiled condition,
3591 (current_insn_ptr, emit_error): New globals.
3592 (struct bytecode_address): New.
3593 (get_raw_reg_func_addr): New.
3594 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3595 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3596 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3597 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3598 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3599 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3600 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3601 (compile_tracepoint_condition, compile_bytecodes): New.
3602 * target.h (emit_ops): Forward declare.
3603 (struct target_ops): New field emit_ops.
3604 (target_emit_ops): New.
3605 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3606 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3607 * linux-low.c (linux_emit_ops): New.
3608 (linux_target_ops): Install it.
3609 * linux-low.h (struct linux_target_ops): New field emit_ops.
3611 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3613 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3614 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3616 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3617 Stan Shebs <stan@codesourcery.com>
3619 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3620 (all): Depend on $(extra_libraries).
3621 (install-only): Install the IPA.
3622 (IPA_OBJS, IPA_LIB): New.
3623 (clean): Remove the IPA lib.
3624 (IPAGENT_CFLAGS): New.
3625 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3626 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3627 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3628 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3629 * configure.ac: Check for atomic builtins support in the compiler.
3630 (IPA_DEPFILES, extra_libraries): Define.
3631 * configure.srv (ipa_obj): Add description.
3632 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3633 (i[34567]86-*-linux*): Set ipa_obj.
3634 (x86_64-*-linux*): Set ipa_obj.
3635 * linux-low.c (stabilizing_threads): New.
3636 (supports_fast_tracepoints): New.
3637 (linux_detach): Stabilize threads before detaching.
3638 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3639 the lwp is either not stabilizing, or is moving out of a jump pad.
3640 (linux_fast_tracepoint_collecting): New.
3641 (maybe_move_out_of_jump_pad): New.
3642 (enqueue_one_deferred_signal): New.
3643 (dequeue_one_deferred_signal): New.
3644 (linux_wait_for_event_1): If moving out of a jump pad, defer
3645 pending signals to later.
3646 (linux_stabilize_threads): New.
3647 (linux_wait_1): Check if threads need moving out of jump pads, and
3649 (stuck_in_jump_pad_callback): New.
3650 (move_out_of_jump_pad_callback): New.
3652 (linux_resume_one_lwp): Handle moving out of jump pads.
3653 (linux_set_resume_request): Dequeue deferred signals.
3654 (need_step_over_p): Also step over fast tracepoint jumps.
3655 (start_step_over): Also uninsert fast tracepoint jumps.
3656 (finish_step_over): Also reinsert fast tracepoint jumps.
3657 (linux_install_fast_tracepoint_jump): New.
3658 (linux_target_ops): Install linux_stabilize_threads and
3659 linux_install_fast_tracepoint_jump_pad.
3660 * linux-low.h (linux_target_ops) <get_thread_area,
3661 install_fast_tracepoint_jump_pad>: New fields.
3662 (struct lwp_info) <collecting_fast_tracepoint,
3663 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3664 (linux_get_thread_area): Declare.
3665 * linux-x86-low.c (jump_insn): New.
3666 (x86_get_thread_area): New.
3667 (append_insns): New.
3669 (amd64_install_fast_tracepoint_jump_pad): New.
3670 (i386_install_fast_tracepoint_jump_pad): New.
3671 (x86_install_fast_tracepoint_jump_pad): New.
3672 (the_low_target): Install x86_get_thread_area and
3673 x86_install_fast_tracepoint_jump_pad.
3674 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3675 (struct fast_tracepoint_jump): New.
3676 (fast_tracepoint_jump_insn): New.
3677 (fast_tracepoint_jump_shadow): New.
3678 (find_fast_tracepoint_jump_at): New.
3679 (fast_tracepoint_jump_here): New.
3680 (delete_fast_tracepoint_jump): New.
3681 (set_fast_tracepoint_jump): New.
3682 (uninsert_fast_tracepoint_jumps_at): New.
3683 (reinsert_fast_tracepoint_jumps_at): New.
3684 (set_breakpoint_at): Use write_inferior_memory.
3685 (uninsert_raw_breakpoint): Use write_inferior_memory.
3686 (check_mem_read): Mask out fast tracepoint jumps.
3687 (check_mem_write): Mask out fast tracepoint jumps.
3688 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3689 (set_fast_tracepoint_jump): Declare.
3690 (delete_fast_tracepoint_jump)
3691 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3692 (reinsert_fast_tracepoint_jumps_at): Declare.
3693 * regcache.c: Don't compile many functions when building the
3694 in-process agent library.
3695 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3696 the register buffer in the heap.
3697 (free_register_cache): If the register buffer isn't owned by the
3698 regcache, don't free it.
3699 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3700 pre-existing register caches.
3701 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3703 (convert_ascii_to_int): : Constify `from' parameter type.
3704 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3705 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3706 the needed buffer in-place.
3707 (relocate_instruction): New.
3708 * server.c (handle_query) <qSymbols>: If the target supports
3709 tracepoints, give it a chance of looking up symbols. Report
3710 support for fast tracepoints.
3711 (handle_status): Stabilize threads.
3712 (process_serial_event): Adjust.
3713 * server.h (struct fast_tracepoint_jump): Forward declare.
3714 (struct process_info) <fast_tracepoint_jumps>: New field.
3715 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3716 (decode_X_packet, decode_M_packet): Adjust.
3717 (relocate_instruction): Declare.
3718 (in_process_agent_loaded): Declare.
3719 (tracepoint_look_up_symbols): Declare.
3720 (struct fast_tpoint_collect_status): Declare.
3721 (fast_tracepoint_collecting): Declare.
3722 (force_unlock_trace_buffer): Declare.
3723 (handle_tracepoint_bkpts): Declare.
3724 (initialize_low_tracepoint)
3725 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3726 * target.h (struct target_ops) <stabilize_threads,
3727 install_fast_tracepoint_jump_pad>: New fields.
3728 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3729 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3730 [HAVE_STDINT_H]: Include stdint.h.
3731 (trace_debug_1): Rename to ...
3732 (trace_vdebug): ... this.
3733 (trace_debug): Rename to ...
3734 (trace_debug_1): ... this. Add `level' parameter.
3736 (ATTR_USED, ATTR_NOINLINE): New.
3737 (IP_AGENT_EXPORT): New.
3738 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3739 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3740 (about_to_request_buffer_space, trace_buffer_is_full)
3741 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3742 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3743 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3744 (traceframe_write_count, traceframes_created)
3745 (trace_state_variables)
3746 New renaming defines.
3747 (struct ipa_sym_addresses): New.
3748 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3750 (ipa_sym_addrs): New.
3751 (all_tracepoint_symbols_looked_up): New.
3752 (in_process_agent_loaded): New.
3753 (write_e_ipa_not_loaded): New.
3754 (maybe_write_ipa_not_loaded): New.
3755 (tracepoint_look_up_symbols): New.
3756 (debug_threads) [IN_PROCESS_AGENT]: New.
3757 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3758 (UNKNOWN_SIDE_EFFECTS): New.
3759 (stop_tracing): New.
3760 (flush_trace_buffer): New.
3761 (stop_tracing_bkpt): New.
3762 (flush_trace_buffer_bkpt): New.
3763 (read_inferior_integer): New.
3764 (read_inferior_uinteger): New.
3765 (read_inferior_data_pointer): New.
3766 (write_inferior_data_pointer): New.
3767 (write_inferior_integer): New.
3768 (write_inferior_uinteger): New.
3769 (struct collect_static_trace_data_action): Delete.
3770 (enum tracepoint_type): New.
3771 (struct tracepoint) <type>: New field `type'.
3772 <actions_str, step_actions, step_actions_str>: Only include in
3774 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3775 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3776 (tracepoints): Use IP_AGENT_EXPORT.
3777 (last_tracepoint): Don't include in the IPA.
3778 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3779 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3780 (alloced_trace_state_variables): New.
3781 (trace_state_variables): Use IP_AGENT_EXPORT.
3782 (traceframe_t): Delete unused variable.
3783 (circular_trace_buffer): Don't include in the IPA.
3784 (trace_buffer_start): Delete.
3785 (struct trace_buffer_control): New.
3786 (trace_buffer_free): Delete.
3787 (struct ipa_trace_buffer_control): New.
3788 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3789 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3791 (trace_buffer_ctrl): New.
3792 (TRACE_BUFFER_CTRL_CURR): New.
3793 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3794 Reimplement as macros.
3795 (trace_buffer_wrap): Delete.
3796 (traceframe_write_count, traceframe_read_count)
3797 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3798 (struct tracepoint_hit_ctx) <type>: New field.
3799 (struct fast_tracepoint_ctx): New.
3800 (memory_barrier): New.
3802 (record_tracepoint_error): Update atomically in the IPA.
3803 (clear_inferior_trace_buffer): New.
3804 (about_to_request_buffer_space): New.
3805 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3806 updating the same buffer.
3807 (add_tracepoint): Default the tracepoint's type to trap
3808 tracepoint, and orig_size to -1.
3809 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3811 (create_trace_state_variable): New parameter `gdb'. Handle it.
3812 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3813 (cmd_qtdp): Handle fast tracepoints.
3815 (max_jump_pad_size): New.
3816 (gdb_jump_pad_head): New.
3817 (get_jump_space_head): New.
3818 (claim_jump_space): New.
3819 (sort_tracepoints): New.
3820 (MAX_JUMP_SIZE): New.
3821 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3823 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3824 support. Upload fast traceframes, and delete internal IPA
3826 (stop_tracing_handler): New.
3827 (flush_trace_buffer_handler): New.
3828 (cmd_qtstop): Upload fast tracepoints.
3829 (response_tracepoint): Handle fast tracepoints.
3830 (tracepoint_finished_step): Upload fast traceframes. Set the
3831 tracepoint hit context's tracepoint type.
3832 (handle_tracepoint_bkpts): New.
3833 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3834 type. Add comment about fast tracepoints.
3835 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3836 non-existing action_str field.
3837 (get_context_regcache): Handle fast tracepoints.
3838 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3840 (fast_tracepoint_from_jump_pad_address): New.
3841 (fast_tracepoint_from_ipa_tpoint_address): New.
3842 (collecting_t): New.
3843 (force_unlock_trace_buffer): New.
3844 (fast_tracepoint_collecting): New.
3847 (write_inferior_data_ptr): New.
3848 (target_tp_heap): New.
3849 (target_malloc): New.
3850 (download_agent_expr): New.
3852 (download_tracepoints): New.
3853 (download_trace_state_variables): New.
3854 (upload_fast_traceframes): New.
3855 (IPA_FIRST_TRACEFRAME): New.
3856 (IPA_NEXT_TRACEFRAME_1): New.
3857 (IPA_NEXT_TRACEFRAME): New.
3858 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3859 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3860 (gdb_jump_pad_buffer_end): New.
3861 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3862 (initialize_tracepoint): Adjust.
3863 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3864 buffer. Initialize the low module.
3865 * utils.c (PREFIX, TOOLNAME): New.
3866 (malloc_failure): Use PREFIX.
3867 (error): In the IPA, an error causes an exit.
3868 (fatal, warning): Use PREFIX.
3869 (internal_error): Use TOOLNAME.
3870 (NUMCELLS): Increase to 10.
3871 * configure, config.in: Regenerate.
3873 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3875 * server.c (handle_query) <qSupported>: Do two passes over the
3876 qSupported string to avoid nesting strtok.
3878 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3880 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3882 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3884 * configure: Regenerate.
3885 * proc-service.list: New.
3887 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3889 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3892 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3894 * gdbreplay.c (remote_open): Check error return from socket() call by
3895 its equality to -1 not by it being negative.
3896 * remote-utils.c (remote_open): Likewise.
3898 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3900 * config.h: Regenerate.
3902 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3904 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3905 doesn't provide PTRACE_GET_THREAD_AREA.
3907 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3909 * linux-m68k-low.c: Include <asm/ptrace.h>
3910 (ps_get_thread_area): Implement.
3912 2010-05-03 Doug Evans <dje@google.com>
3914 * event-loop.c (struct callback_event): New struct.
3915 (callback_list): New global.
3916 (append_callback_event, delete_callback_event): New functions.
3917 (process_callback): New function.
3918 (start_event_loop): Call it.
3919 * remote-utils.c (NOT_SCHEDULED): Define.
3920 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3921 moved out of readchar.
3922 (readchar): Rewrite. Call reschedule before returning.
3923 (reset_readchar): New function.
3924 (remote_close): Call it.
3925 (process_remaining, reschedule): New functions.
3926 * server.h (callback_handler_func): New typedef.
3927 (append_callback_event, delete_callback_event): Declare.
3929 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3931 * proc-service.c (ps_pglobal_lookup): Use
3932 thread_db_look_up_one_symbol.
3933 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3934 parameter. Use it instead of all_symbols_looked_up.
3935 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3937 (all_symbols_looked_up): Don't declare.
3938 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3939 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3941 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3942 Set all_symbols_looked_up here.
3943 (thread_db_look_up_one_symbol): New.
3944 (thread_db_get_tls_address): Adjust.
3945 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3946 thread_db object on the heap, and tentatively set it in the
3948 (thread_db_init): Don't set all_symbols_looked_up here.
3949 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3951 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3953 * linux-low.c (linux_kill, linux_detach): Adjust.
3954 (status_pending_p_callback): Remove redundant statement. Check
3955 for !TARGET_WAITIKIND_IGNORE, instead of
3956 TARGET_WAITKIND_STOPPED.
3957 (handle_tracepoints): Make sure LWP is locked. Adjust.
3958 (linux_wait_for_event_1): Adjust.
3959 (linux_cancel_breakpoints): New.
3960 (unsuspend_one_lwp): New.
3961 (unsuspend_all_lwps): New.
3962 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3963 (send_sigstop_callback): Change return type to int, add new
3964 `except' parameter and handle it.
3965 (suspend_and_send_sigstop_callback): New.
3966 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3967 pass them down. If SUSPEND, also increment the lwp's suspend
3969 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3970 (need_step_over_p): Don't consider suspended LWPs.
3971 (start_step_over): Adjust.
3972 (proceed_one_lwp): Change return type to int, add new `except'
3973 parameter and handle it.
3974 (unsuspend_and_proceed_one_lwp): New.
3975 (proceed_all_lwps): Use find_inferior instead of
3977 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3978 also decrement the suspend count of LWPs. Pass `except' down,
3979 instead of hacking its suspend count.
3980 (linux_pause_all): Add `freeze' parameter. Adjust.
3981 (linux_unpause_all): New.
3982 (linux_target_ops): Install linux_unpause_all.
3983 * server.c (handle_status): Adjust.
3984 * target.h (struct target_ops): New fields `unpause_all' and
3985 `cancel_breakpoints'. Add new parameter to `pause_all'.
3986 (pause_all): Add new `freeze' parameter.
3988 (cancel_breakpoints): New.
3989 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3991 (cmd_qtstart): Pause threads.
3992 (stop_tracing): Pause threads, and cancel breakpoints.
3993 * win32-low.c (win32_target_ops): Adjust.
3995 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3997 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3998 the inferior right away from here...
3999 (linux_wait_1): ... to here, and adjust to check the thread's
4000 last_resume_kind instead of the lwp's step or stop_expected flags.
4002 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4004 * README: Use consistent `GDB' and `GDBserver' spellings.
4006 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4008 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4009 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4010 (linux_detach_one_lwp): Assume the lwp is stopped.
4011 (any_thread_of): Delete.
4012 (linux_detach): Stop all lwps here. Don't blindly delete all
4014 (delete_lwp_callback): New.
4015 (linux_mourn): Delete all lwps of the process that is gone.
4016 (linux_wait_1): Don't delete the last lwp of the process here.
4017 * mem-break.h (mark_breakpoints_out): Declare.
4018 * mem-break.c (mark_breakpoints_out): New.
4019 (free_all_breakpoints): Use it.
4020 * server.c (handle_target_event): If the process is gone, mark
4022 * thread-db.c (struct thread_db) <create_bp>: New field.
4023 (thread_db_enable_reporting): Fix prototype. Store a thread event
4024 breakpoint reference in the thread_db struct.
4025 (thread_db_load_search): Clear the thread_db object.
4026 (try_thread_db_load_1): Ditto.
4027 (switch_to_process): New.
4028 (disable_thread_event_reporting): Use it.
4029 (remove_thread_event_breakpoints): New.
4030 (thread_db_detach, thread_db_mourn): Use it.
4032 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4034 * linux-low.c (linux_enable_event_reporting): New.
4035 (linux_wait_for_event_1, handle_extended_wait): Use it.
4037 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4039 * linux-low.c (linux_kill_one_lwp, linux_kill)
4040 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4041 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4042 SIGSTOP even if the LWP is stopped.
4043 (send_sigstop_callback): New.
4044 (stop_all_lwps): Use send_sigstop_callback instead.
4045 (linux_resume_one_thread): Adjust.
4046 (proceed_one_lwp): Still proceed an LWP that the client has
4047 requested to stop, if we haven't reported it as stopped yet. Make
4048 sure that LWPs the client want stopped, have a pending SIGSTOP.
4050 2010-04-26 Doug Evans <dje@google.com>
4052 * server.c (handle_general_set): Make static.
4054 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4055 Print received char after testing for error/eof instead of before.
4056 (input_interrupt): Tweak comment.
4058 2010-04-23 Doug Evans <dje@google.com>
4060 * server.c (start_inferior): Print inferior argv if --debug.
4062 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4064 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4065 * nto-x86-low.c: Include server.h
4067 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4069 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4070 be consistent with other sources of this directory.
4071 (init_registers_amd64): Correct name of source file of this function
4074 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4076 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4079 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4081 * win32-i386-low.c: Add 64-bit support.
4082 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4083 (init_registers_amd64): Declare.
4084 (mappings): Add 64-bit version of array.
4085 (init_windows_x86): New function.
4086 (the_low_target): Change init_arch field to init_windows_x86.
4088 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4090 * win32-low.c: Adapt to support also 64-bit architecture.
4091 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4092 (get_image_name): Use SIZE_T type for local variable `done'.
4093 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4094 (toolhelp_get_dll_name): Idem.
4095 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4096 Use uintptr_t typecast to avoid warning.
4097 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4098 (handle_exception): Use phex_nz to avoid warning.
4099 (win32_wait): Remove unused local variable `process'.
4101 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4103 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4106 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4108 * configure.ac: Use `ws2_32' library for srv_mingw.
4109 * configure: Regenerate.
4110 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4111 * remote-utils.c: Likewise.
4113 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4115 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4116 if __x86_64__ is defined.
4118 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4120 * configure: Regenerate.
4122 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4124 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4125 * target.h (target_ops): New get_tib_address field.
4126 * win32-low.h (win32_thread_info): Add thread_local_base field.
4127 * win32-low.c (child_add_thread): Add tlb argument.
4128 Set thread_local_base field to TLB.
4129 (get_child_debug_event): Adapt to child_add_thread change.
4130 (win32_get_tib_address): New function.
4131 (win32_target_ops): Set get_tib_address field to
4132 win32_get_tib_address.
4133 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4135 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4137 * linux-low.c (linux_mourn): Also remove the process.
4138 * server.c (handle_target_event): Don't remove the process here.
4139 * nto-low.c (nto_mourn): New.
4140 (nto_target_ops): Install it.
4141 * spu-low.c (spu_mourn): New.
4142 (spu_target_ops): Install it.
4143 * win32-low.c (win32_mourn): New.
4144 (win32_target_ops): Install it.
4146 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4148 * server.h (buffer_xml_printf): Remove redundant `;'.
4150 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4152 * regcache.c (set_register_cache): Invalidate regcaches before
4153 changing the register cache layout.
4154 (regcache_invalidate_one): Allow a NULL regcache.
4155 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4156 regcaches before changing the register cache layout or the target
4159 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4161 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4162 variable warning on Linux/x86-64.
4164 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4166 GDBserver disconnected tracing support.
4168 * linux-low.c (linux_remove_process): Delete.
4169 (add_lwp): Don't set last_resume_kind here.
4170 (linux_kill): Use `mourn'.
4171 (linux_detach): Use `thread_db_detach', and `mourn'.
4173 (linux_attach_lwp_1): Adjust comment.
4174 (linux_attach): last_resume_kind moved the thread_info; adjust.
4175 (status_pending_p_callback): Adjust.
4176 (linux_wait_for_event_1): Adjust.
4177 (count_events_callback, select_singlestep_lwp_callback)
4178 (select_event_lwp_callback, cancel_breakpoints_callback)
4179 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4180 (proceed_one_lwp): Adjust.
4181 (linux_async): Add debug output.
4182 (linux_thread_stopped): New.
4183 (linux_pause_all): New.
4184 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4186 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4187 (thread_db_free): Delete declaration.
4188 (thread_db_detach, thread_db_mourn): Declare.
4189 * thread-db.c (thread_db_init): Use thread_db_mourn.
4190 (thread_db_free): Delete, split in two.
4191 (disable_thread_event_reporting): New.
4192 (thread_db_detach): New.
4193 (thread_db_mourn): New.
4195 * server.h (struct thread_info) <last_resume_kind>: New field.
4196 <attached>: Add comment.
4197 <gdb_detached>: New field.
4198 (handler_func): Change return type to int.
4199 (handle_serial_event, handle_target_event): Ditto.
4200 (gdb_connected): Declare.
4202 (disconnected_tracing): Declare.
4203 (stop_tracing): Declare.
4205 * server.c (handle_query) <qSupported>: Report support for
4206 disconnected tracing.
4207 (queue_stop_reply_callback): Account for running threads.
4208 (gdb_wants_thread_stopped): New.
4209 (gdb_wants_all_threads_stopped): New.
4210 (gdb_reattached_process): New.
4211 (handle_status): Clear the `gdb_detached' flag of all processes.
4212 In all-stop, stop all threads.
4213 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4214 (process_serial_event): If the remote connection breaks, or if an
4215 exit was forced with "monitor exit", force an event loop exit.
4216 Handle disconnected tracing on detach.
4217 (handle_serial_event): Adjust.
4218 (handle_target_event): If GDB isn't connected, forward events back
4219 to the inferior, unless the last process exited, in which case,
4220 exit gdbserver. Adjust interface.
4222 * remote-utils.c (remote_open): Don't block in accept. Instead
4223 register an event loop source on the listen socket file
4224 descriptor. Refactor bits into ...
4225 (listen_desc): ... this new global.
4226 (gdb_connected): ... this new function.
4227 (enable_async_notification): ... this new function.
4228 (handle_accept_event): ... this new function.
4229 (remote_close): Clear remote_desc.
4231 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4233 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4235 (mourn_inferior): Define.
4236 (target_process_qsupported): Avoid the dangling else problem.
4237 (thread_stopped): Define.
4238 (pause_all): Define.
4239 (target_waitstatus_to_string): Declare.
4240 * target.c (target_waitstatus_to_string): New.
4242 * tracepoint.c (tracing): Make extern.
4243 (disconnected_tracing): New.
4244 (stop_tracing): Make extern. Handle tracing stops due to GDB
4246 (cmd_qtdisconnected): New.
4247 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4248 (handle_tracepoint_general_set): Handle QTDisconnected.
4250 * event-loop.c (event_handler_func): Change return type to int.
4251 (process_event): Bail out if the event handler wants the event
4253 (handle_file_event): Ditto.
4254 (start_event_loop): Bail out if the event handler wants the event
4257 * nto-low.c (nto_target_ops): Adjust.
4258 * spu-low.c (spu_wait): Don't remove the process here.
4259 (spu_target_ops): Adjust.
4260 * win32-low.c (win32_wait): Don't remove the process here.
4261 (win32_target_ops): Adjust.
4263 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4265 * regcache.c (realloc_register_cache): Invalidate inferior's
4266 regcache before recreating it.
4268 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4270 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4272 2010-04-09 Stan Shebs <stan@codesourcery.com>
4273 Pedro Alves <pedro@codesourcery.com>
4275 * server.h (LONGEST): New.
4276 (struct thread_info) <while_stepping>: New field.
4277 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4279 (initialize_tracepoint, handle_tracepoint_general_set)
4280 (handle_tracepoint_query, tracepoint_finished_step)
4281 (tracepoint_was_hit, release_while_stepping_state_list):
4282 (current_traceframe): Declare.
4283 * server.c (handle_general_set): Handle tracepoint packets.
4285 (write_memory): New.
4286 (handle_search_memory_1): Use read_memory.
4287 (handle_query): Report support for conditional tracepoints, trace
4288 state variables, and tracepoint sources. Handle tracepoint
4290 (main): Initialize the tracepoints module.
4291 (process_serial_event): Handle traceframe reads/writes.
4293 * linux-low.c (handle_tracepoints): New.
4294 (linux_wait_1): Call it.
4295 (linux_resume_one_lwp): Handle while-stepping.
4296 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4297 (linux_target_ops): Install them.
4298 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4300 * linux-x86-low.c (x86_supports_tracepoints): New.
4301 (the_low_target). Install it.
4303 * mem-break.h (delete_breakpoint): Declare.
4304 * mem-break.c (delete_breakpoint): Make external.
4306 * target.h (struct target_ops): Add `supports_tracepoints',
4307 `read_pc', and `write_pc' fields.
4308 (target_supports_tracepoints): Define.
4309 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4312 * regcache.h (struct regcache) <registers_owned>: New field.
4313 (init_register_cache, regcache_cpy): Declare.
4314 (regcache_read_pc, regcache_write_pc): Declare.
4315 (register_cache_size): Declare.
4316 (supply_regblock): Declare.
4317 * regcache.c (init_register_cache): New.
4318 (new_register_cache): Use it.
4319 (regcache_cpy): New.
4320 (register_cache_size): New.
4321 (supply_regblock): New.
4322 (regcache_read_pc, regcache_write_pc): New.
4324 * tracepoint.c: New.
4326 * Makefile.in (OBS): Add tracepoint.o.
4327 (tracepoint.o): New rule.
4329 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4331 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4333 (i386-mmx.c): Likewise.
4334 (i386-mmx-linux.o): Likewise.
4335 (i386-mmx-linux.c): Likewise.
4337 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4338 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4339 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4340 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4342 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4343 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4344 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4346 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4348 * Makefile.in (clean): Updated.
4350 (i386-avx.c): Likewise.
4351 (i386-avx-linux.o): Likewise.
4352 (i386-avx-linux.c): Likewise.
4353 (amd64-avx.o): Likewise.
4354 (amd64-avx.c): Likewise.
4355 (amd64-avx-linux.o): Likewise.
4356 (amd64-avx-linux.c): Likewise.
4358 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4359 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4360 (srv_amd64_regobj): Add amd64-avx.o.
4361 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4362 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4363 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4364 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4365 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4366 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4367 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4369 * i387-fp.c: Include "i386-xstate.h".
4371 (i387_cache_to_xsave): Likewise.
4372 (i387_xsave_to_cache): Likewise.
4373 (x86_xcr0): Likewise.
4375 * i387-fp.h (i387_cache_to_xsave): Likewise.
4376 (i387_xsave_to_cache): Likewise.
4377 (x86_xcr0): Likewise.
4379 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4380 * linux-crisv32-low.c (target_regsets): Likewise.
4381 * linux-m68k-low.c (target_regsets): Likewise.
4382 * linux-mips-low.c (target_regsets): Likewise.
4383 * linux-ppc-low.c (target_regsets): Likewise.
4384 * linux-s390-low.c (target_regsets): Likewise.
4385 * linux-sh-low.c (target_regsets): Likewise.
4386 * linux-sparc-low.c (target_regsets): Likewise.
4387 * linux-xtensa-low.c (target_regsets): Likewise.
4389 * linux-low.c: Include <sys/uio.h>.
4390 (regsets_fetch_inferior_registers): Support nt_type.
4391 (regsets_store_inferior_registers): Likewise.
4392 (linux_process_qsupported): New.
4393 (linux_target_ops): Add linux_process_qsupported.
4395 * linux-low.h (regset_info): Add nt_type.
4396 (linux_target_ops): Add process_qsupported.
4398 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4400 (init_registers_i386_avx_linux): New.
4401 (init_registers_amd64_avx_linux): Likewise.
4402 (xmltarget_i386_linux_no_xml): Likewise.
4403 (xmltarget_amd64_linux_no_xml): Likewise.
4404 (PTRACE_GETREGSET): Likewise.
4405 (PTRACE_SETREGSET): Likewise.
4406 (x86_fill_xstateregset): Likewise.
4407 (x86_store_xstateregset): Likewise.
4408 (use_xml): Likewise.
4409 (x86_linux_update_xmltarget): Likewise.
4410 (x86_linux_process_qsupported): Likewise.
4411 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4412 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4413 init_registers_i386_linux here. Call
4414 x86_linux_update_xmltarget.
4415 (the_low_target): Add x86_linux_process_qsupported.
4417 * server.c (handle_query): Call target_process_qsupported.
4419 * target.h (target_ops): Add process_qsupported.
4420 (target_process_qsupported): New.
4422 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4424 * inferiors.c (add_thread): Set last_status kind to
4425 TARGET_WAITKIND_IGNORE.
4426 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4427 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4428 (linux_wait_1): Move `thread' local definition to block that uses
4429 it. Don't NULL initialize `event_child'.
4430 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4431 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4432 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4434 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4436 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4437 an extended waitstatus, or by a watchpoint.
4438 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4439 thread was stepping or has been stopped by a watchpoint.
4441 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4443 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4444 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4445 of another, then delete the previous, and validate all
4447 (validate_inserted_breakpoint): New.
4448 (delete_disabled_breakpoints): New.
4449 (validate_breakpoints): New.
4450 (check_mem_read): Validate breakpoints before trusting their
4451 shadow. Delete disabled breakpoints.
4452 (check_mem_write): Validate breakpoints before trusting they
4453 should be inserted. Delete disabled breakpoints.
4454 * mem-break.h (validate_breakpoints):
4455 * server.c (handle_query): Validate breakpoints when we see a
4458 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4460 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4461 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4462 if we could tell there's a GDB breakpoint at stop_pc.
4463 (need_step_over_p): Don't do a step over if we find a GDB
4464 breakpoint at the resume PC.
4466 * mem-break.c (struct raw_breakpoint): New.
4467 (enum bkpt_type): New type `gdb_breakpoint'.
4468 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4469 fields. New field `raw'.
4470 (find_raw_breakpoint_at): New.
4471 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4473 (set_breakpoint_at): Adjust.
4474 (delete_raw_breakpoint): New.
4475 (release_breakpoint): New.
4476 (delete_breakpoint): Rename to...
4477 (delete_breakpoint_1): ... this. Add proc parameter. Use
4478 release_breakpoint. Return ENOENT.
4479 (delete_breakpoint): Reimplement.
4480 (find_breakpoint_at): Delete.
4481 (find_gdb_breakpoint_at): New.
4482 (delete_breakpoint_at): Delete.
4483 (set_gdb_breakpoint_at): New.
4484 (delete_gdb_breakpoint_at): New.
4485 (gdb_breakpoint_here): New.
4486 (set_reinsert_breakpoint): Use release_breakpoint.
4487 (uninsert_breakpoint): Rename to ...
4488 (uninsert_raw_breakpoint): ... this.
4489 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4490 (reinsert_raw_breakpoint): Change parameter type to
4492 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4494 (check_breakpoints): Adjust. Use release_breakpoint.
4495 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4496 (breakpoint_inserted_here): Ditto.
4497 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4498 Don't trust the breakpoint's shadow if it is not inserted.
4499 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4500 (delete_all_breakpoints): Adjust.
4501 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4502 use delete_breakpoint_1.
4504 * mem-break.h (breakpoints_supported): Delete declaration.
4505 (set_gdb_breakpoint_at): Declare.
4506 (gdb_breakpoint_here): Declare.
4507 (delete_breakpoint_at): Delete.
4508 (delete_gdb_breakpoint_at): Declare.
4510 * server.h (struct raw_breakpoint): Forward declare.
4511 (struct process_info): New field `raw_breakpoints'.
4513 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4516 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4518 * linux-low.c (status_pending_p_callback): Fix comment.
4519 (linux_wait_for_event_1): Move most of the internal breakpoint
4520 handling from here...
4521 (linux_wait_1): ... to here.
4522 (count_events_callback): New.
4523 (select_singlestep_lwp_callback): New.
4524 (select_event_lwp_callback): New.
4525 (cancel_breakpoints_callback): New.
4526 (select_event_lwp): New.
4527 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4528 priority to all LWPs that have had events that should be reported
4529 to the client. Cancel breakpoints when about to reporting the
4530 event to the client, not while stopping lwps. No longer cancel
4531 finished single-steps here.
4532 (cancel_finished_single_step): Delete.
4533 (cancel_finished_single_steps): Delete.
4535 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4537 * mem-break.c (enum bkpt_type): New.
4538 (struct breakpoint): New field `type'.
4539 (set_breakpoint_at): Change return type to struct breakpoint
4540 pointer. Set type to `other_breakpoint' by default.
4541 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4542 in the breakpoint list.
4543 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4544 (reinsert_breakpoint): Rename to ...
4545 (reinsert_raw_breakpoint): ... this.
4546 (reinsert_breakpoints_at): Adjust.
4547 * mem-break.h (struct breakpoint): Declare.
4548 (set_breakpoint_at): Change return type to struct breakpoint
4551 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4553 * server.c (handle_query): Assign, not compare.
4555 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4557 Teach linux gdbserver to step-over-breakpoints.
4559 * linux-low.c (can_hardware_single_step): New.
4560 (supports_breakpoints): New.
4561 (handle_extended_wait): If stopping threads, read the stop pc of
4564 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4565 low target doesn't support retrieving the PC.
4566 (add_lwp): Set last_resume_kind to resume_continue.
4567 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4568 (linux_attach): Don't clear stop_expected. Set the lwp's
4569 last_resume_kind to resume_stop.
4570 (linux_detach_one_lwp): Don't check for removed breakpoints.
4571 (check_removed_breakpoint): Delete.
4572 (status_pending_p): Rename to ...
4573 (status_pending_p_callback): ... this. Don't check for removed
4574 breakpoints. Don't consider threads that are stopped from GDB's
4576 (linux_wait_for_lwp): Always read the stop_pc here.
4577 (cancel_breakpoint): New.
4578 (step_over_bkpt): New global.
4579 (linux_wait_for_event_1): Implement stepping over breakpoints.
4580 (gdb_wants_lwp_stopped): New.
4581 (gdb_wants_all_stopped): New.
4582 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4583 single-step traps here. Store the thread's last reported target
4585 (send_sigstop): Don't clear stop_expected. Always set it,
4587 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4588 (cancel_finished_single_step): New.
4589 (cancel_finished_single_steps): New.
4590 (wait_for_sigstop): Don't cancel finished single-step traps here.
4591 (linux_resume_one_lwp): Don't check for removed breakpoints.
4592 Don't set `step' on non-hardware step archs.
4593 (linux_set_resume_request): Ignore resume_stop requests if already
4594 stopping or stopped. Set the lwp's last_resume_kind.
4595 (resume_status_pending_p): Don't check for removed breakpoints.
4596 (need_step_over_p): New.
4597 (start_step_over): New.
4598 (finish_step_over): New.
4599 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4600 requests. Clear the thread's last reported target waitstatus.
4601 Don't use the `suspended' flag. Don't consider pending breakpoints.
4602 (linux_resume): Start a step-over if necessary.
4603 (proceed_one_lwp): New.
4604 (proceed_all_lwps): New.
4605 (unstop_all_lwps): New.
4606 * linux-low.h (struct lwp_info): Rewrite comment for the
4607 `suspended' flag. Add the `stop_pc' field. Delete the
4608 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4609 Add `'last_resume_kind' and `need_step_over' fields.
4610 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4611 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4612 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4613 (set_raw_breakpoint_at): New.
4614 (set_breakpoint_at): Rewrite to use it.
4615 (reinsert_breakpoint_handler): Delete.
4616 (set_reinsert_breakpoint): New.
4617 (reinsert_breakpoint_by_bp): Delete.
4618 (delete_reinsert_breakpoints): New.
4619 (uninsert_breakpoint): Rewrite.
4620 (uninsert_breakpoints_at): New.
4621 (reinsert_breakpoint): Rewrite.
4622 (reinsert_breakpoints_at): New.
4623 (check_breakpoints): Rewrite.
4624 (breakpoint_here): New.
4625 (breakpoint_inserted_here): New.
4626 (check_mem_read): Adjust.
4627 * mem-break.h (breakpoints_supported, breakpoint_here)
4628 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4629 (reinsert_breakpoint_by_bp): Delete declaration.
4630 (delete_reinsert_breakpoints): Declare.
4631 (reinsert_breakpoint): Delete declaration.
4632 (reinsert_breakpoints_at): Declare.
4633 (uninsert_breakpoint): Delete declaration.
4634 (uninsert_breakpoints_at): Declare.
4635 (check_breakpoints): Adjust prototype.
4636 * server.h: Adjust include order.
4637 (struct thread_info): Declare here. Add a `last_status' field.
4639 2010-03-23 Michael Snyder <msnyder@vmware.com>
4641 * server.c (crc32): New function.
4642 (handle_query): Add handling for 'qCRC:' request.
4644 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4646 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4647 lwp had been stopped by a watchpoint.
4649 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4651 * server.h (internal_error): Declare.
4652 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4653 * utils.c (internal_error): New function.
4655 2010-03-15 Andreas Schwab <schwab@redhat.com>
4657 * configure.srv: Fix typo setting srv_regobj.
4659 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4661 * linux-low.c (fetch_register): Avoid passing a non string literal
4663 (usr_store_inferior_registers): Ditto.
4665 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4667 * linux-low.c (linux_write_memory): Bail out early if peeking
4670 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4672 * linux-low.h (struct lwp_info): New fields
4673 `stopped_by_watchpoint' and `stopped_data_address'.
4674 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4675 here, and cache them in the lwp object.
4676 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4678 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4680 (linux_stopped_by_watchpoint): Rewrite.
4681 (linux_stopped_data_address): Rewrite.
4683 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4685 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4686 switching the current inferior, not before.
4688 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4690 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4691 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4692 i386-linux.c and amd64-linux.c.
4693 (reg-i386.o): Removed.
4694 (reg-i386.c): Likewise.
4695 (reg-i386-linux.o): Likewise.
4696 (reg-i386-linux.c): Likewise.
4697 (reg-x86-64.o): Likewise.
4698 (reg-x86-64.c): Likewise.
4699 (reg-x86-64-linux.o): Likewise.
4700 (reg-x86-64-linux.c): Likewise.
4703 (i386-linux.o): Likewise.
4704 (i386-linux.c): Likewise.
4705 (amd64.o): Likewise.
4706 (amd64.c): Likewise.
4707 (amd64-linux.o): Likewise.
4708 (amd64-linux.c): Likewise.
4710 * configure.srv (srv_i386_regobj): New.
4711 (srv_i386_linux_regobj): Likewise.
4712 (srv_amd64_regobj): Likewise.
4713 (srv_amd64_linux_regobj): Likewise.
4714 (srv_i386_32bit_xmlfiles): Likewise.
4715 (srv_i386_64bit_xmlfiles): Likewise.
4716 (srv_i386_xmlfiles): Likewise.
4717 (srv_amd64_xmlfiles): Likewise.
4718 (srv_i386_linux_xmlfiles): Likewise.
4719 (srv_amd64_linux_xmlfiles): Likewise.
4720 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4721 srv_xmlfiles to $srv_i386_xmlfiles.
4722 (i[34567]86-*-mingw32ce*): Likewise.
4723 (i[34567]86-*-mingw*): Likewise.
4724 (i[34567]86-*-nto*): Likewise.
4725 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4726 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4727 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4728 (x86_64-*-linux*): Likewise.
4730 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4731 (init_registers_amd64_linux): New.
4732 (x86_arch_setup): Replace init_registers_x86_64_linux with
4733 init_registers_amd64_linux.
4735 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4737 * configure.ac: Check for libdl. If it is not available link against
4738 static libthread_db.
4739 * configure: Regenerate.
4741 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4745 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4746 handing a read watchpoint.
4747 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4749 2010-02-12 Doug Evans <dje@google.com>
4751 * linux-low.c (linux_supports_tracefork_flag): Document.
4752 (linux_look_up_symbols): Add comment.
4754 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4756 * regcache.c (supply_register): Clear regcache if buf is NULL.
4758 2010-02-02 Nicolas Roche <roche@sourceware.org>
4759 Joel Brobecker <brobecker@adacore.com>
4761 * inferiors.c (find_inferior): Add function documentation.
4762 (unloaded_dll): Handle the case where the unloaded dll has not
4763 been previously registered in the dll list.
4765 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4767 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4768 (thumb2_breakpoint): New.
4769 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4771 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4773 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4774 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4777 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4779 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4781 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4783 * linux-s390-low.c (s390_collect_ptrace_register)
4784 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4786 2010-01-21 Doug Evans <dje@google.com>
4788 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4789 (PTRACE_ARG4_TYPE): New macro.
4790 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4791 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4792 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4793 (usr_store_inferior_registers): Ditto.
4794 (linux_read_memory, linux_write_memory): Ditto.
4795 (linux_test_for_tracefork): Ditto.
4797 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4798 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4800 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4802 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4805 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4807 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4808 prototype to take a regcache. Adjust.
4810 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4812 * regcache.h (struct thread_info): Forward declare.
4813 (struct regcache): New.
4814 (new_register_cache): Adjust prototype.
4815 (get_thread_regcache): Declare.
4816 (free_register_cache): Adjust prototype.
4817 (registers_to_string, registers_from_string): Ditto.
4818 (supply_register, supply_register_by_name, collect_register)
4819 (collect_register_as_string, collect_register_by_name): Ditto.
4820 * regcache.c (struct inferior_regcache_data): Delete.
4821 (get_regcache): Rename to ...
4822 (get_thread_regcache): ... this. Adjust. Switch inferior before
4824 (regcache_invalidate_one): Adjust.
4825 (regcache_invalidate): Fix prototype.
4826 (new_register_cache): Return the new register cache.
4827 (free_register_cache): Change prototype.
4828 (realloc_register_cache): Adjust.
4829 (registers_to_string): Change prototype to take a regcache. Adjust.
4830 (registers_from_string): Ditto.
4831 (register_data): Ditto.
4832 (supply_register): Ditto.
4833 (supply_register_by_name): Ditto.
4834 (collect_register): Ditto.
4835 (collect_register_as_string): Ditto.
4836 (collect_register_by_name): Ditto.
4837 * server.c (process_serial_event): Adjust.
4838 * linux-low.h (regset_fill_func, regset_store_func): Change
4840 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4842 * linux-low.c (get_stop_pc): Adjust.
4843 (check_removed_breakpoint): Adjust.
4844 (linux_wait_for_event): Adjust.
4845 (linux_resume_one_lwp): Adjust.
4846 (fetch_register): Add regcache parameter. Adjust.
4847 (usr_store_inferior_registers): Ditto.
4848 (regsets_fetch_inferior_registers): Ditto.
4849 (regsets_store_inferior_registers): Ditto.
4850 (linux_fetch_registers, linux_store_registers): Ditto.
4851 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4853 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4855 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4856 prototype to take a regcache.
4857 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4858 * remote-utils.c (convert_ascii_to_int, outreg)
4859 (prepare_resume_reply): Change prototype to take a regcache.
4861 * target.h (struct target_ops) <fetch_registers, store_registers>:
4862 Change prototype to take a regcache.
4863 (fetch_inferior_registers, store_inferior_registers): Change
4864 prototype to take a regcache. Adjust.
4865 * proc-service.c (ps_lgetregs): Adjust.
4866 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4867 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4868 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4869 take a regcache. Adjust.
4870 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4871 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4872 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4873 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4874 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4875 (cris_cannot_fetch_register):
4876 (cris_breakpoint_at): Change prototype to take a regcache.
4878 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4879 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4880 to take a regcache. Adjust.
4881 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4883 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4884 take a regcache. Adjust.
4885 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4886 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4887 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4888 * linux-mips-low.c (mips_get_pc):
4889 (mips_set_pc): Change prototype to take a regcache. Adjust.
4890 (mips_reinsert_addr): Adjust.
4891 (mips_collect_register): Change prototype to take a regcache.
4893 (mips_supply_register):
4894 (mips_collect_register_32bit, mips_supply_register_32bit)
4895 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4896 (mips_store_fpregset): Ditto.
4897 * linux-ppc-low.c (ppc_supply_ptrace_register)
4898 (ppc_supply_ptrace_register): Ditto.
4899 (parse_spufs_run): Adjust.
4900 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4901 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4902 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4903 take a regcache. Adjust.
4904 * linux-s390-low.c (s390_collect_ptrace_register)
4905 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4906 (s390_set_pc): Change prototype to take a regcache. Adjust.
4907 (s390_arch_setup): Adjust.
4908 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4909 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4910 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4911 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4912 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4914 (sparc_breakpoint_at): Adjust.
4915 * linux-xtensa-low.c (xtensa_fill_gregset):
4916 (xtensa_store_gregset):
4917 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4918 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4919 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4920 prototype to take a regcache. Adjust.
4921 * win32-arm-low.c (arm_fetch_inferior_register)
4922 (arm_store_inferior_register): Change prototype to take a
4924 * win32-i386-low.c (i386_fetch_inferior_register)
4925 (i386_store_inferior_register): Change prototype to take a
4927 * win32-low.c (child_fetch_inferior_registers)
4928 (child_store_inferior_registers): Change prototype to take a
4930 (win32_wait): Adjust.
4931 (win32_fetch_inferior_registers): Change prototype to take a
4933 (win32_store_inferior_registers): Adjust.
4934 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4935 store_inferior_register>: Change prototype to take a regcache.
4937 2010-01-20 Doug Evans <dje@google.com>
4939 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4941 (linux_wait_for_event1, linux_init_signals): Ditto.
4942 (W_STOPCODE): Provide definition if missing.
4944 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4946 * linux-low.c (linux_core_of_thread): New.
4947 (compare_ints, show_process, list_threads): New.
4948 (linux_qxfer_osdata): Report threads and cores.
4949 (linux_target_op): Register linux_core_of_thread.
4950 * remote-utils.c (prepare_resume_reply): Report the core.
4951 (buffer_xml_printf): Support %d specifier.
4952 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4954 (handle_query): Handle qXfer:threads. Announce availability
4956 * target.h (struct target_ops): New field core_of_thread.
4958 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4960 * Makefile.in (clean): Remove new generated files.
4961 (reg-s390.o, reg-s390.c): Remove rules.
4962 (reg-s390x.o, reg-s390x.c): Likewise.
4963 (s390-linux32.o, s390-linux32.c): Add rules.
4964 (s390-linux64.o, s390-linux64.c): Likewise.
4965 (s390x-linux64.o, s390x-linux64.c): Likewise.
4966 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4967 * linux-s390-low.c: Include <elf.h>.
4968 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4969 (init_registers_s390): Remove prototype.
4970 (init_registers_s390x): Likewise.
4971 (init_registers_s390_linux32): Add prototype.
4972 (init_registers_s390_linux64): Likewise.
4973 (init_registers_s390x_linux64): Likewise.
4974 (s390_num_regs_3264): New define.
4975 (s390_regmap_3264): New global variable.
4976 (s390_cannot_fetch_register): Remove obsolete check.
4977 (s390_cannot_store_register): Likewise.
4978 (s390_collect_ptrace_register): Handle upper/lower register halves.
4979 (s390_supply_ptrace_register): Likewise.
4980 (s390_fill_gregset): Update to register number changes.
4981 (s390_get_hwcap): New routine.
4982 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4983 Install appropriate regmap and register set.
4985 2010-01-01 Joel Brobecker <brobecker@adacore.com>
4987 * server.c (gdbserver_version): Update copyright year to 2010.
4988 * gdbreplay.c (gdbreplay_version): Likewise.
4990 2009-12-28 Doug Evans <dje@google.com>
4992 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4993 elf/external.h. Include <elf.h> instead but only if necessary.
4995 2009-12-28 Pedro Alves <pedro@codesourcery.com>
4997 * linux-low.c (linux_remove_process): Remove `detaching'
4998 parameter. Don't release/detach from thread_db here.
4999 (linux_kill): Release/detach from thread_db here, ...
5000 (linux_detach): ... and here, before actually detaching.
5001 (linux_wait_1): ... and here, when a process exits.
5002 * thread-db.c (any_thread_of): New.
5003 (thread_db_free): Switch the current inferior to a thread of the
5006 2009-12-21 Doug Evans <dje@google.com>
5008 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5010 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5011 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5012 warning ifndef __NR_tkill. Move setting of errno there too.
5013 Delete unnecessary resetting of errno after syscall.
5014 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5016 * configure.ac: Check for dladdr.
5017 * config.in: Regenerate.
5018 * configure: Regenerate.
5019 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5020 (try_thread_db_load): Update.
5022 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5024 2009-12-18 Doug Evans <dje@google.com>
5026 * event-loop.c: Include unistd.h if it exists.
5028 * linux-low.c (my_waitpid): Move definition away from being in
5029 between linux_tracefork_child/linux_test_for_tracefork.
5031 * gdb_proc_service.h (psaddr_t): Fix type.
5032 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5033 signature to match glibc.
5035 2009-12-16 Doug Evans <dje@google.com>
5037 * linux-low.c (linux_read_memory): Fix argument to read.
5039 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5041 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5042 events, don't leave current_inferior pointing at null.
5044 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5046 * win32-low.c (LOG): Delete.
5047 (OUTMSG): Output to stderr.
5048 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5049 on compile time LOG macro.
5050 (win32_wait): Fix debug output.
5052 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5054 * win32-low.c (win32_add_one_solib): If the dll name is
5055 "ntdll.dll", prepend the system directory to the dll path.
5057 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5059 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5061 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5062 Vladimir Prus <vladimir@codesourcery.com>
5064 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5065 * configure.ac: Check for __mcoldfire__ and set
5066 gdb_cv_m68k_is_coldfire.
5067 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5068 reg-cf.o and reg-m68k.o.
5069 * configure: Regenerated.
5071 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5073 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5074 Pass it to thread_db_free.
5075 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5076 proper `detaching' argument to linux_remove_process.
5077 * linux-low.h (thread_db_free): Add `detaching' parameter.
5078 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5080 (thread_db_free): Add `detaching' parameter. Only
5081 call td_ta_clear_event if detaching from process.
5083 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5085 * thread-db.c (thread_db_free): Fix typo.
5087 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5090 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5092 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5094 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5095 with an i686 compiler.
5096 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5098 * configure: Rebuilt.
5100 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5104 * server.c (handle_search_memory_1): Correct read_addr initialization
5105 in loop for searching subsequent chunks.
5107 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5109 * configure.ac: New --with-libthread-db option.
5110 * thread-db.c: Allow direct dependence on libthread_db.
5111 (thread_db_free): Adjust.
5112 * config.in: Regenerate.
5113 * configure: Likewise.
5115 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5118 * thread-db.c (attach_thread): New function.
5119 (maybe_attach_thread): Return success/failure.
5120 (find_new_threads_callback): Adjust.
5121 (thread_db_find_new_threads): Loop until no new threads.
5123 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5125 * proc-service.c (ps_lgetregs): Formatting.
5127 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5129 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5130 * configure.ac: Adjust.
5131 * linux-low.h (struct process_info_private): Move members to struct
5133 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5134 * linux-low.c (linux_remove_process): Adjust.
5135 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5136 * server.c (handle_query): Move code ...
5137 (handle_monitor_command): ... here. New function.
5138 * target.h (struct target_ops): New member.
5139 * thread-db.c (struct thread_db): New.
5140 (libthread_db_search_path): New variable.
5141 (thread_db_create_event, thread_db_enable_reporting)
5142 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5143 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5144 (try_thread_db_load_1, dladdr_to_soname): New functions.
5145 (try_thread_db_load, thread_db_load_search): New functions.
5146 (thread_db_init): Search for libthread_db.
5147 (thread_db_free): New function.
5148 (thread_db_handle_monitor_command): Likewise.
5149 * config.in: Regenerate.
5150 * configure: Regenerate.
5152 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5154 * spu-low.c (spu_kill): Wait for inferior to terminate.
5155 Call clear_inferiors.
5156 (spu_detach): Call clear_inferiors.
5158 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5160 * aclocal.m4: Regenerate.
5161 * config.in: Likewise.
5162 * configure: Likewise.
5164 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5166 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5167 (parse_spufs_run): New function.
5168 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5169 (ppc_breakpoint_at): Handle SPU breakpoints.
5171 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5173 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5174 (SPUFS_MAGIC): Define.
5175 (spu_enumerate_spu_ids): New function.
5176 (linux_qxfer_spu): New function.
5177 (linux_target_ops): Install linux_qxfer_spu.
5179 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5181 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5182 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5183 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5184 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5185 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5186 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5187 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5188 (init_registers_powerpc_cell32l): Add prototype.
5189 (init_registers_powerpc_cell64l): Likewise.
5190 (ppc_arch_setup): Detect Cell/B.E. architecture.
5192 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5194 * Makefile.in (datarootdir): New variable.
5196 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5198 * linux-low.c (linux_write_memory): Update debugging output.
5199 * Makefile.in (clean): Add new descriptions.
5200 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5201 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5202 * configure.srv: Add new files for arm*-*-linux*.
5203 * linux-arm-low.c: Add new declarations.
5204 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5205 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5206 (HWCAP_VFPv3D16): New.
5207 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5208 instead of __IWMMXT__.
5209 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5210 (arm_arch_setup): New.
5211 (target_regsets): Remove #ifdef. Add VFP regset.
5212 (the_low_target): Use arm_arch_setup.
5214 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5216 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5217 the main thread again.
5219 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5221 Adding Neutrino gdbserver.
5222 * configure: Regenerated.
5223 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5224 * configure.srv (i[34567]86-*-nto*): New target.
5225 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5226 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5227 (nto_comctrl) [__QNX__]: New function.
5228 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5230 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5232 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5235 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5236 Pedro Alves <pedro@codesourcery.com>
5238 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5239 don't support CONTEXT_EXTENDED_REGISTERS.
5240 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5241 (the_low_target): Install them.
5242 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5243 failing with ERROR_PIPE_NOT_CONNECTED.
5245 2009-06-30 Doug Evans <dje@google.com>
5246 Pierre Muller <muller@ics.u-strasbg.fr>
5248 Add h/w watchpoint support to x86-linux, win32-i386.
5249 * Makefile.in (SFILES): Add i386-low.c
5250 (i386_low_h): Define.
5251 (i386-low.o): Add dependencies.
5252 (linux-x86-low.o): Add i386-low.h dependency.
5253 (win32-i386-low.o): Ditto.
5254 * i386-low.c: New file.
5255 * i386-low.h: New file.
5256 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5257 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5258 * linux-low.c (linux_add_process): Initialize arch_private.
5259 (linux_remove_process): Free arch_private.
5260 (add_lwp): Initialize arch_private.
5261 (delete_lwp): Free arch_private.
5262 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5264 * linux-low.h (process_info_private): New member arch_private.
5265 (lwp_info): New member arch_private.
5266 (linux_target_ops): New members new_process, new_thread,
5268 (ptid_of): New macro.
5269 * linux-x86-low.c: Include stddef.h, i386-low.h.
5270 (arch_process_info): New struct.
5271 (arch_lwp_info): New struct.
5272 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5273 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5274 (i386_dr_low_get_status): New function.
5275 (x86_insert_point, x86_remove_point): New functions.
5276 (x86_stopped_by_watchpoint): New function.
5277 (x86_stopped_data_address): New function.
5278 (x86_linux_new_process, x86_linux_new_thread): New functions.
5279 (x86_linux_prepare_to_resume): New function.
5280 (the_low_target): Add entries for insert_point, remove_point,
5281 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5283 * server.c (debug_hw_points): New global.
5284 (monitor_show_help): Document set debug-hw-points.
5285 (handle_query): Process "set debug-hw-points".
5286 * server.h (debug_hw_points): Declare.
5287 (paddress): Declare.
5288 * utils.c (NUMCELLS, CELLSIZE): New macros.
5289 (get_sell, xsnprintf, paddress): New functions.
5290 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5291 remove_point, stopped_by_watchpoint, stopped_data_address.
5292 * win32-i386-low.c: Include i386-low.h.
5293 (debug_reg_state): Replaces dr.
5294 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5295 (i386_dr_low_get_status): New function.
5296 (i386_insert_point, i386_remove_point): New functions.
5297 (i386_stopped_by_watchpoint): New function.
5298 (i386_stopped_data_address): New function.
5299 (i386_initial_stuff): Update.
5300 (get_thread_context,set_thread_context,i386_thread_added): Update.
5301 (the_low_target): Add entries for insert_point,
5302 remove_point, stopped_by_watchpoint, stopped_data_address.
5303 * win32-low.c (win32_insert_watchpoint): New function.
5304 (win32_remove_watchpoint): New function.
5305 (win32_stopped_by_watchpoint): New function.
5306 (win32_stopped_data_address): New function.
5307 (win32_target_ops): Add entries for insert_watchpoint,
5308 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5309 * win32-low.h (win32_target_ops): New members insert_point,
5310 remove_point, stopped_by_watchpoint, stopped_data_address.
5312 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5314 * server.c (process_serial_event): Re-return unsupported, not
5315 error, if the type isn't recognized. Re-allow supporting only
5316 insert or remove packets. Also call require_running for
5317 breakpoints. Add missing break statement to default case. Tidy.
5318 * target.h (struct target_ops): Rename insert_watchpoint to
5319 insert_point, and remove_watchpoint to remove_point.
5321 * linux-low.h (struct linux_target_ops): Likewise.
5322 * linux-low.c (linux_insert_watchpoint): Rename to ...
5323 (linux_insert_point): ... this. Adjust.
5324 (linux_remove_watchpoint): Rename to ...
5325 (linux_remove_point): ... this. Adjust.
5326 (linux_target_ops): Adjust.
5327 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5328 (cris_insert_point): ... this.
5329 (cris_remove_watchpoint): Rename to ...
5330 (cris_remove_point): ... this.
5331 (the_low_target): Adjust.
5333 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5335 * server.c (handle_v_kill): Pass signal_pid to
5336 kill_inferior if multi_process is zero.
5338 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5340 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5341 * target.h (target_ops): Comment for *_watchpoint to make it clear
5342 the functions can get types '0' and '1'.
5344 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5346 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5347 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5348 * regcache.c (get_regcache): Likewise.
5349 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5350 * win32-low.c (child_fetch_inferior_registers): Remove check for
5353 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5354 Pedro Alves <pedro@codesourcery.com>
5356 * target.h (struct target_ops) <supports_multi_process>: New
5358 (target_supports_multi_process): New.
5359 * server.c (handle_query): Even if GDB reports support, only
5360 enable multi-process if the target also supports it. Report
5361 multi-process support only if the target backend supports it.
5362 * linux-low.c (linux_supports_multi_process): New function.
5363 (linux_target_ops): Install it as target_supports_multi_process
5366 2009-05-24 Doug Evans <dje@google.com>
5368 Global renaming of find_thread_pid to find_thread_ptid.
5369 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5370 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5371 All callers updated.
5373 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5374 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5377 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5378 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5379 (linux_resume_one_lwp): Ditto.
5381 2009-05-23 Doug Evans <dje@google.com>
5383 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5384 from struct inferior_list_entry * to struct lwp_info *.
5385 All callers updated.
5387 2009-05-13 Doug Evans <dje@google.com>
5389 * linux-x86-low.c: Don't include assert.h.
5390 (x86_siginfo_fixup): Use fatal, not assert.
5391 (x86_arch_setup): Fix comment.
5393 2009-05-12 Doug Evans <dje@google.com>
5395 Biarch support for i386/amd64 gdbserver.
5396 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5397 Add linux-x86-low.c.
5398 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5399 (linux-x86-low.o): Add.
5400 * linux-x86-64-low.c: Delete.
5401 * linux-i386-low.c: Delete.
5402 * linux-x86-low.c: New file.
5403 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5405 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5407 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5408 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5409 (linux_child_pid_to_exec_file): New function.
5410 (elf_64_header_p, elf_64_file_p): New functions.
5411 (siginfo_fixup): New function.
5412 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5413 give target a chance to convert layout.
5414 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5415 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5417 2009-05-07 Doug Evans <dje@google.com>
5419 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5420 (regsets_store_inferior_registers): Ditto.
5422 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5426 * linux-low.c (must_set_ptrace_flags): Delete.
5427 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5429 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5430 `lwp->must_set_ptrace_flags' instead.
5431 (linux_wait_for_event_1): Set ptrace options here.
5432 (linux_wait_1): ... not here.
5434 2009-04-30 Doug Evans <dje@google.com>
5436 * inferiors.c (started_inferior_callback): New function.
5437 (attached_inferior_callback): New function.
5438 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5439 * server.c (print_started_pid, print_attached_pid): New functions.
5440 (detach_or_kill_for_exit): New function.
5441 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5442 * server.h (have_started_inferiors_p): Declare.
5443 (have_attached_inferiors_p): Declare.
5445 * inferiors.c (remove_process): Fix memory leak, free process.
5446 * linux-low.c (linux_remove_process): New function.
5447 (linux_kill): Call it instead of remove_process.
5448 (linux_detach, linux_wait_1): Ditto.
5450 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5452 * configure.srv: Add x86 Windows CE target.
5454 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5456 * inferiors.c (get_thread_process): Make global.
5457 * server.h (get_thread_process): Add prototype.
5458 * thread-db.c (find_one_thread): Use get_thread_process
5459 instead of current_process.
5460 (thread_db_get_tls_address): Do not crash if called when
5461 thread layer is not yet initialized.
5463 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5465 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5466 * spu-low.c (current_tid): Rename to ...
5467 (current_ptid): ... this.
5468 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5469 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5470 ptid_get_lwp (current_ptid) instead of current_tid.
5471 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5472 instead of current_tid. Use find_process_pid to verify pid
5473 argument is valid. Pass proper argument to remove_process.
5474 (spu_thread_alive): Compare current_ptid instead of current_tid.
5475 (spu_resume): Likewise.
5477 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5479 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5482 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5484 Implement the multiprocess extensions, and add linux multiprocess
5487 * server.h (ULONGEST): Declare.
5488 (struct ptid, ptid_t): New.
5489 (minus_one_ptid, null_ptid): Declare.
5490 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5491 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5492 (struct inferior_list_entry): Change `id' type from unsigned from
5494 (struct sym_cache, struct breakpoint, struct
5495 process_info_private): Forward declare.
5496 (struct process_info): Declare.
5497 (current_process): Declare.
5498 (all_processes): Declare.
5499 (initialize_inferiors): Declare.
5500 (add_thread): Adjust to use ptid_t.
5501 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5502 (add_process, remove_process, find_thread_pid): Declare.
5503 (find_inferior_id): Adjust to use ptid_t.
5504 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5505 (multi_process): Declare.
5506 (push_event): Adjust to use ptid_t.
5507 (read_ptid, write_ptid): Declare.
5508 (prepare_resume_reply): Adjust to use ptid_t.
5509 (clear_symbol_cache): Declare.
5510 * inferiors.c (all_processes): New.
5511 (null_ptid, minus_one_ptid): New.
5512 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5513 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5514 (add_thread): Change unsigned long to ptid. Remove gdb_id
5516 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5517 (gdb_id_to_thread): Rename to ...
5518 (find_thread_pid): ... this. Change unsigned long to ptid.
5519 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5520 (loaded_dll, pull_pid_from_list): Adjust.
5521 (add_process, remove_process, find_process_pid)
5522 (get_thread_process, current_process, initialize_inferiors): New.
5523 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5524 (struct target_waitstatus) <related_pid>: Ditto.
5525 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5527 (struct target_ops) <join>: Add `pid' argument.
5528 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5529 (struct target_ops) <wait>: Add `ptid' field. Change return type
5531 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5532 (mywait): Add `ptid' argument. Change return type to ptid_t.
5533 (target_pid_to_str): Declare.
5534 * target.c (set_desired_inferior): Adjust to use ptids.
5535 (mywait): Add new `ptid' argument. Adjust.
5536 (target_pid_to_str): New.
5537 * mem-break.h (free_all_breakpoints): Declare.
5538 * mem-break.c (breakpoints): Delelete.
5539 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5540 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5541 to use per-process breakpoint list.
5542 (free_all_breakpoints): New.
5543 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5544 (symbol_cache, all_symbols_looked_up): Delete.
5546 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5548 (prepare_resume_reply): Change ptid argument's type from unsigned
5549 long to ptid_t. Adjust. Implement W;process and X;process.
5550 (free_sym_cache, clear_symbol_cache): New.
5551 (look_up_one_symbol): Adjust to per-process symbol cache. *
5552 * server.c (cont_thread, general_thread, step_thread): Change type
5555 (multi_process): New.
5556 (last_ptid): Change type to ptid_t.
5557 (struct vstop_notif) <ptid>: Change type to ptid_t.
5558 (queue_stop_reply, push_event): Change `ptid' argument's type to
5560 (discard_queued_stop_replies): Add `pid' argument.
5561 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5562 changes. Don't reference the `attached' global.
5563 (attach_inferior): Adjust to mywait interface changes.
5564 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5565 features. Handle and report "multiprocess+". Handle
5567 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5569 (handle_v_kill): New.
5570 (handle_v_stopped): Adjust to use target_pid_to_str.
5571 (handle_v_requests): Allow multiple attaches and runs when
5572 multiprocess extensions are in effect. Handle "vKill".
5573 (myresume): Adjust to use ptids.
5574 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5575 (handle_status): Adjust to discard_queued_stop_replies interface
5577 (first_thread_of, kill_inferior_callback)
5578 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5579 (main): Call initialize_inferiors. Adjust to use ptids, killing
5580 and detaching from all inferiors. Handle multiprocess packet
5582 * linux-low.h: Include gdb_proc_service.h.
5583 (struct process_info_private): New.
5584 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5585 <lwpid_of>: Use ptid_get_lwp.
5586 (get_lwp_thread): Adjust.
5587 (struct lwp_info): Add `dead' member.
5588 (find_lwp_pid): Declare.
5589 * linux-low.c (thread_db_active): Delete.
5590 (new_inferior): Adjust comment.
5591 (inferior_pid): Delete.
5592 (linux_add_process): New.
5593 (handle_extended_wait): Adjust.
5594 (add_lwp): Change unsigned long to ptid.
5595 (linux_create_inferior): Add process to processes table. Adjust
5596 to use ptids. Don't set new_inferior here.
5597 (linux_attach_lwp): Rename to ...
5598 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5599 it. Adjust to use ptids.
5600 (linux_attach_lwp): New.
5601 (linux_attach): Add process to processes table. Don't set
5603 (struct counter): New.
5604 (second_thread_of_pid_p, last_thread_of_process_p): New.
5605 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5607 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5608 processes. Remove process from process table.
5609 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5610 to multiple processes.
5611 (any_thread_of): New.
5612 (linux_detach): Add `pid' argument, and handle it. Remove process
5613 from processes table.
5614 (linux_join): Add `pid' argument. Handle it.
5615 (linux_thread_alive): Change unsighed long argument to ptid_t.
5616 Consider dead lwps as not being alive.
5617 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5618 threads we're not interested in.
5619 (same_lwp, find_lwp_pid): New.
5620 (linux_wait_for_lwp): Change `pid' argument's type from int to
5622 (linux_wait_for_event): Rename to ...
5623 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5624 from int to ptid_t. Adjust.
5625 (linux_wait_for_event): New.
5626 (linux_wait_1): Add `ptid' argument. Change return type to
5627 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5628 that exit from the process table.
5629 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5631 (mark_lwp_dead): New.
5632 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5633 stopping all threads, mark its main lwp as dead.
5634 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5636 (fetch_register, usr_store_inferior_registers)
5637 (regsets_fetch_inferior_registers)
5638 (regsets_store_inferior_registers, linux_read_memory)
5639 (linux_write_memory): Inline `inferior_pid'.
5640 (linux_look_up_symbols): Adjust to use per-process
5642 (linux_request_interrupt): Adjust to use ptids.
5643 (linux_read_auxv): Inline `inferior_pid'.
5644 (initialize_low): Don't reference thread_db_active.
5645 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5646 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5647 (ps_getpid): Return the pid of the current inferior.
5648 * thread-db.c (proc_handle, thread_agent): Delete.
5649 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5651 (find_one_thread): Change argument type to ptid_t. Adjust to
5653 (maybe_attach_thread): Adjust to per-process data and ptids.
5654 (thread_db_find_new_threads): Ditto.
5655 (thread_db_init): Ditto.
5656 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5657 processes table. Adjust to use ptids.
5658 (spu_kill, spu_detach): Adjust interface. Remove process from
5660 (spu_join, spu_thread_alive): Adjust interface.
5661 (spu_wait): Adjust interface. Remove process from processes
5662 table. Adjust to use ptids.
5663 * win32-low.c (current_inferior_tid): Delete.
5664 (current_inferior_ptid): New.
5665 (debug_event_ptid): New.
5666 (thread_rec): Take a ptid. Adjust.
5667 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5668 (child_delete_thread): Ditto.
5669 (do_initial_child_stuff): Add `attached' argument. Add process to
5671 (child_fetch_inferior_registers, child_store_inferior_registers):
5673 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5674 (win32_attach): Pass 1 to do_initial_child_stuff.
5675 (win32_kill): Adjust interface. Remove process from processes
5677 (win32_detach): Ditto.
5678 (win32_join): Adjust interface.
5679 (win32_thread_alive): Take a ptid.
5680 (win32_resume): Adjust to use ptids.
5681 (get_child_debug_event): Ditto.
5682 (win32_wait): Adjust interface. Remove exiting process from
5685 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5687 Non-stop mode support.
5689 * server.h (non_stop): Declare.
5690 (gdb_client_data, handler_func): Declare.
5691 (delete_file_handler, add_file_handler, start_event_loop):
5693 (handle_serial_event, handle_target_event, push_event)
5694 (putpkt_notif): Declare.
5695 * target.h (enum resume_kind): New.
5696 (struct thread_resume): Replace `step' field by `kind' field.
5697 (TARGET_WNOHANG): Define.
5698 (struct target_ops) <wait>: Add `options' argument.
5699 <supports_non_stop, async, start_non_stop>: New fields.
5700 (target_supports_non_stop, target_async): New.
5701 (start_non_stop): Declare.
5702 (mywait): Add `options' argument.
5703 * target.c (mywait): Add `options' argument. Print child exit
5705 (start_non_stop): New.
5706 * server.c (non_stop, own_buf, mem_buf): New globals.
5707 (struct vstop_notif): New.
5708 (notif_queue): New global.
5709 (queue_stop_reply, push_event, discard_queued_stop_replies)
5710 (send_next_stop_reply): New.
5711 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5713 (attach_inferior): In non-stop mode, don't wait for the target
5715 (handle_general_set): Handle QNonStop.
5716 (handle_query): When handling qC, return the current general
5717 thread, instead of the first thread of the list.
5718 (handle_query): If the backend supports non-stop mode, include
5719 QNonStop+ in the qSupported query response.
5720 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5722 (handle_v_attach, handle_v_run): Handle non-stop mode.
5723 (handle_v_stopped): New.
5724 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5725 (myresume): Adjust to use resume_kind. Handle non-stop.
5726 (queue_stop_reply_callback): New.
5727 (handle_status): Handle non-stop mode.
5728 (main): Clear non_stop flag on reconnection. Use the event-loop.
5729 Refactor serial protocol handling from here ...
5730 (process_serial_event): ... to this new function. When GDB
5731 selects any thread, select one here. In non-stop mode, wait until
5732 GDB acks all pending events before exiting.
5733 (handle_serial_event, handle_target_event): New.
5734 * remote-utils.c (remote_open): Install remote_desc in the event
5736 (remote_close): Remove remote_desc from the event loop.
5737 (putpkt_binary): Rename to...
5738 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5739 (putpkt_binary): New as wrapper around putpkt_binary_1.
5740 (putpkt_notif): New.
5741 (prepare_resume_reply): In non-stop mode, don't change the
5743 * event-loop.c: New.
5744 * Makefile.in (OBJ): Add event-loop.o.
5745 (event-loop.o): New rule.
5747 * linux-low.h (pid_of): Moved here.
5749 (get_lwp_thread): Use lwpid_of.
5750 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5751 * linux-low.c (pid_of): Delete.
5752 (inferior_pid): Use lwpid_of.
5753 (linux_event_pipe): New.
5754 (target_is_async_p): New.
5756 (handle_extended_wait): Use lwpid_of.
5757 (add_lwp): Don't set lwpid field.
5758 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5759 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5760 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5761 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5762 first. Adjust to linux_wait_for_event interface changes. Use
5764 (linux_detach): Don't delete the main lwp here.
5765 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5766 (status_pending_p): Don't consider explicitly suspended lwps.
5767 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5768 pointer. Add OPTIONS argument. Change return type to int. Use
5769 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5770 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5771 pointer. Add status pointer argument. Return a pid instead of a
5772 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5773 changes. In non-stop mode, don't switch to a random thread.
5774 (linux_wait): Rename to...
5775 (linux_wait_1): ... this. Add target_options argument, and handle
5776 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5777 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5778 clean exit and signal exit code. Don't stop all threads in
5779 non-stop mode. In all-stop mode, only stop all threads when
5780 reporting a stop to GDB. Handle explicit thread stop requests.
5781 (async_file_flush, async_file_mark): New.
5783 (send_sigstop): Use lwpid_of.
5784 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5785 interface changes. In non-stop mode, don't switch to a random
5787 (linux_resume_one_lwp): Use lwpid_of.
5788 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5789 (linux_resume_one_thread): ... this. Handle resume_stop. In
5790 non-stop mode, don't look for pending flag in all threads.
5791 (resume_status_pending_p): Don't consider explicitly suspended
5793 (my_waitpid): Reimplement. Emulate __WALL.
5794 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5796 (sigchld_handler, linux_supports_non_stop, linux_async)
5797 (linux_start_non_stop): New.
5798 (linux_target_ops): Register linux_supports_non_stop, linux_async
5799 and linux_start_non_stop.
5800 (initialize_low): Install SIGCHLD handler.
5801 * thread-db.c (thread_db_create_event, find_one_thread)
5802 (thread_db_get_tls_address): Use lwpid_of.
5803 * win32-low.c (win32_detach): Adjust to use resume_kind.
5804 (win32_wait): Add `options' argument.
5805 * spu-low.c (spu_resume): Adjust to use resume_kind.
5806 (spu_wait): Add `options' argument.
5808 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5810 Decouple target code from remote protocol.
5812 * target.h (enum target_waitkind): New.
5813 (struct target_waitstatus): New.
5814 (struct target_ops) <wait>: Return an unsigned long. Take a
5815 target_waitstatus pointer instead of a char pointer.
5817 * target.c (mywait): Change prototype to return an unsigned long.
5818 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5819 * server.h (thread_from_wait, old_thread_from_wait): Delete
5821 (prepare_resume_reply): Change prototype to take a
5823 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5824 (last_status, last_ptid): New.
5825 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5826 pid instead of a signal.
5827 (attach_inferior): Remove "status" and "signal" parameters.
5829 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5831 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5832 (handle_v_requests, myresume): Remove "status" and "signal"
5834 (handle_status): New.
5835 (main): Delete local `status'. Adjust.
5836 * remote-utils.c: Include target.h.
5837 (prepare_resume_reply): Change prototype to take a
5838 target_waitstatus. Adjust.
5840 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5842 * spu-low.c (spu_wait): Adjust.
5843 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5845 (win32_wait): Adjust.
5847 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5849 * target.h (struct thread_resume): Delete leave_stopped member.
5850 (struct target_ops): Add a `n' argument to the `resume' callback.
5851 * server.c (start_inferior): Adjust.
5852 (handle_v_cont, myresume): Adjust.
5853 * linux-low.c (check_removed_breakpoint): Adjust to resume
5854 interface change, and to removed leave_stopped field.
5855 (resume_ptr): Delete.
5856 (struct thread_resume_array): New.
5857 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5858 resume interface change.
5859 (linux_continue_one_thread, linux_queue_one_thread)
5860 (resume_status_pending_p): Check if the resume field is NULL
5861 instead of checking the leave_stopped member.
5862 (linux_resume): Adjust to the target resume interface change.
5863 * spu-low.c (spu_resume): Adjust to the target resume interface
5865 * win32-low.c (win32_detach, win32_resume): Ditto.
5867 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5869 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5871 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5873 (linux_continue_one_thread): Only preserve the stepping flag if
5874 there's a pending breakpoint.
5876 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5878 * server.c (main): After the inferior having exited, call
5879 remote_close before exiting gdbserver.
5881 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5883 Fix size of FPSCR in Power 7 processors.
5884 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5885 (PPC_FEATURE_HAS_DFP): New #define.
5886 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5889 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5891 * server.c (handle_query) Whitespace and formatting.
5893 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5895 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5896 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5897 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5898 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5899 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5900 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5901 Makefile.in, configure.ac: Fix whitespace throughout.
5902 * configure: Regenerate.
5904 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5906 * inferiors.c (find_inferior): Make it safe for the callback
5907 function to delete the currently iterated inferior.
5909 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5911 * Makefile.in (linuw_low_h): Move higher.
5912 (thread-db.o): Depend on $(linux_low_h).
5914 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5916 Rename "process" to "lwp" throughout.
5918 * linux-low.c (all_processes): Rename to...
5919 (all_lwps): ... this.
5920 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5921 (add_process): Rename to ...
5922 (add_lwp): ... this. Adjust.
5923 (linux_create_inferior): Adjust.
5924 (linux_attach_lwp): Adjust.
5925 (linux_attach): Adjust.
5926 (linux_kill_one_process): Rename to ...
5927 (linux_kill_one_lwp): ... this. Adjust.
5928 (linux_kill): Adjust.
5929 (linux_detach_one_process): Rename to ...
5930 (linux_detach_one_lwp): ... this. Adjust.
5931 (linux_detach): Adjust.
5932 (check_removed_breakpoint): Adjust.
5933 (status_pending_p): Adjust.
5934 (linux_wait_for_process): Rename to ...
5935 (linux_wait_for_lwp): ... this. Adjust.
5936 (linux_wait_for_event): Adjust.
5937 (send_sigstop): Adjust.
5938 (wait_for_sigstop): Adjust.
5939 (stop_all_processes): Rename to ...
5940 (stop_all_lwps): ... this.
5941 (linux_resume_one_process): Rename to ...
5942 (linux_resume_one_lwp): ... this. Adjust.
5943 (linux_set_resume_request, linux_continue_one_thread)
5944 (linux_queue_one_thread, resume_status_pending_p)
5945 (usr_store_inferior_registers, regsets_store_inferior_registers)
5946 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5948 * linux-low.h (get_process): Rename to ...
5949 (get_lwp): ... this. Adjust.
5950 (get_thread_process): Rename to ...
5951 (get_thread_lwp): ... this. Adjust.
5952 (get_process_thread): Rename to ...
5953 (get_lwp_thread): ... this. Adjust.
5954 (struct process_info): Rename to ...
5955 (struct lwp_info): ... this.
5956 (all_processes): Rename to ...
5957 (all_lwps): ... this.
5958 * proc-service.c (ps_lgetregs): Adjust.
5959 * thread-db.c (thread_db_create_event, find_one_thread)
5960 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5962 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5964 * server.c (handle_query): Handle "qAttached".
5966 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5968 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5969 GPLv3, update license URL.
5971 2009-03-01 Doug Evans <dje@google.com>
5973 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5974 (server_h): Add gdb_signals.h.
5975 (signals.o): Update.
5976 * server.h (target_signal_from_host,target_signal_to_host_p)
5977 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5979 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5981 * remote-utils.c (getpkt): Also generate remote-debug
5982 information if noack_mode is set.
5984 2009-02-06 Pedro Alves <pedro@codesourcery.com>
5986 * server.c (handle_query): Report qXfer:siginfo:read and
5987 qXfer:siginfo:write as supported and handle them.
5988 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5989 * linux-low.c (linux_xfer_siginfo): New.
5990 (linux_target_ops): Set it.
5992 2009-01-26 Pedro Alves <pedro@codesourcery.com>
5994 * server.c (gdbserver_usage): Mention --remote-debug.
5995 (main): Accept '--remote-debug' switch.
5997 2009-01-18 Doug Evans <dje@google.com>
5999 * regcache.c (new_register_cache): No need to check result of xcalloc.
6000 * server.c (handle_search_memory): Back out calls to xmalloc,
6001 result is checked and error is returned to user upon failure.
6002 (handle_query): Ditto. Add more checks for result of malloc.
6003 (handle_v_cont): Check result of malloc, report error back to
6005 (handle_v_run): Ditto. Call freeargv.
6006 * server.h (freeargv): Declare.
6007 * utils.c (freeargv): New fn.
6009 2009-01-15 Doug Evans <dje@google.com>
6011 * gdbreplay.c (perror_with_name): Make arg const char *.
6012 * server.h (target_signal_to_name): Make return type const char *.
6013 * thread-db.c (thread_db_err_str): Make return type const char *.
6014 * utils.c (perror_with_name): Make arg const char *.
6016 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6018 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6019 when handling a EXIT_PROCESS_DEBUG_EVENT.
6021 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6023 * gdbreplay.c (gdbreplay_version): Update copyright year.
6024 * server.c (gdbserver_version): Likewise.
6026 2009-01-05 Doug Evans <dje@google.com>
6028 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6029 (handle_extended_wait): Improve comment.
6031 2008-12-13 Doug Evans <dje@google.com>
6033 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6034 * server.h (ATTR_MALLOC): New macro.
6035 (xmalloc,xcalloc,xstrdup): Declare.
6036 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6037 * inferiors.c: Ditto.
6038 * linux-low.c: Ditto.
6039 * mem-break.c: Ditto.
6040 * regcache.c: Ditto.
6041 * remote-utils.c: Ditto.
6044 * win32-low.c: Ditto.
6046 2008-12-12 Doug Evans <dje@google.com>
6048 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6049 in debugging printf.
6051 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6053 2008-12-09 Doug Evans <dje@google.com>
6055 * linux-low.h (struct process_info): Delete member tid, unused.
6056 * thread-db.c (find_one_thread): Update.
6057 (maybe_attach_thread): Update.
6059 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6061 * target.h (struct target_ops): Add qxfer_osdata member.
6062 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6064 (linux_qxfer_osdata): New functions.
6065 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6067 * server.c (handle_query): Handle "qXfer:osdata:read:".
6068 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6069 (buffer_xml_printf): New functions.
6070 * server.h (struct buffer): New.
6071 (buffer_grow_str, buffer_grow_str0): New macros.
6072 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6073 (buffer_xml_printf): Declare.
6075 2008-11-24 Doug Evans <dje@google.com>
6077 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6079 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6081 * server.c (handle_v_run): Always use the supplied argument list.
6083 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6085 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6086 (xtensa_regmap_table): Add entry for scompare1.
6088 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6090 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6091 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6092 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6093 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6094 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6095 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6096 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6097 XML target descriptions.
6098 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6099 when inferior is running on an ISA 2.05 or later processor. Add
6100 special case to return offset for full 64-bit slot of FPSCR when
6103 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6105 * Makefile.in (SFILES, clean): Added sparc64 files.
6106 (reg-sparc64.o, reg-sparc64.c): New.
6107 * configure.srv (sparc*-*-linux*): New configuration.
6108 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6109 syscall arguments for SPARC.
6110 (regsets_store_inferior_registers): Likewise.
6111 * linux-sparc-low.c: New file.
6113 2008-10-21 Doug Evans <dje@google.com>
6115 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6116 (READLINE_DIR,READLINE_DEP): Delete.
6117 (INTERNAL_CFLAGS): Update.
6118 (LINTFLAGS): Update.
6120 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6122 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6123 whole argv from the last run, not just argv[0].
6125 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6127 * regcache.c (new_register_cache): Return NULL if the register
6128 cache size isn't known yet.
6129 (free_register_cache): Avoid dereferencing a NULL regcache.
6131 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6133 * configure.srv: Merge MIPS and MIPS64.
6135 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6137 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6139 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6141 * Makefile.in: Add required vsx dependencies.
6143 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6144 Declare init_registers_powerpc_vsx32l.
6145 Declare init_registers_powerpc_vsx64l.
6146 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6147 (ppc_arch_setup): Check for VSX in hwcap.
6148 (ppc_fill_vsxregset): New function.
6149 (ppc_store_vsxregset): New function.
6150 Add new VSX entry in regset_info target_regsets.
6152 * configure.srv: Add new VSX dependencies.
6154 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6156 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6157 (remote_open): Set or clear transport_is_reliable.
6158 (putpkt_binary): Don't expect acks in noack mode.
6159 (getpkt): Don't send ack/nac in noack mode.
6160 * server.c (handle_general_set): Handle QStartNoAckMode.
6161 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6163 (main): Reset noack_mode on every connection.
6164 * server.h (noack_mode): Declare.
6166 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6168 * Makefile.in (GDBREPLAY_OBS): New variable.
6169 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6171 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6172 Daniel Jacobowitz <dan@codesourcery.com>
6174 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6175 (usr_store_inferior_registers): Likewise.
6176 (regsets_store_inferior_registers): Likewise.
6178 2008-07-31 Rolf Jansen <rj@surtec.com>
6179 Pedro Alves <pedro@codesourcery.com>
6181 * configure.ac: Check for memmem declaration.
6182 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6183 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6184 (disable_packet_qfThreadInfo): Unconditionally compile.
6185 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6186 * configure, config.in: Regenerate.
6188 2008-07-28 Doug Kwan <dougkwan@google.com>
6190 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6191 (linux_write_memory): Remove declaration of errno.
6193 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6195 * linux-low.c (handle_extended_wait): Do not use "status"
6196 variable uninitialized.
6198 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6200 * server.c (handle_v_attach): Inhibit reporting dll changes.
6202 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6204 * remote-utils.c (prepare_resume_reply): If requested, don't
6205 output "thread:TID" in the T stop reply.
6207 * server.c (disable_packet_vCont, disable_packet_Tthread)
6208 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6209 (handle_query): If requested, disable support for qC, qfThreadInfo
6211 (handle_v_requests): If requested, disable support for vCont.
6212 (gdbserver_show_disableable): New.
6213 (main): Handle --disable-packet and --disable-packet=LIST.
6215 * server.h (disable_packet_vCont, disable_packet_Tthread)
6216 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6218 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6220 * server.c (gdbserver_usage): Mention --version.
6222 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6224 * Makefile.in (gdbreplay.o): New rule.
6226 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6228 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6229 message, not gdbserver.
6231 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6232 Nathan Sidwell <nathan@codesourcery.com>
6233 Joseph Myers <joseph@codesourcery.com>
6235 * acinclude.m4: Include ../../config/acx.m4.
6236 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6237 * configure, config.in: Regenerate.
6238 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6239 * server.c (gdbserver_version): Print PKGVERSION.
6240 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6241 (main): Adjust gdbserver_usage calls.
6242 * gdbreplay.c (version, host_name): Add declarations.
6243 (gdbreplay_version, gdbreplay_usage): New.
6244 (main): Accept --version and --help options.
6246 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6248 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6249 (arm_breakpoint_at): Handle Thumb.
6250 (the_low_target): Add comment.
6252 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6254 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6256 2008-05-09 Doug Evans <dje@google.com>
6258 * server.h (decode_search_memory_packet): Declare.
6259 * remote-utils.c (decode_search_memory_packet): New fn.
6260 * server.c (handle_search_memory_1): New fn.
6261 (handle_search_memory): New fn.
6262 (handle_query): Process qSearch:memory packets.
6264 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6266 * regcache.c (registers_length): Remove.
6267 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6268 full register packet.
6269 * regcache.h (registers_length): Remove prototype.
6270 * server.h (PBUFSIZ): Define to 16384.
6272 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6274 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6275 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6276 powerpc-64l.o, and powerpc-altivec64l.o.
6277 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6278 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6279 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6280 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6281 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6284 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6285 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6286 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6287 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6288 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6289 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6290 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6291 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6292 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6293 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6296 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6297 (init_registers_powerpc_32l): ... this new prototype.
6298 (init_registers_powerpc_32): Remove, replace by ...
6299 (init_registers_powerpc_altivec32l): ... this new prototype.
6300 (init_registers_powerpc_e500): Remove, replace by ...
6301 (init_registers_powerpc_e500l): ... this new prototype.
6302 (init_registers_ppc64): Remove, replace by ...
6303 (init_registers_powerpc_64l): ... this new prototype.
6304 (init_registers_powerpc_64): Remove, replace by ...
6305 (init_registers_powerpc_altivec64l): ... this new prototype.
6306 (ppc_num_regs): Set to 73.
6307 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6308 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6309 (ppc_cannot_store_register): Handle orig_r3 and trap.
6310 (ppc_arch_setup): Update init_registers_... calls.
6311 (ppc_fill_gregset): Handle orig_r3 and trap.
6313 * inferiors.c (clear_inferiors): Reset current_inferior.
6315 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6317 * acinclude.m4: Add override.m4.
6318 * configure: Regenerate.
6320 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6322 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6323 initial call to init_register_ppc64.
6325 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6327 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6328 single powerpc*-*-linux* case.
6329 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6331 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6333 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6334 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6336 * linux-ppc-low.c: Include <elf.h>.
6337 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6338 (ppc_hwcap): New global variable.
6339 (ppc_regmap): Remove __SPE__ #ifdef sections.
6340 (ppc_regmap_e500): New global variable.
6341 (ppc_cannot_store_register): Update __SPE__ special case.
6342 (ppc_get_hwcap): New function.
6343 (ppc_arch_setup): Use it to determine whether inferior supports
6344 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6345 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6346 Do not access registers if target does not support AltiVec.
6347 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6348 Do not access registers if target does not support SPE.
6349 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6351 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6353 * linux-low.c (disabled_regsets, num_regsets): New.
6354 (use_regsets_p): Delete.
6355 (linux_wait_for_process): Clear disabled_regsets.
6356 (regsets_fetch_inferior_registers): Check and set it.
6357 (regsets_store_inferior_registers): Likewise.
6358 (linux_fetch_registers, linux_store_registers): Do not use
6360 (initialize_low): Allocate disabled_regsets.
6362 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6364 * Makefile.in (LIBOBJS): New.
6366 (memmem.o): New rule.
6367 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6368 * configure: Regenerated.
6370 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6372 * server.c (handle_query): Never return "unsupported" for
6373 qXfer:features:read queries.
6375 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6377 * server.c (get_features_xml): Fix inverted condition.
6378 (handle_query): Always support qXfer:feature:read.
6380 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6382 * server.c (wrapper_argv): New.
6383 (start_inferior): Handle wrapper_argv. If set, expect an extra
6385 (gdbserver_usage): Document --wrapper.
6386 (main): Parse --wrapper.
6388 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6390 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6391 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6392 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6393 (ppc_set_pc): Likewise.
6394 (ppc_arch_setup): New function.
6395 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6396 of collect_register.
6397 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6399 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6401 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6402 instead of linux-ppc64-low.o.
6403 * linux-ppc64-low.c: Remove file.
6404 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6405 (linux-ppc64-low.o): Remove rule.
6407 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6408 (init_registers_powerpc_64): Likewise.
6409 (ppc_regmap): Conditionally define depending on __powerpc64__.
6410 (ppc_cannot_store_register): Do not special-case "fpscr" when
6411 compiled on __powerpc64__.
6412 (ppc_collect_ptrace_register): New function.
6413 (ppc_supply_ptrace_register): New function.
6414 (ppc_breakpoint): Change type to "unsigned int".
6415 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6416 (the_low_target): Conditionally provide initializers for the
6417 arch_setup member depending on __powerpc64__. Install
6418 collect_ptrace_register and supply_ptrace_register members.
6420 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6422 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6423 * server.c (gdbserver_xmltarget): Define.
6424 (get_features_xml): Use it to replace "target.xml" and arch_string.
6426 * configure.srv: Remove srv_xmltarget. Add XML files that were
6427 mentioned there to srv_xmlfiles instead. Remove conditional tests
6428 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6429 srv_xmlfiles and srv_regobj to include all possible choices.
6430 * configure.ac (srv_xmltarget): Remove.
6431 (srv_xmlfiles): Do not add "target.xml".
6432 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6433 checks for supplementary target information.
6434 * configure: Regenerate.
6435 * Makefile.in (XML_TARGET): Remove.
6436 (target.xml): Remove rule.
6437 (clean): Do not clean up target.xml.
6438 (.PRECIOUS): Do not mention target.xml.
6440 * target.h (struct target_ops): Remove arch_string member.
6441 * linux-low.c (linux_arch_string): Remove.
6442 (linux_target_ops): Remove arch_string initializer.
6443 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6444 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6445 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6446 * spu-low.c (spu_arch_string): Remove.
6447 (spu_target_ops): Remove arch_string initializer.
6448 * win32-low.c (win32_arch_string): Remove.
6449 (win32_target_ops): Remove arch_string initializer.
6450 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6451 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6452 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6454 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6456 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6457 by collect_ptrace_register and supply_ptrace_register hooks.
6458 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6459 instead of checking for the_low_target.left_pad_xfer.
6460 (usr_store_inferior_registers): Use collect_ptrace_register callback
6461 instead of checking for the_low_target.left_pad_xfer.
6463 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6464 (s390_supply_ptrace_register): Likewise.
6465 (s390_fill_gregset): Call s390_collect_ptrace_register.
6466 (the_low_target): Update.
6468 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6469 (ppc_supply_ptrace_register): Likewise.
6470 (the_low_target): Update.
6472 * linux-i386-low.c (the_low_target): Update.
6473 * linux-x86-64-low.c (the_low_target): Update.
6475 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6477 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6478 reg-s390.o and reg-s390x.o.
6480 * linux-low.c (new_inferior): New global variable.
6481 (linux_create_inferior, linux_attach): Set it.
6482 (linux_wait_for_process): Call the_low_target.arch_setup after the
6483 target has stopped for the first time.
6484 (initialize_low): Do not call the_low_target.arch_setup.
6486 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6487 (s390_set_pc): Likewise.
6488 (s390_arch_setup): New function.
6489 (the_low_target): Use s390_arch_setup as arch_setup routine.
6491 * regcache.c (realloc_register_cache): New function.
6492 (set_register_cache): Call it for each existing regcache.
6494 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6496 * server.h (init_registers): Remove prototype.
6498 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6499 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6500 instead of init_registers ().
6501 * linux-arm-low.c (init_registers_arm): Add prototype.
6502 (init_registers_arm_with_iwmmxt): Likewise.
6503 (the_low_target): Add initializer for arch_setup field.
6504 * linux-cris-low.c (init_registers_cris): Add prototype.
6505 (the_low_target): Add initializer for arch_setup field.
6506 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6507 (the_low_target): Add initializer for arch_setup field.
6508 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6509 (the_low_target): Add initializer for arch_setup field.
6510 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6511 (the_low_target): Add initializer for arch_setup field.
6512 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6513 (the_low_target): Add initializer for arch_setup field.
6514 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6515 (the_low_target): Add initializer for arch_setup field.
6516 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6517 (init_registers_mips64_linux): Likewise.
6518 (the_low_target): Add initializer for arch_setup field.
6519 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6520 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6521 (the_low_target): Add initializer for arch_setup field.
6522 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6523 (init_registers_powerpc_64): Likewise.
6524 (the_low_target): Add initializer for arch_setup field.
6525 * linux-s390-low.c (init_registers_s390): Add prototype.
6526 (init_registers_s390x): Likewise.
6527 (the_low_target): Add initializer for arch_setup field.
6528 * linux-sh-low.c (init_registers_sh): Add prototype.
6529 (the_low_target): Add initializer for arch_setup field.
6530 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6531 (the_low_target): Add initializer for arch_setup field.
6532 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6533 (the_low_target): Add initializer for arch_setup field.
6535 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6536 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6537 instead of init_registers ().
6538 * win32-arm-low.c (init_registers_arm): Add prototype.
6539 (the_low_target): Add initializer for arch_setup field.
6540 * win32-i386-low.c (init_registers_i386): Add prototype.
6541 (the_low_target): Add initializer for arch_setup field.
6543 * spu-low.c (init_registers_spu): Add prototype.
6544 (initialize_low): Call initialie_registers_spu () instead of
6545 initialize_registers ().
6547 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6549 * server.c (handle_v_requests): When handling the vRun and vAttach
6550 packets, if already debugging a process, don't kill it. Return an
6553 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6555 * server.c (handle_query): Correct length check.
6557 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6559 * win32-low.c (do_initial_child_stuff): Add process handle
6560 parameter. Set current_process_handle and current_process_id from the
6561 parameters. Clear globals.
6562 (win32_create_inferior): Don't set current_process_handle and
6563 current_process_id here. Instead pass them on the call to
6564 do_initial_child_stuff.
6565 (win32_attach): Likewise.
6566 (win32_clear_inferiors): New.
6567 (win32_kill): Don't close the current process handle or the
6568 current thread handle here. Instead call win32_clear_inferiors.
6569 (win32_detach): Don't open a new handle to the process. Call
6570 win32_clear_inferiors.
6571 (win32_join): Don't rely on current_process_handle; open a new
6572 handle using the process id.
6573 (win32_wait): Call win32_clear_inferiors when the inferior process
6576 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6578 * server.c (monitor_show_help): Add "exit".
6580 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6582 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6583 (clean): Add reg-xtensa.c.
6584 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6585 * configure.srv (xtensa*-*-linux*) New target.
6586 * linux-xtensa-low.c: New.
6587 * xtensa-xtregs.c: New.
6589 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6591 * hostio.c: Don't include errno.h.
6592 (errno_to_fileio_errno): Move to hostio-errno.
6593 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6594 error number outputting to the target->hostio_last_error callback.
6595 (hostio_packet_error): Use FILEIO_EINVAL directly.
6596 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6597 calls to hostio_error.
6598 * hostio-errno.c: New.
6599 * server.h (hostio_last_error_from_errno): Declare.
6600 * target.h (target_ops): Add hostio_last_error member.
6601 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6602 as hostio_last_error handler.
6603 * spu-low.c (spu_target_ops): Likewise.
6604 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6605 (wince_hostio_last_error): New functions.
6606 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6607 as hostio_last_error handler.
6608 (win32_target_ops) [!_WIN32_WCE]: Register
6609 hostio_last_error_from_errno as hostio_last_error handler.
6610 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6611 (hostio-errno.o): New rule.
6612 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6613 * configure.srv (srv_hostio_err_objs): New variable. Default to
6615 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6616 * configure: Regenerate.
6618 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6620 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6621 (linux_kill, linux_detach): Clean up the process list.
6622 * remote-utils.c (remote_open): Improve port number parsing.
6623 (putpkt_binary, input_interrupt): Only send interrupts if the target
6625 * server.c (extended_protocol): Make static.
6626 (attached): Define earlier.
6627 (exit_requested, response_needed, program_argv): New variables.
6628 (target_running): New.
6629 (start_inferior): Clear attached here.
6630 (attach_inferior): Set attached here.
6631 (require_running): Define.
6632 (handle_query): Use require_running and target_running. Implement
6634 (handle_v_attach, handle_v_run): New.
6635 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6636 (gdbserver_usage): Update.
6637 (main): Redo argument parsing. Handle --debug and --multi. Handle
6638 --attach along with other options or after the port. Save
6639 program_argv. Support no initial program. Resynchronize
6640 communication with GDB after an error. Handle "monitor exit".
6641 Use require_running and target_running. Always allow the extended
6642 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6643 restart in extended mode.
6644 * README: Refer to the GDB manual. Update --attach usage.
6646 2007-12-20 Andreas Schwab <schwab@suse.de>
6648 * linux-low.c (STACK_SIZE): Define.
6649 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6650 (linux_test_for_tracefork): Likewise.
6652 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6654 * linux-low.c (linux_wait_for_event): Update messages. Do not
6655 reinsert auto-delete breakpoints.
6656 * mem-break.c (struct breakpoint): Change return type of handler to
6658 (set_breakpoint_at): Update handler type.
6659 (reinsert_breakpoint_handler): Return 1 instead of calling
6661 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6663 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6664 * mem-break.h (set_breakpoint_at): Update handler type.
6665 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6666 * win32-low.c (auto_delete_breakpoint): New.
6667 (get_child_debug_event): Use it.
6669 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6671 * configure.ac: Check for pread and pwrite.
6672 * hostio.c (handle_pread): Fall back to lseek and read.
6673 (handle_pwrite): Fall back to lseek and write.
6674 * config.in, configure: Regenerated.
6676 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6678 * server.c (myresume): Add own_buf argument.
6679 (main): Update calls.
6681 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6683 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6684 * remote-utils.c (remote_open): Do not call disable_async_io.
6685 (block_async_io): Delete.
6686 (unblock_async_io): Make static.
6687 (initialize_async_io): New.
6688 * server.c (handle_v_cont): Handle async I/O here.
6689 (myresume): Likewise. Move other common resume tasks here...
6690 (main): ... from here. Call initialize_async_io. Disable async
6691 I/O before the main loop.
6692 * server.h (initialize_async_io): Declare.
6693 (block_async_io, unblock_async_io): Delete prototypes.
6694 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6696 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6698 * remote-utils.c (readchar): Allow binary data in received messages.
6700 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6702 * win32-low.c (attaching): New global.
6703 (win32_create_inferior): Clear the `attaching' global.
6704 (win32_attach): Set the `attaching' global.
6705 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6706 attaching. Only set a breakpoint at the entry point if not
6709 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6711 * server.c (main): Don't report dll events on the initial
6712 connection on attaches.
6714 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6716 * server.c (main): Relax numerical bases supported for the pid of
6717 the --attach command line argument.
6719 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6721 * win32-low.c (win32_attach): Call OpenProcess before
6722 DebugActiveProcess, not after. Add last error output to error
6725 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6727 * win32-low.c (win32_get_thread_context)
6728 (win32_set_thread_context): New functions.
6729 (thread_rec): Use win32_get_thread_context.
6730 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6731 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6734 2007-12-03 Leo Zayas
6735 Pedro Alves <pedro_alves@portugalmail.pt>
6737 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6739 (child_add_thread): Minor cleanup.
6740 (child_continue): Resume artificially suspended threads before
6741 calling ContinueDebugEvent.
6742 (suspend_one_thread): New.
6743 (fake_breakpoint_event): New.
6744 (get_child_debug_event): Change return type to int. Check here if
6745 gdb sent an interrupt request. If a soft interrupt was requested,
6746 fake a breakpoint event. Return 0 if there is no event to handle,
6748 (win32_wait): Don't check here if gdb sent an interrupt request.
6749 Ensure there is a valid event to handle.
6750 (win32_request_interrupt): Add soft interruption method as last
6753 2007-12-03 Leo Zayas
6754 Pedro Alves <pedro_alves@portugalmail.pt>
6756 * win32-low.h (win32_thread_info): Add descriptions to the
6757 structure members. Replace `suspend_count' counter by a
6759 * win32-low.c (thread_rec): Update condition of when to get the
6760 context from the inferior. Rely on ContextFlags being set if it
6761 has already been retrieved. Only suspend the inferior thread if
6762 we haven't already. Warn if that fails.
6763 (continue_one_thread): s/suspend_count/suspended/. Only call
6764 ResumeThread once. Warn if that fails.
6766 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6768 * win32-low.c (win32_wait): Don't read from the inferior when it
6771 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6773 * Makefile.in (win32_low_h): New variable.
6774 (win32-low.o): Add dependency on $(win32_low_h).
6775 (win32-arm-low.o, win32-i386-low.o): New rules.
6777 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6779 * hostio.c: Correct copyright year.
6781 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6783 * Makefile.in (OBS): Add hostio.o.
6784 (hostio.o): New rule.
6785 * server.h (handle_vFile): Declare.
6786 * hostio.c: New file.
6787 * server.c (handle_v_requests): Take packet_len and new_packet_len
6788 for binary packets. Call handle_vFile.
6789 (main): Update call to handle_v_requests.
6791 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6793 * linux-low.c: Include <sched.h>.
6795 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6797 * linux-low.c (linux_tracefork_grandchild): New.
6798 (linux_tracefork_child): Use clone.
6799 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6801 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6803 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6805 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6807 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6809 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6811 * inferiors.c (change_inferior_id): Delete.
6812 (add_pid_to_list, pull_pid_from_list): New.
6813 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6814 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6815 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6816 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6817 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6818 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6819 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6820 (using_threads): Always set to 1.
6821 (handle_extended_wait): New.
6822 (add_process): Do not set TID.
6823 (linux_create_inferior): Set must_set_ptrace_flags.
6824 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6825 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6826 (linux_thread_alive): Rename TID argument to LWPID.
6827 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6828 (linux_wait_for_event): Do not use TID or check using_threads. Update
6829 call to dead_thread_notify. Call handle_extended_wait.
6830 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6831 (send_sigstop): Delete sigstop_sent.
6832 (wait_for_sigstop): Avoid TID.
6833 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6834 (linux_test_for_tracefork): New.
6835 (linux_lookup_signals): Use thread_db_active and
6836 linux_supports_tracefork_flag.
6837 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6838 * linux-low.h (get_process_thread): Avoid TID.
6839 (struct process_ifo): Move thread_known and tid to the end. Remove
6841 (linux_attach_lwp, thread_db_init): Update prototypes.
6842 * server.h (change_inferior_id): Delete prototype.
6843 (add_pid_to_list, pull_pid_from_list): New prototypes.
6844 * thread-db.c (thread_db_use_events): New.
6845 (find_first_thread): Rename to...
6846 (find_one_thread): ...this. Update callers and messages. Do not
6847 call fatal. Check thread_db_use_events. Do not call
6848 change_inferior_id or new_thread_notify.
6849 (maybe_attach_thread): Update. Do not call new_thread_notify.
6850 (thread_db_init): Set thread_db_use_events. Check use_events.
6851 * utils.c (fatal, warning): Correct message prefix.
6853 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6855 * Makefile.in (clean): Remove new files.
6856 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6857 (powerpc-64.o, powerpc-64.c): New rules.
6858 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6859 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6861 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6863 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6864 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6865 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6866 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6867 (target_regsets): Add AltiVec and SPE register sets.
6868 * configure.ac: Check for AltiVec and SPE.
6869 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6870 (ppc_fill_vrregset, ppc_store_vrregset): New.
6871 (target_regsets): Add AltiVec register set.
6872 * configure: Regenerated.
6874 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6876 * linux-low.c (O_LARGEFILE): Define.
6877 (linux_read_memory): Use /proc/PID/mem.
6878 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6879 * configure, config.in: Regenerated.
6881 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6883 * linux-low.c (linux_wait_for_event): Do not pass signals while
6886 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6888 * win32-low.c (create_process): New.
6889 (win32_create_inferior): Use create_process instead of
6890 CreateProcess. If create_process failed retry appending an ".exe"
6891 suffix. Store the GetLastError result immediatelly after
6892 create_process calls and use it on the call to error.
6894 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6896 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6898 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6900 * configure.ac: Switch license to GPLv3.
6902 2007-08-01 Michael Snyder <msnyder@access-company.com>
6904 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6906 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6908 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6910 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6911 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6912 CloseToolhelp32Snapshot.
6913 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6914 CloseToolhelp32Snapshot.
6916 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6918 * server.c (main): Check for inferior exit before main loop.
6920 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6922 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6923 instead of on tmp_desc.
6925 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6926 Daniel Jacobowitz <dan@codesourcery.com>
6928 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6929 (add_thread): Minor cleanups.
6930 (clear_inferiors): Move lower in the file. Clear the DLL
6932 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6933 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6934 (xml_escape_text): New.
6935 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6937 (handle_v_cont): Report errors.
6938 (gdbserver_version): Update.
6939 (main): Correct size of own_buf. Do not report initial DLL events.
6940 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6941 (unloaded_dll, xml_escape_text): New.
6942 * win32-low.c (enum target_waitkind): Update comments.
6943 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6944 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6945 (win32_EnumProcessModules, win32_GetModuleInformation)
6946 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6947 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6948 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6949 (win32_Module32First, win32_Module32Next, load_toolhelp)
6950 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6951 (get_child_debug_event): Handle DLL events.
6952 (win32_wait): Likewise.
6954 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6956 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6957 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6959 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6961 * win32-low.c (handle_output_debug_string): Ignore event if not
6964 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6966 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6968 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6970 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6972 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6974 * inferiors.c (change_inferior_id): Add comment.
6975 * linux-low.c (check_removed_breakpoint): Add an early
6976 prototype. Improve debug output.
6977 (linux_attach): Doc update.
6978 (linux_detach_one_process, linux_detach): Clean up before releasing
6980 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6981 * linux-low.h (struct process_info): Doc improvement.
6982 * mem-break.c (delete_all_breakpoints): New.
6983 * mem-break.h (delete_all_breakpoints): New prototype.
6984 * thread-db.c (find_first_thread): New.
6985 (thread_db_create_event): Call it instead of
6986 thread_db_find_new_threads. Clean up unused variables.
6987 (maybe_attach_thread): Remove first thread handling.
6988 (thread_db_find_new_threads): Use find_first_thread.
6989 (thread_db_get_tls_address): Likewise.
6991 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6993 * thread-db.c (thread_db_find_new_threads): Add prototype.
6994 (thread_db_create_event): Check for the main thread before adding
6996 (maybe_attach_thread): Only enable event reporting if TID == 0.
6997 (thread_db_get_tls_address): Check for new threads.
6999 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7001 * linux-low.c (linux_create_inferior): Try execv before execvp.
7002 * spu-low.c (spu_create_inferior): Likewise.
7004 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7006 * linux-low.c (linux_create_inferior): Change execv to execvp.
7007 * spu-low.c (spu_create_inferior): Likewies.
7009 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7011 * Makefile.in (clean): Clean new files instead of deleted ones.
7012 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7013 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7015 * configure.srv: Specify XML files and new regformats for MIPS and
7017 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7018 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7019 an entry for the restart register.
7020 (mips_cannot_fetch_register, mips_cannot_store_register)
7021 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7022 register names to match the XML descriptions.
7023 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7024 restart register instead of $0.
7026 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7027 Markus Deuling <deuling@de.ibm.com>
7029 * remote-utils.c (decode_xfer_write): New function.
7030 * server.h (decode_xfer_write): Add prototype.
7031 * server.c (handle_query): Add PACKET_LEN argument. Support
7032 qXfer:spu:read and qXfer:spu:write packets.
7033 (main): Pass packet_len to handle_query.
7034 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7035 * target.h (target_ops): Add qxfer_spu.
7037 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7039 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7040 accessing non-seekable spufs files.
7042 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7044 * server.c (handle_query): Add reply for qC packet.
7046 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7047 Leo Zayas <lerele@champenstudios@com>
7049 * server.h (check_remote_input_interrupt_request): New function.
7050 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7051 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7052 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7053 (check_remote_input_interrupt_request): New function.
7054 * server.h (check_remote_input_interrupt_request): Declare.
7055 * win32-low.c (winapi_DebugBreakProcess,
7056 winapi_GenerateConsoleCtrlEvent): New typedefs.
7057 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7059 (win32_wait): Check for remote interrupt request
7060 with check_remote_input_interrupt_request.
7061 (win32_request_interrupt): New function.
7062 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7064 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7066 * win32-low.c (debug_registers_changed,
7067 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7068 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7069 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7070 (thread_rec): Get context using the low target.
7071 (child_add_thread): Call thread_added on the low target,
7072 which does the same thing.
7074 (do_initial_child_stuff): Remove debug registers references.
7075 Set context using the low target. Resume threads after
7076 setting the contexts.
7077 (child_continue): Remove dead variable. Remove debug
7078 registers references.
7079 (child_fetch_inferior_registers): Go through the low target.
7080 (do_child_store_inferior_registers): Remove.
7081 (child_store_inferior_registers): Go through the low target.
7082 (win32_resume): Remove debug registers references.
7083 Set context using the low target.
7084 (handle_exception): Change return type to void. Don't record
7085 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7086 first chance exception.
7087 (get_child_debug_event): Change return type to void. Remove
7088 goto loop. Always return after waiting for debug event.
7089 (win32_wait): Convert to switch statement. Handle spurious
7092 * win32-i386-low.c (debug_registers_changed,
7093 debug_registers_used): New.
7094 (initial_stuff): Rename to ...
7095 (i386_initial_stuff): ... this. Clear debug registers
7097 (store_debug_registers): Delete.
7098 (i386_get_thread_context): New.
7099 (load_debug_registers): Delete.
7100 (i386_set_thread_context): New.
7101 (i386_thread_added): New.
7102 (single_step): Rename to ...
7103 (i386_single_step): ... this.
7104 (do_fetch_inferior_registers): Rename to ...
7105 (i386_fetch_inferior_register): ... this.
7106 (i386_store_inferior_register): New.
7107 (the_low_target): Adapt to new interface.
7109 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7110 (arm_get_thread_context): New.
7111 (arm_set_thread_context): New.
7113 (do_fetch_inferior_registers): Rename to ...
7114 (arm_fetch_inferior_register): ... this.
7115 (arm_store_inferior_register): New.
7116 (arm_wince_breakpoint): Reimplement as unsigned long.
7117 (arm_wince_breakpoint_len): Define.
7118 (the_low_target): Adapt to new interface.
7120 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7121 load_debug_registers. Add get_thread_context, set_thread_context,
7122 thread_added and store_inferior_register. Rename
7123 fetch_inferior_registers to fetch_inferior_register.
7124 (regptr): Remove declaration.
7126 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7128 * linux-low.c (linux_detach): Change return type to int. Return 0.
7129 * spu-low.c (spu_detach): Likewise.
7131 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7133 * target.h (target_ops): Change return type of detach to int.
7135 (join_inferior): New.
7136 * server.c (main): Don't skip detach support on mingw32.
7137 If the inferior doesn't support detaching return error.
7138 Call join_inferior instead of using waitpid.
7139 * linux-low.c (linux_join): New.
7140 (linux_target_op): Add linux_join.
7141 * spu-low.c (spu_join): New.
7142 (spu_target_ops): Add spu_join.
7143 * win32-low.c (win32_detach): Adapt to new interface.
7144 Reopen current_process_handle before detaching. Issue a child
7145 resume before detaching.
7147 (win32_target_op): Add win32_join.
7149 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7151 * win32-low.c (win32-attach): Fix return value.
7152 * target.h (target_ops): Describe ATTACH return values.
7154 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7156 * win32-low.c (GETPROCADDRESS): Define.
7157 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7158 (winapi_DebugSetProcessKillOnExit): Likewise.
7159 (win32_create_inferior): Force usage of ansi CreateProcessA.
7160 (win32_attach): Use GETPROCADDRESS.
7161 (win32_detach): Likewise.
7163 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7165 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7167 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7169 * win32-low.c: Commit leftover changes from 2007-03-29.
7171 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7173 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7174 fields short instead of int. Add explicit padding.
7175 (i387_cache_to_fsave): Remove unnecessary casts.
7176 (i387_fsave_to_cache): Doc fix.
7177 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7179 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7181 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7182 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7184 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7186 * configure.srv (arm*-*-mingw32ce*): Move near the other
7189 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7191 * configure.ac: Add errno checking.
7192 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7193 sys/file.h and malloc.h.
7194 (AC_CHECK_DECLS): Add perror.
7195 (srv_mingwce): Handle.
7196 * configure.srv (i[34567]86-*-cygwin*): Add
7197 win32-i386-low.o to srv_tgtobj.
7198 (i[34567]86-*-mingw*): Likewise.
7199 (arm*-*-mingw32ce*): Add case.
7200 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7201 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7202 [__MINGW32CE__] (strerror): New function.
7203 [__MINGW32CE__] (errno): Define to GetLastError.
7204 [__MINGW32CE__] (COUNTOF): New macro.
7205 (remote_open): Remove extra close call.
7206 * mem-break.c (delete_breakpoint_at): New function.
7207 * mem-break.h (delete_breakpoint_at): Declare.
7208 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7209 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7210 [USE_WIN32API] (read, write): Add char* casts.
7211 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7212 * server.h: Include wincecompat.h on Windows CE.
7213 [HAVE_ERRNO_H]: Check.
7214 (perror): Declare if not declared.
7215 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7216 (perror_with_name): Remove errno declaration.
7217 * wincecompat.h: New.
7218 * wincecompat.c: New.
7220 * win32-arm-low.c: New.
7221 * win32-i386-low.c: New.
7222 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7223 (OUTMSG2): Make it safe.
7225 (COUNTOF): New macro.
7226 (NUM_REGS): Get it from the low target.
7227 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7228 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7229 (thread_rec): Let low target handle debug registers.
7230 (child_add_thread): Likewise.
7231 (child_init_thread_list): Likewise.
7232 (continue_one_thread): Likewise.
7234 (do_child_fetch_inferior_registers): Move to ...
7235 * win32-i386-low.c: ... here, and rename to ...
7236 (do_fetch_inferior_registers): ... this.
7237 * win32-low.c (child_fetch_inferior_registers):
7238 Go through the low target.
7239 (do_child_store_inferior_registers): Use regptr.
7240 (strwinerror): New function.
7241 (win32_create_inferior): Handle Windows CE.
7242 Use strwinerror instead of strerror on Windows error
7243 codes. Add program to the error output.
7244 Don't close the main thread handle on Windows CE.
7245 (win32_attach): Use coredll.dll on Windows CE.
7246 (win32_kill): Close current process and current
7248 (win32_detach): Use coredll.dll on Windows CE.
7249 (win32_resume): Let low target handle debug registers, and
7251 (handle_exception): Add/Remove initial breakpoint. Avoid
7252 non-existant WSTOPSIG on Windows CE.
7253 (win32_read_inferior_memory): Cast to remove warning.
7254 (win32_arch_string): Go through the low target.
7255 (initialize_low): Call set_breakpoint_data with the low
7256 target's breakpoint.
7257 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7258 FOP_REGNUM, mappings): Move to ...
7259 * win32-i386-low.c: ... here.
7260 * win32-low.c (win32_thread_info): Move to ...
7261 * win32-low.h: ... here.
7262 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7263 win32-arm-low.c and wincecompat.c.
7264 (all:): Add $EXEEXT.
7265 (install-only:): Likewise.
7266 (gdbserver:): Likewise.
7267 (gdbreplay:): Likewise.
7268 * config.in: Regenerate.
7269 * configure: Regenerate.
7271 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7273 * win32-low.c: Rename typedef thread_info to
7274 win32_thread_info throughout.
7276 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7278 * win32-i386-low.c: Rename to ...
7279 * win32-low.c: ... this.
7280 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7281 * Makefile.in: Likewise.
7283 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7285 * remote-utils.c (monitor_output): Constify msg parameter.
7286 * server.h (monitor_output): Likewise.
7287 * win32-i386-low.c (handle_output_debug_string): New.
7288 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7289 handle_output_debug_string.
7290 (get_child_debug_event): Likewise.
7292 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7294 * server.c (main): Correct strtoul check.
7296 2007-03-27 Jon Ringle <jon@ringle.org>
7298 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7300 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7302 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7304 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7306 * terminal.h: Check HAVE_SGTTY_H.
7308 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7310 * remote-utils.c (remote_open): Print out the assigned port number.
7312 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7314 * remote-utils.c (monitor_output): New function.
7315 * server.c (debug_threads): Define here.
7316 (monitor_show_help): New function.
7317 (handle_query): Handle qRcmd.
7318 (main): Do not handle 'd' packet.
7319 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7320 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7323 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7325 * Makefile.in (EXEEXT): New.
7326 (clean): Use $(EXEEXT).
7328 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7330 * target.h (target_ops): Rename send_signal to request_interrupt,
7331 and remove enum target_signal parameter.
7332 * linux-low.c (linux_request_interrupt): Rename from
7333 linux_send_signal, and always send SIGINT.
7334 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7335 and always send SIGINT.
7336 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7338 (input_interrupt): Likewise.
7340 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7342 * server.c (get_features_xml): Check if target implemented
7344 * win32-i386-low.c (win32_arch_string): New.
7345 (win32_target_ops): Add win32_arch_string as arch_string member.
7347 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7349 * spu-low.c (spu_arch_string): New.
7350 (spu_target_ops): Add spu_arch_string.
7352 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7354 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7355 * configure.ac: Do not check for terminal.h.
7356 * configure, config.in: Regenerated.
7358 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7360 * Makefile.in (OBS): Add $(XML_BUILTIN).
7361 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7363 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7364 (arm-with-iwmmxt.c): New.
7365 * config.in, configure: Regenerate.
7366 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7367 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7368 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7369 (arm*-*-linux*): Add iWMMXt and regset support.
7370 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7371 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7372 (arm_store_wmmxregset, target_regsets): New.
7373 * server.c (get_features_xml): Take annex argument. Check builtin
7375 (handle_query): Handle multiple annexes.
7377 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7379 * remote-utils.c [USE_WIN32API] (read, write): Define.
7380 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7383 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7385 * linux-i386-low.c (the_low_target): Set arch_string.
7386 * linux-x86-64-low.c (the_low_target): Likewise.
7387 * linux-low.c (linux_arch_string): New.
7388 (linux_target_ops): Add it.
7389 * linux-low.h (struct linux_target_ops): Add arch_string.
7390 * server.c (write_qxfer_response): Use const void * for DATA.
7391 (get_features_xml): New.
7392 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7393 * target.h (struct target_ops): Add arch_string method.
7395 2007-01-03 Denis Pilat <denis.pilat@st.com>
7396 Daniel Jacobowitz <dan@codesourcery.com>
7398 * linux-low.c (linux_kill): Handle being called with no threads.
7399 * win32-i386-low.c (win32_kill): Likewise.
7400 (get_child_debug_event): Clear current_process_handle.
7402 2006-12-30 Denis PILAT <denis.pilat@st.com>
7403 Daniel Jacobowitz <dan@codesourcery.com>
7405 * remote-utils.c (remote_open): Check the type of specified
7406 serial port devices before opening them.
7407 * server.c (main): Kill the inferior if an error occurs during
7408 the first remote_open.
7410 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7412 * README: Update supported targets.
7414 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7416 * Makefile.in (clean): Remove reg-mips64.c.
7417 (reg-mips64.c, reg-mips64.o): New rules.
7418 * configure.srv: Handle mips64. Include regset support for mips.
7419 * linux-mips-low.c (union mips_register): New.
7420 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7421 (mips_breakpoint, mips_breakpoint_at): Use int.
7422 (mips_collect_register, mips_supply_register)
7423 (mips_collect_register_32bit, mips_supply_register_32bit)
7424 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7425 (mips_store_fpregset, target_regsets): New.
7426 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7428 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7430 * configure.srv: Add target "spu*-*-*".
7431 * Makefile.in (clean): Remove reg-spu.c.
7432 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7433 * spu-low.c: New file.
7435 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7437 * configure.ac: Correct td_thr_tls_get_addr test.
7438 * configure: Regenerated.
7440 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7442 * linux-low.c (linux_wait_for_event): Reformat. Use the
7444 * remote-utils.c (decode_address_to_semicolon): New.
7445 * server.c (pass_signals, handle_general_set): New.
7446 (handle_query): Mention QPassSignals for qSupported.
7447 (main): Call handle_general_set.
7448 * server.h (pass_signals, decode_address_to_semicolon): New.
7450 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7452 * server.c (handle_query): Correct error handling for read_auxv.
7454 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7456 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7457 and srv_linux_thread_db to yes.
7458 * linux-s390-low.c (s390_fill_gregset): New function.
7459 (target_regsets): Define data structure.
7461 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7463 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7464 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7465 * config.in, configure: Regenerated.
7466 * inferiors.c (gdb_id_to_thread): New function.
7467 (gdb_id_to_thread_id): Use it.
7468 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7469 * linux-low.h (struct process_info): Add th member.
7470 (thread_db_get_tls_address): New prototype.
7471 * remote-utils.c (decode_address): Make non-static.
7472 * server.c (handle_query): Handle qGetTLSAddr.
7473 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7474 * target.h (struct target_ops): Add get_tls_address.
7475 * thread-db.c (maybe_attach_thread): Save the thread handle.
7476 (thread_db_get_tls_address): New.
7478 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7480 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7481 (linux_resume_one_process): Take a siginfo_t *. Update all
7482 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7483 (struct pending_signals): Add a siginfo_t.
7484 (linux_wait_for_process): Always set last_status.
7485 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7486 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7487 * linux-low.h (struct process_info): Add last_status.
7489 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7491 * remote-utils.c (try_rle): New function.
7492 (putpkt_binary): Use it.
7494 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7496 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7497 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7498 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7499 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7500 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7503 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7505 * server.c (terminal_fd): New variable.
7506 (old_foreground_pgrp): Likewise.
7507 (restore_old_foreground_pgrp): New function.
7508 (start_inferior): Record the terminal file descriptor in terminal_fd
7509 and its original foreground group in old_foreground_pgrp. Register
7510 restore_old_foreground_pgrp with atexit().
7512 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7514 * server.c (handle_query): Correct qPart to qXfer.
7516 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7518 * configure.ac: Check for more headers which are missing on
7519 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7520 * configure.srv: Add Cygwin and mingw32.
7521 * remote-utils.c: Don't include headers unconditionally which
7522 are missing on mingw32. Include <winsock.h> for mingw32.
7523 (remote_open): Adjust for mingw32 support. Flush
7524 standard error after writing to it.
7525 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7526 (unblock_async_io, enable_async_io, disable_async_io)
7527 (readchar, getpkt): Update for Winsock support.
7528 (prepare_resume_reply): Expect a protocol signal number.
7529 * server.c: Disable <sys/wait.h> on mingw32.
7530 (start_inferior): Adjust for mingw32 support. Flush
7531 standard error after writing to it.
7532 (attach_inferior): Likewise. Use protocol signal
7534 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7536 * win32-i386-low.c: New file.
7537 * Makefile.in (XM_CLIBS): Set.
7538 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7539 (win32-i386-low.o): New dependency rule.
7540 * linux-low.c (linux_wait): Use target signal numbers.
7541 * target.h (struct target_ops): Doc fix.
7542 * server.h (target_signal_to_name): New prototype.
7543 * gdbreplay.c: Don't include headers unconditionally which
7544 are missing on mingw32. Include <winsock.h> for mingw32.
7545 (remote_close, remote_open): Adjust for Winsock support.
7546 * configure, config.in: Regenerated.
7548 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7550 * server.c (decode_xfer_read, write_qxfer_response): New.
7551 (handle_query): Take a packet length argument. Handle
7552 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7553 the qSupported response.
7554 (main): Update call to handle_query.
7556 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7558 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7559 (putpkt_binary): Renamed from putpkt and adjusted for binary
7561 (putpkt): New wrapper for putpkt_binary.
7562 (readchar): Don't mask off the high bit.
7563 (decode_X_packet): New function.
7564 * server.c (main): Call putpkt_binary if a handler sets the packet
7565 length. Save the length of the incoming packet. Handle 'X'.
7566 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7568 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7570 * server.c (handle_query): Handle qSupported.
7572 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7574 * remote-utils.c (all_symbols_looked_up): New variable.
7575 (look_up_one_symbol): Check it.
7576 * server.h (look_up_one_symbol): New declaration.
7577 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7579 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7581 * Makefile.in (linux-arm-low.o): Update dependencies.
7582 * linux-arm-low.c: Include "gdb_proc_service.h".
7583 (PTRACE_GET_THREAD_AREA): Define.
7584 (ps_get_thread_area): New function.
7586 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7588 * configure.srv (m68k*-*-uclinux*): New target.
7589 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7590 (linux_resume_one_process): Remove extraneous cast.
7591 (linux_read_offsets): New.
7592 (linux_target_op): Add linux_read_offsets on mmuless systems.
7593 * server.c (handle_query): Add qOffsets logic.
7594 * target.h (struct target_ops): Add read_offsets.
7596 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7598 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7599 (PTRACE_GET_THREAD_AREA): Define.
7600 (ps_get_thread_area): New function.
7601 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7602 (linux-x86-64-low.o): Update.
7604 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7606 * configure.ac: Remove checks for prfpregset_t.
7607 * gdb_proc_service.h: New file.
7608 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7609 new "gdb_proc_service.h".
7610 * proc-service.c: Likewise.
7611 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7612 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7613 * Makefile.in (gdb_proc_service_h): Updated.
7614 * configure, config.in: Regenerated.
7616 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7618 * remote-utils.c (prepare_resume_reply): Move declaration
7619 of gdb_id_from_wait to the top of the block.
7621 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7623 * linux-low.c (regsets_store_inferior_registers): Read the regset
7624 from the target before filling it.
7626 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7628 * server.c (attach_inferior): Return SIGTRAP for a successful
7631 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7633 * Makefile.in (OBS): Add version.o.
7634 (STAGESTUFF): Delete.
7635 (version.o): Add dependencies.
7636 (version.c): Replace rule.
7637 (clean): Remove version.c.
7638 * server.c (gdbserver_version): New.
7639 (gdbserver_usage): Use printf.
7640 (main): Handle --version and --help.
7641 * server.h (version, host_name): Add declarations.
7643 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7655 * linux-x86-64-low.c:
7658 * linux-ppc64-low.c:
7667 * linux-crisv32-low.c:
7679 * gdbserver.1: Add (C) after Copyright. Update the FSF
7682 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7684 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7685 (arm_breakpoint_at): Recognize both breakpoints.
7686 (the_low_target): Use the correct breakpoint instruction.
7688 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7690 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7691 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7692 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7693 (the_low_target): Update.
7695 2005-10-25 Andreas Schwab <schwab@suse.de>
7697 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7699 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7700 (ia64_num_regs): Reduce to 462.
7702 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7704 * acinclude.m4: Correct quoting.
7705 * aclocal.m4: Regenerated.
7707 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7708 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7709 (thread_db_init): Call thread_db_err_str.
7710 * configure.ac: Check for TD_VERSION.
7711 * config.in, configure: Regenerated.
7713 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7715 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7717 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7719 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7720 is not available. Define HAVE_PTRACE_GETREGS if it is.
7721 * config.in, configure: Regenerated.
7722 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7723 * linux-i386-low.c, linux-m68k-low.c: Update to use
7724 HAVE_PTRACE_GETREGS.
7725 * linux-low.c (regsets_fetch_inferior_registers)
7726 (regsets_store_inferior_registers): Only return 0 if we processed
7728 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7729 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7731 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7733 * inferiors.c (struct thread_info): Add gdb_id.
7734 (add_thread): Add gdb_id argument.
7735 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7736 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7737 calls to add_thread.
7738 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7739 * server.c (handle_query): Use thread_to_gdb_id.
7740 (handle_v_cont, main): Use gdb_id_to_thread_id.
7741 * server.h (add_thread): Update prototype.
7742 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7745 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7747 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7748 left-padded registers.
7749 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7750 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7752 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7754 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7755 * configure: Regenerate.
7756 * config.in: Regenerate.
7757 * server.h (NEED_DECLARATION_STRERROR):
7758 Replace with !HAVE_DECL_STRERROR.
7760 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7762 * linux-low.c (linux_wait, linux_send_signal): Don't test
7763 an unsigned long variable for > 0 if it could be MAX_ULONG.
7764 * server.c (myresume): Likewise.
7765 * target.c (set_desired_inferior): Likewise.
7767 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7769 * configure.ac: Simplify and improve check for socklen_t.
7770 * configure, config.in: Regenerate.
7772 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7774 * acconfig.h: Remove.
7775 * configure.ac: Add a test for socklen_t. Use three-argument
7776 AC_DEFINE throughout.
7777 * config.in: Regenerated using autoheader 2.59.
7778 * configure: Regenerated.
7780 * gdbreplay.c (socklen_t): Provide a default.
7781 (remote_open): Use socklen_t.
7782 * remote-utils.c (socklen_t): Provide a default.
7783 (remote_open): Use socklen_t.
7784 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7787 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7789 * linux-low.c (linux_read_memory, linux_write_memory)
7790 (linux_read_auxv): Likewise.
7791 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7792 (check_mem_write): Likewise.
7793 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7795 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7796 (registers_from_string, register_data): Likewise.
7797 * server.c (handle_query, main): Likewise.
7798 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7799 (decode_M_packet): Likewise.
7800 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7801 * target.h (struct target_ops): Update read_memory, write_memory,
7803 (read_inferior_memory, write_inferior_memory): Update.
7804 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7806 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7807 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7808 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7809 linux-s390-low.c, linux-sh-low.c: Update for changes in
7810 read_inferior_memory and the_low_target->breakpoint.
7812 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7814 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7815 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7816 * configure.srv: Add powerpc64-*-linux*.
7817 * linux-ppc64-low.c: New file.
7819 2005-05-23 Orjan Friberg <orjanf@axis.com>
7821 * linux-cris-low.c: New file with support for CRIS.
7822 * linux-crisv32-low.c: Ditto for CRISv32.
7823 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7824 (clean): Add reg-cris.c and reg-crisv32.c.
7825 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7826 reg-crisv32.o, and reg-crisv32.c to make rules.
7827 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7830 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7832 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7833 of sizeof (PTRACE_XFER_TYPE).
7834 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7836 2005-05-12 Orjan Friberg <orjanf@axis.com>
7838 * target.h (struct target_ops): Add insert_watchpoint,
7839 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7840 pointers for hardware watchpoint support.
7841 * linux-low.h (struct linux_target_ops): Ditto.
7842 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7843 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7844 to linux_target_ops.
7845 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7847 * server.c (main): Recognize 'Z' and 'z' packets.
7849 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7851 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7852 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7853 (the_low_target): Add new members.
7855 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7857 * proc-service.c (ps_lgetregs): Search all_processes instead of
7860 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7862 * server.c (start_inferior): Change return type to int.
7863 (attach_inferior): Change sigptr to int *.
7864 (handle_v_cont, handle_v_requests): Change signal to int *.
7865 (main): Change signal to int.
7867 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7869 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7870 * configure.srv: Add m32r*-*-linux*.
7871 * linux-m32r-low.c: New file.
7873 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7875 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7877 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7879 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7880 Take unsigned long arguments for PIDs.
7881 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7882 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7883 (wait_for_sigstop, linux_resume_one_process)
7884 (regsets_fetch_inferior_registers, linux_send_signal)
7885 (linux_read_auxv): Likewise. Update the types of variables holding
7886 PIDs. Update format string specifiers.
7887 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7888 * remote-utils.c (prepare_resume_reply): Likewise.
7889 * server.c (cont_thread, general_thread, step_thread)
7890 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7892 (handle_query): Update format specifiers.
7893 (handle_v_cont, main): Use strtoul for thread IDs.
7894 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7895 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7896 (general_thread, step_thread, thread_from_wait)
7897 (old_thread_from_wait): Update.
7898 * target.h (struct thread_resume): Use unsigned long for THREAD.
7899 (struct target_ops): Use unsigned long for arguments to attach and
7902 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7904 * acinclude.m4: Include bfd/bfd.m4 directly.
7905 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7906 <agriffis@toolchain.org>.
7907 * aclocal.m4, configure: Regenerated.
7909 2005-01-07 Andrew Cagney <cagney@gnu.org>
7911 * configure.ac: Rename configure.in, require autoconf 2.59.
7912 * configure: Re-generate.
7914 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7916 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7918 * aclocal.m4: Regenerated.
7919 * configure: Regenerated.
7921 2004-11-21 Andreas Schwab <schwab@suse.de>
7923 * linux-m68k-low.c (m68k_num_gregs): Define.
7924 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7925 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7926 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7927 (m68k_breakpoint_at): New. Add to the_low_target.
7929 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7930 srv_linux_thread_db to yes.
7932 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7934 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7935 (ARCH_SET_FS): Likewise.
7936 (ARCH_GET_FS): Likewise.
7937 (ARCH_GET_GS): Likewise.
7939 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7941 * linux-i386-low.c (ps_get_thread_area): New.
7942 * linux-x86-64-low.c (ps_get_thread_area): New.
7943 * linux-low.c: Include <sys/syscall.h>.
7944 (linux_kill_one_process): Don't kill the first thread here.
7945 (linux_kill): Kill the first thread here.
7946 (kill_lwp): New function.
7947 (send_sigstop, linux_send_signal): Use it.
7948 * proc-service.c: Clean up #ifdefs.
7949 (fpregset_info): Delete.
7950 (ps_lgetregs): Update and enable implementation.
7951 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7953 * remote-utils.c (struct sym_cache, symbol_cache): New.
7954 (input_interrupt): Print a clearer message.
7955 (async_io_enabled): New variable.
7956 (enable_async_io, disable_async_io): Use it. Update comments.
7957 (look_up_one_symbol): Use the symbol cache.
7958 * thread-db.c (thread_db_look_up_symbols): New function.
7959 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7961 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7963 * configure.in: Test for -rdynamic.
7964 * configure: Regenerated.
7965 * Makefile (INTERNAL_LDFLAGS): New.
7966 (gdbserver, gdbreplay): Use it.
7968 2004-09-02 Andrew Cagney <cagney@gnu.org>
7970 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7972 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7974 * linux-low.c (linux_wait): Clear all_processes list also.
7976 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7978 * linux-low.c: Include <errno.h>. Remove extern declaration of
7981 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7983 * gdbreplay.c, server.h, utils.c: Update copyright years.
7985 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7987 * server.c (main): Print child status or termination signal from
7988 variable 'signal', not 'sig'.
7990 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7992 * linux-low.c (linux_read_memory): Change return type to
7993 int. Check for and return error from ptrace().
7994 * target.c (read_inferior_memory): Change return type to int. Pass
7995 back return status from the_target->read_memory().
7996 * target.h (struct target_ops): Adapt *read_memory() prototype.
7998 (read_inferior_memory): Adapt prototype.
7999 * server.c (main): Return an error packet if
8000 read_inferior_memory() returns an error.
8002 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8004 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8005 Unify with other clean targets.
8007 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8009 * server.c (handle_v_cont): Call set_desired_inferior.
8011 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8013 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8015 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8017 * linux-low.c (linux_wait): Unblock async I/O.
8018 (linux_resume): Block and enable async I/O.
8019 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8020 * server.h (block_async_io, unblock_async_io): Add prototypes.
8022 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8024 * remote-utils.c (remote_open): Print a status notice after
8026 * server.c (attach_inferior): Print a status notice after
8029 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8031 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8033 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8035 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8037 * server.c, target.h: Update copyright years.
8039 2004-02-25 Roland McGrath <roland@redhat.com>
8041 * target.h (struct target_ops): New member `read_auxv'.
8042 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8043 * linux-low.c (linux_read_auxv): New function.
8044 (linux_target_ops): Initialize `read_auxv' member to that.
8046 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8048 Committed by Jim Blandy <jimb@redhat.com>.
8050 * linux-s390-low.c (s390_num_regs): Update.
8051 (s390_regmap): Remove control registers. Use __s390x__ predefine
8052 instead of GPR_SIZE to distiguish s390 and s390x targets.
8054 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8056 * linux-low.c: Update copyright year.
8057 (check_removed_breakpoint): Clear pending_is_breakpoint.
8058 (linux_set_resume_request, linux_queue_one_thread)
8059 (resume_status_pending_p): New functions.
8060 (linux_continue_one_thread): Use process->resume.
8061 (linux_resume): Only resume threads if there are no pending events.
8062 * linux-low.h (struct process_info): Add resume request
8065 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8067 * regcache.c (new_register_cache): Clear the allocated register
8068 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8070 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8072 * linux-low.c (linux_resume): Take a struct thread_resume *
8074 (linux_wait): Update call.
8075 (resume_ptr): New static variable.
8076 (linux_continue_one_thread): Renamed from
8077 linux_continue_one_process. Use resume_ptr.
8078 (linux_resume): Use linux_continue_one_thread.
8079 * server.c (handle_v_cont, handle_v_requests): New functions.
8080 (myresume): New function.
8081 (main): Handle 'v' case.
8082 * target.h (struct thread_resume): New type.
8083 (struct target_ops): Change argument of "resume" to struct
8085 (myresume): Delete macro.
8087 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8089 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8090 (uninstall): Support DESTDIR.
8092 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8094 * configure.srv: Add xscale*linux copy of arm*linux entry.
8096 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8098 * linux-arm-low.c (arm_reinsert_addr): New function.
8099 (the_low_target): Add arm_reinsert_addr.
8101 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8103 * mem-break.c: Remove whitespace at end of file.
8105 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8107 * configure.in: Check whether we need to prototype strerror.
8108 * server.h: Optionally prototype strerror.
8109 * gdbreplay.c (perror_with_name): Use strerror.
8110 * linux-low.c (linux_attach_lwp): Use strerror.
8111 * utils.c (perror_with_name): Use strerror.
8112 * config.in, configure: Regenerated.
8114 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8116 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8117 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8119 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8121 * Makefile.in (SFILES): Update.
8122 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8123 low-sun3.c: Remove files.
8125 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8127 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8128 (linux_detach_one_process, linux_detach): New functions.
8129 (linux_target_ops): Add linux_detach.
8130 * server.c (main): Handle 'D' packet.
8131 * target.h (struct target_ops): Add "detach" member.
8132 (detach_inferior): Define.
8134 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8136 From Kelley Cook <kelleycook@wideopenwest.com>:
8137 * configure.srv: Accept i[34567]86 variants.
8139 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8141 * linux-low.c (linux_wait_for_event): Correct comment typos.
8142 (linux_resume_one_process): Call check_removed_breakpoint.
8143 (linux_send_signal): New function.
8144 (linux_target_ops): Add linux_send_signal.
8145 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8147 * target.h (struct target_ops): Add send_signal.
8149 2003-05-29 Jim Blandy <jimb@redhat.com>
8151 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8152 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8153 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8154 away part of the register's value.
8156 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8158 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8159 (linux_wait_for_event, linux_init_signals): Likewise.
8161 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8163 * configure.in: Check for stdlib.h.
8164 * configure: Regenerated.
8165 * config.in: Regenerated.
8167 2003-01-04 Andreas Schwab <schwab@suse.de>
8169 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8171 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8173 * Makefile.in: Remove obsolete code.
8175 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8177 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8178 defined(PT_FPR0_HI).
8180 2002-11-17 Stuart Hughes <seh@zee2.com>
8182 * linux-arm-low.c (arm_num_regs): Increase.
8183 (arm_regmap): Include status register.
8185 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8187 * linux-low.c (register_addr): Remove incorrect -1 check.
8189 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8191 * linux-low.c (linux_create_inferior): Call setpgid. Return
8193 (unstopped_p, linux_signal_pid): Remove.
8194 (linux_target_ops): Remove linux_signal_pid.
8195 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8196 global instead of target method.
8197 * target.h (struct target_ops): Remove signal_pid. Update comment
8198 for create_inferior.
8199 * server.c (signal_pid): New variable.
8200 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8201 gdbserver. Set the child to be the foreground process group.
8202 (attach_inferior): Set signal_pid.
8204 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8206 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8208 2002-08-20 Jim Blandy <jimb@redhat.com>
8210 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8213 2002-08-01 Andrew Cagney <cagney@redhat.com>
8215 * Makefile.in: Make chill references obsolete.
8217 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8219 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8220 * configure: Regenerate.
8221 * config.in: Regenerate.
8223 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8225 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8226 (perror_with_name, remote_close, remote_open, expect, play): Static.
8228 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8230 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8231 byte offsets instead of an array of indexes.
8232 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8234 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8236 * regcache.c: Add comment.
8238 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8240 * thread-db.c: New file.
8241 * proc-service.c: New file.
8242 * acinclude.m4: New file.
8243 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8244 proc-service.o, and thread-db.o.
8245 (linux-low.o): Add USE_THREAD_DB.
8246 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8247 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8248 * aclocal.m4: Regenerated.
8249 * config.in: Regenerated.
8250 * configure: Regenerated.
8251 * configure.in: Check for proc_service.h, sys/procfs.h,
8252 thread_db.h, and linux/elf.h headrs.
8253 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8254 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8255 Check for -lthread_db and thread support.
8256 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8257 PowerPC, and SuperH.
8258 * i387-fp.c: Constify arguments.
8259 * i387-fp.h: Likewise.
8260 * inferiors.c: (struct thread_info): Renamed from
8261 `struct inferior_info'. Remove PID member. Use generic inferior
8262 list header. All uses updated.
8263 (inferiors, signal_pid): Removed.
8264 (all_threads): New variable.
8265 (get_thread): Define.
8266 (add_inferior_to_list): New function.
8267 (for_each_inferior): New function.
8268 (change_inferior_id): New function.
8269 (add_inferior): Removed.
8270 (remove_inferior): New function.
8271 (add_thread): New function.
8272 (free_one_thread): New function.
8273 (remove_thread): New function.
8274 (clear_inferiors): Use for_each_inferior and free_one_thread.
8275 (find_inferior): New function.
8276 (find_inferior_id): New function.
8277 (inferior_target_data): Update argument type.
8278 (set_inferior_target_data): Likewise.
8279 (inferior_regcache_data): Likewise.
8280 (set_inferior_regcache_data): Likewise.
8281 * linux-low.c (linux_bp_reinsert): Remove.
8282 (all_processes, stopping_threads, using_thrads)
8283 (struct pending_signals, debug_threads, pid_of): New.
8284 (inferior_pid): Replace with macro.
8285 (struct inferior_linux_data): Remove.
8286 (get_stop_pc, add_process): New functions.
8287 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8288 Use add_process and add_thread.
8289 (linux_attach_lwp): New function, based on old linux_attach. Use
8290 add_process and add_thread. Set stop_expected for new threads.
8291 (linux_attach): New function.
8292 (linux_kill_one_process): New function.
8293 (linux_kill): Kill all LWPs.
8294 (linux_thread_alive): Use find_inferior_id.
8295 (check_removed_breakpoints, status_pending_p): New functions.
8296 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8297 Update. Use WNOHANG. Wait for cloned processes also. Update process
8298 struct for the found process.
8299 (linux_wait_for_event): New function.
8300 (linux_wait): Use it. Support LWPs.
8301 (send_sigstop, wait_for_sigstop, stop_all_processes)
8302 (linux_resume_one_process, linux_continue_one_process): New functions.
8303 (linux_resume): Support LWPs.
8304 (REGISTER_RAW_SIZE): Remove.
8305 (fetch_register): Use register_size instead. Call supply_register.
8306 (usr_store_inferior_registers): Likewise. Call collect_register.
8308 (regsets_fetch_inferior_registers): Improve error message.
8309 (regsets_store_inferior_registers): Add debugging.
8310 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8311 (unstopped_p, linux_signal_pid): New functions.
8312 (linux_target_ops): Add linux_signal_pid.
8313 (linux_init_signals): New function.
8314 (initialize_low): Call it. Initialize using_threads.
8315 * regcache.c (inferior_regcache_data): Add valid
8317 (get_regcache): Fetch registers lazily. Add fetch argument
8318 and update all callers.
8319 (regcache_invalidate_one, regcache_invalidate): New
8321 (new_register_cache): Renamed from create_register_cache.
8322 Return the new regcache.
8323 (free_register_cache): Change argument to a void *.
8324 (registers_to_string, registers_from_string): Call get_regcache
8325 with fetch flag set.
8326 (register_data): Make static. Pass fetch flag to get_regcache.
8327 (supply_register): Call get_regcache with fetch flag clear.
8328 (collect_register): Call get_regcache with fetch flag set.
8329 (collect_register_as_string): New function.
8330 * regcache.h: Update.
8331 * remote-utils.c (putpkt): Flush after debug output and use
8333 Handle input interrupts while waiting for an ACK.
8334 (input_interrupt): Use signal_pid method.
8335 (getpkt): Flush after debug output and use stderr.
8336 (outreg): Use collect_register_as_string.
8337 (new_thread_notify, dead_thread_notify): New functions.
8338 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8340 (look_up_one_symbol): Flush after debug output.
8341 * server.c (step_thread, server_waiting): New variables.
8342 (start_inferior): Don't use signal_pid. Update call to mywait.
8343 (attach_inferior): Update call to mywait.
8344 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8345 (main): Don't fetch/store registers explicitly. Use
8346 set_desired_inferior. Support proposed ``Hs'' packet. Update
8349 (struct inferior_list, struct_inferior_list_entry): New.
8350 * target.c (set_desired_inferior): New.
8351 (write_inferior_memory): Constify.
8352 (mywait): New function.
8354 (struct target_ops): New signal_pid method.
8355 (mywait): Removed macro, added prototype.
8357 * linux-low.h (regset_func): Removed.
8358 (regset_fill_func, regset_store_func): New.
8359 (enum regset_type): New.
8360 (struct regset_info): Add type field. Use new operation types.
8361 (struct linux_target_ops): stop_pc renamed to get_pc.
8362 Add decr_pc_after_break and breakpoint_at.
8363 (get_process, get_thread_proess, get_process_thread)
8364 (strut process_info, all_processes, linux_attach_lwp)
8365 (thread_db_init): New.
8367 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8368 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8369 (the_low_target): Add new members.
8370 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8371 (i386_store_fpxregset): Constify.
8372 (target_regsets): Add new kind identifier.
8373 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8374 (i386_set_pc): Add debugging.
8375 (i386_breakpoint_at): New function.
8376 (the_low_target): Add new members.
8377 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8378 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8379 (mips_breakpoint_at): New.
8380 (the_low_target): Add new members.
8381 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8382 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8383 (the_low_target): Add new members.
8384 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8385 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8386 (the_low_target): Add new members.
8387 * linux-x86-64-low.c (target_regsets): Add new kind
8390 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8392 From Martin Pool <mbp@samba.org>:
8393 * server.c (gdbserver_usage): New function.
8396 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8398 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8401 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8403 * Makefile.in: Remove obsolete code.
8405 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8407 * linux-low.c (regsets_fetch_inferior_registers),
8408 (regsets_store_inferior_registers): Removed cast to int from
8410 * regcache.h: Added declaration of struct inferior_info.
8412 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8414 * inferiors.c (struct inferior_info): Add regcache_data.
8415 (add_inferior): Call create_register_cache.
8416 (clear_inferiors): Call free_register_cache.
8417 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8418 * regcache.c (struct inferior_regcache_data): New.
8419 (registers): Remove.
8420 (get_regcache): New function.
8421 (create_register_cache, free_register_cache): New functions.
8422 (set_register_cache): Don't initialize the register cache here.
8423 (registers_to_string, registers_from_string, register_data): Call
8425 * regcache.h: Add prototypes.
8426 * server.h: Likewise.
8428 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8430 * mem-break.c: New file.
8431 * mem-break.h: New file.
8432 * Makefile.in: Add mem-break.o rule; update server.h
8434 * inferiors.c (struct inferior_info): Add target_data
8436 (clear_inferiors): Free target_data member if set.
8437 (inferior_target_data, set_inferior_target_data): New functions.
8438 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8439 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8440 * linux-low.c (linux_bp_reinsert): New variable.
8441 (struct inferior_linux_data): New.
8442 (linux_create_inferior): Use set_inferior_target_data.
8443 (linux_attach): Likewise. Call add_inferior.
8444 (linux_wait_for_one_inferior): New function.
8445 (linux_wait): Call it.
8446 (linux_write_memory): Add const.
8447 (initialize_low): Call set_breakpoint_data.
8448 * linux-low.h (struct linux_target_ops): Add breakpoint
8450 * server.c (attach_inferior): Remove extra add_inferior
8452 * server.h: Include mem-break.h. Update inferior.c
8454 * target.c (read_inferior_memory)
8455 (write_inferior_memory): New functions.
8456 * target.h (read_inferior_memory)
8457 (write_inferior_memory): Change macros to prototypes.
8458 (struct target_ops): Update comments. Add const to write_memory
8461 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8463 * linux-low.c (usr_store_inferior_registers): Support
8464 registers which are allowed to fail to store.
8465 * linux-low.h (linux_target_ops): Likewise.
8466 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8467 (ppc_cannot_store_register): FPSCR may not be storable.
8469 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8471 * server.h: Include <string.h> if HAVE_STRING_H.
8472 * ChangeLog: Correct paths in last ChangeLog entry.
8474 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8476 * linux-low.h: Remove obsolete prototypes.
8477 (struct linux_target_ops): New.
8478 (extern the_low_target): New.
8479 * linux-low.c (num_regs, regmap): Remove declarations.
8480 (register_addr): Use the_low_target explicitly.
8481 (fetch_register): Likewise.
8482 (usr_fetch_inferior_registers): Likewise.
8483 (usr_store_inferior_registers): Likewise.
8484 * linux-arm-low.c (num_regs): Remove.
8485 (arm_num_regs): Define.
8486 (arm_regmap): Renamed from regmap, made static.
8487 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8489 (arm_cannot_store_register): Renamed from cannot_store_register,
8491 (the_low_target): New.
8492 * linux-i386-low.c (num_regs): Remove.
8493 (i386_num_regs): Define.
8494 (i386_regmap): Renamed from regmap, made static.
8495 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8497 (i386_cannot_store_register): Renamed from cannot_store_register,
8499 (the_low_target): New.
8500 * linux-ia64-low.c (num_regs): Remove.
8501 (ia64_num_regs): Define.
8502 (ia64_regmap): Renamed from regmap, made static.
8503 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8505 (ia64_cannot_store_register): Renamed from cannot_store_register,
8507 (the_low_target): New.
8508 * linux-m68k-low.c (num_regs): Remove.
8509 (m68k_num_regs): Define.
8510 (m68k_regmap): Renamed from regmap, made static.
8511 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8513 (m68k_cannot_store_register): Renamed from cannot_store_register,
8515 (the_low_target): New.
8516 * linux-mips-low.c (num_regs): Remove.
8517 (mips_num_regs): Define.
8518 (mips_regmap): Renamed from regmap, made static.
8519 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8521 (mips_cannot_store_register): Renamed from cannot_store_register,
8523 (the_low_target): New.
8524 * linux-ppc-low.c (num_regs): Remove.
8525 (ppc_num_regs): Define.
8526 (ppc_regmap): Renamed from regmap, made static.
8527 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8529 (ppc_cannot_store_register): Renamed from cannot_store_register,
8531 (the_low_target): New.
8532 * linux-s390-low.c (num_regs): Remove.
8533 (s390_num_regs): Define.
8534 (s390_regmap): Renamed from regmap, made static.
8535 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8537 (s390_cannot_store_register): Renamed from cannot_store_register,
8539 (the_low_target): New.
8540 * linux-sh-low.c (num_regs): Remove.
8541 (sh_num_regs): Define.
8542 (sh_regmap): Renamed from regmap, made static.
8543 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8545 (sh_cannot_store_register): Renamed from cannot_store_register,
8547 (the_low_target): New.
8548 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8549 (the_low_target): New.
8551 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8553 * Makefile.in: Add stamp-h target.
8554 * configure.in: Create stamp-h.
8555 * configure: Regenerated.
8557 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8559 * inferiors.c: New file.
8560 * target.c: New file.
8561 * target.h: New file.
8562 * Makefile.in: Add target.o and inferiors.o. Update
8564 * linux-low.c (inferior_pid): New static variable,
8565 moved from server.c.
8566 (linux_create_inferior): Renamed from create_inferior.
8567 Call add_inferior. Return 0 on success instead of a PID.
8568 (linux_attach): Renamed from myattach.
8569 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8570 (linux_thread_alive): Renamed from mythread_alive.
8571 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8573 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8574 (regsets_store_inferior_registers): Correct error message.
8575 Add missing ``return 0''.
8576 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8577 (linux_store_registers): Renamed from store_inferior_registers.
8578 (linux_read_memory): Renamed from read_inferior_memory.
8579 (linux_write_memory): Renamed from write_inferior_memory.
8580 (linux_target_ops): New structure.
8581 (initialize_low): Call set_target_ops ().
8582 * remote-utils.c (unhexify): New function.
8583 (hexify): New function.
8584 (input_interrupt): Send signals to ``signal_pid''.
8585 * server.c (inferior_pid): Remove.
8586 (start_inferior): Update create_inferior call.
8587 (attach_inferior): Call add_inferior.
8588 (handle_query): New function.
8589 (main): Call handle_query for `q' packets.
8590 * server.h: Include "target.h". Remove obsolete prototypes.
8591 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8593 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8595 * Makefile.in: Add WARN_CFLAGS. Update configury
8597 * configure.in: Check for <string.h>
8598 * configure: Regenerate.
8599 * config.in: Regenerate.
8600 * gdbreplay.c: Include needed system headers.
8601 (remote_open): Remove strchr prototype.
8602 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8603 * regcache.c (supply_register): Change buf argument to const void *.
8604 (supply_register_by_name): Likewise.
8605 (collect_register): Change buf argument to void *.
8606 (collect_register_by_name): Likewise.
8607 * regcache.h: Add missing prototypes.
8608 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8609 * server.c (handle_query): New function.
8610 (attached): New static variable, moved out of main.
8611 (main): Quiet longjmp clobber warnings.
8612 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8613 * utils.c (error): Remove NORETURN.