1 2013-09-05 Pedro Alves <palves@redhat.com>
3 * server.h (gdb_client_data, handler_func, callback_handler_func)
4 (delete_file_handler, add_file_handler, append_callback_event)
5 (delete_callback_event, start_event_loop, initialize_event_loop):
6 Move to event-loop.h and include it.
7 * event-loop.h: New file.
9 2013-09-05 Pedro Alves <palves@redhat.com>
11 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
12 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13 (loaded_dll, unloaded_dll): Move to ...
14 * dll.h: ... this new file.
15 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
17 2013-09-05 Pedro Alves <palves@redhat.com>
19 * server.h (current_process, get_thread_process, all_processes)
20 (add_inferior_to_list, for_each_inferior, current_inferior)
21 (remove_inferior, add_process, remove_process, find_process_pid)
22 (have_started_inferiors_p, have_attached_inferiors_p)
23 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
24 (clear_inferiors, find_inferior, find_inferior_id)
25 (inferior_target_data, set_inferior_target_data)
26 (inferior_regcache_data, set_inferior_regcache_data): Move to
27 inferiors.h, and include it.
28 * inferiors.h: New file.
30 2013-09-05 Pedro Alves <palves@redhat.com>
32 * server.h (struct emit_ops, current_insn_ptr, emit_error):
36 2013-09-05 Pedro Alves <palves@redhat.com>
38 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
40 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
41 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
42 (handle_tracepoint_general_set, handle_tracepoint_query)
43 (tracepoint_finished_step, tracepoint_was_hit)
44 (release_while_stepping_state_list, current_traceframe)
45 (in_readonly_region, traceframe_read_mem)
46 (fetch_traceframe_registers, traceframe_read_sdata)
47 (traceframe_read_info, struct fast_tpoint_collect_status)
48 (fast_tracepoint_collecting, force_unlock_trace_buffer)
49 (handle_tracepoit_bkpts, initialize_low_tracepoint)
50 (supply_fast_tracepoint_registers)
51 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
52 (ipa_tdesc, claim_trampoline_space)
53 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
54 (agent_mem_read, agent_get_trace_state_variable_value)
55 (agent_set_trace_state_variable_value, agent_tsv_read)
56 (agent_mem_read_string, get_raw_reg_func_addr)
57 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
58 * tracepoint.h: ... this new file.
60 2013-09-05 Pedro Alves <palves@redhat.com>
62 * server.h (perror_with_name, error, fatal, warning, paddress)
63 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
67 2013-09-05 Pedro Alves <palves@redhat.com>
69 * server.h (remote_debug, noack_mode, transport_is_reliable)
70 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
71 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
72 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
73 (write_enn, initialize_async_io, enable_async_io)
74 (disable_async_io, check_remote_input_interrupt_request)
75 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
76 (dead_thread_notify, prepare_resume_reply)
77 (decode_address_to_semicolon, decode_address, decode_m_packet)
78 (decode_M_packet, decode_X_packet, decode_xfer_write)
79 (decode_search_memory_packet, unhexify, hexify)
80 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
81 (look_up_one_symbol, relocate_instruction)
82 (monitor_output): Move to remote-utils.h, and include it.
83 * remote-utils.h: New file.
85 2013-09-05 Pedro Alves <palves@redhat.com>
87 * server.h (_): Delete.
89 2013-09-02 Pedro Alves <palves@redhat.com>
91 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
92 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
94 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
96 2013-09-02 Pierre Muller <muller@sourceware.org>
98 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
99 or WriteProcessMemory complete successfully and handle
100 ERROR_PARTIAL_COPY error.
102 2013-09-02 Pedro Alves <palves@redhat.com>
104 * server.c (gdb_read_memory): Return -1 on traceframe memory read
105 error instead of EIO.
107 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
110 * linux-low.c: Include filestuff.h.
111 (linux_create_inferior) <pid == 0>: Call close_most_fds.
112 * lynx-low.c: Include filestuff.h.
113 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
114 * server.c: Include filestuff.h.
115 (main): Call notice_open_fds.
116 * spu-low.c: Include filestuff.h.
117 (spu_create_inferior) <pid == 0>: Call close_most_fds.
119 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
121 * Makefile.in: Explain why ../target and ../nat are not
122 listed as include file search paths.
123 (linux-waitpid.o): New object file rule.
124 * configure.srv (srv_native_linux_obj): New variable.
125 Replace all occurrences of linux native object files with
126 $srv_native_linux_obj.
127 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
128 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
129 (linux_enable_event_reporting): Remove declaration.
130 (my_waitpid): Moved to common/linux-waitpid.c.
131 (linux_wait_for_event): Pass ptid when calling
132 linux_enable_event_reporting.
133 (linux_supports_tracefork_flag): Remove.
134 (linux_enable_event_reporting): Likewise.
135 (linux_tracefork_grandchild): Remove.
136 (STACK_SIZE): Moved to common/linux-ptrace.c.
137 (linux_tracefork_child): Remove.
138 (linux_test_for_tracefork): Remove.
139 (linux_look_up_symbols): Call linux_supports_traceclone.
140 (initialize_low): Remove call to linux_test_for_tracefork.
141 * linux-low.h (PTRACE_TYPE_ARG3): Move to
142 common/linux-ptrace.h.
143 (PTRACE_TYPE_ARG4): Likewise.
144 Include linux-ptrace.h.
146 2013-08-21 Pedro Alves <palves@redhat.com>
148 * config.in: Renegerate.
150 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
152 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
153 (SFILES): Remove $(srcdir)/common/target-common.c and
154 add $(srcdir)/target/waitstatus.c.
155 (OBS): Remove target-common.o and add waitstatus.o.
156 (server_h): Remove $(srcdir)/../common/target-common.h and
157 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
158 and $(srcdir)/../target/waitstatus.h.
159 (target-common.o): Remove.
160 (waitstatus.o): New target object file.
161 * target.h: Do not include target-common.h and
162 include target/resume.h, target/wait.h and
165 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
167 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
169 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
170 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
172 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
173 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
175 2013-07-27 Jie Zhang <jie@codesourcery.com>
176 Daniel Jacobowitz <dan@codesourcery.com>
177 Yao Qi <yao@codesourcery.com>
179 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
180 (mips-linux-watch.o): New rule.
181 (mips_linux_watch_h): New variable.
182 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
184 * linux-mips-low.c: Include mips-linux-watch.h.
185 (struct arch_process_info, struct arch_lwp_info): New.
186 (update_watch_registers_callback): New function.
187 (mips_linux_new_process, mips_linux_new_thread) New functions.
188 (mips_linux_prepare_to_resume, mips_insert_point): New
190 (mips_remove_point, mips_stopped_by_watchpoint): New
192 (rsp_bp_type_to_target_hw_bp_type): New function.
193 (mips_stopped_data_address): New function.
194 (the_low_target): Add watchpoint support functions.
196 2013-07-27 Yao Qi <yao@codesourcery.com>
198 * i386-low.c: Include break-common.h.
199 (enum target_hw_bp_type): Remove.
201 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
203 * Makefile.in (SFILES): /common/target-common.c.
204 (OBS): Add target-common.o.
205 (server_h): Add $(srcdir)/../common/target-common.h.
206 (target-common.o): New target.
207 * server.c (queue_stop_reply_callback): Free
208 status string after use.
209 * target.c (target_waitstatus_to_string): Remove.
210 * target.h: Include target-common.h.
211 (resume_kind): Likewise.
212 (target_waitkind): Likewise.
213 (target_waitstatus): Likewise.
214 (TARGET_WNOHANG): Likewise.
216 2013-07-04 Yao Qi <yao@codesourcery.com>
218 * Makefile.in (host_alias): Use @host_noncanonical@.
219 (target_alias): Use @target_noncanonical@.
220 * configure.ac: Use ACX_NONCANONICAL_TARGET and
221 ACX_NONCANONICAL_HOST.
222 * configure: Regenerated.
225 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
227 * configure.ac (version_host, version_target): Set and AC_SUBST them.
228 * configure: Rebuild.
229 * Makefile.in (version_host, version_target): Get from configure.
230 (version.c): Use $(version_host) and $(version_target).
232 2013-07-03 Pedro Alves <palves@redhat.com>
234 * Makefile.in (config.status): Depend on development.sh.
235 * acinclude.m4: Include libmcheck.m4.
236 * configure: Regenerate.
238 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
240 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
241 attribute inside the parentheses.
242 (winapi_DebugSetProcessKillOnExit): Ditto.
243 (winapi_DebugBreakProcess): Ditto.
244 (winapi_GenerateConsoleCtrlEvent): Ditto.
246 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
248 * notif.h (notif_event): Add a dummy member to avoid compiler
251 2013-07-01 Pedro Alves <palves@redhat.com>
253 * hostio.c (HOSTIO_PATH_MAX): Define.
254 (require_filename, handle_open, handle_unlink, handle_readlink):
257 2013-07-01 Pedro Alves <palves@redhat.com>
259 * server.h: Include "pathmax.h".
260 * linux-low.c: Don't include sys/param.h.
261 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
263 * win32-low.c: Don't include sys/param.h.
264 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
266 2013-07-01 Pedro Alves <palves@redhat.com>
268 * event-loop.c: Don't check HAVE_UNISTD_H before including
270 * gdbreplay.c: Likewise.
271 * remote-utils.c: Likewise.
272 * server.c: Likewise.
273 * configure.ac: Don't check for unistd.h.
274 * configure: Regenerate.
276 2013-06-28 Tom Tromey <tromey@redhat.com>
278 * Makefile.in (version.c): Use version.in, not
281 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
283 * configure.ac (version_host, version_target): Set and AC_SUBST them.
284 * configure: Rebuild.
285 * Makefile.in (version_host, version_target): Get from configure.
286 (version.c): Use $(version_host) and $(version_target).
288 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
290 Fix trace-status to output user name without trailing colon.
291 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
293 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
295 Fix trace-status to output proper start-time and stop-time.
296 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
297 output start time and stop time in hex as gdb expects.
299 2013-06-26 Pedro Alves <pedro@codesourcery.com>
301 * tracepoint.c (build_traceframe_info_xml): Output trace state
302 variables present in the trace buffer.
304 2013-06-24 Tom Tromey <tromey@redhat.com>
306 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
309 * gdbreplay.c: Include version.h.
310 (version, host_name): Don't declare.
311 * server.h: Include version.h.
312 (version, host_name): Don't declare.
314 2013-06-12 Pedro Alves <palves@redhat.com>
316 * linux-x86-low.c (linux_is_elf64): Delete global.
317 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
318 with local linux_pid_exe_is_elf_64_file use.
320 2013-06-11 Pedro Alves <palves@redhat.com>
322 * linux-low.c (regset_disabled, disable_regset): New functions.
323 (regsets_fetch_inferior_registers)
324 (regsets_store_inferior_registers): Use them.
325 (initialize_regsets_info); Don't allocate the disabled_regsets
327 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
330 2013-06-11 Pedro Alves <palves@redhat.com>
332 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
335 2013-06-11 Pedro Alves <palves@redhat.com>
337 * linux-x86-low.c (initialize_low_arch): Call
338 init_registers_x32_avx_linux.
340 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
342 Fix compatibility with Android Bionic.
343 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
346 2013-06-07 Pedro Alves <palves@redhat.com>
349 * Makefile.in (OBS): Add tdesc.o.
350 (IPA_OBJS): Add tdesc-ipa.o.
351 (tdesc-ipa.o): New rule.
352 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
354 * linux-low.c (new_inferior): Delete.
355 (disabled_regsets, num_regsets): Delete.
356 (linux_add_process): Adjust to set the new per-process
358 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
359 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
360 was a stop. When calling arch_setup, switch the current inferior
361 to the thread that got an event.
362 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
363 (regsets_fetch_inferior_registers)
364 (regsets_store_inferior_registers): New regsets_info parameter.
366 (linux_register_in_regsets): New regs_info parameter. Adjust to
368 (register_addr, fetch_register, store_register): New usrregs_info
369 parameter. Adjust to use it.
370 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
371 parameter regs_info. Adjust to use it.
372 (linux_fetch_registers): Get the current inferior's regs_info, and
374 (linux_store_registers): Ditto.
375 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
376 (initialize_low): Don't initialize the target_regsets here. Call
378 * linux-low.h (target_regsets): Delete declaration.
379 (struct regsets_info): New.
380 (struct usrregs_info): New.
381 (struct regs_info): New.
382 (struct process_info_private) <new_inferior>: New field.
383 (struct linux_target_ops): Delete the num_regs, regmap, and
384 regset_bitmap fields. New field regs_info.
385 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
386 * i387-fp.c (num_xmm_registers): Delete.
387 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
388 calls to new interface.
389 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
390 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
391 Infer the number of xmm registers from the regcache's target
393 * i387-fp.h (num_xmm_registers): Delete.
394 * inferiors.c (add_thread): Don't install the thread's regcache
396 * proc-service.c (gregset_info): Fetch the current inferior's
397 regs_info. Adjust to use it.
398 * regcache.c: Include tdesc.h.
399 (register_bytes, reg_defs, num_registers)
400 (gdbserver_expedite_regs): Delete.
401 (get_thread_regcache): If the thread doesn't have a regcache yet,
402 create one, instead of aborting gdbserver.
403 (regcache_invalidate_one): Rename to ...
404 (regcache_invalidate_thread): ... this.
405 (regcache_invalidate_one): New.
406 (regcache_invalidate): Only invalidate registers of the current
408 (init_register_cache): Add target_desc parameter, and use it.
409 (new_register_cache): Ditto. Assert the target description has a
410 non zero registers_size.
411 (regcache_cpy): Add assertions. Adjust.
412 (realloc_register_cache, set_register_cache): Delete.
413 (registers_to_string, registers_from_string): Adjust.
414 (find_register_by_name, find_regno, find_register_by_number)
415 (register_cache_size): Add target_desc parameter, and use it.
416 (free_register_cache_thread, free_register_cache_thread_one)
417 (regcache_release, register_cache_size): New.
418 (register_size): Add target_desc parameter, and use it.
419 (register_data, supply_register, supply_register_zeroed)
420 (supply_regblock, supply_register_by_name, collect_register)
421 (collect_register_as_string, collect_register_by_name): Adjust.
422 * regcache.h (struct target_desc): Forward declare.
423 (struct regcache) <tdesc>: New field.
424 (init_register_cache, new_register_cache): Add target_desc
426 (regcache_invalidate_thread): Declare.
427 (regcache_invalidate_one): Delete declaration.
428 (regcache_release): Declare.
429 (find_register_by_number, register_cache_size, register_size)
430 (find_regno): Add target_desc parameter.
431 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
433 * remote-utils.c: Include tdesc.h.
434 (outreg, prepare_resume_reply): Adjust.
435 * server.c: Include tdesc.h.
436 (gdbserver_xmltarget): Delete declaration.
437 (get_features_xml, process_serial_event): Adjust.
438 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
440 (struct process_info) <tdesc>: New field.
441 (ipa_tdesc): Declare.
444 * tracepoint.c: Include tdesc.h.
445 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
446 (get_context_regcache): Adjust to pass ipa_tdesc down.
447 (do_action_at_tracepoint): Adjust to get the register cache size
448 from the context regcache's description.
449 (traceframe_walk_blocks): Adjust to get the register cache size
450 from the current trace frame's description.
451 (traceframe_get_pc): Adjust to get current trace frame's
452 description and pass it down.
453 (gdb_collect): Adjust to get the register cache size from the
455 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
456 (gdbserver_xmltarget): Delete.
457 (initialize_low_tracepoint): Set the ipa's target description.
458 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
459 (initialize_low_tracepoint): Set the ipa's target description.
460 * linux-x86-low.c: Include tdesc.h.
461 [__x86_64__] (is_64bit_tdesc): New.
462 (ps_get_thread_area, x86_get_thread_area): Use it.
463 (i386_cannot_store_register): Rename to ...
464 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
465 (i386_cannot_fetch_register): Rename to ...
466 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
467 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
469 (target_regsets): Rename to ...
470 (x86_regsets): ... this.
471 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
473 (x86_siginfo_fixup): Use is_64bit_tdesc.
474 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
475 (tdesc_x32_avx_linux, tdesc_x32_linux)
476 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
478 (x86_linux_update_xmltarget): Delete.
479 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
480 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
481 (AMD64_LINUX_USER64_CS): New.
482 (x86_linux_read_description): New, based on
483 x86_linux_update_xmltarget.
484 (same_process_callback): New.
485 (x86_arch_setup_process_callback): New.
486 (x86_linux_update_xmltarget): New.
487 (x86_regsets_info): New.
488 (amd64_linux_regs_info): New.
489 (i386_linux_usrregs_info): New.
490 (i386_linux_regs_info): New.
491 (x86_linux_regs_info): New.
492 (x86_arch_setup): Reimplement.
493 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
494 (x86_emit_ops): Ditto.
495 (the_low_target): Adjust. Install x86_linux_regs_info,
496 x86_cannot_fetch_register, and x86_cannot_store_register.
497 (initialize_low_arch): New.
498 * linux-ia64-low.c (tdesc_ia64): Declare.
499 (ia64_fetch_register): Adjust.
500 (ia64_usrregs_info, regs_info): New globals.
501 (ia64_regs_info): New function.
502 (the_low_target): Adjust.
503 (initialize_low_arch): New function.
504 * linux-sparc-low.c (tdesc_sparc64): Declare.
505 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
507 (sparc_arch_setup): New function.
508 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
509 (the_low_target): Adjust.
510 (initialize_low_arch): New function.
511 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
512 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
513 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
514 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
515 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
516 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
517 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
518 (tdesc_powerpc_isa205_vsx64l): Declare.
519 (ppc_cannot_store_register, ppc_collect_ptrace_register)
520 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
521 (ppc_set_pc, ppc_get_hwcap): Adjust.
522 (ppc_usrregs_info): Forward declare.
523 (!__powerpc64__) ppc_regmap_adjusted: New global.
524 (ppc_arch_setup): Adjust to the current process'es target
526 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
527 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
528 (ppc_store_evrregset): Adjust.
529 (target_regsets): Rename to ...
530 (ppc_regsets): ... this, and make static.
531 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
532 (ppc_regs_info): New function.
533 (the_low_target): Adjust.
534 (initialize_low_arch): New function.
535 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
536 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
537 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
538 (tdesc_s390x_linux64v2): Declare.
539 (s390_collect_ptrace_register, s390_supply_ptrace_register)
540 (s390_fill_gregset, s390_store_last_break): Adjust.
541 (target_regsets): Rename to ...
542 (s390_regsets): ... this, and make static.
543 (s390_get_pc, s390_set_pc): Adjust.
544 (s390_get_hwcap): New target_desc parameter, and use it.
545 [__s390x__] (have_hwcap_s390_high_gprs): New global.
546 (s390_arch_setup): Adjust to set the current process'es target
547 description. Don't adjust the regmap.
548 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
549 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
550 (regs_info_3264): New globals.
551 (s390_regs_info): New function.
552 (the_low_target): Adjust.
553 (initialize_low_arch): New function.
554 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
555 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
556 [__mips64] (init_registers_mips_linux)
557 (init_registers_mips_dsp_linux): Delete defines.
558 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
559 (have_dsp): New global.
560 (mips_read_description): New, based on mips_arch_setup.
561 (mips_arch_setup): Reimplement.
562 (get_usrregs_info): New function.
563 (mips_cannot_fetch_register, mips_cannot_store_register)
564 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
565 (mips_fill_fpregset, mips_store_fpregset): Adjust.
566 (target_regsets): Rename to ...
567 (mips_regsets): ... this, and make static.
568 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
569 (dsp_regs_info, regs_info): New globals.
570 (mips_regs_info): New function.
571 (the_low_target): Adjust.
572 (initialize_low_arch): New function.
573 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
574 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
576 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
577 (arm_read_description): New, with bits factored from
579 (arm_arch_setup): Reimplement.
580 (target_regsets): Rename to ...
581 (arm_regsets): ... this, and make static.
582 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
583 (arm_regs_info): New function.
584 (the_low_target): Adjust.
585 (initialize_low_arch): New function.
586 * linux-m68k-low.c (tdesc_m68k): Declare.
587 (target_regsets): Rename to ...
588 (m68k_regsets): ... this, and make static.
589 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
590 (m68k_regs_info): New function.
591 (m68k_arch_setup): New function.
592 (the_low_target): Adjust.
593 (initialize_low_arch): New function.
594 * linux-sh-low.c (tdesc_sharch): Declare.
595 (target_regsets): Rename to ...
596 (sh_regsets): ... this, and make static.
597 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
598 (sh_regs_info, sh_arch_setup): New functions.
599 (the_low_target): Adjust.
600 (initialize_low_arch): New function.
601 * linux-bfin-low.c (tdesc_bfin): Declare.
602 (bfin_arch_setup): New function.
603 (bfin_usrregs_info, regs_info): New globals.
604 (bfin_regs_info): New function.
605 (the_low_target): Adjust.
606 (initialize_low_arch): New function.
607 * linux-cris-low.c (tdesc_cris): Declare.
608 (cris_arch_setup): New function.
609 (cris_usrregs_info, regs_info): New globals.
610 (cris_regs_info): New function.
611 (the_low_target): Adjust.
612 (initialize_low_arch): New function.
613 * linux-cris-low.c (tdesc_crisv32): Declare.
614 (cris_arch_setup): New function.
615 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
616 (cris_regs_info): New function.
617 (the_low_target): Adjust.
618 (initialize_low_arch): New function.
619 * linux-m32r-low.c (tdesc_m32r): Declare.
620 (m32r_arch_setup): New function.
621 (m32r_usrregs_info, regs_info): New globals.
622 (m32r_regs_info): Adjust.
623 (initialize_low_arch): New function.
624 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
625 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
626 (tic6x_usrregs_info): Forward declare.
627 (tic6x_read_description): New function, based on ...
628 (tic6x_arch_setup): ... this. Reimplement.
629 (target_regsets): Rename to ...
630 (tic6x_regsets): ... this, and make static.
631 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
632 (tic6x_regs_info): New function.
633 (the_low_target): Adjust.
634 (initialize_low_arch): New function.
635 * linux-xtensa-low.c (tdesc_xtensa): Declare.
636 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
637 (target_regsets): Rename to ...
638 (xtensa_regsets): ... this, and make static.
639 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
641 (xtensa_arch_setup, xtensa_regs_info): New functions.
642 (the_low_target): Adjust.
643 (initialize_low_arch): New function.
644 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
645 (nios2_arch_setup): Set the current process'es tdesc.
646 (target_regsets): Rename to ...
647 (nios2_regsets): ... this.
648 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
649 (nios2_regs_info): New function.
650 (the_low_target): Adjust.
651 (initialize_low_arch): New function.
652 * linux-aarch64-low.c (tdesc_aarch64): Declare.
653 (aarch64_arch_setup): Set the current process'es tdesc.
654 (target_regsets): Rename to ...
655 (aarch64_regsets): ... this.
656 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
657 (aarch64_regs_info): New function.
658 (the_low_target): Adjust.
659 (initialize_low_arch): New function.
660 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
662 (target_regsets): Rename to ...
663 (tile_regsets): ... this.
664 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
665 (tile_regs_info): New function.
666 (tile_arch_setup): Set the current process'es tdesc.
667 (the_low_target): Adjust.
668 (initialize_low_arch): New function.
669 * spu-low.c (tdesc_spu): Declare.
670 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
671 * win32-arm-low.c (tdesc_arm): Declare.
672 (arm_arch_setup): New function.
673 (the_low_target): Install arm_arch_setup instead of
675 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
676 (init_windows_x86): Rename to ...
677 (i386_arch_setup): ... this. Set `win32_tdesc'.
678 (the_low_target): Adjust.
679 * win32-low.c (win32_tdesc): New global.
680 (child_add_thread): Don't create the thread cache here.
681 (do_initial_child_stuff): Set the new process'es tdesc.
682 * win32-low.h (struct target_desc): Forward declare.
683 (win32_tdesc): Declare.
684 * lynx-i386-low.c (tdesc_i386): Declare global.
685 (lynx_i386_arch_setup): Set `lynx_tdesc'.
686 * lynx-low.c (lynx_tdesc): New global.
687 (lynx_add_process): Set the new process'es tdesc.
688 * lynx-low.h (struct target_desc): Forward declare.
689 (lynx_tdesc): Declare global.
690 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
691 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
692 * nto-low.c (nto_tdesc): New global.
693 (do_attach): Set the new process'es tdesc.
694 * nto-low.h (struct target_desc): Forward declare.
695 (nto_tdesc): Declare.
696 * nto-x86-low.c (tdesc_i386): Declare.
697 (nto_x86_arch_setup): Set `nto_tdesc'.
699 2013-06-04 Gary Benson <gbenson@redhat.com>
701 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
702 to qSupported response when appropriate.
703 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
704 with nonzero-length annex.
705 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
706 arguments supplied in annex.
708 2013-05-31 Doug Evans <dje@google.com>
711 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
712 64 bits in 64-cross-32 environment.
714 2013-05-28 Pedro Alves <palves@redhat.com>
716 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
717 (aarch64-without-fpu.c): Delete rule.
718 * configure.srv (aarch64*-*-linux*): Remove references to
719 aarch64-without-fpu.o and aarch64-without-fpu.xml.
720 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
723 2013-05-24 Pedro Alves <palves@redhat.com>
725 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
726 instead of strchr/decode_address. Error if the range isn't split
727 with a ','. Don't assume there's be a ':' in the action.
729 2013-05-23 Yao Qi <yao@codesourcery.com>
730 Pedro Alves <palves@redhat.com>
732 * linux-low.c (lwp_in_step_range): New function.
733 (linux_wait_1): If the thread was range stepping and stopped
734 outside the stepping range, report the stop to GDB. Otherwise,
735 continue stepping. Add range stepping debug output.
736 (linux_set_resume_request): Copy the step range from the resume
738 (linux_supports_range_stepping): New.
739 (linux_target_ops) <supports_range_stepping>: Set to
740 linux_supports_range_stepping.
741 * linux-low.h (struct linux_target_ops)
742 <supports_range_stepping>: New field.
743 (struct lwp_info) <step_range_start, step_range_end>: New fields.
744 * linux-x86-low.c (x86_supports_range_stepping): New.
745 (the_low_target) <supports_range_stepping>: Set to
746 x86_supports_range_stepping.
747 * server.c (handle_v_cont): Handle 'r' action.
748 (handle_v_requests): Append ";r" if the target supports range
750 * target.h (struct thread_resume) <step_range_start,
751 step_range_end>: New fields.
752 (struct target_ops) <supports_range_stepping>:
754 (target_supports_range_stepping): New macro.
756 2013-05-17 Joel Brobecker <brobecker@adacore.com>
758 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
759 confusion in comment.
761 2013-05-17 Joel Brobecker <brobecker@adacore.com>
763 * lynx-low.c (struct process_info_private): New type.
764 (lynx_add_process): New function.
765 (lynx_create_inferior, lynx_attach): Replace calls to
766 add_process by calls to lynx_add_process.
767 (lynx_resume): If PTID is null, then try using
768 current_process()->private->last_wait_event_ptid.
770 (lynx_clear_inferiors): Delete. The contents of that function
771 has been inlined in lynx_mourn;
772 (lynx_wait_1): Save the ptid in the process's private data.
773 (lynx_mourn): Free the process' private data. Replace call
774 to lynx_clear_inferiors by call to clear_inferiors.
776 2013-05-17 Yao Qi <yao@codesourcery.com>
778 * i386-low.c (i386_length_and_rw_bits): Move the comment to
781 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
783 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
784 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
785 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
786 PT_TEXT_END_ADDR guards. Update comments.
787 (linux_target_op) <read_offsets>: Conditionally define to
788 linux_read_offsets if the target is UCLIBC and if it defines
789 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
791 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
792 Andrew Jenner <andrew@codesourcery.com>
794 * Makefile.in (SFILES): Add linux-nios2-low.c.
795 (clean): Add action to delete nios2-linux.c.
796 (nios2-linux.c): New rule.
797 * configure.srv: Add nios2*-*-linux*.
798 * linux-nios2-low.c: New.
800 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
802 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
804 2013-04-25 Hui Zhu <hui@codesourcery.com>
807 * ax.c (ax_printf): Add fflush.
809 2013-04-22 Tom Tromey <tromey@redhat.com>
811 * Makefile.in (SFILES): Add filestuff.c.
812 (OBS): Add filestuff.o.
813 (filestuff.o): New target.
814 * config.in, configure: Rebuild.
815 * configure.ac: Check for fdwalk, pipe2.
817 2013-04-17 Pedro Alves <palves@redhat.com>
819 * configure.ac (USE_THREAD_DB): Delete variable.
820 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
821 Don't AC_SUBST USE_THREAD_DB.
822 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
823 * config.in, configure: Regenerate.
825 2013-04-16 Pedro Alves <palves@redhat.com>
827 * linux-low.h (struct lwp_info) <thread_known>: Move under
828 the USE_THREAD_DB #ifdef.
830 2013-04-16 Pedro Alves <palves@redhat.com>
832 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
833 (linux-low.o): Delete rule.
834 * linux-low.h: Always include "gdb_thread_db.h" instead of
835 conditionally including thread_db.h.
836 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
839 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
841 * Makefile.in (install-only): Fix make install regression.
843 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
845 Convert man pages to texinfo, new gdbinit.5 texinfo page.
846 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
848 * gdbserver.1: Remove.
850 2013-03-22 Pedro Alves <palves@redhat.com>
852 * linux-low.c (handle_extended_wait): Don't call
853 linux_enable_event_reporting.
855 2013-03-15 Tony Theodore <tonyt@logyst.com>
858 * Makefile.in (SHELL): Use @SHELL@.
860 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
862 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
865 2013-03-13 Joel Brobecker <brobecker@adacore.com>
867 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
868 Remove extraneous NULL element.
870 2013-03-13 Yao Qi <yao@codesourcery.com>
872 * tracepoint.c (traceframe_read_tsv): Look for the last matched
873 'V' block in trace frame.
875 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
877 * target.h (struct target_ops): Add btrace ops.
878 (target_supports_btrace): New macro.
879 (target_enable_btrace): New macro.
880 (target_disable_btrace): New macro.
881 (target_read_btrace): New macro.
882 * gdbthread.h (struct thread_info): Add btrace field.
883 * server.c: Include btrace-common.h.
884 (handle_btrace_general_set): New function.
885 (handle_btrace_enable): New function.
886 (handle_btrace_disable): New function.
887 (handle_general_set): Call handle_btrace_general_set.
888 (handle_qxfer_btrace): New function.
889 (struct qxfer qxfer_packets[]): Add btrace entry.
890 * inferiors.c (remove_thread): Disable btrace.
891 * linux-low: Include linux-btrace.h.
892 (linux_low_enable_btrace): New function.
893 (linux_low_read_btrace): New function.
894 (linux_target_ops): Add btrace ops.
895 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
896 Add srv_linux_btrace=yes.
897 (x86_64-*-linux*): Add linux-btrace.o.
898 Add srv_linux_btrace=yes.
899 * configure.ac: Define HAVE_LINUX_BTRACE.
900 * config.in: Regenerated.
901 * configure: Regenerated.
903 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
905 * server.c (handle_qxfer): Preserve error message if -3 is
907 (qxfer): Document the -3 return value.
909 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
911 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
912 (linux_btrace_h): New variable.
913 (linux-btrace.o): New rule.
915 2013-03-08 Stan Shebs <stan@codesourcery.com>
916 Hafiz Abid Qadeer <abidh@codesourcery.com>
918 * tracepoint.c (trace_buffer_size): New global.
919 (DEFAULT_TRACE_BUFFER_SIZE): New define.
920 (init_trace_buffer): Change to one-argument function. Allocate
922 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
923 handle QTBuffer:size packet.
924 (cmd_bigqtbuffer_size): New function.
925 (initialize_tracepoint): Call init_trace_buffer with
926 DEFAULT_TRACE_BUFFER_SIZE.
927 * server.c (handle_query): Add QTBuffer:size in the
930 2013-03-07 Yao Qi <yao@codesourcery.com>
932 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
933 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
935 (cmd_qtsp): Adjust condition. Do post increment.
936 Set cur_action and cur_step_action back to 0.
938 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
941 * linux-low.c (linux_write_memory): Return early success if LEN is
944 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
946 * configure.srv: Add x86_64-*-cygwin* as target.
948 2013-02-28 Tom Tromey <tromey@redhat.com>
950 * configure.ac: Invoke AC_SYS_LARGEFILE.
951 * configure, config.in: Rebuild.
953 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
955 * win32-low.c: Throughout, fix format strings and casts of
956 printf-like functions to avoid type related warnings on all
958 (get_child_debug_event): Print dwDebugEventCode as hex since
959 that's how it's usually documented.
961 2013-02-28 Yao Qi <yao@codesourcery.com>
963 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
966 2013-02-27 Jiong Wang <jiwang@tilera.com>
968 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
969 (reg-tilegx32.c): New rule.
970 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
971 * linux-tile-low.c (tile_arch_setup): New function. Invoke
972 different register info initializer according to elf class.
973 (init_registers_tilgx32): New function. The tilegx32 register info
975 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
976 (tile_store_gregset): Likewise.
978 2013-02-27 Yao Qi <yao@codesourcery.com>
980 * server.c (process_point_options): Print debug message when
981 debug_threads is true.
983 2013-02-26 Yao Qi <yao@codesourcery.com>
985 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
987 2013-02-19 Pedro Alves <palves@redhat.com>
988 Kai Tietz <ktietz@redhat.com>
992 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
993 instead of strtoul to extract address from packet.
994 (process_serial_event) <'z'>: Likewise.
996 2013-02-18 Yao Qi <yao@codesourcery.com>
998 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1000 2013-02-14 Pedro Alves <palves@redhat.com>
1004 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1005 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1007 2013-02-14 Pedro Alves <palves@redhat.com>
1009 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1011 2013-02-14 Pedro Alves <palves@redhat.com>
1013 * tracepoint.c (save_string): Delete.
1014 (add_tracepoint_action): Use savestring instead of save_string.
1016 2013-02-12 Pedro Alves <palves@redhat.com>
1018 * linux-xtensa-low.c: Ditto.
1019 * xtensa-xtregs.c: Ditto.
1021 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1023 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1026 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1028 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1029 aarch64_num_wp_regs and aarch64_num_bp_regs to
1030 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1032 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1034 * linux-aarch64-low.c (ps_get_thread_area): Replace
1035 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1037 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1038 Marcus Shawcroft <marcus.shawcroft@arm.com>
1039 Nigel Stephens <nigel.stephens@arm.com>
1040 Yufeng Zhang <yufeng.zhang@arm.com>
1042 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1043 (aarch64.c, aarch64-without-fpu.c): New targets.
1044 * configure.srv (aarch64*-*-linux*): New.
1045 * linux-aarch64-low.c: New file.
1047 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1049 * linux-low.c (handle_extended_wait, linux_create_inferior)
1050 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1051 (dequeue_one_deferred_signal, linux_resume_one_thread)
1052 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1053 (linux_tracefork_grandchild, linux_test_for_tracefork)
1054 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1055 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1056 where the argument is 0.
1058 2013-01-25 Yao Qi <yao@codesourcery.com>
1060 * event-loop.c: Include "queue.h".
1061 (gdb_event_p): New typedef.
1062 (struct gdb_event) <next_event>: Remove.
1063 (event_queue): Change to QUEUE(gdb_event_p).
1064 (async_queue_event): Remove.
1065 (gdb_event_xfree): New.
1066 (initialize_event_loop): New.
1067 (process_event): Use API from QUEUE.
1068 (wait_for_event): Likewise.
1069 * server.c (main): Call initialize_event_loop.
1070 * server.h (initialize_event_loop): Declare.
1072 2013-01-18 Yao Qi <yao@codesourcery.com>
1074 * ax.h (struct eval_agent_expr_context): New.
1075 (gdb_eval_agent_expr): Update declaration.
1076 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1077 TFRAME. Add new argument CTX.
1078 * server.h (struct eval_agent_expr_context): Declare.
1079 (agent_mem_read, agent_tsv_read): Update declaration.
1080 (agent_mem_read_string): Likewise.
1081 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1082 (add_traceframe_block): Add new argument TPOINT.
1083 Increase TPOINT->traceframe_usage.
1084 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1085 eval_tracepoint_agent_expr.
1086 (condition_true_at_tracepoint): Likewise.
1087 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1088 (agent_mem_read_string, agent_tsv_read): Likewise.
1090 2013-01-16 Yao Qi <yao@codesourcery.com>
1092 * linux-low.c (linux_resume_one_lwp): Don't check
1093 'lwp->bp_reinsert != 0'.
1095 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1096 Pedro Alves <palves@redhat.com>
1098 * lynx-low.c (ptrace_request_to_str): Define a temporary
1099 macro and use it to simplify this function's implementation.
1101 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1103 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1106 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1108 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1110 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1112 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1114 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1116 * lynx-low.c (lynx_resume): Use the resume_info parameter
1117 to determine the ptid for the lynx_ptrace call, unless
1118 it is equal to minus_one_ptid, in which case we use the
1119 ptid of the current_inferior.
1120 (lynx_wait_1): After having received a thread create/exit
1121 event, resume the inferior's execution using the signaling
1122 thread's ptid, rather than the old ptid.
1124 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1126 * lynx-low.c (lynx_resume): Delete variable ret.
1128 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1130 * gdbreplay.c (gdbreplay_version): Update copyright year.
1131 * server.c (gdbserver_version): Likewise.
1133 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1135 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1138 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1140 * lynx-low.c (ptrace_request_to_str): Add handling for
1143 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1145 * lynx-low.c (lynx_attach): Delete variable new_process.
1147 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1149 * lynx-low.c (lynx_create_inferior): Delete variable
1152 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1154 * lynx-low.c (ptrace_request_to_str): Do not handle
1155 PTRACE_GETTHREADLIST if this macro does not exist.
1157 2012-12-15 Yao Qi <yao@codesourcery.com>
1159 * Makefile.in (OBS): Add notif.o.
1160 * notif.c, notif.h: New.
1161 * server.c: Include "notif.h".
1162 (struct vstop_notif) <next>: Remove.
1164 (queue_stop_reply): Update.
1165 (push_event, send_next_stop_reply): Remove.
1166 (discard_queued_stop_replies): Update.
1167 (notif_stop): New variable.
1168 (handle_v_stopped): Remove.
1169 (handle_v_requests): Don't call handle_v_stopped. Call
1170 handle_ack_notif instead.
1171 (queue_stop_reply_callback): Call notif_event_enque instead
1172 of queue_stop_reply.
1173 (handle_status): Don't call send_next_stop_reply, call
1174 notif_write_event instead.
1175 (kill_inferior_callback): Likewise.
1176 (detach_or_kill_inferior_callback): Likewise.
1177 (main): Call initialize_notif.
1178 (process_serial_event): Call QUEUE_is_empty.
1179 (handle_target_event): Call notif_push instead of push event.
1180 * server.h (push_event): Remove declaration.
1182 2012-12-10 Tom Tromey <tromey@redhat.com>
1184 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1185 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1188 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1189 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1190 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1191 (amd64-linux-ipa.o, ax.o): Rewrite.
1192 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1193 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1194 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1195 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1196 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1197 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1198 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1199 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1200 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1201 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1202 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1203 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1204 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1205 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1206 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1207 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1208 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1209 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1210 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1211 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1212 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1213 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1214 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1215 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1216 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1217 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1218 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1219 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1220 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1221 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1222 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1223 (reg-tilegx.o): Remove.
1224 (all_object_files): New macro.
1225 Include .deps files.
1226 * aclocal.m4, configure: Rebuild.
1227 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1228 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1229 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1231 2012-12-05 Tom Tromey <tromey@redhat.com>
1234 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1236 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1238 * configure.ac: Check for linux/perf_event.h.
1239 * config.in: Regenerated.
1240 * configure: Regenerated.
1242 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1244 * hostio.c (handle_readlink): Decrease buffer size
1245 parameter passed to readlink by one byte.
1247 2012-11-26 Yao Qi <yao@codesourcery.com>
1249 * configure.ac (build_warnings): Append '-Wempty-body'.
1250 * configure: Regenerated.
1251 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1254 2012-11-15 Pierre Muller <muller@sourceware.org>
1256 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1257 * config.in: Regenerate.
1258 * configure: Regenerate.
1259 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1260 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1261 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1262 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1264 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1265 instead of <sys/wait.h> header.
1266 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1268 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1270 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1271 (various make rules): Remove -DGDBSERVER
1273 2012-11-09 Yao Qi <yao@codesourcery.com>
1275 * spu-low.c (current_ptid): Move it to ..
1276 * gdbthread.h: ... here. New.
1277 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1278 * server.c (myresume, process_serial_event): Likewise.
1279 * thread-db.c (thread_db_find_new_threads): Likewise.
1280 * tracepoint.c (run_inferior_command): Likewise.
1282 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1284 * server.c (handle_search_memory_1): Include access length in
1287 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1289 * linux-crisv32-low.c: Fix compile errors.
1291 2012-09-04 Yao Qi <yao@codesourcery.com>
1293 * tracepoint.c (cmd_qtsv): Adjust debug message.
1294 Don't check CUR_TPOINT.
1296 2012-08-28 Yao Qi <yao@codesourcery.com>
1298 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1299 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1300 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1301 Remove declarations of xmalloc, xreallloc, xstrdup and
1303 * Makefile.in (libiberty_h): New.
1304 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1305 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1307 2012-08-23 Yao Qi <yao@codesourcery.com>
1309 * server.h: Remove declaration of 'xsnprintf'.
1311 2012-08-22 Keith Seitz <keiths@redhat.com>
1313 * server.h: Include build-gnulib-gbserver/config.h.
1314 * gdbreplay.c: Likewise.
1316 2012-08-08 Doug Evans <dje@google.com>
1318 * Makefile.in (SFILES): Add gdb_vecs.c.
1319 (OBS): Add gdb_vecs.o.
1320 (gdb_vecs_h, host_defs_h): New variables.
1321 (thread-db.o): Add $(gdb_vecs_h) dependency.
1322 (gdb_vecs.o): New rule.
1323 * thread-db.c: #include "gdb_vecs.h".
1324 (thread_db_load_search): Use a vector to iterate over path elements.
1325 Handle text appearing after "$pdir".
1327 * configure.ac: Add check for strstr.
1328 * config.in: Regenerate.
1329 * configure: Regenerate.
1331 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1333 * hostio.c (handle_pread): If pread fails, fall back to attempting
1335 (handle_pwrite): Likewise for pwrite.
1337 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1339 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1340 between unsupported TYPE and unimplementable ADDR/LEN combination.
1341 (arm_insert_point): Act on new return value.
1343 2012-07-31 Pedro Alves <palves@redhat.com>
1345 * server.c (process_point_options): Only skip tokens if we find
1346 one that is unrecognized. Don't treat 'X' specially while
1347 skipping unrecognized tokens.
1349 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1351 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1352 to 4-byte-align HW breakpoint addresses for Thumb.
1354 2012-07-27 Yao Qi <yao@codesourcery.com>
1358 * server.h: Declare gdb_agent_about_to_close.
1359 * target.c (kill_inferior): Include "agent.h".
1360 New. Send command 'kill'.
1361 * target.h (kill_inferior): Removed macro.
1362 * tracepoint.c (gdb_agent_about_to_close): New.
1363 (gdb_agent_helper_thread): Handle command 'close'.
1364 Wait endlessly until the inferior stops.
1365 Install gdb_agent_remove_socket to atexit hook.
1366 (agent_socket_name): New static variable.
1367 (gdb_agent_socket_init): Replace local variable 'name' with
1368 'agent_socket_name'.
1369 (gdb_agent_remove_socket): New.
1371 2012-07-27 Yao Qi <yao@codesourcery.com>
1373 * server.c (process_point_options): Stop at 'X' when parsing.
1375 2012-07-19 Michael Eager <eager@eagercon.com>
1377 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1379 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1380 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1381 hardware breakpoint.
1383 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1385 * gdbserver/linux-low.c (initialize_low): Call
1386 linux_ptrace_init_warnings.
1388 2012-07-02 Doug Evans <dje@google.com>
1390 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1393 2012-07-02 Stan Shebs <stan@codesourcery.com>
1395 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1396 (ax.o): Add it to build rule.
1398 (OBS): Add format.o.
1399 (IPA_OBS): Add format.o.
1400 * server.c (handle_query): Claim support for breakpoint commands.
1401 (process_point_options): Add command case.
1402 (process_serial_event): Leave running if there are printfs in
1404 * mem-break.h (any_persistent_commands): Declare.
1405 (add_breakpoint_commands): Declare.
1406 (gdb_no_commands_at_breakpoint): Declare.
1407 (run_breakpoint_commands): Declare.
1408 * mem-break.c (struct point_command_list): New struct.
1409 (struct breakpoint): New field command_list.
1410 (any_persistent_commands): New function.
1411 (add_commands_to_breakpoint): New function.
1412 (add_breakpoint_commands): New function.
1413 (gdb_no_commands_at_breakpoint): New function.
1414 (run_breakpoint_commands): New function.
1415 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1417 * ax.c: Include format.h.
1418 (ax_printf): New function.
1419 (gdb_eval_agent_expr): Add printf opcode.
1421 2012-06-13 Yao Qi <yao@codesourcery.com>
1423 * server.c (start_inferior): Remove duplicated writes to fields
1424 'last_resume_kind' and 'last_status' of 'current_inferior'.
1426 2012-06-12 Yao Qi <yao@codesourcery.com>
1427 Pedro Alves <palves@redhat.com>
1429 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1431 * server.c (handle_v_cont): Extend comment.
1433 2012-06-11 Yao Qi <yao@codesourcery.com>
1435 * linux-low.c (linux_attach): Add 'static'.
1437 2012-06-06 Yao Qi <yao@codesourcery.com>
1439 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1441 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1443 Fix gcc -flto compilation warning.
1444 * server.c (main): Make variable multi_mode and attach volatile.
1446 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1448 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1449 if the platform doesn't know about it.
1451 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1453 * Makefile.in (SFILES): Add linux-tile-low.c.
1454 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1455 * configure.srv: Handle tilegx-*-linux*.
1456 * linux-tile-low.c: New file.
1458 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1460 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1462 2012-05-24 Pedro Alves <palves@redhat.com>
1466 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1468 2012-05-24 Pedro Alves <palves@redhat.com>
1472 Replace target_signal with gdb_signal throughout.
1474 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1476 * linux-low.c (linux_store_registers): Avoid the copying sequence
1477 when no data has been retrieved by ptrace.
1479 2012-05-22 Will Deacon <will.deacon@arm.com>
1481 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1482 Include asm/ptrace.h.
1483 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1486 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1488 * linux-low.c (linux_store_registers): Don't re-retrieve data
1489 with ptrace that has already been obtained from /proc. Always
1490 copy any data retrieved with ptrace to the buffer supplied.
1492 2012-05-11 Yao Qi <yao@codesourcery.com>
1493 Pedro Alves <palves@redhat.com>
1495 * linux-low.c (enum stopping_threads_kind): New.
1496 (stopping_threads): Change type to `enum stopping_threads_kind'.
1497 (handle_extended_wait): If stopping and suspending threads, leave
1498 the new_lwp suspended too.
1499 (linux_wait_for_event): Adjust.
1500 (stop_all_lwps): Set `stopping_threads' to
1501 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1502 whether we're suspending threads or just stopping them. Assert no
1505 2012-04-29 Yao Qi <yao@codesourcery.com>
1507 * server.h: Move some code to ...
1508 * gdbthread.h: ... here. New.
1509 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1510 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1511 (nto-low.o, win32-low.o): Likewise.
1512 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1513 * regcache.c, remote-utils.c, server.c: Likewise.
1514 * target.c, tracepoint.c, win32-low.c: Likewise.
1516 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1518 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1519 (PTRACE_ARG4_TYPE): Likewise.
1520 (PTRACE_XFER_TYPE): Likewise.
1521 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1522 ptrace to PTRACE_ARG3_TYPE.
1523 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1524 (PTRACE_ARG4_TYPE): Likewise.
1525 (PTRACE_XFER_TYPE): Likewise.
1526 (linux_detach_one_lwp): Cast fourth argument of
1527 ptrace to long then PTRACE_ARG4_TYPE.
1528 (regsets_fetch_inferior_registers): Cast third argument of
1529 ptrace to long then PTRACE_ARG3_TYPE.
1530 (regsets_store_inferior_registers): Likewise.
1532 2012-04-20 Pedro Alves <palves@redhat.com>
1534 * configure: Regenerate.
1536 2012-04-19 Pedro Alves <palves@redhat.com>
1538 * Makefile.in (GNULIB_BUILDDIR): New.
1539 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1540 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1541 (all, install-only, uninstall, clean-info, all-lib, clean): No
1542 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1543 (maintainer-clean realclean distclean): Use subdir_do.
1545 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1546 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1547 * acinclude.m4: Include acx_configure_dir.m4.
1548 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1549 calls. Call AC_PROG_RANLIB. Configure gnulib using
1552 (GNULIB_STDINT_H): Adjust.
1553 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1554 * gdbreplay.c: Include build-gnulib/config.h.
1555 * server.h: Likewise.
1556 * aclocal.m4: Regenerate.
1557 * config.in: Regenerate.
1558 * configure: Regenerate.
1560 2012-04-19 Pedro Alves <palves@redhat.com>
1562 * Makefile.in (LIBGNU, INCGNU): Adjust.
1563 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1564 (all, install-only, uninstall, clean-info, all-lib, clean)
1565 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1566 * configure.ac: Adjust AC_OUTPUT output.
1567 * aclocal.m4: Regenerate.
1568 * configure: Regenerate.
1570 2012-04-19 Pedro Alves <palves@redhat.com>
1572 * Makefile.in (generated_files): New.
1573 (server_h): Remove the explicit dependency on config.h, and depend
1574 on $generated_files.
1576 2012-04-19 Pedro Alves <palves@redhat.com>
1578 * Makefile.in (INCGNU): Add -Ignulib.
1580 2012-04-19 Pedro Alves <palves@redhat.com>
1582 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1583 (INCGNU): ... this, and spell out -I here.
1584 (GNULIB_LIB): Rename to ...
1586 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1588 2012-04-19 Pedro Alves <palves@redhat.com>
1590 * config.in: Regenerate.
1592 2012-04-19 Pedro Alves <palves@redhat.com>
1594 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1595 * server.h (memmem): Remove declaration.
1596 * config.in: Regenerate.
1597 * configure: Regenerate.
1599 2012-04-19 Yao Qi <yao@codesourcery.com>
1601 * Makefile.in (SFILES): Add common/vec.c.
1605 2012-04-19 Yao Qi <yao@codesourcery.com>
1607 * remote-utils.c (prepare_resume_reply): Replace with macro
1608 target_core_of_thread.
1609 * server.c (handle_qxfer_threads_proper): Likewise.
1610 * target.h (traget_core_of_thread): New macro.
1612 2012-04-18 Pedro Alves <palves@redhat.com>
1614 * aclocal.m4: Regenerate.
1615 * configure: Regenerate.
1617 2012-04-16 Yao Qi <yao@codesourcery.com>
1619 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1620 duplicated on address.
1622 2012-04-16 Yao Qi <yao@codesourcery.com>
1624 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1625 (struct tracepoint_action_ops) <send>: New field.
1626 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1627 (agent_expr_send, x_tracepoint_action_send): New.
1628 (l_tracepoint_action_send): New.
1629 (cmd_qtdp): Download and install tracepoint
1630 according to `use_agent'.
1631 (run_inferior_command): Add one more parameter `len'.
1633 (tracepoint_send_agent): New.
1634 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1636 2012-04-16 Yao Qi <yao@codesourcery.com>
1638 * tracepoint.c (download_tracepoints): Moved to ...
1639 (cmd_qtstart): ... here.
1641 2012-04-14 Yao Qi <yao@codesourcery.com>
1643 * tracepoint.c: Include inttypes.h.
1644 (struct collect_memory_action): Use sized types.
1645 (struct tracepoint): Likewise.
1646 (cmd_qtdp, stop_tracing): Update print specifiers.
1647 (cmd_qtp, response_tracepoint): Likewise.
1648 (collect_data_at_tracepoint): Likewise.
1649 (collect_data_at_step): Likewise.
1651 2012-04-14 Yao Qi <yao@codesourcery.com>
1653 Import gnulib module inttypes.
1654 * aclocal.m4, config.in, configure: Regenerated.
1656 2012-04-14 Yao Qi <yao@codesourcery.com>
1658 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1659 Makefile and config.status at last.
1661 2012-04-13 Yao Qi <yao@codesourcery.com>
1663 * tracepoint.c: Include stdint.h unconditionally.
1665 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1667 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1668 on BFD_HAVE_SYS_PROCFS_TYPE.
1669 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1670 * configure: Regenerate.
1671 * config.in: Likewise.
1673 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1675 * Makefile.in (clean): Also remove x32.c x32-linux.c
1676 x32-avx.c x32-avx-linux.c.
1677 (x32.o): New target.
1679 (x32-linux.o): Likewise.
1680 (x32-linux.c): Likewise.
1681 (x32-avx.o): Likewise.
1682 (x32-avx.c): Likewise.
1683 (x32-avx-linux.o): Likewise.
1684 (x32-avx-linux.c): Likewise.
1686 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1687 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1688 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1689 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1690 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1691 i386/x32-avx-linux.xml.
1693 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1694 (init_registers_x32_avx_linux): Likwise.
1695 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1696 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1698 2012-04-13 Pedro Alves <palves@redhat.com>
1700 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1701 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1702 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1703 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1706 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1708 * linux-x86-low.c (compat_x32_clock_t): New.
1709 (compat_x32_siginfo_t): Likewise.
1710 (compat_x32_siginfo_from_siginfo): Likewise.
1711 (siginfo_from_compat_x32_siginfo): Likewise.
1712 (linux_is_elf64): Likewise.
1713 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1714 and siginfo_from_compat_x32_siginfo for x32.
1715 (x86_arch_setup): Set linux_is_elf64.
1717 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1720 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1722 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1723 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1724 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1725 compatible with process.
1727 2012-04-12 Yao Qi <yao@codesourcery.com>
1729 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1730 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1731 (install-only, install-info, clean): Handle sub dir gnulib.
1732 (all-lib, am--refresh): New targets.
1733 (memmem.o): Remove target.
1734 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1735 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1736 (AC_REPLACE_FUNCS): Remove memmem.
1737 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1738 (AC_OUTPUT): Generate Makefile in gnulib/.
1739 * aclocal.m4, config.in, configure: Regenerated.
1741 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1743 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1745 2012-04-05 Pedro Alves <palves@redhat.com>
1747 -Werror=strict-aliasing
1749 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1752 2012-04-04 Pedro Alves <palves@redhat.com>
1754 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1755 (sparc_store_gregset_from_stack, sparc_store_gregset)
1756 (sparc_breakpoint_at): Fix formatting.
1758 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1760 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1762 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1763 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1764 * config.in: Regenerate.
1765 * configure: Likewise.
1767 2012-03-29 Pedro Alves <palves@redhat.com>
1769 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1770 Correct ptrace arguments.
1772 2012-03-28 Pedro Alves <palves@redhat.com>
1774 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1775 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1776 (IA64_FR1_REGNUM): New defines.
1777 (ia64_fetch_register): New.
1778 (the_low_target): Install it.
1779 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1781 * linux-low.c (linux_fetch_registers): Try the
1782 the_low_target.fetch_register hook first.
1784 * linux-arm-low.c (the_low_target): Adjust.
1785 * linux-bfin-low.c (the_low_target): Adjust.
1786 * linux-cris-low.c (the_low_target): Adjust.
1787 * linux-crisv32-low.c (the_low_target): Adjust.
1788 * linux-m32r-low.c (the_low_target): Adjust.
1789 * linux-m68k-low.c (the_low_target): Adjust.
1790 * linux-mips-low.c (the_low_target): Adjust.
1791 * linux-ppc-low.c (the_low_target): Adjust.
1792 * linux-s390-low.c (the_low_target): Adjust.
1793 * linux-sh-low.c (the_low_target): Adjust.
1794 * linux-sparc-low.c (the_low_target): Adjust.
1795 * linux-tic6x-low.c (the_low_target): Adjust.
1796 * linux-x86-low.c (the_low_target): Adjust.
1797 * linux-xtensa-low.c (the_low_target): Adjust.
1799 2012-03-26 Pedro Alves <palves@redhat.com>
1801 * server.c (handle_qxfer_libraries): Don't bail early if
1802 the_target->qxfer_libraries_svr4 is not NULL.
1804 2012-03-26 Pedro Alves <palves@redhat.com>
1806 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1808 2012-03-23 Pedro Alves <palves@redhat.com>
1810 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1811 "library-list-svr4" element's start tag when the the DSO list is
1814 2012-03-23 Pedro Alves <palves@redhat.com>
1816 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1817 a variable whose type size is the same as the inferior's pointer
1820 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1822 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1824 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1825 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1826 * linux-low.h: Include <signal.h>.
1827 (struct siginfo): Remove forward declaration.
1828 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1831 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1833 * .gitignore: Ignore more files.
1835 2012-03-19 Pedro Alves <palves@redhat.com>
1836 Jan Kratochvil <jan.kratochvil@redhat.com>
1838 * server.c (cont_thread, general_thread): Add describing comments.
1839 (start_inferior): Clear `cont_thread'.
1840 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1843 2012-03-15 Yao Qi <yao@codesourcery.com>
1845 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1847 (cmd_qtdp): ... here.
1849 2012-03-15 Yao Qi <yao@codesourcery.com>
1851 * tracepoint.c (struct tracepoint_action_ops): New.
1852 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1853 (m_tracepoint_action_download): New.
1854 (r_tracepoint_action_download): New.
1855 (x_tracepoint_action_download): New.
1856 (l_tracepoint_action_download): New.
1857 (add_tracepoint_action): Install `action->ops' according type.
1858 (download_tracepoint_1): Move code `download' function pointer
1859 of various tracepoint_action_ops.
1861 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1863 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1864 linux_ptrace_attach_warnings.
1866 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1868 * Makefile.in (linux-ptrace.o): New.
1869 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1870 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1871 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1872 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1873 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1875 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1877 2012-03-08 Yao Qi <yao@codesourcery.com>
1878 Pedro Alves <palves@redhat.com>
1880 Fix PR server/13392.
1881 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1883 * tracepoint.c (remove_tracepoint): New.
1884 (cmd_qtdp): Call remove_tracepoint when failed to install.
1886 2012-03-07 Pedro Alves <palves@redhat.com>
1888 * linux-low.c (get_detach_signal): New.
1889 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1890 Pass on pending signals to PTRACE_DETACH. Check the result of the
1892 * server.c (program_signals, program_signals_p): New.
1893 (handle_general_set): Handle QProgramSignals.
1894 * server.h (program_signals, program_signals_p): Declare.
1896 2012-03-05 Pedro Alves <palves@redhat.com>
1897 Jan Kratochvil <jan.kratochvil@redhat.com>
1899 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1902 2012-03-03 Yao Qi <yao@codesourcery.com>
1904 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1905 agent_look_up_symbols.
1907 2012-03-03 Yao Qi <yao@codesourcery.com>
1909 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1910 (linux-x86-low.o): Likewise.
1911 * server.h: Remove in_process_agent_loaded.
1912 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1916 2012-03-03 Yao Qi <yao@codesourcery.com>
1918 * tracepoint.c (gdb_agent_capability): New global.
1919 (in_process_agent_loaded_ust): Renamed to
1920 `in_process_agent_supports_ust'.
1922 (in_process_agent_supports_ust): Call agent_capability_check.
1923 (clear_installed_tracepoints): Assert that agent supports
1926 2012-03-03 Yao Qi <yao@codesourcery.com>
1928 * linux-low.c (linux_supports_agent): New.
1929 (linux_target_ops): Initialize field `supports_agent' with
1930 linux_supports_agent.
1931 * target.h (struct target_ops) <supports_agent>: New.
1932 (target_supports_agent): New macro.
1933 * server.c (handle_general_set): Handle packet 'QAgent'.
1934 (handle_query): Send `QAgent+'.
1935 * Makefile.in (server.o): Depends on agent.h.
1937 2012-03-03 Yao Qi <yao@codesourcery.com>
1939 * Makefile.in (OBS): Add agent.o.
1940 Add new rule for agent.o.
1941 Track dependence of tracepoint.c on agent.h.
1942 * tracepoint.c (run_inferior_command_1):
1943 (run_inferior_command): Call agent_run_command.
1944 (gdb_ust_connect_sync_socket): Deleted. Move it to
1946 (resume_thread, stop_thread): Likewise.
1947 (gdb_ust_socket_init): Renamed to ...
1948 (gdb_agent_socket_init): ... New.
1949 (gdb_ust_thread): Renamed to ...
1950 (gdb_agent_helper_thread): ... New.
1951 (gdb_ust_init): Move some code to ...
1952 (gdb_agent_init): ... here. New.
1953 [HAVE_UST]: Call gdb_ust_init.
1954 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1955 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1956 * config.in, configure: Regenerated.
1958 2012-03-02 Pedro Alves <palves@redhat.com>
1960 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1961 * linux-low.c (struct simple_pid_list): New.
1962 (stopped_pids): New a struct simple_pid_list pointer.
1963 (add_to_pid_list, pull_pid_from_list): New.
1964 (handle_extended_wait): Don't assume the first signal new children
1965 report is SIGSTOP. Adjust call to pull_pid_from_list.
1966 (linux_wait_for_lwp): Adjust.
1968 2012-03-02 Yao Qi <yao@codesourcery.com>
1970 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1973 2012-03-02 Yao Qi <yao@codesourcery.com>
1975 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1976 `stop_pc' and `tpoint'. Update caller.
1978 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1980 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1981 * linux-low.c (use_linux_regsets): New macro.
1982 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1983 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1984 (linux_register_in_regsets): New function.
1985 (usr_fetch_inferior_registers): Skip registers covered by
1987 (usr_store_inferior_registers): Likewise.
1988 (usr_fetch_inferior_registers): New macro.
1989 (usr_store_inferior_registers): Likewise.
1990 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1991 (linux_store_registers): Likewise.
1992 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1994 (init_registers_mips64_dsp_linux): Likewise.
1995 (init_registers_mips_linux): New macro.
1996 (init_registers_mips_dsp_linux): Likewise.
1997 (mips_dsp_num_regs): Likewise.
1998 (DSP_BASE, DSP_CONTROL): New fallback macros.
1999 (mips_base_regs): New macro.
2000 (mips_regmap): Use it. Fix the size.
2001 (mips_dsp_regmap): New variable.
2002 (mips_dsp_regset_bitmap): Likewise.
2003 (mips_arch_setup): New function.
2004 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2006 (mips_cannot_store_register): Likewise.
2007 (the_low_target): Update .arch_setup, .num_regs and .regmap
2008 initializers. Add .regset_bitmap initializer.
2009 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2011 * linux-bfin-low.c (the_low_target): Likewise.
2012 * linux-cris-low.c (the_low_target): Likewise.
2013 * linux-crisv32-low.c (the_low_target): Likewise.
2014 * linux-ia64-low.c (the_low_target): Likewise.
2015 * linux-m32r-low.c (the_low_target): Likewise.
2016 * linux-m68k-low.c (the_low_target): Likewise.
2017 * linux-ppc-low.c (the_low_target): Likewise.
2018 * linux-s390-low.c (the_low_target): Likewise.
2019 * linux-sh-low.c (the_low_target): Likewise.
2020 * linux-sparc-low.c (the_low_target): Likewise.
2021 * linux-tic6x-low.c (the_low_target): Likewise.
2022 * linux-x86-low.c (the_low_target): Likewise.
2023 * linux-xtensa-low.c (the_low_target): Likewise.
2024 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2025 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2026 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2028 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2029 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2031 2012-02-29 Yao Qi <yao@codesourcery.com>
2032 Pedro Alves <palves@redhat.com>
2034 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2035 `step_over_finished' is true.
2037 2012-02-27 Pedro Alves <palves@redhat.com>
2039 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2040 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2042 2012-02-27 Pedro Alves <palves@redhat.com>
2045 * linux-low.c (pid_is_stopped): New.
2046 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2048 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2050 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2053 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2055 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2057 2012-02-24 Luis Machado <lgustavo@codesourcery>
2059 * server.c (handle_query): Advertise support for target-side
2060 breakpoint condition evaluation.
2061 (process_point_options): New function.
2062 (process_serial_event): When inserting a breakpoint, check for
2063 a target-side condition that should be evaluated.
2065 * mem-break.c: Include regcache.h and ax.h.
2066 (point_cond_list_t): New data structure.
2067 (breakpoint) <cond_list>: New field.
2068 (find_gdb_breakpoint_at): Make non-static.
2069 (delete_gdb_breakpoint_at): Clear any target-side
2071 (clear_gdb_breakpoint_conditions): New function.
2072 (add_condition_to_breakpoint): Likewise.
2073 (add_breakpoint_condition): Likewise.
2074 (gdb_condition_true_at_breakpoint): Likewise.
2075 (gdb_breakpoint_here): Return result directly instead
2076 of going through a local variable.
2078 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2079 (clear_gdb_breakpoint_conditions): Likewise.
2080 (add_breakpoint_condition): Likewise.
2081 (gdb_condition_true_at_breakpoint): Likewise.
2083 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2084 (need_step_over_p): Take target-side breakpoint condition into
2087 2012-02-24 Luis Machado <lgustavo@codesourcery>
2089 * server.h: Include tracepoint.h.
2090 (agent_mem_read, agent_get_trace_state_variable_value,
2091 agent_set_trace_state_variable_value,
2092 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2093 get_set_tsv_func_addr): New prototypes.
2095 * ax.h: New include file.
2096 * ax.c: New source file.
2098 * tracepoint.c: Include ax.h.
2099 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2100 agent_expr, eval_result_type): Move to ax.h.
2101 (parse_agent_expr): Rename to ...
2102 (gdb_parse_agent_expr): ... this, make it non-static and move
2104 (unparse_agent_expr) Rename to ...
2105 (gdb_unparse_agent_expr): ... this, make it non-static and move
2107 (eval_agent_expr): Rename to ...
2108 (eval_tracepoint_agent_expr): ... this.
2109 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2110 forward declarations.
2111 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2112 (agent_get_trace_state_variable_value): New function.
2113 (agent_set_trace_state_variable_value): New function.
2114 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2115 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2116 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2117 (condition_true_at_tracepoint): Likewise.
2118 (parse_agent_expr): Rename to ...
2119 (gdb_parse_agent_expr): ... this and move to ax.c.
2120 (unparse_agent_expr): Rename to ...
2121 (gdb_unparse_agent_expr): ... this and move to ax.c.
2122 (gdb_agent_op_name): Move to ax.c.
2123 (eval_agent_expr): Rename to ...
2124 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2126 (eval_tracepoint_agent_expr): New function.
2127 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2129 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2131 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2132 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2133 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2134 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2135 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2136 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2137 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2138 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2139 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2140 (compile_bytecodes): Remove forward declaration.
2141 (is_goto_target): Move to ax.c.
2142 (compile_bytecodes): Move to ax.c and call
2143 agent_get_trace_state_variable_value (...) and
2144 agent_set_trace_state_variable_value (...).
2146 * Makefile.in: Update ax.c and IPA dependencies.
2148 2012-02-24 Pedro Alves <palves@redhat.com>
2150 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2151 (cmd_bigqtbuffer_circular): ... this. Only handle
2152 'QTBuffer:circular:'.
2153 (handle_tracepoint_general_set): Adjust.
2155 2012-02-16 Yao Qi <yao@codesourcery.com>
2157 * inferiors.c: Move code to ...
2158 * dll.c: .... here. New.
2159 * server.h: Declare clear_dlls.
2160 * Makefile.in (SFILES): Add dll.c.
2164 2012-02-11 Yao Qi <yao@codesourcery.com>
2166 * server.c: (handle_monitor_command): Add a new parameter
2168 (handle_query): Update caller.
2170 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2172 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2173 * configure, config.in: Regenerate.
2174 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2177 2012-02-02 Pedro Alves <palves@redhat.com>
2179 Try SIGKILL first, then PTRACE_KILL.
2180 * linux-low.c (linux_kill_one_lwp): New.
2181 (linux_kill_one_lwp): Rename to ...
2182 (kill_one_lwp_callback): ... this. Use the new
2185 2012-02-02 Pedro Alves <palves@redhat.com>
2187 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2190 2012-01-27 Pedro Alves <palves@redhat.com>
2192 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2193 (elf_64_file_p): Make static.
2194 (linux_pid_exe_is_elf_64_file): New.
2195 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2196 Delete declarations.
2197 (linux_pid_exe_is_elf_64_file): Declare.
2198 * linux-x86-low.c (x86_arch_setup): Use
2199 linux_pid_exe_is_elf_64_file.
2201 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2203 * linux-low.c (linux_wait_for_event_1): Rename to ...
2204 (linux_wait_for_event): ... here and merge it with former
2205 linux_wait_for_event - new variable wait_ptid, use it.
2206 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2208 2012-01-23 Pedro Alves <palves@redhat.com>
2210 * server.c (main): Avoid yet another case of infinite loop while
2211 detaching/killing after a longjmp.
2213 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2216 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2218 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2220 * hostio.c (handle_readlink): New function.
2221 (handle_vFile): Call it to handle "vFile:readlink" packets.
2223 2012-01-20 Pedro Alves <palves@redhat.com>
2224 Ulrich Weigand <ulrich.weigand@linaro.org>
2226 * server.c (handle_v_requests): Only support vAttach and vRun to
2227 start multiple processes when in extended protocol mode.
2229 2012-01-17 Pedro Alves <palves@redhat.com>
2231 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2232 memalign plus mprotect to allocate the scratch buffer.
2234 2012-01-13 Pedro Alves <palves@redhat.com>
2236 * server.c (attach_inferior): Clear `cont_thread'.
2238 2012-01-13 Pedro Alves <palves@redhat.com>
2240 * server.c (main): Avoid infinite loop while detaching/killing
2243 2012-01-09 Doug Evans <dje@google.com>
2245 * server.c (start_inferior): Set last_ptid in --wrapper case.
2247 2012-01-06 Yao Qi <yao@codesourcery.com>
2249 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2251 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2253 2012-01-04 Yao Qi <yao@codesourcery.com>
2255 * tracepoint.c (cmd_qtdp): Print debug message
2256 for static tracepoint.
2258 2012-01-04 Yao Qi <yao@codesourcery.com>
2260 * tracepoint.c (trace_vdebug): Differentiate debug message
2261 between gdbserver and IPA.
2263 2012-01-03 Yao Qi <yao@codesourcery.com>
2265 * tracepoint.c (tracepoint_was_hit): Don't collect for
2268 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2270 * terminal.h: Reformat copyright header.
2272 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2274 * server.c (gdbserver_version): Update copyright year.
2275 * gdbreplay.c (gdbreplay_version): Likewise.
2277 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2279 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2282 2011-12-18 Hui Zhu <teawater@gmail.com>
2283 * linux-low.c (linux_create_inferior): Save return value to ret.
2285 2011-12-18 Hui Zhu <teawater@gmail.com>
2287 * linux-low.c (linux_create_inferior): Save return value to ret.
2289 2011-12-16 Doug Evans <dje@google.com>
2291 * linux-low.c (linux_create_inferior): If stdio connection,
2292 redirect stdin from /dev/null, stdout to stderr.
2293 * remote-utils.c (remote_is_stdio): New static global.
2294 (remote_connection_is_stdio): New function.
2295 (remote_prepare): Handle stdio connection.
2296 (remote_open): Ditto.
2297 (remote_close): Don't close stdin for stdio connections.
2298 (read_prim,write_prim): New functions. Replace all calls to
2299 read/write to these.
2300 * server.c (main): Watch for "-" argument. Move call to
2301 remote_prepare before start_inferior.
2302 * server.h (STDIO_CONNECTION_NAME): New macro.
2303 (remote_connection_is_stdio): Declare.
2305 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2306 in debugging output.
2308 2011-12-15 Yao Qi <yao@codesourcery.com>
2310 * tracepoint.c: Include sys/syscall.h.
2311 (gdb_ust_thread): Remove preprocessor conditional.
2313 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2315 * linux-low.c (linux_detach_one_lwp): Call
2316 the_low_target.prepare_to_resume before detaching.
2318 2011-12-14 Yao Qi <yao@codesourcery.com>
2320 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2323 2011-12-14 Yao Qi <yao@codesourcery.com>
2325 * i386-low.c (i386_low_stopped_data_address): Initialize local
2328 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2332 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2333 DR_CONTROL unless necessary. Extend comments.
2334 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2335 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2337 2011-12-13 Yao Qi <yao@codesourcery.com>
2339 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2341 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2343 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2345 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2346 Print new debug message for such case.
2348 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2350 Fix overlapping memcpy.
2351 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2352 the read_inferior_memory transfer.
2353 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2354 write_inferior_memory transfer.
2355 (set_fast_tracepoint_jump): New variable buf. Use it for the
2356 read_inferior_memory and write_inferior_memory transfers.
2357 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2358 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2359 Use it for the write_inferior_memory transfer.
2360 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2363 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2365 * linux-low.c (fetch_register, store_register): Make code
2366 consistent, fix formatting.
2368 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2370 * linux-low.c (usr_store_inferior_registers): Factor out code
2371 to handle individual registers into...
2372 (store_register): ... this new function.
2374 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2376 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2377 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2378 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2379 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2380 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2381 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2382 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2383 (srv_xmlfiles): Add new XML files.
2385 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2387 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2388 (init_registers_s390_linux32v1): Add prototype.
2389 (init_registers_s390_linux32v2): Likewise.
2390 (init_registers_s390_linux64v1): Likewise.
2391 (init_registers_s390_linux64v2): Likewise.
2392 (init_registers_s390x_linux64v1): Likewise.
2393 (init_registers_s390x_linux64v2): Likewise.
2394 (s390_num_regs): Increment to 52.
2395 (s390_regmap): Add orig_r2 register.
2396 (s390_num_regs_3264): Increment to 68.
2397 (s390_regmap_3264): Add orig_r2 register.
2398 (s390_collect_ptrace_register): Handle orig_r2 register.
2399 (s390_supply_ptrace_register): Likewise.
2400 (s390_fill_last_break): New function.
2401 (s390_store_last_break): Likewise.
2402 (s390_fill_system_call): New function.
2403 (s390_store_system_call): Likewise.
2404 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2406 (s390_check_regset): New function.
2407 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2408 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2409 Update target_regsets for available register sets.
2411 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2412 Jan Kratochvil <jan.kratochvil@redhat.com>
2414 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2415 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2417 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2418 * linux-low.h (struct process_info_private): New member r_debug.
2419 * server.c (handle_qxfer_libraries): Call
2420 the_target->qxfer_libraries_svr4.
2421 (handle_qxfer_libraries_svr4): New function.
2422 (qxfer_packets): New entry "libraries-svr4".
2423 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2424 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2425 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2426 PACKET_qXfer_libraries_svr4.
2428 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2430 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2431 PSW address/mask between 8-byte and 16-byte formats.
2432 (s390_supply_ptrace_register): Likewise.
2433 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2434 basic addressing mode bit.
2436 2011-11-24 Stan Shebs <stan@codesourcery.com>
2438 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2440 2011-11-17 Stan Shebs <stan@codesourcery.com>
2442 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2443 (tracing_start_time): New global.
2444 (tracing_stop_time): New global.
2445 (tracing_user_name): New global.
2446 (tracing_notes): New global.
2447 (tracing_stop_note): New global.
2448 (cmd_qtstart): Set traceframe_usage, start_time.
2449 (stop_tracing): Set stop_time.
2450 (cmd_qtstatus): Report additional status.
2451 (cmd_qtp): New function.
2452 (handle_tracepoint_query): Call it.
2453 (cmd_qtnotes): New function.
2454 (handle_tracepoint_general_set): Call it.
2455 (get_timestamp): Rename from tsv_get_timestamp.
2457 2011-11-14 Stan Shebs <stan@codesourcery.com>
2458 Kwok Cheung Yeung <kcy@codesourcery.com>
2460 * linux-x86-low.c (small_jump_insn): New.
2461 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2462 trampoline and error message, build a trampoline and issue a small
2463 jump instruction to it.
2464 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2465 trampoline and error message.
2466 (x86_get_min_fast_tracepoint_insn_len): New.
2467 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2468 * linux-low.h (struct linux_target_ops): Add arguments to
2469 install_fast_tracepoint_jump_pad operation, add new operation.
2470 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2472 (linux_get_min_fast_tracepoint_insn_len): New function.
2473 (linux_target_op): Add new operation.
2474 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2475 (gdb_trampoline_buffer_end): Ditto.
2476 (gdb_trampoline_buffer_error): Ditto.
2477 (struct ipa_sym_addresses): Add fields for new IPA variables.
2478 (symbol_list): Add entries for new IPA variables.
2479 (struct tracepoint): Add fields to hold the address range of the
2480 trampoline used by the tracepoint.
2481 (trampoline_buffer_head): New static variable.
2482 (trampoline_buffer_tail): Ditto.
2483 (claim_trampoline_space): New function.
2484 (have_fast_tracepoint_trampoline_buffer): New function.
2485 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2487 (install_fast_tracepoint): Ditto, also add error buffer argument.
2488 (cmd_qtminftpilen): New function.
2489 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2490 (fast_tracepoint_from_trampoline_address): New function.
2491 (fast_tracepoint_collecting): Handle trampoline as part of jump
2493 (set_trampoline_buffer_space): New function.
2494 (initialize_tracepoint): Initialize new IPA variables.
2495 * target.h (struct target_ops): Add arguments to
2496 install_fast_tracepoint_jump_pad operation, add new
2497 get_min_fast_tracepoint_insn_len operation.
2498 (target_get_min_fast_tracepoint_insn_len): New.
2499 (install_fast_tracepoint_jump_pad): Add arguments.
2500 * server.h (IPA_BUFSIZ): Define.
2501 * linux-i386-ipa.c: Include extra header files.
2502 (initialize_fast_tracepoint_trampoline_buffer): New function.
2503 (initialize_low_tracepoint): Call it.
2504 * server.h (set_trampoline_buffer_space): Declare.
2505 (claim_trampoline_space): Ditto.
2506 (have_fast_tracepoint_trampoline_buffer): Ditto.
2508 2011-11-14 Yao Qi <yao@codesourcery.com>
2510 * server.c (handle_query): Handle InstallInTrace for qSupported.
2511 * tracepoint.c (add_tracepoint): Sort list.
2512 (install_tracepoint, download_tracepoint): New.
2513 (cmd_qtdp): Call them to install and download tracepoints.
2514 (sort_tracepoints): Removed.
2515 (cmd_qtstart): Update.
2517 2011-11-14 Yao Qi <yao@codesourcery.com>
2519 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2520 * mem-break.h: Declare.
2521 * tracepoint.c (cmd_qtstart): Move some code to ...
2522 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2524 (download_tracepoints): Move some code to ...
2525 (download_tracepoint_1): ... here. New.
2527 2011-11-08 Yao Qi <yao@codesourcery.com>
2529 * remote-utils.c (relocate_instruction): A comment fix.
2531 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2533 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2534 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2535 dr_status_mirror and dr_control_mirror from debug_reg_state.
2536 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2537 (i386_initial_stuff): Remove use of deleted globals.
2538 (i386_get_thread_context, i386_set_thread_context,
2539 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2540 from debug_reg_state.
2542 2011-11-05 Yao Qi <yao@codesourcery.com>
2544 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2545 address as TPOINT's.
2547 2011-11-02 Stan Shebs <stan@codesourcery.com>
2549 * tracepoint.c (agent_mem_read_string): New function.
2550 (eval_agent_expr): Call it for tracenz.
2551 * server.c (handle_query): Report support for tracenz.
2553 2011-11-02 Yao Qi <yao@codesourcery.com>
2555 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2557 2011-11-02 Yao Qi <yao@codesourcery.com>
2559 * target.h: Fix a typo in comment.
2561 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2563 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2564 clobber the breakpoints' shadows with fast tracepoint jumps.
2565 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2566 * target.c (write_inferior_memory): Also pass MYADDR down to
2569 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2571 * configure.ac: Check support for personality routine.
2572 * configure: Regenerate.
2573 * config.in: Likewise.
2574 * linux-low.c: Include <sys/personality.h>.
2575 Define ADDR_NO_RANDOMIZE if necessary.
2576 (linux_create_inferior): Disable address space randomization when
2577 forking inferior, if requested.
2578 (linux_supports_disable_randomization): New function.
2579 (linux_target_ops): Install it.
2580 * server.h (disable_randomization): Declare.
2581 * server.c (disable_randomization): New global variable.
2582 (handle_general_set): Handle QDisableRandomization.
2583 (handle_query): Likewise for qSupported.
2584 (main): Support --disable-randomization and --no-disable-randomization
2585 command line arguments.
2586 * target.h (struct target_ops): Add supports_disable_randomization.
2587 (target_supports_disable_randomization): New macro.
2589 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2591 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2593 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2594 [!PT_GETDSBT] (target_loadmap): New definition.
2595 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2596 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2597 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2598 and PT_GETDSBT to LINUX_LOADMAP.
2599 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2600 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2602 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2604 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2605 (arm_linux_hwbp_cap): New static variable.
2606 (arm_linux_get_hwbp_cap): Replace by ...
2607 (arm_linux_init_hwbp_cap): ... this new function.
2608 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2609 (arm_linux_get_hw_watchpoint_count): Likewise.
2610 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2611 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2612 (arm_prepare_to_resume): Use perror_with_name instead of error.
2614 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2616 * linux-arm-low.c: Include <signal.h>.
2617 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2618 (struct arm_linux_hwbp_cap): New data type.
2619 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2620 (struct arm_linux_hw_breakpoint): New data type.
2621 (MAX_BPTS, MAX_WPTS): Define.
2622 (struct arch_process_info, struct arch_lwp_info): New data types.
2623 (arm_linux_get_hwbp_cap): New function.
2624 (arm_linux_get_hw_breakpoint_count): Likewise.
2625 (arm_linux_get_hw_watchpoint_count): Likewise.
2626 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2627 (arm_hwbp_control_initialize): Likewise.
2628 (arm_hwbp_control_is_enabled): Likewise.
2629 (arm_hwbp_control_is_initialized): Likewise.
2630 (arm_hwbp_control_disable): Likewise.
2631 (arm_linux_hw_breakpoint_equal): Likewise.
2632 (arm_linux_hw_point_initialize): Likewise.
2633 (struct update_registers_data): New data structure.
2634 (update_registers_callback: New function.
2635 (arm_insert_point): Likewise.
2636 (arm_remove_point): Likewise.
2637 (arm_stopped_by_watchpoint): Likewise.
2638 (arm_stopped_data_address): Likewise.
2639 (arm_new_process): Likewise.
2640 (arm_new_thread): Likewise.
2641 (arm_prepare_to_resume): Likewise.
2642 (the_low_target): Register arm_insert_point, arm_remove_point,
2643 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2644 arm_new_thread, and arm_prepare_to_resume.
2646 2011-09-15 Stan Shebs <stan@codesourcery.com>
2648 * server.h (struct emit_ops): Add compare-goto fields.
2649 * tracepoint.c (gdb_agent_op_sizes): New table.
2650 (emit_eq_goto): New function.
2651 (emit_ne_goto): New function.
2652 (emit_lt_goto): New function.
2653 (emit_le_goto): New function.
2654 (emit_gt_goto): New function.
2655 (emit_ge_goto): New function.
2656 (is_goto_target): New function.
2657 (compile_bytecodes): Recognize special cases of compare-goto
2658 combinations and call specialized emitters for them.
2659 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2660 (amd64_emit_ne_goto): New function.
2661 (amd64_emit_lt_goto): New function.
2662 (amd64_emit_le_goto): New function.
2663 (amd64_emit_gt_goto): New function.
2664 (amd64_emit_ge_goto): New function.
2665 (amd64_emit_ops): Add the new functions.
2666 (i386_emit_eq_goto): New function.
2667 (i386_emit_ne_goto): New function.
2668 (i386_emit_lt_goto): New function.
2669 (i386_emit_le_goto): New function.
2670 (i386_emit_gt_goto): New function.
2671 (i386_emit_ge_goto): New function.
2672 (i386_emit_ops): Add the new functions.
2674 2011-09-08 Stan Shebs <stan@codesourcery.com>
2676 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2677 (i386_emit_epilogue): Restore %ebx.
2679 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2681 * server.c (step_thread): Remove definition.
2682 (process_serial_event): Don't handle Hs.
2683 * server.h (step_thread): Remove declaration.
2684 * target.c (set_desired_inferior): Remove use of step_thread.
2686 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2688 * linux-low.c: Include linux-procfs.h.
2689 (linux_attach_lwp_1): Update comments.
2690 (linux_attach): Scan for existing threads when attaching to a
2691 process that is the tgid.
2692 * Makefile.in: Update dependencies.
2694 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2696 * configure.srv: Add linux-procfs.o dependencies.
2698 2011-08-14 Yao Qi <yao@codesourcery.com>
2700 * target.h (struct target_ops): Fix indent.
2701 * win32-low.c (win32_target_ops): Fix comment.
2703 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2704 Yao Qi <yao@codesourcery.com>
2706 * Makefile.in (clean): Remove tic6x-*.c files.
2707 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2708 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2709 (tic6x-c64xp-linux.c): Likewise.
2710 * configure.srv: Add support for tic6x-*-uclinux.
2711 * linux-tic6x-low.c: New.
2712 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2714 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2715 Yao Qi <yao@codesourcery.com>
2717 * target.h (struct target_ops): Add read_loadmap.
2718 * linux-low.c (struct target_loadseg): New type.
2719 (struct target_loadmap): New type.
2720 (linux_read_loadmap): New function.
2721 (linux_target_ops): Add linux_read_loadmap.
2722 * server.c (handle_query): Support qXfer:fdpic:read packet.
2723 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2726 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2728 * win32-low.c: Include <stdint.h>.
2730 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2732 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2733 to the inferior here.
2734 (i386_remove_aligned_watchpoint): Ditto.
2735 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2736 fit part of the watchpoint in the debug registers.
2737 (i386_update_inferior_debug_regs): New.
2738 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2739 registers, and only update the inferior on success.
2740 (i386_low_remove_watchpoint): Ditto.
2742 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2744 * linux-low.c (compare_ints, unique, list_threads, show_process,
2745 linux_core_of_thread): Delete.
2746 (linux_target_ops): Change linux_core_of_thread to
2747 linux_common_core_of_thread.
2748 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2749 * utils.c (malloc_failure): Change type of argument.
2750 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2751 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2752 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2753 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2754 (IPA_OBJS): Add common-utils-ipa.o.
2755 (ptid_h, linux_osdata_h): New macros.
2756 (server_h): Add common/common-utils.h, common/xml-utils.h,
2757 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2759 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2760 ptid.o, buffer.o): New rules.
2761 (linux-low.o): Add common/linux-osdata.h as a dependency.
2762 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2763 * configure.ac: Add AC_HEADER_DIRENT check.
2764 * config.in: Regenerate.
2765 * configure: Regenerate.
2766 * remote-utils.c (xml_escape_text): Delete.
2767 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2768 buffer_xml_printf): Move to common/buffer.c.
2769 * server.c (main): Remove call to initialize_inferiors.
2770 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2771 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2772 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2773 internal_error, gdb_assert, gdb_assert_fail): Delete.
2774 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2775 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2777 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2778 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2779 initialize_inferiors): Delete.
2781 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2783 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2786 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2788 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2790 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2792 2011-05-26 Yao Qi <yao@codesourcery.com>
2794 * Makefile.in (thread-db.o): Track dependence to
2795 common/gdb_thread_db.h.
2796 * thread-db.c: include gdb_thread_db.h from right place.
2798 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2800 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2801 __FILE__ and __LINE__ to internal_error.
2803 2011-05-13 Doug Evans <dje@google.com>
2805 * thread-db.c (try_thread_db_load_from_sdir): New function.
2806 (try_thread_db_load_from_dir): New function.
2807 (thread_db_load_search): Handle $sdir, ignore $pdir.
2808 Remove trying of system directories if search of
2809 libthread-db-search-path fails, that is now done via $sdir.
2811 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2813 * server.c (handle_query): Add EnableDisableTracepoints to the list
2814 of supported features.
2815 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2817 (cmd_qtenable_disable): New.
2818 (cmd_qtstart): Install tracepoints even if disabled.
2819 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2820 receiving a QTEnable or QTDisable packet.
2821 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2822 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2824 (gdb_probe): Skip data collection if static tracepoint is disabled.
2826 2011-05-10 Doug Evans <dje@google.com>
2828 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2830 2011-05-04 Doug Evans <dje@google.com>
2832 * linux-low.c (linux_join): Skip process lookup.
2833 * spu-low.c (spu_join): Ditto.
2834 * server.c (join_inferiors_callback): Delete.
2835 (process_serial_event): For 'D' packet (detach) call join_inferior
2838 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2840 * README: Don't mention xscale*-*-linux*.
2841 * configure.srv (xscale*-*-linux*): Don't handle target.
2843 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2845 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2847 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2848 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2849 (i386_emit_void_call_2): Likewise.
2851 2011-04-26 Yao Qi <yao@codesourcery.com>
2853 * linux-low.c: Move common macros to linux-ptrace.h.
2854 Include linux-ptrace.h.
2855 * Makefile.in (linux_ptrace_h): New.
2856 (linux-low.o): Depends on linux-ptrace.h.
2858 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2860 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2861 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2862 (remote_prepare): New function with most of the TCP code from ...
2863 (remote_open): ... here. Detect PORT here unconditionally. Move also
2864 setting transport_is_reliable.
2865 * server.c (run_once): New variable.
2866 (gdbserver_usage): Document it.
2867 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2868 the first run if RUN_ONCE.
2869 * server.h (run_once, remote_prepare): New declarations.
2871 2011-04-19 Tom Tromey <tromey@redhat.com>
2873 * win32-low.c (handle_load_dll): Remove duplicate "the".
2875 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2877 Remove support for old Cygwin 1.5 versions.
2878 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2879 function to avoid warning.
2880 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2883 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2885 * gdbserver/server.h (Macro _): Define it if not available.
2887 2011-03-14 Michael Snyder <msnyder@vmware.com>
2889 * hostio.c (handle_close): Remove unnecessary null test.
2891 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2893 * Makefile.in (maintainer-clean realclean distclean): Remove
2894 "make ... subdir_do" command.
2896 2011-03-10 Michael Snyder <msnyder@vmware.com>
2898 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2900 * server.c (handle_v_run): Free alloced buffer on early return.
2902 2011-03-09 Yao Qi <yao@codesourcery.com>
2905 2011-03-04 Yao Qi <yao@codesourcery.com>
2907 * Makefile.in: Remove GNU make feature --directory.
2909 2011-03-05 Yao Qi <yao@codesourcery.com>
2911 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2912 (subdir_do): New make target. Copied from gdb/Makefile.
2913 (maintainer-clean, realclean, distclean, clean): Call corresponding
2914 make targets in common/Makefile.
2916 2011-02-11 Yao Qi <yao@codesourcery.com>
2918 * configure.ac: Call AC_PROG_RANLIB.
2919 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2920 * configure: Regenerate.
2922 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2924 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2926 2011-03-06 Yao Qi <yao@codesourcery.com>
2928 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2930 2011-03-05 Yao Qi <yao@codesourcery.com>
2932 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2933 (subdir_do): New make target. Copied from gdb/Makefile.
2934 (maintainer-clean, realclean, distclean, clean): Call corresponding
2935 make targets in common/Makefile.
2937 2011-03-04 Yao Qi <yao@codesourcery.com>
2939 * Makefile.in: Remove GNU make feature --directory.
2941 2011-03-04 Michael Snyder <msnyder@vmware.com>
2943 * server.c (queue_stop_reply): Call xmalloc not malloc.
2945 2011-03-02 Michael Snyder <msnyder@vmware.com>
2947 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2949 2011-02-28 Michael Snyder <msnyder@vmware.com>
2951 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2952 (cmd_qtframe): Ditto.
2953 (cmd_qtbuffer): Ditto.
2954 (cmd_bigqtbuffer): Ditto.
2956 * utils.c (decimal2str): Initialize 'width' to nine, then
2959 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2961 * hostio.c (require_data): Free *data, not data.
2963 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2965 * hostio.c (require_data): Use free, not xfree.
2967 2011-02-27 Michael Snyder <msnyder@vmware.com>
2969 * server.c (handle_query): Discard unused value.
2971 * hostio.c (require_data): Free malloc memory before returning
2974 2011-02-26 Michael Snyder <msnyder@vmware.com>
2976 * linux-low.c (list_threads): Call closedir for dirent.
2978 2011-02-27 Michael Snyder <msnyder@vmware.com>
2980 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2981 a case statement falls through.
2983 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2985 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2988 2011-02-26 Michael Snyder <msnyder@vmware.com>
2990 * utils.c (decimal2str): Eliminate dead code and dead param.
2991 (pulongest): Drop dead param from call to decimal2str.
2994 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2996 Revert the following patch (not approved yet):
2997 2011-02-21 Hui Zhu <teawater@gmail.com>
2998 * tracepoint.c (tp_printf): New function.
2999 (eval_agent_expr): Handle gdb_agent_op_printf.
3001 2011-02-21 Hui Zhu <teawater@gmail.com>
3003 * tracepoint.c (tp_printf): New function.
3004 (eval_agent_expr): Handle gdb_agent_op_printf.
3006 2011-02-18 Tom Tromey <tromey@redhat.com>
3008 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3009 (tracepoint.o): Likewise.
3010 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3011 (gdb_agent_op_names): Likewise.
3013 2011-02-18 Tom Tromey <tromey@redhat.com>
3015 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3016 gdb_agent_op_rot>: New constants.
3017 (gdb_agent_op_names): Add pick and roll.
3018 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3021 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3023 * aclocal.m4: Regenerated with aclocal-1.11.1.
3025 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3027 * server.c (handle_qxfer_traceframe_info): New.
3028 (qxfer_packets): Register "traceframe-info".
3029 (handle_query): Report support for qXfer:traceframe-info:read+.
3030 * tracepoint.c (match_blocktype): New.
3031 (traceframe_find_block_type): Rename to ...
3032 (traceframe_walk_blocks): ... this. Add callback filter argument,
3034 (traceframe_find_block_type): New, reimplemented on top of
3035 traceframe_walk_blocks.
3036 (build_traceframe_info_xml): New.
3037 (traceframe_read_info): New.
3038 * server.h (traceframe_read_info): Declare.
3040 2011-02-11 Yao Qi <yao@codesourcery.com>
3042 * configure.ac: Call AC_PROG_RANLIB.
3043 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3044 * configure: Regenerate.
3046 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3048 * server.c (gdb_read_memory): Change return semantics to allow
3050 (handle_search_memory_1): Adjust.
3051 (process_serial_event) <'m' packet>: Handle partial transfers.
3052 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3054 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3056 * regcache.c (init_register_cache): Initialize
3057 regcache->register_status.
3058 (free_register_cache): Release regcache->register_status.
3059 (regcache_cpy): Copy register_status.
3060 (registers_to_string): Print 'x's for unavailable registers.
3061 (supply_register): Mark the register's status valid or
3062 unavailable, depending on whether a buffer was passed in or not.
3063 (supply_register_zeroed): New.
3064 (supply_regblock): Mark the registers' status valid or
3065 unavailable, depending on whether a buffer was passed in or not.
3066 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3067 (struct regcache): New `register_status' field.
3068 (supply_register_zeroed): Declare.
3069 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3070 supply_register_zeroed, rather than passing a NULL buffer to
3072 * tracepoint.c (fetch_traceframe_registers): Update comment.
3074 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3076 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3079 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3081 * server.h (decode_xfer_write): Change prototype.
3082 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3083 and don't extract the annex here.
3084 * server.c (decode_xfer_read): Remove `annex' parameter,
3085 and don't extract the annex here.
3087 (struct qxfer): New.
3088 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3089 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3090 (handle_qxfer_statictrace): New functions, abstracted out from
3091 handle_query, and made to use the struct qxfer interface.
3092 (handle_threads_qxfer_proper): Rename to ...
3093 (handle_qxfer_threads_proper): ... this.
3094 (handle_threads_qxfer): Rename to ...
3095 (handle_qxfer_threads): ... this. Adjust.
3096 (qxfer_packets): New array.
3097 (handle_qxfer): New function.
3098 (handle_query): Use handle_qxfer.
3100 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3102 * gdbreplay.c: Shorten lines of >= 80 columns.
3103 * linux-low.c: Ditto.
3104 * linux-ppc-low.c: Ditto.
3105 * linux-s390-low.c: Ditto.
3106 * linux-sparc-low.c: Ditto.
3107 * linux-x86-low.c: Ditto.
3108 * linux-xtensa-low.c: Ditto.
3109 * mem-break.c: Ditto.
3111 * regcache.h: Ditto.
3112 * remote-utils.c: Ditto.
3115 * thread-db.c: Ditto.
3116 * tracepoint.c: Ditto.
3118 * win32-low.h: Ditto.
3120 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3122 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3125 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3127 * server.c (gdbserver_version): Update copyright year in version
3129 * gdbreplay.c (gdbreplay_version): Ditto.
3131 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3133 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3134 * linux-bfin-low.c: New file.
3135 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3136 PT_DATA_ADDR for BFIN targets.
3137 * Makefile.in (SFILES): Add linux-bfin-low.c.
3138 (clean): Remove reg-bfin.c.
3139 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3140 * README: Mention supported Blackfin targets.
3142 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3144 * .gitignore: New file.
3146 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3148 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3150 2010-10-22 Jie Zhang <jie@codesourcery.com>
3152 * Makefile.in: Add FLAGS_TO_PASS variable.
3153 (install): Remove dependency of install-only and recursively
3154 invoke make for install-only.
3156 2010-10-04 Doug Evans <dje@google.com>
3158 * Makefile.in (uninstall): Use $(DESTDIR).
3160 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3164 * linux-x86-low.c (compat_siginfo_from_siginfo)
3165 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3166 si_code is < 0. Check for si_code == SI_TIMER before checking for
3169 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3171 * lynx-i386-low.c: New file.
3172 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3174 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3176 * lynx-low.c (ptrace_request_to_str): Remove handling for
3177 request values that have been removed in LynxOS 5.x.
3179 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3181 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3184 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3186 * configure.ac: Add --enable-inprocess-agent option.
3187 * configure: Rebuilt.
3189 2010-09-06 Yao Qi <yao@codesourcery.com>
3191 * linux-low.c (linux_kill): Remove unused variable.
3192 (linux_stabilize_threads): Likewise.
3193 * server.c (start_inferior): Likewise.
3194 (queue_stop_reply_callback): Likewise.
3195 * tracepoint.c (do_action_at_tracepoint): Likewise.
3197 2010-09-06 Yao Qi <yao@codesourcery.com>
3199 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3202 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3204 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3206 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3208 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3211 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3213 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3214 gdbserver/lynx-ppc-low.c: New files.
3215 * Makefile.in (lynx_low_h): New variable.
3216 (lynx-low.o, lynx-ppc-low.o): New rules.
3217 * configure.ac: On LynxOS, link with -lnetinet.
3218 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3219 * configure: regenerate.
3221 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3223 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3224 * configure.ac: Add check for vasprintf and vsnprintf.
3225 * configure, config.in: Regenerate.
3226 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3228 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3230 * gdbreplay.c: Move include of alloca.h up, next to include of
3232 * server.h: Add include of malloc.h.
3233 * mem-break.c: Remove include of malloc.h.
3234 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3236 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3238 * Makefile.in (memmem.o): Build with -Wno-error.
3240 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3242 * utils.c (xsnprintf): Make non-static.
3243 * server.h: Add xsnprintf declaration.
3244 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3245 replace calls to snprintf by calls to xsnprintf throughout.
3247 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3249 * configure.ac: Add configure check for alloca.
3250 * configure, config.in: Regenerate.
3251 * server.h: Include alloca.h if it exists.
3252 * gdbreplay.c: Include alloca.h if it exists.
3254 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3256 * linux-low.c (__SIGRTMIN): Define if not already defined.
3257 (linux_create_inferior): Check for __ANDROID__ rather than
3259 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3260 are already deferred.
3261 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3262 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3263 stopped and already has a pending signal to report.
3264 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3265 a pending signal to report or is moving out of a jump pad.
3266 (linux_init_signals): Check for __ANDROID__ rather than
3269 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3271 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3272 debug_threads check. Avoid a linear search when not doing debug
3275 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3277 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3278 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3279 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3280 (process_event): Change local fd's type to gdb_fildes_t.
3281 (create_file_handler): Adjust prototype.
3282 (delete_file_handler): Adjust prototype.
3283 (handle_file_event): Adjust prototype. Use pfildes.
3284 (create_file_event): Adjsut prototype.
3285 * remote-utils.c (remote_desc, listen_desc): Change type to
3287 * server.h: New gdb_fildes_t typedef.
3288 [USE_WIN32API]: Include winsock2.h.
3289 (delete_file_handler, add_file_handler): Adjust prototypes.
3291 * utils.c (pfildes): New.
3293 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3295 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3296 * configure: Regenerate.
3298 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3300 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3301 (linux_done_accessing_memory): ... this.
3302 (linux_target_ops): Adjust.
3303 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3304 * nto-low.c (nto_target_ops): Adjust comment.
3305 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3306 * spu-low.c (spu_target_ops): Adjust comment.
3307 * target.h (target_ops): Rename unprepare_to_access_memory field
3308 to done_accessing_memory.
3309 (unprepare_to_access_memory): Rename to ...
3310 (done_accessing_memory): ... this.
3312 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3314 * linux-low.c (linux_prepare_to_access_memory): New.
3315 (linux_unprepare_to_access_memory): New.
3316 (linux_target_ops): Install them.
3317 * server.c (read_memory): Rename to ...
3318 (gdb_read_memory): ... this. Use
3319 prepare_to_access_memory/prepare_to_access_memory.
3320 (write_memory): Rename to ...
3321 (gdb_write_memory): ... this. Use
3322 prepare_to_access_memory/prepare_to_access_memory.
3323 (handle_search_memory_1): Adjust.
3324 (process_serial_event): Adjust.
3325 * target.h (struct target_ops): New fields
3326 prepare_to_access_memory and unprepare_to_access_memory.
3327 (prepare_to_access_memory, unprepare_to_access_memory): New.
3328 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3329 prepare_to_access_memory/prepare_to_access_memory.
3330 * nto-low.c (nto_target_ops): Adjust.
3331 * spu-low.c (spu_target_ops): Adjust.
3332 * win32-low.c (win32_target_ops): Adjust.
3334 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3336 * Makefile.in (WARN_CFLAGS): Get it from configure.
3337 (WERROR_CFLAGS): New.
3338 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3339 * configure.ac: Introduce --enable-werror, which adds -Werror to
3340 the compiler command line. Enabled by default. Disable with
3341 --disable-werror. Add -Wdeclaration-after-statement
3342 Wpointer-arith and -Wformat-nonliteral to warning flags.
3343 * configure: Regenerate.
3345 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3347 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3349 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3351 * gdbreplay.c (remote_error): New.
3353 (expect): Use gdbchar. Check for error reading from GDB.
3354 Clarify sync error output.
3355 (play): Check for errors writing to GDB.
3356 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3357 * remote-utils.c (getpkt): Check for errors writing to the remote
3360 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3362 * linux-low.c (linux_wait_1): Move non-debugging code out of
3363 `debug_threads' control.
3365 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3367 * linux-low.c (linux_wait_1): Don't set last_status here.
3368 * server.c (push_event, queue_stop_reply_callback): Assert we're
3369 not pushing a TARGET_WAITKIND_IGNORE event.
3370 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3371 (myresume, handle_target_event): Set the thread's last_resume_kind
3372 and last_status from the target returned status.
3374 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3378 * linux-x86-low.c (update_debug_registers_callback): New.
3379 (i386_dr_low_set_addr): Use it.
3380 (i386_dr_low_get_addr): New.
3381 (i386_dr_low_set_control): Use update_debug_registers_callback.
3382 (i386_dr_low_get_control): New.
3383 (i386_dr_low_get_status): Adjust.
3384 * linux-low.c (linux_stop_lwp): New.
3385 * linux-low.h (linux_stop_lwp): Declare.
3387 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3388 argument instead of a i386_debug_reg_state.
3389 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3390 a i386_debug_reg_state.
3391 (i386_insert_aligned_watchpoint): Adjust.
3392 (i386_remove_aligned_watchpoint): Adjust.
3393 (i386_low_stopped_data_address): Read the debug registers from the
3394 inferior instead of from the mirrors.
3395 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3396 (i386_dr_low_get_addr): Declare.
3397 (i386_dr_low_get_control): Declare.
3398 (i386_dr_low_get_status): Change prototype.
3400 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3401 (i386_dr_low_get_addr): New.
3402 (i386_dr_low_get_control): New.
3403 (i386_dr_low_get_status): Adjust prototype. Return
3405 (i386_initial_stuff): Clear dr_status_mirror and
3407 (i386_get_thread_context): Adjust.
3408 (i386_set_thread_context): Adjust.
3409 (i386_thread_added): Adjust.
3411 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3413 * linux-low.h (linux_thread_area): Delete declaration.
3415 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3417 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3418 after its termination.
3420 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3422 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3423 (gdb_wants_all_stopped): Delete.
3424 (linux_wait_1): Don't call them.
3425 * server.c (handle_v_cont): Tag all threads as want-stopped.
3426 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3427 stopped as "client-wants-stopped".
3429 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3431 * Makefile.in (signals_h): New.
3432 (server_h): Depend on it.
3433 (server.o): Don't depend on $(signals_def).
3434 (signals.o): Depend on $(signals_def).
3436 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3438 * Makefile.in (signals_def): New.
3439 (server_h): Append include/gdb/signals.h and signals_def.
3440 (server.o): Append signals_def.
3442 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3444 * server.c (handle_target_event): Use target_signal_to_host for
3445 resume_info.sig initialization.
3446 * target.h (struct thread_resume) <sig>: New comment.
3448 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3450 * server.c (handle_query): strcpy() the returned string from paddress()
3451 instead of sprintf().
3452 * utils.c (paddress): Return phex_nz().
3454 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3456 * server.c (handle_v_cont): Call mourn_inferior if process
3458 (myresume): Likewise.
3460 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3462 Static tracepoints, and integration with UST.
3464 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3465 * mem-break.c (uninsert_all_breakpoints)
3466 (reinsert_all_breakpoints): New.
3467 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3468 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3469 (gdb_agent_ust_loaded, helper_thread_id)
3470 (gdb_agent_helper_thread_id): New macros.
3471 (struct ipa_sym_addresses): Add addr_ust_loaded,
3472 addr_helper_thread_id, addr_cmd_buf.
3473 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3474 (in_process_agent_loaded_ust): New.
3475 (write_e_ust_not_loaded): New.
3476 (maybe_write_ipa_ust_not_loaded): New.
3477 (struct collect_static_trace_data_action): New.
3478 (enum tracepoint_type) <static_tracepoint>: New.
3479 (struct tracepoint) <handle>: Mention static tracepoints.
3480 (struct static_tracepoint_ctx): New.
3481 (CMD_BUF_SIZE): New.
3482 (add_tracepoint_action): Handle static tracepoint actions.
3483 (unprobe_marker_at): New.
3484 (clear_installed_tracepoints): Handle static tracepoints.
3485 (cmd_qtdp): Handle static tracepoints.
3486 (probe_marker_at): New.
3487 (cmd_qtstart): Handle static tracepoints.
3488 (response_tracepoint): Handle static tracepoints.
3489 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3490 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3491 (get_context_regcache): Handle static tracepoints.
3492 (do_action_at_tracepoint): Handle static tracepoint actions.
3493 (traceframe_find_block_type): Handle static trace data blocks.
3494 (traceframe_read_sdata): New.
3495 (download_tracepoints): Download static tracepoint actions.
3496 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3497 (GDB_PROBE_NAME): New.
3502 (ust_marker_to_static_tracepoint): New.
3504 (collect_ust_data_at_tracepoint): New.
3505 (gdb_ust_probe): New.
3506 (UNIX_PATH_MAX, SOCK_DIR): New.
3507 (gdb_ust_connect_sync_socket): New.
3508 (resume_thread, stop_thread): New.
3509 (run_inferior_command): New.
3510 (init_named_socket): New.
3511 (gdb_ust_socket_init): New.
3512 (cstr_to_hexstr): New.
3514 (first_marker, next_marker): New.
3515 (response_ust_marker): New.
3516 (cmd_qtfstm, cmd_qtsstm): New.
3517 (unprobe_marker_at, probe_marker_at): New.
3518 (cmd_qtstmat, gdb_ust_thread): New.
3519 (gdb_ust_init): New.
3520 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3521 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3523 (x86_64_st_collect_regmap): New.
3524 (X86_64_NUM_ST_COLLECT_GREGS): New.
3525 (AMD64_RIP_REGNUM): New.
3526 (supply_static_tracepoint_registers): New.
3527 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3529 (i386_st_collect_regmap): New.
3530 (i386_NUM_ST_COLLECT_GREGS): New.
3531 (supply_static_tracepoint_registers): New.
3532 * server.c (handle_query): Handle qXfer:statictrace:read.
3533 <qSupported>: Report support for StaticTracepoints, and
3534 qXfer:statictrace:read features.
3535 * server.h (traceframe_read_sdata)
3536 (supply_static_tracepoint_registers): Declare.
3537 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3538 (unpack_varlen_hex): Include in IPA build.
3539 * Makefile.in (ustlibs, ustinc): New.
3540 (IPA_OBJS): Add remote-utils-ipa.o.
3541 ($(IPA_LIB)): Link -ldl and -lpthread.
3543 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3544 * config.in, configure: Regenerate.
3546 2010-06-20 Ian Lance Taylor <iant@google.com>
3547 Pedro Alves <pedro@codesourcery.com>
3549 * linux-x86-low.c (always_true): Delete.
3550 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3551 trying to fool the compiler with always_true.
3553 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3555 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3556 conditions in gdbserver.
3558 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3560 * spu-low.c (spu_read_memory): Wrap around local store limit.
3561 (spu_write_memory): Likewise.
3563 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3565 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3566 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3568 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3570 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3571 uses with LONGEST uses.
3573 2010-06-14 Stan Shebs <stan@codesourcery.com>
3574 Pedro Alves <pedro@codesourcery.com>
3578 * linux-x86-low.c: Include limits.h.
3583 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3584 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3585 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3586 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3587 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3588 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3589 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3590 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3591 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3592 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3593 (amd64_emit_void_call_2): New.
3594 (amd64_emit_ops): New.
3595 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3596 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3597 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3598 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3599 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3600 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3601 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3602 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3603 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3604 (i386_emit_stack_adjust, i386_emit_int_call_1)
3605 (i386_emit_void_call_2): New.
3606 (i386_emit_ops): New.
3607 (x86_emit_ops): New.
3608 (the_low_target): Install x86_emit_ops.
3609 * server.h (struct emit_ops): New.
3610 (get_raw_reg_func_addr): Declare.
3611 (current_insn_ptr, emit_error): Declare.
3612 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3613 (set_trace_state_variable_value): New defines.
3614 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3615 addr_get_trace_state_variable_value and
3616 addr_set_trace_state_variable_value.
3617 (symbol_list): New fields for get_raw_reg,
3618 get_trace_state_variable_value and set_trace_state_variable_value.
3619 (condfn): New typedef.
3620 (struct tracepoint): New field `compiled_cond'.
3621 (do_action_at_tracepoint): Clear compiled_cond.
3622 (get_trace_state_variable_value, set_trace_state_variable_value):
3624 (condition_true_at_tracepoint): If there's a compiled condition,
3626 (current_insn_ptr, emit_error): New globals.
3627 (struct bytecode_address): New.
3628 (get_raw_reg_func_addr): New.
3629 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3630 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3631 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3632 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3633 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3634 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3635 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3636 (compile_tracepoint_condition, compile_bytecodes): New.
3637 * target.h (emit_ops): Forward declare.
3638 (struct target_ops): New field emit_ops.
3639 (target_emit_ops): New.
3640 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3641 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3642 * linux-low.c (linux_emit_ops): New.
3643 (linux_target_ops): Install it.
3644 * linux-low.h (struct linux_target_ops): New field emit_ops.
3646 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3648 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3649 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3651 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3652 Stan Shebs <stan@codesourcery.com>
3654 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3655 (all): Depend on $(extra_libraries).
3656 (install-only): Install the IPA.
3657 (IPA_OBJS, IPA_LIB): New.
3658 (clean): Remove the IPA lib.
3659 (IPAGENT_CFLAGS): New.
3660 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3661 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3662 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3663 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3664 * configure.ac: Check for atomic builtins support in the compiler.
3665 (IPA_DEPFILES, extra_libraries): Define.
3666 * configure.srv (ipa_obj): Add description.
3667 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3668 (i[34567]86-*-linux*): Set ipa_obj.
3669 (x86_64-*-linux*): Set ipa_obj.
3670 * linux-low.c (stabilizing_threads): New.
3671 (supports_fast_tracepoints): New.
3672 (linux_detach): Stabilize threads before detaching.
3673 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3674 the lwp is either not stabilizing, or is moving out of a jump pad.
3675 (linux_fast_tracepoint_collecting): New.
3676 (maybe_move_out_of_jump_pad): New.
3677 (enqueue_one_deferred_signal): New.
3678 (dequeue_one_deferred_signal): New.
3679 (linux_wait_for_event_1): If moving out of a jump pad, defer
3680 pending signals to later.
3681 (linux_stabilize_threads): New.
3682 (linux_wait_1): Check if threads need moving out of jump pads, and
3684 (stuck_in_jump_pad_callback): New.
3685 (move_out_of_jump_pad_callback): New.
3687 (linux_resume_one_lwp): Handle moving out of jump pads.
3688 (linux_set_resume_request): Dequeue deferred signals.
3689 (need_step_over_p): Also step over fast tracepoint jumps.
3690 (start_step_over): Also uninsert fast tracepoint jumps.
3691 (finish_step_over): Also reinsert fast tracepoint jumps.
3692 (linux_install_fast_tracepoint_jump): New.
3693 (linux_target_ops): Install linux_stabilize_threads and
3694 linux_install_fast_tracepoint_jump_pad.
3695 * linux-low.h (linux_target_ops) <get_thread_area,
3696 install_fast_tracepoint_jump_pad>: New fields.
3697 (struct lwp_info) <collecting_fast_tracepoint,
3698 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3699 (linux_get_thread_area): Declare.
3700 * linux-x86-low.c (jump_insn): New.
3701 (x86_get_thread_area): New.
3702 (append_insns): New.
3704 (amd64_install_fast_tracepoint_jump_pad): New.
3705 (i386_install_fast_tracepoint_jump_pad): New.
3706 (x86_install_fast_tracepoint_jump_pad): New.
3707 (the_low_target): Install x86_get_thread_area and
3708 x86_install_fast_tracepoint_jump_pad.
3709 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3710 (struct fast_tracepoint_jump): New.
3711 (fast_tracepoint_jump_insn): New.
3712 (fast_tracepoint_jump_shadow): New.
3713 (find_fast_tracepoint_jump_at): New.
3714 (fast_tracepoint_jump_here): New.
3715 (delete_fast_tracepoint_jump): New.
3716 (set_fast_tracepoint_jump): New.
3717 (uninsert_fast_tracepoint_jumps_at): New.
3718 (reinsert_fast_tracepoint_jumps_at): New.
3719 (set_breakpoint_at): Use write_inferior_memory.
3720 (uninsert_raw_breakpoint): Use write_inferior_memory.
3721 (check_mem_read): Mask out fast tracepoint jumps.
3722 (check_mem_write): Mask out fast tracepoint jumps.
3723 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3724 (set_fast_tracepoint_jump): Declare.
3725 (delete_fast_tracepoint_jump)
3726 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3727 (reinsert_fast_tracepoint_jumps_at): Declare.
3728 * regcache.c: Don't compile many functions when building the
3729 in-process agent library.
3730 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3731 the register buffer in the heap.
3732 (free_register_cache): If the register buffer isn't owned by the
3733 regcache, don't free it.
3734 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3735 pre-existing register caches.
3736 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3738 (convert_ascii_to_int): : Constify `from' parameter type.
3739 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3740 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3741 the needed buffer in-place.
3742 (relocate_instruction): New.
3743 * server.c (handle_query) <qSymbols>: If the target supports
3744 tracepoints, give it a chance of looking up symbols. Report
3745 support for fast tracepoints.
3746 (handle_status): Stabilize threads.
3747 (process_serial_event): Adjust.
3748 * server.h (struct fast_tracepoint_jump): Forward declare.
3749 (struct process_info) <fast_tracepoint_jumps>: New field.
3750 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3751 (decode_X_packet, decode_M_packet): Adjust.
3752 (relocate_instruction): Declare.
3753 (in_process_agent_loaded): Declare.
3754 (tracepoint_look_up_symbols): Declare.
3755 (struct fast_tpoint_collect_status): Declare.
3756 (fast_tracepoint_collecting): Declare.
3757 (force_unlock_trace_buffer): Declare.
3758 (handle_tracepoint_bkpts): Declare.
3759 (initialize_low_tracepoint)
3760 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3761 * target.h (struct target_ops) <stabilize_threads,
3762 install_fast_tracepoint_jump_pad>: New fields.
3763 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3764 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3765 [HAVE_STDINT_H]: Include stdint.h.
3766 (trace_debug_1): Rename to ...
3767 (trace_vdebug): ... this.
3768 (trace_debug): Rename to ...
3769 (trace_debug_1): ... this. Add `level' parameter.
3771 (ATTR_USED, ATTR_NOINLINE): New.
3772 (IP_AGENT_EXPORT): New.
3773 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3774 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3775 (about_to_request_buffer_space, trace_buffer_is_full)
3776 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3777 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3778 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3779 (traceframe_write_count, traceframes_created)
3780 (trace_state_variables)
3781 New renaming defines.
3782 (struct ipa_sym_addresses): New.
3783 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3785 (ipa_sym_addrs): New.
3786 (all_tracepoint_symbols_looked_up): New.
3787 (in_process_agent_loaded): New.
3788 (write_e_ipa_not_loaded): New.
3789 (maybe_write_ipa_not_loaded): New.
3790 (tracepoint_look_up_symbols): New.
3791 (debug_threads) [IN_PROCESS_AGENT]: New.
3792 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3793 (UNKNOWN_SIDE_EFFECTS): New.
3794 (stop_tracing): New.
3795 (flush_trace_buffer): New.
3796 (stop_tracing_bkpt): New.
3797 (flush_trace_buffer_bkpt): New.
3798 (read_inferior_integer): New.
3799 (read_inferior_uinteger): New.
3800 (read_inferior_data_pointer): New.
3801 (write_inferior_data_pointer): New.
3802 (write_inferior_integer): New.
3803 (write_inferior_uinteger): New.
3804 (struct collect_static_trace_data_action): Delete.
3805 (enum tracepoint_type): New.
3806 (struct tracepoint) <type>: New field `type'.
3807 <actions_str, step_actions, step_actions_str>: Only include in
3809 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3810 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3811 (tracepoints): Use IP_AGENT_EXPORT.
3812 (last_tracepoint): Don't include in the IPA.
3813 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3814 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3815 (alloced_trace_state_variables): New.
3816 (trace_state_variables): Use IP_AGENT_EXPORT.
3817 (traceframe_t): Delete unused variable.
3818 (circular_trace_buffer): Don't include in the IPA.
3819 (trace_buffer_start): Delete.
3820 (struct trace_buffer_control): New.
3821 (trace_buffer_free): Delete.
3822 (struct ipa_trace_buffer_control): New.
3823 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3824 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3826 (trace_buffer_ctrl): New.
3827 (TRACE_BUFFER_CTRL_CURR): New.
3828 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3829 Reimplement as macros.
3830 (trace_buffer_wrap): Delete.
3831 (traceframe_write_count, traceframe_read_count)
3832 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3833 (struct tracepoint_hit_ctx) <type>: New field.
3834 (struct fast_tracepoint_ctx): New.
3835 (memory_barrier): New.
3837 (record_tracepoint_error): Update atomically in the IPA.
3838 (clear_inferior_trace_buffer): New.
3839 (about_to_request_buffer_space): New.
3840 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3841 updating the same buffer.
3842 (add_tracepoint): Default the tracepoint's type to trap
3843 tracepoint, and orig_size to -1.
3844 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3846 (create_trace_state_variable): New parameter `gdb'. Handle it.
3847 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3848 (cmd_qtdp): Handle fast tracepoints.
3850 (max_jump_pad_size): New.
3851 (gdb_jump_pad_head): New.
3852 (get_jump_space_head): New.
3853 (claim_jump_space): New.
3854 (sort_tracepoints): New.
3855 (MAX_JUMP_SIZE): New.
3856 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3858 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3859 support. Upload fast traceframes, and delete internal IPA
3861 (stop_tracing_handler): New.
3862 (flush_trace_buffer_handler): New.
3863 (cmd_qtstop): Upload fast tracepoints.
3864 (response_tracepoint): Handle fast tracepoints.
3865 (tracepoint_finished_step): Upload fast traceframes. Set the
3866 tracepoint hit context's tracepoint type.
3867 (handle_tracepoint_bkpts): New.
3868 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3869 type. Add comment about fast tracepoints.
3870 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3871 non-existing action_str field.
3872 (get_context_regcache): Handle fast tracepoints.
3873 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3875 (fast_tracepoint_from_jump_pad_address): New.
3876 (fast_tracepoint_from_ipa_tpoint_address): New.
3877 (collecting_t): New.
3878 (force_unlock_trace_buffer): New.
3879 (fast_tracepoint_collecting): New.
3882 (write_inferior_data_ptr): New.
3883 (target_tp_heap): New.
3884 (target_malloc): New.
3885 (download_agent_expr): New.
3887 (download_tracepoints): New.
3888 (download_trace_state_variables): New.
3889 (upload_fast_traceframes): New.
3890 (IPA_FIRST_TRACEFRAME): New.
3891 (IPA_NEXT_TRACEFRAME_1): New.
3892 (IPA_NEXT_TRACEFRAME): New.
3893 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3894 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3895 (gdb_jump_pad_buffer_end): New.
3896 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3897 (initialize_tracepoint): Adjust.
3898 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3899 buffer. Initialize the low module.
3900 * utils.c (PREFIX, TOOLNAME): New.
3901 (malloc_failure): Use PREFIX.
3902 (error): In the IPA, an error causes an exit.
3903 (fatal, warning): Use PREFIX.
3904 (internal_error): Use TOOLNAME.
3905 (NUMCELLS): Increase to 10.
3906 * configure, config.in: Regenerate.
3908 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3910 * server.c (handle_query) <qSupported>: Do two passes over the
3911 qSupported string to avoid nesting strtok.
3913 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3915 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3917 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3919 * configure: Regenerate.
3920 * proc-service.list: New.
3922 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3924 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3927 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3929 * gdbreplay.c (remote_open): Check error return from socket() call by
3930 its equality to -1 not by it being negative.
3931 * remote-utils.c (remote_open): Likewise.
3933 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3935 * config.h: Regenerate.
3937 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3939 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3940 doesn't provide PTRACE_GET_THREAD_AREA.
3942 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3944 * linux-m68k-low.c: Include <asm/ptrace.h>
3945 (ps_get_thread_area): Implement.
3947 2010-05-03 Doug Evans <dje@google.com>
3949 * event-loop.c (struct callback_event): New struct.
3950 (callback_list): New global.
3951 (append_callback_event, delete_callback_event): New functions.
3952 (process_callback): New function.
3953 (start_event_loop): Call it.
3954 * remote-utils.c (NOT_SCHEDULED): Define.
3955 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3956 moved out of readchar.
3957 (readchar): Rewrite. Call reschedule before returning.
3958 (reset_readchar): New function.
3959 (remote_close): Call it.
3960 (process_remaining, reschedule): New functions.
3961 * server.h (callback_handler_func): New typedef.
3962 (append_callback_event, delete_callback_event): Declare.
3964 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3966 * proc-service.c (ps_pglobal_lookup): Use
3967 thread_db_look_up_one_symbol.
3968 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3969 parameter. Use it instead of all_symbols_looked_up.
3970 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3972 (all_symbols_looked_up): Don't declare.
3973 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3974 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3976 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3977 Set all_symbols_looked_up here.
3978 (thread_db_look_up_one_symbol): New.
3979 (thread_db_get_tls_address): Adjust.
3980 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3981 thread_db object on the heap, and tentatively set it in the
3983 (thread_db_init): Don't set all_symbols_looked_up here.
3984 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3986 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3988 * linux-low.c (linux_kill, linux_detach): Adjust.
3989 (status_pending_p_callback): Remove redundant statement. Check
3990 for !TARGET_WAITIKIND_IGNORE, instead of
3991 TARGET_WAITKIND_STOPPED.
3992 (handle_tracepoints): Make sure LWP is locked. Adjust.
3993 (linux_wait_for_event_1): Adjust.
3994 (linux_cancel_breakpoints): New.
3995 (unsuspend_one_lwp): New.
3996 (unsuspend_all_lwps): New.
3997 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3998 (send_sigstop_callback): Change return type to int, add new
3999 `except' parameter and handle it.
4000 (suspend_and_send_sigstop_callback): New.
4001 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4002 pass them down. If SUSPEND, also increment the lwp's suspend
4004 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4005 (need_step_over_p): Don't consider suspended LWPs.
4006 (start_step_over): Adjust.
4007 (proceed_one_lwp): Change return type to int, add new `except'
4008 parameter and handle it.
4009 (unsuspend_and_proceed_one_lwp): New.
4010 (proceed_all_lwps): Use find_inferior instead of
4012 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4013 also decrement the suspend count of LWPs. Pass `except' down,
4014 instead of hacking its suspend count.
4015 (linux_pause_all): Add `freeze' parameter. Adjust.
4016 (linux_unpause_all): New.
4017 (linux_target_ops): Install linux_unpause_all.
4018 * server.c (handle_status): Adjust.
4019 * target.h (struct target_ops): New fields `unpause_all' and
4020 `cancel_breakpoints'. Add new parameter to `pause_all'.
4021 (pause_all): Add new `freeze' parameter.
4023 (cancel_breakpoints): New.
4024 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4026 (cmd_qtstart): Pause threads.
4027 (stop_tracing): Pause threads, and cancel breakpoints.
4028 * win32-low.c (win32_target_ops): Adjust.
4030 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4032 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4033 the inferior right away from here...
4034 (linux_wait_1): ... to here, and adjust to check the thread's
4035 last_resume_kind instead of the lwp's step or stop_expected flags.
4037 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4039 * README: Use consistent `GDB' and `GDBserver' spellings.
4041 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4043 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4044 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4045 (linux_detach_one_lwp): Assume the lwp is stopped.
4046 (any_thread_of): Delete.
4047 (linux_detach): Stop all lwps here. Don't blindly delete all
4049 (delete_lwp_callback): New.
4050 (linux_mourn): Delete all lwps of the process that is gone.
4051 (linux_wait_1): Don't delete the last lwp of the process here.
4052 * mem-break.h (mark_breakpoints_out): Declare.
4053 * mem-break.c (mark_breakpoints_out): New.
4054 (free_all_breakpoints): Use it.
4055 * server.c (handle_target_event): If the process is gone, mark
4057 * thread-db.c (struct thread_db) <create_bp>: New field.
4058 (thread_db_enable_reporting): Fix prototype. Store a thread event
4059 breakpoint reference in the thread_db struct.
4060 (thread_db_load_search): Clear the thread_db object.
4061 (try_thread_db_load_1): Ditto.
4062 (switch_to_process): New.
4063 (disable_thread_event_reporting): Use it.
4064 (remove_thread_event_breakpoints): New.
4065 (thread_db_detach, thread_db_mourn): Use it.
4067 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4069 * linux-low.c (linux_enable_event_reporting): New.
4070 (linux_wait_for_event_1, handle_extended_wait): Use it.
4072 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4074 * linux-low.c (linux_kill_one_lwp, linux_kill)
4075 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4076 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4077 SIGSTOP even if the LWP is stopped.
4078 (send_sigstop_callback): New.
4079 (stop_all_lwps): Use send_sigstop_callback instead.
4080 (linux_resume_one_thread): Adjust.
4081 (proceed_one_lwp): Still proceed an LWP that the client has
4082 requested to stop, if we haven't reported it as stopped yet. Make
4083 sure that LWPs the client want stopped, have a pending SIGSTOP.
4085 2010-04-26 Doug Evans <dje@google.com>
4087 * server.c (handle_general_set): Make static.
4089 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4090 Print received char after testing for error/eof instead of before.
4091 (input_interrupt): Tweak comment.
4093 2010-04-23 Doug Evans <dje@google.com>
4095 * server.c (start_inferior): Print inferior argv if --debug.
4097 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4099 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4100 * nto-x86-low.c: Include server.h
4102 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4104 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4105 be consistent with other sources of this directory.
4106 (init_registers_amd64): Correct name of source file of this function
4109 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4111 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4114 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4116 * win32-i386-low.c: Add 64-bit support.
4117 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4118 (init_registers_amd64): Declare.
4119 (mappings): Add 64-bit version of array.
4120 (init_windows_x86): New function.
4121 (the_low_target): Change init_arch field to init_windows_x86.
4123 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4125 * win32-low.c: Adapt to support also 64-bit architecture.
4126 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4127 (get_image_name): Use SIZE_T type for local variable `done'.
4128 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4129 (toolhelp_get_dll_name): Idem.
4130 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4131 Use uintptr_t typecast to avoid warning.
4132 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4133 (handle_exception): Use phex_nz to avoid warning.
4134 (win32_wait): Remove unused local variable `process'.
4136 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4138 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4141 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4143 * configure.ac: Use `ws2_32' library for srv_mingw.
4144 * configure: Regenerate.
4145 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4146 * remote-utils.c: Likewise.
4148 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4150 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4151 if __x86_64__ is defined.
4153 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4155 * configure: Regenerate.
4157 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4159 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4160 * target.h (target_ops): New get_tib_address field.
4161 * win32-low.h (win32_thread_info): Add thread_local_base field.
4162 * win32-low.c (child_add_thread): Add tlb argument.
4163 Set thread_local_base field to TLB.
4164 (get_child_debug_event): Adapt to child_add_thread change.
4165 (win32_get_tib_address): New function.
4166 (win32_target_ops): Set get_tib_address field to
4167 win32_get_tib_address.
4168 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4170 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4172 * linux-low.c (linux_mourn): Also remove the process.
4173 * server.c (handle_target_event): Don't remove the process here.
4174 * nto-low.c (nto_mourn): New.
4175 (nto_target_ops): Install it.
4176 * spu-low.c (spu_mourn): New.
4177 (spu_target_ops): Install it.
4178 * win32-low.c (win32_mourn): New.
4179 (win32_target_ops): Install it.
4181 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4183 * server.h (buffer_xml_printf): Remove redundant `;'.
4185 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4187 * regcache.c (set_register_cache): Invalidate regcaches before
4188 changing the register cache layout.
4189 (regcache_invalidate_one): Allow a NULL regcache.
4190 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4191 regcaches before changing the register cache layout or the target
4194 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4196 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4197 variable warning on Linux/x86-64.
4199 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4201 GDBserver disconnected tracing support.
4203 * linux-low.c (linux_remove_process): Delete.
4204 (add_lwp): Don't set last_resume_kind here.
4205 (linux_kill): Use `mourn'.
4206 (linux_detach): Use `thread_db_detach', and `mourn'.
4208 (linux_attach_lwp_1): Adjust comment.
4209 (linux_attach): last_resume_kind moved the thread_info; adjust.
4210 (status_pending_p_callback): Adjust.
4211 (linux_wait_for_event_1): Adjust.
4212 (count_events_callback, select_singlestep_lwp_callback)
4213 (select_event_lwp_callback, cancel_breakpoints_callback)
4214 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4215 (proceed_one_lwp): Adjust.
4216 (linux_async): Add debug output.
4217 (linux_thread_stopped): New.
4218 (linux_pause_all): New.
4219 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4221 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4222 (thread_db_free): Delete declaration.
4223 (thread_db_detach, thread_db_mourn): Declare.
4224 * thread-db.c (thread_db_init): Use thread_db_mourn.
4225 (thread_db_free): Delete, split in two.
4226 (disable_thread_event_reporting): New.
4227 (thread_db_detach): New.
4228 (thread_db_mourn): New.
4230 * server.h (struct thread_info) <last_resume_kind>: New field.
4231 <attached>: Add comment.
4232 <gdb_detached>: New field.
4233 (handler_func): Change return type to int.
4234 (handle_serial_event, handle_target_event): Ditto.
4235 (gdb_connected): Declare.
4237 (disconnected_tracing): Declare.
4238 (stop_tracing): Declare.
4240 * server.c (handle_query) <qSupported>: Report support for
4241 disconnected tracing.
4242 (queue_stop_reply_callback): Account for running threads.
4243 (gdb_wants_thread_stopped): New.
4244 (gdb_wants_all_threads_stopped): New.
4245 (gdb_reattached_process): New.
4246 (handle_status): Clear the `gdb_detached' flag of all processes.
4247 In all-stop, stop all threads.
4248 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4249 (process_serial_event): If the remote connection breaks, or if an
4250 exit was forced with "monitor exit", force an event loop exit.
4251 Handle disconnected tracing on detach.
4252 (handle_serial_event): Adjust.
4253 (handle_target_event): If GDB isn't connected, forward events back
4254 to the inferior, unless the last process exited, in which case,
4255 exit gdbserver. Adjust interface.
4257 * remote-utils.c (remote_open): Don't block in accept. Instead
4258 register an event loop source on the listen socket file
4259 descriptor. Refactor bits into ...
4260 (listen_desc): ... this new global.
4261 (gdb_connected): ... this new function.
4262 (enable_async_notification): ... this new function.
4263 (handle_accept_event): ... this new function.
4264 (remote_close): Clear remote_desc.
4266 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4268 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4270 (mourn_inferior): Define.
4271 (target_process_qsupported): Avoid the dangling else problem.
4272 (thread_stopped): Define.
4273 (pause_all): Define.
4274 (target_waitstatus_to_string): Declare.
4275 * target.c (target_waitstatus_to_string): New.
4277 * tracepoint.c (tracing): Make extern.
4278 (disconnected_tracing): New.
4279 (stop_tracing): Make extern. Handle tracing stops due to GDB
4281 (cmd_qtdisconnected): New.
4282 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4283 (handle_tracepoint_general_set): Handle QTDisconnected.
4285 * event-loop.c (event_handler_func): Change return type to int.
4286 (process_event): Bail out if the event handler wants the event
4288 (handle_file_event): Ditto.
4289 (start_event_loop): Bail out if the event handler wants the event
4292 * nto-low.c (nto_target_ops): Adjust.
4293 * spu-low.c (spu_wait): Don't remove the process here.
4294 (spu_target_ops): Adjust.
4295 * win32-low.c (win32_wait): Don't remove the process here.
4296 (win32_target_ops): Adjust.
4298 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4300 * regcache.c (realloc_register_cache): Invalidate inferior's
4301 regcache before recreating it.
4303 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4305 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4307 2010-04-09 Stan Shebs <stan@codesourcery.com>
4308 Pedro Alves <pedro@codesourcery.com>
4310 * server.h (LONGEST): New.
4311 (struct thread_info) <while_stepping>: New field.
4312 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4314 (initialize_tracepoint, handle_tracepoint_general_set)
4315 (handle_tracepoint_query, tracepoint_finished_step)
4316 (tracepoint_was_hit, release_while_stepping_state_list):
4317 (current_traceframe): Declare.
4318 * server.c (handle_general_set): Handle tracepoint packets.
4320 (write_memory): New.
4321 (handle_search_memory_1): Use read_memory.
4322 (handle_query): Report support for conditional tracepoints, trace
4323 state variables, and tracepoint sources. Handle tracepoint
4325 (main): Initialize the tracepoints module.
4326 (process_serial_event): Handle traceframe reads/writes.
4328 * linux-low.c (handle_tracepoints): New.
4329 (linux_wait_1): Call it.
4330 (linux_resume_one_lwp): Handle while-stepping.
4331 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4332 (linux_target_ops): Install them.
4333 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4335 * linux-x86-low.c (x86_supports_tracepoints): New.
4336 (the_low_target). Install it.
4338 * mem-break.h (delete_breakpoint): Declare.
4339 * mem-break.c (delete_breakpoint): Make external.
4341 * target.h (struct target_ops): Add `supports_tracepoints',
4342 `read_pc', and `write_pc' fields.
4343 (target_supports_tracepoints): Define.
4344 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4347 * regcache.h (struct regcache) <registers_owned>: New field.
4348 (init_register_cache, regcache_cpy): Declare.
4349 (regcache_read_pc, regcache_write_pc): Declare.
4350 (register_cache_size): Declare.
4351 (supply_regblock): Declare.
4352 * regcache.c (init_register_cache): New.
4353 (new_register_cache): Use it.
4354 (regcache_cpy): New.
4355 (register_cache_size): New.
4356 (supply_regblock): New.
4357 (regcache_read_pc, regcache_write_pc): New.
4359 * tracepoint.c: New.
4361 * Makefile.in (OBS): Add tracepoint.o.
4362 (tracepoint.o): New rule.
4364 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4366 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4368 (i386-mmx.c): Likewise.
4369 (i386-mmx-linux.o): Likewise.
4370 (i386-mmx-linux.c): Likewise.
4372 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4373 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4374 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4375 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4377 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4378 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4379 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4381 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4383 * Makefile.in (clean): Updated.
4385 (i386-avx.c): Likewise.
4386 (i386-avx-linux.o): Likewise.
4387 (i386-avx-linux.c): Likewise.
4388 (amd64-avx.o): Likewise.
4389 (amd64-avx.c): Likewise.
4390 (amd64-avx-linux.o): Likewise.
4391 (amd64-avx-linux.c): Likewise.
4393 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4394 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4395 (srv_amd64_regobj): Add amd64-avx.o.
4396 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4397 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4398 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4399 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4400 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4401 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4402 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4404 * i387-fp.c: Include "i386-xstate.h".
4406 (i387_cache_to_xsave): Likewise.
4407 (i387_xsave_to_cache): Likewise.
4408 (x86_xcr0): Likewise.
4410 * i387-fp.h (i387_cache_to_xsave): Likewise.
4411 (i387_xsave_to_cache): Likewise.
4412 (x86_xcr0): Likewise.
4414 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4415 * linux-crisv32-low.c (target_regsets): Likewise.
4416 * linux-m68k-low.c (target_regsets): Likewise.
4417 * linux-mips-low.c (target_regsets): Likewise.
4418 * linux-ppc-low.c (target_regsets): Likewise.
4419 * linux-s390-low.c (target_regsets): Likewise.
4420 * linux-sh-low.c (target_regsets): Likewise.
4421 * linux-sparc-low.c (target_regsets): Likewise.
4422 * linux-xtensa-low.c (target_regsets): Likewise.
4424 * linux-low.c: Include <sys/uio.h>.
4425 (regsets_fetch_inferior_registers): Support nt_type.
4426 (regsets_store_inferior_registers): Likewise.
4427 (linux_process_qsupported): New.
4428 (linux_target_ops): Add linux_process_qsupported.
4430 * linux-low.h (regset_info): Add nt_type.
4431 (linux_target_ops): Add process_qsupported.
4433 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4435 (init_registers_i386_avx_linux): New.
4436 (init_registers_amd64_avx_linux): Likewise.
4437 (xmltarget_i386_linux_no_xml): Likewise.
4438 (xmltarget_amd64_linux_no_xml): Likewise.
4439 (PTRACE_GETREGSET): Likewise.
4440 (PTRACE_SETREGSET): Likewise.
4441 (x86_fill_xstateregset): Likewise.
4442 (x86_store_xstateregset): Likewise.
4443 (use_xml): Likewise.
4444 (x86_linux_update_xmltarget): Likewise.
4445 (x86_linux_process_qsupported): Likewise.
4446 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4447 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4448 init_registers_i386_linux here. Call
4449 x86_linux_update_xmltarget.
4450 (the_low_target): Add x86_linux_process_qsupported.
4452 * server.c (handle_query): Call target_process_qsupported.
4454 * target.h (target_ops): Add process_qsupported.
4455 (target_process_qsupported): New.
4457 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4459 * inferiors.c (add_thread): Set last_status kind to
4460 TARGET_WAITKIND_IGNORE.
4461 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4462 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4463 (linux_wait_1): Move `thread' local definition to block that uses
4464 it. Don't NULL initialize `event_child'.
4465 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4466 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4467 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4469 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4471 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4472 an extended waitstatus, or by a watchpoint.
4473 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4474 thread was stepping or has been stopped by a watchpoint.
4476 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4478 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4479 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4480 of another, then delete the previous, and validate all
4482 (validate_inserted_breakpoint): New.
4483 (delete_disabled_breakpoints): New.
4484 (validate_breakpoints): New.
4485 (check_mem_read): Validate breakpoints before trusting their
4486 shadow. Delete disabled breakpoints.
4487 (check_mem_write): Validate breakpoints before trusting they
4488 should be inserted. Delete disabled breakpoints.
4489 * mem-break.h (validate_breakpoints):
4490 * server.c (handle_query): Validate breakpoints when we see a
4493 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4495 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4496 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4497 if we could tell there's a GDB breakpoint at stop_pc.
4498 (need_step_over_p): Don't do a step over if we find a GDB
4499 breakpoint at the resume PC.
4501 * mem-break.c (struct raw_breakpoint): New.
4502 (enum bkpt_type): New type `gdb_breakpoint'.
4503 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4504 fields. New field `raw'.
4505 (find_raw_breakpoint_at): New.
4506 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4508 (set_breakpoint_at): Adjust.
4509 (delete_raw_breakpoint): New.
4510 (release_breakpoint): New.
4511 (delete_breakpoint): Rename to...
4512 (delete_breakpoint_1): ... this. Add proc parameter. Use
4513 release_breakpoint. Return ENOENT.
4514 (delete_breakpoint): Reimplement.
4515 (find_breakpoint_at): Delete.
4516 (find_gdb_breakpoint_at): New.
4517 (delete_breakpoint_at): Delete.
4518 (set_gdb_breakpoint_at): New.
4519 (delete_gdb_breakpoint_at): New.
4520 (gdb_breakpoint_here): New.
4521 (set_reinsert_breakpoint): Use release_breakpoint.
4522 (uninsert_breakpoint): Rename to ...
4523 (uninsert_raw_breakpoint): ... this.
4524 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4525 (reinsert_raw_breakpoint): Change parameter type to
4527 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4529 (check_breakpoints): Adjust. Use release_breakpoint.
4530 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4531 (breakpoint_inserted_here): Ditto.
4532 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4533 Don't trust the breakpoint's shadow if it is not inserted.
4534 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4535 (delete_all_breakpoints): Adjust.
4536 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4537 use delete_breakpoint_1.
4539 * mem-break.h (breakpoints_supported): Delete declaration.
4540 (set_gdb_breakpoint_at): Declare.
4541 (gdb_breakpoint_here): Declare.
4542 (delete_breakpoint_at): Delete.
4543 (delete_gdb_breakpoint_at): Declare.
4545 * server.h (struct raw_breakpoint): Forward declare.
4546 (struct process_info): New field `raw_breakpoints'.
4548 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4551 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4553 * linux-low.c (status_pending_p_callback): Fix comment.
4554 (linux_wait_for_event_1): Move most of the internal breakpoint
4555 handling from here...
4556 (linux_wait_1): ... to here.
4557 (count_events_callback): New.
4558 (select_singlestep_lwp_callback): New.
4559 (select_event_lwp_callback): New.
4560 (cancel_breakpoints_callback): New.
4561 (select_event_lwp): New.
4562 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4563 priority to all LWPs that have had events that should be reported
4564 to the client. Cancel breakpoints when about to reporting the
4565 event to the client, not while stopping lwps. No longer cancel
4566 finished single-steps here.
4567 (cancel_finished_single_step): Delete.
4568 (cancel_finished_single_steps): Delete.
4570 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4572 * mem-break.c (enum bkpt_type): New.
4573 (struct breakpoint): New field `type'.
4574 (set_breakpoint_at): Change return type to struct breakpoint
4575 pointer. Set type to `other_breakpoint' by default.
4576 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4577 in the breakpoint list.
4578 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4579 (reinsert_breakpoint): Rename to ...
4580 (reinsert_raw_breakpoint): ... this.
4581 (reinsert_breakpoints_at): Adjust.
4582 * mem-break.h (struct breakpoint): Declare.
4583 (set_breakpoint_at): Change return type to struct breakpoint
4586 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4588 * server.c (handle_query): Assign, not compare.
4590 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4592 Teach linux gdbserver to step-over-breakpoints.
4594 * linux-low.c (can_hardware_single_step): New.
4595 (supports_breakpoints): New.
4596 (handle_extended_wait): If stopping threads, read the stop pc of
4599 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4600 low target doesn't support retrieving the PC.
4601 (add_lwp): Set last_resume_kind to resume_continue.
4602 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4603 (linux_attach): Don't clear stop_expected. Set the lwp's
4604 last_resume_kind to resume_stop.
4605 (linux_detach_one_lwp): Don't check for removed breakpoints.
4606 (check_removed_breakpoint): Delete.
4607 (status_pending_p): Rename to ...
4608 (status_pending_p_callback): ... this. Don't check for removed
4609 breakpoints. Don't consider threads that are stopped from GDB's
4611 (linux_wait_for_lwp): Always read the stop_pc here.
4612 (cancel_breakpoint): New.
4613 (step_over_bkpt): New global.
4614 (linux_wait_for_event_1): Implement stepping over breakpoints.
4615 (gdb_wants_lwp_stopped): New.
4616 (gdb_wants_all_stopped): New.
4617 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4618 single-step traps here. Store the thread's last reported target
4620 (send_sigstop): Don't clear stop_expected. Always set it,
4622 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4623 (cancel_finished_single_step): New.
4624 (cancel_finished_single_steps): New.
4625 (wait_for_sigstop): Don't cancel finished single-step traps here.
4626 (linux_resume_one_lwp): Don't check for removed breakpoints.
4627 Don't set `step' on non-hardware step archs.
4628 (linux_set_resume_request): Ignore resume_stop requests if already
4629 stopping or stopped. Set the lwp's last_resume_kind.
4630 (resume_status_pending_p): Don't check for removed breakpoints.
4631 (need_step_over_p): New.
4632 (start_step_over): New.
4633 (finish_step_over): New.
4634 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4635 requests. Clear the thread's last reported target waitstatus.
4636 Don't use the `suspended' flag. Don't consider pending breakpoints.
4637 (linux_resume): Start a step-over if necessary.
4638 (proceed_one_lwp): New.
4639 (proceed_all_lwps): New.
4640 (unstop_all_lwps): New.
4641 * linux-low.h (struct lwp_info): Rewrite comment for the
4642 `suspended' flag. Add the `stop_pc' field. Delete the
4643 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4644 Add `'last_resume_kind' and `need_step_over' fields.
4645 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4646 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4647 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4648 (set_raw_breakpoint_at): New.
4649 (set_breakpoint_at): Rewrite to use it.
4650 (reinsert_breakpoint_handler): Delete.
4651 (set_reinsert_breakpoint): New.
4652 (reinsert_breakpoint_by_bp): Delete.
4653 (delete_reinsert_breakpoints): New.
4654 (uninsert_breakpoint): Rewrite.
4655 (uninsert_breakpoints_at): New.
4656 (reinsert_breakpoint): Rewrite.
4657 (reinsert_breakpoints_at): New.
4658 (check_breakpoints): Rewrite.
4659 (breakpoint_here): New.
4660 (breakpoint_inserted_here): New.
4661 (check_mem_read): Adjust.
4662 * mem-break.h (breakpoints_supported, breakpoint_here)
4663 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4664 (reinsert_breakpoint_by_bp): Delete declaration.
4665 (delete_reinsert_breakpoints): Declare.
4666 (reinsert_breakpoint): Delete declaration.
4667 (reinsert_breakpoints_at): Declare.
4668 (uninsert_breakpoint): Delete declaration.
4669 (uninsert_breakpoints_at): Declare.
4670 (check_breakpoints): Adjust prototype.
4671 * server.h: Adjust include order.
4672 (struct thread_info): Declare here. Add a `last_status' field.
4674 2010-03-23 Michael Snyder <msnyder@vmware.com>
4676 * server.c (crc32): New function.
4677 (handle_query): Add handling for 'qCRC:' request.
4679 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4681 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4682 lwp had been stopped by a watchpoint.
4684 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4686 * server.h (internal_error): Declare.
4687 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4688 * utils.c (internal_error): New function.
4690 2010-03-15 Andreas Schwab <schwab@redhat.com>
4692 * configure.srv: Fix typo setting srv_regobj.
4694 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4696 * linux-low.c (fetch_register): Avoid passing a non string literal
4698 (usr_store_inferior_registers): Ditto.
4700 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4702 * linux-low.c (linux_write_memory): Bail out early if peeking
4705 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4707 * linux-low.h (struct lwp_info): New fields
4708 `stopped_by_watchpoint' and `stopped_data_address'.
4709 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4710 here, and cache them in the lwp object.
4711 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4713 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4715 (linux_stopped_by_watchpoint): Rewrite.
4716 (linux_stopped_data_address): Rewrite.
4718 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4720 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4721 switching the current inferior, not before.
4723 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4725 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4726 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4727 i386-linux.c and amd64-linux.c.
4728 (reg-i386.o): Removed.
4729 (reg-i386.c): Likewise.
4730 (reg-i386-linux.o): Likewise.
4731 (reg-i386-linux.c): Likewise.
4732 (reg-x86-64.o): Likewise.
4733 (reg-x86-64.c): Likewise.
4734 (reg-x86-64-linux.o): Likewise.
4735 (reg-x86-64-linux.c): Likewise.
4738 (i386-linux.o): Likewise.
4739 (i386-linux.c): Likewise.
4740 (amd64.o): Likewise.
4741 (amd64.c): Likewise.
4742 (amd64-linux.o): Likewise.
4743 (amd64-linux.c): Likewise.
4745 * configure.srv (srv_i386_regobj): New.
4746 (srv_i386_linux_regobj): Likewise.
4747 (srv_amd64_regobj): Likewise.
4748 (srv_amd64_linux_regobj): Likewise.
4749 (srv_i386_32bit_xmlfiles): Likewise.
4750 (srv_i386_64bit_xmlfiles): Likewise.
4751 (srv_i386_xmlfiles): Likewise.
4752 (srv_amd64_xmlfiles): Likewise.
4753 (srv_i386_linux_xmlfiles): Likewise.
4754 (srv_amd64_linux_xmlfiles): Likewise.
4755 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4756 srv_xmlfiles to $srv_i386_xmlfiles.
4757 (i[34567]86-*-mingw32ce*): Likewise.
4758 (i[34567]86-*-mingw*): Likewise.
4759 (i[34567]86-*-nto*): Likewise.
4760 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4761 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4762 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4763 (x86_64-*-linux*): Likewise.
4765 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4766 (init_registers_amd64_linux): New.
4767 (x86_arch_setup): Replace init_registers_x86_64_linux with
4768 init_registers_amd64_linux.
4770 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4772 * configure.ac: Check for libdl. If it is not available link against
4773 static libthread_db.
4774 * configure: Regenerate.
4776 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4780 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4781 handing a read watchpoint.
4782 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4784 2010-02-12 Doug Evans <dje@google.com>
4786 * linux-low.c (linux_supports_tracefork_flag): Document.
4787 (linux_look_up_symbols): Add comment.
4789 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4791 * regcache.c (supply_register): Clear regcache if buf is NULL.
4793 2010-02-02 Nicolas Roche <roche@sourceware.org>
4794 Joel Brobecker <brobecker@adacore.com>
4796 * inferiors.c (find_inferior): Add function documentation.
4797 (unloaded_dll): Handle the case where the unloaded dll has not
4798 been previously registered in the dll list.
4800 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4802 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4803 (thumb2_breakpoint): New.
4804 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4806 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4808 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4809 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4812 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4814 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4816 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4818 * linux-s390-low.c (s390_collect_ptrace_register)
4819 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4821 2010-01-21 Doug Evans <dje@google.com>
4823 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4824 (PTRACE_ARG4_TYPE): New macro.
4825 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4826 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4827 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4828 (usr_store_inferior_registers): Ditto.
4829 (linux_read_memory, linux_write_memory): Ditto.
4830 (linux_test_for_tracefork): Ditto.
4832 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4833 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4835 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4837 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4840 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4842 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4843 prototype to take a regcache. Adjust.
4845 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4847 * regcache.h (struct thread_info): Forward declare.
4848 (struct regcache): New.
4849 (new_register_cache): Adjust prototype.
4850 (get_thread_regcache): Declare.
4851 (free_register_cache): Adjust prototype.
4852 (registers_to_string, registers_from_string): Ditto.
4853 (supply_register, supply_register_by_name, collect_register)
4854 (collect_register_as_string, collect_register_by_name): Ditto.
4855 * regcache.c (struct inferior_regcache_data): Delete.
4856 (get_regcache): Rename to ...
4857 (get_thread_regcache): ... this. Adjust. Switch inferior before
4859 (regcache_invalidate_one): Adjust.
4860 (regcache_invalidate): Fix prototype.
4861 (new_register_cache): Return the new register cache.
4862 (free_register_cache): Change prototype.
4863 (realloc_register_cache): Adjust.
4864 (registers_to_string): Change prototype to take a regcache. Adjust.
4865 (registers_from_string): Ditto.
4866 (register_data): Ditto.
4867 (supply_register): Ditto.
4868 (supply_register_by_name): Ditto.
4869 (collect_register): Ditto.
4870 (collect_register_as_string): Ditto.
4871 (collect_register_by_name): Ditto.
4872 * server.c (process_serial_event): Adjust.
4873 * linux-low.h (regset_fill_func, regset_store_func): Change
4875 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4877 * linux-low.c (get_stop_pc): Adjust.
4878 (check_removed_breakpoint): Adjust.
4879 (linux_wait_for_event): Adjust.
4880 (linux_resume_one_lwp): Adjust.
4881 (fetch_register): Add regcache parameter. Adjust.
4882 (usr_store_inferior_registers): Ditto.
4883 (regsets_fetch_inferior_registers): Ditto.
4884 (regsets_store_inferior_registers): Ditto.
4885 (linux_fetch_registers, linux_store_registers): Ditto.
4886 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4888 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4890 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4891 prototype to take a regcache.
4892 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4893 * remote-utils.c (convert_ascii_to_int, outreg)
4894 (prepare_resume_reply): Change prototype to take a regcache.
4896 * target.h (struct target_ops) <fetch_registers, store_registers>:
4897 Change prototype to take a regcache.
4898 (fetch_inferior_registers, store_inferior_registers): Change
4899 prototype to take a regcache. Adjust.
4900 * proc-service.c (ps_lgetregs): Adjust.
4901 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4902 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4903 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4904 take a regcache. Adjust.
4905 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4906 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4907 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4908 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4909 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4910 (cris_cannot_fetch_register):
4911 (cris_breakpoint_at): Change prototype to take a regcache.
4913 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4914 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4915 to take a regcache. Adjust.
4916 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4918 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4919 take a regcache. Adjust.
4920 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4921 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4922 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4923 * linux-mips-low.c (mips_get_pc):
4924 (mips_set_pc): Change prototype to take a regcache. Adjust.
4925 (mips_reinsert_addr): Adjust.
4926 (mips_collect_register): Change prototype to take a regcache.
4928 (mips_supply_register):
4929 (mips_collect_register_32bit, mips_supply_register_32bit)
4930 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4931 (mips_store_fpregset): Ditto.
4932 * linux-ppc-low.c (ppc_supply_ptrace_register)
4933 (ppc_supply_ptrace_register): Ditto.
4934 (parse_spufs_run): Adjust.
4935 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4936 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4937 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4938 take a regcache. Adjust.
4939 * linux-s390-low.c (s390_collect_ptrace_register)
4940 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4941 (s390_set_pc): Change prototype to take a regcache. Adjust.
4942 (s390_arch_setup): Adjust.
4943 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4944 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4945 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4946 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4947 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4949 (sparc_breakpoint_at): Adjust.
4950 * linux-xtensa-low.c (xtensa_fill_gregset):
4951 (xtensa_store_gregset):
4952 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4953 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4954 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4955 prototype to take a regcache. Adjust.
4956 * win32-arm-low.c (arm_fetch_inferior_register)
4957 (arm_store_inferior_register): Change prototype to take a
4959 * win32-i386-low.c (i386_fetch_inferior_register)
4960 (i386_store_inferior_register): Change prototype to take a
4962 * win32-low.c (child_fetch_inferior_registers)
4963 (child_store_inferior_registers): Change prototype to take a
4965 (win32_wait): Adjust.
4966 (win32_fetch_inferior_registers): Change prototype to take a
4968 (win32_store_inferior_registers): Adjust.
4969 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4970 store_inferior_register>: Change prototype to take a regcache.
4972 2010-01-20 Doug Evans <dje@google.com>
4974 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4976 (linux_wait_for_event1, linux_init_signals): Ditto.
4977 (W_STOPCODE): Provide definition if missing.
4979 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4981 * linux-low.c (linux_core_of_thread): New.
4982 (compare_ints, show_process, list_threads): New.
4983 (linux_qxfer_osdata): Report threads and cores.
4984 (linux_target_op): Register linux_core_of_thread.
4985 * remote-utils.c (prepare_resume_reply): Report the core.
4986 (buffer_xml_printf): Support %d specifier.
4987 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4989 (handle_query): Handle qXfer:threads. Announce availability
4991 * target.h (struct target_ops): New field core_of_thread.
4993 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4995 * Makefile.in (clean): Remove new generated files.
4996 (reg-s390.o, reg-s390.c): Remove rules.
4997 (reg-s390x.o, reg-s390x.c): Likewise.
4998 (s390-linux32.o, s390-linux32.c): Add rules.
4999 (s390-linux64.o, s390-linux64.c): Likewise.
5000 (s390x-linux64.o, s390x-linux64.c): Likewise.
5001 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5002 * linux-s390-low.c: Include <elf.h>.
5003 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5004 (init_registers_s390): Remove prototype.
5005 (init_registers_s390x): Likewise.
5006 (init_registers_s390_linux32): Add prototype.
5007 (init_registers_s390_linux64): Likewise.
5008 (init_registers_s390x_linux64): Likewise.
5009 (s390_num_regs_3264): New define.
5010 (s390_regmap_3264): New global variable.
5011 (s390_cannot_fetch_register): Remove obsolete check.
5012 (s390_cannot_store_register): Likewise.
5013 (s390_collect_ptrace_register): Handle upper/lower register halves.
5014 (s390_supply_ptrace_register): Likewise.
5015 (s390_fill_gregset): Update to register number changes.
5016 (s390_get_hwcap): New routine.
5017 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5018 Install appropriate regmap and register set.
5020 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5022 * server.c (gdbserver_version): Update copyright year to 2010.
5023 * gdbreplay.c (gdbreplay_version): Likewise.
5025 2009-12-28 Doug Evans <dje@google.com>
5027 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5028 elf/external.h. Include <elf.h> instead but only if necessary.
5030 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5032 * linux-low.c (linux_remove_process): Remove `detaching'
5033 parameter. Don't release/detach from thread_db here.
5034 (linux_kill): Release/detach from thread_db here, ...
5035 (linux_detach): ... and here, before actually detaching.
5036 (linux_wait_1): ... and here, when a process exits.
5037 * thread-db.c (any_thread_of): New.
5038 (thread_db_free): Switch the current inferior to a thread of the
5041 2009-12-21 Doug Evans <dje@google.com>
5043 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5045 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5046 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5047 warning ifndef __NR_tkill. Move setting of errno there too.
5048 Delete unnecessary resetting of errno after syscall.
5049 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5051 * configure.ac: Check for dladdr.
5052 * config.in: Regenerate.
5053 * configure: Regenerate.
5054 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5055 (try_thread_db_load): Update.
5057 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5059 2009-12-18 Doug Evans <dje@google.com>
5061 * event-loop.c: Include unistd.h if it exists.
5063 * linux-low.c (my_waitpid): Move definition away from being in
5064 between linux_tracefork_child/linux_test_for_tracefork.
5066 * gdb_proc_service.h (psaddr_t): Fix type.
5067 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5068 signature to match glibc.
5070 2009-12-16 Doug Evans <dje@google.com>
5072 * linux-low.c (linux_read_memory): Fix argument to read.
5074 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5076 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5077 events, don't leave current_inferior pointing at null.
5079 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5081 * win32-low.c (LOG): Delete.
5082 (OUTMSG): Output to stderr.
5083 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5084 on compile time LOG macro.
5085 (win32_wait): Fix debug output.
5087 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5089 * win32-low.c (win32_add_one_solib): If the dll name is
5090 "ntdll.dll", prepend the system directory to the dll path.
5092 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5094 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5096 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5097 Vladimir Prus <vladimir@codesourcery.com>
5099 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5100 * configure.ac: Check for __mcoldfire__ and set
5101 gdb_cv_m68k_is_coldfire.
5102 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5103 reg-cf.o and reg-m68k.o.
5104 * configure: Regenerated.
5106 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5108 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5109 Pass it to thread_db_free.
5110 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5111 proper `detaching' argument to linux_remove_process.
5112 * linux-low.h (thread_db_free): Add `detaching' parameter.
5113 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5115 (thread_db_free): Add `detaching' parameter. Only
5116 call td_ta_clear_event if detaching from process.
5118 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5120 * thread-db.c (thread_db_free): Fix typo.
5122 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5125 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5127 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5129 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5130 with an i686 compiler.
5131 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5133 * configure: Rebuilt.
5135 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5139 * server.c (handle_search_memory_1): Correct read_addr initialization
5140 in loop for searching subsequent chunks.
5142 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5144 * configure.ac: New --with-libthread-db option.
5145 * thread-db.c: Allow direct dependence on libthread_db.
5146 (thread_db_free): Adjust.
5147 * config.in: Regenerate.
5148 * configure: Likewise.
5150 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5153 * thread-db.c (attach_thread): New function.
5154 (maybe_attach_thread): Return success/failure.
5155 (find_new_threads_callback): Adjust.
5156 (thread_db_find_new_threads): Loop until no new threads.
5158 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5160 * proc-service.c (ps_lgetregs): Formatting.
5162 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5164 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5165 * configure.ac: Adjust.
5166 * linux-low.h (struct process_info_private): Move members to struct
5168 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5169 * linux-low.c (linux_remove_process): Adjust.
5170 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5171 * server.c (handle_query): Move code ...
5172 (handle_monitor_command): ... here. New function.
5173 * target.h (struct target_ops): New member.
5174 * thread-db.c (struct thread_db): New.
5175 (libthread_db_search_path): New variable.
5176 (thread_db_create_event, thread_db_enable_reporting)
5177 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5178 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5179 (try_thread_db_load_1, dladdr_to_soname): New functions.
5180 (try_thread_db_load, thread_db_load_search): New functions.
5181 (thread_db_init): Search for libthread_db.
5182 (thread_db_free): New function.
5183 (thread_db_handle_monitor_command): Likewise.
5184 * config.in: Regenerate.
5185 * configure: Regenerate.
5187 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5189 * spu-low.c (spu_kill): Wait for inferior to terminate.
5190 Call clear_inferiors.
5191 (spu_detach): Call clear_inferiors.
5193 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5195 * aclocal.m4: Regenerate.
5196 * config.in: Likewise.
5197 * configure: Likewise.
5199 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5201 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5202 (parse_spufs_run): New function.
5203 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5204 (ppc_breakpoint_at): Handle SPU breakpoints.
5206 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5208 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5209 (SPUFS_MAGIC): Define.
5210 (spu_enumerate_spu_ids): New function.
5211 (linux_qxfer_spu): New function.
5212 (linux_target_ops): Install linux_qxfer_spu.
5214 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5216 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5217 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5218 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5219 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5220 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5221 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5222 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5223 (init_registers_powerpc_cell32l): Add prototype.
5224 (init_registers_powerpc_cell64l): Likewise.
5225 (ppc_arch_setup): Detect Cell/B.E. architecture.
5227 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5229 * Makefile.in (datarootdir): New variable.
5231 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5233 * linux-low.c (linux_write_memory): Update debugging output.
5234 * Makefile.in (clean): Add new descriptions.
5235 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5236 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5237 * configure.srv: Add new files for arm*-*-linux*.
5238 * linux-arm-low.c: Add new declarations.
5239 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5240 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5241 (HWCAP_VFPv3D16): New.
5242 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5243 instead of __IWMMXT__.
5244 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5245 (arm_arch_setup): New.
5246 (target_regsets): Remove #ifdef. Add VFP regset.
5247 (the_low_target): Use arm_arch_setup.
5249 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5251 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5252 the main thread again.
5254 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5256 Adding Neutrino gdbserver.
5257 * configure: Regenerated.
5258 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5259 * configure.srv (i[34567]86-*-nto*): New target.
5260 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5261 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5262 (nto_comctrl) [__QNX__]: New function.
5263 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5265 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5267 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5270 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5271 Pedro Alves <pedro@codesourcery.com>
5273 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5274 don't support CONTEXT_EXTENDED_REGISTERS.
5275 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5276 (the_low_target): Install them.
5277 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5278 failing with ERROR_PIPE_NOT_CONNECTED.
5280 2009-06-30 Doug Evans <dje@google.com>
5281 Pierre Muller <muller@ics.u-strasbg.fr>
5283 Add h/w watchpoint support to x86-linux, win32-i386.
5284 * Makefile.in (SFILES): Add i386-low.c
5285 (i386_low_h): Define.
5286 (i386-low.o): Add dependencies.
5287 (linux-x86-low.o): Add i386-low.h dependency.
5288 (win32-i386-low.o): Ditto.
5289 * i386-low.c: New file.
5290 * i386-low.h: New file.
5291 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5292 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5293 * linux-low.c (linux_add_process): Initialize arch_private.
5294 (linux_remove_process): Free arch_private.
5295 (add_lwp): Initialize arch_private.
5296 (delete_lwp): Free arch_private.
5297 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5299 * linux-low.h (process_info_private): New member arch_private.
5300 (lwp_info): New member arch_private.
5301 (linux_target_ops): New members new_process, new_thread,
5303 (ptid_of): New macro.
5304 * linux-x86-low.c: Include stddef.h, i386-low.h.
5305 (arch_process_info): New struct.
5306 (arch_lwp_info): New struct.
5307 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5308 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5309 (i386_dr_low_get_status): New function.
5310 (x86_insert_point, x86_remove_point): New functions.
5311 (x86_stopped_by_watchpoint): New function.
5312 (x86_stopped_data_address): New function.
5313 (x86_linux_new_process, x86_linux_new_thread): New functions.
5314 (x86_linux_prepare_to_resume): New function.
5315 (the_low_target): Add entries for insert_point, remove_point,
5316 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5318 * server.c (debug_hw_points): New global.
5319 (monitor_show_help): Document set debug-hw-points.
5320 (handle_query): Process "set debug-hw-points".
5321 * server.h (debug_hw_points): Declare.
5322 (paddress): Declare.
5323 * utils.c (NUMCELLS, CELLSIZE): New macros.
5324 (get_sell, xsnprintf, paddress): New functions.
5325 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5326 remove_point, stopped_by_watchpoint, stopped_data_address.
5327 * win32-i386-low.c: Include i386-low.h.
5328 (debug_reg_state): Replaces dr.
5329 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5330 (i386_dr_low_get_status): New function.
5331 (i386_insert_point, i386_remove_point): New functions.
5332 (i386_stopped_by_watchpoint): New function.
5333 (i386_stopped_data_address): New function.
5334 (i386_initial_stuff): Update.
5335 (get_thread_context,set_thread_context,i386_thread_added): Update.
5336 (the_low_target): Add entries for insert_point,
5337 remove_point, stopped_by_watchpoint, stopped_data_address.
5338 * win32-low.c (win32_insert_watchpoint): New function.
5339 (win32_remove_watchpoint): New function.
5340 (win32_stopped_by_watchpoint): New function.
5341 (win32_stopped_data_address): New function.
5342 (win32_target_ops): Add entries for insert_watchpoint,
5343 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5344 * win32-low.h (win32_target_ops): New members insert_point,
5345 remove_point, stopped_by_watchpoint, stopped_data_address.
5347 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5349 * server.c (process_serial_event): Re-return unsupported, not
5350 error, if the type isn't recognized. Re-allow supporting only
5351 insert or remove packets. Also call require_running for
5352 breakpoints. Add missing break statement to default case. Tidy.
5353 * target.h (struct target_ops): Rename insert_watchpoint to
5354 insert_point, and remove_watchpoint to remove_point.
5356 * linux-low.h (struct linux_target_ops): Likewise.
5357 * linux-low.c (linux_insert_watchpoint): Rename to ...
5358 (linux_insert_point): ... this. Adjust.
5359 (linux_remove_watchpoint): Rename to ...
5360 (linux_remove_point): ... this. Adjust.
5361 (linux_target_ops): Adjust.
5362 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5363 (cris_insert_point): ... this.
5364 (cris_remove_watchpoint): Rename to ...
5365 (cris_remove_point): ... this.
5366 (the_low_target): Adjust.
5368 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5370 * server.c (handle_v_kill): Pass signal_pid to
5371 kill_inferior if multi_process is zero.
5373 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5375 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5376 * target.h (target_ops): Comment for *_watchpoint to make it clear
5377 the functions can get types '0' and '1'.
5379 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5381 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5382 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5383 * regcache.c (get_regcache): Likewise.
5384 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5385 * win32-low.c (child_fetch_inferior_registers): Remove check for
5388 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5389 Pedro Alves <pedro@codesourcery.com>
5391 * target.h (struct target_ops) <supports_multi_process>: New
5393 (target_supports_multi_process): New.
5394 * server.c (handle_query): Even if GDB reports support, only
5395 enable multi-process if the target also supports it. Report
5396 multi-process support only if the target backend supports it.
5397 * linux-low.c (linux_supports_multi_process): New function.
5398 (linux_target_ops): Install it as target_supports_multi_process
5401 2009-05-24 Doug Evans <dje@google.com>
5403 Global renaming of find_thread_pid to find_thread_ptid.
5404 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5405 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5406 All callers updated.
5408 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5409 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5412 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5413 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5414 (linux_resume_one_lwp): Ditto.
5416 2009-05-23 Doug Evans <dje@google.com>
5418 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5419 from struct inferior_list_entry * to struct lwp_info *.
5420 All callers updated.
5422 2009-05-13 Doug Evans <dje@google.com>
5424 * linux-x86-low.c: Don't include assert.h.
5425 (x86_siginfo_fixup): Use fatal, not assert.
5426 (x86_arch_setup): Fix comment.
5428 2009-05-12 Doug Evans <dje@google.com>
5430 Biarch support for i386/amd64 gdbserver.
5431 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5432 Add linux-x86-low.c.
5433 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5434 (linux-x86-low.o): Add.
5435 * linux-x86-64-low.c: Delete.
5436 * linux-i386-low.c: Delete.
5437 * linux-x86-low.c: New file.
5438 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5440 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5442 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5443 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5444 (linux_child_pid_to_exec_file): New function.
5445 (elf_64_header_p, elf_64_file_p): New functions.
5446 (siginfo_fixup): New function.
5447 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5448 give target a chance to convert layout.
5449 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5450 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5452 2009-05-07 Doug Evans <dje@google.com>
5454 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5455 (regsets_store_inferior_registers): Ditto.
5457 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5461 * linux-low.c (must_set_ptrace_flags): Delete.
5462 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5464 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5465 `lwp->must_set_ptrace_flags' instead.
5466 (linux_wait_for_event_1): Set ptrace options here.
5467 (linux_wait_1): ... not here.
5469 2009-04-30 Doug Evans <dje@google.com>
5471 * inferiors.c (started_inferior_callback): New function.
5472 (attached_inferior_callback): New function.
5473 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5474 * server.c (print_started_pid, print_attached_pid): New functions.
5475 (detach_or_kill_for_exit): New function.
5476 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5477 * server.h (have_started_inferiors_p): Declare.
5478 (have_attached_inferiors_p): Declare.
5480 * inferiors.c (remove_process): Fix memory leak, free process.
5481 * linux-low.c (linux_remove_process): New function.
5482 (linux_kill): Call it instead of remove_process.
5483 (linux_detach, linux_wait_1): Ditto.
5485 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5487 * configure.srv: Add x86 Windows CE target.
5489 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5491 * inferiors.c (get_thread_process): Make global.
5492 * server.h (get_thread_process): Add prototype.
5493 * thread-db.c (find_one_thread): Use get_thread_process
5494 instead of current_process.
5495 (thread_db_get_tls_address): Do not crash if called when
5496 thread layer is not yet initialized.
5498 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5500 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5501 * spu-low.c (current_tid): Rename to ...
5502 (current_ptid): ... this.
5503 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5504 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5505 ptid_get_lwp (current_ptid) instead of current_tid.
5506 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5507 instead of current_tid. Use find_process_pid to verify pid
5508 argument is valid. Pass proper argument to remove_process.
5509 (spu_thread_alive): Compare current_ptid instead of current_tid.
5510 (spu_resume): Likewise.
5512 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5514 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5517 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5519 Implement the multiprocess extensions, and add linux multiprocess
5522 * server.h (ULONGEST): Declare.
5523 (struct ptid, ptid_t): New.
5524 (minus_one_ptid, null_ptid): Declare.
5525 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5526 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5527 (struct inferior_list_entry): Change `id' type from unsigned from
5529 (struct sym_cache, struct breakpoint, struct
5530 process_info_private): Forward declare.
5531 (struct process_info): Declare.
5532 (current_process): Declare.
5533 (all_processes): Declare.
5534 (initialize_inferiors): Declare.
5535 (add_thread): Adjust to use ptid_t.
5536 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5537 (add_process, remove_process, find_thread_pid): Declare.
5538 (find_inferior_id): Adjust to use ptid_t.
5539 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5540 (multi_process): Declare.
5541 (push_event): Adjust to use ptid_t.
5542 (read_ptid, write_ptid): Declare.
5543 (prepare_resume_reply): Adjust to use ptid_t.
5544 (clear_symbol_cache): Declare.
5545 * inferiors.c (all_processes): New.
5546 (null_ptid, minus_one_ptid): New.
5547 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5548 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5549 (add_thread): Change unsigned long to ptid. Remove gdb_id
5551 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5552 (gdb_id_to_thread): Rename to ...
5553 (find_thread_pid): ... this. Change unsigned long to ptid.
5554 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5555 (loaded_dll, pull_pid_from_list): Adjust.
5556 (add_process, remove_process, find_process_pid)
5557 (get_thread_process, current_process, initialize_inferiors): New.
5558 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5559 (struct target_waitstatus) <related_pid>: Ditto.
5560 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5562 (struct target_ops) <join>: Add `pid' argument.
5563 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5564 (struct target_ops) <wait>: Add `ptid' field. Change return type
5566 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5567 (mywait): Add `ptid' argument. Change return type to ptid_t.
5568 (target_pid_to_str): Declare.
5569 * target.c (set_desired_inferior): Adjust to use ptids.
5570 (mywait): Add new `ptid' argument. Adjust.
5571 (target_pid_to_str): New.
5572 * mem-break.h (free_all_breakpoints): Declare.
5573 * mem-break.c (breakpoints): Delelete.
5574 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5575 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5576 to use per-process breakpoint list.
5577 (free_all_breakpoints): New.
5578 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5579 (symbol_cache, all_symbols_looked_up): Delete.
5581 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5583 (prepare_resume_reply): Change ptid argument's type from unsigned
5584 long to ptid_t. Adjust. Implement W;process and X;process.
5585 (free_sym_cache, clear_symbol_cache): New.
5586 (look_up_one_symbol): Adjust to per-process symbol cache. *
5587 * server.c (cont_thread, general_thread, step_thread): Change type
5590 (multi_process): New.
5591 (last_ptid): Change type to ptid_t.
5592 (struct vstop_notif) <ptid>: Change type to ptid_t.
5593 (queue_stop_reply, push_event): Change `ptid' argument's type to
5595 (discard_queued_stop_replies): Add `pid' argument.
5596 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5597 changes. Don't reference the `attached' global.
5598 (attach_inferior): Adjust to mywait interface changes.
5599 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5600 features. Handle and report "multiprocess+". Handle
5602 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5604 (handle_v_kill): New.
5605 (handle_v_stopped): Adjust to use target_pid_to_str.
5606 (handle_v_requests): Allow multiple attaches and runs when
5607 multiprocess extensions are in effect. Handle "vKill".
5608 (myresume): Adjust to use ptids.
5609 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5610 (handle_status): Adjust to discard_queued_stop_replies interface
5612 (first_thread_of, kill_inferior_callback)
5613 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5614 (main): Call initialize_inferiors. Adjust to use ptids, killing
5615 and detaching from all inferiors. Handle multiprocess packet
5617 * linux-low.h: Include gdb_proc_service.h.
5618 (struct process_info_private): New.
5619 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5620 <lwpid_of>: Use ptid_get_lwp.
5621 (get_lwp_thread): Adjust.
5622 (struct lwp_info): Add `dead' member.
5623 (find_lwp_pid): Declare.
5624 * linux-low.c (thread_db_active): Delete.
5625 (new_inferior): Adjust comment.
5626 (inferior_pid): Delete.
5627 (linux_add_process): New.
5628 (handle_extended_wait): Adjust.
5629 (add_lwp): Change unsigned long to ptid.
5630 (linux_create_inferior): Add process to processes table. Adjust
5631 to use ptids. Don't set new_inferior here.
5632 (linux_attach_lwp): Rename to ...
5633 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5634 it. Adjust to use ptids.
5635 (linux_attach_lwp): New.
5636 (linux_attach): Add process to processes table. Don't set
5638 (struct counter): New.
5639 (second_thread_of_pid_p, last_thread_of_process_p): New.
5640 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5642 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5643 processes. Remove process from process table.
5644 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5645 to multiple processes.
5646 (any_thread_of): New.
5647 (linux_detach): Add `pid' argument, and handle it. Remove process
5648 from processes table.
5649 (linux_join): Add `pid' argument. Handle it.
5650 (linux_thread_alive): Change unsighed long argument to ptid_t.
5651 Consider dead lwps as not being alive.
5652 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5653 threads we're not interested in.
5654 (same_lwp, find_lwp_pid): New.
5655 (linux_wait_for_lwp): Change `pid' argument's type from int to
5657 (linux_wait_for_event): Rename to ...
5658 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5659 from int to ptid_t. Adjust.
5660 (linux_wait_for_event): New.
5661 (linux_wait_1): Add `ptid' argument. Change return type to
5662 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5663 that exit from the process table.
5664 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5666 (mark_lwp_dead): New.
5667 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5668 stopping all threads, mark its main lwp as dead.
5669 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5671 (fetch_register, usr_store_inferior_registers)
5672 (regsets_fetch_inferior_registers)
5673 (regsets_store_inferior_registers, linux_read_memory)
5674 (linux_write_memory): Inline `inferior_pid'.
5675 (linux_look_up_symbols): Adjust to use per-process
5677 (linux_request_interrupt): Adjust to use ptids.
5678 (linux_read_auxv): Inline `inferior_pid'.
5679 (initialize_low): Don't reference thread_db_active.
5680 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5681 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5682 (ps_getpid): Return the pid of the current inferior.
5683 * thread-db.c (proc_handle, thread_agent): Delete.
5684 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5686 (find_one_thread): Change argument type to ptid_t. Adjust to
5688 (maybe_attach_thread): Adjust to per-process data and ptids.
5689 (thread_db_find_new_threads): Ditto.
5690 (thread_db_init): Ditto.
5691 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5692 processes table. Adjust to use ptids.
5693 (spu_kill, spu_detach): Adjust interface. Remove process from
5695 (spu_join, spu_thread_alive): Adjust interface.
5696 (spu_wait): Adjust interface. Remove process from processes
5697 table. Adjust to use ptids.
5698 * win32-low.c (current_inferior_tid): Delete.
5699 (current_inferior_ptid): New.
5700 (debug_event_ptid): New.
5701 (thread_rec): Take a ptid. Adjust.
5702 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5703 (child_delete_thread): Ditto.
5704 (do_initial_child_stuff): Add `attached' argument. Add process to
5706 (child_fetch_inferior_registers, child_store_inferior_registers):
5708 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5709 (win32_attach): Pass 1 to do_initial_child_stuff.
5710 (win32_kill): Adjust interface. Remove process from processes
5712 (win32_detach): Ditto.
5713 (win32_join): Adjust interface.
5714 (win32_thread_alive): Take a ptid.
5715 (win32_resume): Adjust to use ptids.
5716 (get_child_debug_event): Ditto.
5717 (win32_wait): Adjust interface. Remove exiting process from
5720 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5722 Non-stop mode support.
5724 * server.h (non_stop): Declare.
5725 (gdb_client_data, handler_func): Declare.
5726 (delete_file_handler, add_file_handler, start_event_loop):
5728 (handle_serial_event, handle_target_event, push_event)
5729 (putpkt_notif): Declare.
5730 * target.h (enum resume_kind): New.
5731 (struct thread_resume): Replace `step' field by `kind' field.
5732 (TARGET_WNOHANG): Define.
5733 (struct target_ops) <wait>: Add `options' argument.
5734 <supports_non_stop, async, start_non_stop>: New fields.
5735 (target_supports_non_stop, target_async): New.
5736 (start_non_stop): Declare.
5737 (mywait): Add `options' argument.
5738 * target.c (mywait): Add `options' argument. Print child exit
5740 (start_non_stop): New.
5741 * server.c (non_stop, own_buf, mem_buf): New globals.
5742 (struct vstop_notif): New.
5743 (notif_queue): New global.
5744 (queue_stop_reply, push_event, discard_queued_stop_replies)
5745 (send_next_stop_reply): New.
5746 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5748 (attach_inferior): In non-stop mode, don't wait for the target
5750 (handle_general_set): Handle QNonStop.
5751 (handle_query): When handling qC, return the current general
5752 thread, instead of the first thread of the list.
5753 (handle_query): If the backend supports non-stop mode, include
5754 QNonStop+ in the qSupported query response.
5755 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5757 (handle_v_attach, handle_v_run): Handle non-stop mode.
5758 (handle_v_stopped): New.
5759 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5760 (myresume): Adjust to use resume_kind. Handle non-stop.
5761 (queue_stop_reply_callback): New.
5762 (handle_status): Handle non-stop mode.
5763 (main): Clear non_stop flag on reconnection. Use the event-loop.
5764 Refactor serial protocol handling from here ...
5765 (process_serial_event): ... to this new function. When GDB
5766 selects any thread, select one here. In non-stop mode, wait until
5767 GDB acks all pending events before exiting.
5768 (handle_serial_event, handle_target_event): New.
5769 * remote-utils.c (remote_open): Install remote_desc in the event
5771 (remote_close): Remove remote_desc from the event loop.
5772 (putpkt_binary): Rename to...
5773 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5774 (putpkt_binary): New as wrapper around putpkt_binary_1.
5775 (putpkt_notif): New.
5776 (prepare_resume_reply): In non-stop mode, don't change the
5778 * event-loop.c: New.
5779 * Makefile.in (OBJ): Add event-loop.o.
5780 (event-loop.o): New rule.
5782 * linux-low.h (pid_of): Moved here.
5784 (get_lwp_thread): Use lwpid_of.
5785 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5786 * linux-low.c (pid_of): Delete.
5787 (inferior_pid): Use lwpid_of.
5788 (linux_event_pipe): New.
5789 (target_is_async_p): New.
5791 (handle_extended_wait): Use lwpid_of.
5792 (add_lwp): Don't set lwpid field.
5793 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5794 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5795 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5796 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5797 first. Adjust to linux_wait_for_event interface changes. Use
5799 (linux_detach): Don't delete the main lwp here.
5800 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5801 (status_pending_p): Don't consider explicitly suspended lwps.
5802 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5803 pointer. Add OPTIONS argument. Change return type to int. Use
5804 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5805 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5806 pointer. Add status pointer argument. Return a pid instead of a
5807 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5808 changes. In non-stop mode, don't switch to a random thread.
5809 (linux_wait): Rename to...
5810 (linux_wait_1): ... this. Add target_options argument, and handle
5811 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5812 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5813 clean exit and signal exit code. Don't stop all threads in
5814 non-stop mode. In all-stop mode, only stop all threads when
5815 reporting a stop to GDB. Handle explicit thread stop requests.
5816 (async_file_flush, async_file_mark): New.
5818 (send_sigstop): Use lwpid_of.
5819 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5820 interface changes. In non-stop mode, don't switch to a random
5822 (linux_resume_one_lwp): Use lwpid_of.
5823 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5824 (linux_resume_one_thread): ... this. Handle resume_stop. In
5825 non-stop mode, don't look for pending flag in all threads.
5826 (resume_status_pending_p): Don't consider explicitly suspended
5828 (my_waitpid): Reimplement. Emulate __WALL.
5829 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5831 (sigchld_handler, linux_supports_non_stop, linux_async)
5832 (linux_start_non_stop): New.
5833 (linux_target_ops): Register linux_supports_non_stop, linux_async
5834 and linux_start_non_stop.
5835 (initialize_low): Install SIGCHLD handler.
5836 * thread-db.c (thread_db_create_event, find_one_thread)
5837 (thread_db_get_tls_address): Use lwpid_of.
5838 * win32-low.c (win32_detach): Adjust to use resume_kind.
5839 (win32_wait): Add `options' argument.
5840 * spu-low.c (spu_resume): Adjust to use resume_kind.
5841 (spu_wait): Add `options' argument.
5843 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5845 Decouple target code from remote protocol.
5847 * target.h (enum target_waitkind): New.
5848 (struct target_waitstatus): New.
5849 (struct target_ops) <wait>: Return an unsigned long. Take a
5850 target_waitstatus pointer instead of a char pointer.
5852 * target.c (mywait): Change prototype to return an unsigned long.
5853 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5854 * server.h (thread_from_wait, old_thread_from_wait): Delete
5856 (prepare_resume_reply): Change prototype to take a
5858 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5859 (last_status, last_ptid): New.
5860 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5861 pid instead of a signal.
5862 (attach_inferior): Remove "status" and "signal" parameters.
5864 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5866 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5867 (handle_v_requests, myresume): Remove "status" and "signal"
5869 (handle_status): New.
5870 (main): Delete local `status'. Adjust.
5871 * remote-utils.c: Include target.h.
5872 (prepare_resume_reply): Change prototype to take a
5873 target_waitstatus. Adjust.
5875 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5877 * spu-low.c (spu_wait): Adjust.
5878 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5880 (win32_wait): Adjust.
5882 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5884 * target.h (struct thread_resume): Delete leave_stopped member.
5885 (struct target_ops): Add a `n' argument to the `resume' callback.
5886 * server.c (start_inferior): Adjust.
5887 (handle_v_cont, myresume): Adjust.
5888 * linux-low.c (check_removed_breakpoint): Adjust to resume
5889 interface change, and to removed leave_stopped field.
5890 (resume_ptr): Delete.
5891 (struct thread_resume_array): New.
5892 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5893 resume interface change.
5894 (linux_continue_one_thread, linux_queue_one_thread)
5895 (resume_status_pending_p): Check if the resume field is NULL
5896 instead of checking the leave_stopped member.
5897 (linux_resume): Adjust to the target resume interface change.
5898 * spu-low.c (spu_resume): Adjust to the target resume interface
5900 * win32-low.c (win32_detach, win32_resume): Ditto.
5902 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5904 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5906 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5908 (linux_continue_one_thread): Only preserve the stepping flag if
5909 there's a pending breakpoint.
5911 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5913 * server.c (main): After the inferior having exited, call
5914 remote_close before exiting gdbserver.
5916 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5918 Fix size of FPSCR in Power 7 processors.
5919 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5920 (PPC_FEATURE_HAS_DFP): New #define.
5921 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5924 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5926 * server.c (handle_query) Whitespace and formatting.
5928 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5930 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5931 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5932 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5933 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5934 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5935 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5936 Makefile.in, configure.ac: Fix whitespace throughout.
5937 * configure: Regenerate.
5939 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5941 * inferiors.c (find_inferior): Make it safe for the callback
5942 function to delete the currently iterated inferior.
5944 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5946 * Makefile.in (linuw_low_h): Move higher.
5947 (thread-db.o): Depend on $(linux_low_h).
5949 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5951 Rename "process" to "lwp" throughout.
5953 * linux-low.c (all_processes): Rename to...
5954 (all_lwps): ... this.
5955 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5956 (add_process): Rename to ...
5957 (add_lwp): ... this. Adjust.
5958 (linux_create_inferior): Adjust.
5959 (linux_attach_lwp): Adjust.
5960 (linux_attach): Adjust.
5961 (linux_kill_one_process): Rename to ...
5962 (linux_kill_one_lwp): ... this. Adjust.
5963 (linux_kill): Adjust.
5964 (linux_detach_one_process): Rename to ...
5965 (linux_detach_one_lwp): ... this. Adjust.
5966 (linux_detach): Adjust.
5967 (check_removed_breakpoint): Adjust.
5968 (status_pending_p): Adjust.
5969 (linux_wait_for_process): Rename to ...
5970 (linux_wait_for_lwp): ... this. Adjust.
5971 (linux_wait_for_event): Adjust.
5972 (send_sigstop): Adjust.
5973 (wait_for_sigstop): Adjust.
5974 (stop_all_processes): Rename to ...
5975 (stop_all_lwps): ... this.
5976 (linux_resume_one_process): Rename to ...
5977 (linux_resume_one_lwp): ... this. Adjust.
5978 (linux_set_resume_request, linux_continue_one_thread)
5979 (linux_queue_one_thread, resume_status_pending_p)
5980 (usr_store_inferior_registers, regsets_store_inferior_registers)
5981 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5983 * linux-low.h (get_process): Rename to ...
5984 (get_lwp): ... this. Adjust.
5985 (get_thread_process): Rename to ...
5986 (get_thread_lwp): ... this. Adjust.
5987 (get_process_thread): Rename to ...
5988 (get_lwp_thread): ... this. Adjust.
5989 (struct process_info): Rename to ...
5990 (struct lwp_info): ... this.
5991 (all_processes): Rename to ...
5992 (all_lwps): ... this.
5993 * proc-service.c (ps_lgetregs): Adjust.
5994 * thread-db.c (thread_db_create_event, find_one_thread)
5995 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5997 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5999 * server.c (handle_query): Handle "qAttached".
6001 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6003 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6004 GPLv3, update license URL.
6006 2009-03-01 Doug Evans <dje@google.com>
6008 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6009 (server_h): Add gdb_signals.h.
6010 (signals.o): Update.
6011 * server.h (target_signal_from_host,target_signal_to_host_p)
6012 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6014 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6016 * remote-utils.c (getpkt): Also generate remote-debug
6017 information if noack_mode is set.
6019 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6021 * server.c (handle_query): Report qXfer:siginfo:read and
6022 qXfer:siginfo:write as supported and handle them.
6023 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6024 * linux-low.c (linux_xfer_siginfo): New.
6025 (linux_target_ops): Set it.
6027 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6029 * server.c (gdbserver_usage): Mention --remote-debug.
6030 (main): Accept '--remote-debug' switch.
6032 2009-01-18 Doug Evans <dje@google.com>
6034 * regcache.c (new_register_cache): No need to check result of xcalloc.
6035 * server.c (handle_search_memory): Back out calls to xmalloc,
6036 result is checked and error is returned to user upon failure.
6037 (handle_query): Ditto. Add more checks for result of malloc.
6038 (handle_v_cont): Check result of malloc, report error back to
6040 (handle_v_run): Ditto. Call freeargv.
6041 * server.h (freeargv): Declare.
6042 * utils.c (freeargv): New fn.
6044 2009-01-15 Doug Evans <dje@google.com>
6046 * gdbreplay.c (perror_with_name): Make arg const char *.
6047 * server.h (target_signal_to_name): Make return type const char *.
6048 * thread-db.c (thread_db_err_str): Make return type const char *.
6049 * utils.c (perror_with_name): Make arg const char *.
6051 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6053 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6054 when handling a EXIT_PROCESS_DEBUG_EVENT.
6056 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6058 * gdbreplay.c (gdbreplay_version): Update copyright year.
6059 * server.c (gdbserver_version): Likewise.
6061 2009-01-05 Doug Evans <dje@google.com>
6063 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6064 (handle_extended_wait): Improve comment.
6066 2008-12-13 Doug Evans <dje@google.com>
6068 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6069 * server.h (ATTR_MALLOC): New macro.
6070 (xmalloc,xcalloc,xstrdup): Declare.
6071 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6072 * inferiors.c: Ditto.
6073 * linux-low.c: Ditto.
6074 * mem-break.c: Ditto.
6075 * regcache.c: Ditto.
6076 * remote-utils.c: Ditto.
6079 * win32-low.c: Ditto.
6081 2008-12-12 Doug Evans <dje@google.com>
6083 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6084 in debugging printf.
6086 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6088 2008-12-09 Doug Evans <dje@google.com>
6090 * linux-low.h (struct process_info): Delete member tid, unused.
6091 * thread-db.c (find_one_thread): Update.
6092 (maybe_attach_thread): Update.
6094 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6096 * target.h (struct target_ops): Add qxfer_osdata member.
6097 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6099 (linux_qxfer_osdata): New functions.
6100 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6102 * server.c (handle_query): Handle "qXfer:osdata:read:".
6103 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6104 (buffer_xml_printf): New functions.
6105 * server.h (struct buffer): New.
6106 (buffer_grow_str, buffer_grow_str0): New macros.
6107 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6108 (buffer_xml_printf): Declare.
6110 2008-11-24 Doug Evans <dje@google.com>
6112 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6114 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6116 * server.c (handle_v_run): Always use the supplied argument list.
6118 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6120 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6121 (xtensa_regmap_table): Add entry for scompare1.
6123 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6125 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6126 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6127 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6128 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6129 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6130 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6131 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6132 XML target descriptions.
6133 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6134 when inferior is running on an ISA 2.05 or later processor. Add
6135 special case to return offset for full 64-bit slot of FPSCR when
6138 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6140 * Makefile.in (SFILES, clean): Added sparc64 files.
6141 (reg-sparc64.o, reg-sparc64.c): New.
6142 * configure.srv (sparc*-*-linux*): New configuration.
6143 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6144 syscall arguments for SPARC.
6145 (regsets_store_inferior_registers): Likewise.
6146 * linux-sparc-low.c: New file.
6148 2008-10-21 Doug Evans <dje@google.com>
6150 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6151 (READLINE_DIR,READLINE_DEP): Delete.
6152 (INTERNAL_CFLAGS): Update.
6153 (LINTFLAGS): Update.
6155 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6157 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6158 whole argv from the last run, not just argv[0].
6160 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6162 * regcache.c (new_register_cache): Return NULL if the register
6163 cache size isn't known yet.
6164 (free_register_cache): Avoid dereferencing a NULL regcache.
6166 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6168 * configure.srv: Merge MIPS and MIPS64.
6170 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6172 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6174 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6176 * Makefile.in: Add required vsx dependencies.
6178 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6179 Declare init_registers_powerpc_vsx32l.
6180 Declare init_registers_powerpc_vsx64l.
6181 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6182 (ppc_arch_setup): Check for VSX in hwcap.
6183 (ppc_fill_vsxregset): New function.
6184 (ppc_store_vsxregset): New function.
6185 Add new VSX entry in regset_info target_regsets.
6187 * configure.srv: Add new VSX dependencies.
6189 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6191 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6192 (remote_open): Set or clear transport_is_reliable.
6193 (putpkt_binary): Don't expect acks in noack mode.
6194 (getpkt): Don't send ack/nac in noack mode.
6195 * server.c (handle_general_set): Handle QStartNoAckMode.
6196 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6198 (main): Reset noack_mode on every connection.
6199 * server.h (noack_mode): Declare.
6201 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6203 * Makefile.in (GDBREPLAY_OBS): New variable.
6204 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6206 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6207 Daniel Jacobowitz <dan@codesourcery.com>
6209 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6210 (usr_store_inferior_registers): Likewise.
6211 (regsets_store_inferior_registers): Likewise.
6213 2008-07-31 Rolf Jansen <rj@surtec.com>
6214 Pedro Alves <pedro@codesourcery.com>
6216 * configure.ac: Check for memmem declaration.
6217 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6218 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6219 (disable_packet_qfThreadInfo): Unconditionally compile.
6220 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6221 * configure, config.in: Regenerate.
6223 2008-07-28 Doug Kwan <dougkwan@google.com>
6225 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6226 (linux_write_memory): Remove declaration of errno.
6228 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6230 * linux-low.c (handle_extended_wait): Do not use "status"
6231 variable uninitialized.
6233 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6235 * server.c (handle_v_attach): Inhibit reporting dll changes.
6237 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6239 * remote-utils.c (prepare_resume_reply): If requested, don't
6240 output "thread:TID" in the T stop reply.
6242 * server.c (disable_packet_vCont, disable_packet_Tthread)
6243 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6244 (handle_query): If requested, disable support for qC, qfThreadInfo
6246 (handle_v_requests): If requested, disable support for vCont.
6247 (gdbserver_show_disableable): New.
6248 (main): Handle --disable-packet and --disable-packet=LIST.
6250 * server.h (disable_packet_vCont, disable_packet_Tthread)
6251 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6253 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6255 * server.c (gdbserver_usage): Mention --version.
6257 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6259 * Makefile.in (gdbreplay.o): New rule.
6261 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6263 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6264 message, not gdbserver.
6266 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6267 Nathan Sidwell <nathan@codesourcery.com>
6268 Joseph Myers <joseph@codesourcery.com>
6270 * acinclude.m4: Include ../../config/acx.m4.
6271 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6272 * configure, config.in: Regenerate.
6273 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6274 * server.c (gdbserver_version): Print PKGVERSION.
6275 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6276 (main): Adjust gdbserver_usage calls.
6277 * gdbreplay.c (version, host_name): Add declarations.
6278 (gdbreplay_version, gdbreplay_usage): New.
6279 (main): Accept --version and --help options.
6281 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6283 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6284 (arm_breakpoint_at): Handle Thumb.
6285 (the_low_target): Add comment.
6287 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6289 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6291 2008-05-09 Doug Evans <dje@google.com>
6293 * server.h (decode_search_memory_packet): Declare.
6294 * remote-utils.c (decode_search_memory_packet): New fn.
6295 * server.c (handle_search_memory_1): New fn.
6296 (handle_search_memory): New fn.
6297 (handle_query): Process qSearch:memory packets.
6299 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6301 * regcache.c (registers_length): Remove.
6302 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6303 full register packet.
6304 * regcache.h (registers_length): Remove prototype.
6305 * server.h (PBUFSIZ): Define to 16384.
6307 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6309 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6310 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6311 powerpc-64l.o, and powerpc-altivec64l.o.
6312 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6313 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6314 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6315 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6316 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6319 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6320 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6321 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6322 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6323 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6324 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6325 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6326 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6327 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6328 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6331 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6332 (init_registers_powerpc_32l): ... this new prototype.
6333 (init_registers_powerpc_32): Remove, replace by ...
6334 (init_registers_powerpc_altivec32l): ... this new prototype.
6335 (init_registers_powerpc_e500): Remove, replace by ...
6336 (init_registers_powerpc_e500l): ... this new prototype.
6337 (init_registers_ppc64): Remove, replace by ...
6338 (init_registers_powerpc_64l): ... this new prototype.
6339 (init_registers_powerpc_64): Remove, replace by ...
6340 (init_registers_powerpc_altivec64l): ... this new prototype.
6341 (ppc_num_regs): Set to 73.
6342 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6343 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6344 (ppc_cannot_store_register): Handle orig_r3 and trap.
6345 (ppc_arch_setup): Update init_registers_... calls.
6346 (ppc_fill_gregset): Handle orig_r3 and trap.
6348 * inferiors.c (clear_inferiors): Reset current_inferior.
6350 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6352 * acinclude.m4: Add override.m4.
6353 * configure: Regenerate.
6355 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6357 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6358 initial call to init_register_ppc64.
6360 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6362 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6363 single powerpc*-*-linux* case.
6364 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6366 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6368 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6369 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6371 * linux-ppc-low.c: Include <elf.h>.
6372 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6373 (ppc_hwcap): New global variable.
6374 (ppc_regmap): Remove __SPE__ #ifdef sections.
6375 (ppc_regmap_e500): New global variable.
6376 (ppc_cannot_store_register): Update __SPE__ special case.
6377 (ppc_get_hwcap): New function.
6378 (ppc_arch_setup): Use it to determine whether inferior supports
6379 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6380 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6381 Do not access registers if target does not support AltiVec.
6382 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6383 Do not access registers if target does not support SPE.
6384 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6386 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6388 * linux-low.c (disabled_regsets, num_regsets): New.
6389 (use_regsets_p): Delete.
6390 (linux_wait_for_process): Clear disabled_regsets.
6391 (regsets_fetch_inferior_registers): Check and set it.
6392 (regsets_store_inferior_registers): Likewise.
6393 (linux_fetch_registers, linux_store_registers): Do not use
6395 (initialize_low): Allocate disabled_regsets.
6397 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6399 * Makefile.in (LIBOBJS): New.
6401 (memmem.o): New rule.
6402 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6403 * configure: Regenerated.
6405 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6407 * server.c (handle_query): Never return "unsupported" for
6408 qXfer:features:read queries.
6410 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6412 * server.c (get_features_xml): Fix inverted condition.
6413 (handle_query): Always support qXfer:feature:read.
6415 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6417 * server.c (wrapper_argv): New.
6418 (start_inferior): Handle wrapper_argv. If set, expect an extra
6420 (gdbserver_usage): Document --wrapper.
6421 (main): Parse --wrapper.
6423 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6425 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6426 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6427 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6428 (ppc_set_pc): Likewise.
6429 (ppc_arch_setup): New function.
6430 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6431 of collect_register.
6432 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6434 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6436 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6437 instead of linux-ppc64-low.o.
6438 * linux-ppc64-low.c: Remove file.
6439 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6440 (linux-ppc64-low.o): Remove rule.
6442 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6443 (init_registers_powerpc_64): Likewise.
6444 (ppc_regmap): Conditionally define depending on __powerpc64__.
6445 (ppc_cannot_store_register): Do not special-case "fpscr" when
6446 compiled on __powerpc64__.
6447 (ppc_collect_ptrace_register): New function.
6448 (ppc_supply_ptrace_register): New function.
6449 (ppc_breakpoint): Change type to "unsigned int".
6450 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6451 (the_low_target): Conditionally provide initializers for the
6452 arch_setup member depending on __powerpc64__. Install
6453 collect_ptrace_register and supply_ptrace_register members.
6455 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6457 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6458 * server.c (gdbserver_xmltarget): Define.
6459 (get_features_xml): Use it to replace "target.xml" and arch_string.
6461 * configure.srv: Remove srv_xmltarget. Add XML files that were
6462 mentioned there to srv_xmlfiles instead. Remove conditional tests
6463 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6464 srv_xmlfiles and srv_regobj to include all possible choices.
6465 * configure.ac (srv_xmltarget): Remove.
6466 (srv_xmlfiles): Do not add "target.xml".
6467 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6468 checks for supplementary target information.
6469 * configure: Regenerate.
6470 * Makefile.in (XML_TARGET): Remove.
6471 (target.xml): Remove rule.
6472 (clean): Do not clean up target.xml.
6473 (.PRECIOUS): Do not mention target.xml.
6475 * target.h (struct target_ops): Remove arch_string member.
6476 * linux-low.c (linux_arch_string): Remove.
6477 (linux_target_ops): Remove arch_string initializer.
6478 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6479 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6480 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6481 * spu-low.c (spu_arch_string): Remove.
6482 (spu_target_ops): Remove arch_string initializer.
6483 * win32-low.c (win32_arch_string): Remove.
6484 (win32_target_ops): Remove arch_string initializer.
6485 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6486 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6487 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6489 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6491 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6492 by collect_ptrace_register and supply_ptrace_register hooks.
6493 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6494 instead of checking for the_low_target.left_pad_xfer.
6495 (usr_store_inferior_registers): Use collect_ptrace_register callback
6496 instead of checking for the_low_target.left_pad_xfer.
6498 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6499 (s390_supply_ptrace_register): Likewise.
6500 (s390_fill_gregset): Call s390_collect_ptrace_register.
6501 (the_low_target): Update.
6503 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6504 (ppc_supply_ptrace_register): Likewise.
6505 (the_low_target): Update.
6507 * linux-i386-low.c (the_low_target): Update.
6508 * linux-x86-64-low.c (the_low_target): Update.
6510 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6512 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6513 reg-s390.o and reg-s390x.o.
6515 * linux-low.c (new_inferior): New global variable.
6516 (linux_create_inferior, linux_attach): Set it.
6517 (linux_wait_for_process): Call the_low_target.arch_setup after the
6518 target has stopped for the first time.
6519 (initialize_low): Do not call the_low_target.arch_setup.
6521 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6522 (s390_set_pc): Likewise.
6523 (s390_arch_setup): New function.
6524 (the_low_target): Use s390_arch_setup as arch_setup routine.
6526 * regcache.c (realloc_register_cache): New function.
6527 (set_register_cache): Call it for each existing regcache.
6529 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6531 * server.h (init_registers): Remove prototype.
6533 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6534 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6535 instead of init_registers ().
6536 * linux-arm-low.c (init_registers_arm): Add prototype.
6537 (init_registers_arm_with_iwmmxt): Likewise.
6538 (the_low_target): Add initializer for arch_setup field.
6539 * linux-cris-low.c (init_registers_cris): Add prototype.
6540 (the_low_target): Add initializer for arch_setup field.
6541 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6542 (the_low_target): Add initializer for arch_setup field.
6543 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6544 (the_low_target): Add initializer for arch_setup field.
6545 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6546 (the_low_target): Add initializer for arch_setup field.
6547 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6548 (the_low_target): Add initializer for arch_setup field.
6549 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6550 (the_low_target): Add initializer for arch_setup field.
6551 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6552 (init_registers_mips64_linux): Likewise.
6553 (the_low_target): Add initializer for arch_setup field.
6554 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6555 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6556 (the_low_target): Add initializer for arch_setup field.
6557 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6558 (init_registers_powerpc_64): Likewise.
6559 (the_low_target): Add initializer for arch_setup field.
6560 * linux-s390-low.c (init_registers_s390): Add prototype.
6561 (init_registers_s390x): Likewise.
6562 (the_low_target): Add initializer for arch_setup field.
6563 * linux-sh-low.c (init_registers_sh): Add prototype.
6564 (the_low_target): Add initializer for arch_setup field.
6565 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6566 (the_low_target): Add initializer for arch_setup field.
6567 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6568 (the_low_target): Add initializer for arch_setup field.
6570 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6571 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6572 instead of init_registers ().
6573 * win32-arm-low.c (init_registers_arm): Add prototype.
6574 (the_low_target): Add initializer for arch_setup field.
6575 * win32-i386-low.c (init_registers_i386): Add prototype.
6576 (the_low_target): Add initializer for arch_setup field.
6578 * spu-low.c (init_registers_spu): Add prototype.
6579 (initialize_low): Call initialie_registers_spu () instead of
6580 initialize_registers ().
6582 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6584 * server.c (handle_v_requests): When handling the vRun and vAttach
6585 packets, if already debugging a process, don't kill it. Return an
6588 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6590 * server.c (handle_query): Correct length check.
6592 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6594 * win32-low.c (do_initial_child_stuff): Add process handle
6595 parameter. Set current_process_handle and current_process_id from the
6596 parameters. Clear globals.
6597 (win32_create_inferior): Don't set current_process_handle and
6598 current_process_id here. Instead pass them on the call to
6599 do_initial_child_stuff.
6600 (win32_attach): Likewise.
6601 (win32_clear_inferiors): New.
6602 (win32_kill): Don't close the current process handle or the
6603 current thread handle here. Instead call win32_clear_inferiors.
6604 (win32_detach): Don't open a new handle to the process. Call
6605 win32_clear_inferiors.
6606 (win32_join): Don't rely on current_process_handle; open a new
6607 handle using the process id.
6608 (win32_wait): Call win32_clear_inferiors when the inferior process
6611 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6613 * server.c (monitor_show_help): Add "exit".
6615 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6617 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6618 (clean): Add reg-xtensa.c.
6619 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6620 * configure.srv (xtensa*-*-linux*) New target.
6621 * linux-xtensa-low.c: New.
6622 * xtensa-xtregs.c: New.
6624 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6626 * hostio.c: Don't include errno.h.
6627 (errno_to_fileio_errno): Move to hostio-errno.
6628 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6629 error number outputting to the target->hostio_last_error callback.
6630 (hostio_packet_error): Use FILEIO_EINVAL directly.
6631 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6632 calls to hostio_error.
6633 * hostio-errno.c: New.
6634 * server.h (hostio_last_error_from_errno): Declare.
6635 * target.h (target_ops): Add hostio_last_error member.
6636 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6637 as hostio_last_error handler.
6638 * spu-low.c (spu_target_ops): Likewise.
6639 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6640 (wince_hostio_last_error): New functions.
6641 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6642 as hostio_last_error handler.
6643 (win32_target_ops) [!_WIN32_WCE]: Register
6644 hostio_last_error_from_errno as hostio_last_error handler.
6645 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6646 (hostio-errno.o): New rule.
6647 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6648 * configure.srv (srv_hostio_err_objs): New variable. Default to
6650 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6651 * configure: Regenerate.
6653 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6655 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6656 (linux_kill, linux_detach): Clean up the process list.
6657 * remote-utils.c (remote_open): Improve port number parsing.
6658 (putpkt_binary, input_interrupt): Only send interrupts if the target
6660 * server.c (extended_protocol): Make static.
6661 (attached): Define earlier.
6662 (exit_requested, response_needed, program_argv): New variables.
6663 (target_running): New.
6664 (start_inferior): Clear attached here.
6665 (attach_inferior): Set attached here.
6666 (require_running): Define.
6667 (handle_query): Use require_running and target_running. Implement
6669 (handle_v_attach, handle_v_run): New.
6670 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6671 (gdbserver_usage): Update.
6672 (main): Redo argument parsing. Handle --debug and --multi. Handle
6673 --attach along with other options or after the port. Save
6674 program_argv. Support no initial program. Resynchronize
6675 communication with GDB after an error. Handle "monitor exit".
6676 Use require_running and target_running. Always allow the extended
6677 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6678 restart in extended mode.
6679 * README: Refer to the GDB manual. Update --attach usage.
6681 2007-12-20 Andreas Schwab <schwab@suse.de>
6683 * linux-low.c (STACK_SIZE): Define.
6684 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6685 (linux_test_for_tracefork): Likewise.
6687 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6689 * linux-low.c (linux_wait_for_event): Update messages. Do not
6690 reinsert auto-delete breakpoints.
6691 * mem-break.c (struct breakpoint): Change return type of handler to
6693 (set_breakpoint_at): Update handler type.
6694 (reinsert_breakpoint_handler): Return 1 instead of calling
6696 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6698 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6699 * mem-break.h (set_breakpoint_at): Update handler type.
6700 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6701 * win32-low.c (auto_delete_breakpoint): New.
6702 (get_child_debug_event): Use it.
6704 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6706 * configure.ac: Check for pread and pwrite.
6707 * hostio.c (handle_pread): Fall back to lseek and read.
6708 (handle_pwrite): Fall back to lseek and write.
6709 * config.in, configure: Regenerated.
6711 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6713 * server.c (myresume): Add own_buf argument.
6714 (main): Update calls.
6716 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6718 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6719 * remote-utils.c (remote_open): Do not call disable_async_io.
6720 (block_async_io): Delete.
6721 (unblock_async_io): Make static.
6722 (initialize_async_io): New.
6723 * server.c (handle_v_cont): Handle async I/O here.
6724 (myresume): Likewise. Move other common resume tasks here...
6725 (main): ... from here. Call initialize_async_io. Disable async
6726 I/O before the main loop.
6727 * server.h (initialize_async_io): Declare.
6728 (block_async_io, unblock_async_io): Delete prototypes.
6729 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6731 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6733 * remote-utils.c (readchar): Allow binary data in received messages.
6735 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6737 * win32-low.c (attaching): New global.
6738 (win32_create_inferior): Clear the `attaching' global.
6739 (win32_attach): Set the `attaching' global.
6740 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6741 attaching. Only set a breakpoint at the entry point if not
6744 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6746 * server.c (main): Don't report dll events on the initial
6747 connection on attaches.
6749 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6751 * server.c (main): Relax numerical bases supported for the pid of
6752 the --attach command line argument.
6754 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6756 * win32-low.c (win32_attach): Call OpenProcess before
6757 DebugActiveProcess, not after. Add last error output to error
6760 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6762 * win32-low.c (win32_get_thread_context)
6763 (win32_set_thread_context): New functions.
6764 (thread_rec): Use win32_get_thread_context.
6765 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6766 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6769 2007-12-03 Leo Zayas
6770 Pedro Alves <pedro_alves@portugalmail.pt>
6772 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6774 (child_add_thread): Minor cleanup.
6775 (child_continue): Resume artificially suspended threads before
6776 calling ContinueDebugEvent.
6777 (suspend_one_thread): New.
6778 (fake_breakpoint_event): New.
6779 (get_child_debug_event): Change return type to int. Check here if
6780 gdb sent an interrupt request. If a soft interrupt was requested,
6781 fake a breakpoint event. Return 0 if there is no event to handle,
6783 (win32_wait): Don't check here if gdb sent an interrupt request.
6784 Ensure there is a valid event to handle.
6785 (win32_request_interrupt): Add soft interruption method as last
6788 2007-12-03 Leo Zayas
6789 Pedro Alves <pedro_alves@portugalmail.pt>
6791 * win32-low.h (win32_thread_info): Add descriptions to the
6792 structure members. Replace `suspend_count' counter by a
6794 * win32-low.c (thread_rec): Update condition of when to get the
6795 context from the inferior. Rely on ContextFlags being set if it
6796 has already been retrieved. Only suspend the inferior thread if
6797 we haven't already. Warn if that fails.
6798 (continue_one_thread): s/suspend_count/suspended/. Only call
6799 ResumeThread once. Warn if that fails.
6801 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6803 * win32-low.c (win32_wait): Don't read from the inferior when it
6806 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6808 * Makefile.in (win32_low_h): New variable.
6809 (win32-low.o): Add dependency on $(win32_low_h).
6810 (win32-arm-low.o, win32-i386-low.o): New rules.
6812 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6814 * hostio.c: Correct copyright year.
6816 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6818 * Makefile.in (OBS): Add hostio.o.
6819 (hostio.o): New rule.
6820 * server.h (handle_vFile): Declare.
6821 * hostio.c: New file.
6822 * server.c (handle_v_requests): Take packet_len and new_packet_len
6823 for binary packets. Call handle_vFile.
6824 (main): Update call to handle_v_requests.
6826 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6828 * linux-low.c: Include <sched.h>.
6830 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6832 * linux-low.c (linux_tracefork_grandchild): New.
6833 (linux_tracefork_child): Use clone.
6834 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6836 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6838 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6840 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6842 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6844 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6846 * inferiors.c (change_inferior_id): Delete.
6847 (add_pid_to_list, pull_pid_from_list): New.
6848 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6849 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6850 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6851 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6852 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6853 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6854 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6855 (using_threads): Always set to 1.
6856 (handle_extended_wait): New.
6857 (add_process): Do not set TID.
6858 (linux_create_inferior): Set must_set_ptrace_flags.
6859 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6860 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6861 (linux_thread_alive): Rename TID argument to LWPID.
6862 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6863 (linux_wait_for_event): Do not use TID or check using_threads. Update
6864 call to dead_thread_notify. Call handle_extended_wait.
6865 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6866 (send_sigstop): Delete sigstop_sent.
6867 (wait_for_sigstop): Avoid TID.
6868 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6869 (linux_test_for_tracefork): New.
6870 (linux_lookup_signals): Use thread_db_active and
6871 linux_supports_tracefork_flag.
6872 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6873 * linux-low.h (get_process_thread): Avoid TID.
6874 (struct process_ifo): Move thread_known and tid to the end. Remove
6876 (linux_attach_lwp, thread_db_init): Update prototypes.
6877 * server.h (change_inferior_id): Delete prototype.
6878 (add_pid_to_list, pull_pid_from_list): New prototypes.
6879 * thread-db.c (thread_db_use_events): New.
6880 (find_first_thread): Rename to...
6881 (find_one_thread): ...this. Update callers and messages. Do not
6882 call fatal. Check thread_db_use_events. Do not call
6883 change_inferior_id or new_thread_notify.
6884 (maybe_attach_thread): Update. Do not call new_thread_notify.
6885 (thread_db_init): Set thread_db_use_events. Check use_events.
6886 * utils.c (fatal, warning): Correct message prefix.
6888 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6890 * Makefile.in (clean): Remove new files.
6891 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6892 (powerpc-64.o, powerpc-64.c): New rules.
6893 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6894 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6896 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6898 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6899 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6900 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6901 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6902 (target_regsets): Add AltiVec and SPE register sets.
6903 * configure.ac: Check for AltiVec and SPE.
6904 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6905 (ppc_fill_vrregset, ppc_store_vrregset): New.
6906 (target_regsets): Add AltiVec register set.
6907 * configure: Regenerated.
6909 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6911 * linux-low.c (O_LARGEFILE): Define.
6912 (linux_read_memory): Use /proc/PID/mem.
6913 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6914 * configure, config.in: Regenerated.
6916 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6918 * linux-low.c (linux_wait_for_event): Do not pass signals while
6921 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6923 * win32-low.c (create_process): New.
6924 (win32_create_inferior): Use create_process instead of
6925 CreateProcess. If create_process failed retry appending an ".exe"
6926 suffix. Store the GetLastError result immediatelly after
6927 create_process calls and use it on the call to error.
6929 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6931 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6933 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6935 * configure.ac: Switch license to GPLv3.
6937 2007-08-01 Michael Snyder <msnyder@access-company.com>
6939 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6941 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6943 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6945 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6946 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6947 CloseToolhelp32Snapshot.
6948 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6949 CloseToolhelp32Snapshot.
6951 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6953 * server.c (main): Check for inferior exit before main loop.
6955 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6957 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6958 instead of on tmp_desc.
6960 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6961 Daniel Jacobowitz <dan@codesourcery.com>
6963 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6964 (add_thread): Minor cleanups.
6965 (clear_inferiors): Move lower in the file. Clear the DLL
6967 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6968 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6969 (xml_escape_text): New.
6970 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6972 (handle_v_cont): Report errors.
6973 (gdbserver_version): Update.
6974 (main): Correct size of own_buf. Do not report initial DLL events.
6975 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6976 (unloaded_dll, xml_escape_text): New.
6977 * win32-low.c (enum target_waitkind): Update comments.
6978 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6979 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6980 (win32_EnumProcessModules, win32_GetModuleInformation)
6981 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6982 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6983 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6984 (win32_Module32First, win32_Module32Next, load_toolhelp)
6985 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6986 (get_child_debug_event): Handle DLL events.
6987 (win32_wait): Likewise.
6989 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6991 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6992 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6994 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6996 * win32-low.c (handle_output_debug_string): Ignore event if not
6999 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7001 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7003 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7005 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7007 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7009 * inferiors.c (change_inferior_id): Add comment.
7010 * linux-low.c (check_removed_breakpoint): Add an early
7011 prototype. Improve debug output.
7012 (linux_attach): Doc update.
7013 (linux_detach_one_process, linux_detach): Clean up before releasing
7015 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7016 * linux-low.h (struct process_info): Doc improvement.
7017 * mem-break.c (delete_all_breakpoints): New.
7018 * mem-break.h (delete_all_breakpoints): New prototype.
7019 * thread-db.c (find_first_thread): New.
7020 (thread_db_create_event): Call it instead of
7021 thread_db_find_new_threads. Clean up unused variables.
7022 (maybe_attach_thread): Remove first thread handling.
7023 (thread_db_find_new_threads): Use find_first_thread.
7024 (thread_db_get_tls_address): Likewise.
7026 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7028 * thread-db.c (thread_db_find_new_threads): Add prototype.
7029 (thread_db_create_event): Check for the main thread before adding
7031 (maybe_attach_thread): Only enable event reporting if TID == 0.
7032 (thread_db_get_tls_address): Check for new threads.
7034 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7036 * linux-low.c (linux_create_inferior): Try execv before execvp.
7037 * spu-low.c (spu_create_inferior): Likewise.
7039 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7041 * linux-low.c (linux_create_inferior): Change execv to execvp.
7042 * spu-low.c (spu_create_inferior): Likewies.
7044 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7046 * Makefile.in (clean): Clean new files instead of deleted ones.
7047 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7048 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7050 * configure.srv: Specify XML files and new regformats for MIPS and
7052 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7053 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7054 an entry for the restart register.
7055 (mips_cannot_fetch_register, mips_cannot_store_register)
7056 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7057 register names to match the XML descriptions.
7058 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7059 restart register instead of $0.
7061 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7062 Markus Deuling <deuling@de.ibm.com>
7064 * remote-utils.c (decode_xfer_write): New function.
7065 * server.h (decode_xfer_write): Add prototype.
7066 * server.c (handle_query): Add PACKET_LEN argument. Support
7067 qXfer:spu:read and qXfer:spu:write packets.
7068 (main): Pass packet_len to handle_query.
7069 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7070 * target.h (target_ops): Add qxfer_spu.
7072 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7074 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7075 accessing non-seekable spufs files.
7077 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7079 * server.c (handle_query): Add reply for qC packet.
7081 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7082 Leo Zayas <lerele@champenstudios@com>
7084 * server.h (check_remote_input_interrupt_request): New function.
7085 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7086 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7087 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7088 (check_remote_input_interrupt_request): New function.
7089 * server.h (check_remote_input_interrupt_request): Declare.
7090 * win32-low.c (winapi_DebugBreakProcess,
7091 winapi_GenerateConsoleCtrlEvent): New typedefs.
7092 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7094 (win32_wait): Check for remote interrupt request
7095 with check_remote_input_interrupt_request.
7096 (win32_request_interrupt): New function.
7097 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7099 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7101 * win32-low.c (debug_registers_changed,
7102 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7103 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7104 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7105 (thread_rec): Get context using the low target.
7106 (child_add_thread): Call thread_added on the low target,
7107 which does the same thing.
7109 (do_initial_child_stuff): Remove debug registers references.
7110 Set context using the low target. Resume threads after
7111 setting the contexts.
7112 (child_continue): Remove dead variable. Remove debug
7113 registers references.
7114 (child_fetch_inferior_registers): Go through the low target.
7115 (do_child_store_inferior_registers): Remove.
7116 (child_store_inferior_registers): Go through the low target.
7117 (win32_resume): Remove debug registers references.
7118 Set context using the low target.
7119 (handle_exception): Change return type to void. Don't record
7120 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7121 first chance exception.
7122 (get_child_debug_event): Change return type to void. Remove
7123 goto loop. Always return after waiting for debug event.
7124 (win32_wait): Convert to switch statement. Handle spurious
7127 * win32-i386-low.c (debug_registers_changed,
7128 debug_registers_used): New.
7129 (initial_stuff): Rename to ...
7130 (i386_initial_stuff): ... this. Clear debug registers
7132 (store_debug_registers): Delete.
7133 (i386_get_thread_context): New.
7134 (load_debug_registers): Delete.
7135 (i386_set_thread_context): New.
7136 (i386_thread_added): New.
7137 (single_step): Rename to ...
7138 (i386_single_step): ... this.
7139 (do_fetch_inferior_registers): Rename to ...
7140 (i386_fetch_inferior_register): ... this.
7141 (i386_store_inferior_register): New.
7142 (the_low_target): Adapt to new interface.
7144 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7145 (arm_get_thread_context): New.
7146 (arm_set_thread_context): New.
7148 (do_fetch_inferior_registers): Rename to ...
7149 (arm_fetch_inferior_register): ... this.
7150 (arm_store_inferior_register): New.
7151 (arm_wince_breakpoint): Reimplement as unsigned long.
7152 (arm_wince_breakpoint_len): Define.
7153 (the_low_target): Adapt to new interface.
7155 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7156 load_debug_registers. Add get_thread_context, set_thread_context,
7157 thread_added and store_inferior_register. Rename
7158 fetch_inferior_registers to fetch_inferior_register.
7159 (regptr): Remove declaration.
7161 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7163 * linux-low.c (linux_detach): Change return type to int. Return 0.
7164 * spu-low.c (spu_detach): Likewise.
7166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7168 * target.h (target_ops): Change return type of detach to int.
7170 (join_inferior): New.
7171 * server.c (main): Don't skip detach support on mingw32.
7172 If the inferior doesn't support detaching return error.
7173 Call join_inferior instead of using waitpid.
7174 * linux-low.c (linux_join): New.
7175 (linux_target_op): Add linux_join.
7176 * spu-low.c (spu_join): New.
7177 (spu_target_ops): Add spu_join.
7178 * win32-low.c (win32_detach): Adapt to new interface.
7179 Reopen current_process_handle before detaching. Issue a child
7180 resume before detaching.
7182 (win32_target_op): Add win32_join.
7184 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7186 * win32-low.c (win32-attach): Fix return value.
7187 * target.h (target_ops): Describe ATTACH return values.
7189 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7191 * win32-low.c (GETPROCADDRESS): Define.
7192 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7193 (winapi_DebugSetProcessKillOnExit): Likewise.
7194 (win32_create_inferior): Force usage of ansi CreateProcessA.
7195 (win32_attach): Use GETPROCADDRESS.
7196 (win32_detach): Likewise.
7198 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7200 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7202 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7204 * win32-low.c: Commit leftover changes from 2007-03-29.
7206 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7208 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7209 fields short instead of int. Add explicit padding.
7210 (i387_cache_to_fsave): Remove unnecessary casts.
7211 (i387_fsave_to_cache): Doc fix.
7212 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7214 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7216 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7217 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7219 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7221 * configure.srv (arm*-*-mingw32ce*): Move near the other
7224 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7226 * configure.ac: Add errno checking.
7227 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7228 sys/file.h and malloc.h.
7229 (AC_CHECK_DECLS): Add perror.
7230 (srv_mingwce): Handle.
7231 * configure.srv (i[34567]86-*-cygwin*): Add
7232 win32-i386-low.o to srv_tgtobj.
7233 (i[34567]86-*-mingw*): Likewise.
7234 (arm*-*-mingw32ce*): Add case.
7235 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7236 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7237 [__MINGW32CE__] (strerror): New function.
7238 [__MINGW32CE__] (errno): Define to GetLastError.
7239 [__MINGW32CE__] (COUNTOF): New macro.
7240 (remote_open): Remove extra close call.
7241 * mem-break.c (delete_breakpoint_at): New function.
7242 * mem-break.h (delete_breakpoint_at): Declare.
7243 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7244 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7245 [USE_WIN32API] (read, write): Add char* casts.
7246 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7247 * server.h: Include wincecompat.h on Windows CE.
7248 [HAVE_ERRNO_H]: Check.
7249 (perror): Declare if not declared.
7250 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7251 (perror_with_name): Remove errno declaration.
7252 * wincecompat.h: New.
7253 * wincecompat.c: New.
7255 * win32-arm-low.c: New.
7256 * win32-i386-low.c: New.
7257 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7258 (OUTMSG2): Make it safe.
7260 (COUNTOF): New macro.
7261 (NUM_REGS): Get it from the low target.
7262 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7263 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7264 (thread_rec): Let low target handle debug registers.
7265 (child_add_thread): Likewise.
7266 (child_init_thread_list): Likewise.
7267 (continue_one_thread): Likewise.
7269 (do_child_fetch_inferior_registers): Move to ...
7270 * win32-i386-low.c: ... here, and rename to ...
7271 (do_fetch_inferior_registers): ... this.
7272 * win32-low.c (child_fetch_inferior_registers):
7273 Go through the low target.
7274 (do_child_store_inferior_registers): Use regptr.
7275 (strwinerror): New function.
7276 (win32_create_inferior): Handle Windows CE.
7277 Use strwinerror instead of strerror on Windows error
7278 codes. Add program to the error output.
7279 Don't close the main thread handle on Windows CE.
7280 (win32_attach): Use coredll.dll on Windows CE.
7281 (win32_kill): Close current process and current
7283 (win32_detach): Use coredll.dll on Windows CE.
7284 (win32_resume): Let low target handle debug registers, and
7286 (handle_exception): Add/Remove initial breakpoint. Avoid
7287 non-existant WSTOPSIG on Windows CE.
7288 (win32_read_inferior_memory): Cast to remove warning.
7289 (win32_arch_string): Go through the low target.
7290 (initialize_low): Call set_breakpoint_data with the low
7291 target's breakpoint.
7292 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7293 FOP_REGNUM, mappings): Move to ...
7294 * win32-i386-low.c: ... here.
7295 * win32-low.c (win32_thread_info): Move to ...
7296 * win32-low.h: ... here.
7297 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7298 win32-arm-low.c and wincecompat.c.
7299 (all:): Add $EXEEXT.
7300 (install-only:): Likewise.
7301 (gdbserver:): Likewise.
7302 (gdbreplay:): Likewise.
7303 * config.in: Regenerate.
7304 * configure: Regenerate.
7306 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7308 * win32-low.c: Rename typedef thread_info to
7309 win32_thread_info throughout.
7311 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7313 * win32-i386-low.c: Rename to ...
7314 * win32-low.c: ... this.
7315 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7316 * Makefile.in: Likewise.
7318 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7320 * remote-utils.c (monitor_output): Constify msg parameter.
7321 * server.h (monitor_output): Likewise.
7322 * win32-i386-low.c (handle_output_debug_string): New.
7323 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7324 handle_output_debug_string.
7325 (get_child_debug_event): Likewise.
7327 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7329 * server.c (main): Correct strtoul check.
7331 2007-03-27 Jon Ringle <jon@ringle.org>
7333 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7335 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7337 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7339 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7341 * terminal.h: Check HAVE_SGTTY_H.
7343 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7345 * remote-utils.c (remote_open): Print out the assigned port number.
7347 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7349 * remote-utils.c (monitor_output): New function.
7350 * server.c (debug_threads): Define here.
7351 (monitor_show_help): New function.
7352 (handle_query): Handle qRcmd.
7353 (main): Do not handle 'd' packet.
7354 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7355 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7358 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7360 * Makefile.in (EXEEXT): New.
7361 (clean): Use $(EXEEXT).
7363 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7365 * target.h (target_ops): Rename send_signal to request_interrupt,
7366 and remove enum target_signal parameter.
7367 * linux-low.c (linux_request_interrupt): Rename from
7368 linux_send_signal, and always send SIGINT.
7369 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7370 and always send SIGINT.
7371 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7373 (input_interrupt): Likewise.
7375 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7377 * server.c (get_features_xml): Check if target implemented
7379 * win32-i386-low.c (win32_arch_string): New.
7380 (win32_target_ops): Add win32_arch_string as arch_string member.
7382 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7384 * spu-low.c (spu_arch_string): New.
7385 (spu_target_ops): Add spu_arch_string.
7387 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7389 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7390 * configure.ac: Do not check for terminal.h.
7391 * configure, config.in: Regenerated.
7393 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7395 * Makefile.in (OBS): Add $(XML_BUILTIN).
7396 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7398 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7399 (arm-with-iwmmxt.c): New.
7400 * config.in, configure: Regenerate.
7401 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7402 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7403 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7404 (arm*-*-linux*): Add iWMMXt and regset support.
7405 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7406 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7407 (arm_store_wmmxregset, target_regsets): New.
7408 * server.c (get_features_xml): Take annex argument. Check builtin
7410 (handle_query): Handle multiple annexes.
7412 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7414 * remote-utils.c [USE_WIN32API] (read, write): Define.
7415 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7418 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7420 * linux-i386-low.c (the_low_target): Set arch_string.
7421 * linux-x86-64-low.c (the_low_target): Likewise.
7422 * linux-low.c (linux_arch_string): New.
7423 (linux_target_ops): Add it.
7424 * linux-low.h (struct linux_target_ops): Add arch_string.
7425 * server.c (write_qxfer_response): Use const void * for DATA.
7426 (get_features_xml): New.
7427 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7428 * target.h (struct target_ops): Add arch_string method.
7430 2007-01-03 Denis Pilat <denis.pilat@st.com>
7431 Daniel Jacobowitz <dan@codesourcery.com>
7433 * linux-low.c (linux_kill): Handle being called with no threads.
7434 * win32-i386-low.c (win32_kill): Likewise.
7435 (get_child_debug_event): Clear current_process_handle.
7437 2006-12-30 Denis PILAT <denis.pilat@st.com>
7438 Daniel Jacobowitz <dan@codesourcery.com>
7440 * remote-utils.c (remote_open): Check the type of specified
7441 serial port devices before opening them.
7442 * server.c (main): Kill the inferior if an error occurs during
7443 the first remote_open.
7445 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7447 * README: Update supported targets.
7449 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7451 * Makefile.in (clean): Remove reg-mips64.c.
7452 (reg-mips64.c, reg-mips64.o): New rules.
7453 * configure.srv: Handle mips64. Include regset support for mips.
7454 * linux-mips-low.c (union mips_register): New.
7455 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7456 (mips_breakpoint, mips_breakpoint_at): Use int.
7457 (mips_collect_register, mips_supply_register)
7458 (mips_collect_register_32bit, mips_supply_register_32bit)
7459 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7460 (mips_store_fpregset, target_regsets): New.
7461 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7463 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7465 * configure.srv: Add target "spu*-*-*".
7466 * Makefile.in (clean): Remove reg-spu.c.
7467 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7468 * spu-low.c: New file.
7470 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7472 * configure.ac: Correct td_thr_tls_get_addr test.
7473 * configure: Regenerated.
7475 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7477 * linux-low.c (linux_wait_for_event): Reformat. Use the
7479 * remote-utils.c (decode_address_to_semicolon): New.
7480 * server.c (pass_signals, handle_general_set): New.
7481 (handle_query): Mention QPassSignals for qSupported.
7482 (main): Call handle_general_set.
7483 * server.h (pass_signals, decode_address_to_semicolon): New.
7485 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7487 * server.c (handle_query): Correct error handling for read_auxv.
7489 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7491 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7492 and srv_linux_thread_db to yes.
7493 * linux-s390-low.c (s390_fill_gregset): New function.
7494 (target_regsets): Define data structure.
7496 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7498 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7499 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7500 * config.in, configure: Regenerated.
7501 * inferiors.c (gdb_id_to_thread): New function.
7502 (gdb_id_to_thread_id): Use it.
7503 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7504 * linux-low.h (struct process_info): Add th member.
7505 (thread_db_get_tls_address): New prototype.
7506 * remote-utils.c (decode_address): Make non-static.
7507 * server.c (handle_query): Handle qGetTLSAddr.
7508 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7509 * target.h (struct target_ops): Add get_tls_address.
7510 * thread-db.c (maybe_attach_thread): Save the thread handle.
7511 (thread_db_get_tls_address): New.
7513 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7515 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7516 (linux_resume_one_process): Take a siginfo_t *. Update all
7517 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7518 (struct pending_signals): Add a siginfo_t.
7519 (linux_wait_for_process): Always set last_status.
7520 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7521 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7522 * linux-low.h (struct process_info): Add last_status.
7524 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7526 * remote-utils.c (try_rle): New function.
7527 (putpkt_binary): Use it.
7529 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7531 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7532 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7533 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7534 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7535 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7538 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7540 * server.c (terminal_fd): New variable.
7541 (old_foreground_pgrp): Likewise.
7542 (restore_old_foreground_pgrp): New function.
7543 (start_inferior): Record the terminal file descriptor in terminal_fd
7544 and its original foreground group in old_foreground_pgrp. Register
7545 restore_old_foreground_pgrp with atexit().
7547 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7549 * server.c (handle_query): Correct qPart to qXfer.
7551 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7553 * configure.ac: Check for more headers which are missing on
7554 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7555 * configure.srv: Add Cygwin and mingw32.
7556 * remote-utils.c: Don't include headers unconditionally which
7557 are missing on mingw32. Include <winsock.h> for mingw32.
7558 (remote_open): Adjust for mingw32 support. Flush
7559 standard error after writing to it.
7560 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7561 (unblock_async_io, enable_async_io, disable_async_io)
7562 (readchar, getpkt): Update for Winsock support.
7563 (prepare_resume_reply): Expect a protocol signal number.
7564 * server.c: Disable <sys/wait.h> on mingw32.
7565 (start_inferior): Adjust for mingw32 support. Flush
7566 standard error after writing to it.
7567 (attach_inferior): Likewise. Use protocol signal
7569 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7571 * win32-i386-low.c: New file.
7572 * Makefile.in (XM_CLIBS): Set.
7573 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7574 (win32-i386-low.o): New dependency rule.
7575 * linux-low.c (linux_wait): Use target signal numbers.
7576 * target.h (struct target_ops): Doc fix.
7577 * server.h (target_signal_to_name): New prototype.
7578 * gdbreplay.c: Don't include headers unconditionally which
7579 are missing on mingw32. Include <winsock.h> for mingw32.
7580 (remote_close, remote_open): Adjust for Winsock support.
7581 * configure, config.in: Regenerated.
7583 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7585 * server.c (decode_xfer_read, write_qxfer_response): New.
7586 (handle_query): Take a packet length argument. Handle
7587 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7588 the qSupported response.
7589 (main): Update call to handle_query.
7591 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7593 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7594 (putpkt_binary): Renamed from putpkt and adjusted for binary
7596 (putpkt): New wrapper for putpkt_binary.
7597 (readchar): Don't mask off the high bit.
7598 (decode_X_packet): New function.
7599 * server.c (main): Call putpkt_binary if a handler sets the packet
7600 length. Save the length of the incoming packet. Handle 'X'.
7601 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7603 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7605 * server.c (handle_query): Handle qSupported.
7607 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7609 * remote-utils.c (all_symbols_looked_up): New variable.
7610 (look_up_one_symbol): Check it.
7611 * server.h (look_up_one_symbol): New declaration.
7612 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7614 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7616 * Makefile.in (linux-arm-low.o): Update dependencies.
7617 * linux-arm-low.c: Include "gdb_proc_service.h".
7618 (PTRACE_GET_THREAD_AREA): Define.
7619 (ps_get_thread_area): New function.
7621 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7623 * configure.srv (m68k*-*-uclinux*): New target.
7624 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7625 (linux_resume_one_process): Remove extraneous cast.
7626 (linux_read_offsets): New.
7627 (linux_target_op): Add linux_read_offsets on mmuless systems.
7628 * server.c (handle_query): Add qOffsets logic.
7629 * target.h (struct target_ops): Add read_offsets.
7631 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7633 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7634 (PTRACE_GET_THREAD_AREA): Define.
7635 (ps_get_thread_area): New function.
7636 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7637 (linux-x86-64-low.o): Update.
7639 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7641 * configure.ac: Remove checks for prfpregset_t.
7642 * gdb_proc_service.h: New file.
7643 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7644 new "gdb_proc_service.h".
7645 * proc-service.c: Likewise.
7646 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7647 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7648 * Makefile.in (gdb_proc_service_h): Updated.
7649 * configure, config.in: Regenerated.
7651 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7653 * remote-utils.c (prepare_resume_reply): Move declaration
7654 of gdb_id_from_wait to the top of the block.
7656 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7658 * linux-low.c (regsets_store_inferior_registers): Read the regset
7659 from the target before filling it.
7661 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7663 * server.c (attach_inferior): Return SIGTRAP for a successful
7666 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7668 * Makefile.in (OBS): Add version.o.
7669 (STAGESTUFF): Delete.
7670 (version.o): Add dependencies.
7671 (version.c): Replace rule.
7672 (clean): Remove version.c.
7673 * server.c (gdbserver_version): New.
7674 (gdbserver_usage): Use printf.
7675 (main): Handle --version and --help.
7676 * server.h (version, host_name): Add declarations.
7678 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7690 * linux-x86-64-low.c:
7693 * linux-ppc64-low.c:
7702 * linux-crisv32-low.c:
7714 * gdbserver.1: Add (C) after Copyright. Update the FSF
7717 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7719 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7720 (arm_breakpoint_at): Recognize both breakpoints.
7721 (the_low_target): Use the correct breakpoint instruction.
7723 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7725 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7726 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7727 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7728 (the_low_target): Update.
7730 2005-10-25 Andreas Schwab <schwab@suse.de>
7732 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7734 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7735 (ia64_num_regs): Reduce to 462.
7737 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7739 * acinclude.m4: Correct quoting.
7740 * aclocal.m4: Regenerated.
7742 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7743 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7744 (thread_db_init): Call thread_db_err_str.
7745 * configure.ac: Check for TD_VERSION.
7746 * config.in, configure: Regenerated.
7748 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7750 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7752 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7754 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7755 is not available. Define HAVE_PTRACE_GETREGS if it is.
7756 * config.in, configure: Regenerated.
7757 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7758 * linux-i386-low.c, linux-m68k-low.c: Update to use
7759 HAVE_PTRACE_GETREGS.
7760 * linux-low.c (regsets_fetch_inferior_registers)
7761 (regsets_store_inferior_registers): Only return 0 if we processed
7763 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7764 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7766 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7768 * inferiors.c (struct thread_info): Add gdb_id.
7769 (add_thread): Add gdb_id argument.
7770 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7771 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7772 calls to add_thread.
7773 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7774 * server.c (handle_query): Use thread_to_gdb_id.
7775 (handle_v_cont, main): Use gdb_id_to_thread_id.
7776 * server.h (add_thread): Update prototype.
7777 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7780 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7782 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7783 left-padded registers.
7784 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7785 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7787 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7789 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7790 * configure: Regenerate.
7791 * config.in: Regenerate.
7792 * server.h (NEED_DECLARATION_STRERROR):
7793 Replace with !HAVE_DECL_STRERROR.
7795 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7797 * linux-low.c (linux_wait, linux_send_signal): Don't test
7798 an unsigned long variable for > 0 if it could be MAX_ULONG.
7799 * server.c (myresume): Likewise.
7800 * target.c (set_desired_inferior): Likewise.
7802 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7804 * configure.ac: Simplify and improve check for socklen_t.
7805 * configure, config.in: Regenerate.
7807 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7809 * acconfig.h: Remove.
7810 * configure.ac: Add a test for socklen_t. Use three-argument
7811 AC_DEFINE throughout.
7812 * config.in: Regenerated using autoheader 2.59.
7813 * configure: Regenerated.
7815 * gdbreplay.c (socklen_t): Provide a default.
7816 (remote_open): Use socklen_t.
7817 * remote-utils.c (socklen_t): Provide a default.
7818 (remote_open): Use socklen_t.
7819 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7822 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7824 * linux-low.c (linux_read_memory, linux_write_memory)
7825 (linux_read_auxv): Likewise.
7826 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7827 (check_mem_write): Likewise.
7828 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7830 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7831 (registers_from_string, register_data): Likewise.
7832 * server.c (handle_query, main): Likewise.
7833 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7834 (decode_M_packet): Likewise.
7835 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7836 * target.h (struct target_ops): Update read_memory, write_memory,
7838 (read_inferior_memory, write_inferior_memory): Update.
7839 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7841 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7842 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7843 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7844 linux-s390-low.c, linux-sh-low.c: Update for changes in
7845 read_inferior_memory and the_low_target->breakpoint.
7847 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7849 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7850 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7851 * configure.srv: Add powerpc64-*-linux*.
7852 * linux-ppc64-low.c: New file.
7854 2005-05-23 Orjan Friberg <orjanf@axis.com>
7856 * linux-cris-low.c: New file with support for CRIS.
7857 * linux-crisv32-low.c: Ditto for CRISv32.
7858 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7859 (clean): Add reg-cris.c and reg-crisv32.c.
7860 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7861 reg-crisv32.o, and reg-crisv32.c to make rules.
7862 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7865 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7867 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7868 of sizeof (PTRACE_XFER_TYPE).
7869 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7871 2005-05-12 Orjan Friberg <orjanf@axis.com>
7873 * target.h (struct target_ops): Add insert_watchpoint,
7874 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7875 pointers for hardware watchpoint support.
7876 * linux-low.h (struct linux_target_ops): Ditto.
7877 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7878 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7879 to linux_target_ops.
7880 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7882 * server.c (main): Recognize 'Z' and 'z' packets.
7884 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7886 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7887 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7888 (the_low_target): Add new members.
7890 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7892 * proc-service.c (ps_lgetregs): Search all_processes instead of
7895 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7897 * server.c (start_inferior): Change return type to int.
7898 (attach_inferior): Change sigptr to int *.
7899 (handle_v_cont, handle_v_requests): Change signal to int *.
7900 (main): Change signal to int.
7902 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7904 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7905 * configure.srv: Add m32r*-*-linux*.
7906 * linux-m32r-low.c: New file.
7908 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7910 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7912 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7914 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7915 Take unsigned long arguments for PIDs.
7916 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7917 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7918 (wait_for_sigstop, linux_resume_one_process)
7919 (regsets_fetch_inferior_registers, linux_send_signal)
7920 (linux_read_auxv): Likewise. Update the types of variables holding
7921 PIDs. Update format string specifiers.
7922 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7923 * remote-utils.c (prepare_resume_reply): Likewise.
7924 * server.c (cont_thread, general_thread, step_thread)
7925 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7927 (handle_query): Update format specifiers.
7928 (handle_v_cont, main): Use strtoul for thread IDs.
7929 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7930 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7931 (general_thread, step_thread, thread_from_wait)
7932 (old_thread_from_wait): Update.
7933 * target.h (struct thread_resume): Use unsigned long for THREAD.
7934 (struct target_ops): Use unsigned long for arguments to attach and
7937 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7939 * acinclude.m4: Include bfd/bfd.m4 directly.
7940 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7941 <agriffis@toolchain.org>.
7942 * aclocal.m4, configure: Regenerated.
7944 2005-01-07 Andrew Cagney <cagney@gnu.org>
7946 * configure.ac: Rename configure.in, require autoconf 2.59.
7947 * configure: Re-generate.
7949 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7951 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7953 * aclocal.m4: Regenerated.
7954 * configure: Regenerated.
7956 2004-11-21 Andreas Schwab <schwab@suse.de>
7958 * linux-m68k-low.c (m68k_num_gregs): Define.
7959 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7960 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7961 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7962 (m68k_breakpoint_at): New. Add to the_low_target.
7964 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7965 srv_linux_thread_db to yes.
7967 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7969 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7970 (ARCH_SET_FS): Likewise.
7971 (ARCH_GET_FS): Likewise.
7972 (ARCH_GET_GS): Likewise.
7974 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7976 * linux-i386-low.c (ps_get_thread_area): New.
7977 * linux-x86-64-low.c (ps_get_thread_area): New.
7978 * linux-low.c: Include <sys/syscall.h>.
7979 (linux_kill_one_process): Don't kill the first thread here.
7980 (linux_kill): Kill the first thread here.
7981 (kill_lwp): New function.
7982 (send_sigstop, linux_send_signal): Use it.
7983 * proc-service.c: Clean up #ifdefs.
7984 (fpregset_info): Delete.
7985 (ps_lgetregs): Update and enable implementation.
7986 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7988 * remote-utils.c (struct sym_cache, symbol_cache): New.
7989 (input_interrupt): Print a clearer message.
7990 (async_io_enabled): New variable.
7991 (enable_async_io, disable_async_io): Use it. Update comments.
7992 (look_up_one_symbol): Use the symbol cache.
7993 * thread-db.c (thread_db_look_up_symbols): New function.
7994 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7996 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7998 * configure.in: Test for -rdynamic.
7999 * configure: Regenerated.
8000 * Makefile (INTERNAL_LDFLAGS): New.
8001 (gdbserver, gdbreplay): Use it.
8003 2004-09-02 Andrew Cagney <cagney@gnu.org>
8005 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8007 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8009 * linux-low.c (linux_wait): Clear all_processes list also.
8011 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8013 * linux-low.c: Include <errno.h>. Remove extern declaration of
8016 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8018 * gdbreplay.c, server.h, utils.c: Update copyright years.
8020 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8022 * server.c (main): Print child status or termination signal from
8023 variable 'signal', not 'sig'.
8025 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8027 * linux-low.c (linux_read_memory): Change return type to
8028 int. Check for and return error from ptrace().
8029 * target.c (read_inferior_memory): Change return type to int. Pass
8030 back return status from the_target->read_memory().
8031 * target.h (struct target_ops): Adapt *read_memory() prototype.
8033 (read_inferior_memory): Adapt prototype.
8034 * server.c (main): Return an error packet if
8035 read_inferior_memory() returns an error.
8037 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8039 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8040 Unify with other clean targets.
8042 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8044 * server.c (handle_v_cont): Call set_desired_inferior.
8046 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8048 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8050 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8052 * linux-low.c (linux_wait): Unblock async I/O.
8053 (linux_resume): Block and enable async I/O.
8054 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8055 * server.h (block_async_io, unblock_async_io): Add prototypes.
8057 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8059 * remote-utils.c (remote_open): Print a status notice after
8061 * server.c (attach_inferior): Print a status notice after
8064 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8066 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8068 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8070 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8072 * server.c, target.h: Update copyright years.
8074 2004-02-25 Roland McGrath <roland@redhat.com>
8076 * target.h (struct target_ops): New member `read_auxv'.
8077 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8078 * linux-low.c (linux_read_auxv): New function.
8079 (linux_target_ops): Initialize `read_auxv' member to that.
8081 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8083 Committed by Jim Blandy <jimb@redhat.com>.
8085 * linux-s390-low.c (s390_num_regs): Update.
8086 (s390_regmap): Remove control registers. Use __s390x__ predefine
8087 instead of GPR_SIZE to distiguish s390 and s390x targets.
8089 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8091 * linux-low.c: Update copyright year.
8092 (check_removed_breakpoint): Clear pending_is_breakpoint.
8093 (linux_set_resume_request, linux_queue_one_thread)
8094 (resume_status_pending_p): New functions.
8095 (linux_continue_one_thread): Use process->resume.
8096 (linux_resume): Only resume threads if there are no pending events.
8097 * linux-low.h (struct process_info): Add resume request
8100 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8102 * regcache.c (new_register_cache): Clear the allocated register
8103 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8105 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8107 * linux-low.c (linux_resume): Take a struct thread_resume *
8109 (linux_wait): Update call.
8110 (resume_ptr): New static variable.
8111 (linux_continue_one_thread): Renamed from
8112 linux_continue_one_process. Use resume_ptr.
8113 (linux_resume): Use linux_continue_one_thread.
8114 * server.c (handle_v_cont, handle_v_requests): New functions.
8115 (myresume): New function.
8116 (main): Handle 'v' case.
8117 * target.h (struct thread_resume): New type.
8118 (struct target_ops): Change argument of "resume" to struct
8120 (myresume): Delete macro.
8122 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8124 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8125 (uninstall): Support DESTDIR.
8127 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8129 * configure.srv: Add xscale*linux copy of arm*linux entry.
8131 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8133 * linux-arm-low.c (arm_reinsert_addr): New function.
8134 (the_low_target): Add arm_reinsert_addr.
8136 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8138 * mem-break.c: Remove whitespace at end of file.
8140 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8142 * configure.in: Check whether we need to prototype strerror.
8143 * server.h: Optionally prototype strerror.
8144 * gdbreplay.c (perror_with_name): Use strerror.
8145 * linux-low.c (linux_attach_lwp): Use strerror.
8146 * utils.c (perror_with_name): Use strerror.
8147 * config.in, configure: Regenerated.
8149 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8151 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8152 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8154 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8156 * Makefile.in (SFILES): Update.
8157 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8158 low-sun3.c: Remove files.
8160 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8162 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8163 (linux_detach_one_process, linux_detach): New functions.
8164 (linux_target_ops): Add linux_detach.
8165 * server.c (main): Handle 'D' packet.
8166 * target.h (struct target_ops): Add "detach" member.
8167 (detach_inferior): Define.
8169 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8171 From Kelley Cook <kelleycook@wideopenwest.com>:
8172 * configure.srv: Accept i[34567]86 variants.
8174 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8176 * linux-low.c (linux_wait_for_event): Correct comment typos.
8177 (linux_resume_one_process): Call check_removed_breakpoint.
8178 (linux_send_signal): New function.
8179 (linux_target_ops): Add linux_send_signal.
8180 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8182 * target.h (struct target_ops): Add send_signal.
8184 2003-05-29 Jim Blandy <jimb@redhat.com>
8186 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8187 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8188 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8189 away part of the register's value.
8191 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8193 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8194 (linux_wait_for_event, linux_init_signals): Likewise.
8196 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8198 * configure.in: Check for stdlib.h.
8199 * configure: Regenerated.
8200 * config.in: Regenerated.
8202 2003-01-04 Andreas Schwab <schwab@suse.de>
8204 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8206 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8208 * Makefile.in: Remove obsolete code.
8210 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8212 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8213 defined(PT_FPR0_HI).
8215 2002-11-17 Stuart Hughes <seh@zee2.com>
8217 * linux-arm-low.c (arm_num_regs): Increase.
8218 (arm_regmap): Include status register.
8220 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8222 * linux-low.c (register_addr): Remove incorrect -1 check.
8224 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8226 * linux-low.c (linux_create_inferior): Call setpgid. Return
8228 (unstopped_p, linux_signal_pid): Remove.
8229 (linux_target_ops): Remove linux_signal_pid.
8230 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8231 global instead of target method.
8232 * target.h (struct target_ops): Remove signal_pid. Update comment
8233 for create_inferior.
8234 * server.c (signal_pid): New variable.
8235 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8236 gdbserver. Set the child to be the foreground process group.
8237 (attach_inferior): Set signal_pid.
8239 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8241 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8243 2002-08-20 Jim Blandy <jimb@redhat.com>
8245 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8248 2002-08-01 Andrew Cagney <cagney@redhat.com>
8250 * Makefile.in: Make chill references obsolete.
8252 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8254 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8255 * configure: Regenerate.
8256 * config.in: Regenerate.
8258 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8260 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8261 (perror_with_name, remote_close, remote_open, expect, play): Static.
8263 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8265 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8266 byte offsets instead of an array of indexes.
8267 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8269 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8271 * regcache.c: Add comment.
8273 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8275 * thread-db.c: New file.
8276 * proc-service.c: New file.
8277 * acinclude.m4: New file.
8278 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8279 proc-service.o, and thread-db.o.
8280 (linux-low.o): Add USE_THREAD_DB.
8281 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8282 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8283 * aclocal.m4: Regenerated.
8284 * config.in: Regenerated.
8285 * configure: Regenerated.
8286 * configure.in: Check for proc_service.h, sys/procfs.h,
8287 thread_db.h, and linux/elf.h headrs.
8288 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8289 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8290 Check for -lthread_db and thread support.
8291 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8292 PowerPC, and SuperH.
8293 * i387-fp.c: Constify arguments.
8294 * i387-fp.h: Likewise.
8295 * inferiors.c: (struct thread_info): Renamed from
8296 `struct inferior_info'. Remove PID member. Use generic inferior
8297 list header. All uses updated.
8298 (inferiors, signal_pid): Removed.
8299 (all_threads): New variable.
8300 (get_thread): Define.
8301 (add_inferior_to_list): New function.
8302 (for_each_inferior): New function.
8303 (change_inferior_id): New function.
8304 (add_inferior): Removed.
8305 (remove_inferior): New function.
8306 (add_thread): New function.
8307 (free_one_thread): New function.
8308 (remove_thread): New function.
8309 (clear_inferiors): Use for_each_inferior and free_one_thread.
8310 (find_inferior): New function.
8311 (find_inferior_id): New function.
8312 (inferior_target_data): Update argument type.
8313 (set_inferior_target_data): Likewise.
8314 (inferior_regcache_data): Likewise.
8315 (set_inferior_regcache_data): Likewise.
8316 * linux-low.c (linux_bp_reinsert): Remove.
8317 (all_processes, stopping_threads, using_thrads)
8318 (struct pending_signals, debug_threads, pid_of): New.
8319 (inferior_pid): Replace with macro.
8320 (struct inferior_linux_data): Remove.
8321 (get_stop_pc, add_process): New functions.
8322 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8323 Use add_process and add_thread.
8324 (linux_attach_lwp): New function, based on old linux_attach. Use
8325 add_process and add_thread. Set stop_expected for new threads.
8326 (linux_attach): New function.
8327 (linux_kill_one_process): New function.
8328 (linux_kill): Kill all LWPs.
8329 (linux_thread_alive): Use find_inferior_id.
8330 (check_removed_breakpoints, status_pending_p): New functions.
8331 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8332 Update. Use WNOHANG. Wait for cloned processes also. Update process
8333 struct for the found process.
8334 (linux_wait_for_event): New function.
8335 (linux_wait): Use it. Support LWPs.
8336 (send_sigstop, wait_for_sigstop, stop_all_processes)
8337 (linux_resume_one_process, linux_continue_one_process): New functions.
8338 (linux_resume): Support LWPs.
8339 (REGISTER_RAW_SIZE): Remove.
8340 (fetch_register): Use register_size instead. Call supply_register.
8341 (usr_store_inferior_registers): Likewise. Call collect_register.
8343 (regsets_fetch_inferior_registers): Improve error message.
8344 (regsets_store_inferior_registers): Add debugging.
8345 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8346 (unstopped_p, linux_signal_pid): New functions.
8347 (linux_target_ops): Add linux_signal_pid.
8348 (linux_init_signals): New function.
8349 (initialize_low): Call it. Initialize using_threads.
8350 * regcache.c (inferior_regcache_data): Add valid
8352 (get_regcache): Fetch registers lazily. Add fetch argument
8353 and update all callers.
8354 (regcache_invalidate_one, regcache_invalidate): New
8356 (new_register_cache): Renamed from create_register_cache.
8357 Return the new regcache.
8358 (free_register_cache): Change argument to a void *.
8359 (registers_to_string, registers_from_string): Call get_regcache
8360 with fetch flag set.
8361 (register_data): Make static. Pass fetch flag to get_regcache.
8362 (supply_register): Call get_regcache with fetch flag clear.
8363 (collect_register): Call get_regcache with fetch flag set.
8364 (collect_register_as_string): New function.
8365 * regcache.h: Update.
8366 * remote-utils.c (putpkt): Flush after debug output and use
8368 Handle input interrupts while waiting for an ACK.
8369 (input_interrupt): Use signal_pid method.
8370 (getpkt): Flush after debug output and use stderr.
8371 (outreg): Use collect_register_as_string.
8372 (new_thread_notify, dead_thread_notify): New functions.
8373 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8375 (look_up_one_symbol): Flush after debug output.
8376 * server.c (step_thread, server_waiting): New variables.
8377 (start_inferior): Don't use signal_pid. Update call to mywait.
8378 (attach_inferior): Update call to mywait.
8379 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8380 (main): Don't fetch/store registers explicitly. Use
8381 set_desired_inferior. Support proposed ``Hs'' packet. Update
8384 (struct inferior_list, struct_inferior_list_entry): New.
8385 * target.c (set_desired_inferior): New.
8386 (write_inferior_memory): Constify.
8387 (mywait): New function.
8389 (struct target_ops): New signal_pid method.
8390 (mywait): Removed macro, added prototype.
8392 * linux-low.h (regset_func): Removed.
8393 (regset_fill_func, regset_store_func): New.
8394 (enum regset_type): New.
8395 (struct regset_info): Add type field. Use new operation types.
8396 (struct linux_target_ops): stop_pc renamed to get_pc.
8397 Add decr_pc_after_break and breakpoint_at.
8398 (get_process, get_thread_proess, get_process_thread)
8399 (strut process_info, all_processes, linux_attach_lwp)
8400 (thread_db_init): New.
8402 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8403 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8404 (the_low_target): Add new members.
8405 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8406 (i386_store_fpxregset): Constify.
8407 (target_regsets): Add new kind identifier.
8408 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8409 (i386_set_pc): Add debugging.
8410 (i386_breakpoint_at): New function.
8411 (the_low_target): Add new members.
8412 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8413 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8414 (mips_breakpoint_at): New.
8415 (the_low_target): Add new members.
8416 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8417 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8418 (the_low_target): Add new members.
8419 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8420 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8421 (the_low_target): Add new members.
8422 * linux-x86-64-low.c (target_regsets): Add new kind
8425 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8427 From Martin Pool <mbp@samba.org>:
8428 * server.c (gdbserver_usage): New function.
8431 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8433 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8436 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8438 * Makefile.in: Remove obsolete code.
8440 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8442 * linux-low.c (regsets_fetch_inferior_registers),
8443 (regsets_store_inferior_registers): Removed cast to int from
8445 * regcache.h: Added declaration of struct inferior_info.
8447 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8449 * inferiors.c (struct inferior_info): Add regcache_data.
8450 (add_inferior): Call create_register_cache.
8451 (clear_inferiors): Call free_register_cache.
8452 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8453 * regcache.c (struct inferior_regcache_data): New.
8454 (registers): Remove.
8455 (get_regcache): New function.
8456 (create_register_cache, free_register_cache): New functions.
8457 (set_register_cache): Don't initialize the register cache here.
8458 (registers_to_string, registers_from_string, register_data): Call
8460 * regcache.h: Add prototypes.
8461 * server.h: Likewise.
8463 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8465 * mem-break.c: New file.
8466 * mem-break.h: New file.
8467 * Makefile.in: Add mem-break.o rule; update server.h
8469 * inferiors.c (struct inferior_info): Add target_data
8471 (clear_inferiors): Free target_data member if set.
8472 (inferior_target_data, set_inferior_target_data): New functions.
8473 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8474 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8475 * linux-low.c (linux_bp_reinsert): New variable.
8476 (struct inferior_linux_data): New.
8477 (linux_create_inferior): Use set_inferior_target_data.
8478 (linux_attach): Likewise. Call add_inferior.
8479 (linux_wait_for_one_inferior): New function.
8480 (linux_wait): Call it.
8481 (linux_write_memory): Add const.
8482 (initialize_low): Call set_breakpoint_data.
8483 * linux-low.h (struct linux_target_ops): Add breakpoint
8485 * server.c (attach_inferior): Remove extra add_inferior
8487 * server.h: Include mem-break.h. Update inferior.c
8489 * target.c (read_inferior_memory)
8490 (write_inferior_memory): New functions.
8491 * target.h (read_inferior_memory)
8492 (write_inferior_memory): Change macros to prototypes.
8493 (struct target_ops): Update comments. Add const to write_memory
8496 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8498 * linux-low.c (usr_store_inferior_registers): Support
8499 registers which are allowed to fail to store.
8500 * linux-low.h (linux_target_ops): Likewise.
8501 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8502 (ppc_cannot_store_register): FPSCR may not be storable.
8504 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8506 * server.h: Include <string.h> if HAVE_STRING_H.
8507 * ChangeLog: Correct paths in last ChangeLog entry.
8509 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8511 * linux-low.h: Remove obsolete prototypes.
8512 (struct linux_target_ops): New.
8513 (extern the_low_target): New.
8514 * linux-low.c (num_regs, regmap): Remove declarations.
8515 (register_addr): Use the_low_target explicitly.
8516 (fetch_register): Likewise.
8517 (usr_fetch_inferior_registers): Likewise.
8518 (usr_store_inferior_registers): Likewise.
8519 * linux-arm-low.c (num_regs): Remove.
8520 (arm_num_regs): Define.
8521 (arm_regmap): Renamed from regmap, made static.
8522 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8524 (arm_cannot_store_register): Renamed from cannot_store_register,
8526 (the_low_target): New.
8527 * linux-i386-low.c (num_regs): Remove.
8528 (i386_num_regs): Define.
8529 (i386_regmap): Renamed from regmap, made static.
8530 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8532 (i386_cannot_store_register): Renamed from cannot_store_register,
8534 (the_low_target): New.
8535 * linux-ia64-low.c (num_regs): Remove.
8536 (ia64_num_regs): Define.
8537 (ia64_regmap): Renamed from regmap, made static.
8538 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8540 (ia64_cannot_store_register): Renamed from cannot_store_register,
8542 (the_low_target): New.
8543 * linux-m68k-low.c (num_regs): Remove.
8544 (m68k_num_regs): Define.
8545 (m68k_regmap): Renamed from regmap, made static.
8546 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8548 (m68k_cannot_store_register): Renamed from cannot_store_register,
8550 (the_low_target): New.
8551 * linux-mips-low.c (num_regs): Remove.
8552 (mips_num_regs): Define.
8553 (mips_regmap): Renamed from regmap, made static.
8554 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8556 (mips_cannot_store_register): Renamed from cannot_store_register,
8558 (the_low_target): New.
8559 * linux-ppc-low.c (num_regs): Remove.
8560 (ppc_num_regs): Define.
8561 (ppc_regmap): Renamed from regmap, made static.
8562 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8564 (ppc_cannot_store_register): Renamed from cannot_store_register,
8566 (the_low_target): New.
8567 * linux-s390-low.c (num_regs): Remove.
8568 (s390_num_regs): Define.
8569 (s390_regmap): Renamed from regmap, made static.
8570 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8572 (s390_cannot_store_register): Renamed from cannot_store_register,
8574 (the_low_target): New.
8575 * linux-sh-low.c (num_regs): Remove.
8576 (sh_num_regs): Define.
8577 (sh_regmap): Renamed from regmap, made static.
8578 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8580 (sh_cannot_store_register): Renamed from cannot_store_register,
8582 (the_low_target): New.
8583 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8584 (the_low_target): New.
8586 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8588 * Makefile.in: Add stamp-h target.
8589 * configure.in: Create stamp-h.
8590 * configure: Regenerated.
8592 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8594 * inferiors.c: New file.
8595 * target.c: New file.
8596 * target.h: New file.
8597 * Makefile.in: Add target.o and inferiors.o. Update
8599 * linux-low.c (inferior_pid): New static variable,
8600 moved from server.c.
8601 (linux_create_inferior): Renamed from create_inferior.
8602 Call add_inferior. Return 0 on success instead of a PID.
8603 (linux_attach): Renamed from myattach.
8604 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8605 (linux_thread_alive): Renamed from mythread_alive.
8606 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8608 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8609 (regsets_store_inferior_registers): Correct error message.
8610 Add missing ``return 0''.
8611 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8612 (linux_store_registers): Renamed from store_inferior_registers.
8613 (linux_read_memory): Renamed from read_inferior_memory.
8614 (linux_write_memory): Renamed from write_inferior_memory.
8615 (linux_target_ops): New structure.
8616 (initialize_low): Call set_target_ops ().
8617 * remote-utils.c (unhexify): New function.
8618 (hexify): New function.
8619 (input_interrupt): Send signals to ``signal_pid''.
8620 * server.c (inferior_pid): Remove.
8621 (start_inferior): Update create_inferior call.
8622 (attach_inferior): Call add_inferior.
8623 (handle_query): New function.
8624 (main): Call handle_query for `q' packets.
8625 * server.h: Include "target.h". Remove obsolete prototypes.
8626 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8628 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8630 * Makefile.in: Add WARN_CFLAGS. Update configury
8632 * configure.in: Check for <string.h>
8633 * configure: Regenerate.
8634 * config.in: Regenerate.
8635 * gdbreplay.c: Include needed system headers.
8636 (remote_open): Remove strchr prototype.
8637 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8638 * regcache.c (supply_register): Change buf argument to const void *.
8639 (supply_register_by_name): Likewise.
8640 (collect_register): Change buf argument to void *.
8641 (collect_register_by_name): Likewise.
8642 * regcache.h: Add missing prototypes.
8643 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8644 * server.c (handle_query): New function.
8645 (attached): New static variable, moved out of main.
8646 (main): Quiet longjmp clobber warnings.
8647 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8648 * utils.c (error): Remove NORETURN.