1 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4 (ps_get_thread_area): New function.
6 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9 (initialize_low_arch): Call init_registers_crisv32 rather than
10 init_register_crisv32.
12 2013-09-05 Pedro Alves <palves@redhat.com>
14 * server.h (handle_vFile, hostio_last_error_from_errno): Move
16 * hostio.h: ... this new file.
17 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
18 win32-low.c: Include hostio.h.
20 2013-09-05 Pedro Alves <palves@redhat.com>
22 * server.h (gdb_client_data, handler_func, callback_handler_func)
23 (delete_file_handler, add_file_handler, append_callback_event)
24 (delete_callback_event, start_event_loop, initialize_event_loop):
25 Move to event-loop.h and include it.
26 * event-loop.h: New file.
28 2013-09-05 Pedro Alves <palves@redhat.com>
30 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
31 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
32 (loaded_dll, unloaded_dll): Move to ...
33 * dll.h: ... this new file.
34 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
36 2013-09-05 Pedro Alves <palves@redhat.com>
38 * server.h (current_process, get_thread_process, all_processes)
39 (add_inferior_to_list, for_each_inferior, current_inferior)
40 (remove_inferior, add_process, remove_process, find_process_pid)
41 (have_started_inferiors_p, have_attached_inferiors_p)
42 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
43 (clear_inferiors, find_inferior, find_inferior_id)
44 (inferior_target_data, set_inferior_target_data)
45 (inferior_regcache_data, set_inferior_regcache_data): Move to
46 inferiors.h, and include it.
47 * inferiors.h: New file.
49 2013-09-05 Pedro Alves <palves@redhat.com>
51 * server.h (struct emit_ops, current_insn_ptr, emit_error):
55 2013-09-05 Pedro Alves <palves@redhat.com>
57 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
59 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
60 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
61 (handle_tracepoint_general_set, handle_tracepoint_query)
62 (tracepoint_finished_step, tracepoint_was_hit)
63 (release_while_stepping_state_list, current_traceframe)
64 (in_readonly_region, traceframe_read_mem)
65 (fetch_traceframe_registers, traceframe_read_sdata)
66 (traceframe_read_info, struct fast_tpoint_collect_status)
67 (fast_tracepoint_collecting, force_unlock_trace_buffer)
68 (handle_tracepoit_bkpts, initialize_low_tracepoint)
69 (supply_fast_tracepoint_registers)
70 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
71 (ipa_tdesc, claim_trampoline_space)
72 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
73 (agent_mem_read, agent_get_trace_state_variable_value)
74 (agent_set_trace_state_variable_value, agent_tsv_read)
75 (agent_mem_read_string, get_raw_reg_func_addr)
76 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
77 * tracepoint.h: ... this new file.
79 2013-09-05 Pedro Alves <palves@redhat.com>
81 * server.h (perror_with_name, error, fatal, warning, paddress)
82 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
86 2013-09-05 Pedro Alves <palves@redhat.com>
88 * server.h (remote_debug, noack_mode, transport_is_reliable)
89 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
90 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
91 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
92 (write_enn, initialize_async_io, enable_async_io)
93 (disable_async_io, check_remote_input_interrupt_request)
94 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
95 (dead_thread_notify, prepare_resume_reply)
96 (decode_address_to_semicolon, decode_address, decode_m_packet)
97 (decode_M_packet, decode_X_packet, decode_xfer_write)
98 (decode_search_memory_packet, unhexify, hexify)
99 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
100 (look_up_one_symbol, relocate_instruction)
101 (monitor_output): Move to remote-utils.h, and include it.
102 * remote-utils.h: New file.
104 2013-09-05 Pedro Alves <palves@redhat.com>
106 * server.h (_): Delete.
108 2013-09-02 Pedro Alves <palves@redhat.com>
110 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
111 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
113 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
115 2013-09-02 Pierre Muller <muller@sourceware.org>
117 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
118 or WriteProcessMemory complete successfully and handle
119 ERROR_PARTIAL_COPY error.
121 2013-09-02 Pedro Alves <palves@redhat.com>
123 * server.c (gdb_read_memory): Return -1 on traceframe memory read
124 error instead of EIO.
126 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
129 * linux-low.c: Include filestuff.h.
130 (linux_create_inferior) <pid == 0>: Call close_most_fds.
131 * lynx-low.c: Include filestuff.h.
132 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
133 * server.c: Include filestuff.h.
134 (main): Call notice_open_fds.
135 * spu-low.c: Include filestuff.h.
136 (spu_create_inferior) <pid == 0>: Call close_most_fds.
138 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
140 * Makefile.in: Explain why ../target and ../nat are not
141 listed as include file search paths.
142 (linux-waitpid.o): New object file rule.
143 * configure.srv (srv_native_linux_obj): New variable.
144 Replace all occurrences of linux native object files with
145 $srv_native_linux_obj.
146 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
147 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
148 (linux_enable_event_reporting): Remove declaration.
149 (my_waitpid): Moved to common/linux-waitpid.c.
150 (linux_wait_for_event): Pass ptid when calling
151 linux_enable_event_reporting.
152 (linux_supports_tracefork_flag): Remove.
153 (linux_enable_event_reporting): Likewise.
154 (linux_tracefork_grandchild): Remove.
155 (STACK_SIZE): Moved to common/linux-ptrace.c.
156 (linux_tracefork_child): Remove.
157 (linux_test_for_tracefork): Remove.
158 (linux_look_up_symbols): Call linux_supports_traceclone.
159 (initialize_low): Remove call to linux_test_for_tracefork.
160 * linux-low.h (PTRACE_TYPE_ARG3): Move to
161 common/linux-ptrace.h.
162 (PTRACE_TYPE_ARG4): Likewise.
163 Include linux-ptrace.h.
165 2013-08-21 Pedro Alves <palves@redhat.com>
167 * config.in: Renegerate.
169 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
171 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
172 (SFILES): Remove $(srcdir)/common/target-common.c and
173 add $(srcdir)/target/waitstatus.c.
174 (OBS): Remove target-common.o and add waitstatus.o.
175 (server_h): Remove $(srcdir)/../common/target-common.h and
176 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
177 and $(srcdir)/../target/waitstatus.h.
178 (target-common.o): Remove.
179 (waitstatus.o): New target object file.
180 * target.h: Do not include target-common.h and
181 include target/resume.h, target/wait.h and
184 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
186 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
188 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
189 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
191 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
192 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
194 2013-07-27 Jie Zhang <jie@codesourcery.com>
195 Daniel Jacobowitz <dan@codesourcery.com>
196 Yao Qi <yao@codesourcery.com>
198 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
199 (mips-linux-watch.o): New rule.
200 (mips_linux_watch_h): New variable.
201 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
203 * linux-mips-low.c: Include mips-linux-watch.h.
204 (struct arch_process_info, struct arch_lwp_info): New.
205 (update_watch_registers_callback): New function.
206 (mips_linux_new_process, mips_linux_new_thread) New functions.
207 (mips_linux_prepare_to_resume, mips_insert_point): New
209 (mips_remove_point, mips_stopped_by_watchpoint): New
211 (rsp_bp_type_to_target_hw_bp_type): New function.
212 (mips_stopped_data_address): New function.
213 (the_low_target): Add watchpoint support functions.
215 2013-07-27 Yao Qi <yao@codesourcery.com>
217 * i386-low.c: Include break-common.h.
218 (enum target_hw_bp_type): Remove.
220 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
222 * Makefile.in (SFILES): /common/target-common.c.
223 (OBS): Add target-common.o.
224 (server_h): Add $(srcdir)/../common/target-common.h.
225 (target-common.o): New target.
226 * server.c (queue_stop_reply_callback): Free
227 status string after use.
228 * target.c (target_waitstatus_to_string): Remove.
229 * target.h: Include target-common.h.
230 (resume_kind): Likewise.
231 (target_waitkind): Likewise.
232 (target_waitstatus): Likewise.
233 (TARGET_WNOHANG): Likewise.
235 2013-07-04 Yao Qi <yao@codesourcery.com>
237 * Makefile.in (host_alias): Use @host_noncanonical@.
238 (target_alias): Use @target_noncanonical@.
239 * configure.ac: Use ACX_NONCANONICAL_TARGET and
240 ACX_NONCANONICAL_HOST.
241 * configure: Regenerated.
244 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
246 * configure.ac (version_host, version_target): Set and AC_SUBST them.
247 * configure: Rebuild.
248 * Makefile.in (version_host, version_target): Get from configure.
249 (version.c): Use $(version_host) and $(version_target).
251 2013-07-03 Pedro Alves <palves@redhat.com>
253 * Makefile.in (config.status): Depend on development.sh.
254 * acinclude.m4: Include libmcheck.m4.
255 * configure: Regenerate.
257 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
259 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
260 attribute inside the parentheses.
261 (winapi_DebugSetProcessKillOnExit): Ditto.
262 (winapi_DebugBreakProcess): Ditto.
263 (winapi_GenerateConsoleCtrlEvent): Ditto.
265 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
267 * notif.h (notif_event): Add a dummy member to avoid compiler
270 2013-07-01 Pedro Alves <palves@redhat.com>
272 * hostio.c (HOSTIO_PATH_MAX): Define.
273 (require_filename, handle_open, handle_unlink, handle_readlink):
276 2013-07-01 Pedro Alves <palves@redhat.com>
278 * server.h: Include "pathmax.h".
279 * linux-low.c: Don't include sys/param.h.
280 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
282 * win32-low.c: Don't include sys/param.h.
283 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
285 2013-07-01 Pedro Alves <palves@redhat.com>
287 * event-loop.c: Don't check HAVE_UNISTD_H before including
289 * gdbreplay.c: Likewise.
290 * remote-utils.c: Likewise.
291 * server.c: Likewise.
292 * configure.ac: Don't check for unistd.h.
293 * configure: Regenerate.
295 2013-06-28 Tom Tromey <tromey@redhat.com>
297 * Makefile.in (version.c): Use version.in, not
300 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
302 * configure.ac (version_host, version_target): Set and AC_SUBST them.
303 * configure: Rebuild.
304 * Makefile.in (version_host, version_target): Get from configure.
305 (version.c): Use $(version_host) and $(version_target).
307 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
309 Fix trace-status to output user name without trailing colon.
310 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
312 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
314 Fix trace-status to output proper start-time and stop-time.
315 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
316 output start time and stop time in hex as gdb expects.
318 2013-06-26 Pedro Alves <pedro@codesourcery.com>
320 * tracepoint.c (build_traceframe_info_xml): Output trace state
321 variables present in the trace buffer.
323 2013-06-24 Tom Tromey <tromey@redhat.com>
325 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
328 * gdbreplay.c: Include version.h.
329 (version, host_name): Don't declare.
330 * server.h: Include version.h.
331 (version, host_name): Don't declare.
333 2013-06-12 Pedro Alves <palves@redhat.com>
335 * linux-x86-low.c (linux_is_elf64): Delete global.
336 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
337 with local linux_pid_exe_is_elf_64_file use.
339 2013-06-11 Pedro Alves <palves@redhat.com>
341 * linux-low.c (regset_disabled, disable_regset): New functions.
342 (regsets_fetch_inferior_registers)
343 (regsets_store_inferior_registers): Use them.
344 (initialize_regsets_info); Don't allocate the disabled_regsets
346 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
349 2013-06-11 Pedro Alves <palves@redhat.com>
351 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
354 2013-06-11 Pedro Alves <palves@redhat.com>
356 * linux-x86-low.c (initialize_low_arch): Call
357 init_registers_x32_avx_linux.
359 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
361 Fix compatibility with Android Bionic.
362 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
365 2013-06-07 Pedro Alves <palves@redhat.com>
368 * Makefile.in (OBS): Add tdesc.o.
369 (IPA_OBJS): Add tdesc-ipa.o.
370 (tdesc-ipa.o): New rule.
371 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
373 * linux-low.c (new_inferior): Delete.
374 (disabled_regsets, num_regsets): Delete.
375 (linux_add_process): Adjust to set the new per-process
377 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
378 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
379 was a stop. When calling arch_setup, switch the current inferior
380 to the thread that got an event.
381 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
382 (regsets_fetch_inferior_registers)
383 (regsets_store_inferior_registers): New regsets_info parameter.
385 (linux_register_in_regsets): New regs_info parameter. Adjust to
387 (register_addr, fetch_register, store_register): New usrregs_info
388 parameter. Adjust to use it.
389 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
390 parameter regs_info. Adjust to use it.
391 (linux_fetch_registers): Get the current inferior's regs_info, and
393 (linux_store_registers): Ditto.
394 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
395 (initialize_low): Don't initialize the target_regsets here. Call
397 * linux-low.h (target_regsets): Delete declaration.
398 (struct regsets_info): New.
399 (struct usrregs_info): New.
400 (struct regs_info): New.
401 (struct process_info_private) <new_inferior>: New field.
402 (struct linux_target_ops): Delete the num_regs, regmap, and
403 regset_bitmap fields. New field regs_info.
404 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
405 * i387-fp.c (num_xmm_registers): Delete.
406 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
407 calls to new interface.
408 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
409 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
410 Infer the number of xmm registers from the regcache's target
412 * i387-fp.h (num_xmm_registers): Delete.
413 * inferiors.c (add_thread): Don't install the thread's regcache
415 * proc-service.c (gregset_info): Fetch the current inferior's
416 regs_info. Adjust to use it.
417 * regcache.c: Include tdesc.h.
418 (register_bytes, reg_defs, num_registers)
419 (gdbserver_expedite_regs): Delete.
420 (get_thread_regcache): If the thread doesn't have a regcache yet,
421 create one, instead of aborting gdbserver.
422 (regcache_invalidate_one): Rename to ...
423 (regcache_invalidate_thread): ... this.
424 (regcache_invalidate_one): New.
425 (regcache_invalidate): Only invalidate registers of the current
427 (init_register_cache): Add target_desc parameter, and use it.
428 (new_register_cache): Ditto. Assert the target description has a
429 non zero registers_size.
430 (regcache_cpy): Add assertions. Adjust.
431 (realloc_register_cache, set_register_cache): Delete.
432 (registers_to_string, registers_from_string): Adjust.
433 (find_register_by_name, find_regno, find_register_by_number)
434 (register_cache_size): Add target_desc parameter, and use it.
435 (free_register_cache_thread, free_register_cache_thread_one)
436 (regcache_release, register_cache_size): New.
437 (register_size): Add target_desc parameter, and use it.
438 (register_data, supply_register, supply_register_zeroed)
439 (supply_regblock, supply_register_by_name, collect_register)
440 (collect_register_as_string, collect_register_by_name): Adjust.
441 * regcache.h (struct target_desc): Forward declare.
442 (struct regcache) <tdesc>: New field.
443 (init_register_cache, new_register_cache): Add target_desc
445 (regcache_invalidate_thread): Declare.
446 (regcache_invalidate_one): Delete declaration.
447 (regcache_release): Declare.
448 (find_register_by_number, register_cache_size, register_size)
449 (find_regno): Add target_desc parameter.
450 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
452 * remote-utils.c: Include tdesc.h.
453 (outreg, prepare_resume_reply): Adjust.
454 * server.c: Include tdesc.h.
455 (gdbserver_xmltarget): Delete declaration.
456 (get_features_xml, process_serial_event): Adjust.
457 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
459 (struct process_info) <tdesc>: New field.
460 (ipa_tdesc): Declare.
463 * tracepoint.c: Include tdesc.h.
464 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
465 (get_context_regcache): Adjust to pass ipa_tdesc down.
466 (do_action_at_tracepoint): Adjust to get the register cache size
467 from the context regcache's description.
468 (traceframe_walk_blocks): Adjust to get the register cache size
469 from the current trace frame's description.
470 (traceframe_get_pc): Adjust to get current trace frame's
471 description and pass it down.
472 (gdb_collect): Adjust to get the register cache size from the
474 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
475 (gdbserver_xmltarget): Delete.
476 (initialize_low_tracepoint): Set the ipa's target description.
477 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
478 (initialize_low_tracepoint): Set the ipa's target description.
479 * linux-x86-low.c: Include tdesc.h.
480 [__x86_64__] (is_64bit_tdesc): New.
481 (ps_get_thread_area, x86_get_thread_area): Use it.
482 (i386_cannot_store_register): Rename to ...
483 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
484 (i386_cannot_fetch_register): Rename to ...
485 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
486 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
488 (target_regsets): Rename to ...
489 (x86_regsets): ... this.
490 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
492 (x86_siginfo_fixup): Use is_64bit_tdesc.
493 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
494 (tdesc_x32_avx_linux, tdesc_x32_linux)
495 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
497 (x86_linux_update_xmltarget): Delete.
498 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
499 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
500 (AMD64_LINUX_USER64_CS): New.
501 (x86_linux_read_description): New, based on
502 x86_linux_update_xmltarget.
503 (same_process_callback): New.
504 (x86_arch_setup_process_callback): New.
505 (x86_linux_update_xmltarget): New.
506 (x86_regsets_info): New.
507 (amd64_linux_regs_info): New.
508 (i386_linux_usrregs_info): New.
509 (i386_linux_regs_info): New.
510 (x86_linux_regs_info): New.
511 (x86_arch_setup): Reimplement.
512 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
513 (x86_emit_ops): Ditto.
514 (the_low_target): Adjust. Install x86_linux_regs_info,
515 x86_cannot_fetch_register, and x86_cannot_store_register.
516 (initialize_low_arch): New.
517 * linux-ia64-low.c (tdesc_ia64): Declare.
518 (ia64_fetch_register): Adjust.
519 (ia64_usrregs_info, regs_info): New globals.
520 (ia64_regs_info): New function.
521 (the_low_target): Adjust.
522 (initialize_low_arch): New function.
523 * linux-sparc-low.c (tdesc_sparc64): Declare.
524 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
526 (sparc_arch_setup): New function.
527 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
528 (the_low_target): Adjust.
529 (initialize_low_arch): New function.
530 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
531 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
532 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
533 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
534 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
535 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
536 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
537 (tdesc_powerpc_isa205_vsx64l): Declare.
538 (ppc_cannot_store_register, ppc_collect_ptrace_register)
539 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
540 (ppc_set_pc, ppc_get_hwcap): Adjust.
541 (ppc_usrregs_info): Forward declare.
542 (!__powerpc64__) ppc_regmap_adjusted: New global.
543 (ppc_arch_setup): Adjust to the current process'es target
545 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
546 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
547 (ppc_store_evrregset): Adjust.
548 (target_regsets): Rename to ...
549 (ppc_regsets): ... this, and make static.
550 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
551 (ppc_regs_info): New function.
552 (the_low_target): Adjust.
553 (initialize_low_arch): New function.
554 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
555 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
556 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
557 (tdesc_s390x_linux64v2): Declare.
558 (s390_collect_ptrace_register, s390_supply_ptrace_register)
559 (s390_fill_gregset, s390_store_last_break): Adjust.
560 (target_regsets): Rename to ...
561 (s390_regsets): ... this, and make static.
562 (s390_get_pc, s390_set_pc): Adjust.
563 (s390_get_hwcap): New target_desc parameter, and use it.
564 [__s390x__] (have_hwcap_s390_high_gprs): New global.
565 (s390_arch_setup): Adjust to set the current process'es target
566 description. Don't adjust the regmap.
567 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
568 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
569 (regs_info_3264): New globals.
570 (s390_regs_info): New function.
571 (the_low_target): Adjust.
572 (initialize_low_arch): New function.
573 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
574 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
575 [__mips64] (init_registers_mips_linux)
576 (init_registers_mips_dsp_linux): Delete defines.
577 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
578 (have_dsp): New global.
579 (mips_read_description): New, based on mips_arch_setup.
580 (mips_arch_setup): Reimplement.
581 (get_usrregs_info): New function.
582 (mips_cannot_fetch_register, mips_cannot_store_register)
583 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
584 (mips_fill_fpregset, mips_store_fpregset): Adjust.
585 (target_regsets): Rename to ...
586 (mips_regsets): ... this, and make static.
587 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
588 (dsp_regs_info, regs_info): New globals.
589 (mips_regs_info): New function.
590 (the_low_target): Adjust.
591 (initialize_low_arch): New function.
592 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
593 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
595 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
596 (arm_read_description): New, with bits factored from
598 (arm_arch_setup): Reimplement.
599 (target_regsets): Rename to ...
600 (arm_regsets): ... this, and make static.
601 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
602 (arm_regs_info): New function.
603 (the_low_target): Adjust.
604 (initialize_low_arch): New function.
605 * linux-m68k-low.c (tdesc_m68k): Declare.
606 (target_regsets): Rename to ...
607 (m68k_regsets): ... this, and make static.
608 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
609 (m68k_regs_info): New function.
610 (m68k_arch_setup): New function.
611 (the_low_target): Adjust.
612 (initialize_low_arch): New function.
613 * linux-sh-low.c (tdesc_sharch): Declare.
614 (target_regsets): Rename to ...
615 (sh_regsets): ... this, and make static.
616 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
617 (sh_regs_info, sh_arch_setup): New functions.
618 (the_low_target): Adjust.
619 (initialize_low_arch): New function.
620 * linux-bfin-low.c (tdesc_bfin): Declare.
621 (bfin_arch_setup): New function.
622 (bfin_usrregs_info, regs_info): New globals.
623 (bfin_regs_info): New function.
624 (the_low_target): Adjust.
625 (initialize_low_arch): New function.
626 * linux-cris-low.c (tdesc_cris): Declare.
627 (cris_arch_setup): New function.
628 (cris_usrregs_info, regs_info): New globals.
629 (cris_regs_info): New function.
630 (the_low_target): Adjust.
631 (initialize_low_arch): New function.
632 * linux-cris-low.c (tdesc_crisv32): Declare.
633 (cris_arch_setup): New function.
634 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
635 (cris_regs_info): New function.
636 (the_low_target): Adjust.
637 (initialize_low_arch): New function.
638 * linux-m32r-low.c (tdesc_m32r): Declare.
639 (m32r_arch_setup): New function.
640 (m32r_usrregs_info, regs_info): New globals.
641 (m32r_regs_info): Adjust.
642 (initialize_low_arch): New function.
643 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
644 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
645 (tic6x_usrregs_info): Forward declare.
646 (tic6x_read_description): New function, based on ...
647 (tic6x_arch_setup): ... this. Reimplement.
648 (target_regsets): Rename to ...
649 (tic6x_regsets): ... this, and make static.
650 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
651 (tic6x_regs_info): New function.
652 (the_low_target): Adjust.
653 (initialize_low_arch): New function.
654 * linux-xtensa-low.c (tdesc_xtensa): Declare.
655 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
656 (target_regsets): Rename to ...
657 (xtensa_regsets): ... this, and make static.
658 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
660 (xtensa_arch_setup, xtensa_regs_info): New functions.
661 (the_low_target): Adjust.
662 (initialize_low_arch): New function.
663 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
664 (nios2_arch_setup): Set the current process'es tdesc.
665 (target_regsets): Rename to ...
666 (nios2_regsets): ... this.
667 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
668 (nios2_regs_info): New function.
669 (the_low_target): Adjust.
670 (initialize_low_arch): New function.
671 * linux-aarch64-low.c (tdesc_aarch64): Declare.
672 (aarch64_arch_setup): Set the current process'es tdesc.
673 (target_regsets): Rename to ...
674 (aarch64_regsets): ... this.
675 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
676 (aarch64_regs_info): New function.
677 (the_low_target): Adjust.
678 (initialize_low_arch): New function.
679 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
681 (target_regsets): Rename to ...
682 (tile_regsets): ... this.
683 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
684 (tile_regs_info): New function.
685 (tile_arch_setup): Set the current process'es tdesc.
686 (the_low_target): Adjust.
687 (initialize_low_arch): New function.
688 * spu-low.c (tdesc_spu): Declare.
689 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
690 * win32-arm-low.c (tdesc_arm): Declare.
691 (arm_arch_setup): New function.
692 (the_low_target): Install arm_arch_setup instead of
694 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
695 (init_windows_x86): Rename to ...
696 (i386_arch_setup): ... this. Set `win32_tdesc'.
697 (the_low_target): Adjust.
698 * win32-low.c (win32_tdesc): New global.
699 (child_add_thread): Don't create the thread cache here.
700 (do_initial_child_stuff): Set the new process'es tdesc.
701 * win32-low.h (struct target_desc): Forward declare.
702 (win32_tdesc): Declare.
703 * lynx-i386-low.c (tdesc_i386): Declare global.
704 (lynx_i386_arch_setup): Set `lynx_tdesc'.
705 * lynx-low.c (lynx_tdesc): New global.
706 (lynx_add_process): Set the new process'es tdesc.
707 * lynx-low.h (struct target_desc): Forward declare.
708 (lynx_tdesc): Declare global.
709 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
710 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
711 * nto-low.c (nto_tdesc): New global.
712 (do_attach): Set the new process'es tdesc.
713 * nto-low.h (struct target_desc): Forward declare.
714 (nto_tdesc): Declare.
715 * nto-x86-low.c (tdesc_i386): Declare.
716 (nto_x86_arch_setup): Set `nto_tdesc'.
718 2013-06-04 Gary Benson <gbenson@redhat.com>
720 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
721 to qSupported response when appropriate.
722 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
723 with nonzero-length annex.
724 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
725 arguments supplied in annex.
727 2013-05-31 Doug Evans <dje@google.com>
730 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
731 64 bits in 64-cross-32 environment.
733 2013-05-28 Pedro Alves <palves@redhat.com>
735 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
736 (aarch64-without-fpu.c): Delete rule.
737 * configure.srv (aarch64*-*-linux*): Remove references to
738 aarch64-without-fpu.o and aarch64-without-fpu.xml.
739 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
742 2013-05-24 Pedro Alves <palves@redhat.com>
744 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
745 instead of strchr/decode_address. Error if the range isn't split
746 with a ','. Don't assume there's be a ':' in the action.
748 2013-05-23 Yao Qi <yao@codesourcery.com>
749 Pedro Alves <palves@redhat.com>
751 * linux-low.c (lwp_in_step_range): New function.
752 (linux_wait_1): If the thread was range stepping and stopped
753 outside the stepping range, report the stop to GDB. Otherwise,
754 continue stepping. Add range stepping debug output.
755 (linux_set_resume_request): Copy the step range from the resume
757 (linux_supports_range_stepping): New.
758 (linux_target_ops) <supports_range_stepping>: Set to
759 linux_supports_range_stepping.
760 * linux-low.h (struct linux_target_ops)
761 <supports_range_stepping>: New field.
762 (struct lwp_info) <step_range_start, step_range_end>: New fields.
763 * linux-x86-low.c (x86_supports_range_stepping): New.
764 (the_low_target) <supports_range_stepping>: Set to
765 x86_supports_range_stepping.
766 * server.c (handle_v_cont): Handle 'r' action.
767 (handle_v_requests): Append ";r" if the target supports range
769 * target.h (struct thread_resume) <step_range_start,
770 step_range_end>: New fields.
771 (struct target_ops) <supports_range_stepping>:
773 (target_supports_range_stepping): New macro.
775 2013-05-17 Joel Brobecker <brobecker@adacore.com>
777 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
778 confusion in comment.
780 2013-05-17 Joel Brobecker <brobecker@adacore.com>
782 * lynx-low.c (struct process_info_private): New type.
783 (lynx_add_process): New function.
784 (lynx_create_inferior, lynx_attach): Replace calls to
785 add_process by calls to lynx_add_process.
786 (lynx_resume): If PTID is null, then try using
787 current_process()->private->last_wait_event_ptid.
789 (lynx_clear_inferiors): Delete. The contents of that function
790 has been inlined in lynx_mourn;
791 (lynx_wait_1): Save the ptid in the process's private data.
792 (lynx_mourn): Free the process' private data. Replace call
793 to lynx_clear_inferiors by call to clear_inferiors.
795 2013-05-17 Yao Qi <yao@codesourcery.com>
797 * i386-low.c (i386_length_and_rw_bits): Move the comment to
800 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
802 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
803 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
804 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
805 PT_TEXT_END_ADDR guards. Update comments.
806 (linux_target_op) <read_offsets>: Conditionally define to
807 linux_read_offsets if the target is UCLIBC and if it defines
808 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
810 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
811 Andrew Jenner <andrew@codesourcery.com>
813 * Makefile.in (SFILES): Add linux-nios2-low.c.
814 (clean): Add action to delete nios2-linux.c.
815 (nios2-linux.c): New rule.
816 * configure.srv: Add nios2*-*-linux*.
817 * linux-nios2-low.c: New.
819 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
821 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
823 2013-04-25 Hui Zhu <hui@codesourcery.com>
826 * ax.c (ax_printf): Add fflush.
828 2013-04-22 Tom Tromey <tromey@redhat.com>
830 * Makefile.in (SFILES): Add filestuff.c.
831 (OBS): Add filestuff.o.
832 (filestuff.o): New target.
833 * config.in, configure: Rebuild.
834 * configure.ac: Check for fdwalk, pipe2.
836 2013-04-17 Pedro Alves <palves@redhat.com>
838 * configure.ac (USE_THREAD_DB): Delete variable.
839 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
840 Don't AC_SUBST USE_THREAD_DB.
841 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
842 * config.in, configure: Regenerate.
844 2013-04-16 Pedro Alves <palves@redhat.com>
846 * linux-low.h (struct lwp_info) <thread_known>: Move under
847 the USE_THREAD_DB #ifdef.
849 2013-04-16 Pedro Alves <palves@redhat.com>
851 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
852 (linux-low.o): Delete rule.
853 * linux-low.h: Always include "gdb_thread_db.h" instead of
854 conditionally including thread_db.h.
855 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
858 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
860 * Makefile.in (install-only): Fix make install regression.
862 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
864 Convert man pages to texinfo, new gdbinit.5 texinfo page.
865 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
867 * gdbserver.1: Remove.
869 2013-03-22 Pedro Alves <palves@redhat.com>
871 * linux-low.c (handle_extended_wait): Don't call
872 linux_enable_event_reporting.
874 2013-03-15 Tony Theodore <tonyt@logyst.com>
877 * Makefile.in (SHELL): Use @SHELL@.
879 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
881 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
884 2013-03-13 Joel Brobecker <brobecker@adacore.com>
886 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
887 Remove extraneous NULL element.
889 2013-03-13 Yao Qi <yao@codesourcery.com>
891 * tracepoint.c (traceframe_read_tsv): Look for the last matched
892 'V' block in trace frame.
894 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
896 * target.h (struct target_ops): Add btrace ops.
897 (target_supports_btrace): New macro.
898 (target_enable_btrace): New macro.
899 (target_disable_btrace): New macro.
900 (target_read_btrace): New macro.
901 * gdbthread.h (struct thread_info): Add btrace field.
902 * server.c: Include btrace-common.h.
903 (handle_btrace_general_set): New function.
904 (handle_btrace_enable): New function.
905 (handle_btrace_disable): New function.
906 (handle_general_set): Call handle_btrace_general_set.
907 (handle_qxfer_btrace): New function.
908 (struct qxfer qxfer_packets[]): Add btrace entry.
909 * inferiors.c (remove_thread): Disable btrace.
910 * linux-low: Include linux-btrace.h.
911 (linux_low_enable_btrace): New function.
912 (linux_low_read_btrace): New function.
913 (linux_target_ops): Add btrace ops.
914 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
915 Add srv_linux_btrace=yes.
916 (x86_64-*-linux*): Add linux-btrace.o.
917 Add srv_linux_btrace=yes.
918 * configure.ac: Define HAVE_LINUX_BTRACE.
919 * config.in: Regenerated.
920 * configure: Regenerated.
922 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
924 * server.c (handle_qxfer): Preserve error message if -3 is
926 (qxfer): Document the -3 return value.
928 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
930 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
931 (linux_btrace_h): New variable.
932 (linux-btrace.o): New rule.
934 2013-03-08 Stan Shebs <stan@codesourcery.com>
935 Hafiz Abid Qadeer <abidh@codesourcery.com>
937 * tracepoint.c (trace_buffer_size): New global.
938 (DEFAULT_TRACE_BUFFER_SIZE): New define.
939 (init_trace_buffer): Change to one-argument function. Allocate
941 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
942 handle QTBuffer:size packet.
943 (cmd_bigqtbuffer_size): New function.
944 (initialize_tracepoint): Call init_trace_buffer with
945 DEFAULT_TRACE_BUFFER_SIZE.
946 * server.c (handle_query): Add QTBuffer:size in the
949 2013-03-07 Yao Qi <yao@codesourcery.com>
951 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
952 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
954 (cmd_qtsp): Adjust condition. Do post increment.
955 Set cur_action and cur_step_action back to 0.
957 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
960 * linux-low.c (linux_write_memory): Return early success if LEN is
963 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
965 * configure.srv: Add x86_64-*-cygwin* as target.
967 2013-02-28 Tom Tromey <tromey@redhat.com>
969 * configure.ac: Invoke AC_SYS_LARGEFILE.
970 * configure, config.in: Rebuild.
972 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
974 * win32-low.c: Throughout, fix format strings and casts of
975 printf-like functions to avoid type related warnings on all
977 (get_child_debug_event): Print dwDebugEventCode as hex since
978 that's how it's usually documented.
980 2013-02-28 Yao Qi <yao@codesourcery.com>
982 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
985 2013-02-27 Jiong Wang <jiwang@tilera.com>
987 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
988 (reg-tilegx32.c): New rule.
989 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
990 * linux-tile-low.c (tile_arch_setup): New function. Invoke
991 different register info initializer according to elf class.
992 (init_registers_tilgx32): New function. The tilegx32 register info
994 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
995 (tile_store_gregset): Likewise.
997 2013-02-27 Yao Qi <yao@codesourcery.com>
999 * server.c (process_point_options): Print debug message when
1000 debug_threads is true.
1002 2013-02-26 Yao Qi <yao@codesourcery.com>
1004 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1006 2013-02-19 Pedro Alves <palves@redhat.com>
1007 Kai Tietz <ktietz@redhat.com>
1011 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1012 instead of strtoul to extract address from packet.
1013 (process_serial_event) <'z'>: Likewise.
1015 2013-02-18 Yao Qi <yao@codesourcery.com>
1017 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1019 2013-02-14 Pedro Alves <palves@redhat.com>
1023 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1024 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1026 2013-02-14 Pedro Alves <palves@redhat.com>
1028 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1030 2013-02-14 Pedro Alves <palves@redhat.com>
1032 * tracepoint.c (save_string): Delete.
1033 (add_tracepoint_action): Use savestring instead of save_string.
1035 2013-02-12 Pedro Alves <palves@redhat.com>
1037 * linux-xtensa-low.c: Ditto.
1038 * xtensa-xtregs.c: Ditto.
1040 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1042 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1045 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1047 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1048 aarch64_num_wp_regs and aarch64_num_bp_regs to
1049 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1051 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1053 * linux-aarch64-low.c (ps_get_thread_area): Replace
1054 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1056 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1057 Marcus Shawcroft <marcus.shawcroft@arm.com>
1058 Nigel Stephens <nigel.stephens@arm.com>
1059 Yufeng Zhang <yufeng.zhang@arm.com>
1061 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1062 (aarch64.c, aarch64-without-fpu.c): New targets.
1063 * configure.srv (aarch64*-*-linux*): New.
1064 * linux-aarch64-low.c: New file.
1066 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1068 * linux-low.c (handle_extended_wait, linux_create_inferior)
1069 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1070 (dequeue_one_deferred_signal, linux_resume_one_thread)
1071 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1072 (linux_tracefork_grandchild, linux_test_for_tracefork)
1073 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1074 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1075 where the argument is 0.
1077 2013-01-25 Yao Qi <yao@codesourcery.com>
1079 * event-loop.c: Include "queue.h".
1080 (gdb_event_p): New typedef.
1081 (struct gdb_event) <next_event>: Remove.
1082 (event_queue): Change to QUEUE(gdb_event_p).
1083 (async_queue_event): Remove.
1084 (gdb_event_xfree): New.
1085 (initialize_event_loop): New.
1086 (process_event): Use API from QUEUE.
1087 (wait_for_event): Likewise.
1088 * server.c (main): Call initialize_event_loop.
1089 * server.h (initialize_event_loop): Declare.
1091 2013-01-18 Yao Qi <yao@codesourcery.com>
1093 * ax.h (struct eval_agent_expr_context): New.
1094 (gdb_eval_agent_expr): Update declaration.
1095 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1096 TFRAME. Add new argument CTX.
1097 * server.h (struct eval_agent_expr_context): Declare.
1098 (agent_mem_read, agent_tsv_read): Update declaration.
1099 (agent_mem_read_string): Likewise.
1100 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1101 (add_traceframe_block): Add new argument TPOINT.
1102 Increase TPOINT->traceframe_usage.
1103 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1104 eval_tracepoint_agent_expr.
1105 (condition_true_at_tracepoint): Likewise.
1106 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1107 (agent_mem_read_string, agent_tsv_read): Likewise.
1109 2013-01-16 Yao Qi <yao@codesourcery.com>
1111 * linux-low.c (linux_resume_one_lwp): Don't check
1112 'lwp->bp_reinsert != 0'.
1114 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1115 Pedro Alves <palves@redhat.com>
1117 * lynx-low.c (ptrace_request_to_str): Define a temporary
1118 macro and use it to simplify this function's implementation.
1120 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1122 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1125 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1127 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1129 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1131 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1133 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1135 * lynx-low.c (lynx_resume): Use the resume_info parameter
1136 to determine the ptid for the lynx_ptrace call, unless
1137 it is equal to minus_one_ptid, in which case we use the
1138 ptid of the current_inferior.
1139 (lynx_wait_1): After having received a thread create/exit
1140 event, resume the inferior's execution using the signaling
1141 thread's ptid, rather than the old ptid.
1143 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1145 * lynx-low.c (lynx_resume): Delete variable ret.
1147 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1149 * gdbreplay.c (gdbreplay_version): Update copyright year.
1150 * server.c (gdbserver_version): Likewise.
1152 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1154 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1157 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1159 * lynx-low.c (ptrace_request_to_str): Add handling for
1162 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1164 * lynx-low.c (lynx_attach): Delete variable new_process.
1166 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1168 * lynx-low.c (lynx_create_inferior): Delete variable
1171 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1173 * lynx-low.c (ptrace_request_to_str): Do not handle
1174 PTRACE_GETTHREADLIST if this macro does not exist.
1176 2012-12-15 Yao Qi <yao@codesourcery.com>
1178 * Makefile.in (OBS): Add notif.o.
1179 * notif.c, notif.h: New.
1180 * server.c: Include "notif.h".
1181 (struct vstop_notif) <next>: Remove.
1183 (queue_stop_reply): Update.
1184 (push_event, send_next_stop_reply): Remove.
1185 (discard_queued_stop_replies): Update.
1186 (notif_stop): New variable.
1187 (handle_v_stopped): Remove.
1188 (handle_v_requests): Don't call handle_v_stopped. Call
1189 handle_ack_notif instead.
1190 (queue_stop_reply_callback): Call notif_event_enque instead
1191 of queue_stop_reply.
1192 (handle_status): Don't call send_next_stop_reply, call
1193 notif_write_event instead.
1194 (kill_inferior_callback): Likewise.
1195 (detach_or_kill_inferior_callback): Likewise.
1196 (main): Call initialize_notif.
1197 (process_serial_event): Call QUEUE_is_empty.
1198 (handle_target_event): Call notif_push instead of push event.
1199 * server.h (push_event): Remove declaration.
1201 2012-12-10 Tom Tromey <tromey@redhat.com>
1203 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1204 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1207 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1208 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1209 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1210 (amd64-linux-ipa.o, ax.o): Rewrite.
1211 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1212 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1213 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1214 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1215 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1216 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1217 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1218 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1219 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1220 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1221 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1222 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1223 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1224 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1225 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1226 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1227 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1228 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1229 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1230 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1231 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1232 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1233 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1234 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1235 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1236 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1237 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1238 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1239 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1240 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1241 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1242 (reg-tilegx.o): Remove.
1243 (all_object_files): New macro.
1244 Include .deps files.
1245 * aclocal.m4, configure: Rebuild.
1246 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1247 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1248 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1250 2012-12-05 Tom Tromey <tromey@redhat.com>
1253 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1255 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1257 * configure.ac: Check for linux/perf_event.h.
1258 * config.in: Regenerated.
1259 * configure: Regenerated.
1261 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1263 * hostio.c (handle_readlink): Decrease buffer size
1264 parameter passed to readlink by one byte.
1266 2012-11-26 Yao Qi <yao@codesourcery.com>
1268 * configure.ac (build_warnings): Append '-Wempty-body'.
1269 * configure: Regenerated.
1270 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1273 2012-11-15 Pierre Muller <muller@sourceware.org>
1275 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1276 * config.in: Regenerate.
1277 * configure: Regenerate.
1278 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1279 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1280 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1281 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1283 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1284 instead of <sys/wait.h> header.
1285 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1287 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1289 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1290 (various make rules): Remove -DGDBSERVER
1292 2012-11-09 Yao Qi <yao@codesourcery.com>
1294 * spu-low.c (current_ptid): Move it to ..
1295 * gdbthread.h: ... here. New.
1296 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1297 * server.c (myresume, process_serial_event): Likewise.
1298 * thread-db.c (thread_db_find_new_threads): Likewise.
1299 * tracepoint.c (run_inferior_command): Likewise.
1301 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1303 * server.c (handle_search_memory_1): Include access length in
1306 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1308 * linux-crisv32-low.c: Fix compile errors.
1310 2012-09-04 Yao Qi <yao@codesourcery.com>
1312 * tracepoint.c (cmd_qtsv): Adjust debug message.
1313 Don't check CUR_TPOINT.
1315 2012-08-28 Yao Qi <yao@codesourcery.com>
1317 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1318 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1319 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1320 Remove declarations of xmalloc, xreallloc, xstrdup and
1322 * Makefile.in (libiberty_h): New.
1323 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1324 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1326 2012-08-23 Yao Qi <yao@codesourcery.com>
1328 * server.h: Remove declaration of 'xsnprintf'.
1330 2012-08-22 Keith Seitz <keiths@redhat.com>
1332 * server.h: Include build-gnulib-gbserver/config.h.
1333 * gdbreplay.c: Likewise.
1335 2012-08-08 Doug Evans <dje@google.com>
1337 * Makefile.in (SFILES): Add gdb_vecs.c.
1338 (OBS): Add gdb_vecs.o.
1339 (gdb_vecs_h, host_defs_h): New variables.
1340 (thread-db.o): Add $(gdb_vecs_h) dependency.
1341 (gdb_vecs.o): New rule.
1342 * thread-db.c: #include "gdb_vecs.h".
1343 (thread_db_load_search): Use a vector to iterate over path elements.
1344 Handle text appearing after "$pdir".
1346 * configure.ac: Add check for strstr.
1347 * config.in: Regenerate.
1348 * configure: Regenerate.
1350 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1352 * hostio.c (handle_pread): If pread fails, fall back to attempting
1354 (handle_pwrite): Likewise for pwrite.
1356 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1358 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1359 between unsupported TYPE and unimplementable ADDR/LEN combination.
1360 (arm_insert_point): Act on new return value.
1362 2012-07-31 Pedro Alves <palves@redhat.com>
1364 * server.c (process_point_options): Only skip tokens if we find
1365 one that is unrecognized. Don't treat 'X' specially while
1366 skipping unrecognized tokens.
1368 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1370 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1371 to 4-byte-align HW breakpoint addresses for Thumb.
1373 2012-07-27 Yao Qi <yao@codesourcery.com>
1377 * server.h: Declare gdb_agent_about_to_close.
1378 * target.c (kill_inferior): Include "agent.h".
1379 New. Send command 'kill'.
1380 * target.h (kill_inferior): Removed macro.
1381 * tracepoint.c (gdb_agent_about_to_close): New.
1382 (gdb_agent_helper_thread): Handle command 'close'.
1383 Wait endlessly until the inferior stops.
1384 Install gdb_agent_remove_socket to atexit hook.
1385 (agent_socket_name): New static variable.
1386 (gdb_agent_socket_init): Replace local variable 'name' with
1387 'agent_socket_name'.
1388 (gdb_agent_remove_socket): New.
1390 2012-07-27 Yao Qi <yao@codesourcery.com>
1392 * server.c (process_point_options): Stop at 'X' when parsing.
1394 2012-07-19 Michael Eager <eager@eagercon.com>
1396 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1398 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1399 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1400 hardware breakpoint.
1402 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1404 * gdbserver/linux-low.c (initialize_low): Call
1405 linux_ptrace_init_warnings.
1407 2012-07-02 Doug Evans <dje@google.com>
1409 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1412 2012-07-02 Stan Shebs <stan@codesourcery.com>
1414 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1415 (ax.o): Add it to build rule.
1417 (OBS): Add format.o.
1418 (IPA_OBS): Add format.o.
1419 * server.c (handle_query): Claim support for breakpoint commands.
1420 (process_point_options): Add command case.
1421 (process_serial_event): Leave running if there are printfs in
1423 * mem-break.h (any_persistent_commands): Declare.
1424 (add_breakpoint_commands): Declare.
1425 (gdb_no_commands_at_breakpoint): Declare.
1426 (run_breakpoint_commands): Declare.
1427 * mem-break.c (struct point_command_list): New struct.
1428 (struct breakpoint): New field command_list.
1429 (any_persistent_commands): New function.
1430 (add_commands_to_breakpoint): New function.
1431 (add_breakpoint_commands): New function.
1432 (gdb_no_commands_at_breakpoint): New function.
1433 (run_breakpoint_commands): New function.
1434 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1436 * ax.c: Include format.h.
1437 (ax_printf): New function.
1438 (gdb_eval_agent_expr): Add printf opcode.
1440 2012-06-13 Yao Qi <yao@codesourcery.com>
1442 * server.c (start_inferior): Remove duplicated writes to fields
1443 'last_resume_kind' and 'last_status' of 'current_inferior'.
1445 2012-06-12 Yao Qi <yao@codesourcery.com>
1446 Pedro Alves <palves@redhat.com>
1448 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1450 * server.c (handle_v_cont): Extend comment.
1452 2012-06-11 Yao Qi <yao@codesourcery.com>
1454 * linux-low.c (linux_attach): Add 'static'.
1456 2012-06-06 Yao Qi <yao@codesourcery.com>
1458 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1460 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1462 Fix gcc -flto compilation warning.
1463 * server.c (main): Make variable multi_mode and attach volatile.
1465 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1467 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1468 if the platform doesn't know about it.
1470 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1472 * Makefile.in (SFILES): Add linux-tile-low.c.
1473 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1474 * configure.srv: Handle tilegx-*-linux*.
1475 * linux-tile-low.c: New file.
1477 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1479 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1481 2012-05-24 Pedro Alves <palves@redhat.com>
1485 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1487 2012-05-24 Pedro Alves <palves@redhat.com>
1491 Replace target_signal with gdb_signal throughout.
1493 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1495 * linux-low.c (linux_store_registers): Avoid the copying sequence
1496 when no data has been retrieved by ptrace.
1498 2012-05-22 Will Deacon <will.deacon@arm.com>
1500 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1501 Include asm/ptrace.h.
1502 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1505 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1507 * linux-low.c (linux_store_registers): Don't re-retrieve data
1508 with ptrace that has already been obtained from /proc. Always
1509 copy any data retrieved with ptrace to the buffer supplied.
1511 2012-05-11 Yao Qi <yao@codesourcery.com>
1512 Pedro Alves <palves@redhat.com>
1514 * linux-low.c (enum stopping_threads_kind): New.
1515 (stopping_threads): Change type to `enum stopping_threads_kind'.
1516 (handle_extended_wait): If stopping and suspending threads, leave
1517 the new_lwp suspended too.
1518 (linux_wait_for_event): Adjust.
1519 (stop_all_lwps): Set `stopping_threads' to
1520 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1521 whether we're suspending threads or just stopping them. Assert no
1524 2012-04-29 Yao Qi <yao@codesourcery.com>
1526 * server.h: Move some code to ...
1527 * gdbthread.h: ... here. New.
1528 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1529 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1530 (nto-low.o, win32-low.o): Likewise.
1531 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1532 * regcache.c, remote-utils.c, server.c: Likewise.
1533 * target.c, tracepoint.c, win32-low.c: Likewise.
1535 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1537 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1538 (PTRACE_ARG4_TYPE): Likewise.
1539 (PTRACE_XFER_TYPE): Likewise.
1540 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1541 ptrace to PTRACE_ARG3_TYPE.
1542 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1543 (PTRACE_ARG4_TYPE): Likewise.
1544 (PTRACE_XFER_TYPE): Likewise.
1545 (linux_detach_one_lwp): Cast fourth argument of
1546 ptrace to long then PTRACE_ARG4_TYPE.
1547 (regsets_fetch_inferior_registers): Cast third argument of
1548 ptrace to long then PTRACE_ARG3_TYPE.
1549 (regsets_store_inferior_registers): Likewise.
1551 2012-04-20 Pedro Alves <palves@redhat.com>
1553 * configure: Regenerate.
1555 2012-04-19 Pedro Alves <palves@redhat.com>
1557 * Makefile.in (GNULIB_BUILDDIR): New.
1558 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1559 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1560 (all, install-only, uninstall, clean-info, all-lib, clean): No
1561 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1562 (maintainer-clean realclean distclean): Use subdir_do.
1564 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1565 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1566 * acinclude.m4: Include acx_configure_dir.m4.
1567 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1568 calls. Call AC_PROG_RANLIB. Configure gnulib using
1571 (GNULIB_STDINT_H): Adjust.
1572 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1573 * gdbreplay.c: Include build-gnulib/config.h.
1574 * server.h: Likewise.
1575 * aclocal.m4: Regenerate.
1576 * config.in: Regenerate.
1577 * configure: Regenerate.
1579 2012-04-19 Pedro Alves <palves@redhat.com>
1581 * Makefile.in (LIBGNU, INCGNU): Adjust.
1582 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1583 (all, install-only, uninstall, clean-info, all-lib, clean)
1584 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1585 * configure.ac: Adjust AC_OUTPUT output.
1586 * aclocal.m4: Regenerate.
1587 * configure: Regenerate.
1589 2012-04-19 Pedro Alves <palves@redhat.com>
1591 * Makefile.in (generated_files): New.
1592 (server_h): Remove the explicit dependency on config.h, and depend
1593 on $generated_files.
1595 2012-04-19 Pedro Alves <palves@redhat.com>
1597 * Makefile.in (INCGNU): Add -Ignulib.
1599 2012-04-19 Pedro Alves <palves@redhat.com>
1601 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1602 (INCGNU): ... this, and spell out -I here.
1603 (GNULIB_LIB): Rename to ...
1605 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1607 2012-04-19 Pedro Alves <palves@redhat.com>
1609 * config.in: Regenerate.
1611 2012-04-19 Pedro Alves <palves@redhat.com>
1613 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1614 * server.h (memmem): Remove declaration.
1615 * config.in: Regenerate.
1616 * configure: Regenerate.
1618 2012-04-19 Yao Qi <yao@codesourcery.com>
1620 * Makefile.in (SFILES): Add common/vec.c.
1624 2012-04-19 Yao Qi <yao@codesourcery.com>
1626 * remote-utils.c (prepare_resume_reply): Replace with macro
1627 target_core_of_thread.
1628 * server.c (handle_qxfer_threads_proper): Likewise.
1629 * target.h (traget_core_of_thread): New macro.
1631 2012-04-18 Pedro Alves <palves@redhat.com>
1633 * aclocal.m4: Regenerate.
1634 * configure: Regenerate.
1636 2012-04-16 Yao Qi <yao@codesourcery.com>
1638 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1639 duplicated on address.
1641 2012-04-16 Yao Qi <yao@codesourcery.com>
1643 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1644 (struct tracepoint_action_ops) <send>: New field.
1645 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1646 (agent_expr_send, x_tracepoint_action_send): New.
1647 (l_tracepoint_action_send): New.
1648 (cmd_qtdp): Download and install tracepoint
1649 according to `use_agent'.
1650 (run_inferior_command): Add one more parameter `len'.
1652 (tracepoint_send_agent): New.
1653 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1655 2012-04-16 Yao Qi <yao@codesourcery.com>
1657 * tracepoint.c (download_tracepoints): Moved to ...
1658 (cmd_qtstart): ... here.
1660 2012-04-14 Yao Qi <yao@codesourcery.com>
1662 * tracepoint.c: Include inttypes.h.
1663 (struct collect_memory_action): Use sized types.
1664 (struct tracepoint): Likewise.
1665 (cmd_qtdp, stop_tracing): Update print specifiers.
1666 (cmd_qtp, response_tracepoint): Likewise.
1667 (collect_data_at_tracepoint): Likewise.
1668 (collect_data_at_step): Likewise.
1670 2012-04-14 Yao Qi <yao@codesourcery.com>
1672 Import gnulib module inttypes.
1673 * aclocal.m4, config.in, configure: Regenerated.
1675 2012-04-14 Yao Qi <yao@codesourcery.com>
1677 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1678 Makefile and config.status at last.
1680 2012-04-13 Yao Qi <yao@codesourcery.com>
1682 * tracepoint.c: Include stdint.h unconditionally.
1684 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1686 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1687 on BFD_HAVE_SYS_PROCFS_TYPE.
1688 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1689 * configure: Regenerate.
1690 * config.in: Likewise.
1692 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1694 * Makefile.in (clean): Also remove x32.c x32-linux.c
1695 x32-avx.c x32-avx-linux.c.
1696 (x32.o): New target.
1698 (x32-linux.o): Likewise.
1699 (x32-linux.c): Likewise.
1700 (x32-avx.o): Likewise.
1701 (x32-avx.c): Likewise.
1702 (x32-avx-linux.o): Likewise.
1703 (x32-avx-linux.c): Likewise.
1705 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1706 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1707 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1708 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1709 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1710 i386/x32-avx-linux.xml.
1712 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1713 (init_registers_x32_avx_linux): Likwise.
1714 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1715 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1717 2012-04-13 Pedro Alves <palves@redhat.com>
1719 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1720 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1721 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1722 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1725 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1727 * linux-x86-low.c (compat_x32_clock_t): New.
1728 (compat_x32_siginfo_t): Likewise.
1729 (compat_x32_siginfo_from_siginfo): Likewise.
1730 (siginfo_from_compat_x32_siginfo): Likewise.
1731 (linux_is_elf64): Likewise.
1732 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1733 and siginfo_from_compat_x32_siginfo for x32.
1734 (x86_arch_setup): Set linux_is_elf64.
1736 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1739 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1741 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1742 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1743 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1744 compatible with process.
1746 2012-04-12 Yao Qi <yao@codesourcery.com>
1748 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1749 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1750 (install-only, install-info, clean): Handle sub dir gnulib.
1751 (all-lib, am--refresh): New targets.
1752 (memmem.o): Remove target.
1753 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1754 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1755 (AC_REPLACE_FUNCS): Remove memmem.
1756 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1757 (AC_OUTPUT): Generate Makefile in gnulib/.
1758 * aclocal.m4, config.in, configure: Regenerated.
1760 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1762 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1764 2012-04-05 Pedro Alves <palves@redhat.com>
1766 -Werror=strict-aliasing
1768 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1771 2012-04-04 Pedro Alves <palves@redhat.com>
1773 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1774 (sparc_store_gregset_from_stack, sparc_store_gregset)
1775 (sparc_breakpoint_at): Fix formatting.
1777 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1779 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1781 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1782 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1783 * config.in: Regenerate.
1784 * configure: Likewise.
1786 2012-03-29 Pedro Alves <palves@redhat.com>
1788 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1789 Correct ptrace arguments.
1791 2012-03-28 Pedro Alves <palves@redhat.com>
1793 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1794 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1795 (IA64_FR1_REGNUM): New defines.
1796 (ia64_fetch_register): New.
1797 (the_low_target): Install it.
1798 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1800 * linux-low.c (linux_fetch_registers): Try the
1801 the_low_target.fetch_register hook first.
1803 * linux-arm-low.c (the_low_target): Adjust.
1804 * linux-bfin-low.c (the_low_target): Adjust.
1805 * linux-cris-low.c (the_low_target): Adjust.
1806 * linux-crisv32-low.c (the_low_target): Adjust.
1807 * linux-m32r-low.c (the_low_target): Adjust.
1808 * linux-m68k-low.c (the_low_target): Adjust.
1809 * linux-mips-low.c (the_low_target): Adjust.
1810 * linux-ppc-low.c (the_low_target): Adjust.
1811 * linux-s390-low.c (the_low_target): Adjust.
1812 * linux-sh-low.c (the_low_target): Adjust.
1813 * linux-sparc-low.c (the_low_target): Adjust.
1814 * linux-tic6x-low.c (the_low_target): Adjust.
1815 * linux-x86-low.c (the_low_target): Adjust.
1816 * linux-xtensa-low.c (the_low_target): Adjust.
1818 2012-03-26 Pedro Alves <palves@redhat.com>
1820 * server.c (handle_qxfer_libraries): Don't bail early if
1821 the_target->qxfer_libraries_svr4 is not NULL.
1823 2012-03-26 Pedro Alves <palves@redhat.com>
1825 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1827 2012-03-23 Pedro Alves <palves@redhat.com>
1829 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1830 "library-list-svr4" element's start tag when the the DSO list is
1833 2012-03-23 Pedro Alves <palves@redhat.com>
1835 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1836 a variable whose type size is the same as the inferior's pointer
1839 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1841 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1843 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1844 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1845 * linux-low.h: Include <signal.h>.
1846 (struct siginfo): Remove forward declaration.
1847 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1850 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1852 * .gitignore: Ignore more files.
1854 2012-03-19 Pedro Alves <palves@redhat.com>
1855 Jan Kratochvil <jan.kratochvil@redhat.com>
1857 * server.c (cont_thread, general_thread): Add describing comments.
1858 (start_inferior): Clear `cont_thread'.
1859 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1862 2012-03-15 Yao Qi <yao@codesourcery.com>
1864 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1866 (cmd_qtdp): ... here.
1868 2012-03-15 Yao Qi <yao@codesourcery.com>
1870 * tracepoint.c (struct tracepoint_action_ops): New.
1871 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1872 (m_tracepoint_action_download): New.
1873 (r_tracepoint_action_download): New.
1874 (x_tracepoint_action_download): New.
1875 (l_tracepoint_action_download): New.
1876 (add_tracepoint_action): Install `action->ops' according type.
1877 (download_tracepoint_1): Move code `download' function pointer
1878 of various tracepoint_action_ops.
1880 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1882 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1883 linux_ptrace_attach_warnings.
1885 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1887 * Makefile.in (linux-ptrace.o): New.
1888 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1889 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1890 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1891 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1892 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1894 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1896 2012-03-08 Yao Qi <yao@codesourcery.com>
1897 Pedro Alves <palves@redhat.com>
1899 Fix PR server/13392.
1900 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1902 * tracepoint.c (remove_tracepoint): New.
1903 (cmd_qtdp): Call remove_tracepoint when failed to install.
1905 2012-03-07 Pedro Alves <palves@redhat.com>
1907 * linux-low.c (get_detach_signal): New.
1908 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1909 Pass on pending signals to PTRACE_DETACH. Check the result of the
1911 * server.c (program_signals, program_signals_p): New.
1912 (handle_general_set): Handle QProgramSignals.
1913 * server.h (program_signals, program_signals_p): Declare.
1915 2012-03-05 Pedro Alves <palves@redhat.com>
1916 Jan Kratochvil <jan.kratochvil@redhat.com>
1918 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1921 2012-03-03 Yao Qi <yao@codesourcery.com>
1923 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1924 agent_look_up_symbols.
1926 2012-03-03 Yao Qi <yao@codesourcery.com>
1928 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1929 (linux-x86-low.o): Likewise.
1930 * server.h: Remove in_process_agent_loaded.
1931 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1935 2012-03-03 Yao Qi <yao@codesourcery.com>
1937 * tracepoint.c (gdb_agent_capability): New global.
1938 (in_process_agent_loaded_ust): Renamed to
1939 `in_process_agent_supports_ust'.
1941 (in_process_agent_supports_ust): Call agent_capability_check.
1942 (clear_installed_tracepoints): Assert that agent supports
1945 2012-03-03 Yao Qi <yao@codesourcery.com>
1947 * linux-low.c (linux_supports_agent): New.
1948 (linux_target_ops): Initialize field `supports_agent' with
1949 linux_supports_agent.
1950 * target.h (struct target_ops) <supports_agent>: New.
1951 (target_supports_agent): New macro.
1952 * server.c (handle_general_set): Handle packet 'QAgent'.
1953 (handle_query): Send `QAgent+'.
1954 * Makefile.in (server.o): Depends on agent.h.
1956 2012-03-03 Yao Qi <yao@codesourcery.com>
1958 * Makefile.in (OBS): Add agent.o.
1959 Add new rule for agent.o.
1960 Track dependence of tracepoint.c on agent.h.
1961 * tracepoint.c (run_inferior_command_1):
1962 (run_inferior_command): Call agent_run_command.
1963 (gdb_ust_connect_sync_socket): Deleted. Move it to
1965 (resume_thread, stop_thread): Likewise.
1966 (gdb_ust_socket_init): Renamed to ...
1967 (gdb_agent_socket_init): ... New.
1968 (gdb_ust_thread): Renamed to ...
1969 (gdb_agent_helper_thread): ... New.
1970 (gdb_ust_init): Move some code to ...
1971 (gdb_agent_init): ... here. New.
1972 [HAVE_UST]: Call gdb_ust_init.
1973 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1974 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1975 * config.in, configure: Regenerated.
1977 2012-03-02 Pedro Alves <palves@redhat.com>
1979 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1980 * linux-low.c (struct simple_pid_list): New.
1981 (stopped_pids): New a struct simple_pid_list pointer.
1982 (add_to_pid_list, pull_pid_from_list): New.
1983 (handle_extended_wait): Don't assume the first signal new children
1984 report is SIGSTOP. Adjust call to pull_pid_from_list.
1985 (linux_wait_for_lwp): Adjust.
1987 2012-03-02 Yao Qi <yao@codesourcery.com>
1989 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1992 2012-03-02 Yao Qi <yao@codesourcery.com>
1994 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1995 `stop_pc' and `tpoint'. Update caller.
1997 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1999 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2000 * linux-low.c (use_linux_regsets): New macro.
2001 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2002 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2003 (linux_register_in_regsets): New function.
2004 (usr_fetch_inferior_registers): Skip registers covered by
2006 (usr_store_inferior_registers): Likewise.
2007 (usr_fetch_inferior_registers): New macro.
2008 (usr_store_inferior_registers): Likewise.
2009 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2010 (linux_store_registers): Likewise.
2011 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2013 (init_registers_mips64_dsp_linux): Likewise.
2014 (init_registers_mips_linux): New macro.
2015 (init_registers_mips_dsp_linux): Likewise.
2016 (mips_dsp_num_regs): Likewise.
2017 (DSP_BASE, DSP_CONTROL): New fallback macros.
2018 (mips_base_regs): New macro.
2019 (mips_regmap): Use it. Fix the size.
2020 (mips_dsp_regmap): New variable.
2021 (mips_dsp_regset_bitmap): Likewise.
2022 (mips_arch_setup): New function.
2023 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2025 (mips_cannot_store_register): Likewise.
2026 (the_low_target): Update .arch_setup, .num_regs and .regmap
2027 initializers. Add .regset_bitmap initializer.
2028 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2030 * linux-bfin-low.c (the_low_target): Likewise.
2031 * linux-cris-low.c (the_low_target): Likewise.
2032 * linux-crisv32-low.c (the_low_target): Likewise.
2033 * linux-ia64-low.c (the_low_target): Likewise.
2034 * linux-m32r-low.c (the_low_target): Likewise.
2035 * linux-m68k-low.c (the_low_target): Likewise.
2036 * linux-ppc-low.c (the_low_target): Likewise.
2037 * linux-s390-low.c (the_low_target): Likewise.
2038 * linux-sh-low.c (the_low_target): Likewise.
2039 * linux-sparc-low.c (the_low_target): Likewise.
2040 * linux-tic6x-low.c (the_low_target): Likewise.
2041 * linux-x86-low.c (the_low_target): Likewise.
2042 * linux-xtensa-low.c (the_low_target): Likewise.
2043 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2044 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2045 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2047 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2048 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2050 2012-02-29 Yao Qi <yao@codesourcery.com>
2051 Pedro Alves <palves@redhat.com>
2053 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2054 `step_over_finished' is true.
2056 2012-02-27 Pedro Alves <palves@redhat.com>
2058 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2059 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2061 2012-02-27 Pedro Alves <palves@redhat.com>
2064 * linux-low.c (pid_is_stopped): New.
2065 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2067 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2069 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2072 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2074 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2076 2012-02-24 Luis Machado <lgustavo@codesourcery>
2078 * server.c (handle_query): Advertise support for target-side
2079 breakpoint condition evaluation.
2080 (process_point_options): New function.
2081 (process_serial_event): When inserting a breakpoint, check for
2082 a target-side condition that should be evaluated.
2084 * mem-break.c: Include regcache.h and ax.h.
2085 (point_cond_list_t): New data structure.
2086 (breakpoint) <cond_list>: New field.
2087 (find_gdb_breakpoint_at): Make non-static.
2088 (delete_gdb_breakpoint_at): Clear any target-side
2090 (clear_gdb_breakpoint_conditions): New function.
2091 (add_condition_to_breakpoint): Likewise.
2092 (add_breakpoint_condition): Likewise.
2093 (gdb_condition_true_at_breakpoint): Likewise.
2094 (gdb_breakpoint_here): Return result directly instead
2095 of going through a local variable.
2097 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2098 (clear_gdb_breakpoint_conditions): Likewise.
2099 (add_breakpoint_condition): Likewise.
2100 (gdb_condition_true_at_breakpoint): Likewise.
2102 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2103 (need_step_over_p): Take target-side breakpoint condition into
2106 2012-02-24 Luis Machado <lgustavo@codesourcery>
2108 * server.h: Include tracepoint.h.
2109 (agent_mem_read, agent_get_trace_state_variable_value,
2110 agent_set_trace_state_variable_value,
2111 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2112 get_set_tsv_func_addr): New prototypes.
2114 * ax.h: New include file.
2115 * ax.c: New source file.
2117 * tracepoint.c: Include ax.h.
2118 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2119 agent_expr, eval_result_type): Move to ax.h.
2120 (parse_agent_expr): Rename to ...
2121 (gdb_parse_agent_expr): ... this, make it non-static and move
2123 (unparse_agent_expr) Rename to ...
2124 (gdb_unparse_agent_expr): ... this, make it non-static and move
2126 (eval_agent_expr): Rename to ...
2127 (eval_tracepoint_agent_expr): ... this.
2128 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2129 forward declarations.
2130 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2131 (agent_get_trace_state_variable_value): New function.
2132 (agent_set_trace_state_variable_value): New function.
2133 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2134 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2135 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2136 (condition_true_at_tracepoint): Likewise.
2137 (parse_agent_expr): Rename to ...
2138 (gdb_parse_agent_expr): ... this and move to ax.c.
2139 (unparse_agent_expr): Rename to ...
2140 (gdb_unparse_agent_expr): ... this and move to ax.c.
2141 (gdb_agent_op_name): Move to ax.c.
2142 (eval_agent_expr): Rename to ...
2143 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2145 (eval_tracepoint_agent_expr): New function.
2146 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2148 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2150 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2151 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2152 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2153 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2154 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2155 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2156 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2157 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2158 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2159 (compile_bytecodes): Remove forward declaration.
2160 (is_goto_target): Move to ax.c.
2161 (compile_bytecodes): Move to ax.c and call
2162 agent_get_trace_state_variable_value (...) and
2163 agent_set_trace_state_variable_value (...).
2165 * Makefile.in: Update ax.c and IPA dependencies.
2167 2012-02-24 Pedro Alves <palves@redhat.com>
2169 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2170 (cmd_bigqtbuffer_circular): ... this. Only handle
2171 'QTBuffer:circular:'.
2172 (handle_tracepoint_general_set): Adjust.
2174 2012-02-16 Yao Qi <yao@codesourcery.com>
2176 * inferiors.c: Move code to ...
2177 * dll.c: .... here. New.
2178 * server.h: Declare clear_dlls.
2179 * Makefile.in (SFILES): Add dll.c.
2183 2012-02-11 Yao Qi <yao@codesourcery.com>
2185 * server.c: (handle_monitor_command): Add a new parameter
2187 (handle_query): Update caller.
2189 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2191 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2192 * configure, config.in: Regenerate.
2193 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2196 2012-02-02 Pedro Alves <palves@redhat.com>
2198 Try SIGKILL first, then PTRACE_KILL.
2199 * linux-low.c (linux_kill_one_lwp): New.
2200 (linux_kill_one_lwp): Rename to ...
2201 (kill_one_lwp_callback): ... this. Use the new
2204 2012-02-02 Pedro Alves <palves@redhat.com>
2206 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2209 2012-01-27 Pedro Alves <palves@redhat.com>
2211 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2212 (elf_64_file_p): Make static.
2213 (linux_pid_exe_is_elf_64_file): New.
2214 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2215 Delete declarations.
2216 (linux_pid_exe_is_elf_64_file): Declare.
2217 * linux-x86-low.c (x86_arch_setup): Use
2218 linux_pid_exe_is_elf_64_file.
2220 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2222 * linux-low.c (linux_wait_for_event_1): Rename to ...
2223 (linux_wait_for_event): ... here and merge it with former
2224 linux_wait_for_event - new variable wait_ptid, use it.
2225 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2227 2012-01-23 Pedro Alves <palves@redhat.com>
2229 * server.c (main): Avoid yet another case of infinite loop while
2230 detaching/killing after a longjmp.
2232 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2235 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2237 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2239 * hostio.c (handle_readlink): New function.
2240 (handle_vFile): Call it to handle "vFile:readlink" packets.
2242 2012-01-20 Pedro Alves <palves@redhat.com>
2243 Ulrich Weigand <ulrich.weigand@linaro.org>
2245 * server.c (handle_v_requests): Only support vAttach and vRun to
2246 start multiple processes when in extended protocol mode.
2248 2012-01-17 Pedro Alves <palves@redhat.com>
2250 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2251 memalign plus mprotect to allocate the scratch buffer.
2253 2012-01-13 Pedro Alves <palves@redhat.com>
2255 * server.c (attach_inferior): Clear `cont_thread'.
2257 2012-01-13 Pedro Alves <palves@redhat.com>
2259 * server.c (main): Avoid infinite loop while detaching/killing
2262 2012-01-09 Doug Evans <dje@google.com>
2264 * server.c (start_inferior): Set last_ptid in --wrapper case.
2266 2012-01-06 Yao Qi <yao@codesourcery.com>
2268 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2270 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2272 2012-01-04 Yao Qi <yao@codesourcery.com>
2274 * tracepoint.c (cmd_qtdp): Print debug message
2275 for static tracepoint.
2277 2012-01-04 Yao Qi <yao@codesourcery.com>
2279 * tracepoint.c (trace_vdebug): Differentiate debug message
2280 between gdbserver and IPA.
2282 2012-01-03 Yao Qi <yao@codesourcery.com>
2284 * tracepoint.c (tracepoint_was_hit): Don't collect for
2287 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2289 * terminal.h: Reformat copyright header.
2291 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2293 * server.c (gdbserver_version): Update copyright year.
2294 * gdbreplay.c (gdbreplay_version): Likewise.
2296 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2298 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2301 2011-12-18 Hui Zhu <teawater@gmail.com>
2302 * linux-low.c (linux_create_inferior): Save return value to ret.
2304 2011-12-18 Hui Zhu <teawater@gmail.com>
2306 * linux-low.c (linux_create_inferior): Save return value to ret.
2308 2011-12-16 Doug Evans <dje@google.com>
2310 * linux-low.c (linux_create_inferior): If stdio connection,
2311 redirect stdin from /dev/null, stdout to stderr.
2312 * remote-utils.c (remote_is_stdio): New static global.
2313 (remote_connection_is_stdio): New function.
2314 (remote_prepare): Handle stdio connection.
2315 (remote_open): Ditto.
2316 (remote_close): Don't close stdin for stdio connections.
2317 (read_prim,write_prim): New functions. Replace all calls to
2318 read/write to these.
2319 * server.c (main): Watch for "-" argument. Move call to
2320 remote_prepare before start_inferior.
2321 * server.h (STDIO_CONNECTION_NAME): New macro.
2322 (remote_connection_is_stdio): Declare.
2324 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2325 in debugging output.
2327 2011-12-15 Yao Qi <yao@codesourcery.com>
2329 * tracepoint.c: Include sys/syscall.h.
2330 (gdb_ust_thread): Remove preprocessor conditional.
2332 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2334 * linux-low.c (linux_detach_one_lwp): Call
2335 the_low_target.prepare_to_resume before detaching.
2337 2011-12-14 Yao Qi <yao@codesourcery.com>
2339 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2342 2011-12-14 Yao Qi <yao@codesourcery.com>
2344 * i386-low.c (i386_low_stopped_data_address): Initialize local
2347 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2351 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2352 DR_CONTROL unless necessary. Extend comments.
2353 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2354 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2356 2011-12-13 Yao Qi <yao@codesourcery.com>
2358 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2360 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2362 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2364 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2365 Print new debug message for such case.
2367 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2369 Fix overlapping memcpy.
2370 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2371 the read_inferior_memory transfer.
2372 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2373 write_inferior_memory transfer.
2374 (set_fast_tracepoint_jump): New variable buf. Use it for the
2375 read_inferior_memory and write_inferior_memory transfers.
2376 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2377 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2378 Use it for the write_inferior_memory transfer.
2379 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2382 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2384 * linux-low.c (fetch_register, store_register): Make code
2385 consistent, fix formatting.
2387 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2389 * linux-low.c (usr_store_inferior_registers): Factor out code
2390 to handle individual registers into...
2391 (store_register): ... this new function.
2393 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2395 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2396 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2397 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2398 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2399 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2400 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2401 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2402 (srv_xmlfiles): Add new XML files.
2404 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2406 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2407 (init_registers_s390_linux32v1): Add prototype.
2408 (init_registers_s390_linux32v2): Likewise.
2409 (init_registers_s390_linux64v1): Likewise.
2410 (init_registers_s390_linux64v2): Likewise.
2411 (init_registers_s390x_linux64v1): Likewise.
2412 (init_registers_s390x_linux64v2): Likewise.
2413 (s390_num_regs): Increment to 52.
2414 (s390_regmap): Add orig_r2 register.
2415 (s390_num_regs_3264): Increment to 68.
2416 (s390_regmap_3264): Add orig_r2 register.
2417 (s390_collect_ptrace_register): Handle orig_r2 register.
2418 (s390_supply_ptrace_register): Likewise.
2419 (s390_fill_last_break): New function.
2420 (s390_store_last_break): Likewise.
2421 (s390_fill_system_call): New function.
2422 (s390_store_system_call): Likewise.
2423 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2425 (s390_check_regset): New function.
2426 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2427 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2428 Update target_regsets for available register sets.
2430 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2431 Jan Kratochvil <jan.kratochvil@redhat.com>
2433 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2434 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2436 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2437 * linux-low.h (struct process_info_private): New member r_debug.
2438 * server.c (handle_qxfer_libraries): Call
2439 the_target->qxfer_libraries_svr4.
2440 (handle_qxfer_libraries_svr4): New function.
2441 (qxfer_packets): New entry "libraries-svr4".
2442 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2443 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2444 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2445 PACKET_qXfer_libraries_svr4.
2447 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2449 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2450 PSW address/mask between 8-byte and 16-byte formats.
2451 (s390_supply_ptrace_register): Likewise.
2452 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2453 basic addressing mode bit.
2455 2011-11-24 Stan Shebs <stan@codesourcery.com>
2457 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2459 2011-11-17 Stan Shebs <stan@codesourcery.com>
2461 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2462 (tracing_start_time): New global.
2463 (tracing_stop_time): New global.
2464 (tracing_user_name): New global.
2465 (tracing_notes): New global.
2466 (tracing_stop_note): New global.
2467 (cmd_qtstart): Set traceframe_usage, start_time.
2468 (stop_tracing): Set stop_time.
2469 (cmd_qtstatus): Report additional status.
2470 (cmd_qtp): New function.
2471 (handle_tracepoint_query): Call it.
2472 (cmd_qtnotes): New function.
2473 (handle_tracepoint_general_set): Call it.
2474 (get_timestamp): Rename from tsv_get_timestamp.
2476 2011-11-14 Stan Shebs <stan@codesourcery.com>
2477 Kwok Cheung Yeung <kcy@codesourcery.com>
2479 * linux-x86-low.c (small_jump_insn): New.
2480 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2481 trampoline and error message, build a trampoline and issue a small
2482 jump instruction to it.
2483 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2484 trampoline and error message.
2485 (x86_get_min_fast_tracepoint_insn_len): New.
2486 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2487 * linux-low.h (struct linux_target_ops): Add arguments to
2488 install_fast_tracepoint_jump_pad operation, add new operation.
2489 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2491 (linux_get_min_fast_tracepoint_insn_len): New function.
2492 (linux_target_op): Add new operation.
2493 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2494 (gdb_trampoline_buffer_end): Ditto.
2495 (gdb_trampoline_buffer_error): Ditto.
2496 (struct ipa_sym_addresses): Add fields for new IPA variables.
2497 (symbol_list): Add entries for new IPA variables.
2498 (struct tracepoint): Add fields to hold the address range of the
2499 trampoline used by the tracepoint.
2500 (trampoline_buffer_head): New static variable.
2501 (trampoline_buffer_tail): Ditto.
2502 (claim_trampoline_space): New function.
2503 (have_fast_tracepoint_trampoline_buffer): New function.
2504 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2506 (install_fast_tracepoint): Ditto, also add error buffer argument.
2507 (cmd_qtminftpilen): New function.
2508 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2509 (fast_tracepoint_from_trampoline_address): New function.
2510 (fast_tracepoint_collecting): Handle trampoline as part of jump
2512 (set_trampoline_buffer_space): New function.
2513 (initialize_tracepoint): Initialize new IPA variables.
2514 * target.h (struct target_ops): Add arguments to
2515 install_fast_tracepoint_jump_pad operation, add new
2516 get_min_fast_tracepoint_insn_len operation.
2517 (target_get_min_fast_tracepoint_insn_len): New.
2518 (install_fast_tracepoint_jump_pad): Add arguments.
2519 * server.h (IPA_BUFSIZ): Define.
2520 * linux-i386-ipa.c: Include extra header files.
2521 (initialize_fast_tracepoint_trampoline_buffer): New function.
2522 (initialize_low_tracepoint): Call it.
2523 * server.h (set_trampoline_buffer_space): Declare.
2524 (claim_trampoline_space): Ditto.
2525 (have_fast_tracepoint_trampoline_buffer): Ditto.
2527 2011-11-14 Yao Qi <yao@codesourcery.com>
2529 * server.c (handle_query): Handle InstallInTrace for qSupported.
2530 * tracepoint.c (add_tracepoint): Sort list.
2531 (install_tracepoint, download_tracepoint): New.
2532 (cmd_qtdp): Call them to install and download tracepoints.
2533 (sort_tracepoints): Removed.
2534 (cmd_qtstart): Update.
2536 2011-11-14 Yao Qi <yao@codesourcery.com>
2538 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2539 * mem-break.h: Declare.
2540 * tracepoint.c (cmd_qtstart): Move some code to ...
2541 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2543 (download_tracepoints): Move some code to ...
2544 (download_tracepoint_1): ... here. New.
2546 2011-11-08 Yao Qi <yao@codesourcery.com>
2548 * remote-utils.c (relocate_instruction): A comment fix.
2550 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2552 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2553 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2554 dr_status_mirror and dr_control_mirror from debug_reg_state.
2555 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2556 (i386_initial_stuff): Remove use of deleted globals.
2557 (i386_get_thread_context, i386_set_thread_context,
2558 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2559 from debug_reg_state.
2561 2011-11-05 Yao Qi <yao@codesourcery.com>
2563 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2564 address as TPOINT's.
2566 2011-11-02 Stan Shebs <stan@codesourcery.com>
2568 * tracepoint.c (agent_mem_read_string): New function.
2569 (eval_agent_expr): Call it for tracenz.
2570 * server.c (handle_query): Report support for tracenz.
2572 2011-11-02 Yao Qi <yao@codesourcery.com>
2574 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2576 2011-11-02 Yao Qi <yao@codesourcery.com>
2578 * target.h: Fix a typo in comment.
2580 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2582 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2583 clobber the breakpoints' shadows with fast tracepoint jumps.
2584 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2585 * target.c (write_inferior_memory): Also pass MYADDR down to
2588 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2590 * configure.ac: Check support for personality routine.
2591 * configure: Regenerate.
2592 * config.in: Likewise.
2593 * linux-low.c: Include <sys/personality.h>.
2594 Define ADDR_NO_RANDOMIZE if necessary.
2595 (linux_create_inferior): Disable address space randomization when
2596 forking inferior, if requested.
2597 (linux_supports_disable_randomization): New function.
2598 (linux_target_ops): Install it.
2599 * server.h (disable_randomization): Declare.
2600 * server.c (disable_randomization): New global variable.
2601 (handle_general_set): Handle QDisableRandomization.
2602 (handle_query): Likewise for qSupported.
2603 (main): Support --disable-randomization and --no-disable-randomization
2604 command line arguments.
2605 * target.h (struct target_ops): Add supports_disable_randomization.
2606 (target_supports_disable_randomization): New macro.
2608 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2610 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2612 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2613 [!PT_GETDSBT] (target_loadmap): New definition.
2614 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2615 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2616 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2617 and PT_GETDSBT to LINUX_LOADMAP.
2618 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2619 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2621 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2623 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2624 (arm_linux_hwbp_cap): New static variable.
2625 (arm_linux_get_hwbp_cap): Replace by ...
2626 (arm_linux_init_hwbp_cap): ... this new function.
2627 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2628 (arm_linux_get_hw_watchpoint_count): Likewise.
2629 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2630 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2631 (arm_prepare_to_resume): Use perror_with_name instead of error.
2633 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2635 * linux-arm-low.c: Include <signal.h>.
2636 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2637 (struct arm_linux_hwbp_cap): New data type.
2638 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2639 (struct arm_linux_hw_breakpoint): New data type.
2640 (MAX_BPTS, MAX_WPTS): Define.
2641 (struct arch_process_info, struct arch_lwp_info): New data types.
2642 (arm_linux_get_hwbp_cap): New function.
2643 (arm_linux_get_hw_breakpoint_count): Likewise.
2644 (arm_linux_get_hw_watchpoint_count): Likewise.
2645 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2646 (arm_hwbp_control_initialize): Likewise.
2647 (arm_hwbp_control_is_enabled): Likewise.
2648 (arm_hwbp_control_is_initialized): Likewise.
2649 (arm_hwbp_control_disable): Likewise.
2650 (arm_linux_hw_breakpoint_equal): Likewise.
2651 (arm_linux_hw_point_initialize): Likewise.
2652 (struct update_registers_data): New data structure.
2653 (update_registers_callback: New function.
2654 (arm_insert_point): Likewise.
2655 (arm_remove_point): Likewise.
2656 (arm_stopped_by_watchpoint): Likewise.
2657 (arm_stopped_data_address): Likewise.
2658 (arm_new_process): Likewise.
2659 (arm_new_thread): Likewise.
2660 (arm_prepare_to_resume): Likewise.
2661 (the_low_target): Register arm_insert_point, arm_remove_point,
2662 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2663 arm_new_thread, and arm_prepare_to_resume.
2665 2011-09-15 Stan Shebs <stan@codesourcery.com>
2667 * server.h (struct emit_ops): Add compare-goto fields.
2668 * tracepoint.c (gdb_agent_op_sizes): New table.
2669 (emit_eq_goto): New function.
2670 (emit_ne_goto): New function.
2671 (emit_lt_goto): New function.
2672 (emit_le_goto): New function.
2673 (emit_gt_goto): New function.
2674 (emit_ge_goto): New function.
2675 (is_goto_target): New function.
2676 (compile_bytecodes): Recognize special cases of compare-goto
2677 combinations and call specialized emitters for them.
2678 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2679 (amd64_emit_ne_goto): New function.
2680 (amd64_emit_lt_goto): New function.
2681 (amd64_emit_le_goto): New function.
2682 (amd64_emit_gt_goto): New function.
2683 (amd64_emit_ge_goto): New function.
2684 (amd64_emit_ops): Add the new functions.
2685 (i386_emit_eq_goto): New function.
2686 (i386_emit_ne_goto): New function.
2687 (i386_emit_lt_goto): New function.
2688 (i386_emit_le_goto): New function.
2689 (i386_emit_gt_goto): New function.
2690 (i386_emit_ge_goto): New function.
2691 (i386_emit_ops): Add the new functions.
2693 2011-09-08 Stan Shebs <stan@codesourcery.com>
2695 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2696 (i386_emit_epilogue): Restore %ebx.
2698 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2700 * server.c (step_thread): Remove definition.
2701 (process_serial_event): Don't handle Hs.
2702 * server.h (step_thread): Remove declaration.
2703 * target.c (set_desired_inferior): Remove use of step_thread.
2705 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2707 * linux-low.c: Include linux-procfs.h.
2708 (linux_attach_lwp_1): Update comments.
2709 (linux_attach): Scan for existing threads when attaching to a
2710 process that is the tgid.
2711 * Makefile.in: Update dependencies.
2713 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2715 * configure.srv: Add linux-procfs.o dependencies.
2717 2011-08-14 Yao Qi <yao@codesourcery.com>
2719 * target.h (struct target_ops): Fix indent.
2720 * win32-low.c (win32_target_ops): Fix comment.
2722 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2723 Yao Qi <yao@codesourcery.com>
2725 * Makefile.in (clean): Remove tic6x-*.c files.
2726 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2727 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2728 (tic6x-c64xp-linux.c): Likewise.
2729 * configure.srv: Add support for tic6x-*-uclinux.
2730 * linux-tic6x-low.c: New.
2731 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2733 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2734 Yao Qi <yao@codesourcery.com>
2736 * target.h (struct target_ops): Add read_loadmap.
2737 * linux-low.c (struct target_loadseg): New type.
2738 (struct target_loadmap): New type.
2739 (linux_read_loadmap): New function.
2740 (linux_target_ops): Add linux_read_loadmap.
2741 * server.c (handle_query): Support qXfer:fdpic:read packet.
2742 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2745 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2747 * win32-low.c: Include <stdint.h>.
2749 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2751 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2752 to the inferior here.
2753 (i386_remove_aligned_watchpoint): Ditto.
2754 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2755 fit part of the watchpoint in the debug registers.
2756 (i386_update_inferior_debug_regs): New.
2757 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2758 registers, and only update the inferior on success.
2759 (i386_low_remove_watchpoint): Ditto.
2761 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2763 * linux-low.c (compare_ints, unique, list_threads, show_process,
2764 linux_core_of_thread): Delete.
2765 (linux_target_ops): Change linux_core_of_thread to
2766 linux_common_core_of_thread.
2767 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2768 * utils.c (malloc_failure): Change type of argument.
2769 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2770 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2771 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2772 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2773 (IPA_OBJS): Add common-utils-ipa.o.
2774 (ptid_h, linux_osdata_h): New macros.
2775 (server_h): Add common/common-utils.h, common/xml-utils.h,
2776 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2778 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2779 ptid.o, buffer.o): New rules.
2780 (linux-low.o): Add common/linux-osdata.h as a dependency.
2781 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2782 * configure.ac: Add AC_HEADER_DIRENT check.
2783 * config.in: Regenerate.
2784 * configure: Regenerate.
2785 * remote-utils.c (xml_escape_text): Delete.
2786 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2787 buffer_xml_printf): Move to common/buffer.c.
2788 * server.c (main): Remove call to initialize_inferiors.
2789 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2790 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2791 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2792 internal_error, gdb_assert, gdb_assert_fail): Delete.
2793 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2794 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2796 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2797 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2798 initialize_inferiors): Delete.
2800 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2802 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2805 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2807 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2809 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2811 2011-05-26 Yao Qi <yao@codesourcery.com>
2813 * Makefile.in (thread-db.o): Track dependence to
2814 common/gdb_thread_db.h.
2815 * thread-db.c: include gdb_thread_db.h from right place.
2817 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2819 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2820 __FILE__ and __LINE__ to internal_error.
2822 2011-05-13 Doug Evans <dje@google.com>
2824 * thread-db.c (try_thread_db_load_from_sdir): New function.
2825 (try_thread_db_load_from_dir): New function.
2826 (thread_db_load_search): Handle $sdir, ignore $pdir.
2827 Remove trying of system directories if search of
2828 libthread-db-search-path fails, that is now done via $sdir.
2830 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2832 * server.c (handle_query): Add EnableDisableTracepoints to the list
2833 of supported features.
2834 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2836 (cmd_qtenable_disable): New.
2837 (cmd_qtstart): Install tracepoints even if disabled.
2838 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2839 receiving a QTEnable or QTDisable packet.
2840 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2841 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2843 (gdb_probe): Skip data collection if static tracepoint is disabled.
2845 2011-05-10 Doug Evans <dje@google.com>
2847 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2849 2011-05-04 Doug Evans <dje@google.com>
2851 * linux-low.c (linux_join): Skip process lookup.
2852 * spu-low.c (spu_join): Ditto.
2853 * server.c (join_inferiors_callback): Delete.
2854 (process_serial_event): For 'D' packet (detach) call join_inferior
2857 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2859 * README: Don't mention xscale*-*-linux*.
2860 * configure.srv (xscale*-*-linux*): Don't handle target.
2862 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2864 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2866 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2867 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2868 (i386_emit_void_call_2): Likewise.
2870 2011-04-26 Yao Qi <yao@codesourcery.com>
2872 * linux-low.c: Move common macros to linux-ptrace.h.
2873 Include linux-ptrace.h.
2874 * Makefile.in (linux_ptrace_h): New.
2875 (linux-low.o): Depends on linux-ptrace.h.
2877 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2879 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2880 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2881 (remote_prepare): New function with most of the TCP code from ...
2882 (remote_open): ... here. Detect PORT here unconditionally. Move also
2883 setting transport_is_reliable.
2884 * server.c (run_once): New variable.
2885 (gdbserver_usage): Document it.
2886 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2887 the first run if RUN_ONCE.
2888 * server.h (run_once, remote_prepare): New declarations.
2890 2011-04-19 Tom Tromey <tromey@redhat.com>
2892 * win32-low.c (handle_load_dll): Remove duplicate "the".
2894 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2896 Remove support for old Cygwin 1.5 versions.
2897 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2898 function to avoid warning.
2899 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2902 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2904 * gdbserver/server.h (Macro _): Define it if not available.
2906 2011-03-14 Michael Snyder <msnyder@vmware.com>
2908 * hostio.c (handle_close): Remove unnecessary null test.
2910 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2912 * Makefile.in (maintainer-clean realclean distclean): Remove
2913 "make ... subdir_do" command.
2915 2011-03-10 Michael Snyder <msnyder@vmware.com>
2917 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2919 * server.c (handle_v_run): Free alloced buffer on early return.
2921 2011-03-09 Yao Qi <yao@codesourcery.com>
2924 2011-03-04 Yao Qi <yao@codesourcery.com>
2926 * Makefile.in: Remove GNU make feature --directory.
2928 2011-03-05 Yao Qi <yao@codesourcery.com>
2930 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2931 (subdir_do): New make target. Copied from gdb/Makefile.
2932 (maintainer-clean, realclean, distclean, clean): Call corresponding
2933 make targets in common/Makefile.
2935 2011-02-11 Yao Qi <yao@codesourcery.com>
2937 * configure.ac: Call AC_PROG_RANLIB.
2938 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2939 * configure: Regenerate.
2941 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2943 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2945 2011-03-06 Yao Qi <yao@codesourcery.com>
2947 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2949 2011-03-05 Yao Qi <yao@codesourcery.com>
2951 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2952 (subdir_do): New make target. Copied from gdb/Makefile.
2953 (maintainer-clean, realclean, distclean, clean): Call corresponding
2954 make targets in common/Makefile.
2956 2011-03-04 Yao Qi <yao@codesourcery.com>
2958 * Makefile.in: Remove GNU make feature --directory.
2960 2011-03-04 Michael Snyder <msnyder@vmware.com>
2962 * server.c (queue_stop_reply): Call xmalloc not malloc.
2964 2011-03-02 Michael Snyder <msnyder@vmware.com>
2966 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2968 2011-02-28 Michael Snyder <msnyder@vmware.com>
2970 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2971 (cmd_qtframe): Ditto.
2972 (cmd_qtbuffer): Ditto.
2973 (cmd_bigqtbuffer): Ditto.
2975 * utils.c (decimal2str): Initialize 'width' to nine, then
2978 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2980 * hostio.c (require_data): Free *data, not data.
2982 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2984 * hostio.c (require_data): Use free, not xfree.
2986 2011-02-27 Michael Snyder <msnyder@vmware.com>
2988 * server.c (handle_query): Discard unused value.
2990 * hostio.c (require_data): Free malloc memory before returning
2993 2011-02-26 Michael Snyder <msnyder@vmware.com>
2995 * linux-low.c (list_threads): Call closedir for dirent.
2997 2011-02-27 Michael Snyder <msnyder@vmware.com>
2999 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3000 a case statement falls through.
3002 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3004 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3007 2011-02-26 Michael Snyder <msnyder@vmware.com>
3009 * utils.c (decimal2str): Eliminate dead code and dead param.
3010 (pulongest): Drop dead param from call to decimal2str.
3013 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3015 Revert the following patch (not approved yet):
3016 2011-02-21 Hui Zhu <teawater@gmail.com>
3017 * tracepoint.c (tp_printf): New function.
3018 (eval_agent_expr): Handle gdb_agent_op_printf.
3020 2011-02-21 Hui Zhu <teawater@gmail.com>
3022 * tracepoint.c (tp_printf): New function.
3023 (eval_agent_expr): Handle gdb_agent_op_printf.
3025 2011-02-18 Tom Tromey <tromey@redhat.com>
3027 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3028 (tracepoint.o): Likewise.
3029 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3030 (gdb_agent_op_names): Likewise.
3032 2011-02-18 Tom Tromey <tromey@redhat.com>
3034 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3035 gdb_agent_op_rot>: New constants.
3036 (gdb_agent_op_names): Add pick and roll.
3037 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3040 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3042 * aclocal.m4: Regenerated with aclocal-1.11.1.
3044 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3046 * server.c (handle_qxfer_traceframe_info): New.
3047 (qxfer_packets): Register "traceframe-info".
3048 (handle_query): Report support for qXfer:traceframe-info:read+.
3049 * tracepoint.c (match_blocktype): New.
3050 (traceframe_find_block_type): Rename to ...
3051 (traceframe_walk_blocks): ... this. Add callback filter argument,
3053 (traceframe_find_block_type): New, reimplemented on top of
3054 traceframe_walk_blocks.
3055 (build_traceframe_info_xml): New.
3056 (traceframe_read_info): New.
3057 * server.h (traceframe_read_info): Declare.
3059 2011-02-11 Yao Qi <yao@codesourcery.com>
3061 * configure.ac: Call AC_PROG_RANLIB.
3062 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3063 * configure: Regenerate.
3065 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3067 * server.c (gdb_read_memory): Change return semantics to allow
3069 (handle_search_memory_1): Adjust.
3070 (process_serial_event) <'m' packet>: Handle partial transfers.
3071 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3073 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3075 * regcache.c (init_register_cache): Initialize
3076 regcache->register_status.
3077 (free_register_cache): Release regcache->register_status.
3078 (regcache_cpy): Copy register_status.
3079 (registers_to_string): Print 'x's for unavailable registers.
3080 (supply_register): Mark the register's status valid or
3081 unavailable, depending on whether a buffer was passed in or not.
3082 (supply_register_zeroed): New.
3083 (supply_regblock): Mark the registers' status valid or
3084 unavailable, depending on whether a buffer was passed in or not.
3085 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3086 (struct regcache): New `register_status' field.
3087 (supply_register_zeroed): Declare.
3088 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3089 supply_register_zeroed, rather than passing a NULL buffer to
3091 * tracepoint.c (fetch_traceframe_registers): Update comment.
3093 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3095 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3098 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3100 * server.h (decode_xfer_write): Change prototype.
3101 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3102 and don't extract the annex here.
3103 * server.c (decode_xfer_read): Remove `annex' parameter,
3104 and don't extract the annex here.
3106 (struct qxfer): New.
3107 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3108 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3109 (handle_qxfer_statictrace): New functions, abstracted out from
3110 handle_query, and made to use the struct qxfer interface.
3111 (handle_threads_qxfer_proper): Rename to ...
3112 (handle_qxfer_threads_proper): ... this.
3113 (handle_threads_qxfer): Rename to ...
3114 (handle_qxfer_threads): ... this. Adjust.
3115 (qxfer_packets): New array.
3116 (handle_qxfer): New function.
3117 (handle_query): Use handle_qxfer.
3119 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3121 * gdbreplay.c: Shorten lines of >= 80 columns.
3122 * linux-low.c: Ditto.
3123 * linux-ppc-low.c: Ditto.
3124 * linux-s390-low.c: Ditto.
3125 * linux-sparc-low.c: Ditto.
3126 * linux-x86-low.c: Ditto.
3127 * linux-xtensa-low.c: Ditto.
3128 * mem-break.c: Ditto.
3130 * regcache.h: Ditto.
3131 * remote-utils.c: Ditto.
3134 * thread-db.c: Ditto.
3135 * tracepoint.c: Ditto.
3137 * win32-low.h: Ditto.
3139 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3141 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3144 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3146 * server.c (gdbserver_version): Update copyright year in version
3148 * gdbreplay.c (gdbreplay_version): Ditto.
3150 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3152 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3153 * linux-bfin-low.c: New file.
3154 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3155 PT_DATA_ADDR for BFIN targets.
3156 * Makefile.in (SFILES): Add linux-bfin-low.c.
3157 (clean): Remove reg-bfin.c.
3158 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3159 * README: Mention supported Blackfin targets.
3161 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3163 * .gitignore: New file.
3165 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3167 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3169 2010-10-22 Jie Zhang <jie@codesourcery.com>
3171 * Makefile.in: Add FLAGS_TO_PASS variable.
3172 (install): Remove dependency of install-only and recursively
3173 invoke make for install-only.
3175 2010-10-04 Doug Evans <dje@google.com>
3177 * Makefile.in (uninstall): Use $(DESTDIR).
3179 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3183 * linux-x86-low.c (compat_siginfo_from_siginfo)
3184 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3185 si_code is < 0. Check for si_code == SI_TIMER before checking for
3188 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3190 * lynx-i386-low.c: New file.
3191 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3193 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3195 * lynx-low.c (ptrace_request_to_str): Remove handling for
3196 request values that have been removed in LynxOS 5.x.
3198 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3200 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3203 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3205 * configure.ac: Add --enable-inprocess-agent option.
3206 * configure: Rebuilt.
3208 2010-09-06 Yao Qi <yao@codesourcery.com>
3210 * linux-low.c (linux_kill): Remove unused variable.
3211 (linux_stabilize_threads): Likewise.
3212 * server.c (start_inferior): Likewise.
3213 (queue_stop_reply_callback): Likewise.
3214 * tracepoint.c (do_action_at_tracepoint): Likewise.
3216 2010-09-06 Yao Qi <yao@codesourcery.com>
3218 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3221 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3223 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3225 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3227 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3230 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3232 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3233 gdbserver/lynx-ppc-low.c: New files.
3234 * Makefile.in (lynx_low_h): New variable.
3235 (lynx-low.o, lynx-ppc-low.o): New rules.
3236 * configure.ac: On LynxOS, link with -lnetinet.
3237 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3238 * configure: regenerate.
3240 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3242 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3243 * configure.ac: Add check for vasprintf and vsnprintf.
3244 * configure, config.in: Regenerate.
3245 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3247 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3249 * gdbreplay.c: Move include of alloca.h up, next to include of
3251 * server.h: Add include of malloc.h.
3252 * mem-break.c: Remove include of malloc.h.
3253 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3255 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3257 * Makefile.in (memmem.o): Build with -Wno-error.
3259 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3261 * utils.c (xsnprintf): Make non-static.
3262 * server.h: Add xsnprintf declaration.
3263 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3264 replace calls to snprintf by calls to xsnprintf throughout.
3266 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3268 * configure.ac: Add configure check for alloca.
3269 * configure, config.in: Regenerate.
3270 * server.h: Include alloca.h if it exists.
3271 * gdbreplay.c: Include alloca.h if it exists.
3273 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3275 * linux-low.c (__SIGRTMIN): Define if not already defined.
3276 (linux_create_inferior): Check for __ANDROID__ rather than
3278 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3279 are already deferred.
3280 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3281 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3282 stopped and already has a pending signal to report.
3283 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3284 a pending signal to report or is moving out of a jump pad.
3285 (linux_init_signals): Check for __ANDROID__ rather than
3288 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3290 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3291 debug_threads check. Avoid a linear search when not doing debug
3294 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3296 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3297 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3298 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3299 (process_event): Change local fd's type to gdb_fildes_t.
3300 (create_file_handler): Adjust prototype.
3301 (delete_file_handler): Adjust prototype.
3302 (handle_file_event): Adjust prototype. Use pfildes.
3303 (create_file_event): Adjsut prototype.
3304 * remote-utils.c (remote_desc, listen_desc): Change type to
3306 * server.h: New gdb_fildes_t typedef.
3307 [USE_WIN32API]: Include winsock2.h.
3308 (delete_file_handler, add_file_handler): Adjust prototypes.
3310 * utils.c (pfildes): New.
3312 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3314 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3315 * configure: Regenerate.
3317 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3319 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3320 (linux_done_accessing_memory): ... this.
3321 (linux_target_ops): Adjust.
3322 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3323 * nto-low.c (nto_target_ops): Adjust comment.
3324 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3325 * spu-low.c (spu_target_ops): Adjust comment.
3326 * target.h (target_ops): Rename unprepare_to_access_memory field
3327 to done_accessing_memory.
3328 (unprepare_to_access_memory): Rename to ...
3329 (done_accessing_memory): ... this.
3331 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3333 * linux-low.c (linux_prepare_to_access_memory): New.
3334 (linux_unprepare_to_access_memory): New.
3335 (linux_target_ops): Install them.
3336 * server.c (read_memory): Rename to ...
3337 (gdb_read_memory): ... this. Use
3338 prepare_to_access_memory/prepare_to_access_memory.
3339 (write_memory): Rename to ...
3340 (gdb_write_memory): ... this. Use
3341 prepare_to_access_memory/prepare_to_access_memory.
3342 (handle_search_memory_1): Adjust.
3343 (process_serial_event): Adjust.
3344 * target.h (struct target_ops): New fields
3345 prepare_to_access_memory and unprepare_to_access_memory.
3346 (prepare_to_access_memory, unprepare_to_access_memory): New.
3347 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3348 prepare_to_access_memory/prepare_to_access_memory.
3349 * nto-low.c (nto_target_ops): Adjust.
3350 * spu-low.c (spu_target_ops): Adjust.
3351 * win32-low.c (win32_target_ops): Adjust.
3353 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3355 * Makefile.in (WARN_CFLAGS): Get it from configure.
3356 (WERROR_CFLAGS): New.
3357 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3358 * configure.ac: Introduce --enable-werror, which adds -Werror to
3359 the compiler command line. Enabled by default. Disable with
3360 --disable-werror. Add -Wdeclaration-after-statement
3361 Wpointer-arith and -Wformat-nonliteral to warning flags.
3362 * configure: Regenerate.
3364 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3366 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3368 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3370 * gdbreplay.c (remote_error): New.
3372 (expect): Use gdbchar. Check for error reading from GDB.
3373 Clarify sync error output.
3374 (play): Check for errors writing to GDB.
3375 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3376 * remote-utils.c (getpkt): Check for errors writing to the remote
3379 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3381 * linux-low.c (linux_wait_1): Move non-debugging code out of
3382 `debug_threads' control.
3384 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3386 * linux-low.c (linux_wait_1): Don't set last_status here.
3387 * server.c (push_event, queue_stop_reply_callback): Assert we're
3388 not pushing a TARGET_WAITKIND_IGNORE event.
3389 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3390 (myresume, handle_target_event): Set the thread's last_resume_kind
3391 and last_status from the target returned status.
3393 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3397 * linux-x86-low.c (update_debug_registers_callback): New.
3398 (i386_dr_low_set_addr): Use it.
3399 (i386_dr_low_get_addr): New.
3400 (i386_dr_low_set_control): Use update_debug_registers_callback.
3401 (i386_dr_low_get_control): New.
3402 (i386_dr_low_get_status): Adjust.
3403 * linux-low.c (linux_stop_lwp): New.
3404 * linux-low.h (linux_stop_lwp): Declare.
3406 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3407 argument instead of a i386_debug_reg_state.
3408 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3409 a i386_debug_reg_state.
3410 (i386_insert_aligned_watchpoint): Adjust.
3411 (i386_remove_aligned_watchpoint): Adjust.
3412 (i386_low_stopped_data_address): Read the debug registers from the
3413 inferior instead of from the mirrors.
3414 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3415 (i386_dr_low_get_addr): Declare.
3416 (i386_dr_low_get_control): Declare.
3417 (i386_dr_low_get_status): Change prototype.
3419 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3420 (i386_dr_low_get_addr): New.
3421 (i386_dr_low_get_control): New.
3422 (i386_dr_low_get_status): Adjust prototype. Return
3424 (i386_initial_stuff): Clear dr_status_mirror and
3426 (i386_get_thread_context): Adjust.
3427 (i386_set_thread_context): Adjust.
3428 (i386_thread_added): Adjust.
3430 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3432 * linux-low.h (linux_thread_area): Delete declaration.
3434 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3436 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3437 after its termination.
3439 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3441 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3442 (gdb_wants_all_stopped): Delete.
3443 (linux_wait_1): Don't call them.
3444 * server.c (handle_v_cont): Tag all threads as want-stopped.
3445 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3446 stopped as "client-wants-stopped".
3448 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3450 * Makefile.in (signals_h): New.
3451 (server_h): Depend on it.
3452 (server.o): Don't depend on $(signals_def).
3453 (signals.o): Depend on $(signals_def).
3455 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3457 * Makefile.in (signals_def): New.
3458 (server_h): Append include/gdb/signals.h and signals_def.
3459 (server.o): Append signals_def.
3461 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3463 * server.c (handle_target_event): Use target_signal_to_host for
3464 resume_info.sig initialization.
3465 * target.h (struct thread_resume) <sig>: New comment.
3467 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3469 * server.c (handle_query): strcpy() the returned string from paddress()
3470 instead of sprintf().
3471 * utils.c (paddress): Return phex_nz().
3473 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3475 * server.c (handle_v_cont): Call mourn_inferior if process
3477 (myresume): Likewise.
3479 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3481 Static tracepoints, and integration with UST.
3483 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3484 * mem-break.c (uninsert_all_breakpoints)
3485 (reinsert_all_breakpoints): New.
3486 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3487 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3488 (gdb_agent_ust_loaded, helper_thread_id)
3489 (gdb_agent_helper_thread_id): New macros.
3490 (struct ipa_sym_addresses): Add addr_ust_loaded,
3491 addr_helper_thread_id, addr_cmd_buf.
3492 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3493 (in_process_agent_loaded_ust): New.
3494 (write_e_ust_not_loaded): New.
3495 (maybe_write_ipa_ust_not_loaded): New.
3496 (struct collect_static_trace_data_action): New.
3497 (enum tracepoint_type) <static_tracepoint>: New.
3498 (struct tracepoint) <handle>: Mention static tracepoints.
3499 (struct static_tracepoint_ctx): New.
3500 (CMD_BUF_SIZE): New.
3501 (add_tracepoint_action): Handle static tracepoint actions.
3502 (unprobe_marker_at): New.
3503 (clear_installed_tracepoints): Handle static tracepoints.
3504 (cmd_qtdp): Handle static tracepoints.
3505 (probe_marker_at): New.
3506 (cmd_qtstart): Handle static tracepoints.
3507 (response_tracepoint): Handle static tracepoints.
3508 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3509 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3510 (get_context_regcache): Handle static tracepoints.
3511 (do_action_at_tracepoint): Handle static tracepoint actions.
3512 (traceframe_find_block_type): Handle static trace data blocks.
3513 (traceframe_read_sdata): New.
3514 (download_tracepoints): Download static tracepoint actions.
3515 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3516 (GDB_PROBE_NAME): New.
3521 (ust_marker_to_static_tracepoint): New.
3523 (collect_ust_data_at_tracepoint): New.
3524 (gdb_ust_probe): New.
3525 (UNIX_PATH_MAX, SOCK_DIR): New.
3526 (gdb_ust_connect_sync_socket): New.
3527 (resume_thread, stop_thread): New.
3528 (run_inferior_command): New.
3529 (init_named_socket): New.
3530 (gdb_ust_socket_init): New.
3531 (cstr_to_hexstr): New.
3533 (first_marker, next_marker): New.
3534 (response_ust_marker): New.
3535 (cmd_qtfstm, cmd_qtsstm): New.
3536 (unprobe_marker_at, probe_marker_at): New.
3537 (cmd_qtstmat, gdb_ust_thread): New.
3538 (gdb_ust_init): New.
3539 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3540 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3542 (x86_64_st_collect_regmap): New.
3543 (X86_64_NUM_ST_COLLECT_GREGS): New.
3544 (AMD64_RIP_REGNUM): New.
3545 (supply_static_tracepoint_registers): New.
3546 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3548 (i386_st_collect_regmap): New.
3549 (i386_NUM_ST_COLLECT_GREGS): New.
3550 (supply_static_tracepoint_registers): New.
3551 * server.c (handle_query): Handle qXfer:statictrace:read.
3552 <qSupported>: Report support for StaticTracepoints, and
3553 qXfer:statictrace:read features.
3554 * server.h (traceframe_read_sdata)
3555 (supply_static_tracepoint_registers): Declare.
3556 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3557 (unpack_varlen_hex): Include in IPA build.
3558 * Makefile.in (ustlibs, ustinc): New.
3559 (IPA_OBJS): Add remote-utils-ipa.o.
3560 ($(IPA_LIB)): Link -ldl and -lpthread.
3562 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3563 * config.in, configure: Regenerate.
3565 2010-06-20 Ian Lance Taylor <iant@google.com>
3566 Pedro Alves <pedro@codesourcery.com>
3568 * linux-x86-low.c (always_true): Delete.
3569 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3570 trying to fool the compiler with always_true.
3572 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3574 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3575 conditions in gdbserver.
3577 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3579 * spu-low.c (spu_read_memory): Wrap around local store limit.
3580 (spu_write_memory): Likewise.
3582 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3584 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3585 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3587 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3589 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3590 uses with LONGEST uses.
3592 2010-06-14 Stan Shebs <stan@codesourcery.com>
3593 Pedro Alves <pedro@codesourcery.com>
3597 * linux-x86-low.c: Include limits.h.
3602 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3603 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3604 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3605 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3606 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3607 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3608 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3609 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3610 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3611 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3612 (amd64_emit_void_call_2): New.
3613 (amd64_emit_ops): New.
3614 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3615 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3616 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3617 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3618 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3619 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3620 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3621 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3622 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3623 (i386_emit_stack_adjust, i386_emit_int_call_1)
3624 (i386_emit_void_call_2): New.
3625 (i386_emit_ops): New.
3626 (x86_emit_ops): New.
3627 (the_low_target): Install x86_emit_ops.
3628 * server.h (struct emit_ops): New.
3629 (get_raw_reg_func_addr): Declare.
3630 (current_insn_ptr, emit_error): Declare.
3631 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3632 (set_trace_state_variable_value): New defines.
3633 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3634 addr_get_trace_state_variable_value and
3635 addr_set_trace_state_variable_value.
3636 (symbol_list): New fields for get_raw_reg,
3637 get_trace_state_variable_value and set_trace_state_variable_value.
3638 (condfn): New typedef.
3639 (struct tracepoint): New field `compiled_cond'.
3640 (do_action_at_tracepoint): Clear compiled_cond.
3641 (get_trace_state_variable_value, set_trace_state_variable_value):
3643 (condition_true_at_tracepoint): If there's a compiled condition,
3645 (current_insn_ptr, emit_error): New globals.
3646 (struct bytecode_address): New.
3647 (get_raw_reg_func_addr): New.
3648 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3649 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3650 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3651 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3652 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3653 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3654 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3655 (compile_tracepoint_condition, compile_bytecodes): New.
3656 * target.h (emit_ops): Forward declare.
3657 (struct target_ops): New field emit_ops.
3658 (target_emit_ops): New.
3659 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3660 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3661 * linux-low.c (linux_emit_ops): New.
3662 (linux_target_ops): Install it.
3663 * linux-low.h (struct linux_target_ops): New field emit_ops.
3665 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3667 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3668 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3670 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3671 Stan Shebs <stan@codesourcery.com>
3673 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3674 (all): Depend on $(extra_libraries).
3675 (install-only): Install the IPA.
3676 (IPA_OBJS, IPA_LIB): New.
3677 (clean): Remove the IPA lib.
3678 (IPAGENT_CFLAGS): New.
3679 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3680 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3681 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3682 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3683 * configure.ac: Check for atomic builtins support in the compiler.
3684 (IPA_DEPFILES, extra_libraries): Define.
3685 * configure.srv (ipa_obj): Add description.
3686 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3687 (i[34567]86-*-linux*): Set ipa_obj.
3688 (x86_64-*-linux*): Set ipa_obj.
3689 * linux-low.c (stabilizing_threads): New.
3690 (supports_fast_tracepoints): New.
3691 (linux_detach): Stabilize threads before detaching.
3692 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3693 the lwp is either not stabilizing, or is moving out of a jump pad.
3694 (linux_fast_tracepoint_collecting): New.
3695 (maybe_move_out_of_jump_pad): New.
3696 (enqueue_one_deferred_signal): New.
3697 (dequeue_one_deferred_signal): New.
3698 (linux_wait_for_event_1): If moving out of a jump pad, defer
3699 pending signals to later.
3700 (linux_stabilize_threads): New.
3701 (linux_wait_1): Check if threads need moving out of jump pads, and
3703 (stuck_in_jump_pad_callback): New.
3704 (move_out_of_jump_pad_callback): New.
3706 (linux_resume_one_lwp): Handle moving out of jump pads.
3707 (linux_set_resume_request): Dequeue deferred signals.
3708 (need_step_over_p): Also step over fast tracepoint jumps.
3709 (start_step_over): Also uninsert fast tracepoint jumps.
3710 (finish_step_over): Also reinsert fast tracepoint jumps.
3711 (linux_install_fast_tracepoint_jump): New.
3712 (linux_target_ops): Install linux_stabilize_threads and
3713 linux_install_fast_tracepoint_jump_pad.
3714 * linux-low.h (linux_target_ops) <get_thread_area,
3715 install_fast_tracepoint_jump_pad>: New fields.
3716 (struct lwp_info) <collecting_fast_tracepoint,
3717 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3718 (linux_get_thread_area): Declare.
3719 * linux-x86-low.c (jump_insn): New.
3720 (x86_get_thread_area): New.
3721 (append_insns): New.
3723 (amd64_install_fast_tracepoint_jump_pad): New.
3724 (i386_install_fast_tracepoint_jump_pad): New.
3725 (x86_install_fast_tracepoint_jump_pad): New.
3726 (the_low_target): Install x86_get_thread_area and
3727 x86_install_fast_tracepoint_jump_pad.
3728 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3729 (struct fast_tracepoint_jump): New.
3730 (fast_tracepoint_jump_insn): New.
3731 (fast_tracepoint_jump_shadow): New.
3732 (find_fast_tracepoint_jump_at): New.
3733 (fast_tracepoint_jump_here): New.
3734 (delete_fast_tracepoint_jump): New.
3735 (set_fast_tracepoint_jump): New.
3736 (uninsert_fast_tracepoint_jumps_at): New.
3737 (reinsert_fast_tracepoint_jumps_at): New.
3738 (set_breakpoint_at): Use write_inferior_memory.
3739 (uninsert_raw_breakpoint): Use write_inferior_memory.
3740 (check_mem_read): Mask out fast tracepoint jumps.
3741 (check_mem_write): Mask out fast tracepoint jumps.
3742 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3743 (set_fast_tracepoint_jump): Declare.
3744 (delete_fast_tracepoint_jump)
3745 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3746 (reinsert_fast_tracepoint_jumps_at): Declare.
3747 * regcache.c: Don't compile many functions when building the
3748 in-process agent library.
3749 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3750 the register buffer in the heap.
3751 (free_register_cache): If the register buffer isn't owned by the
3752 regcache, don't free it.
3753 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3754 pre-existing register caches.
3755 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3757 (convert_ascii_to_int): : Constify `from' parameter type.
3758 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3759 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3760 the needed buffer in-place.
3761 (relocate_instruction): New.
3762 * server.c (handle_query) <qSymbols>: If the target supports
3763 tracepoints, give it a chance of looking up symbols. Report
3764 support for fast tracepoints.
3765 (handle_status): Stabilize threads.
3766 (process_serial_event): Adjust.
3767 * server.h (struct fast_tracepoint_jump): Forward declare.
3768 (struct process_info) <fast_tracepoint_jumps>: New field.
3769 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3770 (decode_X_packet, decode_M_packet): Adjust.
3771 (relocate_instruction): Declare.
3772 (in_process_agent_loaded): Declare.
3773 (tracepoint_look_up_symbols): Declare.
3774 (struct fast_tpoint_collect_status): Declare.
3775 (fast_tracepoint_collecting): Declare.
3776 (force_unlock_trace_buffer): Declare.
3777 (handle_tracepoint_bkpts): Declare.
3778 (initialize_low_tracepoint)
3779 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3780 * target.h (struct target_ops) <stabilize_threads,
3781 install_fast_tracepoint_jump_pad>: New fields.
3782 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3783 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3784 [HAVE_STDINT_H]: Include stdint.h.
3785 (trace_debug_1): Rename to ...
3786 (trace_vdebug): ... this.
3787 (trace_debug): Rename to ...
3788 (trace_debug_1): ... this. Add `level' parameter.
3790 (ATTR_USED, ATTR_NOINLINE): New.
3791 (IP_AGENT_EXPORT): New.
3792 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3793 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3794 (about_to_request_buffer_space, trace_buffer_is_full)
3795 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3796 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3797 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3798 (traceframe_write_count, traceframes_created)
3799 (trace_state_variables)
3800 New renaming defines.
3801 (struct ipa_sym_addresses): New.
3802 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3804 (ipa_sym_addrs): New.
3805 (all_tracepoint_symbols_looked_up): New.
3806 (in_process_agent_loaded): New.
3807 (write_e_ipa_not_loaded): New.
3808 (maybe_write_ipa_not_loaded): New.
3809 (tracepoint_look_up_symbols): New.
3810 (debug_threads) [IN_PROCESS_AGENT]: New.
3811 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3812 (UNKNOWN_SIDE_EFFECTS): New.
3813 (stop_tracing): New.
3814 (flush_trace_buffer): New.
3815 (stop_tracing_bkpt): New.
3816 (flush_trace_buffer_bkpt): New.
3817 (read_inferior_integer): New.
3818 (read_inferior_uinteger): New.
3819 (read_inferior_data_pointer): New.
3820 (write_inferior_data_pointer): New.
3821 (write_inferior_integer): New.
3822 (write_inferior_uinteger): New.
3823 (struct collect_static_trace_data_action): Delete.
3824 (enum tracepoint_type): New.
3825 (struct tracepoint) <type>: New field `type'.
3826 <actions_str, step_actions, step_actions_str>: Only include in
3828 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3829 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3830 (tracepoints): Use IP_AGENT_EXPORT.
3831 (last_tracepoint): Don't include in the IPA.
3832 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3833 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3834 (alloced_trace_state_variables): New.
3835 (trace_state_variables): Use IP_AGENT_EXPORT.
3836 (traceframe_t): Delete unused variable.
3837 (circular_trace_buffer): Don't include in the IPA.
3838 (trace_buffer_start): Delete.
3839 (struct trace_buffer_control): New.
3840 (trace_buffer_free): Delete.
3841 (struct ipa_trace_buffer_control): New.
3842 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3843 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3845 (trace_buffer_ctrl): New.
3846 (TRACE_BUFFER_CTRL_CURR): New.
3847 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3848 Reimplement as macros.
3849 (trace_buffer_wrap): Delete.
3850 (traceframe_write_count, traceframe_read_count)
3851 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3852 (struct tracepoint_hit_ctx) <type>: New field.
3853 (struct fast_tracepoint_ctx): New.
3854 (memory_barrier): New.
3856 (record_tracepoint_error): Update atomically in the IPA.
3857 (clear_inferior_trace_buffer): New.
3858 (about_to_request_buffer_space): New.
3859 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3860 updating the same buffer.
3861 (add_tracepoint): Default the tracepoint's type to trap
3862 tracepoint, and orig_size to -1.
3863 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3865 (create_trace_state_variable): New parameter `gdb'. Handle it.
3866 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3867 (cmd_qtdp): Handle fast tracepoints.
3869 (max_jump_pad_size): New.
3870 (gdb_jump_pad_head): New.
3871 (get_jump_space_head): New.
3872 (claim_jump_space): New.
3873 (sort_tracepoints): New.
3874 (MAX_JUMP_SIZE): New.
3875 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3877 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3878 support. Upload fast traceframes, and delete internal IPA
3880 (stop_tracing_handler): New.
3881 (flush_trace_buffer_handler): New.
3882 (cmd_qtstop): Upload fast tracepoints.
3883 (response_tracepoint): Handle fast tracepoints.
3884 (tracepoint_finished_step): Upload fast traceframes. Set the
3885 tracepoint hit context's tracepoint type.
3886 (handle_tracepoint_bkpts): New.
3887 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3888 type. Add comment about fast tracepoints.
3889 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3890 non-existing action_str field.
3891 (get_context_regcache): Handle fast tracepoints.
3892 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3894 (fast_tracepoint_from_jump_pad_address): New.
3895 (fast_tracepoint_from_ipa_tpoint_address): New.
3896 (collecting_t): New.
3897 (force_unlock_trace_buffer): New.
3898 (fast_tracepoint_collecting): New.
3901 (write_inferior_data_ptr): New.
3902 (target_tp_heap): New.
3903 (target_malloc): New.
3904 (download_agent_expr): New.
3906 (download_tracepoints): New.
3907 (download_trace_state_variables): New.
3908 (upload_fast_traceframes): New.
3909 (IPA_FIRST_TRACEFRAME): New.
3910 (IPA_NEXT_TRACEFRAME_1): New.
3911 (IPA_NEXT_TRACEFRAME): New.
3912 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3913 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3914 (gdb_jump_pad_buffer_end): New.
3915 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3916 (initialize_tracepoint): Adjust.
3917 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3918 buffer. Initialize the low module.
3919 * utils.c (PREFIX, TOOLNAME): New.
3920 (malloc_failure): Use PREFIX.
3921 (error): In the IPA, an error causes an exit.
3922 (fatal, warning): Use PREFIX.
3923 (internal_error): Use TOOLNAME.
3924 (NUMCELLS): Increase to 10.
3925 * configure, config.in: Regenerate.
3927 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3929 * server.c (handle_query) <qSupported>: Do two passes over the
3930 qSupported string to avoid nesting strtok.
3932 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3934 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3936 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3938 * configure: Regenerate.
3939 * proc-service.list: New.
3941 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3943 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3946 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3948 * gdbreplay.c (remote_open): Check error return from socket() call by
3949 its equality to -1 not by it being negative.
3950 * remote-utils.c (remote_open): Likewise.
3952 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3954 * config.h: Regenerate.
3956 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3958 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3959 doesn't provide PTRACE_GET_THREAD_AREA.
3961 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3963 * linux-m68k-low.c: Include <asm/ptrace.h>
3964 (ps_get_thread_area): Implement.
3966 2010-05-03 Doug Evans <dje@google.com>
3968 * event-loop.c (struct callback_event): New struct.
3969 (callback_list): New global.
3970 (append_callback_event, delete_callback_event): New functions.
3971 (process_callback): New function.
3972 (start_event_loop): Call it.
3973 * remote-utils.c (NOT_SCHEDULED): Define.
3974 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3975 moved out of readchar.
3976 (readchar): Rewrite. Call reschedule before returning.
3977 (reset_readchar): New function.
3978 (remote_close): Call it.
3979 (process_remaining, reschedule): New functions.
3980 * server.h (callback_handler_func): New typedef.
3981 (append_callback_event, delete_callback_event): Declare.
3983 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3985 * proc-service.c (ps_pglobal_lookup): Use
3986 thread_db_look_up_one_symbol.
3987 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3988 parameter. Use it instead of all_symbols_looked_up.
3989 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3991 (all_symbols_looked_up): Don't declare.
3992 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3993 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3995 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3996 Set all_symbols_looked_up here.
3997 (thread_db_look_up_one_symbol): New.
3998 (thread_db_get_tls_address): Adjust.
3999 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4000 thread_db object on the heap, and tentatively set it in the
4002 (thread_db_init): Don't set all_symbols_looked_up here.
4003 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4005 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4007 * linux-low.c (linux_kill, linux_detach): Adjust.
4008 (status_pending_p_callback): Remove redundant statement. Check
4009 for !TARGET_WAITIKIND_IGNORE, instead of
4010 TARGET_WAITKIND_STOPPED.
4011 (handle_tracepoints): Make sure LWP is locked. Adjust.
4012 (linux_wait_for_event_1): Adjust.
4013 (linux_cancel_breakpoints): New.
4014 (unsuspend_one_lwp): New.
4015 (unsuspend_all_lwps): New.
4016 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4017 (send_sigstop_callback): Change return type to int, add new
4018 `except' parameter and handle it.
4019 (suspend_and_send_sigstop_callback): New.
4020 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4021 pass them down. If SUSPEND, also increment the lwp's suspend
4023 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4024 (need_step_over_p): Don't consider suspended LWPs.
4025 (start_step_over): Adjust.
4026 (proceed_one_lwp): Change return type to int, add new `except'
4027 parameter and handle it.
4028 (unsuspend_and_proceed_one_lwp): New.
4029 (proceed_all_lwps): Use find_inferior instead of
4031 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4032 also decrement the suspend count of LWPs. Pass `except' down,
4033 instead of hacking its suspend count.
4034 (linux_pause_all): Add `freeze' parameter. Adjust.
4035 (linux_unpause_all): New.
4036 (linux_target_ops): Install linux_unpause_all.
4037 * server.c (handle_status): Adjust.
4038 * target.h (struct target_ops): New fields `unpause_all' and
4039 `cancel_breakpoints'. Add new parameter to `pause_all'.
4040 (pause_all): Add new `freeze' parameter.
4042 (cancel_breakpoints): New.
4043 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4045 (cmd_qtstart): Pause threads.
4046 (stop_tracing): Pause threads, and cancel breakpoints.
4047 * win32-low.c (win32_target_ops): Adjust.
4049 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4051 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4052 the inferior right away from here...
4053 (linux_wait_1): ... to here, and adjust to check the thread's
4054 last_resume_kind instead of the lwp's step or stop_expected flags.
4056 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4058 * README: Use consistent `GDB' and `GDBserver' spellings.
4060 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4062 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4063 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4064 (linux_detach_one_lwp): Assume the lwp is stopped.
4065 (any_thread_of): Delete.
4066 (linux_detach): Stop all lwps here. Don't blindly delete all
4068 (delete_lwp_callback): New.
4069 (linux_mourn): Delete all lwps of the process that is gone.
4070 (linux_wait_1): Don't delete the last lwp of the process here.
4071 * mem-break.h (mark_breakpoints_out): Declare.
4072 * mem-break.c (mark_breakpoints_out): New.
4073 (free_all_breakpoints): Use it.
4074 * server.c (handle_target_event): If the process is gone, mark
4076 * thread-db.c (struct thread_db) <create_bp>: New field.
4077 (thread_db_enable_reporting): Fix prototype. Store a thread event
4078 breakpoint reference in the thread_db struct.
4079 (thread_db_load_search): Clear the thread_db object.
4080 (try_thread_db_load_1): Ditto.
4081 (switch_to_process): New.
4082 (disable_thread_event_reporting): Use it.
4083 (remove_thread_event_breakpoints): New.
4084 (thread_db_detach, thread_db_mourn): Use it.
4086 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4088 * linux-low.c (linux_enable_event_reporting): New.
4089 (linux_wait_for_event_1, handle_extended_wait): Use it.
4091 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4093 * linux-low.c (linux_kill_one_lwp, linux_kill)
4094 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4095 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4096 SIGSTOP even if the LWP is stopped.
4097 (send_sigstop_callback): New.
4098 (stop_all_lwps): Use send_sigstop_callback instead.
4099 (linux_resume_one_thread): Adjust.
4100 (proceed_one_lwp): Still proceed an LWP that the client has
4101 requested to stop, if we haven't reported it as stopped yet. Make
4102 sure that LWPs the client want stopped, have a pending SIGSTOP.
4104 2010-04-26 Doug Evans <dje@google.com>
4106 * server.c (handle_general_set): Make static.
4108 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4109 Print received char after testing for error/eof instead of before.
4110 (input_interrupt): Tweak comment.
4112 2010-04-23 Doug Evans <dje@google.com>
4114 * server.c (start_inferior): Print inferior argv if --debug.
4116 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4118 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4119 * nto-x86-low.c: Include server.h
4121 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4123 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4124 be consistent with other sources of this directory.
4125 (init_registers_amd64): Correct name of source file of this function
4128 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4130 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4133 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4135 * win32-i386-low.c: Add 64-bit support.
4136 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4137 (init_registers_amd64): Declare.
4138 (mappings): Add 64-bit version of array.
4139 (init_windows_x86): New function.
4140 (the_low_target): Change init_arch field to init_windows_x86.
4142 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4144 * win32-low.c: Adapt to support also 64-bit architecture.
4145 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4146 (get_image_name): Use SIZE_T type for local variable `done'.
4147 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4148 (toolhelp_get_dll_name): Idem.
4149 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4150 Use uintptr_t typecast to avoid warning.
4151 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4152 (handle_exception): Use phex_nz to avoid warning.
4153 (win32_wait): Remove unused local variable `process'.
4155 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4157 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4160 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4162 * configure.ac: Use `ws2_32' library for srv_mingw.
4163 * configure: Regenerate.
4164 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4165 * remote-utils.c: Likewise.
4167 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4169 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4170 if __x86_64__ is defined.
4172 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4174 * configure: Regenerate.
4176 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4178 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4179 * target.h (target_ops): New get_tib_address field.
4180 * win32-low.h (win32_thread_info): Add thread_local_base field.
4181 * win32-low.c (child_add_thread): Add tlb argument.
4182 Set thread_local_base field to TLB.
4183 (get_child_debug_event): Adapt to child_add_thread change.
4184 (win32_get_tib_address): New function.
4185 (win32_target_ops): Set get_tib_address field to
4186 win32_get_tib_address.
4187 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4189 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4191 * linux-low.c (linux_mourn): Also remove the process.
4192 * server.c (handle_target_event): Don't remove the process here.
4193 * nto-low.c (nto_mourn): New.
4194 (nto_target_ops): Install it.
4195 * spu-low.c (spu_mourn): New.
4196 (spu_target_ops): Install it.
4197 * win32-low.c (win32_mourn): New.
4198 (win32_target_ops): Install it.
4200 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4202 * server.h (buffer_xml_printf): Remove redundant `;'.
4204 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4206 * regcache.c (set_register_cache): Invalidate regcaches before
4207 changing the register cache layout.
4208 (regcache_invalidate_one): Allow a NULL regcache.
4209 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4210 regcaches before changing the register cache layout or the target
4213 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4215 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4216 variable warning on Linux/x86-64.
4218 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4220 GDBserver disconnected tracing support.
4222 * linux-low.c (linux_remove_process): Delete.
4223 (add_lwp): Don't set last_resume_kind here.
4224 (linux_kill): Use `mourn'.
4225 (linux_detach): Use `thread_db_detach', and `mourn'.
4227 (linux_attach_lwp_1): Adjust comment.
4228 (linux_attach): last_resume_kind moved the thread_info; adjust.
4229 (status_pending_p_callback): Adjust.
4230 (linux_wait_for_event_1): Adjust.
4231 (count_events_callback, select_singlestep_lwp_callback)
4232 (select_event_lwp_callback, cancel_breakpoints_callback)
4233 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4234 (proceed_one_lwp): Adjust.
4235 (linux_async): Add debug output.
4236 (linux_thread_stopped): New.
4237 (linux_pause_all): New.
4238 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4240 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4241 (thread_db_free): Delete declaration.
4242 (thread_db_detach, thread_db_mourn): Declare.
4243 * thread-db.c (thread_db_init): Use thread_db_mourn.
4244 (thread_db_free): Delete, split in two.
4245 (disable_thread_event_reporting): New.
4246 (thread_db_detach): New.
4247 (thread_db_mourn): New.
4249 * server.h (struct thread_info) <last_resume_kind>: New field.
4250 <attached>: Add comment.
4251 <gdb_detached>: New field.
4252 (handler_func): Change return type to int.
4253 (handle_serial_event, handle_target_event): Ditto.
4254 (gdb_connected): Declare.
4256 (disconnected_tracing): Declare.
4257 (stop_tracing): Declare.
4259 * server.c (handle_query) <qSupported>: Report support for
4260 disconnected tracing.
4261 (queue_stop_reply_callback): Account for running threads.
4262 (gdb_wants_thread_stopped): New.
4263 (gdb_wants_all_threads_stopped): New.
4264 (gdb_reattached_process): New.
4265 (handle_status): Clear the `gdb_detached' flag of all processes.
4266 In all-stop, stop all threads.
4267 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4268 (process_serial_event): If the remote connection breaks, or if an
4269 exit was forced with "monitor exit", force an event loop exit.
4270 Handle disconnected tracing on detach.
4271 (handle_serial_event): Adjust.
4272 (handle_target_event): If GDB isn't connected, forward events back
4273 to the inferior, unless the last process exited, in which case,
4274 exit gdbserver. Adjust interface.
4276 * remote-utils.c (remote_open): Don't block in accept. Instead
4277 register an event loop source on the listen socket file
4278 descriptor. Refactor bits into ...
4279 (listen_desc): ... this new global.
4280 (gdb_connected): ... this new function.
4281 (enable_async_notification): ... this new function.
4282 (handle_accept_event): ... this new function.
4283 (remote_close): Clear remote_desc.
4285 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4287 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4289 (mourn_inferior): Define.
4290 (target_process_qsupported): Avoid the dangling else problem.
4291 (thread_stopped): Define.
4292 (pause_all): Define.
4293 (target_waitstatus_to_string): Declare.
4294 * target.c (target_waitstatus_to_string): New.
4296 * tracepoint.c (tracing): Make extern.
4297 (disconnected_tracing): New.
4298 (stop_tracing): Make extern. Handle tracing stops due to GDB
4300 (cmd_qtdisconnected): New.
4301 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4302 (handle_tracepoint_general_set): Handle QTDisconnected.
4304 * event-loop.c (event_handler_func): Change return type to int.
4305 (process_event): Bail out if the event handler wants the event
4307 (handle_file_event): Ditto.
4308 (start_event_loop): Bail out if the event handler wants the event
4311 * nto-low.c (nto_target_ops): Adjust.
4312 * spu-low.c (spu_wait): Don't remove the process here.
4313 (spu_target_ops): Adjust.
4314 * win32-low.c (win32_wait): Don't remove the process here.
4315 (win32_target_ops): Adjust.
4317 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4319 * regcache.c (realloc_register_cache): Invalidate inferior's
4320 regcache before recreating it.
4322 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4324 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4326 2010-04-09 Stan Shebs <stan@codesourcery.com>
4327 Pedro Alves <pedro@codesourcery.com>
4329 * server.h (LONGEST): New.
4330 (struct thread_info) <while_stepping>: New field.
4331 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4333 (initialize_tracepoint, handle_tracepoint_general_set)
4334 (handle_tracepoint_query, tracepoint_finished_step)
4335 (tracepoint_was_hit, release_while_stepping_state_list):
4336 (current_traceframe): Declare.
4337 * server.c (handle_general_set): Handle tracepoint packets.
4339 (write_memory): New.
4340 (handle_search_memory_1): Use read_memory.
4341 (handle_query): Report support for conditional tracepoints, trace
4342 state variables, and tracepoint sources. Handle tracepoint
4344 (main): Initialize the tracepoints module.
4345 (process_serial_event): Handle traceframe reads/writes.
4347 * linux-low.c (handle_tracepoints): New.
4348 (linux_wait_1): Call it.
4349 (linux_resume_one_lwp): Handle while-stepping.
4350 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4351 (linux_target_ops): Install them.
4352 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4354 * linux-x86-low.c (x86_supports_tracepoints): New.
4355 (the_low_target). Install it.
4357 * mem-break.h (delete_breakpoint): Declare.
4358 * mem-break.c (delete_breakpoint): Make external.
4360 * target.h (struct target_ops): Add `supports_tracepoints',
4361 `read_pc', and `write_pc' fields.
4362 (target_supports_tracepoints): Define.
4363 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4366 * regcache.h (struct regcache) <registers_owned>: New field.
4367 (init_register_cache, regcache_cpy): Declare.
4368 (regcache_read_pc, regcache_write_pc): Declare.
4369 (register_cache_size): Declare.
4370 (supply_regblock): Declare.
4371 * regcache.c (init_register_cache): New.
4372 (new_register_cache): Use it.
4373 (regcache_cpy): New.
4374 (register_cache_size): New.
4375 (supply_regblock): New.
4376 (regcache_read_pc, regcache_write_pc): New.
4378 * tracepoint.c: New.
4380 * Makefile.in (OBS): Add tracepoint.o.
4381 (tracepoint.o): New rule.
4383 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4385 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4387 (i386-mmx.c): Likewise.
4388 (i386-mmx-linux.o): Likewise.
4389 (i386-mmx-linux.c): Likewise.
4391 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4392 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4393 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4394 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4396 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4397 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4398 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4400 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4402 * Makefile.in (clean): Updated.
4404 (i386-avx.c): Likewise.
4405 (i386-avx-linux.o): Likewise.
4406 (i386-avx-linux.c): Likewise.
4407 (amd64-avx.o): Likewise.
4408 (amd64-avx.c): Likewise.
4409 (amd64-avx-linux.o): Likewise.
4410 (amd64-avx-linux.c): Likewise.
4412 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4413 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4414 (srv_amd64_regobj): Add amd64-avx.o.
4415 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4416 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4417 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4418 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4419 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4420 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4421 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4423 * i387-fp.c: Include "i386-xstate.h".
4425 (i387_cache_to_xsave): Likewise.
4426 (i387_xsave_to_cache): Likewise.
4427 (x86_xcr0): Likewise.
4429 * i387-fp.h (i387_cache_to_xsave): Likewise.
4430 (i387_xsave_to_cache): Likewise.
4431 (x86_xcr0): Likewise.
4433 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4434 * linux-crisv32-low.c (target_regsets): Likewise.
4435 * linux-m68k-low.c (target_regsets): Likewise.
4436 * linux-mips-low.c (target_regsets): Likewise.
4437 * linux-ppc-low.c (target_regsets): Likewise.
4438 * linux-s390-low.c (target_regsets): Likewise.
4439 * linux-sh-low.c (target_regsets): Likewise.
4440 * linux-sparc-low.c (target_regsets): Likewise.
4441 * linux-xtensa-low.c (target_regsets): Likewise.
4443 * linux-low.c: Include <sys/uio.h>.
4444 (regsets_fetch_inferior_registers): Support nt_type.
4445 (regsets_store_inferior_registers): Likewise.
4446 (linux_process_qsupported): New.
4447 (linux_target_ops): Add linux_process_qsupported.
4449 * linux-low.h (regset_info): Add nt_type.
4450 (linux_target_ops): Add process_qsupported.
4452 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4454 (init_registers_i386_avx_linux): New.
4455 (init_registers_amd64_avx_linux): Likewise.
4456 (xmltarget_i386_linux_no_xml): Likewise.
4457 (xmltarget_amd64_linux_no_xml): Likewise.
4458 (PTRACE_GETREGSET): Likewise.
4459 (PTRACE_SETREGSET): Likewise.
4460 (x86_fill_xstateregset): Likewise.
4461 (x86_store_xstateregset): Likewise.
4462 (use_xml): Likewise.
4463 (x86_linux_update_xmltarget): Likewise.
4464 (x86_linux_process_qsupported): Likewise.
4465 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4466 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4467 init_registers_i386_linux here. Call
4468 x86_linux_update_xmltarget.
4469 (the_low_target): Add x86_linux_process_qsupported.
4471 * server.c (handle_query): Call target_process_qsupported.
4473 * target.h (target_ops): Add process_qsupported.
4474 (target_process_qsupported): New.
4476 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4478 * inferiors.c (add_thread): Set last_status kind to
4479 TARGET_WAITKIND_IGNORE.
4480 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4481 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4482 (linux_wait_1): Move `thread' local definition to block that uses
4483 it. Don't NULL initialize `event_child'.
4484 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4485 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4486 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4488 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4490 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4491 an extended waitstatus, or by a watchpoint.
4492 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4493 thread was stepping or has been stopped by a watchpoint.
4495 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4497 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4498 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4499 of another, then delete the previous, and validate all
4501 (validate_inserted_breakpoint): New.
4502 (delete_disabled_breakpoints): New.
4503 (validate_breakpoints): New.
4504 (check_mem_read): Validate breakpoints before trusting their
4505 shadow. Delete disabled breakpoints.
4506 (check_mem_write): Validate breakpoints before trusting they
4507 should be inserted. Delete disabled breakpoints.
4508 * mem-break.h (validate_breakpoints):
4509 * server.c (handle_query): Validate breakpoints when we see a
4512 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4514 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4515 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4516 if we could tell there's a GDB breakpoint at stop_pc.
4517 (need_step_over_p): Don't do a step over if we find a GDB
4518 breakpoint at the resume PC.
4520 * mem-break.c (struct raw_breakpoint): New.
4521 (enum bkpt_type): New type `gdb_breakpoint'.
4522 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4523 fields. New field `raw'.
4524 (find_raw_breakpoint_at): New.
4525 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4527 (set_breakpoint_at): Adjust.
4528 (delete_raw_breakpoint): New.
4529 (release_breakpoint): New.
4530 (delete_breakpoint): Rename to...
4531 (delete_breakpoint_1): ... this. Add proc parameter. Use
4532 release_breakpoint. Return ENOENT.
4533 (delete_breakpoint): Reimplement.
4534 (find_breakpoint_at): Delete.
4535 (find_gdb_breakpoint_at): New.
4536 (delete_breakpoint_at): Delete.
4537 (set_gdb_breakpoint_at): New.
4538 (delete_gdb_breakpoint_at): New.
4539 (gdb_breakpoint_here): New.
4540 (set_reinsert_breakpoint): Use release_breakpoint.
4541 (uninsert_breakpoint): Rename to ...
4542 (uninsert_raw_breakpoint): ... this.
4543 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4544 (reinsert_raw_breakpoint): Change parameter type to
4546 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4548 (check_breakpoints): Adjust. Use release_breakpoint.
4549 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4550 (breakpoint_inserted_here): Ditto.
4551 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4552 Don't trust the breakpoint's shadow if it is not inserted.
4553 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4554 (delete_all_breakpoints): Adjust.
4555 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4556 use delete_breakpoint_1.
4558 * mem-break.h (breakpoints_supported): Delete declaration.
4559 (set_gdb_breakpoint_at): Declare.
4560 (gdb_breakpoint_here): Declare.
4561 (delete_breakpoint_at): Delete.
4562 (delete_gdb_breakpoint_at): Declare.
4564 * server.h (struct raw_breakpoint): Forward declare.
4565 (struct process_info): New field `raw_breakpoints'.
4567 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4570 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4572 * linux-low.c (status_pending_p_callback): Fix comment.
4573 (linux_wait_for_event_1): Move most of the internal breakpoint
4574 handling from here...
4575 (linux_wait_1): ... to here.
4576 (count_events_callback): New.
4577 (select_singlestep_lwp_callback): New.
4578 (select_event_lwp_callback): New.
4579 (cancel_breakpoints_callback): New.
4580 (select_event_lwp): New.
4581 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4582 priority to all LWPs that have had events that should be reported
4583 to the client. Cancel breakpoints when about to reporting the
4584 event to the client, not while stopping lwps. No longer cancel
4585 finished single-steps here.
4586 (cancel_finished_single_step): Delete.
4587 (cancel_finished_single_steps): Delete.
4589 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4591 * mem-break.c (enum bkpt_type): New.
4592 (struct breakpoint): New field `type'.
4593 (set_breakpoint_at): Change return type to struct breakpoint
4594 pointer. Set type to `other_breakpoint' by default.
4595 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4596 in the breakpoint list.
4597 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4598 (reinsert_breakpoint): Rename to ...
4599 (reinsert_raw_breakpoint): ... this.
4600 (reinsert_breakpoints_at): Adjust.
4601 * mem-break.h (struct breakpoint): Declare.
4602 (set_breakpoint_at): Change return type to struct breakpoint
4605 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4607 * server.c (handle_query): Assign, not compare.
4609 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4611 Teach linux gdbserver to step-over-breakpoints.
4613 * linux-low.c (can_hardware_single_step): New.
4614 (supports_breakpoints): New.
4615 (handle_extended_wait): If stopping threads, read the stop pc of
4618 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4619 low target doesn't support retrieving the PC.
4620 (add_lwp): Set last_resume_kind to resume_continue.
4621 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4622 (linux_attach): Don't clear stop_expected. Set the lwp's
4623 last_resume_kind to resume_stop.
4624 (linux_detach_one_lwp): Don't check for removed breakpoints.
4625 (check_removed_breakpoint): Delete.
4626 (status_pending_p): Rename to ...
4627 (status_pending_p_callback): ... this. Don't check for removed
4628 breakpoints. Don't consider threads that are stopped from GDB's
4630 (linux_wait_for_lwp): Always read the stop_pc here.
4631 (cancel_breakpoint): New.
4632 (step_over_bkpt): New global.
4633 (linux_wait_for_event_1): Implement stepping over breakpoints.
4634 (gdb_wants_lwp_stopped): New.
4635 (gdb_wants_all_stopped): New.
4636 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4637 single-step traps here. Store the thread's last reported target
4639 (send_sigstop): Don't clear stop_expected. Always set it,
4641 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4642 (cancel_finished_single_step): New.
4643 (cancel_finished_single_steps): New.
4644 (wait_for_sigstop): Don't cancel finished single-step traps here.
4645 (linux_resume_one_lwp): Don't check for removed breakpoints.
4646 Don't set `step' on non-hardware step archs.
4647 (linux_set_resume_request): Ignore resume_stop requests if already
4648 stopping or stopped. Set the lwp's last_resume_kind.
4649 (resume_status_pending_p): Don't check for removed breakpoints.
4650 (need_step_over_p): New.
4651 (start_step_over): New.
4652 (finish_step_over): New.
4653 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4654 requests. Clear the thread's last reported target waitstatus.
4655 Don't use the `suspended' flag. Don't consider pending breakpoints.
4656 (linux_resume): Start a step-over if necessary.
4657 (proceed_one_lwp): New.
4658 (proceed_all_lwps): New.
4659 (unstop_all_lwps): New.
4660 * linux-low.h (struct lwp_info): Rewrite comment for the
4661 `suspended' flag. Add the `stop_pc' field. Delete the
4662 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4663 Add `'last_resume_kind' and `need_step_over' fields.
4664 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4665 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4666 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4667 (set_raw_breakpoint_at): New.
4668 (set_breakpoint_at): Rewrite to use it.
4669 (reinsert_breakpoint_handler): Delete.
4670 (set_reinsert_breakpoint): New.
4671 (reinsert_breakpoint_by_bp): Delete.
4672 (delete_reinsert_breakpoints): New.
4673 (uninsert_breakpoint): Rewrite.
4674 (uninsert_breakpoints_at): New.
4675 (reinsert_breakpoint): Rewrite.
4676 (reinsert_breakpoints_at): New.
4677 (check_breakpoints): Rewrite.
4678 (breakpoint_here): New.
4679 (breakpoint_inserted_here): New.
4680 (check_mem_read): Adjust.
4681 * mem-break.h (breakpoints_supported, breakpoint_here)
4682 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4683 (reinsert_breakpoint_by_bp): Delete declaration.
4684 (delete_reinsert_breakpoints): Declare.
4685 (reinsert_breakpoint): Delete declaration.
4686 (reinsert_breakpoints_at): Declare.
4687 (uninsert_breakpoint): Delete declaration.
4688 (uninsert_breakpoints_at): Declare.
4689 (check_breakpoints): Adjust prototype.
4690 * server.h: Adjust include order.
4691 (struct thread_info): Declare here. Add a `last_status' field.
4693 2010-03-23 Michael Snyder <msnyder@vmware.com>
4695 * server.c (crc32): New function.
4696 (handle_query): Add handling for 'qCRC:' request.
4698 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4700 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4701 lwp had been stopped by a watchpoint.
4703 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4705 * server.h (internal_error): Declare.
4706 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4707 * utils.c (internal_error): New function.
4709 2010-03-15 Andreas Schwab <schwab@redhat.com>
4711 * configure.srv: Fix typo setting srv_regobj.
4713 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4715 * linux-low.c (fetch_register): Avoid passing a non string literal
4717 (usr_store_inferior_registers): Ditto.
4719 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4721 * linux-low.c (linux_write_memory): Bail out early if peeking
4724 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4726 * linux-low.h (struct lwp_info): New fields
4727 `stopped_by_watchpoint' and `stopped_data_address'.
4728 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4729 here, and cache them in the lwp object.
4730 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4732 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4734 (linux_stopped_by_watchpoint): Rewrite.
4735 (linux_stopped_data_address): Rewrite.
4737 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4739 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4740 switching the current inferior, not before.
4742 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4744 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4745 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4746 i386-linux.c and amd64-linux.c.
4747 (reg-i386.o): Removed.
4748 (reg-i386.c): Likewise.
4749 (reg-i386-linux.o): Likewise.
4750 (reg-i386-linux.c): Likewise.
4751 (reg-x86-64.o): Likewise.
4752 (reg-x86-64.c): Likewise.
4753 (reg-x86-64-linux.o): Likewise.
4754 (reg-x86-64-linux.c): Likewise.
4757 (i386-linux.o): Likewise.
4758 (i386-linux.c): Likewise.
4759 (amd64.o): Likewise.
4760 (amd64.c): Likewise.
4761 (amd64-linux.o): Likewise.
4762 (amd64-linux.c): Likewise.
4764 * configure.srv (srv_i386_regobj): New.
4765 (srv_i386_linux_regobj): Likewise.
4766 (srv_amd64_regobj): Likewise.
4767 (srv_amd64_linux_regobj): Likewise.
4768 (srv_i386_32bit_xmlfiles): Likewise.
4769 (srv_i386_64bit_xmlfiles): Likewise.
4770 (srv_i386_xmlfiles): Likewise.
4771 (srv_amd64_xmlfiles): Likewise.
4772 (srv_i386_linux_xmlfiles): Likewise.
4773 (srv_amd64_linux_xmlfiles): Likewise.
4774 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4775 srv_xmlfiles to $srv_i386_xmlfiles.
4776 (i[34567]86-*-mingw32ce*): Likewise.
4777 (i[34567]86-*-mingw*): Likewise.
4778 (i[34567]86-*-nto*): Likewise.
4779 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4780 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4781 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4782 (x86_64-*-linux*): Likewise.
4784 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4785 (init_registers_amd64_linux): New.
4786 (x86_arch_setup): Replace init_registers_x86_64_linux with
4787 init_registers_amd64_linux.
4789 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4791 * configure.ac: Check for libdl. If it is not available link against
4792 static libthread_db.
4793 * configure: Regenerate.
4795 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4799 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4800 handing a read watchpoint.
4801 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4803 2010-02-12 Doug Evans <dje@google.com>
4805 * linux-low.c (linux_supports_tracefork_flag): Document.
4806 (linux_look_up_symbols): Add comment.
4808 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4810 * regcache.c (supply_register): Clear regcache if buf is NULL.
4812 2010-02-02 Nicolas Roche <roche@sourceware.org>
4813 Joel Brobecker <brobecker@adacore.com>
4815 * inferiors.c (find_inferior): Add function documentation.
4816 (unloaded_dll): Handle the case where the unloaded dll has not
4817 been previously registered in the dll list.
4819 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4821 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4822 (thumb2_breakpoint): New.
4823 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4825 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4827 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4828 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4831 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4833 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4835 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4837 * linux-s390-low.c (s390_collect_ptrace_register)
4838 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4840 2010-01-21 Doug Evans <dje@google.com>
4842 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4843 (PTRACE_ARG4_TYPE): New macro.
4844 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4845 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4846 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4847 (usr_store_inferior_registers): Ditto.
4848 (linux_read_memory, linux_write_memory): Ditto.
4849 (linux_test_for_tracefork): Ditto.
4851 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4852 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4854 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4856 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4859 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4861 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4862 prototype to take a regcache. Adjust.
4864 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4866 * regcache.h (struct thread_info): Forward declare.
4867 (struct regcache): New.
4868 (new_register_cache): Adjust prototype.
4869 (get_thread_regcache): Declare.
4870 (free_register_cache): Adjust prototype.
4871 (registers_to_string, registers_from_string): Ditto.
4872 (supply_register, supply_register_by_name, collect_register)
4873 (collect_register_as_string, collect_register_by_name): Ditto.
4874 * regcache.c (struct inferior_regcache_data): Delete.
4875 (get_regcache): Rename to ...
4876 (get_thread_regcache): ... this. Adjust. Switch inferior before
4878 (regcache_invalidate_one): Adjust.
4879 (regcache_invalidate): Fix prototype.
4880 (new_register_cache): Return the new register cache.
4881 (free_register_cache): Change prototype.
4882 (realloc_register_cache): Adjust.
4883 (registers_to_string): Change prototype to take a regcache. Adjust.
4884 (registers_from_string): Ditto.
4885 (register_data): Ditto.
4886 (supply_register): Ditto.
4887 (supply_register_by_name): Ditto.
4888 (collect_register): Ditto.
4889 (collect_register_as_string): Ditto.
4890 (collect_register_by_name): Ditto.
4891 * server.c (process_serial_event): Adjust.
4892 * linux-low.h (regset_fill_func, regset_store_func): Change
4894 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4896 * linux-low.c (get_stop_pc): Adjust.
4897 (check_removed_breakpoint): Adjust.
4898 (linux_wait_for_event): Adjust.
4899 (linux_resume_one_lwp): Adjust.
4900 (fetch_register): Add regcache parameter. Adjust.
4901 (usr_store_inferior_registers): Ditto.
4902 (regsets_fetch_inferior_registers): Ditto.
4903 (regsets_store_inferior_registers): Ditto.
4904 (linux_fetch_registers, linux_store_registers): Ditto.
4905 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4907 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4909 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4910 prototype to take a regcache.
4911 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4912 * remote-utils.c (convert_ascii_to_int, outreg)
4913 (prepare_resume_reply): Change prototype to take a regcache.
4915 * target.h (struct target_ops) <fetch_registers, store_registers>:
4916 Change prototype to take a regcache.
4917 (fetch_inferior_registers, store_inferior_registers): Change
4918 prototype to take a regcache. Adjust.
4919 * proc-service.c (ps_lgetregs): Adjust.
4920 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4921 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4922 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4923 take a regcache. Adjust.
4924 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4925 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4926 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4927 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4928 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4929 (cris_cannot_fetch_register):
4930 (cris_breakpoint_at): Change prototype to take a regcache.
4932 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4933 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4934 to take a regcache. Adjust.
4935 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4937 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4938 take a regcache. Adjust.
4939 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4940 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4941 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4942 * linux-mips-low.c (mips_get_pc):
4943 (mips_set_pc): Change prototype to take a regcache. Adjust.
4944 (mips_reinsert_addr): Adjust.
4945 (mips_collect_register): Change prototype to take a regcache.
4947 (mips_supply_register):
4948 (mips_collect_register_32bit, mips_supply_register_32bit)
4949 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4950 (mips_store_fpregset): Ditto.
4951 * linux-ppc-low.c (ppc_supply_ptrace_register)
4952 (ppc_supply_ptrace_register): Ditto.
4953 (parse_spufs_run): Adjust.
4954 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4955 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4956 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4957 take a regcache. Adjust.
4958 * linux-s390-low.c (s390_collect_ptrace_register)
4959 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4960 (s390_set_pc): Change prototype to take a regcache. Adjust.
4961 (s390_arch_setup): Adjust.
4962 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4963 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4964 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4965 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4966 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4968 (sparc_breakpoint_at): Adjust.
4969 * linux-xtensa-low.c (xtensa_fill_gregset):
4970 (xtensa_store_gregset):
4971 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4972 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4973 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4974 prototype to take a regcache. Adjust.
4975 * win32-arm-low.c (arm_fetch_inferior_register)
4976 (arm_store_inferior_register): Change prototype to take a
4978 * win32-i386-low.c (i386_fetch_inferior_register)
4979 (i386_store_inferior_register): Change prototype to take a
4981 * win32-low.c (child_fetch_inferior_registers)
4982 (child_store_inferior_registers): Change prototype to take a
4984 (win32_wait): Adjust.
4985 (win32_fetch_inferior_registers): Change prototype to take a
4987 (win32_store_inferior_registers): Adjust.
4988 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4989 store_inferior_register>: Change prototype to take a regcache.
4991 2010-01-20 Doug Evans <dje@google.com>
4993 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4995 (linux_wait_for_event1, linux_init_signals): Ditto.
4996 (W_STOPCODE): Provide definition if missing.
4998 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5000 * linux-low.c (linux_core_of_thread): New.
5001 (compare_ints, show_process, list_threads): New.
5002 (linux_qxfer_osdata): Report threads and cores.
5003 (linux_target_op): Register linux_core_of_thread.
5004 * remote-utils.c (prepare_resume_reply): Report the core.
5005 (buffer_xml_printf): Support %d specifier.
5006 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5008 (handle_query): Handle qXfer:threads. Announce availability
5010 * target.h (struct target_ops): New field core_of_thread.
5012 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5014 * Makefile.in (clean): Remove new generated files.
5015 (reg-s390.o, reg-s390.c): Remove rules.
5016 (reg-s390x.o, reg-s390x.c): Likewise.
5017 (s390-linux32.o, s390-linux32.c): Add rules.
5018 (s390-linux64.o, s390-linux64.c): Likewise.
5019 (s390x-linux64.o, s390x-linux64.c): Likewise.
5020 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5021 * linux-s390-low.c: Include <elf.h>.
5022 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5023 (init_registers_s390): Remove prototype.
5024 (init_registers_s390x): Likewise.
5025 (init_registers_s390_linux32): Add prototype.
5026 (init_registers_s390_linux64): Likewise.
5027 (init_registers_s390x_linux64): Likewise.
5028 (s390_num_regs_3264): New define.
5029 (s390_regmap_3264): New global variable.
5030 (s390_cannot_fetch_register): Remove obsolete check.
5031 (s390_cannot_store_register): Likewise.
5032 (s390_collect_ptrace_register): Handle upper/lower register halves.
5033 (s390_supply_ptrace_register): Likewise.
5034 (s390_fill_gregset): Update to register number changes.
5035 (s390_get_hwcap): New routine.
5036 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5037 Install appropriate regmap and register set.
5039 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5041 * server.c (gdbserver_version): Update copyright year to 2010.
5042 * gdbreplay.c (gdbreplay_version): Likewise.
5044 2009-12-28 Doug Evans <dje@google.com>
5046 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5047 elf/external.h. Include <elf.h> instead but only if necessary.
5049 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5051 * linux-low.c (linux_remove_process): Remove `detaching'
5052 parameter. Don't release/detach from thread_db here.
5053 (linux_kill): Release/detach from thread_db here, ...
5054 (linux_detach): ... and here, before actually detaching.
5055 (linux_wait_1): ... and here, when a process exits.
5056 * thread-db.c (any_thread_of): New.
5057 (thread_db_free): Switch the current inferior to a thread of the
5060 2009-12-21 Doug Evans <dje@google.com>
5062 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5064 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5065 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5066 warning ifndef __NR_tkill. Move setting of errno there too.
5067 Delete unnecessary resetting of errno after syscall.
5068 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5070 * configure.ac: Check for dladdr.
5071 * config.in: Regenerate.
5072 * configure: Regenerate.
5073 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5074 (try_thread_db_load): Update.
5076 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5078 2009-12-18 Doug Evans <dje@google.com>
5080 * event-loop.c: Include unistd.h if it exists.
5082 * linux-low.c (my_waitpid): Move definition away from being in
5083 between linux_tracefork_child/linux_test_for_tracefork.
5085 * gdb_proc_service.h (psaddr_t): Fix type.
5086 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5087 signature to match glibc.
5089 2009-12-16 Doug Evans <dje@google.com>
5091 * linux-low.c (linux_read_memory): Fix argument to read.
5093 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5095 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5096 events, don't leave current_inferior pointing at null.
5098 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5100 * win32-low.c (LOG): Delete.
5101 (OUTMSG): Output to stderr.
5102 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5103 on compile time LOG macro.
5104 (win32_wait): Fix debug output.
5106 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5108 * win32-low.c (win32_add_one_solib): If the dll name is
5109 "ntdll.dll", prepend the system directory to the dll path.
5111 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5113 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5115 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5116 Vladimir Prus <vladimir@codesourcery.com>
5118 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5119 * configure.ac: Check for __mcoldfire__ and set
5120 gdb_cv_m68k_is_coldfire.
5121 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5122 reg-cf.o and reg-m68k.o.
5123 * configure: Regenerated.
5125 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5127 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5128 Pass it to thread_db_free.
5129 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5130 proper `detaching' argument to linux_remove_process.
5131 * linux-low.h (thread_db_free): Add `detaching' parameter.
5132 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5134 (thread_db_free): Add `detaching' parameter. Only
5135 call td_ta_clear_event if detaching from process.
5137 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5139 * thread-db.c (thread_db_free): Fix typo.
5141 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5144 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5146 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5148 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5149 with an i686 compiler.
5150 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5152 * configure: Rebuilt.
5154 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5158 * server.c (handle_search_memory_1): Correct read_addr initialization
5159 in loop for searching subsequent chunks.
5161 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5163 * configure.ac: New --with-libthread-db option.
5164 * thread-db.c: Allow direct dependence on libthread_db.
5165 (thread_db_free): Adjust.
5166 * config.in: Regenerate.
5167 * configure: Likewise.
5169 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5172 * thread-db.c (attach_thread): New function.
5173 (maybe_attach_thread): Return success/failure.
5174 (find_new_threads_callback): Adjust.
5175 (thread_db_find_new_threads): Loop until no new threads.
5177 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5179 * proc-service.c (ps_lgetregs): Formatting.
5181 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5183 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5184 * configure.ac: Adjust.
5185 * linux-low.h (struct process_info_private): Move members to struct
5187 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5188 * linux-low.c (linux_remove_process): Adjust.
5189 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5190 * server.c (handle_query): Move code ...
5191 (handle_monitor_command): ... here. New function.
5192 * target.h (struct target_ops): New member.
5193 * thread-db.c (struct thread_db): New.
5194 (libthread_db_search_path): New variable.
5195 (thread_db_create_event, thread_db_enable_reporting)
5196 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5197 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5198 (try_thread_db_load_1, dladdr_to_soname): New functions.
5199 (try_thread_db_load, thread_db_load_search): New functions.
5200 (thread_db_init): Search for libthread_db.
5201 (thread_db_free): New function.
5202 (thread_db_handle_monitor_command): Likewise.
5203 * config.in: Regenerate.
5204 * configure: Regenerate.
5206 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5208 * spu-low.c (spu_kill): Wait for inferior to terminate.
5209 Call clear_inferiors.
5210 (spu_detach): Call clear_inferiors.
5212 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5214 * aclocal.m4: Regenerate.
5215 * config.in: Likewise.
5216 * configure: Likewise.
5218 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5220 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5221 (parse_spufs_run): New function.
5222 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5223 (ppc_breakpoint_at): Handle SPU breakpoints.
5225 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5227 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5228 (SPUFS_MAGIC): Define.
5229 (spu_enumerate_spu_ids): New function.
5230 (linux_qxfer_spu): New function.
5231 (linux_target_ops): Install linux_qxfer_spu.
5233 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5235 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5236 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5237 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5238 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5239 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5240 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5241 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5242 (init_registers_powerpc_cell32l): Add prototype.
5243 (init_registers_powerpc_cell64l): Likewise.
5244 (ppc_arch_setup): Detect Cell/B.E. architecture.
5246 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5248 * Makefile.in (datarootdir): New variable.
5250 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5252 * linux-low.c (linux_write_memory): Update debugging output.
5253 * Makefile.in (clean): Add new descriptions.
5254 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5255 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5256 * configure.srv: Add new files for arm*-*-linux*.
5257 * linux-arm-low.c: Add new declarations.
5258 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5259 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5260 (HWCAP_VFPv3D16): New.
5261 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5262 instead of __IWMMXT__.
5263 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5264 (arm_arch_setup): New.
5265 (target_regsets): Remove #ifdef. Add VFP regset.
5266 (the_low_target): Use arm_arch_setup.
5268 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5270 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5271 the main thread again.
5273 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5275 Adding Neutrino gdbserver.
5276 * configure: Regenerated.
5277 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5278 * configure.srv (i[34567]86-*-nto*): New target.
5279 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5280 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5281 (nto_comctrl) [__QNX__]: New function.
5282 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5284 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5286 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5289 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5290 Pedro Alves <pedro@codesourcery.com>
5292 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5293 don't support CONTEXT_EXTENDED_REGISTERS.
5294 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5295 (the_low_target): Install them.
5296 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5297 failing with ERROR_PIPE_NOT_CONNECTED.
5299 2009-06-30 Doug Evans <dje@google.com>
5300 Pierre Muller <muller@ics.u-strasbg.fr>
5302 Add h/w watchpoint support to x86-linux, win32-i386.
5303 * Makefile.in (SFILES): Add i386-low.c
5304 (i386_low_h): Define.
5305 (i386-low.o): Add dependencies.
5306 (linux-x86-low.o): Add i386-low.h dependency.
5307 (win32-i386-low.o): Ditto.
5308 * i386-low.c: New file.
5309 * i386-low.h: New file.
5310 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5311 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5312 * linux-low.c (linux_add_process): Initialize arch_private.
5313 (linux_remove_process): Free arch_private.
5314 (add_lwp): Initialize arch_private.
5315 (delete_lwp): Free arch_private.
5316 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5318 * linux-low.h (process_info_private): New member arch_private.
5319 (lwp_info): New member arch_private.
5320 (linux_target_ops): New members new_process, new_thread,
5322 (ptid_of): New macro.
5323 * linux-x86-low.c: Include stddef.h, i386-low.h.
5324 (arch_process_info): New struct.
5325 (arch_lwp_info): New struct.
5326 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5327 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5328 (i386_dr_low_get_status): New function.
5329 (x86_insert_point, x86_remove_point): New functions.
5330 (x86_stopped_by_watchpoint): New function.
5331 (x86_stopped_data_address): New function.
5332 (x86_linux_new_process, x86_linux_new_thread): New functions.
5333 (x86_linux_prepare_to_resume): New function.
5334 (the_low_target): Add entries for insert_point, remove_point,
5335 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5337 * server.c (debug_hw_points): New global.
5338 (monitor_show_help): Document set debug-hw-points.
5339 (handle_query): Process "set debug-hw-points".
5340 * server.h (debug_hw_points): Declare.
5341 (paddress): Declare.
5342 * utils.c (NUMCELLS, CELLSIZE): New macros.
5343 (get_sell, xsnprintf, paddress): New functions.
5344 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5345 remove_point, stopped_by_watchpoint, stopped_data_address.
5346 * win32-i386-low.c: Include i386-low.h.
5347 (debug_reg_state): Replaces dr.
5348 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5349 (i386_dr_low_get_status): New function.
5350 (i386_insert_point, i386_remove_point): New functions.
5351 (i386_stopped_by_watchpoint): New function.
5352 (i386_stopped_data_address): New function.
5353 (i386_initial_stuff): Update.
5354 (get_thread_context,set_thread_context,i386_thread_added): Update.
5355 (the_low_target): Add entries for insert_point,
5356 remove_point, stopped_by_watchpoint, stopped_data_address.
5357 * win32-low.c (win32_insert_watchpoint): New function.
5358 (win32_remove_watchpoint): New function.
5359 (win32_stopped_by_watchpoint): New function.
5360 (win32_stopped_data_address): New function.
5361 (win32_target_ops): Add entries for insert_watchpoint,
5362 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5363 * win32-low.h (win32_target_ops): New members insert_point,
5364 remove_point, stopped_by_watchpoint, stopped_data_address.
5366 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5368 * server.c (process_serial_event): Re-return unsupported, not
5369 error, if the type isn't recognized. Re-allow supporting only
5370 insert or remove packets. Also call require_running for
5371 breakpoints. Add missing break statement to default case. Tidy.
5372 * target.h (struct target_ops): Rename insert_watchpoint to
5373 insert_point, and remove_watchpoint to remove_point.
5375 * linux-low.h (struct linux_target_ops): Likewise.
5376 * linux-low.c (linux_insert_watchpoint): Rename to ...
5377 (linux_insert_point): ... this. Adjust.
5378 (linux_remove_watchpoint): Rename to ...
5379 (linux_remove_point): ... this. Adjust.
5380 (linux_target_ops): Adjust.
5381 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5382 (cris_insert_point): ... this.
5383 (cris_remove_watchpoint): Rename to ...
5384 (cris_remove_point): ... this.
5385 (the_low_target): Adjust.
5387 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5389 * server.c (handle_v_kill): Pass signal_pid to
5390 kill_inferior if multi_process is zero.
5392 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5394 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5395 * target.h (target_ops): Comment for *_watchpoint to make it clear
5396 the functions can get types '0' and '1'.
5398 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5400 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5401 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5402 * regcache.c (get_regcache): Likewise.
5403 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5404 * win32-low.c (child_fetch_inferior_registers): Remove check for
5407 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5408 Pedro Alves <pedro@codesourcery.com>
5410 * target.h (struct target_ops) <supports_multi_process>: New
5412 (target_supports_multi_process): New.
5413 * server.c (handle_query): Even if GDB reports support, only
5414 enable multi-process if the target also supports it. Report
5415 multi-process support only if the target backend supports it.
5416 * linux-low.c (linux_supports_multi_process): New function.
5417 (linux_target_ops): Install it as target_supports_multi_process
5420 2009-05-24 Doug Evans <dje@google.com>
5422 Global renaming of find_thread_pid to find_thread_ptid.
5423 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5424 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5425 All callers updated.
5427 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5428 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5431 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5432 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5433 (linux_resume_one_lwp): Ditto.
5435 2009-05-23 Doug Evans <dje@google.com>
5437 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5438 from struct inferior_list_entry * to struct lwp_info *.
5439 All callers updated.
5441 2009-05-13 Doug Evans <dje@google.com>
5443 * linux-x86-low.c: Don't include assert.h.
5444 (x86_siginfo_fixup): Use fatal, not assert.
5445 (x86_arch_setup): Fix comment.
5447 2009-05-12 Doug Evans <dje@google.com>
5449 Biarch support for i386/amd64 gdbserver.
5450 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5451 Add linux-x86-low.c.
5452 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5453 (linux-x86-low.o): Add.
5454 * linux-x86-64-low.c: Delete.
5455 * linux-i386-low.c: Delete.
5456 * linux-x86-low.c: New file.
5457 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5459 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5461 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5462 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5463 (linux_child_pid_to_exec_file): New function.
5464 (elf_64_header_p, elf_64_file_p): New functions.
5465 (siginfo_fixup): New function.
5466 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5467 give target a chance to convert layout.
5468 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5469 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5471 2009-05-07 Doug Evans <dje@google.com>
5473 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5474 (regsets_store_inferior_registers): Ditto.
5476 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5480 * linux-low.c (must_set_ptrace_flags): Delete.
5481 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5483 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5484 `lwp->must_set_ptrace_flags' instead.
5485 (linux_wait_for_event_1): Set ptrace options here.
5486 (linux_wait_1): ... not here.
5488 2009-04-30 Doug Evans <dje@google.com>
5490 * inferiors.c (started_inferior_callback): New function.
5491 (attached_inferior_callback): New function.
5492 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5493 * server.c (print_started_pid, print_attached_pid): New functions.
5494 (detach_or_kill_for_exit): New function.
5495 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5496 * server.h (have_started_inferiors_p): Declare.
5497 (have_attached_inferiors_p): Declare.
5499 * inferiors.c (remove_process): Fix memory leak, free process.
5500 * linux-low.c (linux_remove_process): New function.
5501 (linux_kill): Call it instead of remove_process.
5502 (linux_detach, linux_wait_1): Ditto.
5504 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5506 * configure.srv: Add x86 Windows CE target.
5508 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5510 * inferiors.c (get_thread_process): Make global.
5511 * server.h (get_thread_process): Add prototype.
5512 * thread-db.c (find_one_thread): Use get_thread_process
5513 instead of current_process.
5514 (thread_db_get_tls_address): Do not crash if called when
5515 thread layer is not yet initialized.
5517 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5519 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5520 * spu-low.c (current_tid): Rename to ...
5521 (current_ptid): ... this.
5522 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5523 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5524 ptid_get_lwp (current_ptid) instead of current_tid.
5525 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5526 instead of current_tid. Use find_process_pid to verify pid
5527 argument is valid. Pass proper argument to remove_process.
5528 (spu_thread_alive): Compare current_ptid instead of current_tid.
5529 (spu_resume): Likewise.
5531 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5533 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5536 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5538 Implement the multiprocess extensions, and add linux multiprocess
5541 * server.h (ULONGEST): Declare.
5542 (struct ptid, ptid_t): New.
5543 (minus_one_ptid, null_ptid): Declare.
5544 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5545 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5546 (struct inferior_list_entry): Change `id' type from unsigned from
5548 (struct sym_cache, struct breakpoint, struct
5549 process_info_private): Forward declare.
5550 (struct process_info): Declare.
5551 (current_process): Declare.
5552 (all_processes): Declare.
5553 (initialize_inferiors): Declare.
5554 (add_thread): Adjust to use ptid_t.
5555 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5556 (add_process, remove_process, find_thread_pid): Declare.
5557 (find_inferior_id): Adjust to use ptid_t.
5558 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5559 (multi_process): Declare.
5560 (push_event): Adjust to use ptid_t.
5561 (read_ptid, write_ptid): Declare.
5562 (prepare_resume_reply): Adjust to use ptid_t.
5563 (clear_symbol_cache): Declare.
5564 * inferiors.c (all_processes): New.
5565 (null_ptid, minus_one_ptid): New.
5566 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5567 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5568 (add_thread): Change unsigned long to ptid. Remove gdb_id
5570 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5571 (gdb_id_to_thread): Rename to ...
5572 (find_thread_pid): ... this. Change unsigned long to ptid.
5573 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5574 (loaded_dll, pull_pid_from_list): Adjust.
5575 (add_process, remove_process, find_process_pid)
5576 (get_thread_process, current_process, initialize_inferiors): New.
5577 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5578 (struct target_waitstatus) <related_pid>: Ditto.
5579 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5581 (struct target_ops) <join>: Add `pid' argument.
5582 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5583 (struct target_ops) <wait>: Add `ptid' field. Change return type
5585 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5586 (mywait): Add `ptid' argument. Change return type to ptid_t.
5587 (target_pid_to_str): Declare.
5588 * target.c (set_desired_inferior): Adjust to use ptids.
5589 (mywait): Add new `ptid' argument. Adjust.
5590 (target_pid_to_str): New.
5591 * mem-break.h (free_all_breakpoints): Declare.
5592 * mem-break.c (breakpoints): Delelete.
5593 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5594 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5595 to use per-process breakpoint list.
5596 (free_all_breakpoints): New.
5597 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5598 (symbol_cache, all_symbols_looked_up): Delete.
5600 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5602 (prepare_resume_reply): Change ptid argument's type from unsigned
5603 long to ptid_t. Adjust. Implement W;process and X;process.
5604 (free_sym_cache, clear_symbol_cache): New.
5605 (look_up_one_symbol): Adjust to per-process symbol cache. *
5606 * server.c (cont_thread, general_thread, step_thread): Change type
5609 (multi_process): New.
5610 (last_ptid): Change type to ptid_t.
5611 (struct vstop_notif) <ptid>: Change type to ptid_t.
5612 (queue_stop_reply, push_event): Change `ptid' argument's type to
5614 (discard_queued_stop_replies): Add `pid' argument.
5615 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5616 changes. Don't reference the `attached' global.
5617 (attach_inferior): Adjust to mywait interface changes.
5618 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5619 features. Handle and report "multiprocess+". Handle
5621 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5623 (handle_v_kill): New.
5624 (handle_v_stopped): Adjust to use target_pid_to_str.
5625 (handle_v_requests): Allow multiple attaches and runs when
5626 multiprocess extensions are in effect. Handle "vKill".
5627 (myresume): Adjust to use ptids.
5628 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5629 (handle_status): Adjust to discard_queued_stop_replies interface
5631 (first_thread_of, kill_inferior_callback)
5632 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5633 (main): Call initialize_inferiors. Adjust to use ptids, killing
5634 and detaching from all inferiors. Handle multiprocess packet
5636 * linux-low.h: Include gdb_proc_service.h.
5637 (struct process_info_private): New.
5638 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5639 <lwpid_of>: Use ptid_get_lwp.
5640 (get_lwp_thread): Adjust.
5641 (struct lwp_info): Add `dead' member.
5642 (find_lwp_pid): Declare.
5643 * linux-low.c (thread_db_active): Delete.
5644 (new_inferior): Adjust comment.
5645 (inferior_pid): Delete.
5646 (linux_add_process): New.
5647 (handle_extended_wait): Adjust.
5648 (add_lwp): Change unsigned long to ptid.
5649 (linux_create_inferior): Add process to processes table. Adjust
5650 to use ptids. Don't set new_inferior here.
5651 (linux_attach_lwp): Rename to ...
5652 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5653 it. Adjust to use ptids.
5654 (linux_attach_lwp): New.
5655 (linux_attach): Add process to processes table. Don't set
5657 (struct counter): New.
5658 (second_thread_of_pid_p, last_thread_of_process_p): New.
5659 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5661 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5662 processes. Remove process from process table.
5663 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5664 to multiple processes.
5665 (any_thread_of): New.
5666 (linux_detach): Add `pid' argument, and handle it. Remove process
5667 from processes table.
5668 (linux_join): Add `pid' argument. Handle it.
5669 (linux_thread_alive): Change unsighed long argument to ptid_t.
5670 Consider dead lwps as not being alive.
5671 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5672 threads we're not interested in.
5673 (same_lwp, find_lwp_pid): New.
5674 (linux_wait_for_lwp): Change `pid' argument's type from int to
5676 (linux_wait_for_event): Rename to ...
5677 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5678 from int to ptid_t. Adjust.
5679 (linux_wait_for_event): New.
5680 (linux_wait_1): Add `ptid' argument. Change return type to
5681 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5682 that exit from the process table.
5683 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5685 (mark_lwp_dead): New.
5686 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5687 stopping all threads, mark its main lwp as dead.
5688 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5690 (fetch_register, usr_store_inferior_registers)
5691 (regsets_fetch_inferior_registers)
5692 (regsets_store_inferior_registers, linux_read_memory)
5693 (linux_write_memory): Inline `inferior_pid'.
5694 (linux_look_up_symbols): Adjust to use per-process
5696 (linux_request_interrupt): Adjust to use ptids.
5697 (linux_read_auxv): Inline `inferior_pid'.
5698 (initialize_low): Don't reference thread_db_active.
5699 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5700 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5701 (ps_getpid): Return the pid of the current inferior.
5702 * thread-db.c (proc_handle, thread_agent): Delete.
5703 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5705 (find_one_thread): Change argument type to ptid_t. Adjust to
5707 (maybe_attach_thread): Adjust to per-process data and ptids.
5708 (thread_db_find_new_threads): Ditto.
5709 (thread_db_init): Ditto.
5710 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5711 processes table. Adjust to use ptids.
5712 (spu_kill, spu_detach): Adjust interface. Remove process from
5714 (spu_join, spu_thread_alive): Adjust interface.
5715 (spu_wait): Adjust interface. Remove process from processes
5716 table. Adjust to use ptids.
5717 * win32-low.c (current_inferior_tid): Delete.
5718 (current_inferior_ptid): New.
5719 (debug_event_ptid): New.
5720 (thread_rec): Take a ptid. Adjust.
5721 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5722 (child_delete_thread): Ditto.
5723 (do_initial_child_stuff): Add `attached' argument. Add process to
5725 (child_fetch_inferior_registers, child_store_inferior_registers):
5727 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5728 (win32_attach): Pass 1 to do_initial_child_stuff.
5729 (win32_kill): Adjust interface. Remove process from processes
5731 (win32_detach): Ditto.
5732 (win32_join): Adjust interface.
5733 (win32_thread_alive): Take a ptid.
5734 (win32_resume): Adjust to use ptids.
5735 (get_child_debug_event): Ditto.
5736 (win32_wait): Adjust interface. Remove exiting process from
5739 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5741 Non-stop mode support.
5743 * server.h (non_stop): Declare.
5744 (gdb_client_data, handler_func): Declare.
5745 (delete_file_handler, add_file_handler, start_event_loop):
5747 (handle_serial_event, handle_target_event, push_event)
5748 (putpkt_notif): Declare.
5749 * target.h (enum resume_kind): New.
5750 (struct thread_resume): Replace `step' field by `kind' field.
5751 (TARGET_WNOHANG): Define.
5752 (struct target_ops) <wait>: Add `options' argument.
5753 <supports_non_stop, async, start_non_stop>: New fields.
5754 (target_supports_non_stop, target_async): New.
5755 (start_non_stop): Declare.
5756 (mywait): Add `options' argument.
5757 * target.c (mywait): Add `options' argument. Print child exit
5759 (start_non_stop): New.
5760 * server.c (non_stop, own_buf, mem_buf): New globals.
5761 (struct vstop_notif): New.
5762 (notif_queue): New global.
5763 (queue_stop_reply, push_event, discard_queued_stop_replies)
5764 (send_next_stop_reply): New.
5765 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5767 (attach_inferior): In non-stop mode, don't wait for the target
5769 (handle_general_set): Handle QNonStop.
5770 (handle_query): When handling qC, return the current general
5771 thread, instead of the first thread of the list.
5772 (handle_query): If the backend supports non-stop mode, include
5773 QNonStop+ in the qSupported query response.
5774 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5776 (handle_v_attach, handle_v_run): Handle non-stop mode.
5777 (handle_v_stopped): New.
5778 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5779 (myresume): Adjust to use resume_kind. Handle non-stop.
5780 (queue_stop_reply_callback): New.
5781 (handle_status): Handle non-stop mode.
5782 (main): Clear non_stop flag on reconnection. Use the event-loop.
5783 Refactor serial protocol handling from here ...
5784 (process_serial_event): ... to this new function. When GDB
5785 selects any thread, select one here. In non-stop mode, wait until
5786 GDB acks all pending events before exiting.
5787 (handle_serial_event, handle_target_event): New.
5788 * remote-utils.c (remote_open): Install remote_desc in the event
5790 (remote_close): Remove remote_desc from the event loop.
5791 (putpkt_binary): Rename to...
5792 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5793 (putpkt_binary): New as wrapper around putpkt_binary_1.
5794 (putpkt_notif): New.
5795 (prepare_resume_reply): In non-stop mode, don't change the
5797 * event-loop.c: New.
5798 * Makefile.in (OBJ): Add event-loop.o.
5799 (event-loop.o): New rule.
5801 * linux-low.h (pid_of): Moved here.
5803 (get_lwp_thread): Use lwpid_of.
5804 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5805 * linux-low.c (pid_of): Delete.
5806 (inferior_pid): Use lwpid_of.
5807 (linux_event_pipe): New.
5808 (target_is_async_p): New.
5810 (handle_extended_wait): Use lwpid_of.
5811 (add_lwp): Don't set lwpid field.
5812 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5813 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5814 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5815 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5816 first. Adjust to linux_wait_for_event interface changes. Use
5818 (linux_detach): Don't delete the main lwp here.
5819 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5820 (status_pending_p): Don't consider explicitly suspended lwps.
5821 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5822 pointer. Add OPTIONS argument. Change return type to int. Use
5823 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5824 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5825 pointer. Add status pointer argument. Return a pid instead of a
5826 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5827 changes. In non-stop mode, don't switch to a random thread.
5828 (linux_wait): Rename to...
5829 (linux_wait_1): ... this. Add target_options argument, and handle
5830 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5831 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5832 clean exit and signal exit code. Don't stop all threads in
5833 non-stop mode. In all-stop mode, only stop all threads when
5834 reporting a stop to GDB. Handle explicit thread stop requests.
5835 (async_file_flush, async_file_mark): New.
5837 (send_sigstop): Use lwpid_of.
5838 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5839 interface changes. In non-stop mode, don't switch to a random
5841 (linux_resume_one_lwp): Use lwpid_of.
5842 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5843 (linux_resume_one_thread): ... this. Handle resume_stop. In
5844 non-stop mode, don't look for pending flag in all threads.
5845 (resume_status_pending_p): Don't consider explicitly suspended
5847 (my_waitpid): Reimplement. Emulate __WALL.
5848 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5850 (sigchld_handler, linux_supports_non_stop, linux_async)
5851 (linux_start_non_stop): New.
5852 (linux_target_ops): Register linux_supports_non_stop, linux_async
5853 and linux_start_non_stop.
5854 (initialize_low): Install SIGCHLD handler.
5855 * thread-db.c (thread_db_create_event, find_one_thread)
5856 (thread_db_get_tls_address): Use lwpid_of.
5857 * win32-low.c (win32_detach): Adjust to use resume_kind.
5858 (win32_wait): Add `options' argument.
5859 * spu-low.c (spu_resume): Adjust to use resume_kind.
5860 (spu_wait): Add `options' argument.
5862 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5864 Decouple target code from remote protocol.
5866 * target.h (enum target_waitkind): New.
5867 (struct target_waitstatus): New.
5868 (struct target_ops) <wait>: Return an unsigned long. Take a
5869 target_waitstatus pointer instead of a char pointer.
5871 * target.c (mywait): Change prototype to return an unsigned long.
5872 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5873 * server.h (thread_from_wait, old_thread_from_wait): Delete
5875 (prepare_resume_reply): Change prototype to take a
5877 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5878 (last_status, last_ptid): New.
5879 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5880 pid instead of a signal.
5881 (attach_inferior): Remove "status" and "signal" parameters.
5883 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5885 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5886 (handle_v_requests, myresume): Remove "status" and "signal"
5888 (handle_status): New.
5889 (main): Delete local `status'. Adjust.
5890 * remote-utils.c: Include target.h.
5891 (prepare_resume_reply): Change prototype to take a
5892 target_waitstatus. Adjust.
5894 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5896 * spu-low.c (spu_wait): Adjust.
5897 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5899 (win32_wait): Adjust.
5901 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5903 * target.h (struct thread_resume): Delete leave_stopped member.
5904 (struct target_ops): Add a `n' argument to the `resume' callback.
5905 * server.c (start_inferior): Adjust.
5906 (handle_v_cont, myresume): Adjust.
5907 * linux-low.c (check_removed_breakpoint): Adjust to resume
5908 interface change, and to removed leave_stopped field.
5909 (resume_ptr): Delete.
5910 (struct thread_resume_array): New.
5911 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5912 resume interface change.
5913 (linux_continue_one_thread, linux_queue_one_thread)
5914 (resume_status_pending_p): Check if the resume field is NULL
5915 instead of checking the leave_stopped member.
5916 (linux_resume): Adjust to the target resume interface change.
5917 * spu-low.c (spu_resume): Adjust to the target resume interface
5919 * win32-low.c (win32_detach, win32_resume): Ditto.
5921 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5923 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5925 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5927 (linux_continue_one_thread): Only preserve the stepping flag if
5928 there's a pending breakpoint.
5930 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5932 * server.c (main): After the inferior having exited, call
5933 remote_close before exiting gdbserver.
5935 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5937 Fix size of FPSCR in Power 7 processors.
5938 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5939 (PPC_FEATURE_HAS_DFP): New #define.
5940 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5943 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5945 * server.c (handle_query) Whitespace and formatting.
5947 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5949 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5950 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5951 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5952 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5953 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5954 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5955 Makefile.in, configure.ac: Fix whitespace throughout.
5956 * configure: Regenerate.
5958 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5960 * inferiors.c (find_inferior): Make it safe for the callback
5961 function to delete the currently iterated inferior.
5963 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5965 * Makefile.in (linuw_low_h): Move higher.
5966 (thread-db.o): Depend on $(linux_low_h).
5968 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5970 Rename "process" to "lwp" throughout.
5972 * linux-low.c (all_processes): Rename to...
5973 (all_lwps): ... this.
5974 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5975 (add_process): Rename to ...
5976 (add_lwp): ... this. Adjust.
5977 (linux_create_inferior): Adjust.
5978 (linux_attach_lwp): Adjust.
5979 (linux_attach): Adjust.
5980 (linux_kill_one_process): Rename to ...
5981 (linux_kill_one_lwp): ... this. Adjust.
5982 (linux_kill): Adjust.
5983 (linux_detach_one_process): Rename to ...
5984 (linux_detach_one_lwp): ... this. Adjust.
5985 (linux_detach): Adjust.
5986 (check_removed_breakpoint): Adjust.
5987 (status_pending_p): Adjust.
5988 (linux_wait_for_process): Rename to ...
5989 (linux_wait_for_lwp): ... this. Adjust.
5990 (linux_wait_for_event): Adjust.
5991 (send_sigstop): Adjust.
5992 (wait_for_sigstop): Adjust.
5993 (stop_all_processes): Rename to ...
5994 (stop_all_lwps): ... this.
5995 (linux_resume_one_process): Rename to ...
5996 (linux_resume_one_lwp): ... this. Adjust.
5997 (linux_set_resume_request, linux_continue_one_thread)
5998 (linux_queue_one_thread, resume_status_pending_p)
5999 (usr_store_inferior_registers, regsets_store_inferior_registers)
6000 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6002 * linux-low.h (get_process): Rename to ...
6003 (get_lwp): ... this. Adjust.
6004 (get_thread_process): Rename to ...
6005 (get_thread_lwp): ... this. Adjust.
6006 (get_process_thread): Rename to ...
6007 (get_lwp_thread): ... this. Adjust.
6008 (struct process_info): Rename to ...
6009 (struct lwp_info): ... this.
6010 (all_processes): Rename to ...
6011 (all_lwps): ... this.
6012 * proc-service.c (ps_lgetregs): Adjust.
6013 * thread-db.c (thread_db_create_event, find_one_thread)
6014 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6016 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6018 * server.c (handle_query): Handle "qAttached".
6020 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6022 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6023 GPLv3, update license URL.
6025 2009-03-01 Doug Evans <dje@google.com>
6027 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6028 (server_h): Add gdb_signals.h.
6029 (signals.o): Update.
6030 * server.h (target_signal_from_host,target_signal_to_host_p)
6031 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6033 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6035 * remote-utils.c (getpkt): Also generate remote-debug
6036 information if noack_mode is set.
6038 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6040 * server.c (handle_query): Report qXfer:siginfo:read and
6041 qXfer:siginfo:write as supported and handle them.
6042 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6043 * linux-low.c (linux_xfer_siginfo): New.
6044 (linux_target_ops): Set it.
6046 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6048 * server.c (gdbserver_usage): Mention --remote-debug.
6049 (main): Accept '--remote-debug' switch.
6051 2009-01-18 Doug Evans <dje@google.com>
6053 * regcache.c (new_register_cache): No need to check result of xcalloc.
6054 * server.c (handle_search_memory): Back out calls to xmalloc,
6055 result is checked and error is returned to user upon failure.
6056 (handle_query): Ditto. Add more checks for result of malloc.
6057 (handle_v_cont): Check result of malloc, report error back to
6059 (handle_v_run): Ditto. Call freeargv.
6060 * server.h (freeargv): Declare.
6061 * utils.c (freeargv): New fn.
6063 2009-01-15 Doug Evans <dje@google.com>
6065 * gdbreplay.c (perror_with_name): Make arg const char *.
6066 * server.h (target_signal_to_name): Make return type const char *.
6067 * thread-db.c (thread_db_err_str): Make return type const char *.
6068 * utils.c (perror_with_name): Make arg const char *.
6070 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6072 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6073 when handling a EXIT_PROCESS_DEBUG_EVENT.
6075 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6077 * gdbreplay.c (gdbreplay_version): Update copyright year.
6078 * server.c (gdbserver_version): Likewise.
6080 2009-01-05 Doug Evans <dje@google.com>
6082 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6083 (handle_extended_wait): Improve comment.
6085 2008-12-13 Doug Evans <dje@google.com>
6087 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6088 * server.h (ATTR_MALLOC): New macro.
6089 (xmalloc,xcalloc,xstrdup): Declare.
6090 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6091 * inferiors.c: Ditto.
6092 * linux-low.c: Ditto.
6093 * mem-break.c: Ditto.
6094 * regcache.c: Ditto.
6095 * remote-utils.c: Ditto.
6098 * win32-low.c: Ditto.
6100 2008-12-12 Doug Evans <dje@google.com>
6102 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6103 in debugging printf.
6105 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6107 2008-12-09 Doug Evans <dje@google.com>
6109 * linux-low.h (struct process_info): Delete member tid, unused.
6110 * thread-db.c (find_one_thread): Update.
6111 (maybe_attach_thread): Update.
6113 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6115 * target.h (struct target_ops): Add qxfer_osdata member.
6116 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6118 (linux_qxfer_osdata): New functions.
6119 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6121 * server.c (handle_query): Handle "qXfer:osdata:read:".
6122 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6123 (buffer_xml_printf): New functions.
6124 * server.h (struct buffer): New.
6125 (buffer_grow_str, buffer_grow_str0): New macros.
6126 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6127 (buffer_xml_printf): Declare.
6129 2008-11-24 Doug Evans <dje@google.com>
6131 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6133 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6135 * server.c (handle_v_run): Always use the supplied argument list.
6137 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6139 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6140 (xtensa_regmap_table): Add entry for scompare1.
6142 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6144 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6145 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6146 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6147 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6148 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6149 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6150 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6151 XML target descriptions.
6152 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6153 when inferior is running on an ISA 2.05 or later processor. Add
6154 special case to return offset for full 64-bit slot of FPSCR when
6157 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6159 * Makefile.in (SFILES, clean): Added sparc64 files.
6160 (reg-sparc64.o, reg-sparc64.c): New.
6161 * configure.srv (sparc*-*-linux*): New configuration.
6162 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6163 syscall arguments for SPARC.
6164 (regsets_store_inferior_registers): Likewise.
6165 * linux-sparc-low.c: New file.
6167 2008-10-21 Doug Evans <dje@google.com>
6169 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6170 (READLINE_DIR,READLINE_DEP): Delete.
6171 (INTERNAL_CFLAGS): Update.
6172 (LINTFLAGS): Update.
6174 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6176 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6177 whole argv from the last run, not just argv[0].
6179 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6181 * regcache.c (new_register_cache): Return NULL if the register
6182 cache size isn't known yet.
6183 (free_register_cache): Avoid dereferencing a NULL regcache.
6185 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6187 * configure.srv: Merge MIPS and MIPS64.
6189 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6191 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6193 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6195 * Makefile.in: Add required vsx dependencies.
6197 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6198 Declare init_registers_powerpc_vsx32l.
6199 Declare init_registers_powerpc_vsx64l.
6200 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6201 (ppc_arch_setup): Check for VSX in hwcap.
6202 (ppc_fill_vsxregset): New function.
6203 (ppc_store_vsxregset): New function.
6204 Add new VSX entry in regset_info target_regsets.
6206 * configure.srv: Add new VSX dependencies.
6208 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6210 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6211 (remote_open): Set or clear transport_is_reliable.
6212 (putpkt_binary): Don't expect acks in noack mode.
6213 (getpkt): Don't send ack/nac in noack mode.
6214 * server.c (handle_general_set): Handle QStartNoAckMode.
6215 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6217 (main): Reset noack_mode on every connection.
6218 * server.h (noack_mode): Declare.
6220 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6222 * Makefile.in (GDBREPLAY_OBS): New variable.
6223 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6225 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6226 Daniel Jacobowitz <dan@codesourcery.com>
6228 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6229 (usr_store_inferior_registers): Likewise.
6230 (regsets_store_inferior_registers): Likewise.
6232 2008-07-31 Rolf Jansen <rj@surtec.com>
6233 Pedro Alves <pedro@codesourcery.com>
6235 * configure.ac: Check for memmem declaration.
6236 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6237 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6238 (disable_packet_qfThreadInfo): Unconditionally compile.
6239 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6240 * configure, config.in: Regenerate.
6242 2008-07-28 Doug Kwan <dougkwan@google.com>
6244 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6245 (linux_write_memory): Remove declaration of errno.
6247 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6249 * linux-low.c (handle_extended_wait): Do not use "status"
6250 variable uninitialized.
6252 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6254 * server.c (handle_v_attach): Inhibit reporting dll changes.
6256 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6258 * remote-utils.c (prepare_resume_reply): If requested, don't
6259 output "thread:TID" in the T stop reply.
6261 * server.c (disable_packet_vCont, disable_packet_Tthread)
6262 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6263 (handle_query): If requested, disable support for qC, qfThreadInfo
6265 (handle_v_requests): If requested, disable support for vCont.
6266 (gdbserver_show_disableable): New.
6267 (main): Handle --disable-packet and --disable-packet=LIST.
6269 * server.h (disable_packet_vCont, disable_packet_Tthread)
6270 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6272 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6274 * server.c (gdbserver_usage): Mention --version.
6276 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6278 * Makefile.in (gdbreplay.o): New rule.
6280 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6282 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6283 message, not gdbserver.
6285 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6286 Nathan Sidwell <nathan@codesourcery.com>
6287 Joseph Myers <joseph@codesourcery.com>
6289 * acinclude.m4: Include ../../config/acx.m4.
6290 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6291 * configure, config.in: Regenerate.
6292 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6293 * server.c (gdbserver_version): Print PKGVERSION.
6294 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6295 (main): Adjust gdbserver_usage calls.
6296 * gdbreplay.c (version, host_name): Add declarations.
6297 (gdbreplay_version, gdbreplay_usage): New.
6298 (main): Accept --version and --help options.
6300 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6302 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6303 (arm_breakpoint_at): Handle Thumb.
6304 (the_low_target): Add comment.
6306 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6308 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6310 2008-05-09 Doug Evans <dje@google.com>
6312 * server.h (decode_search_memory_packet): Declare.
6313 * remote-utils.c (decode_search_memory_packet): New fn.
6314 * server.c (handle_search_memory_1): New fn.
6315 (handle_search_memory): New fn.
6316 (handle_query): Process qSearch:memory packets.
6318 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6320 * regcache.c (registers_length): Remove.
6321 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6322 full register packet.
6323 * regcache.h (registers_length): Remove prototype.
6324 * server.h (PBUFSIZ): Define to 16384.
6326 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6328 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6329 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6330 powerpc-64l.o, and powerpc-altivec64l.o.
6331 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6332 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6333 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6334 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6335 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6338 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6339 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6340 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6341 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6342 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6343 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6344 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6345 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6346 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6347 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6350 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6351 (init_registers_powerpc_32l): ... this new prototype.
6352 (init_registers_powerpc_32): Remove, replace by ...
6353 (init_registers_powerpc_altivec32l): ... this new prototype.
6354 (init_registers_powerpc_e500): Remove, replace by ...
6355 (init_registers_powerpc_e500l): ... this new prototype.
6356 (init_registers_ppc64): Remove, replace by ...
6357 (init_registers_powerpc_64l): ... this new prototype.
6358 (init_registers_powerpc_64): Remove, replace by ...
6359 (init_registers_powerpc_altivec64l): ... this new prototype.
6360 (ppc_num_regs): Set to 73.
6361 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6362 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6363 (ppc_cannot_store_register): Handle orig_r3 and trap.
6364 (ppc_arch_setup): Update init_registers_... calls.
6365 (ppc_fill_gregset): Handle orig_r3 and trap.
6367 * inferiors.c (clear_inferiors): Reset current_inferior.
6369 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6371 * acinclude.m4: Add override.m4.
6372 * configure: Regenerate.
6374 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6376 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6377 initial call to init_register_ppc64.
6379 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6381 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6382 single powerpc*-*-linux* case.
6383 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6385 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6387 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6388 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6390 * linux-ppc-low.c: Include <elf.h>.
6391 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6392 (ppc_hwcap): New global variable.
6393 (ppc_regmap): Remove __SPE__ #ifdef sections.
6394 (ppc_regmap_e500): New global variable.
6395 (ppc_cannot_store_register): Update __SPE__ special case.
6396 (ppc_get_hwcap): New function.
6397 (ppc_arch_setup): Use it to determine whether inferior supports
6398 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6399 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6400 Do not access registers if target does not support AltiVec.
6401 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6402 Do not access registers if target does not support SPE.
6403 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6405 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6407 * linux-low.c (disabled_regsets, num_regsets): New.
6408 (use_regsets_p): Delete.
6409 (linux_wait_for_process): Clear disabled_regsets.
6410 (regsets_fetch_inferior_registers): Check and set it.
6411 (regsets_store_inferior_registers): Likewise.
6412 (linux_fetch_registers, linux_store_registers): Do not use
6414 (initialize_low): Allocate disabled_regsets.
6416 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6418 * Makefile.in (LIBOBJS): New.
6420 (memmem.o): New rule.
6421 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6422 * configure: Regenerated.
6424 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6426 * server.c (handle_query): Never return "unsupported" for
6427 qXfer:features:read queries.
6429 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6431 * server.c (get_features_xml): Fix inverted condition.
6432 (handle_query): Always support qXfer:feature:read.
6434 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6436 * server.c (wrapper_argv): New.
6437 (start_inferior): Handle wrapper_argv. If set, expect an extra
6439 (gdbserver_usage): Document --wrapper.
6440 (main): Parse --wrapper.
6442 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6444 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6445 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6446 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6447 (ppc_set_pc): Likewise.
6448 (ppc_arch_setup): New function.
6449 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6450 of collect_register.
6451 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6453 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6455 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6456 instead of linux-ppc64-low.o.
6457 * linux-ppc64-low.c: Remove file.
6458 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6459 (linux-ppc64-low.o): Remove rule.
6461 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6462 (init_registers_powerpc_64): Likewise.
6463 (ppc_regmap): Conditionally define depending on __powerpc64__.
6464 (ppc_cannot_store_register): Do not special-case "fpscr" when
6465 compiled on __powerpc64__.
6466 (ppc_collect_ptrace_register): New function.
6467 (ppc_supply_ptrace_register): New function.
6468 (ppc_breakpoint): Change type to "unsigned int".
6469 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6470 (the_low_target): Conditionally provide initializers for the
6471 arch_setup member depending on __powerpc64__. Install
6472 collect_ptrace_register and supply_ptrace_register members.
6474 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6476 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6477 * server.c (gdbserver_xmltarget): Define.
6478 (get_features_xml): Use it to replace "target.xml" and arch_string.
6480 * configure.srv: Remove srv_xmltarget. Add XML files that were
6481 mentioned there to srv_xmlfiles instead. Remove conditional tests
6482 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6483 srv_xmlfiles and srv_regobj to include all possible choices.
6484 * configure.ac (srv_xmltarget): Remove.
6485 (srv_xmlfiles): Do not add "target.xml".
6486 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6487 checks for supplementary target information.
6488 * configure: Regenerate.
6489 * Makefile.in (XML_TARGET): Remove.
6490 (target.xml): Remove rule.
6491 (clean): Do not clean up target.xml.
6492 (.PRECIOUS): Do not mention target.xml.
6494 * target.h (struct target_ops): Remove arch_string member.
6495 * linux-low.c (linux_arch_string): Remove.
6496 (linux_target_ops): Remove arch_string initializer.
6497 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6498 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6499 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6500 * spu-low.c (spu_arch_string): Remove.
6501 (spu_target_ops): Remove arch_string initializer.
6502 * win32-low.c (win32_arch_string): Remove.
6503 (win32_target_ops): Remove arch_string initializer.
6504 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6505 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6506 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6508 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6510 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6511 by collect_ptrace_register and supply_ptrace_register hooks.
6512 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6513 instead of checking for the_low_target.left_pad_xfer.
6514 (usr_store_inferior_registers): Use collect_ptrace_register callback
6515 instead of checking for the_low_target.left_pad_xfer.
6517 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6518 (s390_supply_ptrace_register): Likewise.
6519 (s390_fill_gregset): Call s390_collect_ptrace_register.
6520 (the_low_target): Update.
6522 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6523 (ppc_supply_ptrace_register): Likewise.
6524 (the_low_target): Update.
6526 * linux-i386-low.c (the_low_target): Update.
6527 * linux-x86-64-low.c (the_low_target): Update.
6529 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6531 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6532 reg-s390.o and reg-s390x.o.
6534 * linux-low.c (new_inferior): New global variable.
6535 (linux_create_inferior, linux_attach): Set it.
6536 (linux_wait_for_process): Call the_low_target.arch_setup after the
6537 target has stopped for the first time.
6538 (initialize_low): Do not call the_low_target.arch_setup.
6540 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6541 (s390_set_pc): Likewise.
6542 (s390_arch_setup): New function.
6543 (the_low_target): Use s390_arch_setup as arch_setup routine.
6545 * regcache.c (realloc_register_cache): New function.
6546 (set_register_cache): Call it for each existing regcache.
6548 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6550 * server.h (init_registers): Remove prototype.
6552 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6553 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6554 instead of init_registers ().
6555 * linux-arm-low.c (init_registers_arm): Add prototype.
6556 (init_registers_arm_with_iwmmxt): Likewise.
6557 (the_low_target): Add initializer for arch_setup field.
6558 * linux-cris-low.c (init_registers_cris): Add prototype.
6559 (the_low_target): Add initializer for arch_setup field.
6560 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6561 (the_low_target): Add initializer for arch_setup field.
6562 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6563 (the_low_target): Add initializer for arch_setup field.
6564 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6565 (the_low_target): Add initializer for arch_setup field.
6566 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6567 (the_low_target): Add initializer for arch_setup field.
6568 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6569 (the_low_target): Add initializer for arch_setup field.
6570 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6571 (init_registers_mips64_linux): Likewise.
6572 (the_low_target): Add initializer for arch_setup field.
6573 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6574 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6575 (the_low_target): Add initializer for arch_setup field.
6576 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6577 (init_registers_powerpc_64): Likewise.
6578 (the_low_target): Add initializer for arch_setup field.
6579 * linux-s390-low.c (init_registers_s390): Add prototype.
6580 (init_registers_s390x): Likewise.
6581 (the_low_target): Add initializer for arch_setup field.
6582 * linux-sh-low.c (init_registers_sh): Add prototype.
6583 (the_low_target): Add initializer for arch_setup field.
6584 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6585 (the_low_target): Add initializer for arch_setup field.
6586 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6587 (the_low_target): Add initializer for arch_setup field.
6589 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6590 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6591 instead of init_registers ().
6592 * win32-arm-low.c (init_registers_arm): Add prototype.
6593 (the_low_target): Add initializer for arch_setup field.
6594 * win32-i386-low.c (init_registers_i386): Add prototype.
6595 (the_low_target): Add initializer for arch_setup field.
6597 * spu-low.c (init_registers_spu): Add prototype.
6598 (initialize_low): Call initialie_registers_spu () instead of
6599 initialize_registers ().
6601 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6603 * server.c (handle_v_requests): When handling the vRun and vAttach
6604 packets, if already debugging a process, don't kill it. Return an
6607 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6609 * server.c (handle_query): Correct length check.
6611 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6613 * win32-low.c (do_initial_child_stuff): Add process handle
6614 parameter. Set current_process_handle and current_process_id from the
6615 parameters. Clear globals.
6616 (win32_create_inferior): Don't set current_process_handle and
6617 current_process_id here. Instead pass them on the call to
6618 do_initial_child_stuff.
6619 (win32_attach): Likewise.
6620 (win32_clear_inferiors): New.
6621 (win32_kill): Don't close the current process handle or the
6622 current thread handle here. Instead call win32_clear_inferiors.
6623 (win32_detach): Don't open a new handle to the process. Call
6624 win32_clear_inferiors.
6625 (win32_join): Don't rely on current_process_handle; open a new
6626 handle using the process id.
6627 (win32_wait): Call win32_clear_inferiors when the inferior process
6630 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6632 * server.c (monitor_show_help): Add "exit".
6634 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6636 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6637 (clean): Add reg-xtensa.c.
6638 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6639 * configure.srv (xtensa*-*-linux*) New target.
6640 * linux-xtensa-low.c: New.
6641 * xtensa-xtregs.c: New.
6643 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6645 * hostio.c: Don't include errno.h.
6646 (errno_to_fileio_errno): Move to hostio-errno.
6647 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6648 error number outputting to the target->hostio_last_error callback.
6649 (hostio_packet_error): Use FILEIO_EINVAL directly.
6650 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6651 calls to hostio_error.
6652 * hostio-errno.c: New.
6653 * server.h (hostio_last_error_from_errno): Declare.
6654 * target.h (target_ops): Add hostio_last_error member.
6655 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6656 as hostio_last_error handler.
6657 * spu-low.c (spu_target_ops): Likewise.
6658 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6659 (wince_hostio_last_error): New functions.
6660 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6661 as hostio_last_error handler.
6662 (win32_target_ops) [!_WIN32_WCE]: Register
6663 hostio_last_error_from_errno as hostio_last_error handler.
6664 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6665 (hostio-errno.o): New rule.
6666 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6667 * configure.srv (srv_hostio_err_objs): New variable. Default to
6669 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6670 * configure: Regenerate.
6672 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6674 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6675 (linux_kill, linux_detach): Clean up the process list.
6676 * remote-utils.c (remote_open): Improve port number parsing.
6677 (putpkt_binary, input_interrupt): Only send interrupts if the target
6679 * server.c (extended_protocol): Make static.
6680 (attached): Define earlier.
6681 (exit_requested, response_needed, program_argv): New variables.
6682 (target_running): New.
6683 (start_inferior): Clear attached here.
6684 (attach_inferior): Set attached here.
6685 (require_running): Define.
6686 (handle_query): Use require_running and target_running. Implement
6688 (handle_v_attach, handle_v_run): New.
6689 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6690 (gdbserver_usage): Update.
6691 (main): Redo argument parsing. Handle --debug and --multi. Handle
6692 --attach along with other options or after the port. Save
6693 program_argv. Support no initial program. Resynchronize
6694 communication with GDB after an error. Handle "monitor exit".
6695 Use require_running and target_running. Always allow the extended
6696 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6697 restart in extended mode.
6698 * README: Refer to the GDB manual. Update --attach usage.
6700 2007-12-20 Andreas Schwab <schwab@suse.de>
6702 * linux-low.c (STACK_SIZE): Define.
6703 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6704 (linux_test_for_tracefork): Likewise.
6706 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6708 * linux-low.c (linux_wait_for_event): Update messages. Do not
6709 reinsert auto-delete breakpoints.
6710 * mem-break.c (struct breakpoint): Change return type of handler to
6712 (set_breakpoint_at): Update handler type.
6713 (reinsert_breakpoint_handler): Return 1 instead of calling
6715 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6717 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6718 * mem-break.h (set_breakpoint_at): Update handler type.
6719 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6720 * win32-low.c (auto_delete_breakpoint): New.
6721 (get_child_debug_event): Use it.
6723 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6725 * configure.ac: Check for pread and pwrite.
6726 * hostio.c (handle_pread): Fall back to lseek and read.
6727 (handle_pwrite): Fall back to lseek and write.
6728 * config.in, configure: Regenerated.
6730 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6732 * server.c (myresume): Add own_buf argument.
6733 (main): Update calls.
6735 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6737 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6738 * remote-utils.c (remote_open): Do not call disable_async_io.
6739 (block_async_io): Delete.
6740 (unblock_async_io): Make static.
6741 (initialize_async_io): New.
6742 * server.c (handle_v_cont): Handle async I/O here.
6743 (myresume): Likewise. Move other common resume tasks here...
6744 (main): ... from here. Call initialize_async_io. Disable async
6745 I/O before the main loop.
6746 * server.h (initialize_async_io): Declare.
6747 (block_async_io, unblock_async_io): Delete prototypes.
6748 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6750 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6752 * remote-utils.c (readchar): Allow binary data in received messages.
6754 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6756 * win32-low.c (attaching): New global.
6757 (win32_create_inferior): Clear the `attaching' global.
6758 (win32_attach): Set the `attaching' global.
6759 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6760 attaching. Only set a breakpoint at the entry point if not
6763 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6765 * server.c (main): Don't report dll events on the initial
6766 connection on attaches.
6768 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6770 * server.c (main): Relax numerical bases supported for the pid of
6771 the --attach command line argument.
6773 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6775 * win32-low.c (win32_attach): Call OpenProcess before
6776 DebugActiveProcess, not after. Add last error output to error
6779 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6781 * win32-low.c (win32_get_thread_context)
6782 (win32_set_thread_context): New functions.
6783 (thread_rec): Use win32_get_thread_context.
6784 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6785 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6788 2007-12-03 Leo Zayas
6789 Pedro Alves <pedro_alves@portugalmail.pt>
6791 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6793 (child_add_thread): Minor cleanup.
6794 (child_continue): Resume artificially suspended threads before
6795 calling ContinueDebugEvent.
6796 (suspend_one_thread): New.
6797 (fake_breakpoint_event): New.
6798 (get_child_debug_event): Change return type to int. Check here if
6799 gdb sent an interrupt request. If a soft interrupt was requested,
6800 fake a breakpoint event. Return 0 if there is no event to handle,
6802 (win32_wait): Don't check here if gdb sent an interrupt request.
6803 Ensure there is a valid event to handle.
6804 (win32_request_interrupt): Add soft interruption method as last
6807 2007-12-03 Leo Zayas
6808 Pedro Alves <pedro_alves@portugalmail.pt>
6810 * win32-low.h (win32_thread_info): Add descriptions to the
6811 structure members. Replace `suspend_count' counter by a
6813 * win32-low.c (thread_rec): Update condition of when to get the
6814 context from the inferior. Rely on ContextFlags being set if it
6815 has already been retrieved. Only suspend the inferior thread if
6816 we haven't already. Warn if that fails.
6817 (continue_one_thread): s/suspend_count/suspended/. Only call
6818 ResumeThread once. Warn if that fails.
6820 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6822 * win32-low.c (win32_wait): Don't read from the inferior when it
6825 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6827 * Makefile.in (win32_low_h): New variable.
6828 (win32-low.o): Add dependency on $(win32_low_h).
6829 (win32-arm-low.o, win32-i386-low.o): New rules.
6831 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6833 * hostio.c: Correct copyright year.
6835 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6837 * Makefile.in (OBS): Add hostio.o.
6838 (hostio.o): New rule.
6839 * server.h (handle_vFile): Declare.
6840 * hostio.c: New file.
6841 * server.c (handle_v_requests): Take packet_len and new_packet_len
6842 for binary packets. Call handle_vFile.
6843 (main): Update call to handle_v_requests.
6845 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6847 * linux-low.c: Include <sched.h>.
6849 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6851 * linux-low.c (linux_tracefork_grandchild): New.
6852 (linux_tracefork_child): Use clone.
6853 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6855 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6857 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6859 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6861 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6863 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6865 * inferiors.c (change_inferior_id): Delete.
6866 (add_pid_to_list, pull_pid_from_list): New.
6867 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6868 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6869 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6870 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6871 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6872 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6873 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6874 (using_threads): Always set to 1.
6875 (handle_extended_wait): New.
6876 (add_process): Do not set TID.
6877 (linux_create_inferior): Set must_set_ptrace_flags.
6878 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6879 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6880 (linux_thread_alive): Rename TID argument to LWPID.
6881 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6882 (linux_wait_for_event): Do not use TID or check using_threads. Update
6883 call to dead_thread_notify. Call handle_extended_wait.
6884 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6885 (send_sigstop): Delete sigstop_sent.
6886 (wait_for_sigstop): Avoid TID.
6887 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6888 (linux_test_for_tracefork): New.
6889 (linux_lookup_signals): Use thread_db_active and
6890 linux_supports_tracefork_flag.
6891 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6892 * linux-low.h (get_process_thread): Avoid TID.
6893 (struct process_ifo): Move thread_known and tid to the end. Remove
6895 (linux_attach_lwp, thread_db_init): Update prototypes.
6896 * server.h (change_inferior_id): Delete prototype.
6897 (add_pid_to_list, pull_pid_from_list): New prototypes.
6898 * thread-db.c (thread_db_use_events): New.
6899 (find_first_thread): Rename to...
6900 (find_one_thread): ...this. Update callers and messages. Do not
6901 call fatal. Check thread_db_use_events. Do not call
6902 change_inferior_id or new_thread_notify.
6903 (maybe_attach_thread): Update. Do not call new_thread_notify.
6904 (thread_db_init): Set thread_db_use_events. Check use_events.
6905 * utils.c (fatal, warning): Correct message prefix.
6907 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6909 * Makefile.in (clean): Remove new files.
6910 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6911 (powerpc-64.o, powerpc-64.c): New rules.
6912 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6913 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6915 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6917 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6918 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6919 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6920 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6921 (target_regsets): Add AltiVec and SPE register sets.
6922 * configure.ac: Check for AltiVec and SPE.
6923 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6924 (ppc_fill_vrregset, ppc_store_vrregset): New.
6925 (target_regsets): Add AltiVec register set.
6926 * configure: Regenerated.
6928 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6930 * linux-low.c (O_LARGEFILE): Define.
6931 (linux_read_memory): Use /proc/PID/mem.
6932 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6933 * configure, config.in: Regenerated.
6935 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6937 * linux-low.c (linux_wait_for_event): Do not pass signals while
6940 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6942 * win32-low.c (create_process): New.
6943 (win32_create_inferior): Use create_process instead of
6944 CreateProcess. If create_process failed retry appending an ".exe"
6945 suffix. Store the GetLastError result immediatelly after
6946 create_process calls and use it on the call to error.
6948 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6950 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6952 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6954 * configure.ac: Switch license to GPLv3.
6956 2007-08-01 Michael Snyder <msnyder@access-company.com>
6958 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6960 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6962 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6964 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6965 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6966 CloseToolhelp32Snapshot.
6967 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6968 CloseToolhelp32Snapshot.
6970 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6972 * server.c (main): Check for inferior exit before main loop.
6974 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6976 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6977 instead of on tmp_desc.
6979 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6980 Daniel Jacobowitz <dan@codesourcery.com>
6982 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6983 (add_thread): Minor cleanups.
6984 (clear_inferiors): Move lower in the file. Clear the DLL
6986 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6987 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6988 (xml_escape_text): New.
6989 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6991 (handle_v_cont): Report errors.
6992 (gdbserver_version): Update.
6993 (main): Correct size of own_buf. Do not report initial DLL events.
6994 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6995 (unloaded_dll, xml_escape_text): New.
6996 * win32-low.c (enum target_waitkind): Update comments.
6997 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6998 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6999 (win32_EnumProcessModules, win32_GetModuleInformation)
7000 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7001 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7002 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7003 (win32_Module32First, win32_Module32Next, load_toolhelp)
7004 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7005 (get_child_debug_event): Handle DLL events.
7006 (win32_wait): Likewise.
7008 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7010 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7011 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7013 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7015 * win32-low.c (handle_output_debug_string): Ignore event if not
7018 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7020 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7022 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7024 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7026 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7028 * inferiors.c (change_inferior_id): Add comment.
7029 * linux-low.c (check_removed_breakpoint): Add an early
7030 prototype. Improve debug output.
7031 (linux_attach): Doc update.
7032 (linux_detach_one_process, linux_detach): Clean up before releasing
7034 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7035 * linux-low.h (struct process_info): Doc improvement.
7036 * mem-break.c (delete_all_breakpoints): New.
7037 * mem-break.h (delete_all_breakpoints): New prototype.
7038 * thread-db.c (find_first_thread): New.
7039 (thread_db_create_event): Call it instead of
7040 thread_db_find_new_threads. Clean up unused variables.
7041 (maybe_attach_thread): Remove first thread handling.
7042 (thread_db_find_new_threads): Use find_first_thread.
7043 (thread_db_get_tls_address): Likewise.
7045 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7047 * thread-db.c (thread_db_find_new_threads): Add prototype.
7048 (thread_db_create_event): Check for the main thread before adding
7050 (maybe_attach_thread): Only enable event reporting if TID == 0.
7051 (thread_db_get_tls_address): Check for new threads.
7053 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7055 * linux-low.c (linux_create_inferior): Try execv before execvp.
7056 * spu-low.c (spu_create_inferior): Likewise.
7058 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7060 * linux-low.c (linux_create_inferior): Change execv to execvp.
7061 * spu-low.c (spu_create_inferior): Likewies.
7063 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7065 * Makefile.in (clean): Clean new files instead of deleted ones.
7066 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7067 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7069 * configure.srv: Specify XML files and new regformats for MIPS and
7071 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7072 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7073 an entry for the restart register.
7074 (mips_cannot_fetch_register, mips_cannot_store_register)
7075 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7076 register names to match the XML descriptions.
7077 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7078 restart register instead of $0.
7080 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7081 Markus Deuling <deuling@de.ibm.com>
7083 * remote-utils.c (decode_xfer_write): New function.
7084 * server.h (decode_xfer_write): Add prototype.
7085 * server.c (handle_query): Add PACKET_LEN argument. Support
7086 qXfer:spu:read and qXfer:spu:write packets.
7087 (main): Pass packet_len to handle_query.
7088 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7089 * target.h (target_ops): Add qxfer_spu.
7091 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7093 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7094 accessing non-seekable spufs files.
7096 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7098 * server.c (handle_query): Add reply for qC packet.
7100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7101 Leo Zayas <lerele@champenstudios@com>
7103 * server.h (check_remote_input_interrupt_request): New function.
7104 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7105 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7106 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7107 (check_remote_input_interrupt_request): New function.
7108 * server.h (check_remote_input_interrupt_request): Declare.
7109 * win32-low.c (winapi_DebugBreakProcess,
7110 winapi_GenerateConsoleCtrlEvent): New typedefs.
7111 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7113 (win32_wait): Check for remote interrupt request
7114 with check_remote_input_interrupt_request.
7115 (win32_request_interrupt): New function.
7116 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7118 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7120 * win32-low.c (debug_registers_changed,
7121 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7122 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7123 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7124 (thread_rec): Get context using the low target.
7125 (child_add_thread): Call thread_added on the low target,
7126 which does the same thing.
7128 (do_initial_child_stuff): Remove debug registers references.
7129 Set context using the low target. Resume threads after
7130 setting the contexts.
7131 (child_continue): Remove dead variable. Remove debug
7132 registers references.
7133 (child_fetch_inferior_registers): Go through the low target.
7134 (do_child_store_inferior_registers): Remove.
7135 (child_store_inferior_registers): Go through the low target.
7136 (win32_resume): Remove debug registers references.
7137 Set context using the low target.
7138 (handle_exception): Change return type to void. Don't record
7139 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7140 first chance exception.
7141 (get_child_debug_event): Change return type to void. Remove
7142 goto loop. Always return after waiting for debug event.
7143 (win32_wait): Convert to switch statement. Handle spurious
7146 * win32-i386-low.c (debug_registers_changed,
7147 debug_registers_used): New.
7148 (initial_stuff): Rename to ...
7149 (i386_initial_stuff): ... this. Clear debug registers
7151 (store_debug_registers): Delete.
7152 (i386_get_thread_context): New.
7153 (load_debug_registers): Delete.
7154 (i386_set_thread_context): New.
7155 (i386_thread_added): New.
7156 (single_step): Rename to ...
7157 (i386_single_step): ... this.
7158 (do_fetch_inferior_registers): Rename to ...
7159 (i386_fetch_inferior_register): ... this.
7160 (i386_store_inferior_register): New.
7161 (the_low_target): Adapt to new interface.
7163 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7164 (arm_get_thread_context): New.
7165 (arm_set_thread_context): New.
7167 (do_fetch_inferior_registers): Rename to ...
7168 (arm_fetch_inferior_register): ... this.
7169 (arm_store_inferior_register): New.
7170 (arm_wince_breakpoint): Reimplement as unsigned long.
7171 (arm_wince_breakpoint_len): Define.
7172 (the_low_target): Adapt to new interface.
7174 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7175 load_debug_registers. Add get_thread_context, set_thread_context,
7176 thread_added and store_inferior_register. Rename
7177 fetch_inferior_registers to fetch_inferior_register.
7178 (regptr): Remove declaration.
7180 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7182 * linux-low.c (linux_detach): Change return type to int. Return 0.
7183 * spu-low.c (spu_detach): Likewise.
7185 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7187 * target.h (target_ops): Change return type of detach to int.
7189 (join_inferior): New.
7190 * server.c (main): Don't skip detach support on mingw32.
7191 If the inferior doesn't support detaching return error.
7192 Call join_inferior instead of using waitpid.
7193 * linux-low.c (linux_join): New.
7194 (linux_target_op): Add linux_join.
7195 * spu-low.c (spu_join): New.
7196 (spu_target_ops): Add spu_join.
7197 * win32-low.c (win32_detach): Adapt to new interface.
7198 Reopen current_process_handle before detaching. Issue a child
7199 resume before detaching.
7201 (win32_target_op): Add win32_join.
7203 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7205 * win32-low.c (win32-attach): Fix return value.
7206 * target.h (target_ops): Describe ATTACH return values.
7208 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7210 * win32-low.c (GETPROCADDRESS): Define.
7211 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7212 (winapi_DebugSetProcessKillOnExit): Likewise.
7213 (win32_create_inferior): Force usage of ansi CreateProcessA.
7214 (win32_attach): Use GETPROCADDRESS.
7215 (win32_detach): Likewise.
7217 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7219 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7221 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7223 * win32-low.c: Commit leftover changes from 2007-03-29.
7225 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7227 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7228 fields short instead of int. Add explicit padding.
7229 (i387_cache_to_fsave): Remove unnecessary casts.
7230 (i387_fsave_to_cache): Doc fix.
7231 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7233 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7235 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7236 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7238 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7240 * configure.srv (arm*-*-mingw32ce*): Move near the other
7243 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7245 * configure.ac: Add errno checking.
7246 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7247 sys/file.h and malloc.h.
7248 (AC_CHECK_DECLS): Add perror.
7249 (srv_mingwce): Handle.
7250 * configure.srv (i[34567]86-*-cygwin*): Add
7251 win32-i386-low.o to srv_tgtobj.
7252 (i[34567]86-*-mingw*): Likewise.
7253 (arm*-*-mingw32ce*): Add case.
7254 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7255 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7256 [__MINGW32CE__] (strerror): New function.
7257 [__MINGW32CE__] (errno): Define to GetLastError.
7258 [__MINGW32CE__] (COUNTOF): New macro.
7259 (remote_open): Remove extra close call.
7260 * mem-break.c (delete_breakpoint_at): New function.
7261 * mem-break.h (delete_breakpoint_at): Declare.
7262 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7263 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7264 [USE_WIN32API] (read, write): Add char* casts.
7265 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7266 * server.h: Include wincecompat.h on Windows CE.
7267 [HAVE_ERRNO_H]: Check.
7268 (perror): Declare if not declared.
7269 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7270 (perror_with_name): Remove errno declaration.
7271 * wincecompat.h: New.
7272 * wincecompat.c: New.
7274 * win32-arm-low.c: New.
7275 * win32-i386-low.c: New.
7276 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7277 (OUTMSG2): Make it safe.
7279 (COUNTOF): New macro.
7280 (NUM_REGS): Get it from the low target.
7281 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7282 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7283 (thread_rec): Let low target handle debug registers.
7284 (child_add_thread): Likewise.
7285 (child_init_thread_list): Likewise.
7286 (continue_one_thread): Likewise.
7288 (do_child_fetch_inferior_registers): Move to ...
7289 * win32-i386-low.c: ... here, and rename to ...
7290 (do_fetch_inferior_registers): ... this.
7291 * win32-low.c (child_fetch_inferior_registers):
7292 Go through the low target.
7293 (do_child_store_inferior_registers): Use regptr.
7294 (strwinerror): New function.
7295 (win32_create_inferior): Handle Windows CE.
7296 Use strwinerror instead of strerror on Windows error
7297 codes. Add program to the error output.
7298 Don't close the main thread handle on Windows CE.
7299 (win32_attach): Use coredll.dll on Windows CE.
7300 (win32_kill): Close current process and current
7302 (win32_detach): Use coredll.dll on Windows CE.
7303 (win32_resume): Let low target handle debug registers, and
7305 (handle_exception): Add/Remove initial breakpoint. Avoid
7306 non-existant WSTOPSIG on Windows CE.
7307 (win32_read_inferior_memory): Cast to remove warning.
7308 (win32_arch_string): Go through the low target.
7309 (initialize_low): Call set_breakpoint_data with the low
7310 target's breakpoint.
7311 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7312 FOP_REGNUM, mappings): Move to ...
7313 * win32-i386-low.c: ... here.
7314 * win32-low.c (win32_thread_info): Move to ...
7315 * win32-low.h: ... here.
7316 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7317 win32-arm-low.c and wincecompat.c.
7318 (all:): Add $EXEEXT.
7319 (install-only:): Likewise.
7320 (gdbserver:): Likewise.
7321 (gdbreplay:): Likewise.
7322 * config.in: Regenerate.
7323 * configure: Regenerate.
7325 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7327 * win32-low.c: Rename typedef thread_info to
7328 win32_thread_info throughout.
7330 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7332 * win32-i386-low.c: Rename to ...
7333 * win32-low.c: ... this.
7334 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7335 * Makefile.in: Likewise.
7337 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7339 * remote-utils.c (monitor_output): Constify msg parameter.
7340 * server.h (monitor_output): Likewise.
7341 * win32-i386-low.c (handle_output_debug_string): New.
7342 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7343 handle_output_debug_string.
7344 (get_child_debug_event): Likewise.
7346 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7348 * server.c (main): Correct strtoul check.
7350 2007-03-27 Jon Ringle <jon@ringle.org>
7352 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7354 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7356 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7358 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7360 * terminal.h: Check HAVE_SGTTY_H.
7362 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7364 * remote-utils.c (remote_open): Print out the assigned port number.
7366 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7368 * remote-utils.c (monitor_output): New function.
7369 * server.c (debug_threads): Define here.
7370 (monitor_show_help): New function.
7371 (handle_query): Handle qRcmd.
7372 (main): Do not handle 'd' packet.
7373 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7374 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7377 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7379 * Makefile.in (EXEEXT): New.
7380 (clean): Use $(EXEEXT).
7382 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7384 * target.h (target_ops): Rename send_signal to request_interrupt,
7385 and remove enum target_signal parameter.
7386 * linux-low.c (linux_request_interrupt): Rename from
7387 linux_send_signal, and always send SIGINT.
7388 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7389 and always send SIGINT.
7390 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7392 (input_interrupt): Likewise.
7394 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7396 * server.c (get_features_xml): Check if target implemented
7398 * win32-i386-low.c (win32_arch_string): New.
7399 (win32_target_ops): Add win32_arch_string as arch_string member.
7401 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7403 * spu-low.c (spu_arch_string): New.
7404 (spu_target_ops): Add spu_arch_string.
7406 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7408 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7409 * configure.ac: Do not check for terminal.h.
7410 * configure, config.in: Regenerated.
7412 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7414 * Makefile.in (OBS): Add $(XML_BUILTIN).
7415 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7417 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7418 (arm-with-iwmmxt.c): New.
7419 * config.in, configure: Regenerate.
7420 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7421 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7422 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7423 (arm*-*-linux*): Add iWMMXt and regset support.
7424 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7425 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7426 (arm_store_wmmxregset, target_regsets): New.
7427 * server.c (get_features_xml): Take annex argument. Check builtin
7429 (handle_query): Handle multiple annexes.
7431 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7433 * remote-utils.c [USE_WIN32API] (read, write): Define.
7434 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7437 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7439 * linux-i386-low.c (the_low_target): Set arch_string.
7440 * linux-x86-64-low.c (the_low_target): Likewise.
7441 * linux-low.c (linux_arch_string): New.
7442 (linux_target_ops): Add it.
7443 * linux-low.h (struct linux_target_ops): Add arch_string.
7444 * server.c (write_qxfer_response): Use const void * for DATA.
7445 (get_features_xml): New.
7446 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7447 * target.h (struct target_ops): Add arch_string method.
7449 2007-01-03 Denis Pilat <denis.pilat@st.com>
7450 Daniel Jacobowitz <dan@codesourcery.com>
7452 * linux-low.c (linux_kill): Handle being called with no threads.
7453 * win32-i386-low.c (win32_kill): Likewise.
7454 (get_child_debug_event): Clear current_process_handle.
7456 2006-12-30 Denis PILAT <denis.pilat@st.com>
7457 Daniel Jacobowitz <dan@codesourcery.com>
7459 * remote-utils.c (remote_open): Check the type of specified
7460 serial port devices before opening them.
7461 * server.c (main): Kill the inferior if an error occurs during
7462 the first remote_open.
7464 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7466 * README: Update supported targets.
7468 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7470 * Makefile.in (clean): Remove reg-mips64.c.
7471 (reg-mips64.c, reg-mips64.o): New rules.
7472 * configure.srv: Handle mips64. Include regset support for mips.
7473 * linux-mips-low.c (union mips_register): New.
7474 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7475 (mips_breakpoint, mips_breakpoint_at): Use int.
7476 (mips_collect_register, mips_supply_register)
7477 (mips_collect_register_32bit, mips_supply_register_32bit)
7478 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7479 (mips_store_fpregset, target_regsets): New.
7480 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7482 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7484 * configure.srv: Add target "spu*-*-*".
7485 * Makefile.in (clean): Remove reg-spu.c.
7486 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7487 * spu-low.c: New file.
7489 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7491 * configure.ac: Correct td_thr_tls_get_addr test.
7492 * configure: Regenerated.
7494 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7496 * linux-low.c (linux_wait_for_event): Reformat. Use the
7498 * remote-utils.c (decode_address_to_semicolon): New.
7499 * server.c (pass_signals, handle_general_set): New.
7500 (handle_query): Mention QPassSignals for qSupported.
7501 (main): Call handle_general_set.
7502 * server.h (pass_signals, decode_address_to_semicolon): New.
7504 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7506 * server.c (handle_query): Correct error handling for read_auxv.
7508 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7510 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7511 and srv_linux_thread_db to yes.
7512 * linux-s390-low.c (s390_fill_gregset): New function.
7513 (target_regsets): Define data structure.
7515 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7517 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7518 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7519 * config.in, configure: Regenerated.
7520 * inferiors.c (gdb_id_to_thread): New function.
7521 (gdb_id_to_thread_id): Use it.
7522 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7523 * linux-low.h (struct process_info): Add th member.
7524 (thread_db_get_tls_address): New prototype.
7525 * remote-utils.c (decode_address): Make non-static.
7526 * server.c (handle_query): Handle qGetTLSAddr.
7527 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7528 * target.h (struct target_ops): Add get_tls_address.
7529 * thread-db.c (maybe_attach_thread): Save the thread handle.
7530 (thread_db_get_tls_address): New.
7532 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7534 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7535 (linux_resume_one_process): Take a siginfo_t *. Update all
7536 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7537 (struct pending_signals): Add a siginfo_t.
7538 (linux_wait_for_process): Always set last_status.
7539 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7540 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7541 * linux-low.h (struct process_info): Add last_status.
7543 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7545 * remote-utils.c (try_rle): New function.
7546 (putpkt_binary): Use it.
7548 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7550 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7551 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7552 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7553 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7554 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7557 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7559 * server.c (terminal_fd): New variable.
7560 (old_foreground_pgrp): Likewise.
7561 (restore_old_foreground_pgrp): New function.
7562 (start_inferior): Record the terminal file descriptor in terminal_fd
7563 and its original foreground group in old_foreground_pgrp. Register
7564 restore_old_foreground_pgrp with atexit().
7566 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7568 * server.c (handle_query): Correct qPart to qXfer.
7570 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7572 * configure.ac: Check for more headers which are missing on
7573 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7574 * configure.srv: Add Cygwin and mingw32.
7575 * remote-utils.c: Don't include headers unconditionally which
7576 are missing on mingw32. Include <winsock.h> for mingw32.
7577 (remote_open): Adjust for mingw32 support. Flush
7578 standard error after writing to it.
7579 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7580 (unblock_async_io, enable_async_io, disable_async_io)
7581 (readchar, getpkt): Update for Winsock support.
7582 (prepare_resume_reply): Expect a protocol signal number.
7583 * server.c: Disable <sys/wait.h> on mingw32.
7584 (start_inferior): Adjust for mingw32 support. Flush
7585 standard error after writing to it.
7586 (attach_inferior): Likewise. Use protocol signal
7588 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7590 * win32-i386-low.c: New file.
7591 * Makefile.in (XM_CLIBS): Set.
7592 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7593 (win32-i386-low.o): New dependency rule.
7594 * linux-low.c (linux_wait): Use target signal numbers.
7595 * target.h (struct target_ops): Doc fix.
7596 * server.h (target_signal_to_name): New prototype.
7597 * gdbreplay.c: Don't include headers unconditionally which
7598 are missing on mingw32. Include <winsock.h> for mingw32.
7599 (remote_close, remote_open): Adjust for Winsock support.
7600 * configure, config.in: Regenerated.
7602 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7604 * server.c (decode_xfer_read, write_qxfer_response): New.
7605 (handle_query): Take a packet length argument. Handle
7606 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7607 the qSupported response.
7608 (main): Update call to handle_query.
7610 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7612 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7613 (putpkt_binary): Renamed from putpkt and adjusted for binary
7615 (putpkt): New wrapper for putpkt_binary.
7616 (readchar): Don't mask off the high bit.
7617 (decode_X_packet): New function.
7618 * server.c (main): Call putpkt_binary if a handler sets the packet
7619 length. Save the length of the incoming packet. Handle 'X'.
7620 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7622 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7624 * server.c (handle_query): Handle qSupported.
7626 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7628 * remote-utils.c (all_symbols_looked_up): New variable.
7629 (look_up_one_symbol): Check it.
7630 * server.h (look_up_one_symbol): New declaration.
7631 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7633 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7635 * Makefile.in (linux-arm-low.o): Update dependencies.
7636 * linux-arm-low.c: Include "gdb_proc_service.h".
7637 (PTRACE_GET_THREAD_AREA): Define.
7638 (ps_get_thread_area): New function.
7640 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7642 * configure.srv (m68k*-*-uclinux*): New target.
7643 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7644 (linux_resume_one_process): Remove extraneous cast.
7645 (linux_read_offsets): New.
7646 (linux_target_op): Add linux_read_offsets on mmuless systems.
7647 * server.c (handle_query): Add qOffsets logic.
7648 * target.h (struct target_ops): Add read_offsets.
7650 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7652 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7653 (PTRACE_GET_THREAD_AREA): Define.
7654 (ps_get_thread_area): New function.
7655 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7656 (linux-x86-64-low.o): Update.
7658 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7660 * configure.ac: Remove checks for prfpregset_t.
7661 * gdb_proc_service.h: New file.
7662 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7663 new "gdb_proc_service.h".
7664 * proc-service.c: Likewise.
7665 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7666 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7667 * Makefile.in (gdb_proc_service_h): Updated.
7668 * configure, config.in: Regenerated.
7670 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7672 * remote-utils.c (prepare_resume_reply): Move declaration
7673 of gdb_id_from_wait to the top of the block.
7675 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7677 * linux-low.c (regsets_store_inferior_registers): Read the regset
7678 from the target before filling it.
7680 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7682 * server.c (attach_inferior): Return SIGTRAP for a successful
7685 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7687 * Makefile.in (OBS): Add version.o.
7688 (STAGESTUFF): Delete.
7689 (version.o): Add dependencies.
7690 (version.c): Replace rule.
7691 (clean): Remove version.c.
7692 * server.c (gdbserver_version): New.
7693 (gdbserver_usage): Use printf.
7694 (main): Handle --version and --help.
7695 * server.h (version, host_name): Add declarations.
7697 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7709 * linux-x86-64-low.c:
7712 * linux-ppc64-low.c:
7721 * linux-crisv32-low.c:
7733 * gdbserver.1: Add (C) after Copyright. Update the FSF
7736 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7738 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7739 (arm_breakpoint_at): Recognize both breakpoints.
7740 (the_low_target): Use the correct breakpoint instruction.
7742 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7744 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7745 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7746 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7747 (the_low_target): Update.
7749 2005-10-25 Andreas Schwab <schwab@suse.de>
7751 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7753 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7754 (ia64_num_regs): Reduce to 462.
7756 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7758 * acinclude.m4: Correct quoting.
7759 * aclocal.m4: Regenerated.
7761 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7762 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7763 (thread_db_init): Call thread_db_err_str.
7764 * configure.ac: Check for TD_VERSION.
7765 * config.in, configure: Regenerated.
7767 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7769 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7771 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7773 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7774 is not available. Define HAVE_PTRACE_GETREGS if it is.
7775 * config.in, configure: Regenerated.
7776 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7777 * linux-i386-low.c, linux-m68k-low.c: Update to use
7778 HAVE_PTRACE_GETREGS.
7779 * linux-low.c (regsets_fetch_inferior_registers)
7780 (regsets_store_inferior_registers): Only return 0 if we processed
7782 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7783 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7785 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7787 * inferiors.c (struct thread_info): Add gdb_id.
7788 (add_thread): Add gdb_id argument.
7789 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7790 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7791 calls to add_thread.
7792 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7793 * server.c (handle_query): Use thread_to_gdb_id.
7794 (handle_v_cont, main): Use gdb_id_to_thread_id.
7795 * server.h (add_thread): Update prototype.
7796 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7799 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7801 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7802 left-padded registers.
7803 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7804 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7806 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7808 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7809 * configure: Regenerate.
7810 * config.in: Regenerate.
7811 * server.h (NEED_DECLARATION_STRERROR):
7812 Replace with !HAVE_DECL_STRERROR.
7814 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7816 * linux-low.c (linux_wait, linux_send_signal): Don't test
7817 an unsigned long variable for > 0 if it could be MAX_ULONG.
7818 * server.c (myresume): Likewise.
7819 * target.c (set_desired_inferior): Likewise.
7821 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7823 * configure.ac: Simplify and improve check for socklen_t.
7824 * configure, config.in: Regenerate.
7826 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7828 * acconfig.h: Remove.
7829 * configure.ac: Add a test for socklen_t. Use three-argument
7830 AC_DEFINE throughout.
7831 * config.in: Regenerated using autoheader 2.59.
7832 * configure: Regenerated.
7834 * gdbreplay.c (socklen_t): Provide a default.
7835 (remote_open): Use socklen_t.
7836 * remote-utils.c (socklen_t): Provide a default.
7837 (remote_open): Use socklen_t.
7838 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7841 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7843 * linux-low.c (linux_read_memory, linux_write_memory)
7844 (linux_read_auxv): Likewise.
7845 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7846 (check_mem_write): Likewise.
7847 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7849 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7850 (registers_from_string, register_data): Likewise.
7851 * server.c (handle_query, main): Likewise.
7852 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7853 (decode_M_packet): Likewise.
7854 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7855 * target.h (struct target_ops): Update read_memory, write_memory,
7857 (read_inferior_memory, write_inferior_memory): Update.
7858 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7860 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7861 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7862 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7863 linux-s390-low.c, linux-sh-low.c: Update for changes in
7864 read_inferior_memory and the_low_target->breakpoint.
7866 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7868 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7869 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7870 * configure.srv: Add powerpc64-*-linux*.
7871 * linux-ppc64-low.c: New file.
7873 2005-05-23 Orjan Friberg <orjanf@axis.com>
7875 * linux-cris-low.c: New file with support for CRIS.
7876 * linux-crisv32-low.c: Ditto for CRISv32.
7877 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7878 (clean): Add reg-cris.c and reg-crisv32.c.
7879 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7880 reg-crisv32.o, and reg-crisv32.c to make rules.
7881 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7884 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7886 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7887 of sizeof (PTRACE_XFER_TYPE).
7888 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7890 2005-05-12 Orjan Friberg <orjanf@axis.com>
7892 * target.h (struct target_ops): Add insert_watchpoint,
7893 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7894 pointers for hardware watchpoint support.
7895 * linux-low.h (struct linux_target_ops): Ditto.
7896 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7897 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7898 to linux_target_ops.
7899 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7901 * server.c (main): Recognize 'Z' and 'z' packets.
7903 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7905 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7906 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7907 (the_low_target): Add new members.
7909 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7911 * proc-service.c (ps_lgetregs): Search all_processes instead of
7914 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7916 * server.c (start_inferior): Change return type to int.
7917 (attach_inferior): Change sigptr to int *.
7918 (handle_v_cont, handle_v_requests): Change signal to int *.
7919 (main): Change signal to int.
7921 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7923 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7924 * configure.srv: Add m32r*-*-linux*.
7925 * linux-m32r-low.c: New file.
7927 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7929 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7931 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7933 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7934 Take unsigned long arguments for PIDs.
7935 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7936 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7937 (wait_for_sigstop, linux_resume_one_process)
7938 (regsets_fetch_inferior_registers, linux_send_signal)
7939 (linux_read_auxv): Likewise. Update the types of variables holding
7940 PIDs. Update format string specifiers.
7941 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7942 * remote-utils.c (prepare_resume_reply): Likewise.
7943 * server.c (cont_thread, general_thread, step_thread)
7944 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7946 (handle_query): Update format specifiers.
7947 (handle_v_cont, main): Use strtoul for thread IDs.
7948 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7949 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7950 (general_thread, step_thread, thread_from_wait)
7951 (old_thread_from_wait): Update.
7952 * target.h (struct thread_resume): Use unsigned long for THREAD.
7953 (struct target_ops): Use unsigned long for arguments to attach and
7956 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7958 * acinclude.m4: Include bfd/bfd.m4 directly.
7959 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7960 <agriffis@toolchain.org>.
7961 * aclocal.m4, configure: Regenerated.
7963 2005-01-07 Andrew Cagney <cagney@gnu.org>
7965 * configure.ac: Rename configure.in, require autoconf 2.59.
7966 * configure: Re-generate.
7968 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7970 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7972 * aclocal.m4: Regenerated.
7973 * configure: Regenerated.
7975 2004-11-21 Andreas Schwab <schwab@suse.de>
7977 * linux-m68k-low.c (m68k_num_gregs): Define.
7978 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7979 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7980 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7981 (m68k_breakpoint_at): New. Add to the_low_target.
7983 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7984 srv_linux_thread_db to yes.
7986 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7988 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7989 (ARCH_SET_FS): Likewise.
7990 (ARCH_GET_FS): Likewise.
7991 (ARCH_GET_GS): Likewise.
7993 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7995 * linux-i386-low.c (ps_get_thread_area): New.
7996 * linux-x86-64-low.c (ps_get_thread_area): New.
7997 * linux-low.c: Include <sys/syscall.h>.
7998 (linux_kill_one_process): Don't kill the first thread here.
7999 (linux_kill): Kill the first thread here.
8000 (kill_lwp): New function.
8001 (send_sigstop, linux_send_signal): Use it.
8002 * proc-service.c: Clean up #ifdefs.
8003 (fpregset_info): Delete.
8004 (ps_lgetregs): Update and enable implementation.
8005 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8007 * remote-utils.c (struct sym_cache, symbol_cache): New.
8008 (input_interrupt): Print a clearer message.
8009 (async_io_enabled): New variable.
8010 (enable_async_io, disable_async_io): Use it. Update comments.
8011 (look_up_one_symbol): Use the symbol cache.
8012 * thread-db.c (thread_db_look_up_symbols): New function.
8013 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8015 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8017 * configure.in: Test for -rdynamic.
8018 * configure: Regenerated.
8019 * Makefile (INTERNAL_LDFLAGS): New.
8020 (gdbserver, gdbreplay): Use it.
8022 2004-09-02 Andrew Cagney <cagney@gnu.org>
8024 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8026 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8028 * linux-low.c (linux_wait): Clear all_processes list also.
8030 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8032 * linux-low.c: Include <errno.h>. Remove extern declaration of
8035 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8037 * gdbreplay.c, server.h, utils.c: Update copyright years.
8039 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8041 * server.c (main): Print child status or termination signal from
8042 variable 'signal', not 'sig'.
8044 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8046 * linux-low.c (linux_read_memory): Change return type to
8047 int. Check for and return error from ptrace().
8048 * target.c (read_inferior_memory): Change return type to int. Pass
8049 back return status from the_target->read_memory().
8050 * target.h (struct target_ops): Adapt *read_memory() prototype.
8052 (read_inferior_memory): Adapt prototype.
8053 * server.c (main): Return an error packet if
8054 read_inferior_memory() returns an error.
8056 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8058 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8059 Unify with other clean targets.
8061 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8063 * server.c (handle_v_cont): Call set_desired_inferior.
8065 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8067 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8069 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8071 * linux-low.c (linux_wait): Unblock async I/O.
8072 (linux_resume): Block and enable async I/O.
8073 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8074 * server.h (block_async_io, unblock_async_io): Add prototypes.
8076 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8078 * remote-utils.c (remote_open): Print a status notice after
8080 * server.c (attach_inferior): Print a status notice after
8083 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8085 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8087 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8089 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8091 * server.c, target.h: Update copyright years.
8093 2004-02-25 Roland McGrath <roland@redhat.com>
8095 * target.h (struct target_ops): New member `read_auxv'.
8096 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8097 * linux-low.c (linux_read_auxv): New function.
8098 (linux_target_ops): Initialize `read_auxv' member to that.
8100 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8102 Committed by Jim Blandy <jimb@redhat.com>.
8104 * linux-s390-low.c (s390_num_regs): Update.
8105 (s390_regmap): Remove control registers. Use __s390x__ predefine
8106 instead of GPR_SIZE to distiguish s390 and s390x targets.
8108 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8110 * linux-low.c: Update copyright year.
8111 (check_removed_breakpoint): Clear pending_is_breakpoint.
8112 (linux_set_resume_request, linux_queue_one_thread)
8113 (resume_status_pending_p): New functions.
8114 (linux_continue_one_thread): Use process->resume.
8115 (linux_resume): Only resume threads if there are no pending events.
8116 * linux-low.h (struct process_info): Add resume request
8119 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8121 * regcache.c (new_register_cache): Clear the allocated register
8122 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8124 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8126 * linux-low.c (linux_resume): Take a struct thread_resume *
8128 (linux_wait): Update call.
8129 (resume_ptr): New static variable.
8130 (linux_continue_one_thread): Renamed from
8131 linux_continue_one_process. Use resume_ptr.
8132 (linux_resume): Use linux_continue_one_thread.
8133 * server.c (handle_v_cont, handle_v_requests): New functions.
8134 (myresume): New function.
8135 (main): Handle 'v' case.
8136 * target.h (struct thread_resume): New type.
8137 (struct target_ops): Change argument of "resume" to struct
8139 (myresume): Delete macro.
8141 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8143 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8144 (uninstall): Support DESTDIR.
8146 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8148 * configure.srv: Add xscale*linux copy of arm*linux entry.
8150 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8152 * linux-arm-low.c (arm_reinsert_addr): New function.
8153 (the_low_target): Add arm_reinsert_addr.
8155 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8157 * mem-break.c: Remove whitespace at end of file.
8159 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8161 * configure.in: Check whether we need to prototype strerror.
8162 * server.h: Optionally prototype strerror.
8163 * gdbreplay.c (perror_with_name): Use strerror.
8164 * linux-low.c (linux_attach_lwp): Use strerror.
8165 * utils.c (perror_with_name): Use strerror.
8166 * config.in, configure: Regenerated.
8168 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8170 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8171 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8173 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8175 * Makefile.in (SFILES): Update.
8176 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8177 low-sun3.c: Remove files.
8179 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8181 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8182 (linux_detach_one_process, linux_detach): New functions.
8183 (linux_target_ops): Add linux_detach.
8184 * server.c (main): Handle 'D' packet.
8185 * target.h (struct target_ops): Add "detach" member.
8186 (detach_inferior): Define.
8188 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8190 From Kelley Cook <kelleycook@wideopenwest.com>:
8191 * configure.srv: Accept i[34567]86 variants.
8193 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8195 * linux-low.c (linux_wait_for_event): Correct comment typos.
8196 (linux_resume_one_process): Call check_removed_breakpoint.
8197 (linux_send_signal): New function.
8198 (linux_target_ops): Add linux_send_signal.
8199 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8201 * target.h (struct target_ops): Add send_signal.
8203 2003-05-29 Jim Blandy <jimb@redhat.com>
8205 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8206 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8207 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8208 away part of the register's value.
8210 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8212 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8213 (linux_wait_for_event, linux_init_signals): Likewise.
8215 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8217 * configure.in: Check for stdlib.h.
8218 * configure: Regenerated.
8219 * config.in: Regenerated.
8221 2003-01-04 Andreas Schwab <schwab@suse.de>
8223 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8225 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8227 * Makefile.in: Remove obsolete code.
8229 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8231 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8232 defined(PT_FPR0_HI).
8234 2002-11-17 Stuart Hughes <seh@zee2.com>
8236 * linux-arm-low.c (arm_num_regs): Increase.
8237 (arm_regmap): Include status register.
8239 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8241 * linux-low.c (register_addr): Remove incorrect -1 check.
8243 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8245 * linux-low.c (linux_create_inferior): Call setpgid. Return
8247 (unstopped_p, linux_signal_pid): Remove.
8248 (linux_target_ops): Remove linux_signal_pid.
8249 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8250 global instead of target method.
8251 * target.h (struct target_ops): Remove signal_pid. Update comment
8252 for create_inferior.
8253 * server.c (signal_pid): New variable.
8254 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8255 gdbserver. Set the child to be the foreground process group.
8256 (attach_inferior): Set signal_pid.
8258 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8260 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8262 2002-08-20 Jim Blandy <jimb@redhat.com>
8264 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8267 2002-08-01 Andrew Cagney <cagney@redhat.com>
8269 * Makefile.in: Make chill references obsolete.
8271 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8273 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8274 * configure: Regenerate.
8275 * config.in: Regenerate.
8277 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8279 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8280 (perror_with_name, remote_close, remote_open, expect, play): Static.
8282 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8284 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8285 byte offsets instead of an array of indexes.
8286 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8288 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8290 * regcache.c: Add comment.
8292 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8294 * thread-db.c: New file.
8295 * proc-service.c: New file.
8296 * acinclude.m4: New file.
8297 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8298 proc-service.o, and thread-db.o.
8299 (linux-low.o): Add USE_THREAD_DB.
8300 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8301 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8302 * aclocal.m4: Regenerated.
8303 * config.in: Regenerated.
8304 * configure: Regenerated.
8305 * configure.in: Check for proc_service.h, sys/procfs.h,
8306 thread_db.h, and linux/elf.h headrs.
8307 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8308 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8309 Check for -lthread_db and thread support.
8310 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8311 PowerPC, and SuperH.
8312 * i387-fp.c: Constify arguments.
8313 * i387-fp.h: Likewise.
8314 * inferiors.c: (struct thread_info): Renamed from
8315 `struct inferior_info'. Remove PID member. Use generic inferior
8316 list header. All uses updated.
8317 (inferiors, signal_pid): Removed.
8318 (all_threads): New variable.
8319 (get_thread): Define.
8320 (add_inferior_to_list): New function.
8321 (for_each_inferior): New function.
8322 (change_inferior_id): New function.
8323 (add_inferior): Removed.
8324 (remove_inferior): New function.
8325 (add_thread): New function.
8326 (free_one_thread): New function.
8327 (remove_thread): New function.
8328 (clear_inferiors): Use for_each_inferior and free_one_thread.
8329 (find_inferior): New function.
8330 (find_inferior_id): New function.
8331 (inferior_target_data): Update argument type.
8332 (set_inferior_target_data): Likewise.
8333 (inferior_regcache_data): Likewise.
8334 (set_inferior_regcache_data): Likewise.
8335 * linux-low.c (linux_bp_reinsert): Remove.
8336 (all_processes, stopping_threads, using_thrads)
8337 (struct pending_signals, debug_threads, pid_of): New.
8338 (inferior_pid): Replace with macro.
8339 (struct inferior_linux_data): Remove.
8340 (get_stop_pc, add_process): New functions.
8341 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8342 Use add_process and add_thread.
8343 (linux_attach_lwp): New function, based on old linux_attach. Use
8344 add_process and add_thread. Set stop_expected for new threads.
8345 (linux_attach): New function.
8346 (linux_kill_one_process): New function.
8347 (linux_kill): Kill all LWPs.
8348 (linux_thread_alive): Use find_inferior_id.
8349 (check_removed_breakpoints, status_pending_p): New functions.
8350 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8351 Update. Use WNOHANG. Wait for cloned processes also. Update process
8352 struct for the found process.
8353 (linux_wait_for_event): New function.
8354 (linux_wait): Use it. Support LWPs.
8355 (send_sigstop, wait_for_sigstop, stop_all_processes)
8356 (linux_resume_one_process, linux_continue_one_process): New functions.
8357 (linux_resume): Support LWPs.
8358 (REGISTER_RAW_SIZE): Remove.
8359 (fetch_register): Use register_size instead. Call supply_register.
8360 (usr_store_inferior_registers): Likewise. Call collect_register.
8362 (regsets_fetch_inferior_registers): Improve error message.
8363 (regsets_store_inferior_registers): Add debugging.
8364 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8365 (unstopped_p, linux_signal_pid): New functions.
8366 (linux_target_ops): Add linux_signal_pid.
8367 (linux_init_signals): New function.
8368 (initialize_low): Call it. Initialize using_threads.
8369 * regcache.c (inferior_regcache_data): Add valid
8371 (get_regcache): Fetch registers lazily. Add fetch argument
8372 and update all callers.
8373 (regcache_invalidate_one, regcache_invalidate): New
8375 (new_register_cache): Renamed from create_register_cache.
8376 Return the new regcache.
8377 (free_register_cache): Change argument to a void *.
8378 (registers_to_string, registers_from_string): Call get_regcache
8379 with fetch flag set.
8380 (register_data): Make static. Pass fetch flag to get_regcache.
8381 (supply_register): Call get_regcache with fetch flag clear.
8382 (collect_register): Call get_regcache with fetch flag set.
8383 (collect_register_as_string): New function.
8384 * regcache.h: Update.
8385 * remote-utils.c (putpkt): Flush after debug output and use
8387 Handle input interrupts while waiting for an ACK.
8388 (input_interrupt): Use signal_pid method.
8389 (getpkt): Flush after debug output and use stderr.
8390 (outreg): Use collect_register_as_string.
8391 (new_thread_notify, dead_thread_notify): New functions.
8392 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8394 (look_up_one_symbol): Flush after debug output.
8395 * server.c (step_thread, server_waiting): New variables.
8396 (start_inferior): Don't use signal_pid. Update call to mywait.
8397 (attach_inferior): Update call to mywait.
8398 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8399 (main): Don't fetch/store registers explicitly. Use
8400 set_desired_inferior. Support proposed ``Hs'' packet. Update
8403 (struct inferior_list, struct_inferior_list_entry): New.
8404 * target.c (set_desired_inferior): New.
8405 (write_inferior_memory): Constify.
8406 (mywait): New function.
8408 (struct target_ops): New signal_pid method.
8409 (mywait): Removed macro, added prototype.
8411 * linux-low.h (regset_func): Removed.
8412 (regset_fill_func, regset_store_func): New.
8413 (enum regset_type): New.
8414 (struct regset_info): Add type field. Use new operation types.
8415 (struct linux_target_ops): stop_pc renamed to get_pc.
8416 Add decr_pc_after_break and breakpoint_at.
8417 (get_process, get_thread_proess, get_process_thread)
8418 (strut process_info, all_processes, linux_attach_lwp)
8419 (thread_db_init): New.
8421 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8422 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8423 (the_low_target): Add new members.
8424 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8425 (i386_store_fpxregset): Constify.
8426 (target_regsets): Add new kind identifier.
8427 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8428 (i386_set_pc): Add debugging.
8429 (i386_breakpoint_at): New function.
8430 (the_low_target): Add new members.
8431 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8432 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8433 (mips_breakpoint_at): New.
8434 (the_low_target): Add new members.
8435 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8436 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8437 (the_low_target): Add new members.
8438 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8439 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8440 (the_low_target): Add new members.
8441 * linux-x86-64-low.c (target_regsets): Add new kind
8444 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8446 From Martin Pool <mbp@samba.org>:
8447 * server.c (gdbserver_usage): New function.
8450 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8452 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8455 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8457 * Makefile.in: Remove obsolete code.
8459 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8461 * linux-low.c (regsets_fetch_inferior_registers),
8462 (regsets_store_inferior_registers): Removed cast to int from
8464 * regcache.h: Added declaration of struct inferior_info.
8466 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8468 * inferiors.c (struct inferior_info): Add regcache_data.
8469 (add_inferior): Call create_register_cache.
8470 (clear_inferiors): Call free_register_cache.
8471 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8472 * regcache.c (struct inferior_regcache_data): New.
8473 (registers): Remove.
8474 (get_regcache): New function.
8475 (create_register_cache, free_register_cache): New functions.
8476 (set_register_cache): Don't initialize the register cache here.
8477 (registers_to_string, registers_from_string, register_data): Call
8479 * regcache.h: Add prototypes.
8480 * server.h: Likewise.
8482 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8484 * mem-break.c: New file.
8485 * mem-break.h: New file.
8486 * Makefile.in: Add mem-break.o rule; update server.h
8488 * inferiors.c (struct inferior_info): Add target_data
8490 (clear_inferiors): Free target_data member if set.
8491 (inferior_target_data, set_inferior_target_data): New functions.
8492 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8493 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8494 * linux-low.c (linux_bp_reinsert): New variable.
8495 (struct inferior_linux_data): New.
8496 (linux_create_inferior): Use set_inferior_target_data.
8497 (linux_attach): Likewise. Call add_inferior.
8498 (linux_wait_for_one_inferior): New function.
8499 (linux_wait): Call it.
8500 (linux_write_memory): Add const.
8501 (initialize_low): Call set_breakpoint_data.
8502 * linux-low.h (struct linux_target_ops): Add breakpoint
8504 * server.c (attach_inferior): Remove extra add_inferior
8506 * server.h: Include mem-break.h. Update inferior.c
8508 * target.c (read_inferior_memory)
8509 (write_inferior_memory): New functions.
8510 * target.h (read_inferior_memory)
8511 (write_inferior_memory): Change macros to prototypes.
8512 (struct target_ops): Update comments. Add const to write_memory
8515 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8517 * linux-low.c (usr_store_inferior_registers): Support
8518 registers which are allowed to fail to store.
8519 * linux-low.h (linux_target_ops): Likewise.
8520 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8521 (ppc_cannot_store_register): FPSCR may not be storable.
8523 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8525 * server.h: Include <string.h> if HAVE_STRING_H.
8526 * ChangeLog: Correct paths in last ChangeLog entry.
8528 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8530 * linux-low.h: Remove obsolete prototypes.
8531 (struct linux_target_ops): New.
8532 (extern the_low_target): New.
8533 * linux-low.c (num_regs, regmap): Remove declarations.
8534 (register_addr): Use the_low_target explicitly.
8535 (fetch_register): Likewise.
8536 (usr_fetch_inferior_registers): Likewise.
8537 (usr_store_inferior_registers): Likewise.
8538 * linux-arm-low.c (num_regs): Remove.
8539 (arm_num_regs): Define.
8540 (arm_regmap): Renamed from regmap, made static.
8541 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8543 (arm_cannot_store_register): Renamed from cannot_store_register,
8545 (the_low_target): New.
8546 * linux-i386-low.c (num_regs): Remove.
8547 (i386_num_regs): Define.
8548 (i386_regmap): Renamed from regmap, made static.
8549 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8551 (i386_cannot_store_register): Renamed from cannot_store_register,
8553 (the_low_target): New.
8554 * linux-ia64-low.c (num_regs): Remove.
8555 (ia64_num_regs): Define.
8556 (ia64_regmap): Renamed from regmap, made static.
8557 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8559 (ia64_cannot_store_register): Renamed from cannot_store_register,
8561 (the_low_target): New.
8562 * linux-m68k-low.c (num_regs): Remove.
8563 (m68k_num_regs): Define.
8564 (m68k_regmap): Renamed from regmap, made static.
8565 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8567 (m68k_cannot_store_register): Renamed from cannot_store_register,
8569 (the_low_target): New.
8570 * linux-mips-low.c (num_regs): Remove.
8571 (mips_num_regs): Define.
8572 (mips_regmap): Renamed from regmap, made static.
8573 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8575 (mips_cannot_store_register): Renamed from cannot_store_register,
8577 (the_low_target): New.
8578 * linux-ppc-low.c (num_regs): Remove.
8579 (ppc_num_regs): Define.
8580 (ppc_regmap): Renamed from regmap, made static.
8581 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8583 (ppc_cannot_store_register): Renamed from cannot_store_register,
8585 (the_low_target): New.
8586 * linux-s390-low.c (num_regs): Remove.
8587 (s390_num_regs): Define.
8588 (s390_regmap): Renamed from regmap, made static.
8589 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8591 (s390_cannot_store_register): Renamed from cannot_store_register,
8593 (the_low_target): New.
8594 * linux-sh-low.c (num_regs): Remove.
8595 (sh_num_regs): Define.
8596 (sh_regmap): Renamed from regmap, made static.
8597 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8599 (sh_cannot_store_register): Renamed from cannot_store_register,
8601 (the_low_target): New.
8602 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8603 (the_low_target): New.
8605 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8607 * Makefile.in: Add stamp-h target.
8608 * configure.in: Create stamp-h.
8609 * configure: Regenerated.
8611 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8613 * inferiors.c: New file.
8614 * target.c: New file.
8615 * target.h: New file.
8616 * Makefile.in: Add target.o and inferiors.o. Update
8618 * linux-low.c (inferior_pid): New static variable,
8619 moved from server.c.
8620 (linux_create_inferior): Renamed from create_inferior.
8621 Call add_inferior. Return 0 on success instead of a PID.
8622 (linux_attach): Renamed from myattach.
8623 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8624 (linux_thread_alive): Renamed from mythread_alive.
8625 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8627 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8628 (regsets_store_inferior_registers): Correct error message.
8629 Add missing ``return 0''.
8630 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8631 (linux_store_registers): Renamed from store_inferior_registers.
8632 (linux_read_memory): Renamed from read_inferior_memory.
8633 (linux_write_memory): Renamed from write_inferior_memory.
8634 (linux_target_ops): New structure.
8635 (initialize_low): Call set_target_ops ().
8636 * remote-utils.c (unhexify): New function.
8637 (hexify): New function.
8638 (input_interrupt): Send signals to ``signal_pid''.
8639 * server.c (inferior_pid): Remove.
8640 (start_inferior): Update create_inferior call.
8641 (attach_inferior): Call add_inferior.
8642 (handle_query): New function.
8643 (main): Call handle_query for `q' packets.
8644 * server.h: Include "target.h". Remove obsolete prototypes.
8645 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8647 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8649 * Makefile.in: Add WARN_CFLAGS. Update configury
8651 * configure.in: Check for <string.h>
8652 * configure: Regenerate.
8653 * config.in: Regenerate.
8654 * gdbreplay.c: Include needed system headers.
8655 (remote_open): Remove strchr prototype.
8656 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8657 * regcache.c (supply_register): Change buf argument to const void *.
8658 (supply_register_by_name): Likewise.
8659 (collect_register): Change buf argument to void *.
8660 (collect_register_by_name): Likewise.
8661 * regcache.h: Add missing prototypes.
8662 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8663 * server.c (handle_query): New function.
8664 (attached): New static variable, moved out of main.
8665 (main): Quiet longjmp clobber warnings.
8666 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8667 * utils.c (error): Remove NORETURN.