1 2013-09-05 Pedro Alves <palves@redhat.com>
3 * server.h (current_process, get_thread_process, all_processes)
4 (add_inferior_to_list, for_each_inferior, current_inferior)
5 (remove_inferior, add_process, remove_process, find_process_pid)
6 (have_started_inferiors_p, have_attached_inferiors_p)
7 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8 (clear_inferiors, find_inferior, find_inferior_id)
9 (inferior_target_data, set_inferior_target_data)
10 (inferior_regcache_data, set_inferior_regcache_data): Move to
11 inferiors.h, and include it.
12 * inferiors.h: New file.
14 2013-09-05 Pedro Alves <palves@redhat.com>
16 * server.h (struct emit_ops, current_insn_ptr, emit_error):
20 2013-09-05 Pedro Alves <palves@redhat.com>
22 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
24 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
25 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
26 (handle_tracepoint_general_set, handle_tracepoint_query)
27 (tracepoint_finished_step, tracepoint_was_hit)
28 (release_while_stepping_state_list, current_traceframe)
29 (in_readonly_region, traceframe_read_mem)
30 (fetch_traceframe_registers, traceframe_read_sdata)
31 (traceframe_read_info, struct fast_tpoint_collect_status)
32 (fast_tracepoint_collecting, force_unlock_trace_buffer)
33 (handle_tracepoit_bkpts, initialize_low_tracepoint)
34 (supply_fast_tracepoint_registers)
35 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
36 (ipa_tdesc, claim_trampoline_space)
37 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
38 (agent_mem_read, agent_get_trace_state_variable_value)
39 (agent_set_trace_state_variable_value, agent_tsv_read)
40 (agent_mem_read_string, get_raw_reg_func_addr)
41 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
42 * tracepoint.h: ... this new file.
44 2013-09-05 Pedro Alves <palves@redhat.com>
46 * server.h (perror_with_name, error, fatal, warning, paddress)
47 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
51 2013-09-05 Pedro Alves <palves@redhat.com>
53 * server.h (remote_debug, noack_mode, transport_is_reliable)
54 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
55 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
56 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
57 (write_enn, initialize_async_io, enable_async_io)
58 (disable_async_io, check_remote_input_interrupt_request)
59 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
60 (dead_thread_notify, prepare_resume_reply)
61 (decode_address_to_semicolon, decode_address, decode_m_packet)
62 (decode_M_packet, decode_X_packet, decode_xfer_write)
63 (decode_search_memory_packet, unhexify, hexify)
64 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
65 (look_up_one_symbol, relocate_instruction)
66 (monitor_output): Move to remote-utils.h, and include it.
67 * remote-utils.h: New file.
69 2013-09-05 Pedro Alves <palves@redhat.com>
71 * server.h (_): Delete.
73 2013-09-02 Pedro Alves <palves@redhat.com>
75 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
76 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
78 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
80 2013-09-02 Pierre Muller <muller@sourceware.org>
82 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
83 or WriteProcessMemory complete successfully and handle
84 ERROR_PARTIAL_COPY error.
86 2013-09-02 Pedro Alves <palves@redhat.com>
88 * server.c (gdb_read_memory): Return -1 on traceframe memory read
91 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
94 * linux-low.c: Include filestuff.h.
95 (linux_create_inferior) <pid == 0>: Call close_most_fds.
96 * lynx-low.c: Include filestuff.h.
97 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
98 * server.c: Include filestuff.h.
99 (main): Call notice_open_fds.
100 * spu-low.c: Include filestuff.h.
101 (spu_create_inferior) <pid == 0>: Call close_most_fds.
103 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
105 * Makefile.in: Explain why ../target and ../nat are not
106 listed as include file search paths.
107 (linux-waitpid.o): New object file rule.
108 * configure.srv (srv_native_linux_obj): New variable.
109 Replace all occurrences of linux native object files with
110 $srv_native_linux_obj.
111 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
112 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
113 (linux_enable_event_reporting): Remove declaration.
114 (my_waitpid): Moved to common/linux-waitpid.c.
115 (linux_wait_for_event): Pass ptid when calling
116 linux_enable_event_reporting.
117 (linux_supports_tracefork_flag): Remove.
118 (linux_enable_event_reporting): Likewise.
119 (linux_tracefork_grandchild): Remove.
120 (STACK_SIZE): Moved to common/linux-ptrace.c.
121 (linux_tracefork_child): Remove.
122 (linux_test_for_tracefork): Remove.
123 (linux_look_up_symbols): Call linux_supports_traceclone.
124 (initialize_low): Remove call to linux_test_for_tracefork.
125 * linux-low.h (PTRACE_TYPE_ARG3): Move to
126 common/linux-ptrace.h.
127 (PTRACE_TYPE_ARG4): Likewise.
128 Include linux-ptrace.h.
130 2013-08-21 Pedro Alves <palves@redhat.com>
132 * config.in: Renegerate.
134 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
136 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
137 (SFILES): Remove $(srcdir)/common/target-common.c and
138 add $(srcdir)/target/waitstatus.c.
139 (OBS): Remove target-common.o and add waitstatus.o.
140 (server_h): Remove $(srcdir)/../common/target-common.h and
141 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
142 and $(srcdir)/../target/waitstatus.h.
143 (target-common.o): Remove.
144 (waitstatus.o): New target object file.
145 * target.h: Do not include target-common.h and
146 include target/resume.h, target/wait.h and
149 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
151 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
153 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
154 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
156 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
157 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
159 2013-07-27 Jie Zhang <jie@codesourcery.com>
160 Daniel Jacobowitz <dan@codesourcery.com>
161 Yao Qi <yao@codesourcery.com>
163 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
164 (mips-linux-watch.o): New rule.
165 (mips_linux_watch_h): New variable.
166 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
168 * linux-mips-low.c: Include mips-linux-watch.h.
169 (struct arch_process_info, struct arch_lwp_info): New.
170 (update_watch_registers_callback): New function.
171 (mips_linux_new_process, mips_linux_new_thread) New functions.
172 (mips_linux_prepare_to_resume, mips_insert_point): New
174 (mips_remove_point, mips_stopped_by_watchpoint): New
176 (rsp_bp_type_to_target_hw_bp_type): New function.
177 (mips_stopped_data_address): New function.
178 (the_low_target): Add watchpoint support functions.
180 2013-07-27 Yao Qi <yao@codesourcery.com>
182 * i386-low.c: Include break-common.h.
183 (enum target_hw_bp_type): Remove.
185 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
187 * Makefile.in (SFILES): /common/target-common.c.
188 (OBS): Add target-common.o.
189 (server_h): Add $(srcdir)/../common/target-common.h.
190 (target-common.o): New target.
191 * server.c (queue_stop_reply_callback): Free
192 status string after use.
193 * target.c (target_waitstatus_to_string): Remove.
194 * target.h: Include target-common.h.
195 (resume_kind): Likewise.
196 (target_waitkind): Likewise.
197 (target_waitstatus): Likewise.
198 (TARGET_WNOHANG): Likewise.
200 2013-07-04 Yao Qi <yao@codesourcery.com>
202 * Makefile.in (host_alias): Use @host_noncanonical@.
203 (target_alias): Use @target_noncanonical@.
204 * configure.ac: Use ACX_NONCANONICAL_TARGET and
205 ACX_NONCANONICAL_HOST.
206 * configure: Regenerated.
209 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
211 * configure.ac (version_host, version_target): Set and AC_SUBST them.
212 * configure: Rebuild.
213 * Makefile.in (version_host, version_target): Get from configure.
214 (version.c): Use $(version_host) and $(version_target).
216 2013-07-03 Pedro Alves <palves@redhat.com>
218 * Makefile.in (config.status): Depend on development.sh.
219 * acinclude.m4: Include libmcheck.m4.
220 * configure: Regenerate.
222 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
224 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
225 attribute inside the parentheses.
226 (winapi_DebugSetProcessKillOnExit): Ditto.
227 (winapi_DebugBreakProcess): Ditto.
228 (winapi_GenerateConsoleCtrlEvent): Ditto.
230 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
232 * notif.h (notif_event): Add a dummy member to avoid compiler
235 2013-07-01 Pedro Alves <palves@redhat.com>
237 * hostio.c (HOSTIO_PATH_MAX): Define.
238 (require_filename, handle_open, handle_unlink, handle_readlink):
241 2013-07-01 Pedro Alves <palves@redhat.com>
243 * server.h: Include "pathmax.h".
244 * linux-low.c: Don't include sys/param.h.
245 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
247 * win32-low.c: Don't include sys/param.h.
248 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
250 2013-07-01 Pedro Alves <palves@redhat.com>
252 * event-loop.c: Don't check HAVE_UNISTD_H before including
254 * gdbreplay.c: Likewise.
255 * remote-utils.c: Likewise.
256 * server.c: Likewise.
257 * configure.ac: Don't check for unistd.h.
258 * configure: Regenerate.
260 2013-06-28 Tom Tromey <tromey@redhat.com>
262 * Makefile.in (version.c): Use version.in, not
265 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
267 * configure.ac (version_host, version_target): Set and AC_SUBST them.
268 * configure: Rebuild.
269 * Makefile.in (version_host, version_target): Get from configure.
270 (version.c): Use $(version_host) and $(version_target).
272 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
274 Fix trace-status to output user name without trailing colon.
275 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
277 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
279 Fix trace-status to output proper start-time and stop-time.
280 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
281 output start time and stop time in hex as gdb expects.
283 2013-06-26 Pedro Alves <pedro@codesourcery.com>
285 * tracepoint.c (build_traceframe_info_xml): Output trace state
286 variables present in the trace buffer.
288 2013-06-24 Tom Tromey <tromey@redhat.com>
290 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
293 * gdbreplay.c: Include version.h.
294 (version, host_name): Don't declare.
295 * server.h: Include version.h.
296 (version, host_name): Don't declare.
298 2013-06-12 Pedro Alves <palves@redhat.com>
300 * linux-x86-low.c (linux_is_elf64): Delete global.
301 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
302 with local linux_pid_exe_is_elf_64_file use.
304 2013-06-11 Pedro Alves <palves@redhat.com>
306 * linux-low.c (regset_disabled, disable_regset): New functions.
307 (regsets_fetch_inferior_registers)
308 (regsets_store_inferior_registers): Use them.
309 (initialize_regsets_info); Don't allocate the disabled_regsets
311 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
314 2013-06-11 Pedro Alves <palves@redhat.com>
316 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
319 2013-06-11 Pedro Alves <palves@redhat.com>
321 * linux-x86-low.c (initialize_low_arch): Call
322 init_registers_x32_avx_linux.
324 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
326 Fix compatibility with Android Bionic.
327 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
330 2013-06-07 Pedro Alves <palves@redhat.com>
333 * Makefile.in (OBS): Add tdesc.o.
334 (IPA_OBJS): Add tdesc-ipa.o.
335 (tdesc-ipa.o): New rule.
336 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
338 * linux-low.c (new_inferior): Delete.
339 (disabled_regsets, num_regsets): Delete.
340 (linux_add_process): Adjust to set the new per-process
342 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
343 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
344 was a stop. When calling arch_setup, switch the current inferior
345 to the thread that got an event.
346 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
347 (regsets_fetch_inferior_registers)
348 (regsets_store_inferior_registers): New regsets_info parameter.
350 (linux_register_in_regsets): New regs_info parameter. Adjust to
352 (register_addr, fetch_register, store_register): New usrregs_info
353 parameter. Adjust to use it.
354 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
355 parameter regs_info. Adjust to use it.
356 (linux_fetch_registers): Get the current inferior's regs_info, and
358 (linux_store_registers): Ditto.
359 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
360 (initialize_low): Don't initialize the target_regsets here. Call
362 * linux-low.h (target_regsets): Delete declaration.
363 (struct regsets_info): New.
364 (struct usrregs_info): New.
365 (struct regs_info): New.
366 (struct process_info_private) <new_inferior>: New field.
367 (struct linux_target_ops): Delete the num_regs, regmap, and
368 regset_bitmap fields. New field regs_info.
369 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
370 * i387-fp.c (num_xmm_registers): Delete.
371 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
372 calls to new interface.
373 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
374 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
375 Infer the number of xmm registers from the regcache's target
377 * i387-fp.h (num_xmm_registers): Delete.
378 * inferiors.c (add_thread): Don't install the thread's regcache
380 * proc-service.c (gregset_info): Fetch the current inferior's
381 regs_info. Adjust to use it.
382 * regcache.c: Include tdesc.h.
383 (register_bytes, reg_defs, num_registers)
384 (gdbserver_expedite_regs): Delete.
385 (get_thread_regcache): If the thread doesn't have a regcache yet,
386 create one, instead of aborting gdbserver.
387 (regcache_invalidate_one): Rename to ...
388 (regcache_invalidate_thread): ... this.
389 (regcache_invalidate_one): New.
390 (regcache_invalidate): Only invalidate registers of the current
392 (init_register_cache): Add target_desc parameter, and use it.
393 (new_register_cache): Ditto. Assert the target description has a
394 non zero registers_size.
395 (regcache_cpy): Add assertions. Adjust.
396 (realloc_register_cache, set_register_cache): Delete.
397 (registers_to_string, registers_from_string): Adjust.
398 (find_register_by_name, find_regno, find_register_by_number)
399 (register_cache_size): Add target_desc parameter, and use it.
400 (free_register_cache_thread, free_register_cache_thread_one)
401 (regcache_release, register_cache_size): New.
402 (register_size): Add target_desc parameter, and use it.
403 (register_data, supply_register, supply_register_zeroed)
404 (supply_regblock, supply_register_by_name, collect_register)
405 (collect_register_as_string, collect_register_by_name): Adjust.
406 * regcache.h (struct target_desc): Forward declare.
407 (struct regcache) <tdesc>: New field.
408 (init_register_cache, new_register_cache): Add target_desc
410 (regcache_invalidate_thread): Declare.
411 (regcache_invalidate_one): Delete declaration.
412 (regcache_release): Declare.
413 (find_register_by_number, register_cache_size, register_size)
414 (find_regno): Add target_desc parameter.
415 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
417 * remote-utils.c: Include tdesc.h.
418 (outreg, prepare_resume_reply): Adjust.
419 * server.c: Include tdesc.h.
420 (gdbserver_xmltarget): Delete declaration.
421 (get_features_xml, process_serial_event): Adjust.
422 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
424 (struct process_info) <tdesc>: New field.
425 (ipa_tdesc): Declare.
428 * tracepoint.c: Include tdesc.h.
429 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
430 (get_context_regcache): Adjust to pass ipa_tdesc down.
431 (do_action_at_tracepoint): Adjust to get the register cache size
432 from the context regcache's description.
433 (traceframe_walk_blocks): Adjust to get the register cache size
434 from the current trace frame's description.
435 (traceframe_get_pc): Adjust to get current trace frame's
436 description and pass it down.
437 (gdb_collect): Adjust to get the register cache size from the
439 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
440 (gdbserver_xmltarget): Delete.
441 (initialize_low_tracepoint): Set the ipa's target description.
442 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
443 (initialize_low_tracepoint): Set the ipa's target description.
444 * linux-x86-low.c: Include tdesc.h.
445 [__x86_64__] (is_64bit_tdesc): New.
446 (ps_get_thread_area, x86_get_thread_area): Use it.
447 (i386_cannot_store_register): Rename to ...
448 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
449 (i386_cannot_fetch_register): Rename to ...
450 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
451 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
453 (target_regsets): Rename to ...
454 (x86_regsets): ... this.
455 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
457 (x86_siginfo_fixup): Use is_64bit_tdesc.
458 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
459 (tdesc_x32_avx_linux, tdesc_x32_linux)
460 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
462 (x86_linux_update_xmltarget): Delete.
463 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
464 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
465 (AMD64_LINUX_USER64_CS): New.
466 (x86_linux_read_description): New, based on
467 x86_linux_update_xmltarget.
468 (same_process_callback): New.
469 (x86_arch_setup_process_callback): New.
470 (x86_linux_update_xmltarget): New.
471 (x86_regsets_info): New.
472 (amd64_linux_regs_info): New.
473 (i386_linux_usrregs_info): New.
474 (i386_linux_regs_info): New.
475 (x86_linux_regs_info): New.
476 (x86_arch_setup): Reimplement.
477 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
478 (x86_emit_ops): Ditto.
479 (the_low_target): Adjust. Install x86_linux_regs_info,
480 x86_cannot_fetch_register, and x86_cannot_store_register.
481 (initialize_low_arch): New.
482 * linux-ia64-low.c (tdesc_ia64): Declare.
483 (ia64_fetch_register): Adjust.
484 (ia64_usrregs_info, regs_info): New globals.
485 (ia64_regs_info): New function.
486 (the_low_target): Adjust.
487 (initialize_low_arch): New function.
488 * linux-sparc-low.c (tdesc_sparc64): Declare.
489 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
491 (sparc_arch_setup): New function.
492 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
493 (the_low_target): Adjust.
494 (initialize_low_arch): New function.
495 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
496 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
497 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
498 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
499 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
500 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
501 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
502 (tdesc_powerpc_isa205_vsx64l): Declare.
503 (ppc_cannot_store_register, ppc_collect_ptrace_register)
504 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
505 (ppc_set_pc, ppc_get_hwcap): Adjust.
506 (ppc_usrregs_info): Forward declare.
507 (!__powerpc64__) ppc_regmap_adjusted: New global.
508 (ppc_arch_setup): Adjust to the current process'es target
510 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
511 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
512 (ppc_store_evrregset): Adjust.
513 (target_regsets): Rename to ...
514 (ppc_regsets): ... this, and make static.
515 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
516 (ppc_regs_info): New function.
517 (the_low_target): Adjust.
518 (initialize_low_arch): New function.
519 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
520 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
521 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
522 (tdesc_s390x_linux64v2): Declare.
523 (s390_collect_ptrace_register, s390_supply_ptrace_register)
524 (s390_fill_gregset, s390_store_last_break): Adjust.
525 (target_regsets): Rename to ...
526 (s390_regsets): ... this, and make static.
527 (s390_get_pc, s390_set_pc): Adjust.
528 (s390_get_hwcap): New target_desc parameter, and use it.
529 [__s390x__] (have_hwcap_s390_high_gprs): New global.
530 (s390_arch_setup): Adjust to set the current process'es target
531 description. Don't adjust the regmap.
532 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
533 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
534 (regs_info_3264): New globals.
535 (s390_regs_info): New function.
536 (the_low_target): Adjust.
537 (initialize_low_arch): New function.
538 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
539 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
540 [__mips64] (init_registers_mips_linux)
541 (init_registers_mips_dsp_linux): Delete defines.
542 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
543 (have_dsp): New global.
544 (mips_read_description): New, based on mips_arch_setup.
545 (mips_arch_setup): Reimplement.
546 (get_usrregs_info): New function.
547 (mips_cannot_fetch_register, mips_cannot_store_register)
548 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
549 (mips_fill_fpregset, mips_store_fpregset): Adjust.
550 (target_regsets): Rename to ...
551 (mips_regsets): ... this, and make static.
552 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
553 (dsp_regs_info, regs_info): New globals.
554 (mips_regs_info): New function.
555 (the_low_target): Adjust.
556 (initialize_low_arch): New function.
557 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
558 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
560 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
561 (arm_read_description): New, with bits factored from
563 (arm_arch_setup): Reimplement.
564 (target_regsets): Rename to ...
565 (arm_regsets): ... this, and make static.
566 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
567 (arm_regs_info): New function.
568 (the_low_target): Adjust.
569 (initialize_low_arch): New function.
570 * linux-m68k-low.c (tdesc_m68k): Declare.
571 (target_regsets): Rename to ...
572 (m68k_regsets): ... this, and make static.
573 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
574 (m68k_regs_info): New function.
575 (m68k_arch_setup): New function.
576 (the_low_target): Adjust.
577 (initialize_low_arch): New function.
578 * linux-sh-low.c (tdesc_sharch): Declare.
579 (target_regsets): Rename to ...
580 (sh_regsets): ... this, and make static.
581 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
582 (sh_regs_info, sh_arch_setup): New functions.
583 (the_low_target): Adjust.
584 (initialize_low_arch): New function.
585 * linux-bfin-low.c (tdesc_bfin): Declare.
586 (bfin_arch_setup): New function.
587 (bfin_usrregs_info, regs_info): New globals.
588 (bfin_regs_info): New function.
589 (the_low_target): Adjust.
590 (initialize_low_arch): New function.
591 * linux-cris-low.c (tdesc_cris): Declare.
592 (cris_arch_setup): New function.
593 (cris_usrregs_info, regs_info): New globals.
594 (cris_regs_info): New function.
595 (the_low_target): Adjust.
596 (initialize_low_arch): New function.
597 * linux-cris-low.c (tdesc_crisv32): Declare.
598 (cris_arch_setup): New function.
599 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
600 (cris_regs_info): New function.
601 (the_low_target): Adjust.
602 (initialize_low_arch): New function.
603 * linux-m32r-low.c (tdesc_m32r): Declare.
604 (m32r_arch_setup): New function.
605 (m32r_usrregs_info, regs_info): New globals.
606 (m32r_regs_info): Adjust.
607 (initialize_low_arch): New function.
608 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
609 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
610 (tic6x_usrregs_info): Forward declare.
611 (tic6x_read_description): New function, based on ...
612 (tic6x_arch_setup): ... this. Reimplement.
613 (target_regsets): Rename to ...
614 (tic6x_regsets): ... this, and make static.
615 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
616 (tic6x_regs_info): New function.
617 (the_low_target): Adjust.
618 (initialize_low_arch): New function.
619 * linux-xtensa-low.c (tdesc_xtensa): Declare.
620 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
621 (target_regsets): Rename to ...
622 (xtensa_regsets): ... this, and make static.
623 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
625 (xtensa_arch_setup, xtensa_regs_info): New functions.
626 (the_low_target): Adjust.
627 (initialize_low_arch): New function.
628 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
629 (nios2_arch_setup): Set the current process'es tdesc.
630 (target_regsets): Rename to ...
631 (nios2_regsets): ... this.
632 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
633 (nios2_regs_info): New function.
634 (the_low_target): Adjust.
635 (initialize_low_arch): New function.
636 * linux-aarch64-low.c (tdesc_aarch64): Declare.
637 (aarch64_arch_setup): Set the current process'es tdesc.
638 (target_regsets): Rename to ...
639 (aarch64_regsets): ... this.
640 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
641 (aarch64_regs_info): New function.
642 (the_low_target): Adjust.
643 (initialize_low_arch): New function.
644 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
646 (target_regsets): Rename to ...
647 (tile_regsets): ... this.
648 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
649 (tile_regs_info): New function.
650 (tile_arch_setup): Set the current process'es tdesc.
651 (the_low_target): Adjust.
652 (initialize_low_arch): New function.
653 * spu-low.c (tdesc_spu): Declare.
654 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
655 * win32-arm-low.c (tdesc_arm): Declare.
656 (arm_arch_setup): New function.
657 (the_low_target): Install arm_arch_setup instead of
659 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
660 (init_windows_x86): Rename to ...
661 (i386_arch_setup): ... this. Set `win32_tdesc'.
662 (the_low_target): Adjust.
663 * win32-low.c (win32_tdesc): New global.
664 (child_add_thread): Don't create the thread cache here.
665 (do_initial_child_stuff): Set the new process'es tdesc.
666 * win32-low.h (struct target_desc): Forward declare.
667 (win32_tdesc): Declare.
668 * lynx-i386-low.c (tdesc_i386): Declare global.
669 (lynx_i386_arch_setup): Set `lynx_tdesc'.
670 * lynx-low.c (lynx_tdesc): New global.
671 (lynx_add_process): Set the new process'es tdesc.
672 * lynx-low.h (struct target_desc): Forward declare.
673 (lynx_tdesc): Declare global.
674 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
675 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
676 * nto-low.c (nto_tdesc): New global.
677 (do_attach): Set the new process'es tdesc.
678 * nto-low.h (struct target_desc): Forward declare.
679 (nto_tdesc): Declare.
680 * nto-x86-low.c (tdesc_i386): Declare.
681 (nto_x86_arch_setup): Set `nto_tdesc'.
683 2013-06-04 Gary Benson <gbenson@redhat.com>
685 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
686 to qSupported response when appropriate.
687 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
688 with nonzero-length annex.
689 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
690 arguments supplied in annex.
692 2013-05-31 Doug Evans <dje@google.com>
695 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
696 64 bits in 64-cross-32 environment.
698 2013-05-28 Pedro Alves <palves@redhat.com>
700 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
701 (aarch64-without-fpu.c): Delete rule.
702 * configure.srv (aarch64*-*-linux*): Remove references to
703 aarch64-without-fpu.o and aarch64-without-fpu.xml.
704 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
707 2013-05-24 Pedro Alves <palves@redhat.com>
709 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
710 instead of strchr/decode_address. Error if the range isn't split
711 with a ','. Don't assume there's be a ':' in the action.
713 2013-05-23 Yao Qi <yao@codesourcery.com>
714 Pedro Alves <palves@redhat.com>
716 * linux-low.c (lwp_in_step_range): New function.
717 (linux_wait_1): If the thread was range stepping and stopped
718 outside the stepping range, report the stop to GDB. Otherwise,
719 continue stepping. Add range stepping debug output.
720 (linux_set_resume_request): Copy the step range from the resume
722 (linux_supports_range_stepping): New.
723 (linux_target_ops) <supports_range_stepping>: Set to
724 linux_supports_range_stepping.
725 * linux-low.h (struct linux_target_ops)
726 <supports_range_stepping>: New field.
727 (struct lwp_info) <step_range_start, step_range_end>: New fields.
728 * linux-x86-low.c (x86_supports_range_stepping): New.
729 (the_low_target) <supports_range_stepping>: Set to
730 x86_supports_range_stepping.
731 * server.c (handle_v_cont): Handle 'r' action.
732 (handle_v_requests): Append ";r" if the target supports range
734 * target.h (struct thread_resume) <step_range_start,
735 step_range_end>: New fields.
736 (struct target_ops) <supports_range_stepping>:
738 (target_supports_range_stepping): New macro.
740 2013-05-17 Joel Brobecker <brobecker@adacore.com>
742 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
743 confusion in comment.
745 2013-05-17 Joel Brobecker <brobecker@adacore.com>
747 * lynx-low.c (struct process_info_private): New type.
748 (lynx_add_process): New function.
749 (lynx_create_inferior, lynx_attach): Replace calls to
750 add_process by calls to lynx_add_process.
751 (lynx_resume): If PTID is null, then try using
752 current_process()->private->last_wait_event_ptid.
754 (lynx_clear_inferiors): Delete. The contents of that function
755 has been inlined in lynx_mourn;
756 (lynx_wait_1): Save the ptid in the process's private data.
757 (lynx_mourn): Free the process' private data. Replace call
758 to lynx_clear_inferiors by call to clear_inferiors.
760 2013-05-17 Yao Qi <yao@codesourcery.com>
762 * i386-low.c (i386_length_and_rw_bits): Move the comment to
765 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
767 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
768 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
769 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
770 PT_TEXT_END_ADDR guards. Update comments.
771 (linux_target_op) <read_offsets>: Conditionally define to
772 linux_read_offsets if the target is UCLIBC and if it defines
773 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
775 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
776 Andrew Jenner <andrew@codesourcery.com>
778 * Makefile.in (SFILES): Add linux-nios2-low.c.
779 (clean): Add action to delete nios2-linux.c.
780 (nios2-linux.c): New rule.
781 * configure.srv: Add nios2*-*-linux*.
782 * linux-nios2-low.c: New.
784 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
786 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
788 2013-04-25 Hui Zhu <hui@codesourcery.com>
791 * ax.c (ax_printf): Add fflush.
793 2013-04-22 Tom Tromey <tromey@redhat.com>
795 * Makefile.in (SFILES): Add filestuff.c.
796 (OBS): Add filestuff.o.
797 (filestuff.o): New target.
798 * config.in, configure: Rebuild.
799 * configure.ac: Check for fdwalk, pipe2.
801 2013-04-17 Pedro Alves <palves@redhat.com>
803 * configure.ac (USE_THREAD_DB): Delete variable.
804 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
805 Don't AC_SUBST USE_THREAD_DB.
806 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
807 * config.in, configure: Regenerate.
809 2013-04-16 Pedro Alves <palves@redhat.com>
811 * linux-low.h (struct lwp_info) <thread_known>: Move under
812 the USE_THREAD_DB #ifdef.
814 2013-04-16 Pedro Alves <palves@redhat.com>
816 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
817 (linux-low.o): Delete rule.
818 * linux-low.h: Always include "gdb_thread_db.h" instead of
819 conditionally including thread_db.h.
820 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
823 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
825 * Makefile.in (install-only): Fix make install regression.
827 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
829 Convert man pages to texinfo, new gdbinit.5 texinfo page.
830 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
832 * gdbserver.1: Remove.
834 2013-03-22 Pedro Alves <palves@redhat.com>
836 * linux-low.c (handle_extended_wait): Don't call
837 linux_enable_event_reporting.
839 2013-03-15 Tony Theodore <tonyt@logyst.com>
842 * Makefile.in (SHELL): Use @SHELL@.
844 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
846 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
849 2013-03-13 Joel Brobecker <brobecker@adacore.com>
851 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
852 Remove extraneous NULL element.
854 2013-03-13 Yao Qi <yao@codesourcery.com>
856 * tracepoint.c (traceframe_read_tsv): Look for the last matched
857 'V' block in trace frame.
859 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
861 * target.h (struct target_ops): Add btrace ops.
862 (target_supports_btrace): New macro.
863 (target_enable_btrace): New macro.
864 (target_disable_btrace): New macro.
865 (target_read_btrace): New macro.
866 * gdbthread.h (struct thread_info): Add btrace field.
867 * server.c: Include btrace-common.h.
868 (handle_btrace_general_set): New function.
869 (handle_btrace_enable): New function.
870 (handle_btrace_disable): New function.
871 (handle_general_set): Call handle_btrace_general_set.
872 (handle_qxfer_btrace): New function.
873 (struct qxfer qxfer_packets[]): Add btrace entry.
874 * inferiors.c (remove_thread): Disable btrace.
875 * linux-low: Include linux-btrace.h.
876 (linux_low_enable_btrace): New function.
877 (linux_low_read_btrace): New function.
878 (linux_target_ops): Add btrace ops.
879 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
880 Add srv_linux_btrace=yes.
881 (x86_64-*-linux*): Add linux-btrace.o.
882 Add srv_linux_btrace=yes.
883 * configure.ac: Define HAVE_LINUX_BTRACE.
884 * config.in: Regenerated.
885 * configure: Regenerated.
887 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
889 * server.c (handle_qxfer): Preserve error message if -3 is
891 (qxfer): Document the -3 return value.
893 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
895 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
896 (linux_btrace_h): New variable.
897 (linux-btrace.o): New rule.
899 2013-03-08 Stan Shebs <stan@codesourcery.com>
900 Hafiz Abid Qadeer <abidh@codesourcery.com>
902 * tracepoint.c (trace_buffer_size): New global.
903 (DEFAULT_TRACE_BUFFER_SIZE): New define.
904 (init_trace_buffer): Change to one-argument function. Allocate
906 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
907 handle QTBuffer:size packet.
908 (cmd_bigqtbuffer_size): New function.
909 (initialize_tracepoint): Call init_trace_buffer with
910 DEFAULT_TRACE_BUFFER_SIZE.
911 * server.c (handle_query): Add QTBuffer:size in the
914 2013-03-07 Yao Qi <yao@codesourcery.com>
916 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
917 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
919 (cmd_qtsp): Adjust condition. Do post increment.
920 Set cur_action and cur_step_action back to 0.
922 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
925 * linux-low.c (linux_write_memory): Return early success if LEN is
928 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
930 * configure.srv: Add x86_64-*-cygwin* as target.
932 2013-02-28 Tom Tromey <tromey@redhat.com>
934 * configure.ac: Invoke AC_SYS_LARGEFILE.
935 * configure, config.in: Rebuild.
937 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
939 * win32-low.c: Throughout, fix format strings and casts of
940 printf-like functions to avoid type related warnings on all
942 (get_child_debug_event): Print dwDebugEventCode as hex since
943 that's how it's usually documented.
945 2013-02-28 Yao Qi <yao@codesourcery.com>
947 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
950 2013-02-27 Jiong Wang <jiwang@tilera.com>
952 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
953 (reg-tilegx32.c): New rule.
954 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
955 * linux-tile-low.c (tile_arch_setup): New function. Invoke
956 different register info initializer according to elf class.
957 (init_registers_tilgx32): New function. The tilegx32 register info
959 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
960 (tile_store_gregset): Likewise.
962 2013-02-27 Yao Qi <yao@codesourcery.com>
964 * server.c (process_point_options): Print debug message when
965 debug_threads is true.
967 2013-02-26 Yao Qi <yao@codesourcery.com>
969 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
971 2013-02-19 Pedro Alves <palves@redhat.com>
972 Kai Tietz <ktietz@redhat.com>
976 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
977 instead of strtoul to extract address from packet.
978 (process_serial_event) <'z'>: Likewise.
980 2013-02-18 Yao Qi <yao@codesourcery.com>
982 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
984 2013-02-14 Pedro Alves <palves@redhat.com>
988 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
989 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
991 2013-02-14 Pedro Alves <palves@redhat.com>
993 * tracepoint.c (cmd_qtdpsrc): Use savestring.
995 2013-02-14 Pedro Alves <palves@redhat.com>
997 * tracepoint.c (save_string): Delete.
998 (add_tracepoint_action): Use savestring instead of save_string.
1000 2013-02-12 Pedro Alves <palves@redhat.com>
1002 * linux-xtensa-low.c: Ditto.
1003 * xtensa-xtregs.c: Ditto.
1005 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1007 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1010 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1012 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1013 aarch64_num_wp_regs and aarch64_num_bp_regs to
1014 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1016 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1018 * linux-aarch64-low.c (ps_get_thread_area): Replace
1019 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1021 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1022 Marcus Shawcroft <marcus.shawcroft@arm.com>
1023 Nigel Stephens <nigel.stephens@arm.com>
1024 Yufeng Zhang <yufeng.zhang@arm.com>
1026 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1027 (aarch64.c, aarch64-without-fpu.c): New targets.
1028 * configure.srv (aarch64*-*-linux*): New.
1029 * linux-aarch64-low.c: New file.
1031 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1033 * linux-low.c (handle_extended_wait, linux_create_inferior)
1034 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1035 (dequeue_one_deferred_signal, linux_resume_one_thread)
1036 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1037 (linux_tracefork_grandchild, linux_test_for_tracefork)
1038 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1039 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1040 where the argument is 0.
1042 2013-01-25 Yao Qi <yao@codesourcery.com>
1044 * event-loop.c: Include "queue.h".
1045 (gdb_event_p): New typedef.
1046 (struct gdb_event) <next_event>: Remove.
1047 (event_queue): Change to QUEUE(gdb_event_p).
1048 (async_queue_event): Remove.
1049 (gdb_event_xfree): New.
1050 (initialize_event_loop): New.
1051 (process_event): Use API from QUEUE.
1052 (wait_for_event): Likewise.
1053 * server.c (main): Call initialize_event_loop.
1054 * server.h (initialize_event_loop): Declare.
1056 2013-01-18 Yao Qi <yao@codesourcery.com>
1058 * ax.h (struct eval_agent_expr_context): New.
1059 (gdb_eval_agent_expr): Update declaration.
1060 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1061 TFRAME. Add new argument CTX.
1062 * server.h (struct eval_agent_expr_context): Declare.
1063 (agent_mem_read, agent_tsv_read): Update declaration.
1064 (agent_mem_read_string): Likewise.
1065 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1066 (add_traceframe_block): Add new argument TPOINT.
1067 Increase TPOINT->traceframe_usage.
1068 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1069 eval_tracepoint_agent_expr.
1070 (condition_true_at_tracepoint): Likewise.
1071 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1072 (agent_mem_read_string, agent_tsv_read): Likewise.
1074 2013-01-16 Yao Qi <yao@codesourcery.com>
1076 * linux-low.c (linux_resume_one_lwp): Don't check
1077 'lwp->bp_reinsert != 0'.
1079 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1080 Pedro Alves <palves@redhat.com>
1082 * lynx-low.c (ptrace_request_to_str): Define a temporary
1083 macro and use it to simplify this function's implementation.
1085 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1087 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1090 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1092 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1094 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1096 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1098 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1100 * lynx-low.c (lynx_resume): Use the resume_info parameter
1101 to determine the ptid for the lynx_ptrace call, unless
1102 it is equal to minus_one_ptid, in which case we use the
1103 ptid of the current_inferior.
1104 (lynx_wait_1): After having received a thread create/exit
1105 event, resume the inferior's execution using the signaling
1106 thread's ptid, rather than the old ptid.
1108 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1110 * lynx-low.c (lynx_resume): Delete variable ret.
1112 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1114 * gdbreplay.c (gdbreplay_version): Update copyright year.
1115 * server.c (gdbserver_version): Likewise.
1117 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1119 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1122 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1124 * lynx-low.c (ptrace_request_to_str): Add handling for
1127 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1129 * lynx-low.c (lynx_attach): Delete variable new_process.
1131 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1133 * lynx-low.c (lynx_create_inferior): Delete variable
1136 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1138 * lynx-low.c (ptrace_request_to_str): Do not handle
1139 PTRACE_GETTHREADLIST if this macro does not exist.
1141 2012-12-15 Yao Qi <yao@codesourcery.com>
1143 * Makefile.in (OBS): Add notif.o.
1144 * notif.c, notif.h: New.
1145 * server.c: Include "notif.h".
1146 (struct vstop_notif) <next>: Remove.
1148 (queue_stop_reply): Update.
1149 (push_event, send_next_stop_reply): Remove.
1150 (discard_queued_stop_replies): Update.
1151 (notif_stop): New variable.
1152 (handle_v_stopped): Remove.
1153 (handle_v_requests): Don't call handle_v_stopped. Call
1154 handle_ack_notif instead.
1155 (queue_stop_reply_callback): Call notif_event_enque instead
1156 of queue_stop_reply.
1157 (handle_status): Don't call send_next_stop_reply, call
1158 notif_write_event instead.
1159 (kill_inferior_callback): Likewise.
1160 (detach_or_kill_inferior_callback): Likewise.
1161 (main): Call initialize_notif.
1162 (process_serial_event): Call QUEUE_is_empty.
1163 (handle_target_event): Call notif_push instead of push event.
1164 * server.h (push_event): Remove declaration.
1166 2012-12-10 Tom Tromey <tromey@redhat.com>
1168 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1169 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1172 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1173 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1174 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1175 (amd64-linux-ipa.o, ax.o): Rewrite.
1176 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1177 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1178 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1179 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1180 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1181 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1182 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1183 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1184 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1185 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1186 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1187 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1188 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1189 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1190 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1191 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1192 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1193 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1194 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1195 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1196 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1197 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1198 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1199 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1200 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1201 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1202 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1203 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1204 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1205 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1206 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1207 (reg-tilegx.o): Remove.
1208 (all_object_files): New macro.
1209 Include .deps files.
1210 * aclocal.m4, configure: Rebuild.
1211 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1212 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1213 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1215 2012-12-05 Tom Tromey <tromey@redhat.com>
1218 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1220 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1222 * configure.ac: Check for linux/perf_event.h.
1223 * config.in: Regenerated.
1224 * configure: Regenerated.
1226 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1228 * hostio.c (handle_readlink): Decrease buffer size
1229 parameter passed to readlink by one byte.
1231 2012-11-26 Yao Qi <yao@codesourcery.com>
1233 * configure.ac (build_warnings): Append '-Wempty-body'.
1234 * configure: Regenerated.
1235 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1238 2012-11-15 Pierre Muller <muller@sourceware.org>
1240 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1241 * config.in: Regenerate.
1242 * configure: Regenerate.
1243 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1244 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1245 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1246 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1248 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1249 instead of <sys/wait.h> header.
1250 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1252 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1254 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1255 (various make rules): Remove -DGDBSERVER
1257 2012-11-09 Yao Qi <yao@codesourcery.com>
1259 * spu-low.c (current_ptid): Move it to ..
1260 * gdbthread.h: ... here. New.
1261 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1262 * server.c (myresume, process_serial_event): Likewise.
1263 * thread-db.c (thread_db_find_new_threads): Likewise.
1264 * tracepoint.c (run_inferior_command): Likewise.
1266 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1268 * server.c (handle_search_memory_1): Include access length in
1271 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1273 * linux-crisv32-low.c: Fix compile errors.
1275 2012-09-04 Yao Qi <yao@codesourcery.com>
1277 * tracepoint.c (cmd_qtsv): Adjust debug message.
1278 Don't check CUR_TPOINT.
1280 2012-08-28 Yao Qi <yao@codesourcery.com>
1282 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1283 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1284 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1285 Remove declarations of xmalloc, xreallloc, xstrdup and
1287 * Makefile.in (libiberty_h): New.
1288 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1289 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1291 2012-08-23 Yao Qi <yao@codesourcery.com>
1293 * server.h: Remove declaration of 'xsnprintf'.
1295 2012-08-22 Keith Seitz <keiths@redhat.com>
1297 * server.h: Include build-gnulib-gbserver/config.h.
1298 * gdbreplay.c: Likewise.
1300 2012-08-08 Doug Evans <dje@google.com>
1302 * Makefile.in (SFILES): Add gdb_vecs.c.
1303 (OBS): Add gdb_vecs.o.
1304 (gdb_vecs_h, host_defs_h): New variables.
1305 (thread-db.o): Add $(gdb_vecs_h) dependency.
1306 (gdb_vecs.o): New rule.
1307 * thread-db.c: #include "gdb_vecs.h".
1308 (thread_db_load_search): Use a vector to iterate over path elements.
1309 Handle text appearing after "$pdir".
1311 * configure.ac: Add check for strstr.
1312 * config.in: Regenerate.
1313 * configure: Regenerate.
1315 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1317 * hostio.c (handle_pread): If pread fails, fall back to attempting
1319 (handle_pwrite): Likewise for pwrite.
1321 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1323 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1324 between unsupported TYPE and unimplementable ADDR/LEN combination.
1325 (arm_insert_point): Act on new return value.
1327 2012-07-31 Pedro Alves <palves@redhat.com>
1329 * server.c (process_point_options): Only skip tokens if we find
1330 one that is unrecognized. Don't treat 'X' specially while
1331 skipping unrecognized tokens.
1333 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1335 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1336 to 4-byte-align HW breakpoint addresses for Thumb.
1338 2012-07-27 Yao Qi <yao@codesourcery.com>
1342 * server.h: Declare gdb_agent_about_to_close.
1343 * target.c (kill_inferior): Include "agent.h".
1344 New. Send command 'kill'.
1345 * target.h (kill_inferior): Removed macro.
1346 * tracepoint.c (gdb_agent_about_to_close): New.
1347 (gdb_agent_helper_thread): Handle command 'close'.
1348 Wait endlessly until the inferior stops.
1349 Install gdb_agent_remove_socket to atexit hook.
1350 (agent_socket_name): New static variable.
1351 (gdb_agent_socket_init): Replace local variable 'name' with
1352 'agent_socket_name'.
1353 (gdb_agent_remove_socket): New.
1355 2012-07-27 Yao Qi <yao@codesourcery.com>
1357 * server.c (process_point_options): Stop at 'X' when parsing.
1359 2012-07-19 Michael Eager <eager@eagercon.com>
1361 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1363 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1364 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1365 hardware breakpoint.
1367 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1369 * gdbserver/linux-low.c (initialize_low): Call
1370 linux_ptrace_init_warnings.
1372 2012-07-02 Doug Evans <dje@google.com>
1374 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1377 2012-07-02 Stan Shebs <stan@codesourcery.com>
1379 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1380 (ax.o): Add it to build rule.
1382 (OBS): Add format.o.
1383 (IPA_OBS): Add format.o.
1384 * server.c (handle_query): Claim support for breakpoint commands.
1385 (process_point_options): Add command case.
1386 (process_serial_event): Leave running if there are printfs in
1388 * mem-break.h (any_persistent_commands): Declare.
1389 (add_breakpoint_commands): Declare.
1390 (gdb_no_commands_at_breakpoint): Declare.
1391 (run_breakpoint_commands): Declare.
1392 * mem-break.c (struct point_command_list): New struct.
1393 (struct breakpoint): New field command_list.
1394 (any_persistent_commands): New function.
1395 (add_commands_to_breakpoint): New function.
1396 (add_breakpoint_commands): New function.
1397 (gdb_no_commands_at_breakpoint): New function.
1398 (run_breakpoint_commands): New function.
1399 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1401 * ax.c: Include format.h.
1402 (ax_printf): New function.
1403 (gdb_eval_agent_expr): Add printf opcode.
1405 2012-06-13 Yao Qi <yao@codesourcery.com>
1407 * server.c (start_inferior): Remove duplicated writes to fields
1408 'last_resume_kind' and 'last_status' of 'current_inferior'.
1410 2012-06-12 Yao Qi <yao@codesourcery.com>
1411 Pedro Alves <palves@redhat.com>
1413 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1415 * server.c (handle_v_cont): Extend comment.
1417 2012-06-11 Yao Qi <yao@codesourcery.com>
1419 * linux-low.c (linux_attach): Add 'static'.
1421 2012-06-06 Yao Qi <yao@codesourcery.com>
1423 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1425 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1427 Fix gcc -flto compilation warning.
1428 * server.c (main): Make variable multi_mode and attach volatile.
1430 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1432 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1433 if the platform doesn't know about it.
1435 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1437 * Makefile.in (SFILES): Add linux-tile-low.c.
1438 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1439 * configure.srv: Handle tilegx-*-linux*.
1440 * linux-tile-low.c: New file.
1442 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1444 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1446 2012-05-24 Pedro Alves <palves@redhat.com>
1450 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1452 2012-05-24 Pedro Alves <palves@redhat.com>
1456 Replace target_signal with gdb_signal throughout.
1458 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1460 * linux-low.c (linux_store_registers): Avoid the copying sequence
1461 when no data has been retrieved by ptrace.
1463 2012-05-22 Will Deacon <will.deacon@arm.com>
1465 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1466 Include asm/ptrace.h.
1467 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1470 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1472 * linux-low.c (linux_store_registers): Don't re-retrieve data
1473 with ptrace that has already been obtained from /proc. Always
1474 copy any data retrieved with ptrace to the buffer supplied.
1476 2012-05-11 Yao Qi <yao@codesourcery.com>
1477 Pedro Alves <palves@redhat.com>
1479 * linux-low.c (enum stopping_threads_kind): New.
1480 (stopping_threads): Change type to `enum stopping_threads_kind'.
1481 (handle_extended_wait): If stopping and suspending threads, leave
1482 the new_lwp suspended too.
1483 (linux_wait_for_event): Adjust.
1484 (stop_all_lwps): Set `stopping_threads' to
1485 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1486 whether we're suspending threads or just stopping them. Assert no
1489 2012-04-29 Yao Qi <yao@codesourcery.com>
1491 * server.h: Move some code to ...
1492 * gdbthread.h: ... here. New.
1493 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1494 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1495 (nto-low.o, win32-low.o): Likewise.
1496 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1497 * regcache.c, remote-utils.c, server.c: Likewise.
1498 * target.c, tracepoint.c, win32-low.c: Likewise.
1500 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1502 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1503 (PTRACE_ARG4_TYPE): Likewise.
1504 (PTRACE_XFER_TYPE): Likewise.
1505 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1506 ptrace to PTRACE_ARG3_TYPE.
1507 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1508 (PTRACE_ARG4_TYPE): Likewise.
1509 (PTRACE_XFER_TYPE): Likewise.
1510 (linux_detach_one_lwp): Cast fourth argument of
1511 ptrace to long then PTRACE_ARG4_TYPE.
1512 (regsets_fetch_inferior_registers): Cast third argument of
1513 ptrace to long then PTRACE_ARG3_TYPE.
1514 (regsets_store_inferior_registers): Likewise.
1516 2012-04-20 Pedro Alves <palves@redhat.com>
1518 * configure: Regenerate.
1520 2012-04-19 Pedro Alves <palves@redhat.com>
1522 * Makefile.in (GNULIB_BUILDDIR): New.
1523 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1524 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1525 (all, install-only, uninstall, clean-info, all-lib, clean): No
1526 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1527 (maintainer-clean realclean distclean): Use subdir_do.
1529 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1530 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1531 * acinclude.m4: Include acx_configure_dir.m4.
1532 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1533 calls. Call AC_PROG_RANLIB. Configure gnulib using
1536 (GNULIB_STDINT_H): Adjust.
1537 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1538 * gdbreplay.c: Include build-gnulib/config.h.
1539 * server.h: Likewise.
1540 * aclocal.m4: Regenerate.
1541 * config.in: Regenerate.
1542 * configure: Regenerate.
1544 2012-04-19 Pedro Alves <palves@redhat.com>
1546 * Makefile.in (LIBGNU, INCGNU): Adjust.
1547 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1548 (all, install-only, uninstall, clean-info, all-lib, clean)
1549 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1550 * configure.ac: Adjust AC_OUTPUT output.
1551 * aclocal.m4: Regenerate.
1552 * configure: Regenerate.
1554 2012-04-19 Pedro Alves <palves@redhat.com>
1556 * Makefile.in (generated_files): New.
1557 (server_h): Remove the explicit dependency on config.h, and depend
1558 on $generated_files.
1560 2012-04-19 Pedro Alves <palves@redhat.com>
1562 * Makefile.in (INCGNU): Add -Ignulib.
1564 2012-04-19 Pedro Alves <palves@redhat.com>
1566 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1567 (INCGNU): ... this, and spell out -I here.
1568 (GNULIB_LIB): Rename to ...
1570 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1572 2012-04-19 Pedro Alves <palves@redhat.com>
1574 * config.in: Regenerate.
1576 2012-04-19 Pedro Alves <palves@redhat.com>
1578 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1579 * server.h (memmem): Remove declaration.
1580 * config.in: Regenerate.
1581 * configure: Regenerate.
1583 2012-04-19 Yao Qi <yao@codesourcery.com>
1585 * Makefile.in (SFILES): Add common/vec.c.
1589 2012-04-19 Yao Qi <yao@codesourcery.com>
1591 * remote-utils.c (prepare_resume_reply): Replace with macro
1592 target_core_of_thread.
1593 * server.c (handle_qxfer_threads_proper): Likewise.
1594 * target.h (traget_core_of_thread): New macro.
1596 2012-04-18 Pedro Alves <palves@redhat.com>
1598 * aclocal.m4: Regenerate.
1599 * configure: Regenerate.
1601 2012-04-16 Yao Qi <yao@codesourcery.com>
1603 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1604 duplicated on address.
1606 2012-04-16 Yao Qi <yao@codesourcery.com>
1608 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1609 (struct tracepoint_action_ops) <send>: New field.
1610 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1611 (agent_expr_send, x_tracepoint_action_send): New.
1612 (l_tracepoint_action_send): New.
1613 (cmd_qtdp): Download and install tracepoint
1614 according to `use_agent'.
1615 (run_inferior_command): Add one more parameter `len'.
1617 (tracepoint_send_agent): New.
1618 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1620 2012-04-16 Yao Qi <yao@codesourcery.com>
1622 * tracepoint.c (download_tracepoints): Moved to ...
1623 (cmd_qtstart): ... here.
1625 2012-04-14 Yao Qi <yao@codesourcery.com>
1627 * tracepoint.c: Include inttypes.h.
1628 (struct collect_memory_action): Use sized types.
1629 (struct tracepoint): Likewise.
1630 (cmd_qtdp, stop_tracing): Update print specifiers.
1631 (cmd_qtp, response_tracepoint): Likewise.
1632 (collect_data_at_tracepoint): Likewise.
1633 (collect_data_at_step): Likewise.
1635 2012-04-14 Yao Qi <yao@codesourcery.com>
1637 Import gnulib module inttypes.
1638 * aclocal.m4, config.in, configure: Regenerated.
1640 2012-04-14 Yao Qi <yao@codesourcery.com>
1642 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1643 Makefile and config.status at last.
1645 2012-04-13 Yao Qi <yao@codesourcery.com>
1647 * tracepoint.c: Include stdint.h unconditionally.
1649 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1651 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1652 on BFD_HAVE_SYS_PROCFS_TYPE.
1653 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1654 * configure: Regenerate.
1655 * config.in: Likewise.
1657 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1659 * Makefile.in (clean): Also remove x32.c x32-linux.c
1660 x32-avx.c x32-avx-linux.c.
1661 (x32.o): New target.
1663 (x32-linux.o): Likewise.
1664 (x32-linux.c): Likewise.
1665 (x32-avx.o): Likewise.
1666 (x32-avx.c): Likewise.
1667 (x32-avx-linux.o): Likewise.
1668 (x32-avx-linux.c): Likewise.
1670 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1671 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1672 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1673 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1674 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1675 i386/x32-avx-linux.xml.
1677 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1678 (init_registers_x32_avx_linux): Likwise.
1679 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1680 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1682 2012-04-13 Pedro Alves <palves@redhat.com>
1684 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1685 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1686 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1687 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1690 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1692 * linux-x86-low.c (compat_x32_clock_t): New.
1693 (compat_x32_siginfo_t): Likewise.
1694 (compat_x32_siginfo_from_siginfo): Likewise.
1695 (siginfo_from_compat_x32_siginfo): Likewise.
1696 (linux_is_elf64): Likewise.
1697 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1698 and siginfo_from_compat_x32_siginfo for x32.
1699 (x86_arch_setup): Set linux_is_elf64.
1701 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1704 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1706 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1707 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1708 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1709 compatible with process.
1711 2012-04-12 Yao Qi <yao@codesourcery.com>
1713 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1714 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1715 (install-only, install-info, clean): Handle sub dir gnulib.
1716 (all-lib, am--refresh): New targets.
1717 (memmem.o): Remove target.
1718 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1719 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1720 (AC_REPLACE_FUNCS): Remove memmem.
1721 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1722 (AC_OUTPUT): Generate Makefile in gnulib/.
1723 * aclocal.m4, config.in, configure: Regenerated.
1725 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1727 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1729 2012-04-05 Pedro Alves <palves@redhat.com>
1731 -Werror=strict-aliasing
1733 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1736 2012-04-04 Pedro Alves <palves@redhat.com>
1738 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1739 (sparc_store_gregset_from_stack, sparc_store_gregset)
1740 (sparc_breakpoint_at): Fix formatting.
1742 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1744 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1746 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1747 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1748 * config.in: Regenerate.
1749 * configure: Likewise.
1751 2012-03-29 Pedro Alves <palves@redhat.com>
1753 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1754 Correct ptrace arguments.
1756 2012-03-28 Pedro Alves <palves@redhat.com>
1758 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1759 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1760 (IA64_FR1_REGNUM): New defines.
1761 (ia64_fetch_register): New.
1762 (the_low_target): Install it.
1763 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1765 * linux-low.c (linux_fetch_registers): Try the
1766 the_low_target.fetch_register hook first.
1768 * linux-arm-low.c (the_low_target): Adjust.
1769 * linux-bfin-low.c (the_low_target): Adjust.
1770 * linux-cris-low.c (the_low_target): Adjust.
1771 * linux-crisv32-low.c (the_low_target): Adjust.
1772 * linux-m32r-low.c (the_low_target): Adjust.
1773 * linux-m68k-low.c (the_low_target): Adjust.
1774 * linux-mips-low.c (the_low_target): Adjust.
1775 * linux-ppc-low.c (the_low_target): Adjust.
1776 * linux-s390-low.c (the_low_target): Adjust.
1777 * linux-sh-low.c (the_low_target): Adjust.
1778 * linux-sparc-low.c (the_low_target): Adjust.
1779 * linux-tic6x-low.c (the_low_target): Adjust.
1780 * linux-x86-low.c (the_low_target): Adjust.
1781 * linux-xtensa-low.c (the_low_target): Adjust.
1783 2012-03-26 Pedro Alves <palves@redhat.com>
1785 * server.c (handle_qxfer_libraries): Don't bail early if
1786 the_target->qxfer_libraries_svr4 is not NULL.
1788 2012-03-26 Pedro Alves <palves@redhat.com>
1790 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1792 2012-03-23 Pedro Alves <palves@redhat.com>
1794 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1795 "library-list-svr4" element's start tag when the the DSO list is
1798 2012-03-23 Pedro Alves <palves@redhat.com>
1800 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1801 a variable whose type size is the same as the inferior's pointer
1804 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1806 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1808 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1809 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1810 * linux-low.h: Include <signal.h>.
1811 (struct siginfo): Remove forward declaration.
1812 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1815 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1817 * .gitignore: Ignore more files.
1819 2012-03-19 Pedro Alves <palves@redhat.com>
1820 Jan Kratochvil <jan.kratochvil@redhat.com>
1822 * server.c (cont_thread, general_thread): Add describing comments.
1823 (start_inferior): Clear `cont_thread'.
1824 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1827 2012-03-15 Yao Qi <yao@codesourcery.com>
1829 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1831 (cmd_qtdp): ... here.
1833 2012-03-15 Yao Qi <yao@codesourcery.com>
1835 * tracepoint.c (struct tracepoint_action_ops): New.
1836 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1837 (m_tracepoint_action_download): New.
1838 (r_tracepoint_action_download): New.
1839 (x_tracepoint_action_download): New.
1840 (l_tracepoint_action_download): New.
1841 (add_tracepoint_action): Install `action->ops' according type.
1842 (download_tracepoint_1): Move code `download' function pointer
1843 of various tracepoint_action_ops.
1845 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1847 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1848 linux_ptrace_attach_warnings.
1850 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1852 * Makefile.in (linux-ptrace.o): New.
1853 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1854 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1855 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1856 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1857 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1859 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1861 2012-03-08 Yao Qi <yao@codesourcery.com>
1862 Pedro Alves <palves@redhat.com>
1864 Fix PR server/13392.
1865 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1867 * tracepoint.c (remove_tracepoint): New.
1868 (cmd_qtdp): Call remove_tracepoint when failed to install.
1870 2012-03-07 Pedro Alves <palves@redhat.com>
1872 * linux-low.c (get_detach_signal): New.
1873 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1874 Pass on pending signals to PTRACE_DETACH. Check the result of the
1876 * server.c (program_signals, program_signals_p): New.
1877 (handle_general_set): Handle QProgramSignals.
1878 * server.h (program_signals, program_signals_p): Declare.
1880 2012-03-05 Pedro Alves <palves@redhat.com>
1881 Jan Kratochvil <jan.kratochvil@redhat.com>
1883 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1886 2012-03-03 Yao Qi <yao@codesourcery.com>
1888 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1889 agent_look_up_symbols.
1891 2012-03-03 Yao Qi <yao@codesourcery.com>
1893 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1894 (linux-x86-low.o): Likewise.
1895 * server.h: Remove in_process_agent_loaded.
1896 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1900 2012-03-03 Yao Qi <yao@codesourcery.com>
1902 * tracepoint.c (gdb_agent_capability): New global.
1903 (in_process_agent_loaded_ust): Renamed to
1904 `in_process_agent_supports_ust'.
1906 (in_process_agent_supports_ust): Call agent_capability_check.
1907 (clear_installed_tracepoints): Assert that agent supports
1910 2012-03-03 Yao Qi <yao@codesourcery.com>
1912 * linux-low.c (linux_supports_agent): New.
1913 (linux_target_ops): Initialize field `supports_agent' with
1914 linux_supports_agent.
1915 * target.h (struct target_ops) <supports_agent>: New.
1916 (target_supports_agent): New macro.
1917 * server.c (handle_general_set): Handle packet 'QAgent'.
1918 (handle_query): Send `QAgent+'.
1919 * Makefile.in (server.o): Depends on agent.h.
1921 2012-03-03 Yao Qi <yao@codesourcery.com>
1923 * Makefile.in (OBS): Add agent.o.
1924 Add new rule for agent.o.
1925 Track dependence of tracepoint.c on agent.h.
1926 * tracepoint.c (run_inferior_command_1):
1927 (run_inferior_command): Call agent_run_command.
1928 (gdb_ust_connect_sync_socket): Deleted. Move it to
1930 (resume_thread, stop_thread): Likewise.
1931 (gdb_ust_socket_init): Renamed to ...
1932 (gdb_agent_socket_init): ... New.
1933 (gdb_ust_thread): Renamed to ...
1934 (gdb_agent_helper_thread): ... New.
1935 (gdb_ust_init): Move some code to ...
1936 (gdb_agent_init): ... here. New.
1937 [HAVE_UST]: Call gdb_ust_init.
1938 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1939 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1940 * config.in, configure: Regenerated.
1942 2012-03-02 Pedro Alves <palves@redhat.com>
1944 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1945 * linux-low.c (struct simple_pid_list): New.
1946 (stopped_pids): New a struct simple_pid_list pointer.
1947 (add_to_pid_list, pull_pid_from_list): New.
1948 (handle_extended_wait): Don't assume the first signal new children
1949 report is SIGSTOP. Adjust call to pull_pid_from_list.
1950 (linux_wait_for_lwp): Adjust.
1952 2012-03-02 Yao Qi <yao@codesourcery.com>
1954 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1957 2012-03-02 Yao Qi <yao@codesourcery.com>
1959 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1960 `stop_pc' and `tpoint'. Update caller.
1962 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1964 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1965 * linux-low.c (use_linux_regsets): New macro.
1966 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1967 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1968 (linux_register_in_regsets): New function.
1969 (usr_fetch_inferior_registers): Skip registers covered by
1971 (usr_store_inferior_registers): Likewise.
1972 (usr_fetch_inferior_registers): New macro.
1973 (usr_store_inferior_registers): Likewise.
1974 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1975 (linux_store_registers): Likewise.
1976 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1978 (init_registers_mips64_dsp_linux): Likewise.
1979 (init_registers_mips_linux): New macro.
1980 (init_registers_mips_dsp_linux): Likewise.
1981 (mips_dsp_num_regs): Likewise.
1982 (DSP_BASE, DSP_CONTROL): New fallback macros.
1983 (mips_base_regs): New macro.
1984 (mips_regmap): Use it. Fix the size.
1985 (mips_dsp_regmap): New variable.
1986 (mips_dsp_regset_bitmap): Likewise.
1987 (mips_arch_setup): New function.
1988 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1990 (mips_cannot_store_register): Likewise.
1991 (the_low_target): Update .arch_setup, .num_regs and .regmap
1992 initializers. Add .regset_bitmap initializer.
1993 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1995 * linux-bfin-low.c (the_low_target): Likewise.
1996 * linux-cris-low.c (the_low_target): Likewise.
1997 * linux-crisv32-low.c (the_low_target): Likewise.
1998 * linux-ia64-low.c (the_low_target): Likewise.
1999 * linux-m32r-low.c (the_low_target): Likewise.
2000 * linux-m68k-low.c (the_low_target): Likewise.
2001 * linux-ppc-low.c (the_low_target): Likewise.
2002 * linux-s390-low.c (the_low_target): Likewise.
2003 * linux-sh-low.c (the_low_target): Likewise.
2004 * linux-sparc-low.c (the_low_target): Likewise.
2005 * linux-tic6x-low.c (the_low_target): Likewise.
2006 * linux-x86-low.c (the_low_target): Likewise.
2007 * linux-xtensa-low.c (the_low_target): Likewise.
2008 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2009 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2010 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2012 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2013 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2015 2012-02-29 Yao Qi <yao@codesourcery.com>
2016 Pedro Alves <palves@redhat.com>
2018 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2019 `step_over_finished' is true.
2021 2012-02-27 Pedro Alves <palves@redhat.com>
2023 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2024 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2026 2012-02-27 Pedro Alves <palves@redhat.com>
2029 * linux-low.c (pid_is_stopped): New.
2030 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2032 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2034 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2037 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2039 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2041 2012-02-24 Luis Machado <lgustavo@codesourcery>
2043 * server.c (handle_query): Advertise support for target-side
2044 breakpoint condition evaluation.
2045 (process_point_options): New function.
2046 (process_serial_event): When inserting a breakpoint, check for
2047 a target-side condition that should be evaluated.
2049 * mem-break.c: Include regcache.h and ax.h.
2050 (point_cond_list_t): New data structure.
2051 (breakpoint) <cond_list>: New field.
2052 (find_gdb_breakpoint_at): Make non-static.
2053 (delete_gdb_breakpoint_at): Clear any target-side
2055 (clear_gdb_breakpoint_conditions): New function.
2056 (add_condition_to_breakpoint): Likewise.
2057 (add_breakpoint_condition): Likewise.
2058 (gdb_condition_true_at_breakpoint): Likewise.
2059 (gdb_breakpoint_here): Return result directly instead
2060 of going through a local variable.
2062 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2063 (clear_gdb_breakpoint_conditions): Likewise.
2064 (add_breakpoint_condition): Likewise.
2065 (gdb_condition_true_at_breakpoint): Likewise.
2067 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2068 (need_step_over_p): Take target-side breakpoint condition into
2071 2012-02-24 Luis Machado <lgustavo@codesourcery>
2073 * server.h: Include tracepoint.h.
2074 (agent_mem_read, agent_get_trace_state_variable_value,
2075 agent_set_trace_state_variable_value,
2076 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2077 get_set_tsv_func_addr): New prototypes.
2079 * ax.h: New include file.
2080 * ax.c: New source file.
2082 * tracepoint.c: Include ax.h.
2083 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2084 agent_expr, eval_result_type): Move to ax.h.
2085 (parse_agent_expr): Rename to ...
2086 (gdb_parse_agent_expr): ... this, make it non-static and move
2088 (unparse_agent_expr) Rename to ...
2089 (gdb_unparse_agent_expr): ... this, make it non-static and move
2091 (eval_agent_expr): Rename to ...
2092 (eval_tracepoint_agent_expr): ... this.
2093 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2094 forward declarations.
2095 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2096 (agent_get_trace_state_variable_value): New function.
2097 (agent_set_trace_state_variable_value): New function.
2098 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2099 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2100 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2101 (condition_true_at_tracepoint): Likewise.
2102 (parse_agent_expr): Rename to ...
2103 (gdb_parse_agent_expr): ... this and move to ax.c.
2104 (unparse_agent_expr): Rename to ...
2105 (gdb_unparse_agent_expr): ... this and move to ax.c.
2106 (gdb_agent_op_name): Move to ax.c.
2107 (eval_agent_expr): Rename to ...
2108 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2110 (eval_tracepoint_agent_expr): New function.
2111 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2113 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2115 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2116 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2117 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2118 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2119 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2120 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2121 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2122 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2123 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2124 (compile_bytecodes): Remove forward declaration.
2125 (is_goto_target): Move to ax.c.
2126 (compile_bytecodes): Move to ax.c and call
2127 agent_get_trace_state_variable_value (...) and
2128 agent_set_trace_state_variable_value (...).
2130 * Makefile.in: Update ax.c and IPA dependencies.
2132 2012-02-24 Pedro Alves <palves@redhat.com>
2134 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2135 (cmd_bigqtbuffer_circular): ... this. Only handle
2136 'QTBuffer:circular:'.
2137 (handle_tracepoint_general_set): Adjust.
2139 2012-02-16 Yao Qi <yao@codesourcery.com>
2141 * inferiors.c: Move code to ...
2142 * dll.c: .... here. New.
2143 * server.h: Declare clear_dlls.
2144 * Makefile.in (SFILES): Add dll.c.
2148 2012-02-11 Yao Qi <yao@codesourcery.com>
2150 * server.c: (handle_monitor_command): Add a new parameter
2152 (handle_query): Update caller.
2154 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2156 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2157 * configure, config.in: Regenerate.
2158 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2161 2012-02-02 Pedro Alves <palves@redhat.com>
2163 Try SIGKILL first, then PTRACE_KILL.
2164 * linux-low.c (linux_kill_one_lwp): New.
2165 (linux_kill_one_lwp): Rename to ...
2166 (kill_one_lwp_callback): ... this. Use the new
2169 2012-02-02 Pedro Alves <palves@redhat.com>
2171 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2174 2012-01-27 Pedro Alves <palves@redhat.com>
2176 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2177 (elf_64_file_p): Make static.
2178 (linux_pid_exe_is_elf_64_file): New.
2179 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2180 Delete declarations.
2181 (linux_pid_exe_is_elf_64_file): Declare.
2182 * linux-x86-low.c (x86_arch_setup): Use
2183 linux_pid_exe_is_elf_64_file.
2185 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2187 * linux-low.c (linux_wait_for_event_1): Rename to ...
2188 (linux_wait_for_event): ... here and merge it with former
2189 linux_wait_for_event - new variable wait_ptid, use it.
2190 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2192 2012-01-23 Pedro Alves <palves@redhat.com>
2194 * server.c (main): Avoid yet another case of infinite loop while
2195 detaching/killing after a longjmp.
2197 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2200 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2202 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2204 * hostio.c (handle_readlink): New function.
2205 (handle_vFile): Call it to handle "vFile:readlink" packets.
2207 2012-01-20 Pedro Alves <palves@redhat.com>
2208 Ulrich Weigand <ulrich.weigand@linaro.org>
2210 * server.c (handle_v_requests): Only support vAttach and vRun to
2211 start multiple processes when in extended protocol mode.
2213 2012-01-17 Pedro Alves <palves@redhat.com>
2215 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2216 memalign plus mprotect to allocate the scratch buffer.
2218 2012-01-13 Pedro Alves <palves@redhat.com>
2220 * server.c (attach_inferior): Clear `cont_thread'.
2222 2012-01-13 Pedro Alves <palves@redhat.com>
2224 * server.c (main): Avoid infinite loop while detaching/killing
2227 2012-01-09 Doug Evans <dje@google.com>
2229 * server.c (start_inferior): Set last_ptid in --wrapper case.
2231 2012-01-06 Yao Qi <yao@codesourcery.com>
2233 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2235 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2237 2012-01-04 Yao Qi <yao@codesourcery.com>
2239 * tracepoint.c (cmd_qtdp): Print debug message
2240 for static tracepoint.
2242 2012-01-04 Yao Qi <yao@codesourcery.com>
2244 * tracepoint.c (trace_vdebug): Differentiate debug message
2245 between gdbserver and IPA.
2247 2012-01-03 Yao Qi <yao@codesourcery.com>
2249 * tracepoint.c (tracepoint_was_hit): Don't collect for
2252 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2254 * terminal.h: Reformat copyright header.
2256 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2258 * server.c (gdbserver_version): Update copyright year.
2259 * gdbreplay.c (gdbreplay_version): Likewise.
2261 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2263 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2266 2011-12-18 Hui Zhu <teawater@gmail.com>
2267 * linux-low.c (linux_create_inferior): Save return value to ret.
2269 2011-12-18 Hui Zhu <teawater@gmail.com>
2271 * linux-low.c (linux_create_inferior): Save return value to ret.
2273 2011-12-16 Doug Evans <dje@google.com>
2275 * linux-low.c (linux_create_inferior): If stdio connection,
2276 redirect stdin from /dev/null, stdout to stderr.
2277 * remote-utils.c (remote_is_stdio): New static global.
2278 (remote_connection_is_stdio): New function.
2279 (remote_prepare): Handle stdio connection.
2280 (remote_open): Ditto.
2281 (remote_close): Don't close stdin for stdio connections.
2282 (read_prim,write_prim): New functions. Replace all calls to
2283 read/write to these.
2284 * server.c (main): Watch for "-" argument. Move call to
2285 remote_prepare before start_inferior.
2286 * server.h (STDIO_CONNECTION_NAME): New macro.
2287 (remote_connection_is_stdio): Declare.
2289 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2290 in debugging output.
2292 2011-12-15 Yao Qi <yao@codesourcery.com>
2294 * tracepoint.c: Include sys/syscall.h.
2295 (gdb_ust_thread): Remove preprocessor conditional.
2297 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2299 * linux-low.c (linux_detach_one_lwp): Call
2300 the_low_target.prepare_to_resume before detaching.
2302 2011-12-14 Yao Qi <yao@codesourcery.com>
2304 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2307 2011-12-14 Yao Qi <yao@codesourcery.com>
2309 * i386-low.c (i386_low_stopped_data_address): Initialize local
2312 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2316 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2317 DR_CONTROL unless necessary. Extend comments.
2318 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2319 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2321 2011-12-13 Yao Qi <yao@codesourcery.com>
2323 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2325 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2327 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2329 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2330 Print new debug message for such case.
2332 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2334 Fix overlapping memcpy.
2335 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2336 the read_inferior_memory transfer.
2337 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2338 write_inferior_memory transfer.
2339 (set_fast_tracepoint_jump): New variable buf. Use it for the
2340 read_inferior_memory and write_inferior_memory transfers.
2341 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2342 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2343 Use it for the write_inferior_memory transfer.
2344 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2347 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2349 * linux-low.c (fetch_register, store_register): Make code
2350 consistent, fix formatting.
2352 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2354 * linux-low.c (usr_store_inferior_registers): Factor out code
2355 to handle individual registers into...
2356 (store_register): ... this new function.
2358 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2360 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2361 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2362 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2363 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2364 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2365 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2366 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2367 (srv_xmlfiles): Add new XML files.
2369 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2371 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2372 (init_registers_s390_linux32v1): Add prototype.
2373 (init_registers_s390_linux32v2): Likewise.
2374 (init_registers_s390_linux64v1): Likewise.
2375 (init_registers_s390_linux64v2): Likewise.
2376 (init_registers_s390x_linux64v1): Likewise.
2377 (init_registers_s390x_linux64v2): Likewise.
2378 (s390_num_regs): Increment to 52.
2379 (s390_regmap): Add orig_r2 register.
2380 (s390_num_regs_3264): Increment to 68.
2381 (s390_regmap_3264): Add orig_r2 register.
2382 (s390_collect_ptrace_register): Handle orig_r2 register.
2383 (s390_supply_ptrace_register): Likewise.
2384 (s390_fill_last_break): New function.
2385 (s390_store_last_break): Likewise.
2386 (s390_fill_system_call): New function.
2387 (s390_store_system_call): Likewise.
2388 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2390 (s390_check_regset): New function.
2391 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2392 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2393 Update target_regsets for available register sets.
2395 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2396 Jan Kratochvil <jan.kratochvil@redhat.com>
2398 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2399 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2401 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2402 * linux-low.h (struct process_info_private): New member r_debug.
2403 * server.c (handle_qxfer_libraries): Call
2404 the_target->qxfer_libraries_svr4.
2405 (handle_qxfer_libraries_svr4): New function.
2406 (qxfer_packets): New entry "libraries-svr4".
2407 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2408 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2409 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2410 PACKET_qXfer_libraries_svr4.
2412 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2414 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2415 PSW address/mask between 8-byte and 16-byte formats.
2416 (s390_supply_ptrace_register): Likewise.
2417 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2418 basic addressing mode bit.
2420 2011-11-24 Stan Shebs <stan@codesourcery.com>
2422 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2424 2011-11-17 Stan Shebs <stan@codesourcery.com>
2426 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2427 (tracing_start_time): New global.
2428 (tracing_stop_time): New global.
2429 (tracing_user_name): New global.
2430 (tracing_notes): New global.
2431 (tracing_stop_note): New global.
2432 (cmd_qtstart): Set traceframe_usage, start_time.
2433 (stop_tracing): Set stop_time.
2434 (cmd_qtstatus): Report additional status.
2435 (cmd_qtp): New function.
2436 (handle_tracepoint_query): Call it.
2437 (cmd_qtnotes): New function.
2438 (handle_tracepoint_general_set): Call it.
2439 (get_timestamp): Rename from tsv_get_timestamp.
2441 2011-11-14 Stan Shebs <stan@codesourcery.com>
2442 Kwok Cheung Yeung <kcy@codesourcery.com>
2444 * linux-x86-low.c (small_jump_insn): New.
2445 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2446 trampoline and error message, build a trampoline and issue a small
2447 jump instruction to it.
2448 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2449 trampoline and error message.
2450 (x86_get_min_fast_tracepoint_insn_len): New.
2451 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2452 * linux-low.h (struct linux_target_ops): Add arguments to
2453 install_fast_tracepoint_jump_pad operation, add new operation.
2454 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2456 (linux_get_min_fast_tracepoint_insn_len): New function.
2457 (linux_target_op): Add new operation.
2458 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2459 (gdb_trampoline_buffer_end): Ditto.
2460 (gdb_trampoline_buffer_error): Ditto.
2461 (struct ipa_sym_addresses): Add fields for new IPA variables.
2462 (symbol_list): Add entries for new IPA variables.
2463 (struct tracepoint): Add fields to hold the address range of the
2464 trampoline used by the tracepoint.
2465 (trampoline_buffer_head): New static variable.
2466 (trampoline_buffer_tail): Ditto.
2467 (claim_trampoline_space): New function.
2468 (have_fast_tracepoint_trampoline_buffer): New function.
2469 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2471 (install_fast_tracepoint): Ditto, also add error buffer argument.
2472 (cmd_qtminftpilen): New function.
2473 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2474 (fast_tracepoint_from_trampoline_address): New function.
2475 (fast_tracepoint_collecting): Handle trampoline as part of jump
2477 (set_trampoline_buffer_space): New function.
2478 (initialize_tracepoint): Initialize new IPA variables.
2479 * target.h (struct target_ops): Add arguments to
2480 install_fast_tracepoint_jump_pad operation, add new
2481 get_min_fast_tracepoint_insn_len operation.
2482 (target_get_min_fast_tracepoint_insn_len): New.
2483 (install_fast_tracepoint_jump_pad): Add arguments.
2484 * server.h (IPA_BUFSIZ): Define.
2485 * linux-i386-ipa.c: Include extra header files.
2486 (initialize_fast_tracepoint_trampoline_buffer): New function.
2487 (initialize_low_tracepoint): Call it.
2488 * server.h (set_trampoline_buffer_space): Declare.
2489 (claim_trampoline_space): Ditto.
2490 (have_fast_tracepoint_trampoline_buffer): Ditto.
2492 2011-11-14 Yao Qi <yao@codesourcery.com>
2494 * server.c (handle_query): Handle InstallInTrace for qSupported.
2495 * tracepoint.c (add_tracepoint): Sort list.
2496 (install_tracepoint, download_tracepoint): New.
2497 (cmd_qtdp): Call them to install and download tracepoints.
2498 (sort_tracepoints): Removed.
2499 (cmd_qtstart): Update.
2501 2011-11-14 Yao Qi <yao@codesourcery.com>
2503 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2504 * mem-break.h: Declare.
2505 * tracepoint.c (cmd_qtstart): Move some code to ...
2506 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2508 (download_tracepoints): Move some code to ...
2509 (download_tracepoint_1): ... here. New.
2511 2011-11-08 Yao Qi <yao@codesourcery.com>
2513 * remote-utils.c (relocate_instruction): A comment fix.
2515 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2517 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2518 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2519 dr_status_mirror and dr_control_mirror from debug_reg_state.
2520 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2521 (i386_initial_stuff): Remove use of deleted globals.
2522 (i386_get_thread_context, i386_set_thread_context,
2523 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2524 from debug_reg_state.
2526 2011-11-05 Yao Qi <yao@codesourcery.com>
2528 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2529 address as TPOINT's.
2531 2011-11-02 Stan Shebs <stan@codesourcery.com>
2533 * tracepoint.c (agent_mem_read_string): New function.
2534 (eval_agent_expr): Call it for tracenz.
2535 * server.c (handle_query): Report support for tracenz.
2537 2011-11-02 Yao Qi <yao@codesourcery.com>
2539 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2541 2011-11-02 Yao Qi <yao@codesourcery.com>
2543 * target.h: Fix a typo in comment.
2545 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2547 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2548 clobber the breakpoints' shadows with fast tracepoint jumps.
2549 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2550 * target.c (write_inferior_memory): Also pass MYADDR down to
2553 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2555 * configure.ac: Check support for personality routine.
2556 * configure: Regenerate.
2557 * config.in: Likewise.
2558 * linux-low.c: Include <sys/personality.h>.
2559 Define ADDR_NO_RANDOMIZE if necessary.
2560 (linux_create_inferior): Disable address space randomization when
2561 forking inferior, if requested.
2562 (linux_supports_disable_randomization): New function.
2563 (linux_target_ops): Install it.
2564 * server.h (disable_randomization): Declare.
2565 * server.c (disable_randomization): New global variable.
2566 (handle_general_set): Handle QDisableRandomization.
2567 (handle_query): Likewise for qSupported.
2568 (main): Support --disable-randomization and --no-disable-randomization
2569 command line arguments.
2570 * target.h (struct target_ops): Add supports_disable_randomization.
2571 (target_supports_disable_randomization): New macro.
2573 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2575 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2577 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2578 [!PT_GETDSBT] (target_loadmap): New definition.
2579 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2580 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2581 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2582 and PT_GETDSBT to LINUX_LOADMAP.
2583 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2584 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2586 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2588 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2589 (arm_linux_hwbp_cap): New static variable.
2590 (arm_linux_get_hwbp_cap): Replace by ...
2591 (arm_linux_init_hwbp_cap): ... this new function.
2592 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2593 (arm_linux_get_hw_watchpoint_count): Likewise.
2594 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2595 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2596 (arm_prepare_to_resume): Use perror_with_name instead of error.
2598 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2600 * linux-arm-low.c: Include <signal.h>.
2601 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2602 (struct arm_linux_hwbp_cap): New data type.
2603 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2604 (struct arm_linux_hw_breakpoint): New data type.
2605 (MAX_BPTS, MAX_WPTS): Define.
2606 (struct arch_process_info, struct arch_lwp_info): New data types.
2607 (arm_linux_get_hwbp_cap): New function.
2608 (arm_linux_get_hw_breakpoint_count): Likewise.
2609 (arm_linux_get_hw_watchpoint_count): Likewise.
2610 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2611 (arm_hwbp_control_initialize): Likewise.
2612 (arm_hwbp_control_is_enabled): Likewise.
2613 (arm_hwbp_control_is_initialized): Likewise.
2614 (arm_hwbp_control_disable): Likewise.
2615 (arm_linux_hw_breakpoint_equal): Likewise.
2616 (arm_linux_hw_point_initialize): Likewise.
2617 (struct update_registers_data): New data structure.
2618 (update_registers_callback: New function.
2619 (arm_insert_point): Likewise.
2620 (arm_remove_point): Likewise.
2621 (arm_stopped_by_watchpoint): Likewise.
2622 (arm_stopped_data_address): Likewise.
2623 (arm_new_process): Likewise.
2624 (arm_new_thread): Likewise.
2625 (arm_prepare_to_resume): Likewise.
2626 (the_low_target): Register arm_insert_point, arm_remove_point,
2627 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2628 arm_new_thread, and arm_prepare_to_resume.
2630 2011-09-15 Stan Shebs <stan@codesourcery.com>
2632 * server.h (struct emit_ops): Add compare-goto fields.
2633 * tracepoint.c (gdb_agent_op_sizes): New table.
2634 (emit_eq_goto): New function.
2635 (emit_ne_goto): New function.
2636 (emit_lt_goto): New function.
2637 (emit_le_goto): New function.
2638 (emit_gt_goto): New function.
2639 (emit_ge_goto): New function.
2640 (is_goto_target): New function.
2641 (compile_bytecodes): Recognize special cases of compare-goto
2642 combinations and call specialized emitters for them.
2643 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2644 (amd64_emit_ne_goto): New function.
2645 (amd64_emit_lt_goto): New function.
2646 (amd64_emit_le_goto): New function.
2647 (amd64_emit_gt_goto): New function.
2648 (amd64_emit_ge_goto): New function.
2649 (amd64_emit_ops): Add the new functions.
2650 (i386_emit_eq_goto): New function.
2651 (i386_emit_ne_goto): New function.
2652 (i386_emit_lt_goto): New function.
2653 (i386_emit_le_goto): New function.
2654 (i386_emit_gt_goto): New function.
2655 (i386_emit_ge_goto): New function.
2656 (i386_emit_ops): Add the new functions.
2658 2011-09-08 Stan Shebs <stan@codesourcery.com>
2660 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2661 (i386_emit_epilogue): Restore %ebx.
2663 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2665 * server.c (step_thread): Remove definition.
2666 (process_serial_event): Don't handle Hs.
2667 * server.h (step_thread): Remove declaration.
2668 * target.c (set_desired_inferior): Remove use of step_thread.
2670 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2672 * linux-low.c: Include linux-procfs.h.
2673 (linux_attach_lwp_1): Update comments.
2674 (linux_attach): Scan for existing threads when attaching to a
2675 process that is the tgid.
2676 * Makefile.in: Update dependencies.
2678 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2680 * configure.srv: Add linux-procfs.o dependencies.
2682 2011-08-14 Yao Qi <yao@codesourcery.com>
2684 * target.h (struct target_ops): Fix indent.
2685 * win32-low.c (win32_target_ops): Fix comment.
2687 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2688 Yao Qi <yao@codesourcery.com>
2690 * Makefile.in (clean): Remove tic6x-*.c files.
2691 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2692 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2693 (tic6x-c64xp-linux.c): Likewise.
2694 * configure.srv: Add support for tic6x-*-uclinux.
2695 * linux-tic6x-low.c: New.
2696 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2698 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2699 Yao Qi <yao@codesourcery.com>
2701 * target.h (struct target_ops): Add read_loadmap.
2702 * linux-low.c (struct target_loadseg): New type.
2703 (struct target_loadmap): New type.
2704 (linux_read_loadmap): New function.
2705 (linux_target_ops): Add linux_read_loadmap.
2706 * server.c (handle_query): Support qXfer:fdpic:read packet.
2707 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2710 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2712 * win32-low.c: Include <stdint.h>.
2714 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2716 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2717 to the inferior here.
2718 (i386_remove_aligned_watchpoint): Ditto.
2719 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2720 fit part of the watchpoint in the debug registers.
2721 (i386_update_inferior_debug_regs): New.
2722 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2723 registers, and only update the inferior on success.
2724 (i386_low_remove_watchpoint): Ditto.
2726 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2728 * linux-low.c (compare_ints, unique, list_threads, show_process,
2729 linux_core_of_thread): Delete.
2730 (linux_target_ops): Change linux_core_of_thread to
2731 linux_common_core_of_thread.
2732 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2733 * utils.c (malloc_failure): Change type of argument.
2734 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2735 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2736 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2737 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2738 (IPA_OBJS): Add common-utils-ipa.o.
2739 (ptid_h, linux_osdata_h): New macros.
2740 (server_h): Add common/common-utils.h, common/xml-utils.h,
2741 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2743 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2744 ptid.o, buffer.o): New rules.
2745 (linux-low.o): Add common/linux-osdata.h as a dependency.
2746 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2747 * configure.ac: Add AC_HEADER_DIRENT check.
2748 * config.in: Regenerate.
2749 * configure: Regenerate.
2750 * remote-utils.c (xml_escape_text): Delete.
2751 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2752 buffer_xml_printf): Move to common/buffer.c.
2753 * server.c (main): Remove call to initialize_inferiors.
2754 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2755 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2756 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2757 internal_error, gdb_assert, gdb_assert_fail): Delete.
2758 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2759 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2761 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2762 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2763 initialize_inferiors): Delete.
2765 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2767 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2770 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2772 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2774 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2776 2011-05-26 Yao Qi <yao@codesourcery.com>
2778 * Makefile.in (thread-db.o): Track dependence to
2779 common/gdb_thread_db.h.
2780 * thread-db.c: include gdb_thread_db.h from right place.
2782 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2784 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2785 __FILE__ and __LINE__ to internal_error.
2787 2011-05-13 Doug Evans <dje@google.com>
2789 * thread-db.c (try_thread_db_load_from_sdir): New function.
2790 (try_thread_db_load_from_dir): New function.
2791 (thread_db_load_search): Handle $sdir, ignore $pdir.
2792 Remove trying of system directories if search of
2793 libthread-db-search-path fails, that is now done via $sdir.
2795 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2797 * server.c (handle_query): Add EnableDisableTracepoints to the list
2798 of supported features.
2799 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2801 (cmd_qtenable_disable): New.
2802 (cmd_qtstart): Install tracepoints even if disabled.
2803 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2804 receiving a QTEnable or QTDisable packet.
2805 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2806 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2808 (gdb_probe): Skip data collection if static tracepoint is disabled.
2810 2011-05-10 Doug Evans <dje@google.com>
2812 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2814 2011-05-04 Doug Evans <dje@google.com>
2816 * linux-low.c (linux_join): Skip process lookup.
2817 * spu-low.c (spu_join): Ditto.
2818 * server.c (join_inferiors_callback): Delete.
2819 (process_serial_event): For 'D' packet (detach) call join_inferior
2822 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2824 * README: Don't mention xscale*-*-linux*.
2825 * configure.srv (xscale*-*-linux*): Don't handle target.
2827 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2829 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2831 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2832 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2833 (i386_emit_void_call_2): Likewise.
2835 2011-04-26 Yao Qi <yao@codesourcery.com>
2837 * linux-low.c: Move common macros to linux-ptrace.h.
2838 Include linux-ptrace.h.
2839 * Makefile.in (linux_ptrace_h): New.
2840 (linux-low.o): Depends on linux-ptrace.h.
2842 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2844 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2845 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2846 (remote_prepare): New function with most of the TCP code from ...
2847 (remote_open): ... here. Detect PORT here unconditionally. Move also
2848 setting transport_is_reliable.
2849 * server.c (run_once): New variable.
2850 (gdbserver_usage): Document it.
2851 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2852 the first run if RUN_ONCE.
2853 * server.h (run_once, remote_prepare): New declarations.
2855 2011-04-19 Tom Tromey <tromey@redhat.com>
2857 * win32-low.c (handle_load_dll): Remove duplicate "the".
2859 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2861 Remove support for old Cygwin 1.5 versions.
2862 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2863 function to avoid warning.
2864 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2867 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2869 * gdbserver/server.h (Macro _): Define it if not available.
2871 2011-03-14 Michael Snyder <msnyder@vmware.com>
2873 * hostio.c (handle_close): Remove unnecessary null test.
2875 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2877 * Makefile.in (maintainer-clean realclean distclean): Remove
2878 "make ... subdir_do" command.
2880 2011-03-10 Michael Snyder <msnyder@vmware.com>
2882 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2884 * server.c (handle_v_run): Free alloced buffer on early return.
2886 2011-03-09 Yao Qi <yao@codesourcery.com>
2889 2011-03-04 Yao Qi <yao@codesourcery.com>
2891 * Makefile.in: Remove GNU make feature --directory.
2893 2011-03-05 Yao Qi <yao@codesourcery.com>
2895 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2896 (subdir_do): New make target. Copied from gdb/Makefile.
2897 (maintainer-clean, realclean, distclean, clean): Call corresponding
2898 make targets in common/Makefile.
2900 2011-02-11 Yao Qi <yao@codesourcery.com>
2902 * configure.ac: Call AC_PROG_RANLIB.
2903 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2904 * configure: Regenerate.
2906 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2908 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2910 2011-03-06 Yao Qi <yao@codesourcery.com>
2912 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2914 2011-03-05 Yao Qi <yao@codesourcery.com>
2916 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2917 (subdir_do): New make target. Copied from gdb/Makefile.
2918 (maintainer-clean, realclean, distclean, clean): Call corresponding
2919 make targets in common/Makefile.
2921 2011-03-04 Yao Qi <yao@codesourcery.com>
2923 * Makefile.in: Remove GNU make feature --directory.
2925 2011-03-04 Michael Snyder <msnyder@vmware.com>
2927 * server.c (queue_stop_reply): Call xmalloc not malloc.
2929 2011-03-02 Michael Snyder <msnyder@vmware.com>
2931 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2933 2011-02-28 Michael Snyder <msnyder@vmware.com>
2935 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2936 (cmd_qtframe): Ditto.
2937 (cmd_qtbuffer): Ditto.
2938 (cmd_bigqtbuffer): Ditto.
2940 * utils.c (decimal2str): Initialize 'width' to nine, then
2943 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2945 * hostio.c (require_data): Free *data, not data.
2947 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2949 * hostio.c (require_data): Use free, not xfree.
2951 2011-02-27 Michael Snyder <msnyder@vmware.com>
2953 * server.c (handle_query): Discard unused value.
2955 * hostio.c (require_data): Free malloc memory before returning
2958 2011-02-26 Michael Snyder <msnyder@vmware.com>
2960 * linux-low.c (list_threads): Call closedir for dirent.
2962 2011-02-27 Michael Snyder <msnyder@vmware.com>
2964 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2965 a case statement falls through.
2967 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2969 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2972 2011-02-26 Michael Snyder <msnyder@vmware.com>
2974 * utils.c (decimal2str): Eliminate dead code and dead param.
2975 (pulongest): Drop dead param from call to decimal2str.
2978 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2980 Revert the following patch (not approved yet):
2981 2011-02-21 Hui Zhu <teawater@gmail.com>
2982 * tracepoint.c (tp_printf): New function.
2983 (eval_agent_expr): Handle gdb_agent_op_printf.
2985 2011-02-21 Hui Zhu <teawater@gmail.com>
2987 * tracepoint.c (tp_printf): New function.
2988 (eval_agent_expr): Handle gdb_agent_op_printf.
2990 2011-02-18 Tom Tromey <tromey@redhat.com>
2992 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2993 (tracepoint.o): Likewise.
2994 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2995 (gdb_agent_op_names): Likewise.
2997 2011-02-18 Tom Tromey <tromey@redhat.com>
2999 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3000 gdb_agent_op_rot>: New constants.
3001 (gdb_agent_op_names): Add pick and roll.
3002 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3005 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3007 * aclocal.m4: Regenerated with aclocal-1.11.1.
3009 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3011 * server.c (handle_qxfer_traceframe_info): New.
3012 (qxfer_packets): Register "traceframe-info".
3013 (handle_query): Report support for qXfer:traceframe-info:read+.
3014 * tracepoint.c (match_blocktype): New.
3015 (traceframe_find_block_type): Rename to ...
3016 (traceframe_walk_blocks): ... this. Add callback filter argument,
3018 (traceframe_find_block_type): New, reimplemented on top of
3019 traceframe_walk_blocks.
3020 (build_traceframe_info_xml): New.
3021 (traceframe_read_info): New.
3022 * server.h (traceframe_read_info): Declare.
3024 2011-02-11 Yao Qi <yao@codesourcery.com>
3026 * configure.ac: Call AC_PROG_RANLIB.
3027 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3028 * configure: Regenerate.
3030 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3032 * server.c (gdb_read_memory): Change return semantics to allow
3034 (handle_search_memory_1): Adjust.
3035 (process_serial_event) <'m' packet>: Handle partial transfers.
3036 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3038 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3040 * regcache.c (init_register_cache): Initialize
3041 regcache->register_status.
3042 (free_register_cache): Release regcache->register_status.
3043 (regcache_cpy): Copy register_status.
3044 (registers_to_string): Print 'x's for unavailable registers.
3045 (supply_register): Mark the register's status valid or
3046 unavailable, depending on whether a buffer was passed in or not.
3047 (supply_register_zeroed): New.
3048 (supply_regblock): Mark the registers' status valid or
3049 unavailable, depending on whether a buffer was passed in or not.
3050 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3051 (struct regcache): New `register_status' field.
3052 (supply_register_zeroed): Declare.
3053 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3054 supply_register_zeroed, rather than passing a NULL buffer to
3056 * tracepoint.c (fetch_traceframe_registers): Update comment.
3058 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3060 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3063 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3065 * server.h (decode_xfer_write): Change prototype.
3066 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3067 and don't extract the annex here.
3068 * server.c (decode_xfer_read): Remove `annex' parameter,
3069 and don't extract the annex here.
3071 (struct qxfer): New.
3072 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3073 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3074 (handle_qxfer_statictrace): New functions, abstracted out from
3075 handle_query, and made to use the struct qxfer interface.
3076 (handle_threads_qxfer_proper): Rename to ...
3077 (handle_qxfer_threads_proper): ... this.
3078 (handle_threads_qxfer): Rename to ...
3079 (handle_qxfer_threads): ... this. Adjust.
3080 (qxfer_packets): New array.
3081 (handle_qxfer): New function.
3082 (handle_query): Use handle_qxfer.
3084 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3086 * gdbreplay.c: Shorten lines of >= 80 columns.
3087 * linux-low.c: Ditto.
3088 * linux-ppc-low.c: Ditto.
3089 * linux-s390-low.c: Ditto.
3090 * linux-sparc-low.c: Ditto.
3091 * linux-x86-low.c: Ditto.
3092 * linux-xtensa-low.c: Ditto.
3093 * mem-break.c: Ditto.
3095 * regcache.h: Ditto.
3096 * remote-utils.c: Ditto.
3099 * thread-db.c: Ditto.
3100 * tracepoint.c: Ditto.
3102 * win32-low.h: Ditto.
3104 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3106 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3109 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3111 * server.c (gdbserver_version): Update copyright year in version
3113 * gdbreplay.c (gdbreplay_version): Ditto.
3115 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3117 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3118 * linux-bfin-low.c: New file.
3119 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3120 PT_DATA_ADDR for BFIN targets.
3121 * Makefile.in (SFILES): Add linux-bfin-low.c.
3122 (clean): Remove reg-bfin.c.
3123 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3124 * README: Mention supported Blackfin targets.
3126 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3128 * .gitignore: New file.
3130 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3132 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3134 2010-10-22 Jie Zhang <jie@codesourcery.com>
3136 * Makefile.in: Add FLAGS_TO_PASS variable.
3137 (install): Remove dependency of install-only and recursively
3138 invoke make for install-only.
3140 2010-10-04 Doug Evans <dje@google.com>
3142 * Makefile.in (uninstall): Use $(DESTDIR).
3144 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3148 * linux-x86-low.c (compat_siginfo_from_siginfo)
3149 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3150 si_code is < 0. Check for si_code == SI_TIMER before checking for
3153 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3155 * lynx-i386-low.c: New file.
3156 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3158 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3160 * lynx-low.c (ptrace_request_to_str): Remove handling for
3161 request values that have been removed in LynxOS 5.x.
3163 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3165 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3168 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3170 * configure.ac: Add --enable-inprocess-agent option.
3171 * configure: Rebuilt.
3173 2010-09-06 Yao Qi <yao@codesourcery.com>
3175 * linux-low.c (linux_kill): Remove unused variable.
3176 (linux_stabilize_threads): Likewise.
3177 * server.c (start_inferior): Likewise.
3178 (queue_stop_reply_callback): Likewise.
3179 * tracepoint.c (do_action_at_tracepoint): Likewise.
3181 2010-09-06 Yao Qi <yao@codesourcery.com>
3183 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3186 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3188 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3190 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3192 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3195 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3197 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3198 gdbserver/lynx-ppc-low.c: New files.
3199 * Makefile.in (lynx_low_h): New variable.
3200 (lynx-low.o, lynx-ppc-low.o): New rules.
3201 * configure.ac: On LynxOS, link with -lnetinet.
3202 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3203 * configure: regenerate.
3205 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3207 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3208 * configure.ac: Add check for vasprintf and vsnprintf.
3209 * configure, config.in: Regenerate.
3210 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3212 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3214 * gdbreplay.c: Move include of alloca.h up, next to include of
3216 * server.h: Add include of malloc.h.
3217 * mem-break.c: Remove include of malloc.h.
3218 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3220 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3222 * Makefile.in (memmem.o): Build with -Wno-error.
3224 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3226 * utils.c (xsnprintf): Make non-static.
3227 * server.h: Add xsnprintf declaration.
3228 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3229 replace calls to snprintf by calls to xsnprintf throughout.
3231 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3233 * configure.ac: Add configure check for alloca.
3234 * configure, config.in: Regenerate.
3235 * server.h: Include alloca.h if it exists.
3236 * gdbreplay.c: Include alloca.h if it exists.
3238 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3240 * linux-low.c (__SIGRTMIN): Define if not already defined.
3241 (linux_create_inferior): Check for __ANDROID__ rather than
3243 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3244 are already deferred.
3245 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3246 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3247 stopped and already has a pending signal to report.
3248 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3249 a pending signal to report or is moving out of a jump pad.
3250 (linux_init_signals): Check for __ANDROID__ rather than
3253 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3255 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3256 debug_threads check. Avoid a linear search when not doing debug
3259 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3261 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3262 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3263 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3264 (process_event): Change local fd's type to gdb_fildes_t.
3265 (create_file_handler): Adjust prototype.
3266 (delete_file_handler): Adjust prototype.
3267 (handle_file_event): Adjust prototype. Use pfildes.
3268 (create_file_event): Adjsut prototype.
3269 * remote-utils.c (remote_desc, listen_desc): Change type to
3271 * server.h: New gdb_fildes_t typedef.
3272 [USE_WIN32API]: Include winsock2.h.
3273 (delete_file_handler, add_file_handler): Adjust prototypes.
3275 * utils.c (pfildes): New.
3277 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3279 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3280 * configure: Regenerate.
3282 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3284 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3285 (linux_done_accessing_memory): ... this.
3286 (linux_target_ops): Adjust.
3287 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3288 * nto-low.c (nto_target_ops): Adjust comment.
3289 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3290 * spu-low.c (spu_target_ops): Adjust comment.
3291 * target.h (target_ops): Rename unprepare_to_access_memory field
3292 to done_accessing_memory.
3293 (unprepare_to_access_memory): Rename to ...
3294 (done_accessing_memory): ... this.
3296 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3298 * linux-low.c (linux_prepare_to_access_memory): New.
3299 (linux_unprepare_to_access_memory): New.
3300 (linux_target_ops): Install them.
3301 * server.c (read_memory): Rename to ...
3302 (gdb_read_memory): ... this. Use
3303 prepare_to_access_memory/prepare_to_access_memory.
3304 (write_memory): Rename to ...
3305 (gdb_write_memory): ... this. Use
3306 prepare_to_access_memory/prepare_to_access_memory.
3307 (handle_search_memory_1): Adjust.
3308 (process_serial_event): Adjust.
3309 * target.h (struct target_ops): New fields
3310 prepare_to_access_memory and unprepare_to_access_memory.
3311 (prepare_to_access_memory, unprepare_to_access_memory): New.
3312 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3313 prepare_to_access_memory/prepare_to_access_memory.
3314 * nto-low.c (nto_target_ops): Adjust.
3315 * spu-low.c (spu_target_ops): Adjust.
3316 * win32-low.c (win32_target_ops): Adjust.
3318 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3320 * Makefile.in (WARN_CFLAGS): Get it from configure.
3321 (WERROR_CFLAGS): New.
3322 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3323 * configure.ac: Introduce --enable-werror, which adds -Werror to
3324 the compiler command line. Enabled by default. Disable with
3325 --disable-werror. Add -Wdeclaration-after-statement
3326 Wpointer-arith and -Wformat-nonliteral to warning flags.
3327 * configure: Regenerate.
3329 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3331 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3333 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3335 * gdbreplay.c (remote_error): New.
3337 (expect): Use gdbchar. Check for error reading from GDB.
3338 Clarify sync error output.
3339 (play): Check for errors writing to GDB.
3340 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3341 * remote-utils.c (getpkt): Check for errors writing to the remote
3344 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3346 * linux-low.c (linux_wait_1): Move non-debugging code out of
3347 `debug_threads' control.
3349 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3351 * linux-low.c (linux_wait_1): Don't set last_status here.
3352 * server.c (push_event, queue_stop_reply_callback): Assert we're
3353 not pushing a TARGET_WAITKIND_IGNORE event.
3354 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3355 (myresume, handle_target_event): Set the thread's last_resume_kind
3356 and last_status from the target returned status.
3358 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3362 * linux-x86-low.c (update_debug_registers_callback): New.
3363 (i386_dr_low_set_addr): Use it.
3364 (i386_dr_low_get_addr): New.
3365 (i386_dr_low_set_control): Use update_debug_registers_callback.
3366 (i386_dr_low_get_control): New.
3367 (i386_dr_low_get_status): Adjust.
3368 * linux-low.c (linux_stop_lwp): New.
3369 * linux-low.h (linux_stop_lwp): Declare.
3371 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3372 argument instead of a i386_debug_reg_state.
3373 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3374 a i386_debug_reg_state.
3375 (i386_insert_aligned_watchpoint): Adjust.
3376 (i386_remove_aligned_watchpoint): Adjust.
3377 (i386_low_stopped_data_address): Read the debug registers from the
3378 inferior instead of from the mirrors.
3379 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3380 (i386_dr_low_get_addr): Declare.
3381 (i386_dr_low_get_control): Declare.
3382 (i386_dr_low_get_status): Change prototype.
3384 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3385 (i386_dr_low_get_addr): New.
3386 (i386_dr_low_get_control): New.
3387 (i386_dr_low_get_status): Adjust prototype. Return
3389 (i386_initial_stuff): Clear dr_status_mirror and
3391 (i386_get_thread_context): Adjust.
3392 (i386_set_thread_context): Adjust.
3393 (i386_thread_added): Adjust.
3395 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3397 * linux-low.h (linux_thread_area): Delete declaration.
3399 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3401 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3402 after its termination.
3404 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3406 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3407 (gdb_wants_all_stopped): Delete.
3408 (linux_wait_1): Don't call them.
3409 * server.c (handle_v_cont): Tag all threads as want-stopped.
3410 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3411 stopped as "client-wants-stopped".
3413 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3415 * Makefile.in (signals_h): New.
3416 (server_h): Depend on it.
3417 (server.o): Don't depend on $(signals_def).
3418 (signals.o): Depend on $(signals_def).
3420 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3422 * Makefile.in (signals_def): New.
3423 (server_h): Append include/gdb/signals.h and signals_def.
3424 (server.o): Append signals_def.
3426 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3428 * server.c (handle_target_event): Use target_signal_to_host for
3429 resume_info.sig initialization.
3430 * target.h (struct thread_resume) <sig>: New comment.
3432 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3434 * server.c (handle_query): strcpy() the returned string from paddress()
3435 instead of sprintf().
3436 * utils.c (paddress): Return phex_nz().
3438 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3440 * server.c (handle_v_cont): Call mourn_inferior if process
3442 (myresume): Likewise.
3444 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3446 Static tracepoints, and integration with UST.
3448 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3449 * mem-break.c (uninsert_all_breakpoints)
3450 (reinsert_all_breakpoints): New.
3451 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3452 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3453 (gdb_agent_ust_loaded, helper_thread_id)
3454 (gdb_agent_helper_thread_id): New macros.
3455 (struct ipa_sym_addresses): Add addr_ust_loaded,
3456 addr_helper_thread_id, addr_cmd_buf.
3457 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3458 (in_process_agent_loaded_ust): New.
3459 (write_e_ust_not_loaded): New.
3460 (maybe_write_ipa_ust_not_loaded): New.
3461 (struct collect_static_trace_data_action): New.
3462 (enum tracepoint_type) <static_tracepoint>: New.
3463 (struct tracepoint) <handle>: Mention static tracepoints.
3464 (struct static_tracepoint_ctx): New.
3465 (CMD_BUF_SIZE): New.
3466 (add_tracepoint_action): Handle static tracepoint actions.
3467 (unprobe_marker_at): New.
3468 (clear_installed_tracepoints): Handle static tracepoints.
3469 (cmd_qtdp): Handle static tracepoints.
3470 (probe_marker_at): New.
3471 (cmd_qtstart): Handle static tracepoints.
3472 (response_tracepoint): Handle static tracepoints.
3473 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3474 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3475 (get_context_regcache): Handle static tracepoints.
3476 (do_action_at_tracepoint): Handle static tracepoint actions.
3477 (traceframe_find_block_type): Handle static trace data blocks.
3478 (traceframe_read_sdata): New.
3479 (download_tracepoints): Download static tracepoint actions.
3480 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3481 (GDB_PROBE_NAME): New.
3486 (ust_marker_to_static_tracepoint): New.
3488 (collect_ust_data_at_tracepoint): New.
3489 (gdb_ust_probe): New.
3490 (UNIX_PATH_MAX, SOCK_DIR): New.
3491 (gdb_ust_connect_sync_socket): New.
3492 (resume_thread, stop_thread): New.
3493 (run_inferior_command): New.
3494 (init_named_socket): New.
3495 (gdb_ust_socket_init): New.
3496 (cstr_to_hexstr): New.
3498 (first_marker, next_marker): New.
3499 (response_ust_marker): New.
3500 (cmd_qtfstm, cmd_qtsstm): New.
3501 (unprobe_marker_at, probe_marker_at): New.
3502 (cmd_qtstmat, gdb_ust_thread): New.
3503 (gdb_ust_init): New.
3504 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3505 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3507 (x86_64_st_collect_regmap): New.
3508 (X86_64_NUM_ST_COLLECT_GREGS): New.
3509 (AMD64_RIP_REGNUM): New.
3510 (supply_static_tracepoint_registers): New.
3511 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3513 (i386_st_collect_regmap): New.
3514 (i386_NUM_ST_COLLECT_GREGS): New.
3515 (supply_static_tracepoint_registers): New.
3516 * server.c (handle_query): Handle qXfer:statictrace:read.
3517 <qSupported>: Report support for StaticTracepoints, and
3518 qXfer:statictrace:read features.
3519 * server.h (traceframe_read_sdata)
3520 (supply_static_tracepoint_registers): Declare.
3521 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3522 (unpack_varlen_hex): Include in IPA build.
3523 * Makefile.in (ustlibs, ustinc): New.
3524 (IPA_OBJS): Add remote-utils-ipa.o.
3525 ($(IPA_LIB)): Link -ldl and -lpthread.
3527 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3528 * config.in, configure: Regenerate.
3530 2010-06-20 Ian Lance Taylor <iant@google.com>
3531 Pedro Alves <pedro@codesourcery.com>
3533 * linux-x86-low.c (always_true): Delete.
3534 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3535 trying to fool the compiler with always_true.
3537 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3539 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3540 conditions in gdbserver.
3542 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3544 * spu-low.c (spu_read_memory): Wrap around local store limit.
3545 (spu_write_memory): Likewise.
3547 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3549 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3550 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3552 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3554 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3555 uses with LONGEST uses.
3557 2010-06-14 Stan Shebs <stan@codesourcery.com>
3558 Pedro Alves <pedro@codesourcery.com>
3562 * linux-x86-low.c: Include limits.h.
3567 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3568 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3569 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3570 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3571 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3572 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3573 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3574 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3575 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3576 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3577 (amd64_emit_void_call_2): New.
3578 (amd64_emit_ops): New.
3579 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3580 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3581 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3582 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3583 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3584 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3585 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3586 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3587 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3588 (i386_emit_stack_adjust, i386_emit_int_call_1)
3589 (i386_emit_void_call_2): New.
3590 (i386_emit_ops): New.
3591 (x86_emit_ops): New.
3592 (the_low_target): Install x86_emit_ops.
3593 * server.h (struct emit_ops): New.
3594 (get_raw_reg_func_addr): Declare.
3595 (current_insn_ptr, emit_error): Declare.
3596 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3597 (set_trace_state_variable_value): New defines.
3598 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3599 addr_get_trace_state_variable_value and
3600 addr_set_trace_state_variable_value.
3601 (symbol_list): New fields for get_raw_reg,
3602 get_trace_state_variable_value and set_trace_state_variable_value.
3603 (condfn): New typedef.
3604 (struct tracepoint): New field `compiled_cond'.
3605 (do_action_at_tracepoint): Clear compiled_cond.
3606 (get_trace_state_variable_value, set_trace_state_variable_value):
3608 (condition_true_at_tracepoint): If there's a compiled condition,
3610 (current_insn_ptr, emit_error): New globals.
3611 (struct bytecode_address): New.
3612 (get_raw_reg_func_addr): New.
3613 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3614 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3615 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3616 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3617 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3618 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3619 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3620 (compile_tracepoint_condition, compile_bytecodes): New.
3621 * target.h (emit_ops): Forward declare.
3622 (struct target_ops): New field emit_ops.
3623 (target_emit_ops): New.
3624 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3625 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3626 * linux-low.c (linux_emit_ops): New.
3627 (linux_target_ops): Install it.
3628 * linux-low.h (struct linux_target_ops): New field emit_ops.
3630 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3632 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3633 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3635 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3636 Stan Shebs <stan@codesourcery.com>
3638 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3639 (all): Depend on $(extra_libraries).
3640 (install-only): Install the IPA.
3641 (IPA_OBJS, IPA_LIB): New.
3642 (clean): Remove the IPA lib.
3643 (IPAGENT_CFLAGS): New.
3644 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3645 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3646 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3647 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3648 * configure.ac: Check for atomic builtins support in the compiler.
3649 (IPA_DEPFILES, extra_libraries): Define.
3650 * configure.srv (ipa_obj): Add description.
3651 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3652 (i[34567]86-*-linux*): Set ipa_obj.
3653 (x86_64-*-linux*): Set ipa_obj.
3654 * linux-low.c (stabilizing_threads): New.
3655 (supports_fast_tracepoints): New.
3656 (linux_detach): Stabilize threads before detaching.
3657 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3658 the lwp is either not stabilizing, or is moving out of a jump pad.
3659 (linux_fast_tracepoint_collecting): New.
3660 (maybe_move_out_of_jump_pad): New.
3661 (enqueue_one_deferred_signal): New.
3662 (dequeue_one_deferred_signal): New.
3663 (linux_wait_for_event_1): If moving out of a jump pad, defer
3664 pending signals to later.
3665 (linux_stabilize_threads): New.
3666 (linux_wait_1): Check if threads need moving out of jump pads, and
3668 (stuck_in_jump_pad_callback): New.
3669 (move_out_of_jump_pad_callback): New.
3671 (linux_resume_one_lwp): Handle moving out of jump pads.
3672 (linux_set_resume_request): Dequeue deferred signals.
3673 (need_step_over_p): Also step over fast tracepoint jumps.
3674 (start_step_over): Also uninsert fast tracepoint jumps.
3675 (finish_step_over): Also reinsert fast tracepoint jumps.
3676 (linux_install_fast_tracepoint_jump): New.
3677 (linux_target_ops): Install linux_stabilize_threads and
3678 linux_install_fast_tracepoint_jump_pad.
3679 * linux-low.h (linux_target_ops) <get_thread_area,
3680 install_fast_tracepoint_jump_pad>: New fields.
3681 (struct lwp_info) <collecting_fast_tracepoint,
3682 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3683 (linux_get_thread_area): Declare.
3684 * linux-x86-low.c (jump_insn): New.
3685 (x86_get_thread_area): New.
3686 (append_insns): New.
3688 (amd64_install_fast_tracepoint_jump_pad): New.
3689 (i386_install_fast_tracepoint_jump_pad): New.
3690 (x86_install_fast_tracepoint_jump_pad): New.
3691 (the_low_target): Install x86_get_thread_area and
3692 x86_install_fast_tracepoint_jump_pad.
3693 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3694 (struct fast_tracepoint_jump): New.
3695 (fast_tracepoint_jump_insn): New.
3696 (fast_tracepoint_jump_shadow): New.
3697 (find_fast_tracepoint_jump_at): New.
3698 (fast_tracepoint_jump_here): New.
3699 (delete_fast_tracepoint_jump): New.
3700 (set_fast_tracepoint_jump): New.
3701 (uninsert_fast_tracepoint_jumps_at): New.
3702 (reinsert_fast_tracepoint_jumps_at): New.
3703 (set_breakpoint_at): Use write_inferior_memory.
3704 (uninsert_raw_breakpoint): Use write_inferior_memory.
3705 (check_mem_read): Mask out fast tracepoint jumps.
3706 (check_mem_write): Mask out fast tracepoint jumps.
3707 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3708 (set_fast_tracepoint_jump): Declare.
3709 (delete_fast_tracepoint_jump)
3710 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3711 (reinsert_fast_tracepoint_jumps_at): Declare.
3712 * regcache.c: Don't compile many functions when building the
3713 in-process agent library.
3714 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3715 the register buffer in the heap.
3716 (free_register_cache): If the register buffer isn't owned by the
3717 regcache, don't free it.
3718 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3719 pre-existing register caches.
3720 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3722 (convert_ascii_to_int): : Constify `from' parameter type.
3723 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3724 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3725 the needed buffer in-place.
3726 (relocate_instruction): New.
3727 * server.c (handle_query) <qSymbols>: If the target supports
3728 tracepoints, give it a chance of looking up symbols. Report
3729 support for fast tracepoints.
3730 (handle_status): Stabilize threads.
3731 (process_serial_event): Adjust.
3732 * server.h (struct fast_tracepoint_jump): Forward declare.
3733 (struct process_info) <fast_tracepoint_jumps>: New field.
3734 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3735 (decode_X_packet, decode_M_packet): Adjust.
3736 (relocate_instruction): Declare.
3737 (in_process_agent_loaded): Declare.
3738 (tracepoint_look_up_symbols): Declare.
3739 (struct fast_tpoint_collect_status): Declare.
3740 (fast_tracepoint_collecting): Declare.
3741 (force_unlock_trace_buffer): Declare.
3742 (handle_tracepoint_bkpts): Declare.
3743 (initialize_low_tracepoint)
3744 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3745 * target.h (struct target_ops) <stabilize_threads,
3746 install_fast_tracepoint_jump_pad>: New fields.
3747 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3748 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3749 [HAVE_STDINT_H]: Include stdint.h.
3750 (trace_debug_1): Rename to ...
3751 (trace_vdebug): ... this.
3752 (trace_debug): Rename to ...
3753 (trace_debug_1): ... this. Add `level' parameter.
3755 (ATTR_USED, ATTR_NOINLINE): New.
3756 (IP_AGENT_EXPORT): New.
3757 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3758 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3759 (about_to_request_buffer_space, trace_buffer_is_full)
3760 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3761 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3762 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3763 (traceframe_write_count, traceframes_created)
3764 (trace_state_variables)
3765 New renaming defines.
3766 (struct ipa_sym_addresses): New.
3767 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3769 (ipa_sym_addrs): New.
3770 (all_tracepoint_symbols_looked_up): New.
3771 (in_process_agent_loaded): New.
3772 (write_e_ipa_not_loaded): New.
3773 (maybe_write_ipa_not_loaded): New.
3774 (tracepoint_look_up_symbols): New.
3775 (debug_threads) [IN_PROCESS_AGENT]: New.
3776 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3777 (UNKNOWN_SIDE_EFFECTS): New.
3778 (stop_tracing): New.
3779 (flush_trace_buffer): New.
3780 (stop_tracing_bkpt): New.
3781 (flush_trace_buffer_bkpt): New.
3782 (read_inferior_integer): New.
3783 (read_inferior_uinteger): New.
3784 (read_inferior_data_pointer): New.
3785 (write_inferior_data_pointer): New.
3786 (write_inferior_integer): New.
3787 (write_inferior_uinteger): New.
3788 (struct collect_static_trace_data_action): Delete.
3789 (enum tracepoint_type): New.
3790 (struct tracepoint) <type>: New field `type'.
3791 <actions_str, step_actions, step_actions_str>: Only include in
3793 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3794 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3795 (tracepoints): Use IP_AGENT_EXPORT.
3796 (last_tracepoint): Don't include in the IPA.
3797 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3798 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3799 (alloced_trace_state_variables): New.
3800 (trace_state_variables): Use IP_AGENT_EXPORT.
3801 (traceframe_t): Delete unused variable.
3802 (circular_trace_buffer): Don't include in the IPA.
3803 (trace_buffer_start): Delete.
3804 (struct trace_buffer_control): New.
3805 (trace_buffer_free): Delete.
3806 (struct ipa_trace_buffer_control): New.
3807 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3808 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3810 (trace_buffer_ctrl): New.
3811 (TRACE_BUFFER_CTRL_CURR): New.
3812 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3813 Reimplement as macros.
3814 (trace_buffer_wrap): Delete.
3815 (traceframe_write_count, traceframe_read_count)
3816 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3817 (struct tracepoint_hit_ctx) <type>: New field.
3818 (struct fast_tracepoint_ctx): New.
3819 (memory_barrier): New.
3821 (record_tracepoint_error): Update atomically in the IPA.
3822 (clear_inferior_trace_buffer): New.
3823 (about_to_request_buffer_space): New.
3824 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3825 updating the same buffer.
3826 (add_tracepoint): Default the tracepoint's type to trap
3827 tracepoint, and orig_size to -1.
3828 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3830 (create_trace_state_variable): New parameter `gdb'. Handle it.
3831 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3832 (cmd_qtdp): Handle fast tracepoints.
3834 (max_jump_pad_size): New.
3835 (gdb_jump_pad_head): New.
3836 (get_jump_space_head): New.
3837 (claim_jump_space): New.
3838 (sort_tracepoints): New.
3839 (MAX_JUMP_SIZE): New.
3840 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3842 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3843 support. Upload fast traceframes, and delete internal IPA
3845 (stop_tracing_handler): New.
3846 (flush_trace_buffer_handler): New.
3847 (cmd_qtstop): Upload fast tracepoints.
3848 (response_tracepoint): Handle fast tracepoints.
3849 (tracepoint_finished_step): Upload fast traceframes. Set the
3850 tracepoint hit context's tracepoint type.
3851 (handle_tracepoint_bkpts): New.
3852 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3853 type. Add comment about fast tracepoints.
3854 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3855 non-existing action_str field.
3856 (get_context_regcache): Handle fast tracepoints.
3857 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3859 (fast_tracepoint_from_jump_pad_address): New.
3860 (fast_tracepoint_from_ipa_tpoint_address): New.
3861 (collecting_t): New.
3862 (force_unlock_trace_buffer): New.
3863 (fast_tracepoint_collecting): New.
3866 (write_inferior_data_ptr): New.
3867 (target_tp_heap): New.
3868 (target_malloc): New.
3869 (download_agent_expr): New.
3871 (download_tracepoints): New.
3872 (download_trace_state_variables): New.
3873 (upload_fast_traceframes): New.
3874 (IPA_FIRST_TRACEFRAME): New.
3875 (IPA_NEXT_TRACEFRAME_1): New.
3876 (IPA_NEXT_TRACEFRAME): New.
3877 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3878 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3879 (gdb_jump_pad_buffer_end): New.
3880 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3881 (initialize_tracepoint): Adjust.
3882 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3883 buffer. Initialize the low module.
3884 * utils.c (PREFIX, TOOLNAME): New.
3885 (malloc_failure): Use PREFIX.
3886 (error): In the IPA, an error causes an exit.
3887 (fatal, warning): Use PREFIX.
3888 (internal_error): Use TOOLNAME.
3889 (NUMCELLS): Increase to 10.
3890 * configure, config.in: Regenerate.
3892 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3894 * server.c (handle_query) <qSupported>: Do two passes over the
3895 qSupported string to avoid nesting strtok.
3897 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3899 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3901 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3903 * configure: Regenerate.
3904 * proc-service.list: New.
3906 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3908 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3911 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3913 * gdbreplay.c (remote_open): Check error return from socket() call by
3914 its equality to -1 not by it being negative.
3915 * remote-utils.c (remote_open): Likewise.
3917 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3919 * config.h: Regenerate.
3921 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3923 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3924 doesn't provide PTRACE_GET_THREAD_AREA.
3926 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3928 * linux-m68k-low.c: Include <asm/ptrace.h>
3929 (ps_get_thread_area): Implement.
3931 2010-05-03 Doug Evans <dje@google.com>
3933 * event-loop.c (struct callback_event): New struct.
3934 (callback_list): New global.
3935 (append_callback_event, delete_callback_event): New functions.
3936 (process_callback): New function.
3937 (start_event_loop): Call it.
3938 * remote-utils.c (NOT_SCHEDULED): Define.
3939 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3940 moved out of readchar.
3941 (readchar): Rewrite. Call reschedule before returning.
3942 (reset_readchar): New function.
3943 (remote_close): Call it.
3944 (process_remaining, reschedule): New functions.
3945 * server.h (callback_handler_func): New typedef.
3946 (append_callback_event, delete_callback_event): Declare.
3948 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3950 * proc-service.c (ps_pglobal_lookup): Use
3951 thread_db_look_up_one_symbol.
3952 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3953 parameter. Use it instead of all_symbols_looked_up.
3954 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3956 (all_symbols_looked_up): Don't declare.
3957 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3958 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3960 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3961 Set all_symbols_looked_up here.
3962 (thread_db_look_up_one_symbol): New.
3963 (thread_db_get_tls_address): Adjust.
3964 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3965 thread_db object on the heap, and tentatively set it in the
3967 (thread_db_init): Don't set all_symbols_looked_up here.
3968 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3970 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3972 * linux-low.c (linux_kill, linux_detach): Adjust.
3973 (status_pending_p_callback): Remove redundant statement. Check
3974 for !TARGET_WAITIKIND_IGNORE, instead of
3975 TARGET_WAITKIND_STOPPED.
3976 (handle_tracepoints): Make sure LWP is locked. Adjust.
3977 (linux_wait_for_event_1): Adjust.
3978 (linux_cancel_breakpoints): New.
3979 (unsuspend_one_lwp): New.
3980 (unsuspend_all_lwps): New.
3981 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3982 (send_sigstop_callback): Change return type to int, add new
3983 `except' parameter and handle it.
3984 (suspend_and_send_sigstop_callback): New.
3985 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3986 pass them down. If SUSPEND, also increment the lwp's suspend
3988 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3989 (need_step_over_p): Don't consider suspended LWPs.
3990 (start_step_over): Adjust.
3991 (proceed_one_lwp): Change return type to int, add new `except'
3992 parameter and handle it.
3993 (unsuspend_and_proceed_one_lwp): New.
3994 (proceed_all_lwps): Use find_inferior instead of
3996 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3997 also decrement the suspend count of LWPs. Pass `except' down,
3998 instead of hacking its suspend count.
3999 (linux_pause_all): Add `freeze' parameter. Adjust.
4000 (linux_unpause_all): New.
4001 (linux_target_ops): Install linux_unpause_all.
4002 * server.c (handle_status): Adjust.
4003 * target.h (struct target_ops): New fields `unpause_all' and
4004 `cancel_breakpoints'. Add new parameter to `pause_all'.
4005 (pause_all): Add new `freeze' parameter.
4007 (cancel_breakpoints): New.
4008 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4010 (cmd_qtstart): Pause threads.
4011 (stop_tracing): Pause threads, and cancel breakpoints.
4012 * win32-low.c (win32_target_ops): Adjust.
4014 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4016 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4017 the inferior right away from here...
4018 (linux_wait_1): ... to here, and adjust to check the thread's
4019 last_resume_kind instead of the lwp's step or stop_expected flags.
4021 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4023 * README: Use consistent `GDB' and `GDBserver' spellings.
4025 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4027 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4028 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4029 (linux_detach_one_lwp): Assume the lwp is stopped.
4030 (any_thread_of): Delete.
4031 (linux_detach): Stop all lwps here. Don't blindly delete all
4033 (delete_lwp_callback): New.
4034 (linux_mourn): Delete all lwps of the process that is gone.
4035 (linux_wait_1): Don't delete the last lwp of the process here.
4036 * mem-break.h (mark_breakpoints_out): Declare.
4037 * mem-break.c (mark_breakpoints_out): New.
4038 (free_all_breakpoints): Use it.
4039 * server.c (handle_target_event): If the process is gone, mark
4041 * thread-db.c (struct thread_db) <create_bp>: New field.
4042 (thread_db_enable_reporting): Fix prototype. Store a thread event
4043 breakpoint reference in the thread_db struct.
4044 (thread_db_load_search): Clear the thread_db object.
4045 (try_thread_db_load_1): Ditto.
4046 (switch_to_process): New.
4047 (disable_thread_event_reporting): Use it.
4048 (remove_thread_event_breakpoints): New.
4049 (thread_db_detach, thread_db_mourn): Use it.
4051 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4053 * linux-low.c (linux_enable_event_reporting): New.
4054 (linux_wait_for_event_1, handle_extended_wait): Use it.
4056 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4058 * linux-low.c (linux_kill_one_lwp, linux_kill)
4059 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4060 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4061 SIGSTOP even if the LWP is stopped.
4062 (send_sigstop_callback): New.
4063 (stop_all_lwps): Use send_sigstop_callback instead.
4064 (linux_resume_one_thread): Adjust.
4065 (proceed_one_lwp): Still proceed an LWP that the client has
4066 requested to stop, if we haven't reported it as stopped yet. Make
4067 sure that LWPs the client want stopped, have a pending SIGSTOP.
4069 2010-04-26 Doug Evans <dje@google.com>
4071 * server.c (handle_general_set): Make static.
4073 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4074 Print received char after testing for error/eof instead of before.
4075 (input_interrupt): Tweak comment.
4077 2010-04-23 Doug Evans <dje@google.com>
4079 * server.c (start_inferior): Print inferior argv if --debug.
4081 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4083 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4084 * nto-x86-low.c: Include server.h
4086 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4088 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4089 be consistent with other sources of this directory.
4090 (init_registers_amd64): Correct name of source file of this function
4093 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4095 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4098 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4100 * win32-i386-low.c: Add 64-bit support.
4101 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4102 (init_registers_amd64): Declare.
4103 (mappings): Add 64-bit version of array.
4104 (init_windows_x86): New function.
4105 (the_low_target): Change init_arch field to init_windows_x86.
4107 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4109 * win32-low.c: Adapt to support also 64-bit architecture.
4110 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4111 (get_image_name): Use SIZE_T type for local variable `done'.
4112 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4113 (toolhelp_get_dll_name): Idem.
4114 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4115 Use uintptr_t typecast to avoid warning.
4116 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4117 (handle_exception): Use phex_nz to avoid warning.
4118 (win32_wait): Remove unused local variable `process'.
4120 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4122 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4125 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4127 * configure.ac: Use `ws2_32' library for srv_mingw.
4128 * configure: Regenerate.
4129 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4130 * remote-utils.c: Likewise.
4132 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4134 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4135 if __x86_64__ is defined.
4137 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4139 * configure: Regenerate.
4141 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4143 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4144 * target.h (target_ops): New get_tib_address field.
4145 * win32-low.h (win32_thread_info): Add thread_local_base field.
4146 * win32-low.c (child_add_thread): Add tlb argument.
4147 Set thread_local_base field to TLB.
4148 (get_child_debug_event): Adapt to child_add_thread change.
4149 (win32_get_tib_address): New function.
4150 (win32_target_ops): Set get_tib_address field to
4151 win32_get_tib_address.
4152 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4154 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4156 * linux-low.c (linux_mourn): Also remove the process.
4157 * server.c (handle_target_event): Don't remove the process here.
4158 * nto-low.c (nto_mourn): New.
4159 (nto_target_ops): Install it.
4160 * spu-low.c (spu_mourn): New.
4161 (spu_target_ops): Install it.
4162 * win32-low.c (win32_mourn): New.
4163 (win32_target_ops): Install it.
4165 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4167 * server.h (buffer_xml_printf): Remove redundant `;'.
4169 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4171 * regcache.c (set_register_cache): Invalidate regcaches before
4172 changing the register cache layout.
4173 (regcache_invalidate_one): Allow a NULL regcache.
4174 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4175 regcaches before changing the register cache layout or the target
4178 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4180 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4181 variable warning on Linux/x86-64.
4183 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4185 GDBserver disconnected tracing support.
4187 * linux-low.c (linux_remove_process): Delete.
4188 (add_lwp): Don't set last_resume_kind here.
4189 (linux_kill): Use `mourn'.
4190 (linux_detach): Use `thread_db_detach', and `mourn'.
4192 (linux_attach_lwp_1): Adjust comment.
4193 (linux_attach): last_resume_kind moved the thread_info; adjust.
4194 (status_pending_p_callback): Adjust.
4195 (linux_wait_for_event_1): Adjust.
4196 (count_events_callback, select_singlestep_lwp_callback)
4197 (select_event_lwp_callback, cancel_breakpoints_callback)
4198 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4199 (proceed_one_lwp): Adjust.
4200 (linux_async): Add debug output.
4201 (linux_thread_stopped): New.
4202 (linux_pause_all): New.
4203 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4205 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4206 (thread_db_free): Delete declaration.
4207 (thread_db_detach, thread_db_mourn): Declare.
4208 * thread-db.c (thread_db_init): Use thread_db_mourn.
4209 (thread_db_free): Delete, split in two.
4210 (disable_thread_event_reporting): New.
4211 (thread_db_detach): New.
4212 (thread_db_mourn): New.
4214 * server.h (struct thread_info) <last_resume_kind>: New field.
4215 <attached>: Add comment.
4216 <gdb_detached>: New field.
4217 (handler_func): Change return type to int.
4218 (handle_serial_event, handle_target_event): Ditto.
4219 (gdb_connected): Declare.
4221 (disconnected_tracing): Declare.
4222 (stop_tracing): Declare.
4224 * server.c (handle_query) <qSupported>: Report support for
4225 disconnected tracing.
4226 (queue_stop_reply_callback): Account for running threads.
4227 (gdb_wants_thread_stopped): New.
4228 (gdb_wants_all_threads_stopped): New.
4229 (gdb_reattached_process): New.
4230 (handle_status): Clear the `gdb_detached' flag of all processes.
4231 In all-stop, stop all threads.
4232 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4233 (process_serial_event): If the remote connection breaks, or if an
4234 exit was forced with "monitor exit", force an event loop exit.
4235 Handle disconnected tracing on detach.
4236 (handle_serial_event): Adjust.
4237 (handle_target_event): If GDB isn't connected, forward events back
4238 to the inferior, unless the last process exited, in which case,
4239 exit gdbserver. Adjust interface.
4241 * remote-utils.c (remote_open): Don't block in accept. Instead
4242 register an event loop source on the listen socket file
4243 descriptor. Refactor bits into ...
4244 (listen_desc): ... this new global.
4245 (gdb_connected): ... this new function.
4246 (enable_async_notification): ... this new function.
4247 (handle_accept_event): ... this new function.
4248 (remote_close): Clear remote_desc.
4250 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4252 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4254 (mourn_inferior): Define.
4255 (target_process_qsupported): Avoid the dangling else problem.
4256 (thread_stopped): Define.
4257 (pause_all): Define.
4258 (target_waitstatus_to_string): Declare.
4259 * target.c (target_waitstatus_to_string): New.
4261 * tracepoint.c (tracing): Make extern.
4262 (disconnected_tracing): New.
4263 (stop_tracing): Make extern. Handle tracing stops due to GDB
4265 (cmd_qtdisconnected): New.
4266 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4267 (handle_tracepoint_general_set): Handle QTDisconnected.
4269 * event-loop.c (event_handler_func): Change return type to int.
4270 (process_event): Bail out if the event handler wants the event
4272 (handle_file_event): Ditto.
4273 (start_event_loop): Bail out if the event handler wants the event
4276 * nto-low.c (nto_target_ops): Adjust.
4277 * spu-low.c (spu_wait): Don't remove the process here.
4278 (spu_target_ops): Adjust.
4279 * win32-low.c (win32_wait): Don't remove the process here.
4280 (win32_target_ops): Adjust.
4282 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4284 * regcache.c (realloc_register_cache): Invalidate inferior's
4285 regcache before recreating it.
4287 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4289 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4291 2010-04-09 Stan Shebs <stan@codesourcery.com>
4292 Pedro Alves <pedro@codesourcery.com>
4294 * server.h (LONGEST): New.
4295 (struct thread_info) <while_stepping>: New field.
4296 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4298 (initialize_tracepoint, handle_tracepoint_general_set)
4299 (handle_tracepoint_query, tracepoint_finished_step)
4300 (tracepoint_was_hit, release_while_stepping_state_list):
4301 (current_traceframe): Declare.
4302 * server.c (handle_general_set): Handle tracepoint packets.
4304 (write_memory): New.
4305 (handle_search_memory_1): Use read_memory.
4306 (handle_query): Report support for conditional tracepoints, trace
4307 state variables, and tracepoint sources. Handle tracepoint
4309 (main): Initialize the tracepoints module.
4310 (process_serial_event): Handle traceframe reads/writes.
4312 * linux-low.c (handle_tracepoints): New.
4313 (linux_wait_1): Call it.
4314 (linux_resume_one_lwp): Handle while-stepping.
4315 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4316 (linux_target_ops): Install them.
4317 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4319 * linux-x86-low.c (x86_supports_tracepoints): New.
4320 (the_low_target). Install it.
4322 * mem-break.h (delete_breakpoint): Declare.
4323 * mem-break.c (delete_breakpoint): Make external.
4325 * target.h (struct target_ops): Add `supports_tracepoints',
4326 `read_pc', and `write_pc' fields.
4327 (target_supports_tracepoints): Define.
4328 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4331 * regcache.h (struct regcache) <registers_owned>: New field.
4332 (init_register_cache, regcache_cpy): Declare.
4333 (regcache_read_pc, regcache_write_pc): Declare.
4334 (register_cache_size): Declare.
4335 (supply_regblock): Declare.
4336 * regcache.c (init_register_cache): New.
4337 (new_register_cache): Use it.
4338 (regcache_cpy): New.
4339 (register_cache_size): New.
4340 (supply_regblock): New.
4341 (regcache_read_pc, regcache_write_pc): New.
4343 * tracepoint.c: New.
4345 * Makefile.in (OBS): Add tracepoint.o.
4346 (tracepoint.o): New rule.
4348 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4350 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4352 (i386-mmx.c): Likewise.
4353 (i386-mmx-linux.o): Likewise.
4354 (i386-mmx-linux.c): Likewise.
4356 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4357 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4358 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4359 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4361 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4362 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4363 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4365 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4367 * Makefile.in (clean): Updated.
4369 (i386-avx.c): Likewise.
4370 (i386-avx-linux.o): Likewise.
4371 (i386-avx-linux.c): Likewise.
4372 (amd64-avx.o): Likewise.
4373 (amd64-avx.c): Likewise.
4374 (amd64-avx-linux.o): Likewise.
4375 (amd64-avx-linux.c): Likewise.
4377 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4378 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4379 (srv_amd64_regobj): Add amd64-avx.o.
4380 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4381 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4382 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4383 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4384 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4385 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4386 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4388 * i387-fp.c: Include "i386-xstate.h".
4390 (i387_cache_to_xsave): Likewise.
4391 (i387_xsave_to_cache): Likewise.
4392 (x86_xcr0): Likewise.
4394 * i387-fp.h (i387_cache_to_xsave): Likewise.
4395 (i387_xsave_to_cache): Likewise.
4396 (x86_xcr0): Likewise.
4398 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4399 * linux-crisv32-low.c (target_regsets): Likewise.
4400 * linux-m68k-low.c (target_regsets): Likewise.
4401 * linux-mips-low.c (target_regsets): Likewise.
4402 * linux-ppc-low.c (target_regsets): Likewise.
4403 * linux-s390-low.c (target_regsets): Likewise.
4404 * linux-sh-low.c (target_regsets): Likewise.
4405 * linux-sparc-low.c (target_regsets): Likewise.
4406 * linux-xtensa-low.c (target_regsets): Likewise.
4408 * linux-low.c: Include <sys/uio.h>.
4409 (regsets_fetch_inferior_registers): Support nt_type.
4410 (regsets_store_inferior_registers): Likewise.
4411 (linux_process_qsupported): New.
4412 (linux_target_ops): Add linux_process_qsupported.
4414 * linux-low.h (regset_info): Add nt_type.
4415 (linux_target_ops): Add process_qsupported.
4417 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4419 (init_registers_i386_avx_linux): New.
4420 (init_registers_amd64_avx_linux): Likewise.
4421 (xmltarget_i386_linux_no_xml): Likewise.
4422 (xmltarget_amd64_linux_no_xml): Likewise.
4423 (PTRACE_GETREGSET): Likewise.
4424 (PTRACE_SETREGSET): Likewise.
4425 (x86_fill_xstateregset): Likewise.
4426 (x86_store_xstateregset): Likewise.
4427 (use_xml): Likewise.
4428 (x86_linux_update_xmltarget): Likewise.
4429 (x86_linux_process_qsupported): Likewise.
4430 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4431 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4432 init_registers_i386_linux here. Call
4433 x86_linux_update_xmltarget.
4434 (the_low_target): Add x86_linux_process_qsupported.
4436 * server.c (handle_query): Call target_process_qsupported.
4438 * target.h (target_ops): Add process_qsupported.
4439 (target_process_qsupported): New.
4441 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4443 * inferiors.c (add_thread): Set last_status kind to
4444 TARGET_WAITKIND_IGNORE.
4445 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4446 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4447 (linux_wait_1): Move `thread' local definition to block that uses
4448 it. Don't NULL initialize `event_child'.
4449 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4450 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4451 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4453 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4455 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4456 an extended waitstatus, or by a watchpoint.
4457 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4458 thread was stepping or has been stopped by a watchpoint.
4460 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4462 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4463 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4464 of another, then delete the previous, and validate all
4466 (validate_inserted_breakpoint): New.
4467 (delete_disabled_breakpoints): New.
4468 (validate_breakpoints): New.
4469 (check_mem_read): Validate breakpoints before trusting their
4470 shadow. Delete disabled breakpoints.
4471 (check_mem_write): Validate breakpoints before trusting they
4472 should be inserted. Delete disabled breakpoints.
4473 * mem-break.h (validate_breakpoints):
4474 * server.c (handle_query): Validate breakpoints when we see a
4477 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4479 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4480 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4481 if we could tell there's a GDB breakpoint at stop_pc.
4482 (need_step_over_p): Don't do a step over if we find a GDB
4483 breakpoint at the resume PC.
4485 * mem-break.c (struct raw_breakpoint): New.
4486 (enum bkpt_type): New type `gdb_breakpoint'.
4487 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4488 fields. New field `raw'.
4489 (find_raw_breakpoint_at): New.
4490 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4492 (set_breakpoint_at): Adjust.
4493 (delete_raw_breakpoint): New.
4494 (release_breakpoint): New.
4495 (delete_breakpoint): Rename to...
4496 (delete_breakpoint_1): ... this. Add proc parameter. Use
4497 release_breakpoint. Return ENOENT.
4498 (delete_breakpoint): Reimplement.
4499 (find_breakpoint_at): Delete.
4500 (find_gdb_breakpoint_at): New.
4501 (delete_breakpoint_at): Delete.
4502 (set_gdb_breakpoint_at): New.
4503 (delete_gdb_breakpoint_at): New.
4504 (gdb_breakpoint_here): New.
4505 (set_reinsert_breakpoint): Use release_breakpoint.
4506 (uninsert_breakpoint): Rename to ...
4507 (uninsert_raw_breakpoint): ... this.
4508 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4509 (reinsert_raw_breakpoint): Change parameter type to
4511 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4513 (check_breakpoints): Adjust. Use release_breakpoint.
4514 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4515 (breakpoint_inserted_here): Ditto.
4516 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4517 Don't trust the breakpoint's shadow if it is not inserted.
4518 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4519 (delete_all_breakpoints): Adjust.
4520 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4521 use delete_breakpoint_1.
4523 * mem-break.h (breakpoints_supported): Delete declaration.
4524 (set_gdb_breakpoint_at): Declare.
4525 (gdb_breakpoint_here): Declare.
4526 (delete_breakpoint_at): Delete.
4527 (delete_gdb_breakpoint_at): Declare.
4529 * server.h (struct raw_breakpoint): Forward declare.
4530 (struct process_info): New field `raw_breakpoints'.
4532 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4535 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4537 * linux-low.c (status_pending_p_callback): Fix comment.
4538 (linux_wait_for_event_1): Move most of the internal breakpoint
4539 handling from here...
4540 (linux_wait_1): ... to here.
4541 (count_events_callback): New.
4542 (select_singlestep_lwp_callback): New.
4543 (select_event_lwp_callback): New.
4544 (cancel_breakpoints_callback): New.
4545 (select_event_lwp): New.
4546 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4547 priority to all LWPs that have had events that should be reported
4548 to the client. Cancel breakpoints when about to reporting the
4549 event to the client, not while stopping lwps. No longer cancel
4550 finished single-steps here.
4551 (cancel_finished_single_step): Delete.
4552 (cancel_finished_single_steps): Delete.
4554 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4556 * mem-break.c (enum bkpt_type): New.
4557 (struct breakpoint): New field `type'.
4558 (set_breakpoint_at): Change return type to struct breakpoint
4559 pointer. Set type to `other_breakpoint' by default.
4560 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4561 in the breakpoint list.
4562 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4563 (reinsert_breakpoint): Rename to ...
4564 (reinsert_raw_breakpoint): ... this.
4565 (reinsert_breakpoints_at): Adjust.
4566 * mem-break.h (struct breakpoint): Declare.
4567 (set_breakpoint_at): Change return type to struct breakpoint
4570 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4572 * server.c (handle_query): Assign, not compare.
4574 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4576 Teach linux gdbserver to step-over-breakpoints.
4578 * linux-low.c (can_hardware_single_step): New.
4579 (supports_breakpoints): New.
4580 (handle_extended_wait): If stopping threads, read the stop pc of
4583 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4584 low target doesn't support retrieving the PC.
4585 (add_lwp): Set last_resume_kind to resume_continue.
4586 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4587 (linux_attach): Don't clear stop_expected. Set the lwp's
4588 last_resume_kind to resume_stop.
4589 (linux_detach_one_lwp): Don't check for removed breakpoints.
4590 (check_removed_breakpoint): Delete.
4591 (status_pending_p): Rename to ...
4592 (status_pending_p_callback): ... this. Don't check for removed
4593 breakpoints. Don't consider threads that are stopped from GDB's
4595 (linux_wait_for_lwp): Always read the stop_pc here.
4596 (cancel_breakpoint): New.
4597 (step_over_bkpt): New global.
4598 (linux_wait_for_event_1): Implement stepping over breakpoints.
4599 (gdb_wants_lwp_stopped): New.
4600 (gdb_wants_all_stopped): New.
4601 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4602 single-step traps here. Store the thread's last reported target
4604 (send_sigstop): Don't clear stop_expected. Always set it,
4606 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4607 (cancel_finished_single_step): New.
4608 (cancel_finished_single_steps): New.
4609 (wait_for_sigstop): Don't cancel finished single-step traps here.
4610 (linux_resume_one_lwp): Don't check for removed breakpoints.
4611 Don't set `step' on non-hardware step archs.
4612 (linux_set_resume_request): Ignore resume_stop requests if already
4613 stopping or stopped. Set the lwp's last_resume_kind.
4614 (resume_status_pending_p): Don't check for removed breakpoints.
4615 (need_step_over_p): New.
4616 (start_step_over): New.
4617 (finish_step_over): New.
4618 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4619 requests. Clear the thread's last reported target waitstatus.
4620 Don't use the `suspended' flag. Don't consider pending breakpoints.
4621 (linux_resume): Start a step-over if necessary.
4622 (proceed_one_lwp): New.
4623 (proceed_all_lwps): New.
4624 (unstop_all_lwps): New.
4625 * linux-low.h (struct lwp_info): Rewrite comment for the
4626 `suspended' flag. Add the `stop_pc' field. Delete the
4627 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4628 Add `'last_resume_kind' and `need_step_over' fields.
4629 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4630 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4631 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4632 (set_raw_breakpoint_at): New.
4633 (set_breakpoint_at): Rewrite to use it.
4634 (reinsert_breakpoint_handler): Delete.
4635 (set_reinsert_breakpoint): New.
4636 (reinsert_breakpoint_by_bp): Delete.
4637 (delete_reinsert_breakpoints): New.
4638 (uninsert_breakpoint): Rewrite.
4639 (uninsert_breakpoints_at): New.
4640 (reinsert_breakpoint): Rewrite.
4641 (reinsert_breakpoints_at): New.
4642 (check_breakpoints): Rewrite.
4643 (breakpoint_here): New.
4644 (breakpoint_inserted_here): New.
4645 (check_mem_read): Adjust.
4646 * mem-break.h (breakpoints_supported, breakpoint_here)
4647 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4648 (reinsert_breakpoint_by_bp): Delete declaration.
4649 (delete_reinsert_breakpoints): Declare.
4650 (reinsert_breakpoint): Delete declaration.
4651 (reinsert_breakpoints_at): Declare.
4652 (uninsert_breakpoint): Delete declaration.
4653 (uninsert_breakpoints_at): Declare.
4654 (check_breakpoints): Adjust prototype.
4655 * server.h: Adjust include order.
4656 (struct thread_info): Declare here. Add a `last_status' field.
4658 2010-03-23 Michael Snyder <msnyder@vmware.com>
4660 * server.c (crc32): New function.
4661 (handle_query): Add handling for 'qCRC:' request.
4663 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4665 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4666 lwp had been stopped by a watchpoint.
4668 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4670 * server.h (internal_error): Declare.
4671 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4672 * utils.c (internal_error): New function.
4674 2010-03-15 Andreas Schwab <schwab@redhat.com>
4676 * configure.srv: Fix typo setting srv_regobj.
4678 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4680 * linux-low.c (fetch_register): Avoid passing a non string literal
4682 (usr_store_inferior_registers): Ditto.
4684 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4686 * linux-low.c (linux_write_memory): Bail out early if peeking
4689 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4691 * linux-low.h (struct lwp_info): New fields
4692 `stopped_by_watchpoint' and `stopped_data_address'.
4693 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4694 here, and cache them in the lwp object.
4695 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4697 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4699 (linux_stopped_by_watchpoint): Rewrite.
4700 (linux_stopped_data_address): Rewrite.
4702 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4704 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4705 switching the current inferior, not before.
4707 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4709 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4710 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4711 i386-linux.c and amd64-linux.c.
4712 (reg-i386.o): Removed.
4713 (reg-i386.c): Likewise.
4714 (reg-i386-linux.o): Likewise.
4715 (reg-i386-linux.c): Likewise.
4716 (reg-x86-64.o): Likewise.
4717 (reg-x86-64.c): Likewise.
4718 (reg-x86-64-linux.o): Likewise.
4719 (reg-x86-64-linux.c): Likewise.
4722 (i386-linux.o): Likewise.
4723 (i386-linux.c): Likewise.
4724 (amd64.o): Likewise.
4725 (amd64.c): Likewise.
4726 (amd64-linux.o): Likewise.
4727 (amd64-linux.c): Likewise.
4729 * configure.srv (srv_i386_regobj): New.
4730 (srv_i386_linux_regobj): Likewise.
4731 (srv_amd64_regobj): Likewise.
4732 (srv_amd64_linux_regobj): Likewise.
4733 (srv_i386_32bit_xmlfiles): Likewise.
4734 (srv_i386_64bit_xmlfiles): Likewise.
4735 (srv_i386_xmlfiles): Likewise.
4736 (srv_amd64_xmlfiles): Likewise.
4737 (srv_i386_linux_xmlfiles): Likewise.
4738 (srv_amd64_linux_xmlfiles): Likewise.
4739 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4740 srv_xmlfiles to $srv_i386_xmlfiles.
4741 (i[34567]86-*-mingw32ce*): Likewise.
4742 (i[34567]86-*-mingw*): Likewise.
4743 (i[34567]86-*-nto*): Likewise.
4744 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4745 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4746 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4747 (x86_64-*-linux*): Likewise.
4749 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4750 (init_registers_amd64_linux): New.
4751 (x86_arch_setup): Replace init_registers_x86_64_linux with
4752 init_registers_amd64_linux.
4754 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4756 * configure.ac: Check for libdl. If it is not available link against
4757 static libthread_db.
4758 * configure: Regenerate.
4760 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4764 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4765 handing a read watchpoint.
4766 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4768 2010-02-12 Doug Evans <dje@google.com>
4770 * linux-low.c (linux_supports_tracefork_flag): Document.
4771 (linux_look_up_symbols): Add comment.
4773 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4775 * regcache.c (supply_register): Clear regcache if buf is NULL.
4777 2010-02-02 Nicolas Roche <roche@sourceware.org>
4778 Joel Brobecker <brobecker@adacore.com>
4780 * inferiors.c (find_inferior): Add function documentation.
4781 (unloaded_dll): Handle the case where the unloaded dll has not
4782 been previously registered in the dll list.
4784 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4786 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4787 (thumb2_breakpoint): New.
4788 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4790 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4792 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4793 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4796 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4798 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4800 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4802 * linux-s390-low.c (s390_collect_ptrace_register)
4803 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4805 2010-01-21 Doug Evans <dje@google.com>
4807 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4808 (PTRACE_ARG4_TYPE): New macro.
4809 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4810 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4811 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4812 (usr_store_inferior_registers): Ditto.
4813 (linux_read_memory, linux_write_memory): Ditto.
4814 (linux_test_for_tracefork): Ditto.
4816 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4817 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4819 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4821 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4824 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4826 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4827 prototype to take a regcache. Adjust.
4829 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4831 * regcache.h (struct thread_info): Forward declare.
4832 (struct regcache): New.
4833 (new_register_cache): Adjust prototype.
4834 (get_thread_regcache): Declare.
4835 (free_register_cache): Adjust prototype.
4836 (registers_to_string, registers_from_string): Ditto.
4837 (supply_register, supply_register_by_name, collect_register)
4838 (collect_register_as_string, collect_register_by_name): Ditto.
4839 * regcache.c (struct inferior_regcache_data): Delete.
4840 (get_regcache): Rename to ...
4841 (get_thread_regcache): ... this. Adjust. Switch inferior before
4843 (regcache_invalidate_one): Adjust.
4844 (regcache_invalidate): Fix prototype.
4845 (new_register_cache): Return the new register cache.
4846 (free_register_cache): Change prototype.
4847 (realloc_register_cache): Adjust.
4848 (registers_to_string): Change prototype to take a regcache. Adjust.
4849 (registers_from_string): Ditto.
4850 (register_data): Ditto.
4851 (supply_register): Ditto.
4852 (supply_register_by_name): Ditto.
4853 (collect_register): Ditto.
4854 (collect_register_as_string): Ditto.
4855 (collect_register_by_name): Ditto.
4856 * server.c (process_serial_event): Adjust.
4857 * linux-low.h (regset_fill_func, regset_store_func): Change
4859 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4861 * linux-low.c (get_stop_pc): Adjust.
4862 (check_removed_breakpoint): Adjust.
4863 (linux_wait_for_event): Adjust.
4864 (linux_resume_one_lwp): Adjust.
4865 (fetch_register): Add regcache parameter. Adjust.
4866 (usr_store_inferior_registers): Ditto.
4867 (regsets_fetch_inferior_registers): Ditto.
4868 (regsets_store_inferior_registers): Ditto.
4869 (linux_fetch_registers, linux_store_registers): Ditto.
4870 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4872 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4874 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4875 prototype to take a regcache.
4876 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4877 * remote-utils.c (convert_ascii_to_int, outreg)
4878 (prepare_resume_reply): Change prototype to take a regcache.
4880 * target.h (struct target_ops) <fetch_registers, store_registers>:
4881 Change prototype to take a regcache.
4882 (fetch_inferior_registers, store_inferior_registers): Change
4883 prototype to take a regcache. Adjust.
4884 * proc-service.c (ps_lgetregs): Adjust.
4885 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4886 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4887 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4888 take a regcache. Adjust.
4889 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4890 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4891 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4892 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4893 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4894 (cris_cannot_fetch_register):
4895 (cris_breakpoint_at): Change prototype to take a regcache.
4897 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4898 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4899 to take a regcache. Adjust.
4900 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4902 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4903 take a regcache. Adjust.
4904 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4905 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4906 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4907 * linux-mips-low.c (mips_get_pc):
4908 (mips_set_pc): Change prototype to take a regcache. Adjust.
4909 (mips_reinsert_addr): Adjust.
4910 (mips_collect_register): Change prototype to take a regcache.
4912 (mips_supply_register):
4913 (mips_collect_register_32bit, mips_supply_register_32bit)
4914 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4915 (mips_store_fpregset): Ditto.
4916 * linux-ppc-low.c (ppc_supply_ptrace_register)
4917 (ppc_supply_ptrace_register): Ditto.
4918 (parse_spufs_run): Adjust.
4919 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4920 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4921 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4922 take a regcache. Adjust.
4923 * linux-s390-low.c (s390_collect_ptrace_register)
4924 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4925 (s390_set_pc): Change prototype to take a regcache. Adjust.
4926 (s390_arch_setup): Adjust.
4927 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4928 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4929 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4930 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4931 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4933 (sparc_breakpoint_at): Adjust.
4934 * linux-xtensa-low.c (xtensa_fill_gregset):
4935 (xtensa_store_gregset):
4936 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4937 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4938 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4939 prototype to take a regcache. Adjust.
4940 * win32-arm-low.c (arm_fetch_inferior_register)
4941 (arm_store_inferior_register): Change prototype to take a
4943 * win32-i386-low.c (i386_fetch_inferior_register)
4944 (i386_store_inferior_register): Change prototype to take a
4946 * win32-low.c (child_fetch_inferior_registers)
4947 (child_store_inferior_registers): Change prototype to take a
4949 (win32_wait): Adjust.
4950 (win32_fetch_inferior_registers): Change prototype to take a
4952 (win32_store_inferior_registers): Adjust.
4953 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4954 store_inferior_register>: Change prototype to take a regcache.
4956 2010-01-20 Doug Evans <dje@google.com>
4958 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4960 (linux_wait_for_event1, linux_init_signals): Ditto.
4961 (W_STOPCODE): Provide definition if missing.
4963 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4965 * linux-low.c (linux_core_of_thread): New.
4966 (compare_ints, show_process, list_threads): New.
4967 (linux_qxfer_osdata): Report threads and cores.
4968 (linux_target_op): Register linux_core_of_thread.
4969 * remote-utils.c (prepare_resume_reply): Report the core.
4970 (buffer_xml_printf): Support %d specifier.
4971 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4973 (handle_query): Handle qXfer:threads. Announce availability
4975 * target.h (struct target_ops): New field core_of_thread.
4977 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4979 * Makefile.in (clean): Remove new generated files.
4980 (reg-s390.o, reg-s390.c): Remove rules.
4981 (reg-s390x.o, reg-s390x.c): Likewise.
4982 (s390-linux32.o, s390-linux32.c): Add rules.
4983 (s390-linux64.o, s390-linux64.c): Likewise.
4984 (s390x-linux64.o, s390x-linux64.c): Likewise.
4985 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4986 * linux-s390-low.c: Include <elf.h>.
4987 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4988 (init_registers_s390): Remove prototype.
4989 (init_registers_s390x): Likewise.
4990 (init_registers_s390_linux32): Add prototype.
4991 (init_registers_s390_linux64): Likewise.
4992 (init_registers_s390x_linux64): Likewise.
4993 (s390_num_regs_3264): New define.
4994 (s390_regmap_3264): New global variable.
4995 (s390_cannot_fetch_register): Remove obsolete check.
4996 (s390_cannot_store_register): Likewise.
4997 (s390_collect_ptrace_register): Handle upper/lower register halves.
4998 (s390_supply_ptrace_register): Likewise.
4999 (s390_fill_gregset): Update to register number changes.
5000 (s390_get_hwcap): New routine.
5001 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5002 Install appropriate regmap and register set.
5004 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5006 * server.c (gdbserver_version): Update copyright year to 2010.
5007 * gdbreplay.c (gdbreplay_version): Likewise.
5009 2009-12-28 Doug Evans <dje@google.com>
5011 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5012 elf/external.h. Include <elf.h> instead but only if necessary.
5014 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5016 * linux-low.c (linux_remove_process): Remove `detaching'
5017 parameter. Don't release/detach from thread_db here.
5018 (linux_kill): Release/detach from thread_db here, ...
5019 (linux_detach): ... and here, before actually detaching.
5020 (linux_wait_1): ... and here, when a process exits.
5021 * thread-db.c (any_thread_of): New.
5022 (thread_db_free): Switch the current inferior to a thread of the
5025 2009-12-21 Doug Evans <dje@google.com>
5027 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5029 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5030 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5031 warning ifndef __NR_tkill. Move setting of errno there too.
5032 Delete unnecessary resetting of errno after syscall.
5033 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5035 * configure.ac: Check for dladdr.
5036 * config.in: Regenerate.
5037 * configure: Regenerate.
5038 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5039 (try_thread_db_load): Update.
5041 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5043 2009-12-18 Doug Evans <dje@google.com>
5045 * event-loop.c: Include unistd.h if it exists.
5047 * linux-low.c (my_waitpid): Move definition away from being in
5048 between linux_tracefork_child/linux_test_for_tracefork.
5050 * gdb_proc_service.h (psaddr_t): Fix type.
5051 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5052 signature to match glibc.
5054 2009-12-16 Doug Evans <dje@google.com>
5056 * linux-low.c (linux_read_memory): Fix argument to read.
5058 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5060 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5061 events, don't leave current_inferior pointing at null.
5063 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5065 * win32-low.c (LOG): Delete.
5066 (OUTMSG): Output to stderr.
5067 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5068 on compile time LOG macro.
5069 (win32_wait): Fix debug output.
5071 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5073 * win32-low.c (win32_add_one_solib): If the dll name is
5074 "ntdll.dll", prepend the system directory to the dll path.
5076 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5078 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5080 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5081 Vladimir Prus <vladimir@codesourcery.com>
5083 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5084 * configure.ac: Check for __mcoldfire__ and set
5085 gdb_cv_m68k_is_coldfire.
5086 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5087 reg-cf.o and reg-m68k.o.
5088 * configure: Regenerated.
5090 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5092 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5093 Pass it to thread_db_free.
5094 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5095 proper `detaching' argument to linux_remove_process.
5096 * linux-low.h (thread_db_free): Add `detaching' parameter.
5097 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5099 (thread_db_free): Add `detaching' parameter. Only
5100 call td_ta_clear_event if detaching from process.
5102 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5104 * thread-db.c (thread_db_free): Fix typo.
5106 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5109 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5111 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5113 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5114 with an i686 compiler.
5115 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5117 * configure: Rebuilt.
5119 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5123 * server.c (handle_search_memory_1): Correct read_addr initialization
5124 in loop for searching subsequent chunks.
5126 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5128 * configure.ac: New --with-libthread-db option.
5129 * thread-db.c: Allow direct dependence on libthread_db.
5130 (thread_db_free): Adjust.
5131 * config.in: Regenerate.
5132 * configure: Likewise.
5134 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5137 * thread-db.c (attach_thread): New function.
5138 (maybe_attach_thread): Return success/failure.
5139 (find_new_threads_callback): Adjust.
5140 (thread_db_find_new_threads): Loop until no new threads.
5142 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5144 * proc-service.c (ps_lgetregs): Formatting.
5146 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5148 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5149 * configure.ac: Adjust.
5150 * linux-low.h (struct process_info_private): Move members to struct
5152 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5153 * linux-low.c (linux_remove_process): Adjust.
5154 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5155 * server.c (handle_query): Move code ...
5156 (handle_monitor_command): ... here. New function.
5157 * target.h (struct target_ops): New member.
5158 * thread-db.c (struct thread_db): New.
5159 (libthread_db_search_path): New variable.
5160 (thread_db_create_event, thread_db_enable_reporting)
5161 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5162 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5163 (try_thread_db_load_1, dladdr_to_soname): New functions.
5164 (try_thread_db_load, thread_db_load_search): New functions.
5165 (thread_db_init): Search for libthread_db.
5166 (thread_db_free): New function.
5167 (thread_db_handle_monitor_command): Likewise.
5168 * config.in: Regenerate.
5169 * configure: Regenerate.
5171 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5173 * spu-low.c (spu_kill): Wait for inferior to terminate.
5174 Call clear_inferiors.
5175 (spu_detach): Call clear_inferiors.
5177 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5179 * aclocal.m4: Regenerate.
5180 * config.in: Likewise.
5181 * configure: Likewise.
5183 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5185 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5186 (parse_spufs_run): New function.
5187 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5188 (ppc_breakpoint_at): Handle SPU breakpoints.
5190 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5192 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5193 (SPUFS_MAGIC): Define.
5194 (spu_enumerate_spu_ids): New function.
5195 (linux_qxfer_spu): New function.
5196 (linux_target_ops): Install linux_qxfer_spu.
5198 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5200 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5201 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5202 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5203 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5204 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5205 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5206 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5207 (init_registers_powerpc_cell32l): Add prototype.
5208 (init_registers_powerpc_cell64l): Likewise.
5209 (ppc_arch_setup): Detect Cell/B.E. architecture.
5211 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5213 * Makefile.in (datarootdir): New variable.
5215 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5217 * linux-low.c (linux_write_memory): Update debugging output.
5218 * Makefile.in (clean): Add new descriptions.
5219 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5220 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5221 * configure.srv: Add new files for arm*-*-linux*.
5222 * linux-arm-low.c: Add new declarations.
5223 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5224 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5225 (HWCAP_VFPv3D16): New.
5226 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5227 instead of __IWMMXT__.
5228 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5229 (arm_arch_setup): New.
5230 (target_regsets): Remove #ifdef. Add VFP regset.
5231 (the_low_target): Use arm_arch_setup.
5233 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5235 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5236 the main thread again.
5238 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5240 Adding Neutrino gdbserver.
5241 * configure: Regenerated.
5242 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5243 * configure.srv (i[34567]86-*-nto*): New target.
5244 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5245 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5246 (nto_comctrl) [__QNX__]: New function.
5247 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5249 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5251 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5254 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5255 Pedro Alves <pedro@codesourcery.com>
5257 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5258 don't support CONTEXT_EXTENDED_REGISTERS.
5259 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5260 (the_low_target): Install them.
5261 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5262 failing with ERROR_PIPE_NOT_CONNECTED.
5264 2009-06-30 Doug Evans <dje@google.com>
5265 Pierre Muller <muller@ics.u-strasbg.fr>
5267 Add h/w watchpoint support to x86-linux, win32-i386.
5268 * Makefile.in (SFILES): Add i386-low.c
5269 (i386_low_h): Define.
5270 (i386-low.o): Add dependencies.
5271 (linux-x86-low.o): Add i386-low.h dependency.
5272 (win32-i386-low.o): Ditto.
5273 * i386-low.c: New file.
5274 * i386-low.h: New file.
5275 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5276 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5277 * linux-low.c (linux_add_process): Initialize arch_private.
5278 (linux_remove_process): Free arch_private.
5279 (add_lwp): Initialize arch_private.
5280 (delete_lwp): Free arch_private.
5281 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5283 * linux-low.h (process_info_private): New member arch_private.
5284 (lwp_info): New member arch_private.
5285 (linux_target_ops): New members new_process, new_thread,
5287 (ptid_of): New macro.
5288 * linux-x86-low.c: Include stddef.h, i386-low.h.
5289 (arch_process_info): New struct.
5290 (arch_lwp_info): New struct.
5291 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5292 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5293 (i386_dr_low_get_status): New function.
5294 (x86_insert_point, x86_remove_point): New functions.
5295 (x86_stopped_by_watchpoint): New function.
5296 (x86_stopped_data_address): New function.
5297 (x86_linux_new_process, x86_linux_new_thread): New functions.
5298 (x86_linux_prepare_to_resume): New function.
5299 (the_low_target): Add entries for insert_point, remove_point,
5300 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5302 * server.c (debug_hw_points): New global.
5303 (monitor_show_help): Document set debug-hw-points.
5304 (handle_query): Process "set debug-hw-points".
5305 * server.h (debug_hw_points): Declare.
5306 (paddress): Declare.
5307 * utils.c (NUMCELLS, CELLSIZE): New macros.
5308 (get_sell, xsnprintf, paddress): New functions.
5309 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5310 remove_point, stopped_by_watchpoint, stopped_data_address.
5311 * win32-i386-low.c: Include i386-low.h.
5312 (debug_reg_state): Replaces dr.
5313 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5314 (i386_dr_low_get_status): New function.
5315 (i386_insert_point, i386_remove_point): New functions.
5316 (i386_stopped_by_watchpoint): New function.
5317 (i386_stopped_data_address): New function.
5318 (i386_initial_stuff): Update.
5319 (get_thread_context,set_thread_context,i386_thread_added): Update.
5320 (the_low_target): Add entries for insert_point,
5321 remove_point, stopped_by_watchpoint, stopped_data_address.
5322 * win32-low.c (win32_insert_watchpoint): New function.
5323 (win32_remove_watchpoint): New function.
5324 (win32_stopped_by_watchpoint): New function.
5325 (win32_stopped_data_address): New function.
5326 (win32_target_ops): Add entries for insert_watchpoint,
5327 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5328 * win32-low.h (win32_target_ops): New members insert_point,
5329 remove_point, stopped_by_watchpoint, stopped_data_address.
5331 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5333 * server.c (process_serial_event): Re-return unsupported, not
5334 error, if the type isn't recognized. Re-allow supporting only
5335 insert or remove packets. Also call require_running for
5336 breakpoints. Add missing break statement to default case. Tidy.
5337 * target.h (struct target_ops): Rename insert_watchpoint to
5338 insert_point, and remove_watchpoint to remove_point.
5340 * linux-low.h (struct linux_target_ops): Likewise.
5341 * linux-low.c (linux_insert_watchpoint): Rename to ...
5342 (linux_insert_point): ... this. Adjust.
5343 (linux_remove_watchpoint): Rename to ...
5344 (linux_remove_point): ... this. Adjust.
5345 (linux_target_ops): Adjust.
5346 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5347 (cris_insert_point): ... this.
5348 (cris_remove_watchpoint): Rename to ...
5349 (cris_remove_point): ... this.
5350 (the_low_target): Adjust.
5352 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5354 * server.c (handle_v_kill): Pass signal_pid to
5355 kill_inferior if multi_process is zero.
5357 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5359 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5360 * target.h (target_ops): Comment for *_watchpoint to make it clear
5361 the functions can get types '0' and '1'.
5363 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5365 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5366 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5367 * regcache.c (get_regcache): Likewise.
5368 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5369 * win32-low.c (child_fetch_inferior_registers): Remove check for
5372 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5373 Pedro Alves <pedro@codesourcery.com>
5375 * target.h (struct target_ops) <supports_multi_process>: New
5377 (target_supports_multi_process): New.
5378 * server.c (handle_query): Even if GDB reports support, only
5379 enable multi-process if the target also supports it. Report
5380 multi-process support only if the target backend supports it.
5381 * linux-low.c (linux_supports_multi_process): New function.
5382 (linux_target_ops): Install it as target_supports_multi_process
5385 2009-05-24 Doug Evans <dje@google.com>
5387 Global renaming of find_thread_pid to find_thread_ptid.
5388 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5389 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5390 All callers updated.
5392 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5393 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5396 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5397 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5398 (linux_resume_one_lwp): Ditto.
5400 2009-05-23 Doug Evans <dje@google.com>
5402 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5403 from struct inferior_list_entry * to struct lwp_info *.
5404 All callers updated.
5406 2009-05-13 Doug Evans <dje@google.com>
5408 * linux-x86-low.c: Don't include assert.h.
5409 (x86_siginfo_fixup): Use fatal, not assert.
5410 (x86_arch_setup): Fix comment.
5412 2009-05-12 Doug Evans <dje@google.com>
5414 Biarch support for i386/amd64 gdbserver.
5415 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5416 Add linux-x86-low.c.
5417 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5418 (linux-x86-low.o): Add.
5419 * linux-x86-64-low.c: Delete.
5420 * linux-i386-low.c: Delete.
5421 * linux-x86-low.c: New file.
5422 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5424 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5426 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5427 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5428 (linux_child_pid_to_exec_file): New function.
5429 (elf_64_header_p, elf_64_file_p): New functions.
5430 (siginfo_fixup): New function.
5431 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5432 give target a chance to convert layout.
5433 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5434 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5436 2009-05-07 Doug Evans <dje@google.com>
5438 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5439 (regsets_store_inferior_registers): Ditto.
5441 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5445 * linux-low.c (must_set_ptrace_flags): Delete.
5446 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5448 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5449 `lwp->must_set_ptrace_flags' instead.
5450 (linux_wait_for_event_1): Set ptrace options here.
5451 (linux_wait_1): ... not here.
5453 2009-04-30 Doug Evans <dje@google.com>
5455 * inferiors.c (started_inferior_callback): New function.
5456 (attached_inferior_callback): New function.
5457 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5458 * server.c (print_started_pid, print_attached_pid): New functions.
5459 (detach_or_kill_for_exit): New function.
5460 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5461 * server.h (have_started_inferiors_p): Declare.
5462 (have_attached_inferiors_p): Declare.
5464 * inferiors.c (remove_process): Fix memory leak, free process.
5465 * linux-low.c (linux_remove_process): New function.
5466 (linux_kill): Call it instead of remove_process.
5467 (linux_detach, linux_wait_1): Ditto.
5469 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5471 * configure.srv: Add x86 Windows CE target.
5473 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5475 * inferiors.c (get_thread_process): Make global.
5476 * server.h (get_thread_process): Add prototype.
5477 * thread-db.c (find_one_thread): Use get_thread_process
5478 instead of current_process.
5479 (thread_db_get_tls_address): Do not crash if called when
5480 thread layer is not yet initialized.
5482 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5484 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5485 * spu-low.c (current_tid): Rename to ...
5486 (current_ptid): ... this.
5487 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5488 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5489 ptid_get_lwp (current_ptid) instead of current_tid.
5490 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5491 instead of current_tid. Use find_process_pid to verify pid
5492 argument is valid. Pass proper argument to remove_process.
5493 (spu_thread_alive): Compare current_ptid instead of current_tid.
5494 (spu_resume): Likewise.
5496 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5498 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5501 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5503 Implement the multiprocess extensions, and add linux multiprocess
5506 * server.h (ULONGEST): Declare.
5507 (struct ptid, ptid_t): New.
5508 (minus_one_ptid, null_ptid): Declare.
5509 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5510 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5511 (struct inferior_list_entry): Change `id' type from unsigned from
5513 (struct sym_cache, struct breakpoint, struct
5514 process_info_private): Forward declare.
5515 (struct process_info): Declare.
5516 (current_process): Declare.
5517 (all_processes): Declare.
5518 (initialize_inferiors): Declare.
5519 (add_thread): Adjust to use ptid_t.
5520 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5521 (add_process, remove_process, find_thread_pid): Declare.
5522 (find_inferior_id): Adjust to use ptid_t.
5523 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5524 (multi_process): Declare.
5525 (push_event): Adjust to use ptid_t.
5526 (read_ptid, write_ptid): Declare.
5527 (prepare_resume_reply): Adjust to use ptid_t.
5528 (clear_symbol_cache): Declare.
5529 * inferiors.c (all_processes): New.
5530 (null_ptid, minus_one_ptid): New.
5531 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5532 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5533 (add_thread): Change unsigned long to ptid. Remove gdb_id
5535 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5536 (gdb_id_to_thread): Rename to ...
5537 (find_thread_pid): ... this. Change unsigned long to ptid.
5538 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5539 (loaded_dll, pull_pid_from_list): Adjust.
5540 (add_process, remove_process, find_process_pid)
5541 (get_thread_process, current_process, initialize_inferiors): New.
5542 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5543 (struct target_waitstatus) <related_pid>: Ditto.
5544 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5546 (struct target_ops) <join>: Add `pid' argument.
5547 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5548 (struct target_ops) <wait>: Add `ptid' field. Change return type
5550 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5551 (mywait): Add `ptid' argument. Change return type to ptid_t.
5552 (target_pid_to_str): Declare.
5553 * target.c (set_desired_inferior): Adjust to use ptids.
5554 (mywait): Add new `ptid' argument. Adjust.
5555 (target_pid_to_str): New.
5556 * mem-break.h (free_all_breakpoints): Declare.
5557 * mem-break.c (breakpoints): Delelete.
5558 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5559 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5560 to use per-process breakpoint list.
5561 (free_all_breakpoints): New.
5562 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5563 (symbol_cache, all_symbols_looked_up): Delete.
5565 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5567 (prepare_resume_reply): Change ptid argument's type from unsigned
5568 long to ptid_t. Adjust. Implement W;process and X;process.
5569 (free_sym_cache, clear_symbol_cache): New.
5570 (look_up_one_symbol): Adjust to per-process symbol cache. *
5571 * server.c (cont_thread, general_thread, step_thread): Change type
5574 (multi_process): New.
5575 (last_ptid): Change type to ptid_t.
5576 (struct vstop_notif) <ptid>: Change type to ptid_t.
5577 (queue_stop_reply, push_event): Change `ptid' argument's type to
5579 (discard_queued_stop_replies): Add `pid' argument.
5580 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5581 changes. Don't reference the `attached' global.
5582 (attach_inferior): Adjust to mywait interface changes.
5583 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5584 features. Handle and report "multiprocess+". Handle
5586 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5588 (handle_v_kill): New.
5589 (handle_v_stopped): Adjust to use target_pid_to_str.
5590 (handle_v_requests): Allow multiple attaches and runs when
5591 multiprocess extensions are in effect. Handle "vKill".
5592 (myresume): Adjust to use ptids.
5593 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5594 (handle_status): Adjust to discard_queued_stop_replies interface
5596 (first_thread_of, kill_inferior_callback)
5597 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5598 (main): Call initialize_inferiors. Adjust to use ptids, killing
5599 and detaching from all inferiors. Handle multiprocess packet
5601 * linux-low.h: Include gdb_proc_service.h.
5602 (struct process_info_private): New.
5603 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5604 <lwpid_of>: Use ptid_get_lwp.
5605 (get_lwp_thread): Adjust.
5606 (struct lwp_info): Add `dead' member.
5607 (find_lwp_pid): Declare.
5608 * linux-low.c (thread_db_active): Delete.
5609 (new_inferior): Adjust comment.
5610 (inferior_pid): Delete.
5611 (linux_add_process): New.
5612 (handle_extended_wait): Adjust.
5613 (add_lwp): Change unsigned long to ptid.
5614 (linux_create_inferior): Add process to processes table. Adjust
5615 to use ptids. Don't set new_inferior here.
5616 (linux_attach_lwp): Rename to ...
5617 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5618 it. Adjust to use ptids.
5619 (linux_attach_lwp): New.
5620 (linux_attach): Add process to processes table. Don't set
5622 (struct counter): New.
5623 (second_thread_of_pid_p, last_thread_of_process_p): New.
5624 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5626 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5627 processes. Remove process from process table.
5628 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5629 to multiple processes.
5630 (any_thread_of): New.
5631 (linux_detach): Add `pid' argument, and handle it. Remove process
5632 from processes table.
5633 (linux_join): Add `pid' argument. Handle it.
5634 (linux_thread_alive): Change unsighed long argument to ptid_t.
5635 Consider dead lwps as not being alive.
5636 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5637 threads we're not interested in.
5638 (same_lwp, find_lwp_pid): New.
5639 (linux_wait_for_lwp): Change `pid' argument's type from int to
5641 (linux_wait_for_event): Rename to ...
5642 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5643 from int to ptid_t. Adjust.
5644 (linux_wait_for_event): New.
5645 (linux_wait_1): Add `ptid' argument. Change return type to
5646 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5647 that exit from the process table.
5648 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5650 (mark_lwp_dead): New.
5651 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5652 stopping all threads, mark its main lwp as dead.
5653 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5655 (fetch_register, usr_store_inferior_registers)
5656 (regsets_fetch_inferior_registers)
5657 (regsets_store_inferior_registers, linux_read_memory)
5658 (linux_write_memory): Inline `inferior_pid'.
5659 (linux_look_up_symbols): Adjust to use per-process
5661 (linux_request_interrupt): Adjust to use ptids.
5662 (linux_read_auxv): Inline `inferior_pid'.
5663 (initialize_low): Don't reference thread_db_active.
5664 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5665 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5666 (ps_getpid): Return the pid of the current inferior.
5667 * thread-db.c (proc_handle, thread_agent): Delete.
5668 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5670 (find_one_thread): Change argument type to ptid_t. Adjust to
5672 (maybe_attach_thread): Adjust to per-process data and ptids.
5673 (thread_db_find_new_threads): Ditto.
5674 (thread_db_init): Ditto.
5675 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5676 processes table. Adjust to use ptids.
5677 (spu_kill, spu_detach): Adjust interface. Remove process from
5679 (spu_join, spu_thread_alive): Adjust interface.
5680 (spu_wait): Adjust interface. Remove process from processes
5681 table. Adjust to use ptids.
5682 * win32-low.c (current_inferior_tid): Delete.
5683 (current_inferior_ptid): New.
5684 (debug_event_ptid): New.
5685 (thread_rec): Take a ptid. Adjust.
5686 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5687 (child_delete_thread): Ditto.
5688 (do_initial_child_stuff): Add `attached' argument. Add process to
5690 (child_fetch_inferior_registers, child_store_inferior_registers):
5692 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5693 (win32_attach): Pass 1 to do_initial_child_stuff.
5694 (win32_kill): Adjust interface. Remove process from processes
5696 (win32_detach): Ditto.
5697 (win32_join): Adjust interface.
5698 (win32_thread_alive): Take a ptid.
5699 (win32_resume): Adjust to use ptids.
5700 (get_child_debug_event): Ditto.
5701 (win32_wait): Adjust interface. Remove exiting process from
5704 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5706 Non-stop mode support.
5708 * server.h (non_stop): Declare.
5709 (gdb_client_data, handler_func): Declare.
5710 (delete_file_handler, add_file_handler, start_event_loop):
5712 (handle_serial_event, handle_target_event, push_event)
5713 (putpkt_notif): Declare.
5714 * target.h (enum resume_kind): New.
5715 (struct thread_resume): Replace `step' field by `kind' field.
5716 (TARGET_WNOHANG): Define.
5717 (struct target_ops) <wait>: Add `options' argument.
5718 <supports_non_stop, async, start_non_stop>: New fields.
5719 (target_supports_non_stop, target_async): New.
5720 (start_non_stop): Declare.
5721 (mywait): Add `options' argument.
5722 * target.c (mywait): Add `options' argument. Print child exit
5724 (start_non_stop): New.
5725 * server.c (non_stop, own_buf, mem_buf): New globals.
5726 (struct vstop_notif): New.
5727 (notif_queue): New global.
5728 (queue_stop_reply, push_event, discard_queued_stop_replies)
5729 (send_next_stop_reply): New.
5730 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5732 (attach_inferior): In non-stop mode, don't wait for the target
5734 (handle_general_set): Handle QNonStop.
5735 (handle_query): When handling qC, return the current general
5736 thread, instead of the first thread of the list.
5737 (handle_query): If the backend supports non-stop mode, include
5738 QNonStop+ in the qSupported query response.
5739 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5741 (handle_v_attach, handle_v_run): Handle non-stop mode.
5742 (handle_v_stopped): New.
5743 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5744 (myresume): Adjust to use resume_kind. Handle non-stop.
5745 (queue_stop_reply_callback): New.
5746 (handle_status): Handle non-stop mode.
5747 (main): Clear non_stop flag on reconnection. Use the event-loop.
5748 Refactor serial protocol handling from here ...
5749 (process_serial_event): ... to this new function. When GDB
5750 selects any thread, select one here. In non-stop mode, wait until
5751 GDB acks all pending events before exiting.
5752 (handle_serial_event, handle_target_event): New.
5753 * remote-utils.c (remote_open): Install remote_desc in the event
5755 (remote_close): Remove remote_desc from the event loop.
5756 (putpkt_binary): Rename to...
5757 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5758 (putpkt_binary): New as wrapper around putpkt_binary_1.
5759 (putpkt_notif): New.
5760 (prepare_resume_reply): In non-stop mode, don't change the
5762 * event-loop.c: New.
5763 * Makefile.in (OBJ): Add event-loop.o.
5764 (event-loop.o): New rule.
5766 * linux-low.h (pid_of): Moved here.
5768 (get_lwp_thread): Use lwpid_of.
5769 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5770 * linux-low.c (pid_of): Delete.
5771 (inferior_pid): Use lwpid_of.
5772 (linux_event_pipe): New.
5773 (target_is_async_p): New.
5775 (handle_extended_wait): Use lwpid_of.
5776 (add_lwp): Don't set lwpid field.
5777 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5778 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5779 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5780 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5781 first. Adjust to linux_wait_for_event interface changes. Use
5783 (linux_detach): Don't delete the main lwp here.
5784 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5785 (status_pending_p): Don't consider explicitly suspended lwps.
5786 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5787 pointer. Add OPTIONS argument. Change return type to int. Use
5788 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5789 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5790 pointer. Add status pointer argument. Return a pid instead of a
5791 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5792 changes. In non-stop mode, don't switch to a random thread.
5793 (linux_wait): Rename to...
5794 (linux_wait_1): ... this. Add target_options argument, and handle
5795 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5796 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5797 clean exit and signal exit code. Don't stop all threads in
5798 non-stop mode. In all-stop mode, only stop all threads when
5799 reporting a stop to GDB. Handle explicit thread stop requests.
5800 (async_file_flush, async_file_mark): New.
5802 (send_sigstop): Use lwpid_of.
5803 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5804 interface changes. In non-stop mode, don't switch to a random
5806 (linux_resume_one_lwp): Use lwpid_of.
5807 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5808 (linux_resume_one_thread): ... this. Handle resume_stop. In
5809 non-stop mode, don't look for pending flag in all threads.
5810 (resume_status_pending_p): Don't consider explicitly suspended
5812 (my_waitpid): Reimplement. Emulate __WALL.
5813 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5815 (sigchld_handler, linux_supports_non_stop, linux_async)
5816 (linux_start_non_stop): New.
5817 (linux_target_ops): Register linux_supports_non_stop, linux_async
5818 and linux_start_non_stop.
5819 (initialize_low): Install SIGCHLD handler.
5820 * thread-db.c (thread_db_create_event, find_one_thread)
5821 (thread_db_get_tls_address): Use lwpid_of.
5822 * win32-low.c (win32_detach): Adjust to use resume_kind.
5823 (win32_wait): Add `options' argument.
5824 * spu-low.c (spu_resume): Adjust to use resume_kind.
5825 (spu_wait): Add `options' argument.
5827 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5829 Decouple target code from remote protocol.
5831 * target.h (enum target_waitkind): New.
5832 (struct target_waitstatus): New.
5833 (struct target_ops) <wait>: Return an unsigned long. Take a
5834 target_waitstatus pointer instead of a char pointer.
5836 * target.c (mywait): Change prototype to return an unsigned long.
5837 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5838 * server.h (thread_from_wait, old_thread_from_wait): Delete
5840 (prepare_resume_reply): Change prototype to take a
5842 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5843 (last_status, last_ptid): New.
5844 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5845 pid instead of a signal.
5846 (attach_inferior): Remove "status" and "signal" parameters.
5848 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5850 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5851 (handle_v_requests, myresume): Remove "status" and "signal"
5853 (handle_status): New.
5854 (main): Delete local `status'. Adjust.
5855 * remote-utils.c: Include target.h.
5856 (prepare_resume_reply): Change prototype to take a
5857 target_waitstatus. Adjust.
5859 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5861 * spu-low.c (spu_wait): Adjust.
5862 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5864 (win32_wait): Adjust.
5866 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5868 * target.h (struct thread_resume): Delete leave_stopped member.
5869 (struct target_ops): Add a `n' argument to the `resume' callback.
5870 * server.c (start_inferior): Adjust.
5871 (handle_v_cont, myresume): Adjust.
5872 * linux-low.c (check_removed_breakpoint): Adjust to resume
5873 interface change, and to removed leave_stopped field.
5874 (resume_ptr): Delete.
5875 (struct thread_resume_array): New.
5876 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5877 resume interface change.
5878 (linux_continue_one_thread, linux_queue_one_thread)
5879 (resume_status_pending_p): Check if the resume field is NULL
5880 instead of checking the leave_stopped member.
5881 (linux_resume): Adjust to the target resume interface change.
5882 * spu-low.c (spu_resume): Adjust to the target resume interface
5884 * win32-low.c (win32_detach, win32_resume): Ditto.
5886 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5888 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5890 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5892 (linux_continue_one_thread): Only preserve the stepping flag if
5893 there's a pending breakpoint.
5895 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5897 * server.c (main): After the inferior having exited, call
5898 remote_close before exiting gdbserver.
5900 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5902 Fix size of FPSCR in Power 7 processors.
5903 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5904 (PPC_FEATURE_HAS_DFP): New #define.
5905 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5908 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5910 * server.c (handle_query) Whitespace and formatting.
5912 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5914 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5915 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5916 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5917 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5918 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5919 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5920 Makefile.in, configure.ac: Fix whitespace throughout.
5921 * configure: Regenerate.
5923 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5925 * inferiors.c (find_inferior): Make it safe for the callback
5926 function to delete the currently iterated inferior.
5928 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5930 * Makefile.in (linuw_low_h): Move higher.
5931 (thread-db.o): Depend on $(linux_low_h).
5933 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5935 Rename "process" to "lwp" throughout.
5937 * linux-low.c (all_processes): Rename to...
5938 (all_lwps): ... this.
5939 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5940 (add_process): Rename to ...
5941 (add_lwp): ... this. Adjust.
5942 (linux_create_inferior): Adjust.
5943 (linux_attach_lwp): Adjust.
5944 (linux_attach): Adjust.
5945 (linux_kill_one_process): Rename to ...
5946 (linux_kill_one_lwp): ... this. Adjust.
5947 (linux_kill): Adjust.
5948 (linux_detach_one_process): Rename to ...
5949 (linux_detach_one_lwp): ... this. Adjust.
5950 (linux_detach): Adjust.
5951 (check_removed_breakpoint): Adjust.
5952 (status_pending_p): Adjust.
5953 (linux_wait_for_process): Rename to ...
5954 (linux_wait_for_lwp): ... this. Adjust.
5955 (linux_wait_for_event): Adjust.
5956 (send_sigstop): Adjust.
5957 (wait_for_sigstop): Adjust.
5958 (stop_all_processes): Rename to ...
5959 (stop_all_lwps): ... this.
5960 (linux_resume_one_process): Rename to ...
5961 (linux_resume_one_lwp): ... this. Adjust.
5962 (linux_set_resume_request, linux_continue_one_thread)
5963 (linux_queue_one_thread, resume_status_pending_p)
5964 (usr_store_inferior_registers, regsets_store_inferior_registers)
5965 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5967 * linux-low.h (get_process): Rename to ...
5968 (get_lwp): ... this. Adjust.
5969 (get_thread_process): Rename to ...
5970 (get_thread_lwp): ... this. Adjust.
5971 (get_process_thread): Rename to ...
5972 (get_lwp_thread): ... this. Adjust.
5973 (struct process_info): Rename to ...
5974 (struct lwp_info): ... this.
5975 (all_processes): Rename to ...
5976 (all_lwps): ... this.
5977 * proc-service.c (ps_lgetregs): Adjust.
5978 * thread-db.c (thread_db_create_event, find_one_thread)
5979 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5981 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5983 * server.c (handle_query): Handle "qAttached".
5985 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5987 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5988 GPLv3, update license URL.
5990 2009-03-01 Doug Evans <dje@google.com>
5992 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5993 (server_h): Add gdb_signals.h.
5994 (signals.o): Update.
5995 * server.h (target_signal_from_host,target_signal_to_host_p)
5996 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5998 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6000 * remote-utils.c (getpkt): Also generate remote-debug
6001 information if noack_mode is set.
6003 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6005 * server.c (handle_query): Report qXfer:siginfo:read and
6006 qXfer:siginfo:write as supported and handle them.
6007 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6008 * linux-low.c (linux_xfer_siginfo): New.
6009 (linux_target_ops): Set it.
6011 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6013 * server.c (gdbserver_usage): Mention --remote-debug.
6014 (main): Accept '--remote-debug' switch.
6016 2009-01-18 Doug Evans <dje@google.com>
6018 * regcache.c (new_register_cache): No need to check result of xcalloc.
6019 * server.c (handle_search_memory): Back out calls to xmalloc,
6020 result is checked and error is returned to user upon failure.
6021 (handle_query): Ditto. Add more checks for result of malloc.
6022 (handle_v_cont): Check result of malloc, report error back to
6024 (handle_v_run): Ditto. Call freeargv.
6025 * server.h (freeargv): Declare.
6026 * utils.c (freeargv): New fn.
6028 2009-01-15 Doug Evans <dje@google.com>
6030 * gdbreplay.c (perror_with_name): Make arg const char *.
6031 * server.h (target_signal_to_name): Make return type const char *.
6032 * thread-db.c (thread_db_err_str): Make return type const char *.
6033 * utils.c (perror_with_name): Make arg const char *.
6035 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6037 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6038 when handling a EXIT_PROCESS_DEBUG_EVENT.
6040 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6042 * gdbreplay.c (gdbreplay_version): Update copyright year.
6043 * server.c (gdbserver_version): Likewise.
6045 2009-01-05 Doug Evans <dje@google.com>
6047 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6048 (handle_extended_wait): Improve comment.
6050 2008-12-13 Doug Evans <dje@google.com>
6052 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6053 * server.h (ATTR_MALLOC): New macro.
6054 (xmalloc,xcalloc,xstrdup): Declare.
6055 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6056 * inferiors.c: Ditto.
6057 * linux-low.c: Ditto.
6058 * mem-break.c: Ditto.
6059 * regcache.c: Ditto.
6060 * remote-utils.c: Ditto.
6063 * win32-low.c: Ditto.
6065 2008-12-12 Doug Evans <dje@google.com>
6067 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6068 in debugging printf.
6070 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6072 2008-12-09 Doug Evans <dje@google.com>
6074 * linux-low.h (struct process_info): Delete member tid, unused.
6075 * thread-db.c (find_one_thread): Update.
6076 (maybe_attach_thread): Update.
6078 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6080 * target.h (struct target_ops): Add qxfer_osdata member.
6081 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6083 (linux_qxfer_osdata): New functions.
6084 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6086 * server.c (handle_query): Handle "qXfer:osdata:read:".
6087 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6088 (buffer_xml_printf): New functions.
6089 * server.h (struct buffer): New.
6090 (buffer_grow_str, buffer_grow_str0): New macros.
6091 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6092 (buffer_xml_printf): Declare.
6094 2008-11-24 Doug Evans <dje@google.com>
6096 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6098 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6100 * server.c (handle_v_run): Always use the supplied argument list.
6102 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6104 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6105 (xtensa_regmap_table): Add entry for scompare1.
6107 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6109 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6110 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6111 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6112 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6113 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6114 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6115 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6116 XML target descriptions.
6117 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6118 when inferior is running on an ISA 2.05 or later processor. Add
6119 special case to return offset for full 64-bit slot of FPSCR when
6122 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6124 * Makefile.in (SFILES, clean): Added sparc64 files.
6125 (reg-sparc64.o, reg-sparc64.c): New.
6126 * configure.srv (sparc*-*-linux*): New configuration.
6127 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6128 syscall arguments for SPARC.
6129 (regsets_store_inferior_registers): Likewise.
6130 * linux-sparc-low.c: New file.
6132 2008-10-21 Doug Evans <dje@google.com>
6134 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6135 (READLINE_DIR,READLINE_DEP): Delete.
6136 (INTERNAL_CFLAGS): Update.
6137 (LINTFLAGS): Update.
6139 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6141 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6142 whole argv from the last run, not just argv[0].
6144 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6146 * regcache.c (new_register_cache): Return NULL if the register
6147 cache size isn't known yet.
6148 (free_register_cache): Avoid dereferencing a NULL regcache.
6150 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6152 * configure.srv: Merge MIPS and MIPS64.
6154 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6156 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6158 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6160 * Makefile.in: Add required vsx dependencies.
6162 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6163 Declare init_registers_powerpc_vsx32l.
6164 Declare init_registers_powerpc_vsx64l.
6165 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6166 (ppc_arch_setup): Check for VSX in hwcap.
6167 (ppc_fill_vsxregset): New function.
6168 (ppc_store_vsxregset): New function.
6169 Add new VSX entry in regset_info target_regsets.
6171 * configure.srv: Add new VSX dependencies.
6173 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6175 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6176 (remote_open): Set or clear transport_is_reliable.
6177 (putpkt_binary): Don't expect acks in noack mode.
6178 (getpkt): Don't send ack/nac in noack mode.
6179 * server.c (handle_general_set): Handle QStartNoAckMode.
6180 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6182 (main): Reset noack_mode on every connection.
6183 * server.h (noack_mode): Declare.
6185 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6187 * Makefile.in (GDBREPLAY_OBS): New variable.
6188 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6190 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6191 Daniel Jacobowitz <dan@codesourcery.com>
6193 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6194 (usr_store_inferior_registers): Likewise.
6195 (regsets_store_inferior_registers): Likewise.
6197 2008-07-31 Rolf Jansen <rj@surtec.com>
6198 Pedro Alves <pedro@codesourcery.com>
6200 * configure.ac: Check for memmem declaration.
6201 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6202 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6203 (disable_packet_qfThreadInfo): Unconditionally compile.
6204 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6205 * configure, config.in: Regenerate.
6207 2008-07-28 Doug Kwan <dougkwan@google.com>
6209 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6210 (linux_write_memory): Remove declaration of errno.
6212 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6214 * linux-low.c (handle_extended_wait): Do not use "status"
6215 variable uninitialized.
6217 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6219 * server.c (handle_v_attach): Inhibit reporting dll changes.
6221 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6223 * remote-utils.c (prepare_resume_reply): If requested, don't
6224 output "thread:TID" in the T stop reply.
6226 * server.c (disable_packet_vCont, disable_packet_Tthread)
6227 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6228 (handle_query): If requested, disable support for qC, qfThreadInfo
6230 (handle_v_requests): If requested, disable support for vCont.
6231 (gdbserver_show_disableable): New.
6232 (main): Handle --disable-packet and --disable-packet=LIST.
6234 * server.h (disable_packet_vCont, disable_packet_Tthread)
6235 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6237 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6239 * server.c (gdbserver_usage): Mention --version.
6241 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6243 * Makefile.in (gdbreplay.o): New rule.
6245 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6247 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6248 message, not gdbserver.
6250 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6251 Nathan Sidwell <nathan@codesourcery.com>
6252 Joseph Myers <joseph@codesourcery.com>
6254 * acinclude.m4: Include ../../config/acx.m4.
6255 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6256 * configure, config.in: Regenerate.
6257 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6258 * server.c (gdbserver_version): Print PKGVERSION.
6259 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6260 (main): Adjust gdbserver_usage calls.
6261 * gdbreplay.c (version, host_name): Add declarations.
6262 (gdbreplay_version, gdbreplay_usage): New.
6263 (main): Accept --version and --help options.
6265 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6267 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6268 (arm_breakpoint_at): Handle Thumb.
6269 (the_low_target): Add comment.
6271 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6273 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6275 2008-05-09 Doug Evans <dje@google.com>
6277 * server.h (decode_search_memory_packet): Declare.
6278 * remote-utils.c (decode_search_memory_packet): New fn.
6279 * server.c (handle_search_memory_1): New fn.
6280 (handle_search_memory): New fn.
6281 (handle_query): Process qSearch:memory packets.
6283 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6285 * regcache.c (registers_length): Remove.
6286 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6287 full register packet.
6288 * regcache.h (registers_length): Remove prototype.
6289 * server.h (PBUFSIZ): Define to 16384.
6291 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6293 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6294 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6295 powerpc-64l.o, and powerpc-altivec64l.o.
6296 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6297 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6298 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6299 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6300 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6303 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6304 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6305 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6306 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6307 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6308 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6309 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6310 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6311 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6312 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6315 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6316 (init_registers_powerpc_32l): ... this new prototype.
6317 (init_registers_powerpc_32): Remove, replace by ...
6318 (init_registers_powerpc_altivec32l): ... this new prototype.
6319 (init_registers_powerpc_e500): Remove, replace by ...
6320 (init_registers_powerpc_e500l): ... this new prototype.
6321 (init_registers_ppc64): Remove, replace by ...
6322 (init_registers_powerpc_64l): ... this new prototype.
6323 (init_registers_powerpc_64): Remove, replace by ...
6324 (init_registers_powerpc_altivec64l): ... this new prototype.
6325 (ppc_num_regs): Set to 73.
6326 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6327 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6328 (ppc_cannot_store_register): Handle orig_r3 and trap.
6329 (ppc_arch_setup): Update init_registers_... calls.
6330 (ppc_fill_gregset): Handle orig_r3 and trap.
6332 * inferiors.c (clear_inferiors): Reset current_inferior.
6334 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6336 * acinclude.m4: Add override.m4.
6337 * configure: Regenerate.
6339 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6341 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6342 initial call to init_register_ppc64.
6344 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6346 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6347 single powerpc*-*-linux* case.
6348 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6350 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6352 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6353 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6355 * linux-ppc-low.c: Include <elf.h>.
6356 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6357 (ppc_hwcap): New global variable.
6358 (ppc_regmap): Remove __SPE__ #ifdef sections.
6359 (ppc_regmap_e500): New global variable.
6360 (ppc_cannot_store_register): Update __SPE__ special case.
6361 (ppc_get_hwcap): New function.
6362 (ppc_arch_setup): Use it to determine whether inferior supports
6363 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6364 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6365 Do not access registers if target does not support AltiVec.
6366 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6367 Do not access registers if target does not support SPE.
6368 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6370 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6372 * linux-low.c (disabled_regsets, num_regsets): New.
6373 (use_regsets_p): Delete.
6374 (linux_wait_for_process): Clear disabled_regsets.
6375 (regsets_fetch_inferior_registers): Check and set it.
6376 (regsets_store_inferior_registers): Likewise.
6377 (linux_fetch_registers, linux_store_registers): Do not use
6379 (initialize_low): Allocate disabled_regsets.
6381 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6383 * Makefile.in (LIBOBJS): New.
6385 (memmem.o): New rule.
6386 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6387 * configure: Regenerated.
6389 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6391 * server.c (handle_query): Never return "unsupported" for
6392 qXfer:features:read queries.
6394 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6396 * server.c (get_features_xml): Fix inverted condition.
6397 (handle_query): Always support qXfer:feature:read.
6399 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6401 * server.c (wrapper_argv): New.
6402 (start_inferior): Handle wrapper_argv. If set, expect an extra
6404 (gdbserver_usage): Document --wrapper.
6405 (main): Parse --wrapper.
6407 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6409 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6410 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6411 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6412 (ppc_set_pc): Likewise.
6413 (ppc_arch_setup): New function.
6414 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6415 of collect_register.
6416 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6418 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6420 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6421 instead of linux-ppc64-low.o.
6422 * linux-ppc64-low.c: Remove file.
6423 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6424 (linux-ppc64-low.o): Remove rule.
6426 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6427 (init_registers_powerpc_64): Likewise.
6428 (ppc_regmap): Conditionally define depending on __powerpc64__.
6429 (ppc_cannot_store_register): Do not special-case "fpscr" when
6430 compiled on __powerpc64__.
6431 (ppc_collect_ptrace_register): New function.
6432 (ppc_supply_ptrace_register): New function.
6433 (ppc_breakpoint): Change type to "unsigned int".
6434 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6435 (the_low_target): Conditionally provide initializers for the
6436 arch_setup member depending on __powerpc64__. Install
6437 collect_ptrace_register and supply_ptrace_register members.
6439 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6441 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6442 * server.c (gdbserver_xmltarget): Define.
6443 (get_features_xml): Use it to replace "target.xml" and arch_string.
6445 * configure.srv: Remove srv_xmltarget. Add XML files that were
6446 mentioned there to srv_xmlfiles instead. Remove conditional tests
6447 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6448 srv_xmlfiles and srv_regobj to include all possible choices.
6449 * configure.ac (srv_xmltarget): Remove.
6450 (srv_xmlfiles): Do not add "target.xml".
6451 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6452 checks for supplementary target information.
6453 * configure: Regenerate.
6454 * Makefile.in (XML_TARGET): Remove.
6455 (target.xml): Remove rule.
6456 (clean): Do not clean up target.xml.
6457 (.PRECIOUS): Do not mention target.xml.
6459 * target.h (struct target_ops): Remove arch_string member.
6460 * linux-low.c (linux_arch_string): Remove.
6461 (linux_target_ops): Remove arch_string initializer.
6462 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6463 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6464 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6465 * spu-low.c (spu_arch_string): Remove.
6466 (spu_target_ops): Remove arch_string initializer.
6467 * win32-low.c (win32_arch_string): Remove.
6468 (win32_target_ops): Remove arch_string initializer.
6469 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6470 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6471 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6473 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6475 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6476 by collect_ptrace_register and supply_ptrace_register hooks.
6477 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6478 instead of checking for the_low_target.left_pad_xfer.
6479 (usr_store_inferior_registers): Use collect_ptrace_register callback
6480 instead of checking for the_low_target.left_pad_xfer.
6482 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6483 (s390_supply_ptrace_register): Likewise.
6484 (s390_fill_gregset): Call s390_collect_ptrace_register.
6485 (the_low_target): Update.
6487 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6488 (ppc_supply_ptrace_register): Likewise.
6489 (the_low_target): Update.
6491 * linux-i386-low.c (the_low_target): Update.
6492 * linux-x86-64-low.c (the_low_target): Update.
6494 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6496 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6497 reg-s390.o and reg-s390x.o.
6499 * linux-low.c (new_inferior): New global variable.
6500 (linux_create_inferior, linux_attach): Set it.
6501 (linux_wait_for_process): Call the_low_target.arch_setup after the
6502 target has stopped for the first time.
6503 (initialize_low): Do not call the_low_target.arch_setup.
6505 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6506 (s390_set_pc): Likewise.
6507 (s390_arch_setup): New function.
6508 (the_low_target): Use s390_arch_setup as arch_setup routine.
6510 * regcache.c (realloc_register_cache): New function.
6511 (set_register_cache): Call it for each existing regcache.
6513 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6515 * server.h (init_registers): Remove prototype.
6517 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6518 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6519 instead of init_registers ().
6520 * linux-arm-low.c (init_registers_arm): Add prototype.
6521 (init_registers_arm_with_iwmmxt): Likewise.
6522 (the_low_target): Add initializer for arch_setup field.
6523 * linux-cris-low.c (init_registers_cris): Add prototype.
6524 (the_low_target): Add initializer for arch_setup field.
6525 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6526 (the_low_target): Add initializer for arch_setup field.
6527 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6528 (the_low_target): Add initializer for arch_setup field.
6529 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6530 (the_low_target): Add initializer for arch_setup field.
6531 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6532 (the_low_target): Add initializer for arch_setup field.
6533 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6534 (the_low_target): Add initializer for arch_setup field.
6535 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6536 (init_registers_mips64_linux): Likewise.
6537 (the_low_target): Add initializer for arch_setup field.
6538 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6539 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6540 (the_low_target): Add initializer for arch_setup field.
6541 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6542 (init_registers_powerpc_64): Likewise.
6543 (the_low_target): Add initializer for arch_setup field.
6544 * linux-s390-low.c (init_registers_s390): Add prototype.
6545 (init_registers_s390x): Likewise.
6546 (the_low_target): Add initializer for arch_setup field.
6547 * linux-sh-low.c (init_registers_sh): Add prototype.
6548 (the_low_target): Add initializer for arch_setup field.
6549 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6550 (the_low_target): Add initializer for arch_setup field.
6551 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6552 (the_low_target): Add initializer for arch_setup field.
6554 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6555 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6556 instead of init_registers ().
6557 * win32-arm-low.c (init_registers_arm): Add prototype.
6558 (the_low_target): Add initializer for arch_setup field.
6559 * win32-i386-low.c (init_registers_i386): Add prototype.
6560 (the_low_target): Add initializer for arch_setup field.
6562 * spu-low.c (init_registers_spu): Add prototype.
6563 (initialize_low): Call initialie_registers_spu () instead of
6564 initialize_registers ().
6566 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6568 * server.c (handle_v_requests): When handling the vRun and vAttach
6569 packets, if already debugging a process, don't kill it. Return an
6572 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6574 * server.c (handle_query): Correct length check.
6576 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6578 * win32-low.c (do_initial_child_stuff): Add process handle
6579 parameter. Set current_process_handle and current_process_id from the
6580 parameters. Clear globals.
6581 (win32_create_inferior): Don't set current_process_handle and
6582 current_process_id here. Instead pass them on the call to
6583 do_initial_child_stuff.
6584 (win32_attach): Likewise.
6585 (win32_clear_inferiors): New.
6586 (win32_kill): Don't close the current process handle or the
6587 current thread handle here. Instead call win32_clear_inferiors.
6588 (win32_detach): Don't open a new handle to the process. Call
6589 win32_clear_inferiors.
6590 (win32_join): Don't rely on current_process_handle; open a new
6591 handle using the process id.
6592 (win32_wait): Call win32_clear_inferiors when the inferior process
6595 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6597 * server.c (monitor_show_help): Add "exit".
6599 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6601 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6602 (clean): Add reg-xtensa.c.
6603 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6604 * configure.srv (xtensa*-*-linux*) New target.
6605 * linux-xtensa-low.c: New.
6606 * xtensa-xtregs.c: New.
6608 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6610 * hostio.c: Don't include errno.h.
6611 (errno_to_fileio_errno): Move to hostio-errno.
6612 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6613 error number outputting to the target->hostio_last_error callback.
6614 (hostio_packet_error): Use FILEIO_EINVAL directly.
6615 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6616 calls to hostio_error.
6617 * hostio-errno.c: New.
6618 * server.h (hostio_last_error_from_errno): Declare.
6619 * target.h (target_ops): Add hostio_last_error member.
6620 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6621 as hostio_last_error handler.
6622 * spu-low.c (spu_target_ops): Likewise.
6623 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6624 (wince_hostio_last_error): New functions.
6625 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6626 as hostio_last_error handler.
6627 (win32_target_ops) [!_WIN32_WCE]: Register
6628 hostio_last_error_from_errno as hostio_last_error handler.
6629 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6630 (hostio-errno.o): New rule.
6631 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6632 * configure.srv (srv_hostio_err_objs): New variable. Default to
6634 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6635 * configure: Regenerate.
6637 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6639 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6640 (linux_kill, linux_detach): Clean up the process list.
6641 * remote-utils.c (remote_open): Improve port number parsing.
6642 (putpkt_binary, input_interrupt): Only send interrupts if the target
6644 * server.c (extended_protocol): Make static.
6645 (attached): Define earlier.
6646 (exit_requested, response_needed, program_argv): New variables.
6647 (target_running): New.
6648 (start_inferior): Clear attached here.
6649 (attach_inferior): Set attached here.
6650 (require_running): Define.
6651 (handle_query): Use require_running and target_running. Implement
6653 (handle_v_attach, handle_v_run): New.
6654 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6655 (gdbserver_usage): Update.
6656 (main): Redo argument parsing. Handle --debug and --multi. Handle
6657 --attach along with other options or after the port. Save
6658 program_argv. Support no initial program. Resynchronize
6659 communication with GDB after an error. Handle "monitor exit".
6660 Use require_running and target_running. Always allow the extended
6661 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6662 restart in extended mode.
6663 * README: Refer to the GDB manual. Update --attach usage.
6665 2007-12-20 Andreas Schwab <schwab@suse.de>
6667 * linux-low.c (STACK_SIZE): Define.
6668 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6669 (linux_test_for_tracefork): Likewise.
6671 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6673 * linux-low.c (linux_wait_for_event): Update messages. Do not
6674 reinsert auto-delete breakpoints.
6675 * mem-break.c (struct breakpoint): Change return type of handler to
6677 (set_breakpoint_at): Update handler type.
6678 (reinsert_breakpoint_handler): Return 1 instead of calling
6680 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6682 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6683 * mem-break.h (set_breakpoint_at): Update handler type.
6684 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6685 * win32-low.c (auto_delete_breakpoint): New.
6686 (get_child_debug_event): Use it.
6688 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6690 * configure.ac: Check for pread and pwrite.
6691 * hostio.c (handle_pread): Fall back to lseek and read.
6692 (handle_pwrite): Fall back to lseek and write.
6693 * config.in, configure: Regenerated.
6695 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6697 * server.c (myresume): Add own_buf argument.
6698 (main): Update calls.
6700 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6702 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6703 * remote-utils.c (remote_open): Do not call disable_async_io.
6704 (block_async_io): Delete.
6705 (unblock_async_io): Make static.
6706 (initialize_async_io): New.
6707 * server.c (handle_v_cont): Handle async I/O here.
6708 (myresume): Likewise. Move other common resume tasks here...
6709 (main): ... from here. Call initialize_async_io. Disable async
6710 I/O before the main loop.
6711 * server.h (initialize_async_io): Declare.
6712 (block_async_io, unblock_async_io): Delete prototypes.
6713 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6715 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6717 * remote-utils.c (readchar): Allow binary data in received messages.
6719 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6721 * win32-low.c (attaching): New global.
6722 (win32_create_inferior): Clear the `attaching' global.
6723 (win32_attach): Set the `attaching' global.
6724 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6725 attaching. Only set a breakpoint at the entry point if not
6728 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6730 * server.c (main): Don't report dll events on the initial
6731 connection on attaches.
6733 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6735 * server.c (main): Relax numerical bases supported for the pid of
6736 the --attach command line argument.
6738 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6740 * win32-low.c (win32_attach): Call OpenProcess before
6741 DebugActiveProcess, not after. Add last error output to error
6744 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6746 * win32-low.c (win32_get_thread_context)
6747 (win32_set_thread_context): New functions.
6748 (thread_rec): Use win32_get_thread_context.
6749 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6750 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6753 2007-12-03 Leo Zayas
6754 Pedro Alves <pedro_alves@portugalmail.pt>
6756 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6758 (child_add_thread): Minor cleanup.
6759 (child_continue): Resume artificially suspended threads before
6760 calling ContinueDebugEvent.
6761 (suspend_one_thread): New.
6762 (fake_breakpoint_event): New.
6763 (get_child_debug_event): Change return type to int. Check here if
6764 gdb sent an interrupt request. If a soft interrupt was requested,
6765 fake a breakpoint event. Return 0 if there is no event to handle,
6767 (win32_wait): Don't check here if gdb sent an interrupt request.
6768 Ensure there is a valid event to handle.
6769 (win32_request_interrupt): Add soft interruption method as last
6772 2007-12-03 Leo Zayas
6773 Pedro Alves <pedro_alves@portugalmail.pt>
6775 * win32-low.h (win32_thread_info): Add descriptions to the
6776 structure members. Replace `suspend_count' counter by a
6778 * win32-low.c (thread_rec): Update condition of when to get the
6779 context from the inferior. Rely on ContextFlags being set if it
6780 has already been retrieved. Only suspend the inferior thread if
6781 we haven't already. Warn if that fails.
6782 (continue_one_thread): s/suspend_count/suspended/. Only call
6783 ResumeThread once. Warn if that fails.
6785 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6787 * win32-low.c (win32_wait): Don't read from the inferior when it
6790 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6792 * Makefile.in (win32_low_h): New variable.
6793 (win32-low.o): Add dependency on $(win32_low_h).
6794 (win32-arm-low.o, win32-i386-low.o): New rules.
6796 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6798 * hostio.c: Correct copyright year.
6800 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6802 * Makefile.in (OBS): Add hostio.o.
6803 (hostio.o): New rule.
6804 * server.h (handle_vFile): Declare.
6805 * hostio.c: New file.
6806 * server.c (handle_v_requests): Take packet_len and new_packet_len
6807 for binary packets. Call handle_vFile.
6808 (main): Update call to handle_v_requests.
6810 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6812 * linux-low.c: Include <sched.h>.
6814 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6816 * linux-low.c (linux_tracefork_grandchild): New.
6817 (linux_tracefork_child): Use clone.
6818 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6820 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6822 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6824 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6826 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6828 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6830 * inferiors.c (change_inferior_id): Delete.
6831 (add_pid_to_list, pull_pid_from_list): New.
6832 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6833 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6834 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6835 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6836 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6837 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6838 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6839 (using_threads): Always set to 1.
6840 (handle_extended_wait): New.
6841 (add_process): Do not set TID.
6842 (linux_create_inferior): Set must_set_ptrace_flags.
6843 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6844 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6845 (linux_thread_alive): Rename TID argument to LWPID.
6846 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6847 (linux_wait_for_event): Do not use TID or check using_threads. Update
6848 call to dead_thread_notify. Call handle_extended_wait.
6849 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6850 (send_sigstop): Delete sigstop_sent.
6851 (wait_for_sigstop): Avoid TID.
6852 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6853 (linux_test_for_tracefork): New.
6854 (linux_lookup_signals): Use thread_db_active and
6855 linux_supports_tracefork_flag.
6856 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6857 * linux-low.h (get_process_thread): Avoid TID.
6858 (struct process_ifo): Move thread_known and tid to the end. Remove
6860 (linux_attach_lwp, thread_db_init): Update prototypes.
6861 * server.h (change_inferior_id): Delete prototype.
6862 (add_pid_to_list, pull_pid_from_list): New prototypes.
6863 * thread-db.c (thread_db_use_events): New.
6864 (find_first_thread): Rename to...
6865 (find_one_thread): ...this. Update callers and messages. Do not
6866 call fatal. Check thread_db_use_events. Do not call
6867 change_inferior_id or new_thread_notify.
6868 (maybe_attach_thread): Update. Do not call new_thread_notify.
6869 (thread_db_init): Set thread_db_use_events. Check use_events.
6870 * utils.c (fatal, warning): Correct message prefix.
6872 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6874 * Makefile.in (clean): Remove new files.
6875 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6876 (powerpc-64.o, powerpc-64.c): New rules.
6877 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6878 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6880 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6882 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6883 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6884 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6885 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6886 (target_regsets): Add AltiVec and SPE register sets.
6887 * configure.ac: Check for AltiVec and SPE.
6888 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6889 (ppc_fill_vrregset, ppc_store_vrregset): New.
6890 (target_regsets): Add AltiVec register set.
6891 * configure: Regenerated.
6893 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6895 * linux-low.c (O_LARGEFILE): Define.
6896 (linux_read_memory): Use /proc/PID/mem.
6897 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6898 * configure, config.in: Regenerated.
6900 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6902 * linux-low.c (linux_wait_for_event): Do not pass signals while
6905 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6907 * win32-low.c (create_process): New.
6908 (win32_create_inferior): Use create_process instead of
6909 CreateProcess. If create_process failed retry appending an ".exe"
6910 suffix. Store the GetLastError result immediatelly after
6911 create_process calls and use it on the call to error.
6913 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6915 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6917 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6919 * configure.ac: Switch license to GPLv3.
6921 2007-08-01 Michael Snyder <msnyder@access-company.com>
6923 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6925 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6927 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6929 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6930 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6931 CloseToolhelp32Snapshot.
6932 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6933 CloseToolhelp32Snapshot.
6935 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6937 * server.c (main): Check for inferior exit before main loop.
6939 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6941 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6942 instead of on tmp_desc.
6944 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6945 Daniel Jacobowitz <dan@codesourcery.com>
6947 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6948 (add_thread): Minor cleanups.
6949 (clear_inferiors): Move lower in the file. Clear the DLL
6951 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6952 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6953 (xml_escape_text): New.
6954 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6956 (handle_v_cont): Report errors.
6957 (gdbserver_version): Update.
6958 (main): Correct size of own_buf. Do not report initial DLL events.
6959 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6960 (unloaded_dll, xml_escape_text): New.
6961 * win32-low.c (enum target_waitkind): Update comments.
6962 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6963 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6964 (win32_EnumProcessModules, win32_GetModuleInformation)
6965 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6966 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6967 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6968 (win32_Module32First, win32_Module32Next, load_toolhelp)
6969 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6970 (get_child_debug_event): Handle DLL events.
6971 (win32_wait): Likewise.
6973 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6975 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6976 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6978 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6980 * win32-low.c (handle_output_debug_string): Ignore event if not
6983 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6985 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6987 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6989 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6991 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6993 * inferiors.c (change_inferior_id): Add comment.
6994 * linux-low.c (check_removed_breakpoint): Add an early
6995 prototype. Improve debug output.
6996 (linux_attach): Doc update.
6997 (linux_detach_one_process, linux_detach): Clean up before releasing
6999 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7000 * linux-low.h (struct process_info): Doc improvement.
7001 * mem-break.c (delete_all_breakpoints): New.
7002 * mem-break.h (delete_all_breakpoints): New prototype.
7003 * thread-db.c (find_first_thread): New.
7004 (thread_db_create_event): Call it instead of
7005 thread_db_find_new_threads. Clean up unused variables.
7006 (maybe_attach_thread): Remove first thread handling.
7007 (thread_db_find_new_threads): Use find_first_thread.
7008 (thread_db_get_tls_address): Likewise.
7010 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7012 * thread-db.c (thread_db_find_new_threads): Add prototype.
7013 (thread_db_create_event): Check for the main thread before adding
7015 (maybe_attach_thread): Only enable event reporting if TID == 0.
7016 (thread_db_get_tls_address): Check for new threads.
7018 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7020 * linux-low.c (linux_create_inferior): Try execv before execvp.
7021 * spu-low.c (spu_create_inferior): Likewise.
7023 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7025 * linux-low.c (linux_create_inferior): Change execv to execvp.
7026 * spu-low.c (spu_create_inferior): Likewies.
7028 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7030 * Makefile.in (clean): Clean new files instead of deleted ones.
7031 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7032 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7034 * configure.srv: Specify XML files and new regformats for MIPS and
7036 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7037 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7038 an entry for the restart register.
7039 (mips_cannot_fetch_register, mips_cannot_store_register)
7040 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7041 register names to match the XML descriptions.
7042 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7043 restart register instead of $0.
7045 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7046 Markus Deuling <deuling@de.ibm.com>
7048 * remote-utils.c (decode_xfer_write): New function.
7049 * server.h (decode_xfer_write): Add prototype.
7050 * server.c (handle_query): Add PACKET_LEN argument. Support
7051 qXfer:spu:read and qXfer:spu:write packets.
7052 (main): Pass packet_len to handle_query.
7053 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7054 * target.h (target_ops): Add qxfer_spu.
7056 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7058 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7059 accessing non-seekable spufs files.
7061 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7063 * server.c (handle_query): Add reply for qC packet.
7065 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7066 Leo Zayas <lerele@champenstudios@com>
7068 * server.h (check_remote_input_interrupt_request): New function.
7069 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7070 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7071 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7072 (check_remote_input_interrupt_request): New function.
7073 * server.h (check_remote_input_interrupt_request): Declare.
7074 * win32-low.c (winapi_DebugBreakProcess,
7075 winapi_GenerateConsoleCtrlEvent): New typedefs.
7076 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7078 (win32_wait): Check for remote interrupt request
7079 with check_remote_input_interrupt_request.
7080 (win32_request_interrupt): New function.
7081 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7083 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7085 * win32-low.c (debug_registers_changed,
7086 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7087 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7088 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7089 (thread_rec): Get context using the low target.
7090 (child_add_thread): Call thread_added on the low target,
7091 which does the same thing.
7093 (do_initial_child_stuff): Remove debug registers references.
7094 Set context using the low target. Resume threads after
7095 setting the contexts.
7096 (child_continue): Remove dead variable. Remove debug
7097 registers references.
7098 (child_fetch_inferior_registers): Go through the low target.
7099 (do_child_store_inferior_registers): Remove.
7100 (child_store_inferior_registers): Go through the low target.
7101 (win32_resume): Remove debug registers references.
7102 Set context using the low target.
7103 (handle_exception): Change return type to void. Don't record
7104 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7105 first chance exception.
7106 (get_child_debug_event): Change return type to void. Remove
7107 goto loop. Always return after waiting for debug event.
7108 (win32_wait): Convert to switch statement. Handle spurious
7111 * win32-i386-low.c (debug_registers_changed,
7112 debug_registers_used): New.
7113 (initial_stuff): Rename to ...
7114 (i386_initial_stuff): ... this. Clear debug registers
7116 (store_debug_registers): Delete.
7117 (i386_get_thread_context): New.
7118 (load_debug_registers): Delete.
7119 (i386_set_thread_context): New.
7120 (i386_thread_added): New.
7121 (single_step): Rename to ...
7122 (i386_single_step): ... this.
7123 (do_fetch_inferior_registers): Rename to ...
7124 (i386_fetch_inferior_register): ... this.
7125 (i386_store_inferior_register): New.
7126 (the_low_target): Adapt to new interface.
7128 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7129 (arm_get_thread_context): New.
7130 (arm_set_thread_context): New.
7132 (do_fetch_inferior_registers): Rename to ...
7133 (arm_fetch_inferior_register): ... this.
7134 (arm_store_inferior_register): New.
7135 (arm_wince_breakpoint): Reimplement as unsigned long.
7136 (arm_wince_breakpoint_len): Define.
7137 (the_low_target): Adapt to new interface.
7139 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7140 load_debug_registers. Add get_thread_context, set_thread_context,
7141 thread_added and store_inferior_register. Rename
7142 fetch_inferior_registers to fetch_inferior_register.
7143 (regptr): Remove declaration.
7145 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7147 * linux-low.c (linux_detach): Change return type to int. Return 0.
7148 * spu-low.c (spu_detach): Likewise.
7150 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7152 * target.h (target_ops): Change return type of detach to int.
7154 (join_inferior): New.
7155 * server.c (main): Don't skip detach support on mingw32.
7156 If the inferior doesn't support detaching return error.
7157 Call join_inferior instead of using waitpid.
7158 * linux-low.c (linux_join): New.
7159 (linux_target_op): Add linux_join.
7160 * spu-low.c (spu_join): New.
7161 (spu_target_ops): Add spu_join.
7162 * win32-low.c (win32_detach): Adapt to new interface.
7163 Reopen current_process_handle before detaching. Issue a child
7164 resume before detaching.
7166 (win32_target_op): Add win32_join.
7168 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7170 * win32-low.c (win32-attach): Fix return value.
7171 * target.h (target_ops): Describe ATTACH return values.
7173 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7175 * win32-low.c (GETPROCADDRESS): Define.
7176 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7177 (winapi_DebugSetProcessKillOnExit): Likewise.
7178 (win32_create_inferior): Force usage of ansi CreateProcessA.
7179 (win32_attach): Use GETPROCADDRESS.
7180 (win32_detach): Likewise.
7182 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7184 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7186 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7188 * win32-low.c: Commit leftover changes from 2007-03-29.
7190 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7192 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7193 fields short instead of int. Add explicit padding.
7194 (i387_cache_to_fsave): Remove unnecessary casts.
7195 (i387_fsave_to_cache): Doc fix.
7196 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7198 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7200 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7201 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7203 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7205 * configure.srv (arm*-*-mingw32ce*): Move near the other
7208 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7210 * configure.ac: Add errno checking.
7211 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7212 sys/file.h and malloc.h.
7213 (AC_CHECK_DECLS): Add perror.
7214 (srv_mingwce): Handle.
7215 * configure.srv (i[34567]86-*-cygwin*): Add
7216 win32-i386-low.o to srv_tgtobj.
7217 (i[34567]86-*-mingw*): Likewise.
7218 (arm*-*-mingw32ce*): Add case.
7219 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7220 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7221 [__MINGW32CE__] (strerror): New function.
7222 [__MINGW32CE__] (errno): Define to GetLastError.
7223 [__MINGW32CE__] (COUNTOF): New macro.
7224 (remote_open): Remove extra close call.
7225 * mem-break.c (delete_breakpoint_at): New function.
7226 * mem-break.h (delete_breakpoint_at): Declare.
7227 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7228 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7229 [USE_WIN32API] (read, write): Add char* casts.
7230 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7231 * server.h: Include wincecompat.h on Windows CE.
7232 [HAVE_ERRNO_H]: Check.
7233 (perror): Declare if not declared.
7234 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7235 (perror_with_name): Remove errno declaration.
7236 * wincecompat.h: New.
7237 * wincecompat.c: New.
7239 * win32-arm-low.c: New.
7240 * win32-i386-low.c: New.
7241 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7242 (OUTMSG2): Make it safe.
7244 (COUNTOF): New macro.
7245 (NUM_REGS): Get it from the low target.
7246 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7247 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7248 (thread_rec): Let low target handle debug registers.
7249 (child_add_thread): Likewise.
7250 (child_init_thread_list): Likewise.
7251 (continue_one_thread): Likewise.
7253 (do_child_fetch_inferior_registers): Move to ...
7254 * win32-i386-low.c: ... here, and rename to ...
7255 (do_fetch_inferior_registers): ... this.
7256 * win32-low.c (child_fetch_inferior_registers):
7257 Go through the low target.
7258 (do_child_store_inferior_registers): Use regptr.
7259 (strwinerror): New function.
7260 (win32_create_inferior): Handle Windows CE.
7261 Use strwinerror instead of strerror on Windows error
7262 codes. Add program to the error output.
7263 Don't close the main thread handle on Windows CE.
7264 (win32_attach): Use coredll.dll on Windows CE.
7265 (win32_kill): Close current process and current
7267 (win32_detach): Use coredll.dll on Windows CE.
7268 (win32_resume): Let low target handle debug registers, and
7270 (handle_exception): Add/Remove initial breakpoint. Avoid
7271 non-existant WSTOPSIG on Windows CE.
7272 (win32_read_inferior_memory): Cast to remove warning.
7273 (win32_arch_string): Go through the low target.
7274 (initialize_low): Call set_breakpoint_data with the low
7275 target's breakpoint.
7276 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7277 FOP_REGNUM, mappings): Move to ...
7278 * win32-i386-low.c: ... here.
7279 * win32-low.c (win32_thread_info): Move to ...
7280 * win32-low.h: ... here.
7281 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7282 win32-arm-low.c and wincecompat.c.
7283 (all:): Add $EXEEXT.
7284 (install-only:): Likewise.
7285 (gdbserver:): Likewise.
7286 (gdbreplay:): Likewise.
7287 * config.in: Regenerate.
7288 * configure: Regenerate.
7290 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7292 * win32-low.c: Rename typedef thread_info to
7293 win32_thread_info throughout.
7295 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7297 * win32-i386-low.c: Rename to ...
7298 * win32-low.c: ... this.
7299 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7300 * Makefile.in: Likewise.
7302 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7304 * remote-utils.c (monitor_output): Constify msg parameter.
7305 * server.h (monitor_output): Likewise.
7306 * win32-i386-low.c (handle_output_debug_string): New.
7307 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7308 handle_output_debug_string.
7309 (get_child_debug_event): Likewise.
7311 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7313 * server.c (main): Correct strtoul check.
7315 2007-03-27 Jon Ringle <jon@ringle.org>
7317 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7319 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7321 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7323 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7325 * terminal.h: Check HAVE_SGTTY_H.
7327 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7329 * remote-utils.c (remote_open): Print out the assigned port number.
7331 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7333 * remote-utils.c (monitor_output): New function.
7334 * server.c (debug_threads): Define here.
7335 (monitor_show_help): New function.
7336 (handle_query): Handle qRcmd.
7337 (main): Do not handle 'd' packet.
7338 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7339 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7342 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7344 * Makefile.in (EXEEXT): New.
7345 (clean): Use $(EXEEXT).
7347 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7349 * target.h (target_ops): Rename send_signal to request_interrupt,
7350 and remove enum target_signal parameter.
7351 * linux-low.c (linux_request_interrupt): Rename from
7352 linux_send_signal, and always send SIGINT.
7353 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7354 and always send SIGINT.
7355 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7357 (input_interrupt): Likewise.
7359 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7361 * server.c (get_features_xml): Check if target implemented
7363 * win32-i386-low.c (win32_arch_string): New.
7364 (win32_target_ops): Add win32_arch_string as arch_string member.
7366 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7368 * spu-low.c (spu_arch_string): New.
7369 (spu_target_ops): Add spu_arch_string.
7371 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7373 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7374 * configure.ac: Do not check for terminal.h.
7375 * configure, config.in: Regenerated.
7377 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7379 * Makefile.in (OBS): Add $(XML_BUILTIN).
7380 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7382 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7383 (arm-with-iwmmxt.c): New.
7384 * config.in, configure: Regenerate.
7385 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7386 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7387 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7388 (arm*-*-linux*): Add iWMMXt and regset support.
7389 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7390 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7391 (arm_store_wmmxregset, target_regsets): New.
7392 * server.c (get_features_xml): Take annex argument. Check builtin
7394 (handle_query): Handle multiple annexes.
7396 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7398 * remote-utils.c [USE_WIN32API] (read, write): Define.
7399 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7402 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7404 * linux-i386-low.c (the_low_target): Set arch_string.
7405 * linux-x86-64-low.c (the_low_target): Likewise.
7406 * linux-low.c (linux_arch_string): New.
7407 (linux_target_ops): Add it.
7408 * linux-low.h (struct linux_target_ops): Add arch_string.
7409 * server.c (write_qxfer_response): Use const void * for DATA.
7410 (get_features_xml): New.
7411 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7412 * target.h (struct target_ops): Add arch_string method.
7414 2007-01-03 Denis Pilat <denis.pilat@st.com>
7415 Daniel Jacobowitz <dan@codesourcery.com>
7417 * linux-low.c (linux_kill): Handle being called with no threads.
7418 * win32-i386-low.c (win32_kill): Likewise.
7419 (get_child_debug_event): Clear current_process_handle.
7421 2006-12-30 Denis PILAT <denis.pilat@st.com>
7422 Daniel Jacobowitz <dan@codesourcery.com>
7424 * remote-utils.c (remote_open): Check the type of specified
7425 serial port devices before opening them.
7426 * server.c (main): Kill the inferior if an error occurs during
7427 the first remote_open.
7429 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7431 * README: Update supported targets.
7433 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7435 * Makefile.in (clean): Remove reg-mips64.c.
7436 (reg-mips64.c, reg-mips64.o): New rules.
7437 * configure.srv: Handle mips64. Include regset support for mips.
7438 * linux-mips-low.c (union mips_register): New.
7439 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7440 (mips_breakpoint, mips_breakpoint_at): Use int.
7441 (mips_collect_register, mips_supply_register)
7442 (mips_collect_register_32bit, mips_supply_register_32bit)
7443 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7444 (mips_store_fpregset, target_regsets): New.
7445 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7447 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7449 * configure.srv: Add target "spu*-*-*".
7450 * Makefile.in (clean): Remove reg-spu.c.
7451 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7452 * spu-low.c: New file.
7454 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7456 * configure.ac: Correct td_thr_tls_get_addr test.
7457 * configure: Regenerated.
7459 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7461 * linux-low.c (linux_wait_for_event): Reformat. Use the
7463 * remote-utils.c (decode_address_to_semicolon): New.
7464 * server.c (pass_signals, handle_general_set): New.
7465 (handle_query): Mention QPassSignals for qSupported.
7466 (main): Call handle_general_set.
7467 * server.h (pass_signals, decode_address_to_semicolon): New.
7469 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7471 * server.c (handle_query): Correct error handling for read_auxv.
7473 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7475 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7476 and srv_linux_thread_db to yes.
7477 * linux-s390-low.c (s390_fill_gregset): New function.
7478 (target_regsets): Define data structure.
7480 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7482 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7483 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7484 * config.in, configure: Regenerated.
7485 * inferiors.c (gdb_id_to_thread): New function.
7486 (gdb_id_to_thread_id): Use it.
7487 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7488 * linux-low.h (struct process_info): Add th member.
7489 (thread_db_get_tls_address): New prototype.
7490 * remote-utils.c (decode_address): Make non-static.
7491 * server.c (handle_query): Handle qGetTLSAddr.
7492 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7493 * target.h (struct target_ops): Add get_tls_address.
7494 * thread-db.c (maybe_attach_thread): Save the thread handle.
7495 (thread_db_get_tls_address): New.
7497 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7499 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7500 (linux_resume_one_process): Take a siginfo_t *. Update all
7501 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7502 (struct pending_signals): Add a siginfo_t.
7503 (linux_wait_for_process): Always set last_status.
7504 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7505 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7506 * linux-low.h (struct process_info): Add last_status.
7508 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7510 * remote-utils.c (try_rle): New function.
7511 (putpkt_binary): Use it.
7513 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7515 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7516 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7517 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7518 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7519 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7522 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7524 * server.c (terminal_fd): New variable.
7525 (old_foreground_pgrp): Likewise.
7526 (restore_old_foreground_pgrp): New function.
7527 (start_inferior): Record the terminal file descriptor in terminal_fd
7528 and its original foreground group in old_foreground_pgrp. Register
7529 restore_old_foreground_pgrp with atexit().
7531 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7533 * server.c (handle_query): Correct qPart to qXfer.
7535 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7537 * configure.ac: Check for more headers which are missing on
7538 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7539 * configure.srv: Add Cygwin and mingw32.
7540 * remote-utils.c: Don't include headers unconditionally which
7541 are missing on mingw32. Include <winsock.h> for mingw32.
7542 (remote_open): Adjust for mingw32 support. Flush
7543 standard error after writing to it.
7544 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7545 (unblock_async_io, enable_async_io, disable_async_io)
7546 (readchar, getpkt): Update for Winsock support.
7547 (prepare_resume_reply): Expect a protocol signal number.
7548 * server.c: Disable <sys/wait.h> on mingw32.
7549 (start_inferior): Adjust for mingw32 support. Flush
7550 standard error after writing to it.
7551 (attach_inferior): Likewise. Use protocol signal
7553 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7555 * win32-i386-low.c: New file.
7556 * Makefile.in (XM_CLIBS): Set.
7557 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7558 (win32-i386-low.o): New dependency rule.
7559 * linux-low.c (linux_wait): Use target signal numbers.
7560 * target.h (struct target_ops): Doc fix.
7561 * server.h (target_signal_to_name): New prototype.
7562 * gdbreplay.c: Don't include headers unconditionally which
7563 are missing on mingw32. Include <winsock.h> for mingw32.
7564 (remote_close, remote_open): Adjust for Winsock support.
7565 * configure, config.in: Regenerated.
7567 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7569 * server.c (decode_xfer_read, write_qxfer_response): New.
7570 (handle_query): Take a packet length argument. Handle
7571 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7572 the qSupported response.
7573 (main): Update call to handle_query.
7575 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7577 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7578 (putpkt_binary): Renamed from putpkt and adjusted for binary
7580 (putpkt): New wrapper for putpkt_binary.
7581 (readchar): Don't mask off the high bit.
7582 (decode_X_packet): New function.
7583 * server.c (main): Call putpkt_binary if a handler sets the packet
7584 length. Save the length of the incoming packet. Handle 'X'.
7585 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7587 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7589 * server.c (handle_query): Handle qSupported.
7591 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7593 * remote-utils.c (all_symbols_looked_up): New variable.
7594 (look_up_one_symbol): Check it.
7595 * server.h (look_up_one_symbol): New declaration.
7596 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7598 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7600 * Makefile.in (linux-arm-low.o): Update dependencies.
7601 * linux-arm-low.c: Include "gdb_proc_service.h".
7602 (PTRACE_GET_THREAD_AREA): Define.
7603 (ps_get_thread_area): New function.
7605 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7607 * configure.srv (m68k*-*-uclinux*): New target.
7608 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7609 (linux_resume_one_process): Remove extraneous cast.
7610 (linux_read_offsets): New.
7611 (linux_target_op): Add linux_read_offsets on mmuless systems.
7612 * server.c (handle_query): Add qOffsets logic.
7613 * target.h (struct target_ops): Add read_offsets.
7615 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7617 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7618 (PTRACE_GET_THREAD_AREA): Define.
7619 (ps_get_thread_area): New function.
7620 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7621 (linux-x86-64-low.o): Update.
7623 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7625 * configure.ac: Remove checks for prfpregset_t.
7626 * gdb_proc_service.h: New file.
7627 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7628 new "gdb_proc_service.h".
7629 * proc-service.c: Likewise.
7630 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7631 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7632 * Makefile.in (gdb_proc_service_h): Updated.
7633 * configure, config.in: Regenerated.
7635 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7637 * remote-utils.c (prepare_resume_reply): Move declaration
7638 of gdb_id_from_wait to the top of the block.
7640 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7642 * linux-low.c (regsets_store_inferior_registers): Read the regset
7643 from the target before filling it.
7645 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7647 * server.c (attach_inferior): Return SIGTRAP for a successful
7650 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7652 * Makefile.in (OBS): Add version.o.
7653 (STAGESTUFF): Delete.
7654 (version.o): Add dependencies.
7655 (version.c): Replace rule.
7656 (clean): Remove version.c.
7657 * server.c (gdbserver_version): New.
7658 (gdbserver_usage): Use printf.
7659 (main): Handle --version and --help.
7660 * server.h (version, host_name): Add declarations.
7662 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7674 * linux-x86-64-low.c:
7677 * linux-ppc64-low.c:
7686 * linux-crisv32-low.c:
7698 * gdbserver.1: Add (C) after Copyright. Update the FSF
7701 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7703 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7704 (arm_breakpoint_at): Recognize both breakpoints.
7705 (the_low_target): Use the correct breakpoint instruction.
7707 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7709 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7710 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7711 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7712 (the_low_target): Update.
7714 2005-10-25 Andreas Schwab <schwab@suse.de>
7716 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7718 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7719 (ia64_num_regs): Reduce to 462.
7721 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7723 * acinclude.m4: Correct quoting.
7724 * aclocal.m4: Regenerated.
7726 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7727 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7728 (thread_db_init): Call thread_db_err_str.
7729 * configure.ac: Check for TD_VERSION.
7730 * config.in, configure: Regenerated.
7732 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7734 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7736 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7738 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7739 is not available. Define HAVE_PTRACE_GETREGS if it is.
7740 * config.in, configure: Regenerated.
7741 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7742 * linux-i386-low.c, linux-m68k-low.c: Update to use
7743 HAVE_PTRACE_GETREGS.
7744 * linux-low.c (regsets_fetch_inferior_registers)
7745 (regsets_store_inferior_registers): Only return 0 if we processed
7747 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7748 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7750 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7752 * inferiors.c (struct thread_info): Add gdb_id.
7753 (add_thread): Add gdb_id argument.
7754 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7755 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7756 calls to add_thread.
7757 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7758 * server.c (handle_query): Use thread_to_gdb_id.
7759 (handle_v_cont, main): Use gdb_id_to_thread_id.
7760 * server.h (add_thread): Update prototype.
7761 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7764 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7766 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7767 left-padded registers.
7768 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7769 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7771 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7773 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7774 * configure: Regenerate.
7775 * config.in: Regenerate.
7776 * server.h (NEED_DECLARATION_STRERROR):
7777 Replace with !HAVE_DECL_STRERROR.
7779 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7781 * linux-low.c (linux_wait, linux_send_signal): Don't test
7782 an unsigned long variable for > 0 if it could be MAX_ULONG.
7783 * server.c (myresume): Likewise.
7784 * target.c (set_desired_inferior): Likewise.
7786 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7788 * configure.ac: Simplify and improve check for socklen_t.
7789 * configure, config.in: Regenerate.
7791 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7793 * acconfig.h: Remove.
7794 * configure.ac: Add a test for socklen_t. Use three-argument
7795 AC_DEFINE throughout.
7796 * config.in: Regenerated using autoheader 2.59.
7797 * configure: Regenerated.
7799 * gdbreplay.c (socklen_t): Provide a default.
7800 (remote_open): Use socklen_t.
7801 * remote-utils.c (socklen_t): Provide a default.
7802 (remote_open): Use socklen_t.
7803 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7806 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7808 * linux-low.c (linux_read_memory, linux_write_memory)
7809 (linux_read_auxv): Likewise.
7810 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7811 (check_mem_write): Likewise.
7812 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7814 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7815 (registers_from_string, register_data): Likewise.
7816 * server.c (handle_query, main): Likewise.
7817 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7818 (decode_M_packet): Likewise.
7819 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7820 * target.h (struct target_ops): Update read_memory, write_memory,
7822 (read_inferior_memory, write_inferior_memory): Update.
7823 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7825 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7826 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7827 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7828 linux-s390-low.c, linux-sh-low.c: Update for changes in
7829 read_inferior_memory and the_low_target->breakpoint.
7831 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7833 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7834 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7835 * configure.srv: Add powerpc64-*-linux*.
7836 * linux-ppc64-low.c: New file.
7838 2005-05-23 Orjan Friberg <orjanf@axis.com>
7840 * linux-cris-low.c: New file with support for CRIS.
7841 * linux-crisv32-low.c: Ditto for CRISv32.
7842 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7843 (clean): Add reg-cris.c and reg-crisv32.c.
7844 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7845 reg-crisv32.o, and reg-crisv32.c to make rules.
7846 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7849 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7851 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7852 of sizeof (PTRACE_XFER_TYPE).
7853 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7855 2005-05-12 Orjan Friberg <orjanf@axis.com>
7857 * target.h (struct target_ops): Add insert_watchpoint,
7858 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7859 pointers for hardware watchpoint support.
7860 * linux-low.h (struct linux_target_ops): Ditto.
7861 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7862 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7863 to linux_target_ops.
7864 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7866 * server.c (main): Recognize 'Z' and 'z' packets.
7868 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7870 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7871 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7872 (the_low_target): Add new members.
7874 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7876 * proc-service.c (ps_lgetregs): Search all_processes instead of
7879 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7881 * server.c (start_inferior): Change return type to int.
7882 (attach_inferior): Change sigptr to int *.
7883 (handle_v_cont, handle_v_requests): Change signal to int *.
7884 (main): Change signal to int.
7886 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7888 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7889 * configure.srv: Add m32r*-*-linux*.
7890 * linux-m32r-low.c: New file.
7892 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7894 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7896 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7898 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7899 Take unsigned long arguments for PIDs.
7900 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7901 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7902 (wait_for_sigstop, linux_resume_one_process)
7903 (regsets_fetch_inferior_registers, linux_send_signal)
7904 (linux_read_auxv): Likewise. Update the types of variables holding
7905 PIDs. Update format string specifiers.
7906 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7907 * remote-utils.c (prepare_resume_reply): Likewise.
7908 * server.c (cont_thread, general_thread, step_thread)
7909 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7911 (handle_query): Update format specifiers.
7912 (handle_v_cont, main): Use strtoul for thread IDs.
7913 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7914 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7915 (general_thread, step_thread, thread_from_wait)
7916 (old_thread_from_wait): Update.
7917 * target.h (struct thread_resume): Use unsigned long for THREAD.
7918 (struct target_ops): Use unsigned long for arguments to attach and
7921 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7923 * acinclude.m4: Include bfd/bfd.m4 directly.
7924 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7925 <agriffis@toolchain.org>.
7926 * aclocal.m4, configure: Regenerated.
7928 2005-01-07 Andrew Cagney <cagney@gnu.org>
7930 * configure.ac: Rename configure.in, require autoconf 2.59.
7931 * configure: Re-generate.
7933 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7935 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7937 * aclocal.m4: Regenerated.
7938 * configure: Regenerated.
7940 2004-11-21 Andreas Schwab <schwab@suse.de>
7942 * linux-m68k-low.c (m68k_num_gregs): Define.
7943 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7944 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7945 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7946 (m68k_breakpoint_at): New. Add to the_low_target.
7948 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7949 srv_linux_thread_db to yes.
7951 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7953 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7954 (ARCH_SET_FS): Likewise.
7955 (ARCH_GET_FS): Likewise.
7956 (ARCH_GET_GS): Likewise.
7958 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7960 * linux-i386-low.c (ps_get_thread_area): New.
7961 * linux-x86-64-low.c (ps_get_thread_area): New.
7962 * linux-low.c: Include <sys/syscall.h>.
7963 (linux_kill_one_process): Don't kill the first thread here.
7964 (linux_kill): Kill the first thread here.
7965 (kill_lwp): New function.
7966 (send_sigstop, linux_send_signal): Use it.
7967 * proc-service.c: Clean up #ifdefs.
7968 (fpregset_info): Delete.
7969 (ps_lgetregs): Update and enable implementation.
7970 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7972 * remote-utils.c (struct sym_cache, symbol_cache): New.
7973 (input_interrupt): Print a clearer message.
7974 (async_io_enabled): New variable.
7975 (enable_async_io, disable_async_io): Use it. Update comments.
7976 (look_up_one_symbol): Use the symbol cache.
7977 * thread-db.c (thread_db_look_up_symbols): New function.
7978 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7980 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7982 * configure.in: Test for -rdynamic.
7983 * configure: Regenerated.
7984 * Makefile (INTERNAL_LDFLAGS): New.
7985 (gdbserver, gdbreplay): Use it.
7987 2004-09-02 Andrew Cagney <cagney@gnu.org>
7989 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7991 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
7993 * linux-low.c (linux_wait): Clear all_processes list also.
7995 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
7997 * linux-low.c: Include <errno.h>. Remove extern declaration of
8000 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8002 * gdbreplay.c, server.h, utils.c: Update copyright years.
8004 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8006 * server.c (main): Print child status or termination signal from
8007 variable 'signal', not 'sig'.
8009 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8011 * linux-low.c (linux_read_memory): Change return type to
8012 int. Check for and return error from ptrace().
8013 * target.c (read_inferior_memory): Change return type to int. Pass
8014 back return status from the_target->read_memory().
8015 * target.h (struct target_ops): Adapt *read_memory() prototype.
8017 (read_inferior_memory): Adapt prototype.
8018 * server.c (main): Return an error packet if
8019 read_inferior_memory() returns an error.
8021 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8023 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8024 Unify with other clean targets.
8026 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8028 * server.c (handle_v_cont): Call set_desired_inferior.
8030 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8032 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8034 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8036 * linux-low.c (linux_wait): Unblock async I/O.
8037 (linux_resume): Block and enable async I/O.
8038 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8039 * server.h (block_async_io, unblock_async_io): Add prototypes.
8041 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8043 * remote-utils.c (remote_open): Print a status notice after
8045 * server.c (attach_inferior): Print a status notice after
8048 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8050 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8052 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8054 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8056 * server.c, target.h: Update copyright years.
8058 2004-02-25 Roland McGrath <roland@redhat.com>
8060 * target.h (struct target_ops): New member `read_auxv'.
8061 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8062 * linux-low.c (linux_read_auxv): New function.
8063 (linux_target_ops): Initialize `read_auxv' member to that.
8065 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8067 Committed by Jim Blandy <jimb@redhat.com>.
8069 * linux-s390-low.c (s390_num_regs): Update.
8070 (s390_regmap): Remove control registers. Use __s390x__ predefine
8071 instead of GPR_SIZE to distiguish s390 and s390x targets.
8073 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8075 * linux-low.c: Update copyright year.
8076 (check_removed_breakpoint): Clear pending_is_breakpoint.
8077 (linux_set_resume_request, linux_queue_one_thread)
8078 (resume_status_pending_p): New functions.
8079 (linux_continue_one_thread): Use process->resume.
8080 (linux_resume): Only resume threads if there are no pending events.
8081 * linux-low.h (struct process_info): Add resume request
8084 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8086 * regcache.c (new_register_cache): Clear the allocated register
8087 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8089 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8091 * linux-low.c (linux_resume): Take a struct thread_resume *
8093 (linux_wait): Update call.
8094 (resume_ptr): New static variable.
8095 (linux_continue_one_thread): Renamed from
8096 linux_continue_one_process. Use resume_ptr.
8097 (linux_resume): Use linux_continue_one_thread.
8098 * server.c (handle_v_cont, handle_v_requests): New functions.
8099 (myresume): New function.
8100 (main): Handle 'v' case.
8101 * target.h (struct thread_resume): New type.
8102 (struct target_ops): Change argument of "resume" to struct
8104 (myresume): Delete macro.
8106 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8108 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8109 (uninstall): Support DESTDIR.
8111 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8113 * configure.srv: Add xscale*linux copy of arm*linux entry.
8115 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8117 * linux-arm-low.c (arm_reinsert_addr): New function.
8118 (the_low_target): Add arm_reinsert_addr.
8120 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8122 * mem-break.c: Remove whitespace at end of file.
8124 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8126 * configure.in: Check whether we need to prototype strerror.
8127 * server.h: Optionally prototype strerror.
8128 * gdbreplay.c (perror_with_name): Use strerror.
8129 * linux-low.c (linux_attach_lwp): Use strerror.
8130 * utils.c (perror_with_name): Use strerror.
8131 * config.in, configure: Regenerated.
8133 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8135 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8136 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8138 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8140 * Makefile.in (SFILES): Update.
8141 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8142 low-sun3.c: Remove files.
8144 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8146 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8147 (linux_detach_one_process, linux_detach): New functions.
8148 (linux_target_ops): Add linux_detach.
8149 * server.c (main): Handle 'D' packet.
8150 * target.h (struct target_ops): Add "detach" member.
8151 (detach_inferior): Define.
8153 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8155 From Kelley Cook <kelleycook@wideopenwest.com>:
8156 * configure.srv: Accept i[34567]86 variants.
8158 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8160 * linux-low.c (linux_wait_for_event): Correct comment typos.
8161 (linux_resume_one_process): Call check_removed_breakpoint.
8162 (linux_send_signal): New function.
8163 (linux_target_ops): Add linux_send_signal.
8164 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8166 * target.h (struct target_ops): Add send_signal.
8168 2003-05-29 Jim Blandy <jimb@redhat.com>
8170 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8171 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8172 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8173 away part of the register's value.
8175 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8177 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8178 (linux_wait_for_event, linux_init_signals): Likewise.
8180 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8182 * configure.in: Check for stdlib.h.
8183 * configure: Regenerated.
8184 * config.in: Regenerated.
8186 2003-01-04 Andreas Schwab <schwab@suse.de>
8188 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8190 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8192 * Makefile.in: Remove obsolete code.
8194 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8196 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8197 defined(PT_FPR0_HI).
8199 2002-11-17 Stuart Hughes <seh@zee2.com>
8201 * linux-arm-low.c (arm_num_regs): Increase.
8202 (arm_regmap): Include status register.
8204 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8206 * linux-low.c (register_addr): Remove incorrect -1 check.
8208 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8210 * linux-low.c (linux_create_inferior): Call setpgid. Return
8212 (unstopped_p, linux_signal_pid): Remove.
8213 (linux_target_ops): Remove linux_signal_pid.
8214 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8215 global instead of target method.
8216 * target.h (struct target_ops): Remove signal_pid. Update comment
8217 for create_inferior.
8218 * server.c (signal_pid): New variable.
8219 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8220 gdbserver. Set the child to be the foreground process group.
8221 (attach_inferior): Set signal_pid.
8223 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8225 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8227 2002-08-20 Jim Blandy <jimb@redhat.com>
8229 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8232 2002-08-01 Andrew Cagney <cagney@redhat.com>
8234 * Makefile.in: Make chill references obsolete.
8236 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8238 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8239 * configure: Regenerate.
8240 * config.in: Regenerate.
8242 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8244 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8245 (perror_with_name, remote_close, remote_open, expect, play): Static.
8247 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8249 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8250 byte offsets instead of an array of indexes.
8251 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8253 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8255 * regcache.c: Add comment.
8257 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8259 * thread-db.c: New file.
8260 * proc-service.c: New file.
8261 * acinclude.m4: New file.
8262 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8263 proc-service.o, and thread-db.o.
8264 (linux-low.o): Add USE_THREAD_DB.
8265 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8266 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8267 * aclocal.m4: Regenerated.
8268 * config.in: Regenerated.
8269 * configure: Regenerated.
8270 * configure.in: Check for proc_service.h, sys/procfs.h,
8271 thread_db.h, and linux/elf.h headrs.
8272 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8273 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8274 Check for -lthread_db and thread support.
8275 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8276 PowerPC, and SuperH.
8277 * i387-fp.c: Constify arguments.
8278 * i387-fp.h: Likewise.
8279 * inferiors.c: (struct thread_info): Renamed from
8280 `struct inferior_info'. Remove PID member. Use generic inferior
8281 list header. All uses updated.
8282 (inferiors, signal_pid): Removed.
8283 (all_threads): New variable.
8284 (get_thread): Define.
8285 (add_inferior_to_list): New function.
8286 (for_each_inferior): New function.
8287 (change_inferior_id): New function.
8288 (add_inferior): Removed.
8289 (remove_inferior): New function.
8290 (add_thread): New function.
8291 (free_one_thread): New function.
8292 (remove_thread): New function.
8293 (clear_inferiors): Use for_each_inferior and free_one_thread.
8294 (find_inferior): New function.
8295 (find_inferior_id): New function.
8296 (inferior_target_data): Update argument type.
8297 (set_inferior_target_data): Likewise.
8298 (inferior_regcache_data): Likewise.
8299 (set_inferior_regcache_data): Likewise.
8300 * linux-low.c (linux_bp_reinsert): Remove.
8301 (all_processes, stopping_threads, using_thrads)
8302 (struct pending_signals, debug_threads, pid_of): New.
8303 (inferior_pid): Replace with macro.
8304 (struct inferior_linux_data): Remove.
8305 (get_stop_pc, add_process): New functions.
8306 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8307 Use add_process and add_thread.
8308 (linux_attach_lwp): New function, based on old linux_attach. Use
8309 add_process and add_thread. Set stop_expected for new threads.
8310 (linux_attach): New function.
8311 (linux_kill_one_process): New function.
8312 (linux_kill): Kill all LWPs.
8313 (linux_thread_alive): Use find_inferior_id.
8314 (check_removed_breakpoints, status_pending_p): New functions.
8315 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8316 Update. Use WNOHANG. Wait for cloned processes also. Update process
8317 struct for the found process.
8318 (linux_wait_for_event): New function.
8319 (linux_wait): Use it. Support LWPs.
8320 (send_sigstop, wait_for_sigstop, stop_all_processes)
8321 (linux_resume_one_process, linux_continue_one_process): New functions.
8322 (linux_resume): Support LWPs.
8323 (REGISTER_RAW_SIZE): Remove.
8324 (fetch_register): Use register_size instead. Call supply_register.
8325 (usr_store_inferior_registers): Likewise. Call collect_register.
8327 (regsets_fetch_inferior_registers): Improve error message.
8328 (regsets_store_inferior_registers): Add debugging.
8329 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8330 (unstopped_p, linux_signal_pid): New functions.
8331 (linux_target_ops): Add linux_signal_pid.
8332 (linux_init_signals): New function.
8333 (initialize_low): Call it. Initialize using_threads.
8334 * regcache.c (inferior_regcache_data): Add valid
8336 (get_regcache): Fetch registers lazily. Add fetch argument
8337 and update all callers.
8338 (regcache_invalidate_one, regcache_invalidate): New
8340 (new_register_cache): Renamed from create_register_cache.
8341 Return the new regcache.
8342 (free_register_cache): Change argument to a void *.
8343 (registers_to_string, registers_from_string): Call get_regcache
8344 with fetch flag set.
8345 (register_data): Make static. Pass fetch flag to get_regcache.
8346 (supply_register): Call get_regcache with fetch flag clear.
8347 (collect_register): Call get_regcache with fetch flag set.
8348 (collect_register_as_string): New function.
8349 * regcache.h: Update.
8350 * remote-utils.c (putpkt): Flush after debug output and use
8352 Handle input interrupts while waiting for an ACK.
8353 (input_interrupt): Use signal_pid method.
8354 (getpkt): Flush after debug output and use stderr.
8355 (outreg): Use collect_register_as_string.
8356 (new_thread_notify, dead_thread_notify): New functions.
8357 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8359 (look_up_one_symbol): Flush after debug output.
8360 * server.c (step_thread, server_waiting): New variables.
8361 (start_inferior): Don't use signal_pid. Update call to mywait.
8362 (attach_inferior): Update call to mywait.
8363 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8364 (main): Don't fetch/store registers explicitly. Use
8365 set_desired_inferior. Support proposed ``Hs'' packet. Update
8368 (struct inferior_list, struct_inferior_list_entry): New.
8369 * target.c (set_desired_inferior): New.
8370 (write_inferior_memory): Constify.
8371 (mywait): New function.
8373 (struct target_ops): New signal_pid method.
8374 (mywait): Removed macro, added prototype.
8376 * linux-low.h (regset_func): Removed.
8377 (regset_fill_func, regset_store_func): New.
8378 (enum regset_type): New.
8379 (struct regset_info): Add type field. Use new operation types.
8380 (struct linux_target_ops): stop_pc renamed to get_pc.
8381 Add decr_pc_after_break and breakpoint_at.
8382 (get_process, get_thread_proess, get_process_thread)
8383 (strut process_info, all_processes, linux_attach_lwp)
8384 (thread_db_init): New.
8386 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8387 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8388 (the_low_target): Add new members.
8389 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8390 (i386_store_fpxregset): Constify.
8391 (target_regsets): Add new kind identifier.
8392 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8393 (i386_set_pc): Add debugging.
8394 (i386_breakpoint_at): New function.
8395 (the_low_target): Add new members.
8396 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8397 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8398 (mips_breakpoint_at): New.
8399 (the_low_target): Add new members.
8400 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8401 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8402 (the_low_target): Add new members.
8403 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8404 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8405 (the_low_target): Add new members.
8406 * linux-x86-64-low.c (target_regsets): Add new kind
8409 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8411 From Martin Pool <mbp@samba.org>:
8412 * server.c (gdbserver_usage): New function.
8415 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8417 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8420 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8422 * Makefile.in: Remove obsolete code.
8424 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8426 * linux-low.c (regsets_fetch_inferior_registers),
8427 (regsets_store_inferior_registers): Removed cast to int from
8429 * regcache.h: Added declaration of struct inferior_info.
8431 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8433 * inferiors.c (struct inferior_info): Add regcache_data.
8434 (add_inferior): Call create_register_cache.
8435 (clear_inferiors): Call free_register_cache.
8436 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8437 * regcache.c (struct inferior_regcache_data): New.
8438 (registers): Remove.
8439 (get_regcache): New function.
8440 (create_register_cache, free_register_cache): New functions.
8441 (set_register_cache): Don't initialize the register cache here.
8442 (registers_to_string, registers_from_string, register_data): Call
8444 * regcache.h: Add prototypes.
8445 * server.h: Likewise.
8447 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8449 * mem-break.c: New file.
8450 * mem-break.h: New file.
8451 * Makefile.in: Add mem-break.o rule; update server.h
8453 * inferiors.c (struct inferior_info): Add target_data
8455 (clear_inferiors): Free target_data member if set.
8456 (inferior_target_data, set_inferior_target_data): New functions.
8457 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8458 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8459 * linux-low.c (linux_bp_reinsert): New variable.
8460 (struct inferior_linux_data): New.
8461 (linux_create_inferior): Use set_inferior_target_data.
8462 (linux_attach): Likewise. Call add_inferior.
8463 (linux_wait_for_one_inferior): New function.
8464 (linux_wait): Call it.
8465 (linux_write_memory): Add const.
8466 (initialize_low): Call set_breakpoint_data.
8467 * linux-low.h (struct linux_target_ops): Add breakpoint
8469 * server.c (attach_inferior): Remove extra add_inferior
8471 * server.h: Include mem-break.h. Update inferior.c
8473 * target.c (read_inferior_memory)
8474 (write_inferior_memory): New functions.
8475 * target.h (read_inferior_memory)
8476 (write_inferior_memory): Change macros to prototypes.
8477 (struct target_ops): Update comments. Add const to write_memory
8480 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8482 * linux-low.c (usr_store_inferior_registers): Support
8483 registers which are allowed to fail to store.
8484 * linux-low.h (linux_target_ops): Likewise.
8485 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8486 (ppc_cannot_store_register): FPSCR may not be storable.
8488 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8490 * server.h: Include <string.h> if HAVE_STRING_H.
8491 * ChangeLog: Correct paths in last ChangeLog entry.
8493 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8495 * linux-low.h: Remove obsolete prototypes.
8496 (struct linux_target_ops): New.
8497 (extern the_low_target): New.
8498 * linux-low.c (num_regs, regmap): Remove declarations.
8499 (register_addr): Use the_low_target explicitly.
8500 (fetch_register): Likewise.
8501 (usr_fetch_inferior_registers): Likewise.
8502 (usr_store_inferior_registers): Likewise.
8503 * linux-arm-low.c (num_regs): Remove.
8504 (arm_num_regs): Define.
8505 (arm_regmap): Renamed from regmap, made static.
8506 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8508 (arm_cannot_store_register): Renamed from cannot_store_register,
8510 (the_low_target): New.
8511 * linux-i386-low.c (num_regs): Remove.
8512 (i386_num_regs): Define.
8513 (i386_regmap): Renamed from regmap, made static.
8514 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8516 (i386_cannot_store_register): Renamed from cannot_store_register,
8518 (the_low_target): New.
8519 * linux-ia64-low.c (num_regs): Remove.
8520 (ia64_num_regs): Define.
8521 (ia64_regmap): Renamed from regmap, made static.
8522 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8524 (ia64_cannot_store_register): Renamed from cannot_store_register,
8526 (the_low_target): New.
8527 * linux-m68k-low.c (num_regs): Remove.
8528 (m68k_num_regs): Define.
8529 (m68k_regmap): Renamed from regmap, made static.
8530 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8532 (m68k_cannot_store_register): Renamed from cannot_store_register,
8534 (the_low_target): New.
8535 * linux-mips-low.c (num_regs): Remove.
8536 (mips_num_regs): Define.
8537 (mips_regmap): Renamed from regmap, made static.
8538 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8540 (mips_cannot_store_register): Renamed from cannot_store_register,
8542 (the_low_target): New.
8543 * linux-ppc-low.c (num_regs): Remove.
8544 (ppc_num_regs): Define.
8545 (ppc_regmap): Renamed from regmap, made static.
8546 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8548 (ppc_cannot_store_register): Renamed from cannot_store_register,
8550 (the_low_target): New.
8551 * linux-s390-low.c (num_regs): Remove.
8552 (s390_num_regs): Define.
8553 (s390_regmap): Renamed from regmap, made static.
8554 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8556 (s390_cannot_store_register): Renamed from cannot_store_register,
8558 (the_low_target): New.
8559 * linux-sh-low.c (num_regs): Remove.
8560 (sh_num_regs): Define.
8561 (sh_regmap): Renamed from regmap, made static.
8562 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8564 (sh_cannot_store_register): Renamed from cannot_store_register,
8566 (the_low_target): New.
8567 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8568 (the_low_target): New.
8570 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8572 * Makefile.in: Add stamp-h target.
8573 * configure.in: Create stamp-h.
8574 * configure: Regenerated.
8576 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8578 * inferiors.c: New file.
8579 * target.c: New file.
8580 * target.h: New file.
8581 * Makefile.in: Add target.o and inferiors.o. Update
8583 * linux-low.c (inferior_pid): New static variable,
8584 moved from server.c.
8585 (linux_create_inferior): Renamed from create_inferior.
8586 Call add_inferior. Return 0 on success instead of a PID.
8587 (linux_attach): Renamed from myattach.
8588 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8589 (linux_thread_alive): Renamed from mythread_alive.
8590 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8592 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8593 (regsets_store_inferior_registers): Correct error message.
8594 Add missing ``return 0''.
8595 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8596 (linux_store_registers): Renamed from store_inferior_registers.
8597 (linux_read_memory): Renamed from read_inferior_memory.
8598 (linux_write_memory): Renamed from write_inferior_memory.
8599 (linux_target_ops): New structure.
8600 (initialize_low): Call set_target_ops ().
8601 * remote-utils.c (unhexify): New function.
8602 (hexify): New function.
8603 (input_interrupt): Send signals to ``signal_pid''.
8604 * server.c (inferior_pid): Remove.
8605 (start_inferior): Update create_inferior call.
8606 (attach_inferior): Call add_inferior.
8607 (handle_query): New function.
8608 (main): Call handle_query for `q' packets.
8609 * server.h: Include "target.h". Remove obsolete prototypes.
8610 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8612 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8614 * Makefile.in: Add WARN_CFLAGS. Update configury
8616 * configure.in: Check for <string.h>
8617 * configure: Regenerate.
8618 * config.in: Regenerate.
8619 * gdbreplay.c: Include needed system headers.
8620 (remote_open): Remove strchr prototype.
8621 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8622 * regcache.c (supply_register): Change buf argument to const void *.
8623 (supply_register_by_name): Likewise.
8624 (collect_register): Change buf argument to void *.
8625 (collect_register_by_name): Likewise.
8626 * regcache.h: Add missing prototypes.
8627 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8628 * server.c (handle_query): New function.
8629 (attached): New static variable, moved out of main.
8630 (main): Quiet longjmp clobber warnings.
8631 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8632 * utils.c (error): Remove NORETURN.