1 2013-09-05 Pedro Alves <palves@redhat.com>
3 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5 (loaded_dll, unloaded_dll): Move to ...
6 * dll.h: ... this new file.
7 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9 2013-09-05 Pedro Alves <palves@redhat.com>
11 * server.h (current_process, get_thread_process, all_processes)
12 (add_inferior_to_list, for_each_inferior, current_inferior)
13 (remove_inferior, add_process, remove_process, find_process_pid)
14 (have_started_inferiors_p, have_attached_inferiors_p)
15 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
16 (clear_inferiors, find_inferior, find_inferior_id)
17 (inferior_target_data, set_inferior_target_data)
18 (inferior_regcache_data, set_inferior_regcache_data): Move to
19 inferiors.h, and include it.
20 * inferiors.h: New file.
22 2013-09-05 Pedro Alves <palves@redhat.com>
24 * server.h (struct emit_ops, current_insn_ptr, emit_error):
28 2013-09-05 Pedro Alves <palves@redhat.com>
30 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
32 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
33 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
34 (handle_tracepoint_general_set, handle_tracepoint_query)
35 (tracepoint_finished_step, tracepoint_was_hit)
36 (release_while_stepping_state_list, current_traceframe)
37 (in_readonly_region, traceframe_read_mem)
38 (fetch_traceframe_registers, traceframe_read_sdata)
39 (traceframe_read_info, struct fast_tpoint_collect_status)
40 (fast_tracepoint_collecting, force_unlock_trace_buffer)
41 (handle_tracepoit_bkpts, initialize_low_tracepoint)
42 (supply_fast_tracepoint_registers)
43 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
44 (ipa_tdesc, claim_trampoline_space)
45 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
46 (agent_mem_read, agent_get_trace_state_variable_value)
47 (agent_set_trace_state_variable_value, agent_tsv_read)
48 (agent_mem_read_string, get_raw_reg_func_addr)
49 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
50 * tracepoint.h: ... this new file.
52 2013-09-05 Pedro Alves <palves@redhat.com>
54 * server.h (perror_with_name, error, fatal, warning, paddress)
55 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
59 2013-09-05 Pedro Alves <palves@redhat.com>
61 * server.h (remote_debug, noack_mode, transport_is_reliable)
62 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
63 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
64 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
65 (write_enn, initialize_async_io, enable_async_io)
66 (disable_async_io, check_remote_input_interrupt_request)
67 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
68 (dead_thread_notify, prepare_resume_reply)
69 (decode_address_to_semicolon, decode_address, decode_m_packet)
70 (decode_M_packet, decode_X_packet, decode_xfer_write)
71 (decode_search_memory_packet, unhexify, hexify)
72 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
73 (look_up_one_symbol, relocate_instruction)
74 (monitor_output): Move to remote-utils.h, and include it.
75 * remote-utils.h: New file.
77 2013-09-05 Pedro Alves <palves@redhat.com>
79 * server.h (_): Delete.
81 2013-09-02 Pedro Alves <palves@redhat.com>
83 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
84 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
86 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
88 2013-09-02 Pierre Muller <muller@sourceware.org>
90 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
91 or WriteProcessMemory complete successfully and handle
92 ERROR_PARTIAL_COPY error.
94 2013-09-02 Pedro Alves <palves@redhat.com>
96 * server.c (gdb_read_memory): Return -1 on traceframe memory read
99 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
102 * linux-low.c: Include filestuff.h.
103 (linux_create_inferior) <pid == 0>: Call close_most_fds.
104 * lynx-low.c: Include filestuff.h.
105 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
106 * server.c: Include filestuff.h.
107 (main): Call notice_open_fds.
108 * spu-low.c: Include filestuff.h.
109 (spu_create_inferior) <pid == 0>: Call close_most_fds.
111 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
113 * Makefile.in: Explain why ../target and ../nat are not
114 listed as include file search paths.
115 (linux-waitpid.o): New object file rule.
116 * configure.srv (srv_native_linux_obj): New variable.
117 Replace all occurrences of linux native object files with
118 $srv_native_linux_obj.
119 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
120 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
121 (linux_enable_event_reporting): Remove declaration.
122 (my_waitpid): Moved to common/linux-waitpid.c.
123 (linux_wait_for_event): Pass ptid when calling
124 linux_enable_event_reporting.
125 (linux_supports_tracefork_flag): Remove.
126 (linux_enable_event_reporting): Likewise.
127 (linux_tracefork_grandchild): Remove.
128 (STACK_SIZE): Moved to common/linux-ptrace.c.
129 (linux_tracefork_child): Remove.
130 (linux_test_for_tracefork): Remove.
131 (linux_look_up_symbols): Call linux_supports_traceclone.
132 (initialize_low): Remove call to linux_test_for_tracefork.
133 * linux-low.h (PTRACE_TYPE_ARG3): Move to
134 common/linux-ptrace.h.
135 (PTRACE_TYPE_ARG4): Likewise.
136 Include linux-ptrace.h.
138 2013-08-21 Pedro Alves <palves@redhat.com>
140 * config.in: Renegerate.
142 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
144 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
145 (SFILES): Remove $(srcdir)/common/target-common.c and
146 add $(srcdir)/target/waitstatus.c.
147 (OBS): Remove target-common.o and add waitstatus.o.
148 (server_h): Remove $(srcdir)/../common/target-common.h and
149 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
150 and $(srcdir)/../target/waitstatus.h.
151 (target-common.o): Remove.
152 (waitstatus.o): New target object file.
153 * target.h: Do not include target-common.h and
154 include target/resume.h, target/wait.h and
157 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
159 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
161 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
162 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
164 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
165 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
167 2013-07-27 Jie Zhang <jie@codesourcery.com>
168 Daniel Jacobowitz <dan@codesourcery.com>
169 Yao Qi <yao@codesourcery.com>
171 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
172 (mips-linux-watch.o): New rule.
173 (mips_linux_watch_h): New variable.
174 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
176 * linux-mips-low.c: Include mips-linux-watch.h.
177 (struct arch_process_info, struct arch_lwp_info): New.
178 (update_watch_registers_callback): New function.
179 (mips_linux_new_process, mips_linux_new_thread) New functions.
180 (mips_linux_prepare_to_resume, mips_insert_point): New
182 (mips_remove_point, mips_stopped_by_watchpoint): New
184 (rsp_bp_type_to_target_hw_bp_type): New function.
185 (mips_stopped_data_address): New function.
186 (the_low_target): Add watchpoint support functions.
188 2013-07-27 Yao Qi <yao@codesourcery.com>
190 * i386-low.c: Include break-common.h.
191 (enum target_hw_bp_type): Remove.
193 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
195 * Makefile.in (SFILES): /common/target-common.c.
196 (OBS): Add target-common.o.
197 (server_h): Add $(srcdir)/../common/target-common.h.
198 (target-common.o): New target.
199 * server.c (queue_stop_reply_callback): Free
200 status string after use.
201 * target.c (target_waitstatus_to_string): Remove.
202 * target.h: Include target-common.h.
203 (resume_kind): Likewise.
204 (target_waitkind): Likewise.
205 (target_waitstatus): Likewise.
206 (TARGET_WNOHANG): Likewise.
208 2013-07-04 Yao Qi <yao@codesourcery.com>
210 * Makefile.in (host_alias): Use @host_noncanonical@.
211 (target_alias): Use @target_noncanonical@.
212 * configure.ac: Use ACX_NONCANONICAL_TARGET and
213 ACX_NONCANONICAL_HOST.
214 * configure: Regenerated.
217 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
219 * configure.ac (version_host, version_target): Set and AC_SUBST them.
220 * configure: Rebuild.
221 * Makefile.in (version_host, version_target): Get from configure.
222 (version.c): Use $(version_host) and $(version_target).
224 2013-07-03 Pedro Alves <palves@redhat.com>
226 * Makefile.in (config.status): Depend on development.sh.
227 * acinclude.m4: Include libmcheck.m4.
228 * configure: Regenerate.
230 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
232 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
233 attribute inside the parentheses.
234 (winapi_DebugSetProcessKillOnExit): Ditto.
235 (winapi_DebugBreakProcess): Ditto.
236 (winapi_GenerateConsoleCtrlEvent): Ditto.
238 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
240 * notif.h (notif_event): Add a dummy member to avoid compiler
243 2013-07-01 Pedro Alves <palves@redhat.com>
245 * hostio.c (HOSTIO_PATH_MAX): Define.
246 (require_filename, handle_open, handle_unlink, handle_readlink):
249 2013-07-01 Pedro Alves <palves@redhat.com>
251 * server.h: Include "pathmax.h".
252 * linux-low.c: Don't include sys/param.h.
253 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
255 * win32-low.c: Don't include sys/param.h.
256 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
258 2013-07-01 Pedro Alves <palves@redhat.com>
260 * event-loop.c: Don't check HAVE_UNISTD_H before including
262 * gdbreplay.c: Likewise.
263 * remote-utils.c: Likewise.
264 * server.c: Likewise.
265 * configure.ac: Don't check for unistd.h.
266 * configure: Regenerate.
268 2013-06-28 Tom Tromey <tromey@redhat.com>
270 * Makefile.in (version.c): Use version.in, not
273 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
275 * configure.ac (version_host, version_target): Set and AC_SUBST them.
276 * configure: Rebuild.
277 * Makefile.in (version_host, version_target): Get from configure.
278 (version.c): Use $(version_host) and $(version_target).
280 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
282 Fix trace-status to output user name without trailing colon.
283 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
285 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
287 Fix trace-status to output proper start-time and stop-time.
288 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
289 output start time and stop time in hex as gdb expects.
291 2013-06-26 Pedro Alves <pedro@codesourcery.com>
293 * tracepoint.c (build_traceframe_info_xml): Output trace state
294 variables present in the trace buffer.
296 2013-06-24 Tom Tromey <tromey@redhat.com>
298 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
301 * gdbreplay.c: Include version.h.
302 (version, host_name): Don't declare.
303 * server.h: Include version.h.
304 (version, host_name): Don't declare.
306 2013-06-12 Pedro Alves <palves@redhat.com>
308 * linux-x86-low.c (linux_is_elf64): Delete global.
309 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
310 with local linux_pid_exe_is_elf_64_file use.
312 2013-06-11 Pedro Alves <palves@redhat.com>
314 * linux-low.c (regset_disabled, disable_regset): New functions.
315 (regsets_fetch_inferior_registers)
316 (regsets_store_inferior_registers): Use them.
317 (initialize_regsets_info); Don't allocate the disabled_regsets
319 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
322 2013-06-11 Pedro Alves <palves@redhat.com>
324 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
327 2013-06-11 Pedro Alves <palves@redhat.com>
329 * linux-x86-low.c (initialize_low_arch): Call
330 init_registers_x32_avx_linux.
332 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
334 Fix compatibility with Android Bionic.
335 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
338 2013-06-07 Pedro Alves <palves@redhat.com>
341 * Makefile.in (OBS): Add tdesc.o.
342 (IPA_OBJS): Add tdesc-ipa.o.
343 (tdesc-ipa.o): New rule.
344 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
346 * linux-low.c (new_inferior): Delete.
347 (disabled_regsets, num_regsets): Delete.
348 (linux_add_process): Adjust to set the new per-process
350 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
351 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
352 was a stop. When calling arch_setup, switch the current inferior
353 to the thread that got an event.
354 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
355 (regsets_fetch_inferior_registers)
356 (regsets_store_inferior_registers): New regsets_info parameter.
358 (linux_register_in_regsets): New regs_info parameter. Adjust to
360 (register_addr, fetch_register, store_register): New usrregs_info
361 parameter. Adjust to use it.
362 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
363 parameter regs_info. Adjust to use it.
364 (linux_fetch_registers): Get the current inferior's regs_info, and
366 (linux_store_registers): Ditto.
367 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
368 (initialize_low): Don't initialize the target_regsets here. Call
370 * linux-low.h (target_regsets): Delete declaration.
371 (struct regsets_info): New.
372 (struct usrregs_info): New.
373 (struct regs_info): New.
374 (struct process_info_private) <new_inferior>: New field.
375 (struct linux_target_ops): Delete the num_regs, regmap, and
376 regset_bitmap fields. New field regs_info.
377 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
378 * i387-fp.c (num_xmm_registers): Delete.
379 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
380 calls to new interface.
381 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
382 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
383 Infer the number of xmm registers from the regcache's target
385 * i387-fp.h (num_xmm_registers): Delete.
386 * inferiors.c (add_thread): Don't install the thread's regcache
388 * proc-service.c (gregset_info): Fetch the current inferior's
389 regs_info. Adjust to use it.
390 * regcache.c: Include tdesc.h.
391 (register_bytes, reg_defs, num_registers)
392 (gdbserver_expedite_regs): Delete.
393 (get_thread_regcache): If the thread doesn't have a regcache yet,
394 create one, instead of aborting gdbserver.
395 (regcache_invalidate_one): Rename to ...
396 (regcache_invalidate_thread): ... this.
397 (regcache_invalidate_one): New.
398 (regcache_invalidate): Only invalidate registers of the current
400 (init_register_cache): Add target_desc parameter, and use it.
401 (new_register_cache): Ditto. Assert the target description has a
402 non zero registers_size.
403 (regcache_cpy): Add assertions. Adjust.
404 (realloc_register_cache, set_register_cache): Delete.
405 (registers_to_string, registers_from_string): Adjust.
406 (find_register_by_name, find_regno, find_register_by_number)
407 (register_cache_size): Add target_desc parameter, and use it.
408 (free_register_cache_thread, free_register_cache_thread_one)
409 (regcache_release, register_cache_size): New.
410 (register_size): Add target_desc parameter, and use it.
411 (register_data, supply_register, supply_register_zeroed)
412 (supply_regblock, supply_register_by_name, collect_register)
413 (collect_register_as_string, collect_register_by_name): Adjust.
414 * regcache.h (struct target_desc): Forward declare.
415 (struct regcache) <tdesc>: New field.
416 (init_register_cache, new_register_cache): Add target_desc
418 (regcache_invalidate_thread): Declare.
419 (regcache_invalidate_one): Delete declaration.
420 (regcache_release): Declare.
421 (find_register_by_number, register_cache_size, register_size)
422 (find_regno): Add target_desc parameter.
423 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
425 * remote-utils.c: Include tdesc.h.
426 (outreg, prepare_resume_reply): Adjust.
427 * server.c: Include tdesc.h.
428 (gdbserver_xmltarget): Delete declaration.
429 (get_features_xml, process_serial_event): Adjust.
430 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
432 (struct process_info) <tdesc>: New field.
433 (ipa_tdesc): Declare.
436 * tracepoint.c: Include tdesc.h.
437 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
438 (get_context_regcache): Adjust to pass ipa_tdesc down.
439 (do_action_at_tracepoint): Adjust to get the register cache size
440 from the context regcache's description.
441 (traceframe_walk_blocks): Adjust to get the register cache size
442 from the current trace frame's description.
443 (traceframe_get_pc): Adjust to get current trace frame's
444 description and pass it down.
445 (gdb_collect): Adjust to get the register cache size from the
447 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
448 (gdbserver_xmltarget): Delete.
449 (initialize_low_tracepoint): Set the ipa's target description.
450 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
451 (initialize_low_tracepoint): Set the ipa's target description.
452 * linux-x86-low.c: Include tdesc.h.
453 [__x86_64__] (is_64bit_tdesc): New.
454 (ps_get_thread_area, x86_get_thread_area): Use it.
455 (i386_cannot_store_register): Rename to ...
456 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
457 (i386_cannot_fetch_register): Rename to ...
458 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
459 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
461 (target_regsets): Rename to ...
462 (x86_regsets): ... this.
463 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
465 (x86_siginfo_fixup): Use is_64bit_tdesc.
466 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
467 (tdesc_x32_avx_linux, tdesc_x32_linux)
468 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
470 (x86_linux_update_xmltarget): Delete.
471 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
472 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
473 (AMD64_LINUX_USER64_CS): New.
474 (x86_linux_read_description): New, based on
475 x86_linux_update_xmltarget.
476 (same_process_callback): New.
477 (x86_arch_setup_process_callback): New.
478 (x86_linux_update_xmltarget): New.
479 (x86_regsets_info): New.
480 (amd64_linux_regs_info): New.
481 (i386_linux_usrregs_info): New.
482 (i386_linux_regs_info): New.
483 (x86_linux_regs_info): New.
484 (x86_arch_setup): Reimplement.
485 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
486 (x86_emit_ops): Ditto.
487 (the_low_target): Adjust. Install x86_linux_regs_info,
488 x86_cannot_fetch_register, and x86_cannot_store_register.
489 (initialize_low_arch): New.
490 * linux-ia64-low.c (tdesc_ia64): Declare.
491 (ia64_fetch_register): Adjust.
492 (ia64_usrregs_info, regs_info): New globals.
493 (ia64_regs_info): New function.
494 (the_low_target): Adjust.
495 (initialize_low_arch): New function.
496 * linux-sparc-low.c (tdesc_sparc64): Declare.
497 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
499 (sparc_arch_setup): New function.
500 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
501 (the_low_target): Adjust.
502 (initialize_low_arch): New function.
503 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
504 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
505 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
506 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
507 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
508 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
509 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
510 (tdesc_powerpc_isa205_vsx64l): Declare.
511 (ppc_cannot_store_register, ppc_collect_ptrace_register)
512 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
513 (ppc_set_pc, ppc_get_hwcap): Adjust.
514 (ppc_usrregs_info): Forward declare.
515 (!__powerpc64__) ppc_regmap_adjusted: New global.
516 (ppc_arch_setup): Adjust to the current process'es target
518 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
519 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
520 (ppc_store_evrregset): Adjust.
521 (target_regsets): Rename to ...
522 (ppc_regsets): ... this, and make static.
523 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
524 (ppc_regs_info): New function.
525 (the_low_target): Adjust.
526 (initialize_low_arch): New function.
527 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
528 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
529 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
530 (tdesc_s390x_linux64v2): Declare.
531 (s390_collect_ptrace_register, s390_supply_ptrace_register)
532 (s390_fill_gregset, s390_store_last_break): Adjust.
533 (target_regsets): Rename to ...
534 (s390_regsets): ... this, and make static.
535 (s390_get_pc, s390_set_pc): Adjust.
536 (s390_get_hwcap): New target_desc parameter, and use it.
537 [__s390x__] (have_hwcap_s390_high_gprs): New global.
538 (s390_arch_setup): Adjust to set the current process'es target
539 description. Don't adjust the regmap.
540 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
541 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
542 (regs_info_3264): New globals.
543 (s390_regs_info): New function.
544 (the_low_target): Adjust.
545 (initialize_low_arch): New function.
546 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
547 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
548 [__mips64] (init_registers_mips_linux)
549 (init_registers_mips_dsp_linux): Delete defines.
550 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
551 (have_dsp): New global.
552 (mips_read_description): New, based on mips_arch_setup.
553 (mips_arch_setup): Reimplement.
554 (get_usrregs_info): New function.
555 (mips_cannot_fetch_register, mips_cannot_store_register)
556 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
557 (mips_fill_fpregset, mips_store_fpregset): Adjust.
558 (target_regsets): Rename to ...
559 (mips_regsets): ... this, and make static.
560 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
561 (dsp_regs_info, regs_info): New globals.
562 (mips_regs_info): New function.
563 (the_low_target): Adjust.
564 (initialize_low_arch): New function.
565 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
566 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
568 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
569 (arm_read_description): New, with bits factored from
571 (arm_arch_setup): Reimplement.
572 (target_regsets): Rename to ...
573 (arm_regsets): ... this, and make static.
574 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
575 (arm_regs_info): New function.
576 (the_low_target): Adjust.
577 (initialize_low_arch): New function.
578 * linux-m68k-low.c (tdesc_m68k): Declare.
579 (target_regsets): Rename to ...
580 (m68k_regsets): ... this, and make static.
581 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
582 (m68k_regs_info): New function.
583 (m68k_arch_setup): New function.
584 (the_low_target): Adjust.
585 (initialize_low_arch): New function.
586 * linux-sh-low.c (tdesc_sharch): Declare.
587 (target_regsets): Rename to ...
588 (sh_regsets): ... this, and make static.
589 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
590 (sh_regs_info, sh_arch_setup): New functions.
591 (the_low_target): Adjust.
592 (initialize_low_arch): New function.
593 * linux-bfin-low.c (tdesc_bfin): Declare.
594 (bfin_arch_setup): New function.
595 (bfin_usrregs_info, regs_info): New globals.
596 (bfin_regs_info): New function.
597 (the_low_target): Adjust.
598 (initialize_low_arch): New function.
599 * linux-cris-low.c (tdesc_cris): Declare.
600 (cris_arch_setup): New function.
601 (cris_usrregs_info, regs_info): New globals.
602 (cris_regs_info): New function.
603 (the_low_target): Adjust.
604 (initialize_low_arch): New function.
605 * linux-cris-low.c (tdesc_crisv32): Declare.
606 (cris_arch_setup): New function.
607 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
608 (cris_regs_info): New function.
609 (the_low_target): Adjust.
610 (initialize_low_arch): New function.
611 * linux-m32r-low.c (tdesc_m32r): Declare.
612 (m32r_arch_setup): New function.
613 (m32r_usrregs_info, regs_info): New globals.
614 (m32r_regs_info): Adjust.
615 (initialize_low_arch): New function.
616 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
617 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
618 (tic6x_usrregs_info): Forward declare.
619 (tic6x_read_description): New function, based on ...
620 (tic6x_arch_setup): ... this. Reimplement.
621 (target_regsets): Rename to ...
622 (tic6x_regsets): ... this, and make static.
623 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
624 (tic6x_regs_info): New function.
625 (the_low_target): Adjust.
626 (initialize_low_arch): New function.
627 * linux-xtensa-low.c (tdesc_xtensa): Declare.
628 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
629 (target_regsets): Rename to ...
630 (xtensa_regsets): ... this, and make static.
631 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
633 (xtensa_arch_setup, xtensa_regs_info): New functions.
634 (the_low_target): Adjust.
635 (initialize_low_arch): New function.
636 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
637 (nios2_arch_setup): Set the current process'es tdesc.
638 (target_regsets): Rename to ...
639 (nios2_regsets): ... this.
640 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
641 (nios2_regs_info): New function.
642 (the_low_target): Adjust.
643 (initialize_low_arch): New function.
644 * linux-aarch64-low.c (tdesc_aarch64): Declare.
645 (aarch64_arch_setup): Set the current process'es tdesc.
646 (target_regsets): Rename to ...
647 (aarch64_regsets): ... this.
648 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
649 (aarch64_regs_info): New function.
650 (the_low_target): Adjust.
651 (initialize_low_arch): New function.
652 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
654 (target_regsets): Rename to ...
655 (tile_regsets): ... this.
656 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
657 (tile_regs_info): New function.
658 (tile_arch_setup): Set the current process'es tdesc.
659 (the_low_target): Adjust.
660 (initialize_low_arch): New function.
661 * spu-low.c (tdesc_spu): Declare.
662 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
663 * win32-arm-low.c (tdesc_arm): Declare.
664 (arm_arch_setup): New function.
665 (the_low_target): Install arm_arch_setup instead of
667 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
668 (init_windows_x86): Rename to ...
669 (i386_arch_setup): ... this. Set `win32_tdesc'.
670 (the_low_target): Adjust.
671 * win32-low.c (win32_tdesc): New global.
672 (child_add_thread): Don't create the thread cache here.
673 (do_initial_child_stuff): Set the new process'es tdesc.
674 * win32-low.h (struct target_desc): Forward declare.
675 (win32_tdesc): Declare.
676 * lynx-i386-low.c (tdesc_i386): Declare global.
677 (lynx_i386_arch_setup): Set `lynx_tdesc'.
678 * lynx-low.c (lynx_tdesc): New global.
679 (lynx_add_process): Set the new process'es tdesc.
680 * lynx-low.h (struct target_desc): Forward declare.
681 (lynx_tdesc): Declare global.
682 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
683 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
684 * nto-low.c (nto_tdesc): New global.
685 (do_attach): Set the new process'es tdesc.
686 * nto-low.h (struct target_desc): Forward declare.
687 (nto_tdesc): Declare.
688 * nto-x86-low.c (tdesc_i386): Declare.
689 (nto_x86_arch_setup): Set `nto_tdesc'.
691 2013-06-04 Gary Benson <gbenson@redhat.com>
693 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
694 to qSupported response when appropriate.
695 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
696 with nonzero-length annex.
697 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
698 arguments supplied in annex.
700 2013-05-31 Doug Evans <dje@google.com>
703 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
704 64 bits in 64-cross-32 environment.
706 2013-05-28 Pedro Alves <palves@redhat.com>
708 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
709 (aarch64-without-fpu.c): Delete rule.
710 * configure.srv (aarch64*-*-linux*): Remove references to
711 aarch64-without-fpu.o and aarch64-without-fpu.xml.
712 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
715 2013-05-24 Pedro Alves <palves@redhat.com>
717 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
718 instead of strchr/decode_address. Error if the range isn't split
719 with a ','. Don't assume there's be a ':' in the action.
721 2013-05-23 Yao Qi <yao@codesourcery.com>
722 Pedro Alves <palves@redhat.com>
724 * linux-low.c (lwp_in_step_range): New function.
725 (linux_wait_1): If the thread was range stepping and stopped
726 outside the stepping range, report the stop to GDB. Otherwise,
727 continue stepping. Add range stepping debug output.
728 (linux_set_resume_request): Copy the step range from the resume
730 (linux_supports_range_stepping): New.
731 (linux_target_ops) <supports_range_stepping>: Set to
732 linux_supports_range_stepping.
733 * linux-low.h (struct linux_target_ops)
734 <supports_range_stepping>: New field.
735 (struct lwp_info) <step_range_start, step_range_end>: New fields.
736 * linux-x86-low.c (x86_supports_range_stepping): New.
737 (the_low_target) <supports_range_stepping>: Set to
738 x86_supports_range_stepping.
739 * server.c (handle_v_cont): Handle 'r' action.
740 (handle_v_requests): Append ";r" if the target supports range
742 * target.h (struct thread_resume) <step_range_start,
743 step_range_end>: New fields.
744 (struct target_ops) <supports_range_stepping>:
746 (target_supports_range_stepping): New macro.
748 2013-05-17 Joel Brobecker <brobecker@adacore.com>
750 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
751 confusion in comment.
753 2013-05-17 Joel Brobecker <brobecker@adacore.com>
755 * lynx-low.c (struct process_info_private): New type.
756 (lynx_add_process): New function.
757 (lynx_create_inferior, lynx_attach): Replace calls to
758 add_process by calls to lynx_add_process.
759 (lynx_resume): If PTID is null, then try using
760 current_process()->private->last_wait_event_ptid.
762 (lynx_clear_inferiors): Delete. The contents of that function
763 has been inlined in lynx_mourn;
764 (lynx_wait_1): Save the ptid in the process's private data.
765 (lynx_mourn): Free the process' private data. Replace call
766 to lynx_clear_inferiors by call to clear_inferiors.
768 2013-05-17 Yao Qi <yao@codesourcery.com>
770 * i386-low.c (i386_length_and_rw_bits): Move the comment to
773 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
775 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
776 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
777 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
778 PT_TEXT_END_ADDR guards. Update comments.
779 (linux_target_op) <read_offsets>: Conditionally define to
780 linux_read_offsets if the target is UCLIBC and if it defines
781 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
783 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
784 Andrew Jenner <andrew@codesourcery.com>
786 * Makefile.in (SFILES): Add linux-nios2-low.c.
787 (clean): Add action to delete nios2-linux.c.
788 (nios2-linux.c): New rule.
789 * configure.srv: Add nios2*-*-linux*.
790 * linux-nios2-low.c: New.
792 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
794 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
796 2013-04-25 Hui Zhu <hui@codesourcery.com>
799 * ax.c (ax_printf): Add fflush.
801 2013-04-22 Tom Tromey <tromey@redhat.com>
803 * Makefile.in (SFILES): Add filestuff.c.
804 (OBS): Add filestuff.o.
805 (filestuff.o): New target.
806 * config.in, configure: Rebuild.
807 * configure.ac: Check for fdwalk, pipe2.
809 2013-04-17 Pedro Alves <palves@redhat.com>
811 * configure.ac (USE_THREAD_DB): Delete variable.
812 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
813 Don't AC_SUBST USE_THREAD_DB.
814 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
815 * config.in, configure: Regenerate.
817 2013-04-16 Pedro Alves <palves@redhat.com>
819 * linux-low.h (struct lwp_info) <thread_known>: Move under
820 the USE_THREAD_DB #ifdef.
822 2013-04-16 Pedro Alves <palves@redhat.com>
824 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
825 (linux-low.o): Delete rule.
826 * linux-low.h: Always include "gdb_thread_db.h" instead of
827 conditionally including thread_db.h.
828 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
831 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
833 * Makefile.in (install-only): Fix make install regression.
835 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
837 Convert man pages to texinfo, new gdbinit.5 texinfo page.
838 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
840 * gdbserver.1: Remove.
842 2013-03-22 Pedro Alves <palves@redhat.com>
844 * linux-low.c (handle_extended_wait): Don't call
845 linux_enable_event_reporting.
847 2013-03-15 Tony Theodore <tonyt@logyst.com>
850 * Makefile.in (SHELL): Use @SHELL@.
852 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
854 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
857 2013-03-13 Joel Brobecker <brobecker@adacore.com>
859 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
860 Remove extraneous NULL element.
862 2013-03-13 Yao Qi <yao@codesourcery.com>
864 * tracepoint.c (traceframe_read_tsv): Look for the last matched
865 'V' block in trace frame.
867 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
869 * target.h (struct target_ops): Add btrace ops.
870 (target_supports_btrace): New macro.
871 (target_enable_btrace): New macro.
872 (target_disable_btrace): New macro.
873 (target_read_btrace): New macro.
874 * gdbthread.h (struct thread_info): Add btrace field.
875 * server.c: Include btrace-common.h.
876 (handle_btrace_general_set): New function.
877 (handle_btrace_enable): New function.
878 (handle_btrace_disable): New function.
879 (handle_general_set): Call handle_btrace_general_set.
880 (handle_qxfer_btrace): New function.
881 (struct qxfer qxfer_packets[]): Add btrace entry.
882 * inferiors.c (remove_thread): Disable btrace.
883 * linux-low: Include linux-btrace.h.
884 (linux_low_enable_btrace): New function.
885 (linux_low_read_btrace): New function.
886 (linux_target_ops): Add btrace ops.
887 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
888 Add srv_linux_btrace=yes.
889 (x86_64-*-linux*): Add linux-btrace.o.
890 Add srv_linux_btrace=yes.
891 * configure.ac: Define HAVE_LINUX_BTRACE.
892 * config.in: Regenerated.
893 * configure: Regenerated.
895 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
897 * server.c (handle_qxfer): Preserve error message if -3 is
899 (qxfer): Document the -3 return value.
901 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
903 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
904 (linux_btrace_h): New variable.
905 (linux-btrace.o): New rule.
907 2013-03-08 Stan Shebs <stan@codesourcery.com>
908 Hafiz Abid Qadeer <abidh@codesourcery.com>
910 * tracepoint.c (trace_buffer_size): New global.
911 (DEFAULT_TRACE_BUFFER_SIZE): New define.
912 (init_trace_buffer): Change to one-argument function. Allocate
914 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
915 handle QTBuffer:size packet.
916 (cmd_bigqtbuffer_size): New function.
917 (initialize_tracepoint): Call init_trace_buffer with
918 DEFAULT_TRACE_BUFFER_SIZE.
919 * server.c (handle_query): Add QTBuffer:size in the
922 2013-03-07 Yao Qi <yao@codesourcery.com>
924 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
925 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
927 (cmd_qtsp): Adjust condition. Do post increment.
928 Set cur_action and cur_step_action back to 0.
930 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
933 * linux-low.c (linux_write_memory): Return early success if LEN is
936 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
938 * configure.srv: Add x86_64-*-cygwin* as target.
940 2013-02-28 Tom Tromey <tromey@redhat.com>
942 * configure.ac: Invoke AC_SYS_LARGEFILE.
943 * configure, config.in: Rebuild.
945 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
947 * win32-low.c: Throughout, fix format strings and casts of
948 printf-like functions to avoid type related warnings on all
950 (get_child_debug_event): Print dwDebugEventCode as hex since
951 that's how it's usually documented.
953 2013-02-28 Yao Qi <yao@codesourcery.com>
955 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
958 2013-02-27 Jiong Wang <jiwang@tilera.com>
960 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
961 (reg-tilegx32.c): New rule.
962 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
963 * linux-tile-low.c (tile_arch_setup): New function. Invoke
964 different register info initializer according to elf class.
965 (init_registers_tilgx32): New function. The tilegx32 register info
967 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
968 (tile_store_gregset): Likewise.
970 2013-02-27 Yao Qi <yao@codesourcery.com>
972 * server.c (process_point_options): Print debug message when
973 debug_threads is true.
975 2013-02-26 Yao Qi <yao@codesourcery.com>
977 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
979 2013-02-19 Pedro Alves <palves@redhat.com>
980 Kai Tietz <ktietz@redhat.com>
984 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
985 instead of strtoul to extract address from packet.
986 (process_serial_event) <'z'>: Likewise.
988 2013-02-18 Yao Qi <yao@codesourcery.com>
990 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
992 2013-02-14 Pedro Alves <palves@redhat.com>
996 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
997 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
999 2013-02-14 Pedro Alves <palves@redhat.com>
1001 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1003 2013-02-14 Pedro Alves <palves@redhat.com>
1005 * tracepoint.c (save_string): Delete.
1006 (add_tracepoint_action): Use savestring instead of save_string.
1008 2013-02-12 Pedro Alves <palves@redhat.com>
1010 * linux-xtensa-low.c: Ditto.
1011 * xtensa-xtregs.c: Ditto.
1013 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1015 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1018 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1020 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1021 aarch64_num_wp_regs and aarch64_num_bp_regs to
1022 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1024 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1026 * linux-aarch64-low.c (ps_get_thread_area): Replace
1027 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1029 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1030 Marcus Shawcroft <marcus.shawcroft@arm.com>
1031 Nigel Stephens <nigel.stephens@arm.com>
1032 Yufeng Zhang <yufeng.zhang@arm.com>
1034 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1035 (aarch64.c, aarch64-without-fpu.c): New targets.
1036 * configure.srv (aarch64*-*-linux*): New.
1037 * linux-aarch64-low.c: New file.
1039 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1041 * linux-low.c (handle_extended_wait, linux_create_inferior)
1042 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1043 (dequeue_one_deferred_signal, linux_resume_one_thread)
1044 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1045 (linux_tracefork_grandchild, linux_test_for_tracefork)
1046 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1047 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1048 where the argument is 0.
1050 2013-01-25 Yao Qi <yao@codesourcery.com>
1052 * event-loop.c: Include "queue.h".
1053 (gdb_event_p): New typedef.
1054 (struct gdb_event) <next_event>: Remove.
1055 (event_queue): Change to QUEUE(gdb_event_p).
1056 (async_queue_event): Remove.
1057 (gdb_event_xfree): New.
1058 (initialize_event_loop): New.
1059 (process_event): Use API from QUEUE.
1060 (wait_for_event): Likewise.
1061 * server.c (main): Call initialize_event_loop.
1062 * server.h (initialize_event_loop): Declare.
1064 2013-01-18 Yao Qi <yao@codesourcery.com>
1066 * ax.h (struct eval_agent_expr_context): New.
1067 (gdb_eval_agent_expr): Update declaration.
1068 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1069 TFRAME. Add new argument CTX.
1070 * server.h (struct eval_agent_expr_context): Declare.
1071 (agent_mem_read, agent_tsv_read): Update declaration.
1072 (agent_mem_read_string): Likewise.
1073 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1074 (add_traceframe_block): Add new argument TPOINT.
1075 Increase TPOINT->traceframe_usage.
1076 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1077 eval_tracepoint_agent_expr.
1078 (condition_true_at_tracepoint): Likewise.
1079 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1080 (agent_mem_read_string, agent_tsv_read): Likewise.
1082 2013-01-16 Yao Qi <yao@codesourcery.com>
1084 * linux-low.c (linux_resume_one_lwp): Don't check
1085 'lwp->bp_reinsert != 0'.
1087 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1088 Pedro Alves <palves@redhat.com>
1090 * lynx-low.c (ptrace_request_to_str): Define a temporary
1091 macro and use it to simplify this function's implementation.
1093 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1095 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1098 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1100 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1102 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1104 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1106 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1108 * lynx-low.c (lynx_resume): Use the resume_info parameter
1109 to determine the ptid for the lynx_ptrace call, unless
1110 it is equal to minus_one_ptid, in which case we use the
1111 ptid of the current_inferior.
1112 (lynx_wait_1): After having received a thread create/exit
1113 event, resume the inferior's execution using the signaling
1114 thread's ptid, rather than the old ptid.
1116 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1118 * lynx-low.c (lynx_resume): Delete variable ret.
1120 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1122 * gdbreplay.c (gdbreplay_version): Update copyright year.
1123 * server.c (gdbserver_version): Likewise.
1125 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1127 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1130 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1132 * lynx-low.c (ptrace_request_to_str): Add handling for
1135 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1137 * lynx-low.c (lynx_attach): Delete variable new_process.
1139 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1141 * lynx-low.c (lynx_create_inferior): Delete variable
1144 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1146 * lynx-low.c (ptrace_request_to_str): Do not handle
1147 PTRACE_GETTHREADLIST if this macro does not exist.
1149 2012-12-15 Yao Qi <yao@codesourcery.com>
1151 * Makefile.in (OBS): Add notif.o.
1152 * notif.c, notif.h: New.
1153 * server.c: Include "notif.h".
1154 (struct vstop_notif) <next>: Remove.
1156 (queue_stop_reply): Update.
1157 (push_event, send_next_stop_reply): Remove.
1158 (discard_queued_stop_replies): Update.
1159 (notif_stop): New variable.
1160 (handle_v_stopped): Remove.
1161 (handle_v_requests): Don't call handle_v_stopped. Call
1162 handle_ack_notif instead.
1163 (queue_stop_reply_callback): Call notif_event_enque instead
1164 of queue_stop_reply.
1165 (handle_status): Don't call send_next_stop_reply, call
1166 notif_write_event instead.
1167 (kill_inferior_callback): Likewise.
1168 (detach_or_kill_inferior_callback): Likewise.
1169 (main): Call initialize_notif.
1170 (process_serial_event): Call QUEUE_is_empty.
1171 (handle_target_event): Call notif_push instead of push event.
1172 * server.h (push_event): Remove declaration.
1174 2012-12-10 Tom Tromey <tromey@redhat.com>
1176 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1177 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1180 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1181 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1182 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1183 (amd64-linux-ipa.o, ax.o): Rewrite.
1184 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1185 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1186 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1187 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1188 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1189 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1190 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1191 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1192 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1193 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1194 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1195 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1196 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1197 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1198 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1199 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1200 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1201 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1202 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1203 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1204 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1205 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1206 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1207 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1208 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1209 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1210 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1211 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1212 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1213 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1214 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1215 (reg-tilegx.o): Remove.
1216 (all_object_files): New macro.
1217 Include .deps files.
1218 * aclocal.m4, configure: Rebuild.
1219 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1220 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1221 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1223 2012-12-05 Tom Tromey <tromey@redhat.com>
1226 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1228 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1230 * configure.ac: Check for linux/perf_event.h.
1231 * config.in: Regenerated.
1232 * configure: Regenerated.
1234 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1236 * hostio.c (handle_readlink): Decrease buffer size
1237 parameter passed to readlink by one byte.
1239 2012-11-26 Yao Qi <yao@codesourcery.com>
1241 * configure.ac (build_warnings): Append '-Wempty-body'.
1242 * configure: Regenerated.
1243 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1246 2012-11-15 Pierre Muller <muller@sourceware.org>
1248 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1249 * config.in: Regenerate.
1250 * configure: Regenerate.
1251 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1252 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1253 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1254 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1256 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1257 instead of <sys/wait.h> header.
1258 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1260 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1262 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1263 (various make rules): Remove -DGDBSERVER
1265 2012-11-09 Yao Qi <yao@codesourcery.com>
1267 * spu-low.c (current_ptid): Move it to ..
1268 * gdbthread.h: ... here. New.
1269 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1270 * server.c (myresume, process_serial_event): Likewise.
1271 * thread-db.c (thread_db_find_new_threads): Likewise.
1272 * tracepoint.c (run_inferior_command): Likewise.
1274 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1276 * server.c (handle_search_memory_1): Include access length in
1279 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1281 * linux-crisv32-low.c: Fix compile errors.
1283 2012-09-04 Yao Qi <yao@codesourcery.com>
1285 * tracepoint.c (cmd_qtsv): Adjust debug message.
1286 Don't check CUR_TPOINT.
1288 2012-08-28 Yao Qi <yao@codesourcery.com>
1290 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1291 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1292 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1293 Remove declarations of xmalloc, xreallloc, xstrdup and
1295 * Makefile.in (libiberty_h): New.
1296 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1297 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1299 2012-08-23 Yao Qi <yao@codesourcery.com>
1301 * server.h: Remove declaration of 'xsnprintf'.
1303 2012-08-22 Keith Seitz <keiths@redhat.com>
1305 * server.h: Include build-gnulib-gbserver/config.h.
1306 * gdbreplay.c: Likewise.
1308 2012-08-08 Doug Evans <dje@google.com>
1310 * Makefile.in (SFILES): Add gdb_vecs.c.
1311 (OBS): Add gdb_vecs.o.
1312 (gdb_vecs_h, host_defs_h): New variables.
1313 (thread-db.o): Add $(gdb_vecs_h) dependency.
1314 (gdb_vecs.o): New rule.
1315 * thread-db.c: #include "gdb_vecs.h".
1316 (thread_db_load_search): Use a vector to iterate over path elements.
1317 Handle text appearing after "$pdir".
1319 * configure.ac: Add check for strstr.
1320 * config.in: Regenerate.
1321 * configure: Regenerate.
1323 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1325 * hostio.c (handle_pread): If pread fails, fall back to attempting
1327 (handle_pwrite): Likewise for pwrite.
1329 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1331 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1332 between unsupported TYPE and unimplementable ADDR/LEN combination.
1333 (arm_insert_point): Act on new return value.
1335 2012-07-31 Pedro Alves <palves@redhat.com>
1337 * server.c (process_point_options): Only skip tokens if we find
1338 one that is unrecognized. Don't treat 'X' specially while
1339 skipping unrecognized tokens.
1341 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1343 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1344 to 4-byte-align HW breakpoint addresses for Thumb.
1346 2012-07-27 Yao Qi <yao@codesourcery.com>
1350 * server.h: Declare gdb_agent_about_to_close.
1351 * target.c (kill_inferior): Include "agent.h".
1352 New. Send command 'kill'.
1353 * target.h (kill_inferior): Removed macro.
1354 * tracepoint.c (gdb_agent_about_to_close): New.
1355 (gdb_agent_helper_thread): Handle command 'close'.
1356 Wait endlessly until the inferior stops.
1357 Install gdb_agent_remove_socket to atexit hook.
1358 (agent_socket_name): New static variable.
1359 (gdb_agent_socket_init): Replace local variable 'name' with
1360 'agent_socket_name'.
1361 (gdb_agent_remove_socket): New.
1363 2012-07-27 Yao Qi <yao@codesourcery.com>
1365 * server.c (process_point_options): Stop at 'X' when parsing.
1367 2012-07-19 Michael Eager <eager@eagercon.com>
1369 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1371 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1372 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1373 hardware breakpoint.
1375 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1377 * gdbserver/linux-low.c (initialize_low): Call
1378 linux_ptrace_init_warnings.
1380 2012-07-02 Doug Evans <dje@google.com>
1382 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1385 2012-07-02 Stan Shebs <stan@codesourcery.com>
1387 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1388 (ax.o): Add it to build rule.
1390 (OBS): Add format.o.
1391 (IPA_OBS): Add format.o.
1392 * server.c (handle_query): Claim support for breakpoint commands.
1393 (process_point_options): Add command case.
1394 (process_serial_event): Leave running if there are printfs in
1396 * mem-break.h (any_persistent_commands): Declare.
1397 (add_breakpoint_commands): Declare.
1398 (gdb_no_commands_at_breakpoint): Declare.
1399 (run_breakpoint_commands): Declare.
1400 * mem-break.c (struct point_command_list): New struct.
1401 (struct breakpoint): New field command_list.
1402 (any_persistent_commands): New function.
1403 (add_commands_to_breakpoint): New function.
1404 (add_breakpoint_commands): New function.
1405 (gdb_no_commands_at_breakpoint): New function.
1406 (run_breakpoint_commands): New function.
1407 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1409 * ax.c: Include format.h.
1410 (ax_printf): New function.
1411 (gdb_eval_agent_expr): Add printf opcode.
1413 2012-06-13 Yao Qi <yao@codesourcery.com>
1415 * server.c (start_inferior): Remove duplicated writes to fields
1416 'last_resume_kind' and 'last_status' of 'current_inferior'.
1418 2012-06-12 Yao Qi <yao@codesourcery.com>
1419 Pedro Alves <palves@redhat.com>
1421 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1423 * server.c (handle_v_cont): Extend comment.
1425 2012-06-11 Yao Qi <yao@codesourcery.com>
1427 * linux-low.c (linux_attach): Add 'static'.
1429 2012-06-06 Yao Qi <yao@codesourcery.com>
1431 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1433 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1435 Fix gcc -flto compilation warning.
1436 * server.c (main): Make variable multi_mode and attach volatile.
1438 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1440 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1441 if the platform doesn't know about it.
1443 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1445 * Makefile.in (SFILES): Add linux-tile-low.c.
1446 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1447 * configure.srv: Handle tilegx-*-linux*.
1448 * linux-tile-low.c: New file.
1450 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1452 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1454 2012-05-24 Pedro Alves <palves@redhat.com>
1458 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1460 2012-05-24 Pedro Alves <palves@redhat.com>
1464 Replace target_signal with gdb_signal throughout.
1466 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1468 * linux-low.c (linux_store_registers): Avoid the copying sequence
1469 when no data has been retrieved by ptrace.
1471 2012-05-22 Will Deacon <will.deacon@arm.com>
1473 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1474 Include asm/ptrace.h.
1475 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1478 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1480 * linux-low.c (linux_store_registers): Don't re-retrieve data
1481 with ptrace that has already been obtained from /proc. Always
1482 copy any data retrieved with ptrace to the buffer supplied.
1484 2012-05-11 Yao Qi <yao@codesourcery.com>
1485 Pedro Alves <palves@redhat.com>
1487 * linux-low.c (enum stopping_threads_kind): New.
1488 (stopping_threads): Change type to `enum stopping_threads_kind'.
1489 (handle_extended_wait): If stopping and suspending threads, leave
1490 the new_lwp suspended too.
1491 (linux_wait_for_event): Adjust.
1492 (stop_all_lwps): Set `stopping_threads' to
1493 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1494 whether we're suspending threads or just stopping them. Assert no
1497 2012-04-29 Yao Qi <yao@codesourcery.com>
1499 * server.h: Move some code to ...
1500 * gdbthread.h: ... here. New.
1501 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1502 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1503 (nto-low.o, win32-low.o): Likewise.
1504 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1505 * regcache.c, remote-utils.c, server.c: Likewise.
1506 * target.c, tracepoint.c, win32-low.c: Likewise.
1508 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1510 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1511 (PTRACE_ARG4_TYPE): Likewise.
1512 (PTRACE_XFER_TYPE): Likewise.
1513 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1514 ptrace to PTRACE_ARG3_TYPE.
1515 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1516 (PTRACE_ARG4_TYPE): Likewise.
1517 (PTRACE_XFER_TYPE): Likewise.
1518 (linux_detach_one_lwp): Cast fourth argument of
1519 ptrace to long then PTRACE_ARG4_TYPE.
1520 (regsets_fetch_inferior_registers): Cast third argument of
1521 ptrace to long then PTRACE_ARG3_TYPE.
1522 (regsets_store_inferior_registers): Likewise.
1524 2012-04-20 Pedro Alves <palves@redhat.com>
1526 * configure: Regenerate.
1528 2012-04-19 Pedro Alves <palves@redhat.com>
1530 * Makefile.in (GNULIB_BUILDDIR): New.
1531 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1532 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1533 (all, install-only, uninstall, clean-info, all-lib, clean): No
1534 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1535 (maintainer-clean realclean distclean): Use subdir_do.
1537 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1538 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1539 * acinclude.m4: Include acx_configure_dir.m4.
1540 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1541 calls. Call AC_PROG_RANLIB. Configure gnulib using
1544 (GNULIB_STDINT_H): Adjust.
1545 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1546 * gdbreplay.c: Include build-gnulib/config.h.
1547 * server.h: Likewise.
1548 * aclocal.m4: Regenerate.
1549 * config.in: Regenerate.
1550 * configure: Regenerate.
1552 2012-04-19 Pedro Alves <palves@redhat.com>
1554 * Makefile.in (LIBGNU, INCGNU): Adjust.
1555 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1556 (all, install-only, uninstall, clean-info, all-lib, clean)
1557 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1558 * configure.ac: Adjust AC_OUTPUT output.
1559 * aclocal.m4: Regenerate.
1560 * configure: Regenerate.
1562 2012-04-19 Pedro Alves <palves@redhat.com>
1564 * Makefile.in (generated_files): New.
1565 (server_h): Remove the explicit dependency on config.h, and depend
1566 on $generated_files.
1568 2012-04-19 Pedro Alves <palves@redhat.com>
1570 * Makefile.in (INCGNU): Add -Ignulib.
1572 2012-04-19 Pedro Alves <palves@redhat.com>
1574 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1575 (INCGNU): ... this, and spell out -I here.
1576 (GNULIB_LIB): Rename to ...
1578 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1580 2012-04-19 Pedro Alves <palves@redhat.com>
1582 * config.in: Regenerate.
1584 2012-04-19 Pedro Alves <palves@redhat.com>
1586 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1587 * server.h (memmem): Remove declaration.
1588 * config.in: Regenerate.
1589 * configure: Regenerate.
1591 2012-04-19 Yao Qi <yao@codesourcery.com>
1593 * Makefile.in (SFILES): Add common/vec.c.
1597 2012-04-19 Yao Qi <yao@codesourcery.com>
1599 * remote-utils.c (prepare_resume_reply): Replace with macro
1600 target_core_of_thread.
1601 * server.c (handle_qxfer_threads_proper): Likewise.
1602 * target.h (traget_core_of_thread): New macro.
1604 2012-04-18 Pedro Alves <palves@redhat.com>
1606 * aclocal.m4: Regenerate.
1607 * configure: Regenerate.
1609 2012-04-16 Yao Qi <yao@codesourcery.com>
1611 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1612 duplicated on address.
1614 2012-04-16 Yao Qi <yao@codesourcery.com>
1616 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1617 (struct tracepoint_action_ops) <send>: New field.
1618 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1619 (agent_expr_send, x_tracepoint_action_send): New.
1620 (l_tracepoint_action_send): New.
1621 (cmd_qtdp): Download and install tracepoint
1622 according to `use_agent'.
1623 (run_inferior_command): Add one more parameter `len'.
1625 (tracepoint_send_agent): New.
1626 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1628 2012-04-16 Yao Qi <yao@codesourcery.com>
1630 * tracepoint.c (download_tracepoints): Moved to ...
1631 (cmd_qtstart): ... here.
1633 2012-04-14 Yao Qi <yao@codesourcery.com>
1635 * tracepoint.c: Include inttypes.h.
1636 (struct collect_memory_action): Use sized types.
1637 (struct tracepoint): Likewise.
1638 (cmd_qtdp, stop_tracing): Update print specifiers.
1639 (cmd_qtp, response_tracepoint): Likewise.
1640 (collect_data_at_tracepoint): Likewise.
1641 (collect_data_at_step): Likewise.
1643 2012-04-14 Yao Qi <yao@codesourcery.com>
1645 Import gnulib module inttypes.
1646 * aclocal.m4, config.in, configure: Regenerated.
1648 2012-04-14 Yao Qi <yao@codesourcery.com>
1650 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1651 Makefile and config.status at last.
1653 2012-04-13 Yao Qi <yao@codesourcery.com>
1655 * tracepoint.c: Include stdint.h unconditionally.
1657 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1659 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1660 on BFD_HAVE_SYS_PROCFS_TYPE.
1661 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1662 * configure: Regenerate.
1663 * config.in: Likewise.
1665 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1667 * Makefile.in (clean): Also remove x32.c x32-linux.c
1668 x32-avx.c x32-avx-linux.c.
1669 (x32.o): New target.
1671 (x32-linux.o): Likewise.
1672 (x32-linux.c): Likewise.
1673 (x32-avx.o): Likewise.
1674 (x32-avx.c): Likewise.
1675 (x32-avx-linux.o): Likewise.
1676 (x32-avx-linux.c): Likewise.
1678 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1679 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1680 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1681 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1682 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1683 i386/x32-avx-linux.xml.
1685 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1686 (init_registers_x32_avx_linux): Likwise.
1687 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1688 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1690 2012-04-13 Pedro Alves <palves@redhat.com>
1692 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1693 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1694 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1695 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1698 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1700 * linux-x86-low.c (compat_x32_clock_t): New.
1701 (compat_x32_siginfo_t): Likewise.
1702 (compat_x32_siginfo_from_siginfo): Likewise.
1703 (siginfo_from_compat_x32_siginfo): Likewise.
1704 (linux_is_elf64): Likewise.
1705 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1706 and siginfo_from_compat_x32_siginfo for x32.
1707 (x86_arch_setup): Set linux_is_elf64.
1709 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1712 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1714 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1715 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1716 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1717 compatible with process.
1719 2012-04-12 Yao Qi <yao@codesourcery.com>
1721 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1722 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1723 (install-only, install-info, clean): Handle sub dir gnulib.
1724 (all-lib, am--refresh): New targets.
1725 (memmem.o): Remove target.
1726 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1727 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1728 (AC_REPLACE_FUNCS): Remove memmem.
1729 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1730 (AC_OUTPUT): Generate Makefile in gnulib/.
1731 * aclocal.m4, config.in, configure: Regenerated.
1733 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1735 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1737 2012-04-05 Pedro Alves <palves@redhat.com>
1739 -Werror=strict-aliasing
1741 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1744 2012-04-04 Pedro Alves <palves@redhat.com>
1746 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1747 (sparc_store_gregset_from_stack, sparc_store_gregset)
1748 (sparc_breakpoint_at): Fix formatting.
1750 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1752 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1754 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1755 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1756 * config.in: Regenerate.
1757 * configure: Likewise.
1759 2012-03-29 Pedro Alves <palves@redhat.com>
1761 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1762 Correct ptrace arguments.
1764 2012-03-28 Pedro Alves <palves@redhat.com>
1766 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1767 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1768 (IA64_FR1_REGNUM): New defines.
1769 (ia64_fetch_register): New.
1770 (the_low_target): Install it.
1771 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1773 * linux-low.c (linux_fetch_registers): Try the
1774 the_low_target.fetch_register hook first.
1776 * linux-arm-low.c (the_low_target): Adjust.
1777 * linux-bfin-low.c (the_low_target): Adjust.
1778 * linux-cris-low.c (the_low_target): Adjust.
1779 * linux-crisv32-low.c (the_low_target): Adjust.
1780 * linux-m32r-low.c (the_low_target): Adjust.
1781 * linux-m68k-low.c (the_low_target): Adjust.
1782 * linux-mips-low.c (the_low_target): Adjust.
1783 * linux-ppc-low.c (the_low_target): Adjust.
1784 * linux-s390-low.c (the_low_target): Adjust.
1785 * linux-sh-low.c (the_low_target): Adjust.
1786 * linux-sparc-low.c (the_low_target): Adjust.
1787 * linux-tic6x-low.c (the_low_target): Adjust.
1788 * linux-x86-low.c (the_low_target): Adjust.
1789 * linux-xtensa-low.c (the_low_target): Adjust.
1791 2012-03-26 Pedro Alves <palves@redhat.com>
1793 * server.c (handle_qxfer_libraries): Don't bail early if
1794 the_target->qxfer_libraries_svr4 is not NULL.
1796 2012-03-26 Pedro Alves <palves@redhat.com>
1798 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1800 2012-03-23 Pedro Alves <palves@redhat.com>
1802 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1803 "library-list-svr4" element's start tag when the the DSO list is
1806 2012-03-23 Pedro Alves <palves@redhat.com>
1808 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1809 a variable whose type size is the same as the inferior's pointer
1812 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1814 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1816 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1817 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1818 * linux-low.h: Include <signal.h>.
1819 (struct siginfo): Remove forward declaration.
1820 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1823 2012-03-21 Mike Frysinger <vapier@gentoo.org>
1825 * .gitignore: Ignore more files.
1827 2012-03-19 Pedro Alves <palves@redhat.com>
1828 Jan Kratochvil <jan.kratochvil@redhat.com>
1830 * server.c (cont_thread, general_thread): Add describing comments.
1831 (start_inferior): Clear `cont_thread'.
1832 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1835 2012-03-15 Yao Qi <yao@codesourcery.com>
1837 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1839 (cmd_qtdp): ... here.
1841 2012-03-15 Yao Qi <yao@codesourcery.com>
1843 * tracepoint.c (struct tracepoint_action_ops): New.
1844 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1845 (m_tracepoint_action_download): New.
1846 (r_tracepoint_action_download): New.
1847 (x_tracepoint_action_download): New.
1848 (l_tracepoint_action_download): New.
1849 (add_tracepoint_action): Install `action->ops' according type.
1850 (download_tracepoint_1): Move code `download' function pointer
1851 of various tracepoint_action_ops.
1853 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1855 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1856 linux_ptrace_attach_warnings.
1858 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1860 * Makefile.in (linux-ptrace.o): New.
1861 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1862 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1863 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1864 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1865 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1867 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1869 2012-03-08 Yao Qi <yao@codesourcery.com>
1870 Pedro Alves <palves@redhat.com>
1872 Fix PR server/13392.
1873 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1875 * tracepoint.c (remove_tracepoint): New.
1876 (cmd_qtdp): Call remove_tracepoint when failed to install.
1878 2012-03-07 Pedro Alves <palves@redhat.com>
1880 * linux-low.c (get_detach_signal): New.
1881 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1882 Pass on pending signals to PTRACE_DETACH. Check the result of the
1884 * server.c (program_signals, program_signals_p): New.
1885 (handle_general_set): Handle QProgramSignals.
1886 * server.h (program_signals, program_signals_p): Declare.
1888 2012-03-05 Pedro Alves <palves@redhat.com>
1889 Jan Kratochvil <jan.kratochvil@redhat.com>
1891 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1894 2012-03-03 Yao Qi <yao@codesourcery.com>
1896 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1897 agent_look_up_symbols.
1899 2012-03-03 Yao Qi <yao@codesourcery.com>
1901 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1902 (linux-x86-low.o): Likewise.
1903 * server.h: Remove in_process_agent_loaded.
1904 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1908 2012-03-03 Yao Qi <yao@codesourcery.com>
1910 * tracepoint.c (gdb_agent_capability): New global.
1911 (in_process_agent_loaded_ust): Renamed to
1912 `in_process_agent_supports_ust'.
1914 (in_process_agent_supports_ust): Call agent_capability_check.
1915 (clear_installed_tracepoints): Assert that agent supports
1918 2012-03-03 Yao Qi <yao@codesourcery.com>
1920 * linux-low.c (linux_supports_agent): New.
1921 (linux_target_ops): Initialize field `supports_agent' with
1922 linux_supports_agent.
1923 * target.h (struct target_ops) <supports_agent>: New.
1924 (target_supports_agent): New macro.
1925 * server.c (handle_general_set): Handle packet 'QAgent'.
1926 (handle_query): Send `QAgent+'.
1927 * Makefile.in (server.o): Depends on agent.h.
1929 2012-03-03 Yao Qi <yao@codesourcery.com>
1931 * Makefile.in (OBS): Add agent.o.
1932 Add new rule for agent.o.
1933 Track dependence of tracepoint.c on agent.h.
1934 * tracepoint.c (run_inferior_command_1):
1935 (run_inferior_command): Call agent_run_command.
1936 (gdb_ust_connect_sync_socket): Deleted. Move it to
1938 (resume_thread, stop_thread): Likewise.
1939 (gdb_ust_socket_init): Renamed to ...
1940 (gdb_agent_socket_init): ... New.
1941 (gdb_ust_thread): Renamed to ...
1942 (gdb_agent_helper_thread): ... New.
1943 (gdb_ust_init): Move some code to ...
1944 (gdb_agent_init): ... here. New.
1945 [HAVE_UST]: Call gdb_ust_init.
1946 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1947 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1948 * config.in, configure: Regenerated.
1950 2012-03-02 Pedro Alves <palves@redhat.com>
1952 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1953 * linux-low.c (struct simple_pid_list): New.
1954 (stopped_pids): New a struct simple_pid_list pointer.
1955 (add_to_pid_list, pull_pid_from_list): New.
1956 (handle_extended_wait): Don't assume the first signal new children
1957 report is SIGSTOP. Adjust call to pull_pid_from_list.
1958 (linux_wait_for_lwp): Adjust.
1960 2012-03-02 Yao Qi <yao@codesourcery.com>
1962 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1965 2012-03-02 Yao Qi <yao@codesourcery.com>
1967 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1968 `stop_pc' and `tpoint'. Update caller.
1970 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1972 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1973 * linux-low.c (use_linux_regsets): New macro.
1974 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1975 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1976 (linux_register_in_regsets): New function.
1977 (usr_fetch_inferior_registers): Skip registers covered by
1979 (usr_store_inferior_registers): Likewise.
1980 (usr_fetch_inferior_registers): New macro.
1981 (usr_store_inferior_registers): Likewise.
1982 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1983 (linux_store_registers): Likewise.
1984 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1986 (init_registers_mips64_dsp_linux): Likewise.
1987 (init_registers_mips_linux): New macro.
1988 (init_registers_mips_dsp_linux): Likewise.
1989 (mips_dsp_num_regs): Likewise.
1990 (DSP_BASE, DSP_CONTROL): New fallback macros.
1991 (mips_base_regs): New macro.
1992 (mips_regmap): Use it. Fix the size.
1993 (mips_dsp_regmap): New variable.
1994 (mips_dsp_regset_bitmap): Likewise.
1995 (mips_arch_setup): New function.
1996 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1998 (mips_cannot_store_register): Likewise.
1999 (the_low_target): Update .arch_setup, .num_regs and .regmap
2000 initializers. Add .regset_bitmap initializer.
2001 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2003 * linux-bfin-low.c (the_low_target): Likewise.
2004 * linux-cris-low.c (the_low_target): Likewise.
2005 * linux-crisv32-low.c (the_low_target): Likewise.
2006 * linux-ia64-low.c (the_low_target): Likewise.
2007 * linux-m32r-low.c (the_low_target): Likewise.
2008 * linux-m68k-low.c (the_low_target): Likewise.
2009 * linux-ppc-low.c (the_low_target): Likewise.
2010 * linux-s390-low.c (the_low_target): Likewise.
2011 * linux-sh-low.c (the_low_target): Likewise.
2012 * linux-sparc-low.c (the_low_target): Likewise.
2013 * linux-tic6x-low.c (the_low_target): Likewise.
2014 * linux-x86-low.c (the_low_target): Likewise.
2015 * linux-xtensa-low.c (the_low_target): Likewise.
2016 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2017 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2018 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2020 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2021 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2023 2012-02-29 Yao Qi <yao@codesourcery.com>
2024 Pedro Alves <palves@redhat.com>
2026 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2027 `step_over_finished' is true.
2029 2012-02-27 Pedro Alves <palves@redhat.com>
2031 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2032 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2034 2012-02-27 Pedro Alves <palves@redhat.com>
2037 * linux-low.c (pid_is_stopped): New.
2038 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2040 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2042 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2045 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2047 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2049 2012-02-24 Luis Machado <lgustavo@codesourcery>
2051 * server.c (handle_query): Advertise support for target-side
2052 breakpoint condition evaluation.
2053 (process_point_options): New function.
2054 (process_serial_event): When inserting a breakpoint, check for
2055 a target-side condition that should be evaluated.
2057 * mem-break.c: Include regcache.h and ax.h.
2058 (point_cond_list_t): New data structure.
2059 (breakpoint) <cond_list>: New field.
2060 (find_gdb_breakpoint_at): Make non-static.
2061 (delete_gdb_breakpoint_at): Clear any target-side
2063 (clear_gdb_breakpoint_conditions): New function.
2064 (add_condition_to_breakpoint): Likewise.
2065 (add_breakpoint_condition): Likewise.
2066 (gdb_condition_true_at_breakpoint): Likewise.
2067 (gdb_breakpoint_here): Return result directly instead
2068 of going through a local variable.
2070 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2071 (clear_gdb_breakpoint_conditions): Likewise.
2072 (add_breakpoint_condition): Likewise.
2073 (gdb_condition_true_at_breakpoint): Likewise.
2075 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2076 (need_step_over_p): Take target-side breakpoint condition into
2079 2012-02-24 Luis Machado <lgustavo@codesourcery>
2081 * server.h: Include tracepoint.h.
2082 (agent_mem_read, agent_get_trace_state_variable_value,
2083 agent_set_trace_state_variable_value,
2084 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2085 get_set_tsv_func_addr): New prototypes.
2087 * ax.h: New include file.
2088 * ax.c: New source file.
2090 * tracepoint.c: Include ax.h.
2091 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2092 agent_expr, eval_result_type): Move to ax.h.
2093 (parse_agent_expr): Rename to ...
2094 (gdb_parse_agent_expr): ... this, make it non-static and move
2096 (unparse_agent_expr) Rename to ...
2097 (gdb_unparse_agent_expr): ... this, make it non-static and move
2099 (eval_agent_expr): Rename to ...
2100 (eval_tracepoint_agent_expr): ... this.
2101 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2102 forward declarations.
2103 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2104 (agent_get_trace_state_variable_value): New function.
2105 (agent_set_trace_state_variable_value): New function.
2106 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2107 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2108 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2109 (condition_true_at_tracepoint): Likewise.
2110 (parse_agent_expr): Rename to ...
2111 (gdb_parse_agent_expr): ... this and move to ax.c.
2112 (unparse_agent_expr): Rename to ...
2113 (gdb_unparse_agent_expr): ... this and move to ax.c.
2114 (gdb_agent_op_name): Move to ax.c.
2115 (eval_agent_expr): Rename to ...
2116 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2118 (eval_tracepoint_agent_expr): New function.
2119 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2121 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2123 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2124 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2125 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2126 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2127 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2128 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2129 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2130 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2131 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2132 (compile_bytecodes): Remove forward declaration.
2133 (is_goto_target): Move to ax.c.
2134 (compile_bytecodes): Move to ax.c and call
2135 agent_get_trace_state_variable_value (...) and
2136 agent_set_trace_state_variable_value (...).
2138 * Makefile.in: Update ax.c and IPA dependencies.
2140 2012-02-24 Pedro Alves <palves@redhat.com>
2142 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2143 (cmd_bigqtbuffer_circular): ... this. Only handle
2144 'QTBuffer:circular:'.
2145 (handle_tracepoint_general_set): Adjust.
2147 2012-02-16 Yao Qi <yao@codesourcery.com>
2149 * inferiors.c: Move code to ...
2150 * dll.c: .... here. New.
2151 * server.h: Declare clear_dlls.
2152 * Makefile.in (SFILES): Add dll.c.
2156 2012-02-11 Yao Qi <yao@codesourcery.com>
2158 * server.c: (handle_monitor_command): Add a new parameter
2160 (handle_query): Update caller.
2162 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2164 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2165 * configure, config.in: Regenerate.
2166 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2169 2012-02-02 Pedro Alves <palves@redhat.com>
2171 Try SIGKILL first, then PTRACE_KILL.
2172 * linux-low.c (linux_kill_one_lwp): New.
2173 (linux_kill_one_lwp): Rename to ...
2174 (kill_one_lwp_callback): ... this. Use the new
2177 2012-02-02 Pedro Alves <palves@redhat.com>
2179 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2182 2012-01-27 Pedro Alves <palves@redhat.com>
2184 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2185 (elf_64_file_p): Make static.
2186 (linux_pid_exe_is_elf_64_file): New.
2187 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2188 Delete declarations.
2189 (linux_pid_exe_is_elf_64_file): Declare.
2190 * linux-x86-low.c (x86_arch_setup): Use
2191 linux_pid_exe_is_elf_64_file.
2193 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2195 * linux-low.c (linux_wait_for_event_1): Rename to ...
2196 (linux_wait_for_event): ... here and merge it with former
2197 linux_wait_for_event - new variable wait_ptid, use it.
2198 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2200 2012-01-23 Pedro Alves <palves@redhat.com>
2202 * server.c (main): Avoid yet another case of infinite loop while
2203 detaching/killing after a longjmp.
2205 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2208 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2210 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2212 * hostio.c (handle_readlink): New function.
2213 (handle_vFile): Call it to handle "vFile:readlink" packets.
2215 2012-01-20 Pedro Alves <palves@redhat.com>
2216 Ulrich Weigand <ulrich.weigand@linaro.org>
2218 * server.c (handle_v_requests): Only support vAttach and vRun to
2219 start multiple processes when in extended protocol mode.
2221 2012-01-17 Pedro Alves <palves@redhat.com>
2223 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2224 memalign plus mprotect to allocate the scratch buffer.
2226 2012-01-13 Pedro Alves <palves@redhat.com>
2228 * server.c (attach_inferior): Clear `cont_thread'.
2230 2012-01-13 Pedro Alves <palves@redhat.com>
2232 * server.c (main): Avoid infinite loop while detaching/killing
2235 2012-01-09 Doug Evans <dje@google.com>
2237 * server.c (start_inferior): Set last_ptid in --wrapper case.
2239 2012-01-06 Yao Qi <yao@codesourcery.com>
2241 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2243 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2245 2012-01-04 Yao Qi <yao@codesourcery.com>
2247 * tracepoint.c (cmd_qtdp): Print debug message
2248 for static tracepoint.
2250 2012-01-04 Yao Qi <yao@codesourcery.com>
2252 * tracepoint.c (trace_vdebug): Differentiate debug message
2253 between gdbserver and IPA.
2255 2012-01-03 Yao Qi <yao@codesourcery.com>
2257 * tracepoint.c (tracepoint_was_hit): Don't collect for
2260 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2262 * terminal.h: Reformat copyright header.
2264 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2266 * server.c (gdbserver_version): Update copyright year.
2267 * gdbreplay.c (gdbreplay_version): Likewise.
2269 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2271 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2274 2011-12-18 Hui Zhu <teawater@gmail.com>
2275 * linux-low.c (linux_create_inferior): Save return value to ret.
2277 2011-12-18 Hui Zhu <teawater@gmail.com>
2279 * linux-low.c (linux_create_inferior): Save return value to ret.
2281 2011-12-16 Doug Evans <dje@google.com>
2283 * linux-low.c (linux_create_inferior): If stdio connection,
2284 redirect stdin from /dev/null, stdout to stderr.
2285 * remote-utils.c (remote_is_stdio): New static global.
2286 (remote_connection_is_stdio): New function.
2287 (remote_prepare): Handle stdio connection.
2288 (remote_open): Ditto.
2289 (remote_close): Don't close stdin for stdio connections.
2290 (read_prim,write_prim): New functions. Replace all calls to
2291 read/write to these.
2292 * server.c (main): Watch for "-" argument. Move call to
2293 remote_prepare before start_inferior.
2294 * server.h (STDIO_CONNECTION_NAME): New macro.
2295 (remote_connection_is_stdio): Declare.
2297 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2298 in debugging output.
2300 2011-12-15 Yao Qi <yao@codesourcery.com>
2302 * tracepoint.c: Include sys/syscall.h.
2303 (gdb_ust_thread): Remove preprocessor conditional.
2305 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2307 * linux-low.c (linux_detach_one_lwp): Call
2308 the_low_target.prepare_to_resume before detaching.
2310 2011-12-14 Yao Qi <yao@codesourcery.com>
2312 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2315 2011-12-14 Yao Qi <yao@codesourcery.com>
2317 * i386-low.c (i386_low_stopped_data_address): Initialize local
2320 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2324 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2325 DR_CONTROL unless necessary. Extend comments.
2326 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2327 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2329 2011-12-13 Yao Qi <yao@codesourcery.com>
2331 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2333 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2335 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2337 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2338 Print new debug message for such case.
2340 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2342 Fix overlapping memcpy.
2343 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2344 the read_inferior_memory transfer.
2345 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2346 write_inferior_memory transfer.
2347 (set_fast_tracepoint_jump): New variable buf. Use it for the
2348 read_inferior_memory and write_inferior_memory transfers.
2349 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2350 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2351 Use it for the write_inferior_memory transfer.
2352 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2355 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2357 * linux-low.c (fetch_register, store_register): Make code
2358 consistent, fix formatting.
2360 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2362 * linux-low.c (usr_store_inferior_registers): Factor out code
2363 to handle individual registers into...
2364 (store_register): ... this new function.
2366 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2368 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2369 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2370 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2371 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2372 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2373 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2374 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2375 (srv_xmlfiles): Add new XML files.
2377 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2379 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2380 (init_registers_s390_linux32v1): Add prototype.
2381 (init_registers_s390_linux32v2): Likewise.
2382 (init_registers_s390_linux64v1): Likewise.
2383 (init_registers_s390_linux64v2): Likewise.
2384 (init_registers_s390x_linux64v1): Likewise.
2385 (init_registers_s390x_linux64v2): Likewise.
2386 (s390_num_regs): Increment to 52.
2387 (s390_regmap): Add orig_r2 register.
2388 (s390_num_regs_3264): Increment to 68.
2389 (s390_regmap_3264): Add orig_r2 register.
2390 (s390_collect_ptrace_register): Handle orig_r2 register.
2391 (s390_supply_ptrace_register): Likewise.
2392 (s390_fill_last_break): New function.
2393 (s390_store_last_break): Likewise.
2394 (s390_fill_system_call): New function.
2395 (s390_store_system_call): Likewise.
2396 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2398 (s390_check_regset): New function.
2399 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2400 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2401 Update target_regsets for available register sets.
2403 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2404 Jan Kratochvil <jan.kratochvil@redhat.com>
2406 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2407 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2409 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2410 * linux-low.h (struct process_info_private): New member r_debug.
2411 * server.c (handle_qxfer_libraries): Call
2412 the_target->qxfer_libraries_svr4.
2413 (handle_qxfer_libraries_svr4): New function.
2414 (qxfer_packets): New entry "libraries-svr4".
2415 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2416 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2417 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2418 PACKET_qXfer_libraries_svr4.
2420 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2422 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2423 PSW address/mask between 8-byte and 16-byte formats.
2424 (s390_supply_ptrace_register): Likewise.
2425 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2426 basic addressing mode bit.
2428 2011-11-24 Stan Shebs <stan@codesourcery.com>
2430 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2432 2011-11-17 Stan Shebs <stan@codesourcery.com>
2434 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2435 (tracing_start_time): New global.
2436 (tracing_stop_time): New global.
2437 (tracing_user_name): New global.
2438 (tracing_notes): New global.
2439 (tracing_stop_note): New global.
2440 (cmd_qtstart): Set traceframe_usage, start_time.
2441 (stop_tracing): Set stop_time.
2442 (cmd_qtstatus): Report additional status.
2443 (cmd_qtp): New function.
2444 (handle_tracepoint_query): Call it.
2445 (cmd_qtnotes): New function.
2446 (handle_tracepoint_general_set): Call it.
2447 (get_timestamp): Rename from tsv_get_timestamp.
2449 2011-11-14 Stan Shebs <stan@codesourcery.com>
2450 Kwok Cheung Yeung <kcy@codesourcery.com>
2452 * linux-x86-low.c (small_jump_insn): New.
2453 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2454 trampoline and error message, build a trampoline and issue a small
2455 jump instruction to it.
2456 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2457 trampoline and error message.
2458 (x86_get_min_fast_tracepoint_insn_len): New.
2459 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2460 * linux-low.h (struct linux_target_ops): Add arguments to
2461 install_fast_tracepoint_jump_pad operation, add new operation.
2462 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2464 (linux_get_min_fast_tracepoint_insn_len): New function.
2465 (linux_target_op): Add new operation.
2466 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2467 (gdb_trampoline_buffer_end): Ditto.
2468 (gdb_trampoline_buffer_error): Ditto.
2469 (struct ipa_sym_addresses): Add fields for new IPA variables.
2470 (symbol_list): Add entries for new IPA variables.
2471 (struct tracepoint): Add fields to hold the address range of the
2472 trampoline used by the tracepoint.
2473 (trampoline_buffer_head): New static variable.
2474 (trampoline_buffer_tail): Ditto.
2475 (claim_trampoline_space): New function.
2476 (have_fast_tracepoint_trampoline_buffer): New function.
2477 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2479 (install_fast_tracepoint): Ditto, also add error buffer argument.
2480 (cmd_qtminftpilen): New function.
2481 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2482 (fast_tracepoint_from_trampoline_address): New function.
2483 (fast_tracepoint_collecting): Handle trampoline as part of jump
2485 (set_trampoline_buffer_space): New function.
2486 (initialize_tracepoint): Initialize new IPA variables.
2487 * target.h (struct target_ops): Add arguments to
2488 install_fast_tracepoint_jump_pad operation, add new
2489 get_min_fast_tracepoint_insn_len operation.
2490 (target_get_min_fast_tracepoint_insn_len): New.
2491 (install_fast_tracepoint_jump_pad): Add arguments.
2492 * server.h (IPA_BUFSIZ): Define.
2493 * linux-i386-ipa.c: Include extra header files.
2494 (initialize_fast_tracepoint_trampoline_buffer): New function.
2495 (initialize_low_tracepoint): Call it.
2496 * server.h (set_trampoline_buffer_space): Declare.
2497 (claim_trampoline_space): Ditto.
2498 (have_fast_tracepoint_trampoline_buffer): Ditto.
2500 2011-11-14 Yao Qi <yao@codesourcery.com>
2502 * server.c (handle_query): Handle InstallInTrace for qSupported.
2503 * tracepoint.c (add_tracepoint): Sort list.
2504 (install_tracepoint, download_tracepoint): New.
2505 (cmd_qtdp): Call them to install and download tracepoints.
2506 (sort_tracepoints): Removed.
2507 (cmd_qtstart): Update.
2509 2011-11-14 Yao Qi <yao@codesourcery.com>
2511 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2512 * mem-break.h: Declare.
2513 * tracepoint.c (cmd_qtstart): Move some code to ...
2514 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2516 (download_tracepoints): Move some code to ...
2517 (download_tracepoint_1): ... here. New.
2519 2011-11-08 Yao Qi <yao@codesourcery.com>
2521 * remote-utils.c (relocate_instruction): A comment fix.
2523 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2525 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2526 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2527 dr_status_mirror and dr_control_mirror from debug_reg_state.
2528 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2529 (i386_initial_stuff): Remove use of deleted globals.
2530 (i386_get_thread_context, i386_set_thread_context,
2531 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2532 from debug_reg_state.
2534 2011-11-05 Yao Qi <yao@codesourcery.com>
2536 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2537 address as TPOINT's.
2539 2011-11-02 Stan Shebs <stan@codesourcery.com>
2541 * tracepoint.c (agent_mem_read_string): New function.
2542 (eval_agent_expr): Call it for tracenz.
2543 * server.c (handle_query): Report support for tracenz.
2545 2011-11-02 Yao Qi <yao@codesourcery.com>
2547 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2549 2011-11-02 Yao Qi <yao@codesourcery.com>
2551 * target.h: Fix a typo in comment.
2553 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2555 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2556 clobber the breakpoints' shadows with fast tracepoint jumps.
2557 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2558 * target.c (write_inferior_memory): Also pass MYADDR down to
2561 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2563 * configure.ac: Check support for personality routine.
2564 * configure: Regenerate.
2565 * config.in: Likewise.
2566 * linux-low.c: Include <sys/personality.h>.
2567 Define ADDR_NO_RANDOMIZE if necessary.
2568 (linux_create_inferior): Disable address space randomization when
2569 forking inferior, if requested.
2570 (linux_supports_disable_randomization): New function.
2571 (linux_target_ops): Install it.
2572 * server.h (disable_randomization): Declare.
2573 * server.c (disable_randomization): New global variable.
2574 (handle_general_set): Handle QDisableRandomization.
2575 (handle_query): Likewise for qSupported.
2576 (main): Support --disable-randomization and --no-disable-randomization
2577 command line arguments.
2578 * target.h (struct target_ops): Add supports_disable_randomization.
2579 (target_supports_disable_randomization): New macro.
2581 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2583 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2585 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2586 [!PT_GETDSBT] (target_loadmap): New definition.
2587 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2588 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2589 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2590 and PT_GETDSBT to LINUX_LOADMAP.
2591 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2592 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2594 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2596 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2597 (arm_linux_hwbp_cap): New static variable.
2598 (arm_linux_get_hwbp_cap): Replace by ...
2599 (arm_linux_init_hwbp_cap): ... this new function.
2600 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2601 (arm_linux_get_hw_watchpoint_count): Likewise.
2602 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2603 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2604 (arm_prepare_to_resume): Use perror_with_name instead of error.
2606 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2608 * linux-arm-low.c: Include <signal.h>.
2609 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2610 (struct arm_linux_hwbp_cap): New data type.
2611 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2612 (struct arm_linux_hw_breakpoint): New data type.
2613 (MAX_BPTS, MAX_WPTS): Define.
2614 (struct arch_process_info, struct arch_lwp_info): New data types.
2615 (arm_linux_get_hwbp_cap): New function.
2616 (arm_linux_get_hw_breakpoint_count): Likewise.
2617 (arm_linux_get_hw_watchpoint_count): Likewise.
2618 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2619 (arm_hwbp_control_initialize): Likewise.
2620 (arm_hwbp_control_is_enabled): Likewise.
2621 (arm_hwbp_control_is_initialized): Likewise.
2622 (arm_hwbp_control_disable): Likewise.
2623 (arm_linux_hw_breakpoint_equal): Likewise.
2624 (arm_linux_hw_point_initialize): Likewise.
2625 (struct update_registers_data): New data structure.
2626 (update_registers_callback: New function.
2627 (arm_insert_point): Likewise.
2628 (arm_remove_point): Likewise.
2629 (arm_stopped_by_watchpoint): Likewise.
2630 (arm_stopped_data_address): Likewise.
2631 (arm_new_process): Likewise.
2632 (arm_new_thread): Likewise.
2633 (arm_prepare_to_resume): Likewise.
2634 (the_low_target): Register arm_insert_point, arm_remove_point,
2635 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2636 arm_new_thread, and arm_prepare_to_resume.
2638 2011-09-15 Stan Shebs <stan@codesourcery.com>
2640 * server.h (struct emit_ops): Add compare-goto fields.
2641 * tracepoint.c (gdb_agent_op_sizes): New table.
2642 (emit_eq_goto): New function.
2643 (emit_ne_goto): New function.
2644 (emit_lt_goto): New function.
2645 (emit_le_goto): New function.
2646 (emit_gt_goto): New function.
2647 (emit_ge_goto): New function.
2648 (is_goto_target): New function.
2649 (compile_bytecodes): Recognize special cases of compare-goto
2650 combinations and call specialized emitters for them.
2651 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2652 (amd64_emit_ne_goto): New function.
2653 (amd64_emit_lt_goto): New function.
2654 (amd64_emit_le_goto): New function.
2655 (amd64_emit_gt_goto): New function.
2656 (amd64_emit_ge_goto): New function.
2657 (amd64_emit_ops): Add the new functions.
2658 (i386_emit_eq_goto): New function.
2659 (i386_emit_ne_goto): New function.
2660 (i386_emit_lt_goto): New function.
2661 (i386_emit_le_goto): New function.
2662 (i386_emit_gt_goto): New function.
2663 (i386_emit_ge_goto): New function.
2664 (i386_emit_ops): Add the new functions.
2666 2011-09-08 Stan Shebs <stan@codesourcery.com>
2668 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2669 (i386_emit_epilogue): Restore %ebx.
2671 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2673 * server.c (step_thread): Remove definition.
2674 (process_serial_event): Don't handle Hs.
2675 * server.h (step_thread): Remove declaration.
2676 * target.c (set_desired_inferior): Remove use of step_thread.
2678 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2680 * linux-low.c: Include linux-procfs.h.
2681 (linux_attach_lwp_1): Update comments.
2682 (linux_attach): Scan for existing threads when attaching to a
2683 process that is the tgid.
2684 * Makefile.in: Update dependencies.
2686 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2688 * configure.srv: Add linux-procfs.o dependencies.
2690 2011-08-14 Yao Qi <yao@codesourcery.com>
2692 * target.h (struct target_ops): Fix indent.
2693 * win32-low.c (win32_target_ops): Fix comment.
2695 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2696 Yao Qi <yao@codesourcery.com>
2698 * Makefile.in (clean): Remove tic6x-*.c files.
2699 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2700 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2701 (tic6x-c64xp-linux.c): Likewise.
2702 * configure.srv: Add support for tic6x-*-uclinux.
2703 * linux-tic6x-low.c: New.
2704 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2706 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2707 Yao Qi <yao@codesourcery.com>
2709 * target.h (struct target_ops): Add read_loadmap.
2710 * linux-low.c (struct target_loadseg): New type.
2711 (struct target_loadmap): New type.
2712 (linux_read_loadmap): New function.
2713 (linux_target_ops): Add linux_read_loadmap.
2714 * server.c (handle_query): Support qXfer:fdpic:read packet.
2715 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2718 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2720 * win32-low.c: Include <stdint.h>.
2722 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2724 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2725 to the inferior here.
2726 (i386_remove_aligned_watchpoint): Ditto.
2727 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2728 fit part of the watchpoint in the debug registers.
2729 (i386_update_inferior_debug_regs): New.
2730 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2731 registers, and only update the inferior on success.
2732 (i386_low_remove_watchpoint): Ditto.
2734 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2736 * linux-low.c (compare_ints, unique, list_threads, show_process,
2737 linux_core_of_thread): Delete.
2738 (linux_target_ops): Change linux_core_of_thread to
2739 linux_common_core_of_thread.
2740 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2741 * utils.c (malloc_failure): Change type of argument.
2742 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2743 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2744 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2745 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2746 (IPA_OBJS): Add common-utils-ipa.o.
2747 (ptid_h, linux_osdata_h): New macros.
2748 (server_h): Add common/common-utils.h, common/xml-utils.h,
2749 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2751 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2752 ptid.o, buffer.o): New rules.
2753 (linux-low.o): Add common/linux-osdata.h as a dependency.
2754 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2755 * configure.ac: Add AC_HEADER_DIRENT check.
2756 * config.in: Regenerate.
2757 * configure: Regenerate.
2758 * remote-utils.c (xml_escape_text): Delete.
2759 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2760 buffer_xml_printf): Move to common/buffer.c.
2761 * server.c (main): Remove call to initialize_inferiors.
2762 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2763 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2764 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2765 internal_error, gdb_assert, gdb_assert_fail): Delete.
2766 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2767 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2769 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2770 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2771 initialize_inferiors): Delete.
2773 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2775 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2778 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2780 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2782 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2784 2011-05-26 Yao Qi <yao@codesourcery.com>
2786 * Makefile.in (thread-db.o): Track dependence to
2787 common/gdb_thread_db.h.
2788 * thread-db.c: include gdb_thread_db.h from right place.
2790 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2792 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2793 __FILE__ and __LINE__ to internal_error.
2795 2011-05-13 Doug Evans <dje@google.com>
2797 * thread-db.c (try_thread_db_load_from_sdir): New function.
2798 (try_thread_db_load_from_dir): New function.
2799 (thread_db_load_search): Handle $sdir, ignore $pdir.
2800 Remove trying of system directories if search of
2801 libthread-db-search-path fails, that is now done via $sdir.
2803 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2805 * server.c (handle_query): Add EnableDisableTracepoints to the list
2806 of supported features.
2807 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2809 (cmd_qtenable_disable): New.
2810 (cmd_qtstart): Install tracepoints even if disabled.
2811 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2812 receiving a QTEnable or QTDisable packet.
2813 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2814 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2816 (gdb_probe): Skip data collection if static tracepoint is disabled.
2818 2011-05-10 Doug Evans <dje@google.com>
2820 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2822 2011-05-04 Doug Evans <dje@google.com>
2824 * linux-low.c (linux_join): Skip process lookup.
2825 * spu-low.c (spu_join): Ditto.
2826 * server.c (join_inferiors_callback): Delete.
2827 (process_serial_event): For 'D' packet (detach) call join_inferior
2830 2011-05-04 Joseph Myers <joseph@codesourcery.com>
2832 * README: Don't mention xscale*-*-linux*.
2833 * configure.srv (xscale*-*-linux*): Don't handle target.
2835 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2837 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2839 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2840 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2841 (i386_emit_void_call_2): Likewise.
2843 2011-04-26 Yao Qi <yao@codesourcery.com>
2845 * linux-low.c: Move common macros to linux-ptrace.h.
2846 Include linux-ptrace.h.
2847 * Makefile.in (linux_ptrace_h): New.
2848 (linux-low.o): Depends on linux-ptrace.h.
2850 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2852 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2853 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2854 (remote_prepare): New function with most of the TCP code from ...
2855 (remote_open): ... here. Detect PORT here unconditionally. Move also
2856 setting transport_is_reliable.
2857 * server.c (run_once): New variable.
2858 (gdbserver_usage): Document it.
2859 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2860 the first run if RUN_ONCE.
2861 * server.h (run_once, remote_prepare): New declarations.
2863 2011-04-19 Tom Tromey <tromey@redhat.com>
2865 * win32-low.c (handle_load_dll): Remove duplicate "the".
2867 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2869 Remove support for old Cygwin 1.5 versions.
2870 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2871 function to avoid warning.
2872 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2875 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2877 * gdbserver/server.h (Macro _): Define it if not available.
2879 2011-03-14 Michael Snyder <msnyder@vmware.com>
2881 * hostio.c (handle_close): Remove unnecessary null test.
2883 2011-03-10 Joel Brobecker <brobecker@adacore.com>
2885 * Makefile.in (maintainer-clean realclean distclean): Remove
2886 "make ... subdir_do" command.
2888 2011-03-10 Michael Snyder <msnyder@vmware.com>
2890 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2892 * server.c (handle_v_run): Free alloced buffer on early return.
2894 2011-03-09 Yao Qi <yao@codesourcery.com>
2897 2011-03-04 Yao Qi <yao@codesourcery.com>
2899 * Makefile.in: Remove GNU make feature --directory.
2901 2011-03-05 Yao Qi <yao@codesourcery.com>
2903 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2904 (subdir_do): New make target. Copied from gdb/Makefile.
2905 (maintainer-clean, realclean, distclean, clean): Call corresponding
2906 make targets in common/Makefile.
2908 2011-02-11 Yao Qi <yao@codesourcery.com>
2910 * configure.ac: Call AC_PROG_RANLIB.
2911 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2912 * configure: Regenerate.
2914 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2916 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2918 2011-03-06 Yao Qi <yao@codesourcery.com>
2920 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2922 2011-03-05 Yao Qi <yao@codesourcery.com>
2924 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2925 (subdir_do): New make target. Copied from gdb/Makefile.
2926 (maintainer-clean, realclean, distclean, clean): Call corresponding
2927 make targets in common/Makefile.
2929 2011-03-04 Yao Qi <yao@codesourcery.com>
2931 * Makefile.in: Remove GNU make feature --directory.
2933 2011-03-04 Michael Snyder <msnyder@vmware.com>
2935 * server.c (queue_stop_reply): Call xmalloc not malloc.
2937 2011-03-02 Michael Snyder <msnyder@vmware.com>
2939 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2941 2011-02-28 Michael Snyder <msnyder@vmware.com>
2943 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2944 (cmd_qtframe): Ditto.
2945 (cmd_qtbuffer): Ditto.
2946 (cmd_bigqtbuffer): Ditto.
2948 * utils.c (decimal2str): Initialize 'width' to nine, then
2951 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2953 * hostio.c (require_data): Free *data, not data.
2955 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2957 * hostio.c (require_data): Use free, not xfree.
2959 2011-02-27 Michael Snyder <msnyder@vmware.com>
2961 * server.c (handle_query): Discard unused value.
2963 * hostio.c (require_data): Free malloc memory before returning
2966 2011-02-26 Michael Snyder <msnyder@vmware.com>
2968 * linux-low.c (list_threads): Call closedir for dirent.
2970 2011-02-27 Michael Snyder <msnyder@vmware.com>
2972 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2973 a case statement falls through.
2975 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2977 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2980 2011-02-26 Michael Snyder <msnyder@vmware.com>
2982 * utils.c (decimal2str): Eliminate dead code and dead param.
2983 (pulongest): Drop dead param from call to decimal2str.
2986 2011-02-24 Joel Brobecker <brobecker@adacore.com>
2988 Revert the following patch (not approved yet):
2989 2011-02-21 Hui Zhu <teawater@gmail.com>
2990 * tracepoint.c (tp_printf): New function.
2991 (eval_agent_expr): Handle gdb_agent_op_printf.
2993 2011-02-21 Hui Zhu <teawater@gmail.com>
2995 * tracepoint.c (tp_printf): New function.
2996 (eval_agent_expr): Handle gdb_agent_op_printf.
2998 2011-02-18 Tom Tromey <tromey@redhat.com>
3000 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3001 (tracepoint.o): Likewise.
3002 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3003 (gdb_agent_op_names): Likewise.
3005 2011-02-18 Tom Tromey <tromey@redhat.com>
3007 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3008 gdb_agent_op_rot>: New constants.
3009 (gdb_agent_op_names): Add pick and roll.
3010 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3013 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3015 * aclocal.m4: Regenerated with aclocal-1.11.1.
3017 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3019 * server.c (handle_qxfer_traceframe_info): New.
3020 (qxfer_packets): Register "traceframe-info".
3021 (handle_query): Report support for qXfer:traceframe-info:read+.
3022 * tracepoint.c (match_blocktype): New.
3023 (traceframe_find_block_type): Rename to ...
3024 (traceframe_walk_blocks): ... this. Add callback filter argument,
3026 (traceframe_find_block_type): New, reimplemented on top of
3027 traceframe_walk_blocks.
3028 (build_traceframe_info_xml): New.
3029 (traceframe_read_info): New.
3030 * server.h (traceframe_read_info): Declare.
3032 2011-02-11 Yao Qi <yao@codesourcery.com>
3034 * configure.ac: Call AC_PROG_RANLIB.
3035 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3036 * configure: Regenerate.
3038 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3040 * server.c (gdb_read_memory): Change return semantics to allow
3042 (handle_search_memory_1): Adjust.
3043 (process_serial_event) <'m' packet>: Handle partial transfers.
3044 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3046 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3048 * regcache.c (init_register_cache): Initialize
3049 regcache->register_status.
3050 (free_register_cache): Release regcache->register_status.
3051 (regcache_cpy): Copy register_status.
3052 (registers_to_string): Print 'x's for unavailable registers.
3053 (supply_register): Mark the register's status valid or
3054 unavailable, depending on whether a buffer was passed in or not.
3055 (supply_register_zeroed): New.
3056 (supply_regblock): Mark the registers' status valid or
3057 unavailable, depending on whether a buffer was passed in or not.
3058 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3059 (struct regcache): New `register_status' field.
3060 (supply_register_zeroed): Declare.
3061 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3062 supply_register_zeroed, rather than passing a NULL buffer to
3064 * tracepoint.c (fetch_traceframe_registers): Update comment.
3066 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3068 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3071 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3073 * server.h (decode_xfer_write): Change prototype.
3074 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3075 and don't extract the annex here.
3076 * server.c (decode_xfer_read): Remove `annex' parameter,
3077 and don't extract the annex here.
3079 (struct qxfer): New.
3080 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3081 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3082 (handle_qxfer_statictrace): New functions, abstracted out from
3083 handle_query, and made to use the struct qxfer interface.
3084 (handle_threads_qxfer_proper): Rename to ...
3085 (handle_qxfer_threads_proper): ... this.
3086 (handle_threads_qxfer): Rename to ...
3087 (handle_qxfer_threads): ... this. Adjust.
3088 (qxfer_packets): New array.
3089 (handle_qxfer): New function.
3090 (handle_query): Use handle_qxfer.
3092 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3094 * gdbreplay.c: Shorten lines of >= 80 columns.
3095 * linux-low.c: Ditto.
3096 * linux-ppc-low.c: Ditto.
3097 * linux-s390-low.c: Ditto.
3098 * linux-sparc-low.c: Ditto.
3099 * linux-x86-low.c: Ditto.
3100 * linux-xtensa-low.c: Ditto.
3101 * mem-break.c: Ditto.
3103 * regcache.h: Ditto.
3104 * remote-utils.c: Ditto.
3107 * thread-db.c: Ditto.
3108 * tracepoint.c: Ditto.
3110 * win32-low.h: Ditto.
3112 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3114 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3117 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3119 * server.c (gdbserver_version): Update copyright year in version
3121 * gdbreplay.c (gdbreplay_version): Ditto.
3123 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3125 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3126 * linux-bfin-low.c: New file.
3127 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3128 PT_DATA_ADDR for BFIN targets.
3129 * Makefile.in (SFILES): Add linux-bfin-low.c.
3130 (clean): Remove reg-bfin.c.
3131 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3132 * README: Mention supported Blackfin targets.
3134 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3136 * .gitignore: New file.
3138 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3140 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3142 2010-10-22 Jie Zhang <jie@codesourcery.com>
3144 * Makefile.in: Add FLAGS_TO_PASS variable.
3145 (install): Remove dependency of install-only and recursively
3146 invoke make for install-only.
3148 2010-10-04 Doug Evans <dje@google.com>
3150 * Makefile.in (uninstall): Use $(DESTDIR).
3152 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3156 * linux-x86-low.c (compat_siginfo_from_siginfo)
3157 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3158 si_code is < 0. Check for si_code == SI_TIMER before checking for
3161 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3163 * lynx-i386-low.c: New file.
3164 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3166 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3168 * lynx-low.c (ptrace_request_to_str): Remove handling for
3169 request values that have been removed in LynxOS 5.x.
3171 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3173 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3176 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3178 * configure.ac: Add --enable-inprocess-agent option.
3179 * configure: Rebuilt.
3181 2010-09-06 Yao Qi <yao@codesourcery.com>
3183 * linux-low.c (linux_kill): Remove unused variable.
3184 (linux_stabilize_threads): Likewise.
3185 * server.c (start_inferior): Likewise.
3186 (queue_stop_reply_callback): Likewise.
3187 * tracepoint.c (do_action_at_tracepoint): Likewise.
3189 2010-09-06 Yao Qi <yao@codesourcery.com>
3191 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3194 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3196 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3198 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3200 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3203 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3205 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3206 gdbserver/lynx-ppc-low.c: New files.
3207 * Makefile.in (lynx_low_h): New variable.
3208 (lynx-low.o, lynx-ppc-low.o): New rules.
3209 * configure.ac: On LynxOS, link with -lnetinet.
3210 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3211 * configure: regenerate.
3213 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3215 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3216 * configure.ac: Add check for vasprintf and vsnprintf.
3217 * configure, config.in: Regenerate.
3218 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3220 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3222 * gdbreplay.c: Move include of alloca.h up, next to include of
3224 * server.h: Add include of malloc.h.
3225 * mem-break.c: Remove include of malloc.h.
3226 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3228 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3230 * Makefile.in (memmem.o): Build with -Wno-error.
3232 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3234 * utils.c (xsnprintf): Make non-static.
3235 * server.h: Add xsnprintf declaration.
3236 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3237 replace calls to snprintf by calls to xsnprintf throughout.
3239 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3241 * configure.ac: Add configure check for alloca.
3242 * configure, config.in: Regenerate.
3243 * server.h: Include alloca.h if it exists.
3244 * gdbreplay.c: Include alloca.h if it exists.
3246 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3248 * linux-low.c (__SIGRTMIN): Define if not already defined.
3249 (linux_create_inferior): Check for __ANDROID__ rather than
3251 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3252 are already deferred.
3253 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3254 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3255 stopped and already has a pending signal to report.
3256 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3257 a pending signal to report or is moving out of a jump pad.
3258 (linux_init_signals): Check for __ANDROID__ rather than
3261 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3263 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3264 debug_threads check. Avoid a linear search when not doing debug
3267 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3269 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3270 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3271 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3272 (process_event): Change local fd's type to gdb_fildes_t.
3273 (create_file_handler): Adjust prototype.
3274 (delete_file_handler): Adjust prototype.
3275 (handle_file_event): Adjust prototype. Use pfildes.
3276 (create_file_event): Adjsut prototype.
3277 * remote-utils.c (remote_desc, listen_desc): Change type to
3279 * server.h: New gdb_fildes_t typedef.
3280 [USE_WIN32API]: Include winsock2.h.
3281 (delete_file_handler, add_file_handler): Adjust prototypes.
3283 * utils.c (pfildes): New.
3285 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3287 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3288 * configure: Regenerate.
3290 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3292 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3293 (linux_done_accessing_memory): ... this.
3294 (linux_target_ops): Adjust.
3295 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3296 * nto-low.c (nto_target_ops): Adjust comment.
3297 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3298 * spu-low.c (spu_target_ops): Adjust comment.
3299 * target.h (target_ops): Rename unprepare_to_access_memory field
3300 to done_accessing_memory.
3301 (unprepare_to_access_memory): Rename to ...
3302 (done_accessing_memory): ... this.
3304 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3306 * linux-low.c (linux_prepare_to_access_memory): New.
3307 (linux_unprepare_to_access_memory): New.
3308 (linux_target_ops): Install them.
3309 * server.c (read_memory): Rename to ...
3310 (gdb_read_memory): ... this. Use
3311 prepare_to_access_memory/prepare_to_access_memory.
3312 (write_memory): Rename to ...
3313 (gdb_write_memory): ... this. Use
3314 prepare_to_access_memory/prepare_to_access_memory.
3315 (handle_search_memory_1): Adjust.
3316 (process_serial_event): Adjust.
3317 * target.h (struct target_ops): New fields
3318 prepare_to_access_memory and unprepare_to_access_memory.
3319 (prepare_to_access_memory, unprepare_to_access_memory): New.
3320 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3321 prepare_to_access_memory/prepare_to_access_memory.
3322 * nto-low.c (nto_target_ops): Adjust.
3323 * spu-low.c (spu_target_ops): Adjust.
3324 * win32-low.c (win32_target_ops): Adjust.
3326 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3328 * Makefile.in (WARN_CFLAGS): Get it from configure.
3329 (WERROR_CFLAGS): New.
3330 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3331 * configure.ac: Introduce --enable-werror, which adds -Werror to
3332 the compiler command line. Enabled by default. Disable with
3333 --disable-werror. Add -Wdeclaration-after-statement
3334 Wpointer-arith and -Wformat-nonliteral to warning flags.
3335 * configure: Regenerate.
3337 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3339 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3341 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3343 * gdbreplay.c (remote_error): New.
3345 (expect): Use gdbchar. Check for error reading from GDB.
3346 Clarify sync error output.
3347 (play): Check for errors writing to GDB.
3348 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3349 * remote-utils.c (getpkt): Check for errors writing to the remote
3352 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3354 * linux-low.c (linux_wait_1): Move non-debugging code out of
3355 `debug_threads' control.
3357 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3359 * linux-low.c (linux_wait_1): Don't set last_status here.
3360 * server.c (push_event, queue_stop_reply_callback): Assert we're
3361 not pushing a TARGET_WAITKIND_IGNORE event.
3362 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3363 (myresume, handle_target_event): Set the thread's last_resume_kind
3364 and last_status from the target returned status.
3366 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3370 * linux-x86-low.c (update_debug_registers_callback): New.
3371 (i386_dr_low_set_addr): Use it.
3372 (i386_dr_low_get_addr): New.
3373 (i386_dr_low_set_control): Use update_debug_registers_callback.
3374 (i386_dr_low_get_control): New.
3375 (i386_dr_low_get_status): Adjust.
3376 * linux-low.c (linux_stop_lwp): New.
3377 * linux-low.h (linux_stop_lwp): Declare.
3379 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3380 argument instead of a i386_debug_reg_state.
3381 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3382 a i386_debug_reg_state.
3383 (i386_insert_aligned_watchpoint): Adjust.
3384 (i386_remove_aligned_watchpoint): Adjust.
3385 (i386_low_stopped_data_address): Read the debug registers from the
3386 inferior instead of from the mirrors.
3387 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3388 (i386_dr_low_get_addr): Declare.
3389 (i386_dr_low_get_control): Declare.
3390 (i386_dr_low_get_status): Change prototype.
3392 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3393 (i386_dr_low_get_addr): New.
3394 (i386_dr_low_get_control): New.
3395 (i386_dr_low_get_status): Adjust prototype. Return
3397 (i386_initial_stuff): Clear dr_status_mirror and
3399 (i386_get_thread_context): Adjust.
3400 (i386_set_thread_context): Adjust.
3401 (i386_thread_added): Adjust.
3403 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3405 * linux-low.h (linux_thread_area): Delete declaration.
3407 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3409 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3410 after its termination.
3412 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3414 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3415 (gdb_wants_all_stopped): Delete.
3416 (linux_wait_1): Don't call them.
3417 * server.c (handle_v_cont): Tag all threads as want-stopped.
3418 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3419 stopped as "client-wants-stopped".
3421 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3423 * Makefile.in (signals_h): New.
3424 (server_h): Depend on it.
3425 (server.o): Don't depend on $(signals_def).
3426 (signals.o): Depend on $(signals_def).
3428 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3430 * Makefile.in (signals_def): New.
3431 (server_h): Append include/gdb/signals.h and signals_def.
3432 (server.o): Append signals_def.
3434 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3436 * server.c (handle_target_event): Use target_signal_to_host for
3437 resume_info.sig initialization.
3438 * target.h (struct thread_resume) <sig>: New comment.
3440 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3442 * server.c (handle_query): strcpy() the returned string from paddress()
3443 instead of sprintf().
3444 * utils.c (paddress): Return phex_nz().
3446 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3448 * server.c (handle_v_cont): Call mourn_inferior if process
3450 (myresume): Likewise.
3452 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3454 Static tracepoints, and integration with UST.
3456 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3457 * mem-break.c (uninsert_all_breakpoints)
3458 (reinsert_all_breakpoints): New.
3459 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3460 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3461 (gdb_agent_ust_loaded, helper_thread_id)
3462 (gdb_agent_helper_thread_id): New macros.
3463 (struct ipa_sym_addresses): Add addr_ust_loaded,
3464 addr_helper_thread_id, addr_cmd_buf.
3465 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3466 (in_process_agent_loaded_ust): New.
3467 (write_e_ust_not_loaded): New.
3468 (maybe_write_ipa_ust_not_loaded): New.
3469 (struct collect_static_trace_data_action): New.
3470 (enum tracepoint_type) <static_tracepoint>: New.
3471 (struct tracepoint) <handle>: Mention static tracepoints.
3472 (struct static_tracepoint_ctx): New.
3473 (CMD_BUF_SIZE): New.
3474 (add_tracepoint_action): Handle static tracepoint actions.
3475 (unprobe_marker_at): New.
3476 (clear_installed_tracepoints): Handle static tracepoints.
3477 (cmd_qtdp): Handle static tracepoints.
3478 (probe_marker_at): New.
3479 (cmd_qtstart): Handle static tracepoints.
3480 (response_tracepoint): Handle static tracepoints.
3481 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3482 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3483 (get_context_regcache): Handle static tracepoints.
3484 (do_action_at_tracepoint): Handle static tracepoint actions.
3485 (traceframe_find_block_type): Handle static trace data blocks.
3486 (traceframe_read_sdata): New.
3487 (download_tracepoints): Download static tracepoint actions.
3488 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3489 (GDB_PROBE_NAME): New.
3494 (ust_marker_to_static_tracepoint): New.
3496 (collect_ust_data_at_tracepoint): New.
3497 (gdb_ust_probe): New.
3498 (UNIX_PATH_MAX, SOCK_DIR): New.
3499 (gdb_ust_connect_sync_socket): New.
3500 (resume_thread, stop_thread): New.
3501 (run_inferior_command): New.
3502 (init_named_socket): New.
3503 (gdb_ust_socket_init): New.
3504 (cstr_to_hexstr): New.
3506 (first_marker, next_marker): New.
3507 (response_ust_marker): New.
3508 (cmd_qtfstm, cmd_qtsstm): New.
3509 (unprobe_marker_at, probe_marker_at): New.
3510 (cmd_qtstmat, gdb_ust_thread): New.
3511 (gdb_ust_init): New.
3512 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3513 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3515 (x86_64_st_collect_regmap): New.
3516 (X86_64_NUM_ST_COLLECT_GREGS): New.
3517 (AMD64_RIP_REGNUM): New.
3518 (supply_static_tracepoint_registers): New.
3519 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3521 (i386_st_collect_regmap): New.
3522 (i386_NUM_ST_COLLECT_GREGS): New.
3523 (supply_static_tracepoint_registers): New.
3524 * server.c (handle_query): Handle qXfer:statictrace:read.
3525 <qSupported>: Report support for StaticTracepoints, and
3526 qXfer:statictrace:read features.
3527 * server.h (traceframe_read_sdata)
3528 (supply_static_tracepoint_registers): Declare.
3529 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3530 (unpack_varlen_hex): Include in IPA build.
3531 * Makefile.in (ustlibs, ustinc): New.
3532 (IPA_OBJS): Add remote-utils-ipa.o.
3533 ($(IPA_LIB)): Link -ldl and -lpthread.
3535 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3536 * config.in, configure: Regenerate.
3538 2010-06-20 Ian Lance Taylor <iant@google.com>
3539 Pedro Alves <pedro@codesourcery.com>
3541 * linux-x86-low.c (always_true): Delete.
3542 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3543 trying to fool the compiler with always_true.
3545 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3547 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3548 conditions in gdbserver.
3550 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3552 * spu-low.c (spu_read_memory): Wrap around local store limit.
3553 (spu_write_memory): Likewise.
3555 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3557 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3558 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3560 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3562 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3563 uses with LONGEST uses.
3565 2010-06-14 Stan Shebs <stan@codesourcery.com>
3566 Pedro Alves <pedro@codesourcery.com>
3570 * linux-x86-low.c: Include limits.h.
3575 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3576 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3577 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3578 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3579 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3580 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3581 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3582 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3583 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3584 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3585 (amd64_emit_void_call_2): New.
3586 (amd64_emit_ops): New.
3587 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3588 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3589 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3590 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3591 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3592 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3593 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3594 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3595 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3596 (i386_emit_stack_adjust, i386_emit_int_call_1)
3597 (i386_emit_void_call_2): New.
3598 (i386_emit_ops): New.
3599 (x86_emit_ops): New.
3600 (the_low_target): Install x86_emit_ops.
3601 * server.h (struct emit_ops): New.
3602 (get_raw_reg_func_addr): Declare.
3603 (current_insn_ptr, emit_error): Declare.
3604 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3605 (set_trace_state_variable_value): New defines.
3606 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3607 addr_get_trace_state_variable_value and
3608 addr_set_trace_state_variable_value.
3609 (symbol_list): New fields for get_raw_reg,
3610 get_trace_state_variable_value and set_trace_state_variable_value.
3611 (condfn): New typedef.
3612 (struct tracepoint): New field `compiled_cond'.
3613 (do_action_at_tracepoint): Clear compiled_cond.
3614 (get_trace_state_variable_value, set_trace_state_variable_value):
3616 (condition_true_at_tracepoint): If there's a compiled condition,
3618 (current_insn_ptr, emit_error): New globals.
3619 (struct bytecode_address): New.
3620 (get_raw_reg_func_addr): New.
3621 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3622 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3623 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3624 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3625 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3626 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3627 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3628 (compile_tracepoint_condition, compile_bytecodes): New.
3629 * target.h (emit_ops): Forward declare.
3630 (struct target_ops): New field emit_ops.
3631 (target_emit_ops): New.
3632 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3633 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3634 * linux-low.c (linux_emit_ops): New.
3635 (linux_target_ops): Install it.
3636 * linux-low.h (struct linux_target_ops): New field emit_ops.
3638 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3640 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3641 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3643 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3644 Stan Shebs <stan@codesourcery.com>
3646 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3647 (all): Depend on $(extra_libraries).
3648 (install-only): Install the IPA.
3649 (IPA_OBJS, IPA_LIB): New.
3650 (clean): Remove the IPA lib.
3651 (IPAGENT_CFLAGS): New.
3652 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3653 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3654 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3655 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3656 * configure.ac: Check for atomic builtins support in the compiler.
3657 (IPA_DEPFILES, extra_libraries): Define.
3658 * configure.srv (ipa_obj): Add description.
3659 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3660 (i[34567]86-*-linux*): Set ipa_obj.
3661 (x86_64-*-linux*): Set ipa_obj.
3662 * linux-low.c (stabilizing_threads): New.
3663 (supports_fast_tracepoints): New.
3664 (linux_detach): Stabilize threads before detaching.
3665 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3666 the lwp is either not stabilizing, or is moving out of a jump pad.
3667 (linux_fast_tracepoint_collecting): New.
3668 (maybe_move_out_of_jump_pad): New.
3669 (enqueue_one_deferred_signal): New.
3670 (dequeue_one_deferred_signal): New.
3671 (linux_wait_for_event_1): If moving out of a jump pad, defer
3672 pending signals to later.
3673 (linux_stabilize_threads): New.
3674 (linux_wait_1): Check if threads need moving out of jump pads, and
3676 (stuck_in_jump_pad_callback): New.
3677 (move_out_of_jump_pad_callback): New.
3679 (linux_resume_one_lwp): Handle moving out of jump pads.
3680 (linux_set_resume_request): Dequeue deferred signals.
3681 (need_step_over_p): Also step over fast tracepoint jumps.
3682 (start_step_over): Also uninsert fast tracepoint jumps.
3683 (finish_step_over): Also reinsert fast tracepoint jumps.
3684 (linux_install_fast_tracepoint_jump): New.
3685 (linux_target_ops): Install linux_stabilize_threads and
3686 linux_install_fast_tracepoint_jump_pad.
3687 * linux-low.h (linux_target_ops) <get_thread_area,
3688 install_fast_tracepoint_jump_pad>: New fields.
3689 (struct lwp_info) <collecting_fast_tracepoint,
3690 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3691 (linux_get_thread_area): Declare.
3692 * linux-x86-low.c (jump_insn): New.
3693 (x86_get_thread_area): New.
3694 (append_insns): New.
3696 (amd64_install_fast_tracepoint_jump_pad): New.
3697 (i386_install_fast_tracepoint_jump_pad): New.
3698 (x86_install_fast_tracepoint_jump_pad): New.
3699 (the_low_target): Install x86_get_thread_area and
3700 x86_install_fast_tracepoint_jump_pad.
3701 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3702 (struct fast_tracepoint_jump): New.
3703 (fast_tracepoint_jump_insn): New.
3704 (fast_tracepoint_jump_shadow): New.
3705 (find_fast_tracepoint_jump_at): New.
3706 (fast_tracepoint_jump_here): New.
3707 (delete_fast_tracepoint_jump): New.
3708 (set_fast_tracepoint_jump): New.
3709 (uninsert_fast_tracepoint_jumps_at): New.
3710 (reinsert_fast_tracepoint_jumps_at): New.
3711 (set_breakpoint_at): Use write_inferior_memory.
3712 (uninsert_raw_breakpoint): Use write_inferior_memory.
3713 (check_mem_read): Mask out fast tracepoint jumps.
3714 (check_mem_write): Mask out fast tracepoint jumps.
3715 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3716 (set_fast_tracepoint_jump): Declare.
3717 (delete_fast_tracepoint_jump)
3718 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3719 (reinsert_fast_tracepoint_jumps_at): Declare.
3720 * regcache.c: Don't compile many functions when building the
3721 in-process agent library.
3722 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3723 the register buffer in the heap.
3724 (free_register_cache): If the register buffer isn't owned by the
3725 regcache, don't free it.
3726 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3727 pre-existing register caches.
3728 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3730 (convert_ascii_to_int): : Constify `from' parameter type.
3731 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3732 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3733 the needed buffer in-place.
3734 (relocate_instruction): New.
3735 * server.c (handle_query) <qSymbols>: If the target supports
3736 tracepoints, give it a chance of looking up symbols. Report
3737 support for fast tracepoints.
3738 (handle_status): Stabilize threads.
3739 (process_serial_event): Adjust.
3740 * server.h (struct fast_tracepoint_jump): Forward declare.
3741 (struct process_info) <fast_tracepoint_jumps>: New field.
3742 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3743 (decode_X_packet, decode_M_packet): Adjust.
3744 (relocate_instruction): Declare.
3745 (in_process_agent_loaded): Declare.
3746 (tracepoint_look_up_symbols): Declare.
3747 (struct fast_tpoint_collect_status): Declare.
3748 (fast_tracepoint_collecting): Declare.
3749 (force_unlock_trace_buffer): Declare.
3750 (handle_tracepoint_bkpts): Declare.
3751 (initialize_low_tracepoint)
3752 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3753 * target.h (struct target_ops) <stabilize_threads,
3754 install_fast_tracepoint_jump_pad>: New fields.
3755 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3756 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3757 [HAVE_STDINT_H]: Include stdint.h.
3758 (trace_debug_1): Rename to ...
3759 (trace_vdebug): ... this.
3760 (trace_debug): Rename to ...
3761 (trace_debug_1): ... this. Add `level' parameter.
3763 (ATTR_USED, ATTR_NOINLINE): New.
3764 (IP_AGENT_EXPORT): New.
3765 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3766 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3767 (about_to_request_buffer_space, trace_buffer_is_full)
3768 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3769 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3770 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3771 (traceframe_write_count, traceframes_created)
3772 (trace_state_variables)
3773 New renaming defines.
3774 (struct ipa_sym_addresses): New.
3775 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3777 (ipa_sym_addrs): New.
3778 (all_tracepoint_symbols_looked_up): New.
3779 (in_process_agent_loaded): New.
3780 (write_e_ipa_not_loaded): New.
3781 (maybe_write_ipa_not_loaded): New.
3782 (tracepoint_look_up_symbols): New.
3783 (debug_threads) [IN_PROCESS_AGENT]: New.
3784 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3785 (UNKNOWN_SIDE_EFFECTS): New.
3786 (stop_tracing): New.
3787 (flush_trace_buffer): New.
3788 (stop_tracing_bkpt): New.
3789 (flush_trace_buffer_bkpt): New.
3790 (read_inferior_integer): New.
3791 (read_inferior_uinteger): New.
3792 (read_inferior_data_pointer): New.
3793 (write_inferior_data_pointer): New.
3794 (write_inferior_integer): New.
3795 (write_inferior_uinteger): New.
3796 (struct collect_static_trace_data_action): Delete.
3797 (enum tracepoint_type): New.
3798 (struct tracepoint) <type>: New field `type'.
3799 <actions_str, step_actions, step_actions_str>: Only include in
3801 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3802 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3803 (tracepoints): Use IP_AGENT_EXPORT.
3804 (last_tracepoint): Don't include in the IPA.
3805 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3806 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3807 (alloced_trace_state_variables): New.
3808 (trace_state_variables): Use IP_AGENT_EXPORT.
3809 (traceframe_t): Delete unused variable.
3810 (circular_trace_buffer): Don't include in the IPA.
3811 (trace_buffer_start): Delete.
3812 (struct trace_buffer_control): New.
3813 (trace_buffer_free): Delete.
3814 (struct ipa_trace_buffer_control): New.
3815 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3816 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3818 (trace_buffer_ctrl): New.
3819 (TRACE_BUFFER_CTRL_CURR): New.
3820 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3821 Reimplement as macros.
3822 (trace_buffer_wrap): Delete.
3823 (traceframe_write_count, traceframe_read_count)
3824 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3825 (struct tracepoint_hit_ctx) <type>: New field.
3826 (struct fast_tracepoint_ctx): New.
3827 (memory_barrier): New.
3829 (record_tracepoint_error): Update atomically in the IPA.
3830 (clear_inferior_trace_buffer): New.
3831 (about_to_request_buffer_space): New.
3832 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3833 updating the same buffer.
3834 (add_tracepoint): Default the tracepoint's type to trap
3835 tracepoint, and orig_size to -1.
3836 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3838 (create_trace_state_variable): New parameter `gdb'. Handle it.
3839 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3840 (cmd_qtdp): Handle fast tracepoints.
3842 (max_jump_pad_size): New.
3843 (gdb_jump_pad_head): New.
3844 (get_jump_space_head): New.
3845 (claim_jump_space): New.
3846 (sort_tracepoints): New.
3847 (MAX_JUMP_SIZE): New.
3848 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3850 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3851 support. Upload fast traceframes, and delete internal IPA
3853 (stop_tracing_handler): New.
3854 (flush_trace_buffer_handler): New.
3855 (cmd_qtstop): Upload fast tracepoints.
3856 (response_tracepoint): Handle fast tracepoints.
3857 (tracepoint_finished_step): Upload fast traceframes. Set the
3858 tracepoint hit context's tracepoint type.
3859 (handle_tracepoint_bkpts): New.
3860 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3861 type. Add comment about fast tracepoints.
3862 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3863 non-existing action_str field.
3864 (get_context_regcache): Handle fast tracepoints.
3865 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3867 (fast_tracepoint_from_jump_pad_address): New.
3868 (fast_tracepoint_from_ipa_tpoint_address): New.
3869 (collecting_t): New.
3870 (force_unlock_trace_buffer): New.
3871 (fast_tracepoint_collecting): New.
3874 (write_inferior_data_ptr): New.
3875 (target_tp_heap): New.
3876 (target_malloc): New.
3877 (download_agent_expr): New.
3879 (download_tracepoints): New.
3880 (download_trace_state_variables): New.
3881 (upload_fast_traceframes): New.
3882 (IPA_FIRST_TRACEFRAME): New.
3883 (IPA_NEXT_TRACEFRAME_1): New.
3884 (IPA_NEXT_TRACEFRAME): New.
3885 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3886 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3887 (gdb_jump_pad_buffer_end): New.
3888 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3889 (initialize_tracepoint): Adjust.
3890 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3891 buffer. Initialize the low module.
3892 * utils.c (PREFIX, TOOLNAME): New.
3893 (malloc_failure): Use PREFIX.
3894 (error): In the IPA, an error causes an exit.
3895 (fatal, warning): Use PREFIX.
3896 (internal_error): Use TOOLNAME.
3897 (NUMCELLS): Increase to 10.
3898 * configure, config.in: Regenerate.
3900 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3902 * server.c (handle_query) <qSupported>: Do two passes over the
3903 qSupported string to avoid nesting strtok.
3905 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3907 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3909 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3911 * configure: Regenerate.
3912 * proc-service.list: New.
3914 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3916 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3919 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3921 * gdbreplay.c (remote_open): Check error return from socket() call by
3922 its equality to -1 not by it being negative.
3923 * remote-utils.c (remote_open): Likewise.
3925 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3927 * config.h: Regenerate.
3929 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3931 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3932 doesn't provide PTRACE_GET_THREAD_AREA.
3934 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3936 * linux-m68k-low.c: Include <asm/ptrace.h>
3937 (ps_get_thread_area): Implement.
3939 2010-05-03 Doug Evans <dje@google.com>
3941 * event-loop.c (struct callback_event): New struct.
3942 (callback_list): New global.
3943 (append_callback_event, delete_callback_event): New functions.
3944 (process_callback): New function.
3945 (start_event_loop): Call it.
3946 * remote-utils.c (NOT_SCHEDULED): Define.
3947 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3948 moved out of readchar.
3949 (readchar): Rewrite. Call reschedule before returning.
3950 (reset_readchar): New function.
3951 (remote_close): Call it.
3952 (process_remaining, reschedule): New functions.
3953 * server.h (callback_handler_func): New typedef.
3954 (append_callback_event, delete_callback_event): Declare.
3956 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3958 * proc-service.c (ps_pglobal_lookup): Use
3959 thread_db_look_up_one_symbol.
3960 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3961 parameter. Use it instead of all_symbols_looked_up.
3962 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3964 (all_symbols_looked_up): Don't declare.
3965 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3966 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3968 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3969 Set all_symbols_looked_up here.
3970 (thread_db_look_up_one_symbol): New.
3971 (thread_db_get_tls_address): Adjust.
3972 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3973 thread_db object on the heap, and tentatively set it in the
3975 (thread_db_init): Don't set all_symbols_looked_up here.
3976 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3978 2010-05-03 Pedro Alves <pedro@codesourcery.com>
3980 * linux-low.c (linux_kill, linux_detach): Adjust.
3981 (status_pending_p_callback): Remove redundant statement. Check
3982 for !TARGET_WAITIKIND_IGNORE, instead of
3983 TARGET_WAITKIND_STOPPED.
3984 (handle_tracepoints): Make sure LWP is locked. Adjust.
3985 (linux_wait_for_event_1): Adjust.
3986 (linux_cancel_breakpoints): New.
3987 (unsuspend_one_lwp): New.
3988 (unsuspend_all_lwps): New.
3989 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3990 (send_sigstop_callback): Change return type to int, add new
3991 `except' parameter and handle it.
3992 (suspend_and_send_sigstop_callback): New.
3993 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3994 pass them down. If SUSPEND, also increment the lwp's suspend
3996 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3997 (need_step_over_p): Don't consider suspended LWPs.
3998 (start_step_over): Adjust.
3999 (proceed_one_lwp): Change return type to int, add new `except'
4000 parameter and handle it.
4001 (unsuspend_and_proceed_one_lwp): New.
4002 (proceed_all_lwps): Use find_inferior instead of
4004 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4005 also decrement the suspend count of LWPs. Pass `except' down,
4006 instead of hacking its suspend count.
4007 (linux_pause_all): Add `freeze' parameter. Adjust.
4008 (linux_unpause_all): New.
4009 (linux_target_ops): Install linux_unpause_all.
4010 * server.c (handle_status): Adjust.
4011 * target.h (struct target_ops): New fields `unpause_all' and
4012 `cancel_breakpoints'. Add new parameter to `pause_all'.
4013 (pause_all): Add new `freeze' parameter.
4015 (cancel_breakpoints): New.
4016 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4018 (cmd_qtstart): Pause threads.
4019 (stop_tracing): Pause threads, and cancel breakpoints.
4020 * win32-low.c (win32_target_ops): Adjust.
4022 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4024 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4025 the inferior right away from here...
4026 (linux_wait_1): ... to here, and adjust to check the thread's
4027 last_resume_kind instead of the lwp's step or stop_expected flags.
4029 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4031 * README: Use consistent `GDB' and `GDBserver' spellings.
4033 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4035 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4036 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4037 (linux_detach_one_lwp): Assume the lwp is stopped.
4038 (any_thread_of): Delete.
4039 (linux_detach): Stop all lwps here. Don't blindly delete all
4041 (delete_lwp_callback): New.
4042 (linux_mourn): Delete all lwps of the process that is gone.
4043 (linux_wait_1): Don't delete the last lwp of the process here.
4044 * mem-break.h (mark_breakpoints_out): Declare.
4045 * mem-break.c (mark_breakpoints_out): New.
4046 (free_all_breakpoints): Use it.
4047 * server.c (handle_target_event): If the process is gone, mark
4049 * thread-db.c (struct thread_db) <create_bp>: New field.
4050 (thread_db_enable_reporting): Fix prototype. Store a thread event
4051 breakpoint reference in the thread_db struct.
4052 (thread_db_load_search): Clear the thread_db object.
4053 (try_thread_db_load_1): Ditto.
4054 (switch_to_process): New.
4055 (disable_thread_event_reporting): Use it.
4056 (remove_thread_event_breakpoints): New.
4057 (thread_db_detach, thread_db_mourn): Use it.
4059 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4061 * linux-low.c (linux_enable_event_reporting): New.
4062 (linux_wait_for_event_1, handle_extended_wait): Use it.
4064 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4066 * linux-low.c (linux_kill_one_lwp, linux_kill)
4067 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4068 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4069 SIGSTOP even if the LWP is stopped.
4070 (send_sigstop_callback): New.
4071 (stop_all_lwps): Use send_sigstop_callback instead.
4072 (linux_resume_one_thread): Adjust.
4073 (proceed_one_lwp): Still proceed an LWP that the client has
4074 requested to stop, if we haven't reported it as stopped yet. Make
4075 sure that LWPs the client want stopped, have a pending SIGSTOP.
4077 2010-04-26 Doug Evans <dje@google.com>
4079 * server.c (handle_general_set): Make static.
4081 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4082 Print received char after testing for error/eof instead of before.
4083 (input_interrupt): Tweak comment.
4085 2010-04-23 Doug Evans <dje@google.com>
4087 * server.c (start_inferior): Print inferior argv if --debug.
4089 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4091 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4092 * nto-x86-low.c: Include server.h
4094 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4096 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4097 be consistent with other sources of this directory.
4098 (init_registers_amd64): Correct name of source file of this function
4101 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4103 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4106 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4108 * win32-i386-low.c: Add 64-bit support.
4109 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4110 (init_registers_amd64): Declare.
4111 (mappings): Add 64-bit version of array.
4112 (init_windows_x86): New function.
4113 (the_low_target): Change init_arch field to init_windows_x86.
4115 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4117 * win32-low.c: Adapt to support also 64-bit architecture.
4118 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4119 (get_image_name): Use SIZE_T type for local variable `done'.
4120 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4121 (toolhelp_get_dll_name): Idem.
4122 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4123 Use uintptr_t typecast to avoid warning.
4124 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4125 (handle_exception): Use phex_nz to avoid warning.
4126 (win32_wait): Remove unused local variable `process'.
4128 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4130 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4133 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4135 * configure.ac: Use `ws2_32' library for srv_mingw.
4136 * configure: Regenerate.
4137 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4138 * remote-utils.c: Likewise.
4140 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4142 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4143 if __x86_64__ is defined.
4145 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4147 * configure: Regenerate.
4149 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4151 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4152 * target.h (target_ops): New get_tib_address field.
4153 * win32-low.h (win32_thread_info): Add thread_local_base field.
4154 * win32-low.c (child_add_thread): Add tlb argument.
4155 Set thread_local_base field to TLB.
4156 (get_child_debug_event): Adapt to child_add_thread change.
4157 (win32_get_tib_address): New function.
4158 (win32_target_ops): Set get_tib_address field to
4159 win32_get_tib_address.
4160 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4162 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4164 * linux-low.c (linux_mourn): Also remove the process.
4165 * server.c (handle_target_event): Don't remove the process here.
4166 * nto-low.c (nto_mourn): New.
4167 (nto_target_ops): Install it.
4168 * spu-low.c (spu_mourn): New.
4169 (spu_target_ops): Install it.
4170 * win32-low.c (win32_mourn): New.
4171 (win32_target_ops): Install it.
4173 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4175 * server.h (buffer_xml_printf): Remove redundant `;'.
4177 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4179 * regcache.c (set_register_cache): Invalidate regcaches before
4180 changing the register cache layout.
4181 (regcache_invalidate_one): Allow a NULL regcache.
4182 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4183 regcaches before changing the register cache layout or the target
4186 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4188 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4189 variable warning on Linux/x86-64.
4191 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4193 GDBserver disconnected tracing support.
4195 * linux-low.c (linux_remove_process): Delete.
4196 (add_lwp): Don't set last_resume_kind here.
4197 (linux_kill): Use `mourn'.
4198 (linux_detach): Use `thread_db_detach', and `mourn'.
4200 (linux_attach_lwp_1): Adjust comment.
4201 (linux_attach): last_resume_kind moved the thread_info; adjust.
4202 (status_pending_p_callback): Adjust.
4203 (linux_wait_for_event_1): Adjust.
4204 (count_events_callback, select_singlestep_lwp_callback)
4205 (select_event_lwp_callback, cancel_breakpoints_callback)
4206 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4207 (proceed_one_lwp): Adjust.
4208 (linux_async): Add debug output.
4209 (linux_thread_stopped): New.
4210 (linux_pause_all): New.
4211 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4213 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4214 (thread_db_free): Delete declaration.
4215 (thread_db_detach, thread_db_mourn): Declare.
4216 * thread-db.c (thread_db_init): Use thread_db_mourn.
4217 (thread_db_free): Delete, split in two.
4218 (disable_thread_event_reporting): New.
4219 (thread_db_detach): New.
4220 (thread_db_mourn): New.
4222 * server.h (struct thread_info) <last_resume_kind>: New field.
4223 <attached>: Add comment.
4224 <gdb_detached>: New field.
4225 (handler_func): Change return type to int.
4226 (handle_serial_event, handle_target_event): Ditto.
4227 (gdb_connected): Declare.
4229 (disconnected_tracing): Declare.
4230 (stop_tracing): Declare.
4232 * server.c (handle_query) <qSupported>: Report support for
4233 disconnected tracing.
4234 (queue_stop_reply_callback): Account for running threads.
4235 (gdb_wants_thread_stopped): New.
4236 (gdb_wants_all_threads_stopped): New.
4237 (gdb_reattached_process): New.
4238 (handle_status): Clear the `gdb_detached' flag of all processes.
4239 In all-stop, stop all threads.
4240 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4241 (process_serial_event): If the remote connection breaks, or if an
4242 exit was forced with "monitor exit", force an event loop exit.
4243 Handle disconnected tracing on detach.
4244 (handle_serial_event): Adjust.
4245 (handle_target_event): If GDB isn't connected, forward events back
4246 to the inferior, unless the last process exited, in which case,
4247 exit gdbserver. Adjust interface.
4249 * remote-utils.c (remote_open): Don't block in accept. Instead
4250 register an event loop source on the listen socket file
4251 descriptor. Refactor bits into ...
4252 (listen_desc): ... this new global.
4253 (gdb_connected): ... this new function.
4254 (enable_async_notification): ... this new function.
4255 (handle_accept_event): ... this new function.
4256 (remote_close): Clear remote_desc.
4258 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4260 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4262 (mourn_inferior): Define.
4263 (target_process_qsupported): Avoid the dangling else problem.
4264 (thread_stopped): Define.
4265 (pause_all): Define.
4266 (target_waitstatus_to_string): Declare.
4267 * target.c (target_waitstatus_to_string): New.
4269 * tracepoint.c (tracing): Make extern.
4270 (disconnected_tracing): New.
4271 (stop_tracing): Make extern. Handle tracing stops due to GDB
4273 (cmd_qtdisconnected): New.
4274 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4275 (handle_tracepoint_general_set): Handle QTDisconnected.
4277 * event-loop.c (event_handler_func): Change return type to int.
4278 (process_event): Bail out if the event handler wants the event
4280 (handle_file_event): Ditto.
4281 (start_event_loop): Bail out if the event handler wants the event
4284 * nto-low.c (nto_target_ops): Adjust.
4285 * spu-low.c (spu_wait): Don't remove the process here.
4286 (spu_target_ops): Adjust.
4287 * win32-low.c (win32_wait): Don't remove the process here.
4288 (win32_target_ops): Adjust.
4290 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4292 * regcache.c (realloc_register_cache): Invalidate inferior's
4293 regcache before recreating it.
4295 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4297 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4299 2010-04-09 Stan Shebs <stan@codesourcery.com>
4300 Pedro Alves <pedro@codesourcery.com>
4302 * server.h (LONGEST): New.
4303 (struct thread_info) <while_stepping>: New field.
4304 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4306 (initialize_tracepoint, handle_tracepoint_general_set)
4307 (handle_tracepoint_query, tracepoint_finished_step)
4308 (tracepoint_was_hit, release_while_stepping_state_list):
4309 (current_traceframe): Declare.
4310 * server.c (handle_general_set): Handle tracepoint packets.
4312 (write_memory): New.
4313 (handle_search_memory_1): Use read_memory.
4314 (handle_query): Report support for conditional tracepoints, trace
4315 state variables, and tracepoint sources. Handle tracepoint
4317 (main): Initialize the tracepoints module.
4318 (process_serial_event): Handle traceframe reads/writes.
4320 * linux-low.c (handle_tracepoints): New.
4321 (linux_wait_1): Call it.
4322 (linux_resume_one_lwp): Handle while-stepping.
4323 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4324 (linux_target_ops): Install them.
4325 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4327 * linux-x86-low.c (x86_supports_tracepoints): New.
4328 (the_low_target). Install it.
4330 * mem-break.h (delete_breakpoint): Declare.
4331 * mem-break.c (delete_breakpoint): Make external.
4333 * target.h (struct target_ops): Add `supports_tracepoints',
4334 `read_pc', and `write_pc' fields.
4335 (target_supports_tracepoints): Define.
4336 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4339 * regcache.h (struct regcache) <registers_owned>: New field.
4340 (init_register_cache, regcache_cpy): Declare.
4341 (regcache_read_pc, regcache_write_pc): Declare.
4342 (register_cache_size): Declare.
4343 (supply_regblock): Declare.
4344 * regcache.c (init_register_cache): New.
4345 (new_register_cache): Use it.
4346 (regcache_cpy): New.
4347 (register_cache_size): New.
4348 (supply_regblock): New.
4349 (regcache_read_pc, regcache_write_pc): New.
4351 * tracepoint.c: New.
4353 * Makefile.in (OBS): Add tracepoint.o.
4354 (tracepoint.o): New rule.
4356 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4358 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4360 (i386-mmx.c): Likewise.
4361 (i386-mmx-linux.o): Likewise.
4362 (i386-mmx-linux.c): Likewise.
4364 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4365 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4366 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4367 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4369 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4370 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4371 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4373 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4375 * Makefile.in (clean): Updated.
4377 (i386-avx.c): Likewise.
4378 (i386-avx-linux.o): Likewise.
4379 (i386-avx-linux.c): Likewise.
4380 (amd64-avx.o): Likewise.
4381 (amd64-avx.c): Likewise.
4382 (amd64-avx-linux.o): Likewise.
4383 (amd64-avx-linux.c): Likewise.
4385 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4386 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4387 (srv_amd64_regobj): Add amd64-avx.o.
4388 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4389 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4390 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4391 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4392 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4393 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4394 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4396 * i387-fp.c: Include "i386-xstate.h".
4398 (i387_cache_to_xsave): Likewise.
4399 (i387_xsave_to_cache): Likewise.
4400 (x86_xcr0): Likewise.
4402 * i387-fp.h (i387_cache_to_xsave): Likewise.
4403 (i387_xsave_to_cache): Likewise.
4404 (x86_xcr0): Likewise.
4406 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4407 * linux-crisv32-low.c (target_regsets): Likewise.
4408 * linux-m68k-low.c (target_regsets): Likewise.
4409 * linux-mips-low.c (target_regsets): Likewise.
4410 * linux-ppc-low.c (target_regsets): Likewise.
4411 * linux-s390-low.c (target_regsets): Likewise.
4412 * linux-sh-low.c (target_regsets): Likewise.
4413 * linux-sparc-low.c (target_regsets): Likewise.
4414 * linux-xtensa-low.c (target_regsets): Likewise.
4416 * linux-low.c: Include <sys/uio.h>.
4417 (regsets_fetch_inferior_registers): Support nt_type.
4418 (regsets_store_inferior_registers): Likewise.
4419 (linux_process_qsupported): New.
4420 (linux_target_ops): Add linux_process_qsupported.
4422 * linux-low.h (regset_info): Add nt_type.
4423 (linux_target_ops): Add process_qsupported.
4425 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4427 (init_registers_i386_avx_linux): New.
4428 (init_registers_amd64_avx_linux): Likewise.
4429 (xmltarget_i386_linux_no_xml): Likewise.
4430 (xmltarget_amd64_linux_no_xml): Likewise.
4431 (PTRACE_GETREGSET): Likewise.
4432 (PTRACE_SETREGSET): Likewise.
4433 (x86_fill_xstateregset): Likewise.
4434 (x86_store_xstateregset): Likewise.
4435 (use_xml): Likewise.
4436 (x86_linux_update_xmltarget): Likewise.
4437 (x86_linux_process_qsupported): Likewise.
4438 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4439 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4440 init_registers_i386_linux here. Call
4441 x86_linux_update_xmltarget.
4442 (the_low_target): Add x86_linux_process_qsupported.
4444 * server.c (handle_query): Call target_process_qsupported.
4446 * target.h (target_ops): Add process_qsupported.
4447 (target_process_qsupported): New.
4449 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4451 * inferiors.c (add_thread): Set last_status kind to
4452 TARGET_WAITKIND_IGNORE.
4453 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4454 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4455 (linux_wait_1): Move `thread' local definition to block that uses
4456 it. Don't NULL initialize `event_child'.
4457 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4458 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4459 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4461 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4463 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4464 an extended waitstatus, or by a watchpoint.
4465 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4466 thread was stepping or has been stopped by a watchpoint.
4468 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4470 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4471 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4472 of another, then delete the previous, and validate all
4474 (validate_inserted_breakpoint): New.
4475 (delete_disabled_breakpoints): New.
4476 (validate_breakpoints): New.
4477 (check_mem_read): Validate breakpoints before trusting their
4478 shadow. Delete disabled breakpoints.
4479 (check_mem_write): Validate breakpoints before trusting they
4480 should be inserted. Delete disabled breakpoints.
4481 * mem-break.h (validate_breakpoints):
4482 * server.c (handle_query): Validate breakpoints when we see a
4485 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4487 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4488 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4489 if we could tell there's a GDB breakpoint at stop_pc.
4490 (need_step_over_p): Don't do a step over if we find a GDB
4491 breakpoint at the resume PC.
4493 * mem-break.c (struct raw_breakpoint): New.
4494 (enum bkpt_type): New type `gdb_breakpoint'.
4495 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4496 fields. New field `raw'.
4497 (find_raw_breakpoint_at): New.
4498 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4500 (set_breakpoint_at): Adjust.
4501 (delete_raw_breakpoint): New.
4502 (release_breakpoint): New.
4503 (delete_breakpoint): Rename to...
4504 (delete_breakpoint_1): ... this. Add proc parameter. Use
4505 release_breakpoint. Return ENOENT.
4506 (delete_breakpoint): Reimplement.
4507 (find_breakpoint_at): Delete.
4508 (find_gdb_breakpoint_at): New.
4509 (delete_breakpoint_at): Delete.
4510 (set_gdb_breakpoint_at): New.
4511 (delete_gdb_breakpoint_at): New.
4512 (gdb_breakpoint_here): New.
4513 (set_reinsert_breakpoint): Use release_breakpoint.
4514 (uninsert_breakpoint): Rename to ...
4515 (uninsert_raw_breakpoint): ... this.
4516 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4517 (reinsert_raw_breakpoint): Change parameter type to
4519 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4521 (check_breakpoints): Adjust. Use release_breakpoint.
4522 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4523 (breakpoint_inserted_here): Ditto.
4524 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4525 Don't trust the breakpoint's shadow if it is not inserted.
4526 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4527 (delete_all_breakpoints): Adjust.
4528 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4529 use delete_breakpoint_1.
4531 * mem-break.h (breakpoints_supported): Delete declaration.
4532 (set_gdb_breakpoint_at): Declare.
4533 (gdb_breakpoint_here): Declare.
4534 (delete_breakpoint_at): Delete.
4535 (delete_gdb_breakpoint_at): Declare.
4537 * server.h (struct raw_breakpoint): Forward declare.
4538 (struct process_info): New field `raw_breakpoints'.
4540 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4543 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4545 * linux-low.c (status_pending_p_callback): Fix comment.
4546 (linux_wait_for_event_1): Move most of the internal breakpoint
4547 handling from here...
4548 (linux_wait_1): ... to here.
4549 (count_events_callback): New.
4550 (select_singlestep_lwp_callback): New.
4551 (select_event_lwp_callback): New.
4552 (cancel_breakpoints_callback): New.
4553 (select_event_lwp): New.
4554 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4555 priority to all LWPs that have had events that should be reported
4556 to the client. Cancel breakpoints when about to reporting the
4557 event to the client, not while stopping lwps. No longer cancel
4558 finished single-steps here.
4559 (cancel_finished_single_step): Delete.
4560 (cancel_finished_single_steps): Delete.
4562 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4564 * mem-break.c (enum bkpt_type): New.
4565 (struct breakpoint): New field `type'.
4566 (set_breakpoint_at): Change return type to struct breakpoint
4567 pointer. Set type to `other_breakpoint' by default.
4568 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4569 in the breakpoint list.
4570 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4571 (reinsert_breakpoint): Rename to ...
4572 (reinsert_raw_breakpoint): ... this.
4573 (reinsert_breakpoints_at): Adjust.
4574 * mem-break.h (struct breakpoint): Declare.
4575 (set_breakpoint_at): Change return type to struct breakpoint
4578 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4580 * server.c (handle_query): Assign, not compare.
4582 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4584 Teach linux gdbserver to step-over-breakpoints.
4586 * linux-low.c (can_hardware_single_step): New.
4587 (supports_breakpoints): New.
4588 (handle_extended_wait): If stopping threads, read the stop pc of
4591 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4592 low target doesn't support retrieving the PC.
4593 (add_lwp): Set last_resume_kind to resume_continue.
4594 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4595 (linux_attach): Don't clear stop_expected. Set the lwp's
4596 last_resume_kind to resume_stop.
4597 (linux_detach_one_lwp): Don't check for removed breakpoints.
4598 (check_removed_breakpoint): Delete.
4599 (status_pending_p): Rename to ...
4600 (status_pending_p_callback): ... this. Don't check for removed
4601 breakpoints. Don't consider threads that are stopped from GDB's
4603 (linux_wait_for_lwp): Always read the stop_pc here.
4604 (cancel_breakpoint): New.
4605 (step_over_bkpt): New global.
4606 (linux_wait_for_event_1): Implement stepping over breakpoints.
4607 (gdb_wants_lwp_stopped): New.
4608 (gdb_wants_all_stopped): New.
4609 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4610 single-step traps here. Store the thread's last reported target
4612 (send_sigstop): Don't clear stop_expected. Always set it,
4614 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4615 (cancel_finished_single_step): New.
4616 (cancel_finished_single_steps): New.
4617 (wait_for_sigstop): Don't cancel finished single-step traps here.
4618 (linux_resume_one_lwp): Don't check for removed breakpoints.
4619 Don't set `step' on non-hardware step archs.
4620 (linux_set_resume_request): Ignore resume_stop requests if already
4621 stopping or stopped. Set the lwp's last_resume_kind.
4622 (resume_status_pending_p): Don't check for removed breakpoints.
4623 (need_step_over_p): New.
4624 (start_step_over): New.
4625 (finish_step_over): New.
4626 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4627 requests. Clear the thread's last reported target waitstatus.
4628 Don't use the `suspended' flag. Don't consider pending breakpoints.
4629 (linux_resume): Start a step-over if necessary.
4630 (proceed_one_lwp): New.
4631 (proceed_all_lwps): New.
4632 (unstop_all_lwps): New.
4633 * linux-low.h (struct lwp_info): Rewrite comment for the
4634 `suspended' flag. Add the `stop_pc' field. Delete the
4635 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4636 Add `'last_resume_kind' and `need_step_over' fields.
4637 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4638 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4639 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4640 (set_raw_breakpoint_at): New.
4641 (set_breakpoint_at): Rewrite to use it.
4642 (reinsert_breakpoint_handler): Delete.
4643 (set_reinsert_breakpoint): New.
4644 (reinsert_breakpoint_by_bp): Delete.
4645 (delete_reinsert_breakpoints): New.
4646 (uninsert_breakpoint): Rewrite.
4647 (uninsert_breakpoints_at): New.
4648 (reinsert_breakpoint): Rewrite.
4649 (reinsert_breakpoints_at): New.
4650 (check_breakpoints): Rewrite.
4651 (breakpoint_here): New.
4652 (breakpoint_inserted_here): New.
4653 (check_mem_read): Adjust.
4654 * mem-break.h (breakpoints_supported, breakpoint_here)
4655 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4656 (reinsert_breakpoint_by_bp): Delete declaration.
4657 (delete_reinsert_breakpoints): Declare.
4658 (reinsert_breakpoint): Delete declaration.
4659 (reinsert_breakpoints_at): Declare.
4660 (uninsert_breakpoint): Delete declaration.
4661 (uninsert_breakpoints_at): Declare.
4662 (check_breakpoints): Adjust prototype.
4663 * server.h: Adjust include order.
4664 (struct thread_info): Declare here. Add a `last_status' field.
4666 2010-03-23 Michael Snyder <msnyder@vmware.com>
4668 * server.c (crc32): New function.
4669 (handle_query): Add handling for 'qCRC:' request.
4671 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4673 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4674 lwp had been stopped by a watchpoint.
4676 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4678 * server.h (internal_error): Declare.
4679 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4680 * utils.c (internal_error): New function.
4682 2010-03-15 Andreas Schwab <schwab@redhat.com>
4684 * configure.srv: Fix typo setting srv_regobj.
4686 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4688 * linux-low.c (fetch_register): Avoid passing a non string literal
4690 (usr_store_inferior_registers): Ditto.
4692 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4694 * linux-low.c (linux_write_memory): Bail out early if peeking
4697 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4699 * linux-low.h (struct lwp_info): New fields
4700 `stopped_by_watchpoint' and `stopped_data_address'.
4701 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4702 here, and cache them in the lwp object.
4703 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4705 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4707 (linux_stopped_by_watchpoint): Rewrite.
4708 (linux_stopped_data_address): Rewrite.
4710 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4712 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4713 switching the current inferior, not before.
4715 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4717 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4718 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4719 i386-linux.c and amd64-linux.c.
4720 (reg-i386.o): Removed.
4721 (reg-i386.c): Likewise.
4722 (reg-i386-linux.o): Likewise.
4723 (reg-i386-linux.c): Likewise.
4724 (reg-x86-64.o): Likewise.
4725 (reg-x86-64.c): Likewise.
4726 (reg-x86-64-linux.o): Likewise.
4727 (reg-x86-64-linux.c): Likewise.
4730 (i386-linux.o): Likewise.
4731 (i386-linux.c): Likewise.
4732 (amd64.o): Likewise.
4733 (amd64.c): Likewise.
4734 (amd64-linux.o): Likewise.
4735 (amd64-linux.c): Likewise.
4737 * configure.srv (srv_i386_regobj): New.
4738 (srv_i386_linux_regobj): Likewise.
4739 (srv_amd64_regobj): Likewise.
4740 (srv_amd64_linux_regobj): Likewise.
4741 (srv_i386_32bit_xmlfiles): Likewise.
4742 (srv_i386_64bit_xmlfiles): Likewise.
4743 (srv_i386_xmlfiles): Likewise.
4744 (srv_amd64_xmlfiles): Likewise.
4745 (srv_i386_linux_xmlfiles): Likewise.
4746 (srv_amd64_linux_xmlfiles): Likewise.
4747 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4748 srv_xmlfiles to $srv_i386_xmlfiles.
4749 (i[34567]86-*-mingw32ce*): Likewise.
4750 (i[34567]86-*-mingw*): Likewise.
4751 (i[34567]86-*-nto*): Likewise.
4752 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4753 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4754 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4755 (x86_64-*-linux*): Likewise.
4757 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4758 (init_registers_amd64_linux): New.
4759 (x86_arch_setup): Replace init_registers_x86_64_linux with
4760 init_registers_amd64_linux.
4762 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4764 * configure.ac: Check for libdl. If it is not available link against
4765 static libthread_db.
4766 * configure: Regenerate.
4768 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4772 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4773 handing a read watchpoint.
4774 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4776 2010-02-12 Doug Evans <dje@google.com>
4778 * linux-low.c (linux_supports_tracefork_flag): Document.
4779 (linux_look_up_symbols): Add comment.
4781 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4783 * regcache.c (supply_register): Clear regcache if buf is NULL.
4785 2010-02-02 Nicolas Roche <roche@sourceware.org>
4786 Joel Brobecker <brobecker@adacore.com>
4788 * inferiors.c (find_inferior): Add function documentation.
4789 (unloaded_dll): Handle the case where the unloaded dll has not
4790 been previously registered in the dll list.
4792 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4794 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4795 (thumb2_breakpoint): New.
4796 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4798 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4800 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4801 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4804 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4806 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4808 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4810 * linux-s390-low.c (s390_collect_ptrace_register)
4811 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4813 2010-01-21 Doug Evans <dje@google.com>
4815 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4816 (PTRACE_ARG4_TYPE): New macro.
4817 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4818 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4819 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4820 (usr_store_inferior_registers): Ditto.
4821 (linux_read_memory, linux_write_memory): Ditto.
4822 (linux_test_for_tracefork): Ditto.
4824 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4825 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4827 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4829 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4832 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4834 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4835 prototype to take a regcache. Adjust.
4837 2010-01-20 Pedro Alves <pedro@codesourcery.com>
4839 * regcache.h (struct thread_info): Forward declare.
4840 (struct regcache): New.
4841 (new_register_cache): Adjust prototype.
4842 (get_thread_regcache): Declare.
4843 (free_register_cache): Adjust prototype.
4844 (registers_to_string, registers_from_string): Ditto.
4845 (supply_register, supply_register_by_name, collect_register)
4846 (collect_register_as_string, collect_register_by_name): Ditto.
4847 * regcache.c (struct inferior_regcache_data): Delete.
4848 (get_regcache): Rename to ...
4849 (get_thread_regcache): ... this. Adjust. Switch inferior before
4851 (regcache_invalidate_one): Adjust.
4852 (regcache_invalidate): Fix prototype.
4853 (new_register_cache): Return the new register cache.
4854 (free_register_cache): Change prototype.
4855 (realloc_register_cache): Adjust.
4856 (registers_to_string): Change prototype to take a regcache. Adjust.
4857 (registers_from_string): Ditto.
4858 (register_data): Ditto.
4859 (supply_register): Ditto.
4860 (supply_register_by_name): Ditto.
4861 (collect_register): Ditto.
4862 (collect_register_as_string): Ditto.
4863 (collect_register_by_name): Ditto.
4864 * server.c (process_serial_event): Adjust.
4865 * linux-low.h (regset_fill_func, regset_store_func): Change
4867 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4869 * linux-low.c (get_stop_pc): Adjust.
4870 (check_removed_breakpoint): Adjust.
4871 (linux_wait_for_event): Adjust.
4872 (linux_resume_one_lwp): Adjust.
4873 (fetch_register): Add regcache parameter. Adjust.
4874 (usr_store_inferior_registers): Ditto.
4875 (regsets_fetch_inferior_registers): Ditto.
4876 (regsets_store_inferior_registers): Ditto.
4877 (linux_fetch_registers, linux_store_registers): Ditto.
4878 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4880 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4882 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4883 prototype to take a regcache.
4884 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4885 * remote-utils.c (convert_ascii_to_int, outreg)
4886 (prepare_resume_reply): Change prototype to take a regcache.
4888 * target.h (struct target_ops) <fetch_registers, store_registers>:
4889 Change prototype to take a regcache.
4890 (fetch_inferior_registers, store_inferior_registers): Change
4891 prototype to take a regcache. Adjust.
4892 * proc-service.c (ps_lgetregs): Adjust.
4893 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4894 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4895 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4896 take a regcache. Adjust.
4897 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4898 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4899 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4900 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4901 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4902 (cris_cannot_fetch_register):
4903 (cris_breakpoint_at): Change prototype to take a regcache.
4905 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4906 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4907 to take a regcache. Adjust.
4908 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4910 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4911 take a regcache. Adjust.
4912 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4913 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4914 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4915 * linux-mips-low.c (mips_get_pc):
4916 (mips_set_pc): Change prototype to take a regcache. Adjust.
4917 (mips_reinsert_addr): Adjust.
4918 (mips_collect_register): Change prototype to take a regcache.
4920 (mips_supply_register):
4921 (mips_collect_register_32bit, mips_supply_register_32bit)
4922 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4923 (mips_store_fpregset): Ditto.
4924 * linux-ppc-low.c (ppc_supply_ptrace_register)
4925 (ppc_supply_ptrace_register): Ditto.
4926 (parse_spufs_run): Adjust.
4927 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4928 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4929 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4930 take a regcache. Adjust.
4931 * linux-s390-low.c (s390_collect_ptrace_register)
4932 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4933 (s390_set_pc): Change prototype to take a regcache. Adjust.
4934 (s390_arch_setup): Adjust.
4935 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4936 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4937 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4938 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4939 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4941 (sparc_breakpoint_at): Adjust.
4942 * linux-xtensa-low.c (xtensa_fill_gregset):
4943 (xtensa_store_gregset):
4944 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4945 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4946 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4947 prototype to take a regcache. Adjust.
4948 * win32-arm-low.c (arm_fetch_inferior_register)
4949 (arm_store_inferior_register): Change prototype to take a
4951 * win32-i386-low.c (i386_fetch_inferior_register)
4952 (i386_store_inferior_register): Change prototype to take a
4954 * win32-low.c (child_fetch_inferior_registers)
4955 (child_store_inferior_registers): Change prototype to take a
4957 (win32_wait): Adjust.
4958 (win32_fetch_inferior_registers): Change prototype to take a
4960 (win32_store_inferior_registers): Adjust.
4961 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4962 store_inferior_register>: Change prototype to take a regcache.
4964 2010-01-20 Doug Evans <dje@google.com>
4966 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4968 (linux_wait_for_event1, linux_init_signals): Ditto.
4969 (W_STOPCODE): Provide definition if missing.
4971 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4973 * linux-low.c (linux_core_of_thread): New.
4974 (compare_ints, show_process, list_threads): New.
4975 (linux_qxfer_osdata): Report threads and cores.
4976 (linux_target_op): Register linux_core_of_thread.
4977 * remote-utils.c (prepare_resume_reply): Report the core.
4978 (buffer_xml_printf): Support %d specifier.
4979 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4981 (handle_query): Handle qXfer:threads. Announce availability
4983 * target.h (struct target_ops): New field core_of_thread.
4985 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4987 * Makefile.in (clean): Remove new generated files.
4988 (reg-s390.o, reg-s390.c): Remove rules.
4989 (reg-s390x.o, reg-s390x.c): Likewise.
4990 (s390-linux32.o, s390-linux32.c): Add rules.
4991 (s390-linux64.o, s390-linux64.c): Likewise.
4992 (s390x-linux64.o, s390x-linux64.c): Likewise.
4993 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4994 * linux-s390-low.c: Include <elf.h>.
4995 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4996 (init_registers_s390): Remove prototype.
4997 (init_registers_s390x): Likewise.
4998 (init_registers_s390_linux32): Add prototype.
4999 (init_registers_s390_linux64): Likewise.
5000 (init_registers_s390x_linux64): Likewise.
5001 (s390_num_regs_3264): New define.
5002 (s390_regmap_3264): New global variable.
5003 (s390_cannot_fetch_register): Remove obsolete check.
5004 (s390_cannot_store_register): Likewise.
5005 (s390_collect_ptrace_register): Handle upper/lower register halves.
5006 (s390_supply_ptrace_register): Likewise.
5007 (s390_fill_gregset): Update to register number changes.
5008 (s390_get_hwcap): New routine.
5009 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5010 Install appropriate regmap and register set.
5012 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5014 * server.c (gdbserver_version): Update copyright year to 2010.
5015 * gdbreplay.c (gdbreplay_version): Likewise.
5017 2009-12-28 Doug Evans <dje@google.com>
5019 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5020 elf/external.h. Include <elf.h> instead but only if necessary.
5022 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5024 * linux-low.c (linux_remove_process): Remove `detaching'
5025 parameter. Don't release/detach from thread_db here.
5026 (linux_kill): Release/detach from thread_db here, ...
5027 (linux_detach): ... and here, before actually detaching.
5028 (linux_wait_1): ... and here, when a process exits.
5029 * thread-db.c (any_thread_of): New.
5030 (thread_db_free): Switch the current inferior to a thread of the
5033 2009-12-21 Doug Evans <dje@google.com>
5035 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5037 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5038 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5039 warning ifndef __NR_tkill. Move setting of errno there too.
5040 Delete unnecessary resetting of errno after syscall.
5041 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5043 * configure.ac: Check for dladdr.
5044 * config.in: Regenerate.
5045 * configure: Regenerate.
5046 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5047 (try_thread_db_load): Update.
5049 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5051 2009-12-18 Doug Evans <dje@google.com>
5053 * event-loop.c: Include unistd.h if it exists.
5055 * linux-low.c (my_waitpid): Move definition away from being in
5056 between linux_tracefork_child/linux_test_for_tracefork.
5058 * gdb_proc_service.h (psaddr_t): Fix type.
5059 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5060 signature to match glibc.
5062 2009-12-16 Doug Evans <dje@google.com>
5064 * linux-low.c (linux_read_memory): Fix argument to read.
5066 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5068 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5069 events, don't leave current_inferior pointing at null.
5071 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5073 * win32-low.c (LOG): Delete.
5074 (OUTMSG): Output to stderr.
5075 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5076 on compile time LOG macro.
5077 (win32_wait): Fix debug output.
5079 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5081 * win32-low.c (win32_add_one_solib): If the dll name is
5082 "ntdll.dll", prepend the system directory to the dll path.
5084 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5086 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5088 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5089 Vladimir Prus <vladimir@codesourcery.com>
5091 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5092 * configure.ac: Check for __mcoldfire__ and set
5093 gdb_cv_m68k_is_coldfire.
5094 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5095 reg-cf.o and reg-m68k.o.
5096 * configure: Regenerated.
5098 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5100 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5101 Pass it to thread_db_free.
5102 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5103 proper `detaching' argument to linux_remove_process.
5104 * linux-low.h (thread_db_free): Add `detaching' parameter.
5105 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5107 (thread_db_free): Add `detaching' parameter. Only
5108 call td_ta_clear_event if detaching from process.
5110 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5112 * thread-db.c (thread_db_free): Fix typo.
5114 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5117 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5119 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5121 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5122 with an i686 compiler.
5123 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5125 * configure: Rebuilt.
5127 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5131 * server.c (handle_search_memory_1): Correct read_addr initialization
5132 in loop for searching subsequent chunks.
5134 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5136 * configure.ac: New --with-libthread-db option.
5137 * thread-db.c: Allow direct dependence on libthread_db.
5138 (thread_db_free): Adjust.
5139 * config.in: Regenerate.
5140 * configure: Likewise.
5142 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5145 * thread-db.c (attach_thread): New function.
5146 (maybe_attach_thread): Return success/failure.
5147 (find_new_threads_callback): Adjust.
5148 (thread_db_find_new_threads): Loop until no new threads.
5150 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5152 * proc-service.c (ps_lgetregs): Formatting.
5154 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5156 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5157 * configure.ac: Adjust.
5158 * linux-low.h (struct process_info_private): Move members to struct
5160 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5161 * linux-low.c (linux_remove_process): Adjust.
5162 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5163 * server.c (handle_query): Move code ...
5164 (handle_monitor_command): ... here. New function.
5165 * target.h (struct target_ops): New member.
5166 * thread-db.c (struct thread_db): New.
5167 (libthread_db_search_path): New variable.
5168 (thread_db_create_event, thread_db_enable_reporting)
5169 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5170 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5171 (try_thread_db_load_1, dladdr_to_soname): New functions.
5172 (try_thread_db_load, thread_db_load_search): New functions.
5173 (thread_db_init): Search for libthread_db.
5174 (thread_db_free): New function.
5175 (thread_db_handle_monitor_command): Likewise.
5176 * config.in: Regenerate.
5177 * configure: Regenerate.
5179 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5181 * spu-low.c (spu_kill): Wait for inferior to terminate.
5182 Call clear_inferiors.
5183 (spu_detach): Call clear_inferiors.
5185 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5187 * aclocal.m4: Regenerate.
5188 * config.in: Likewise.
5189 * configure: Likewise.
5191 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5193 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5194 (parse_spufs_run): New function.
5195 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5196 (ppc_breakpoint_at): Handle SPU breakpoints.
5198 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5200 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5201 (SPUFS_MAGIC): Define.
5202 (spu_enumerate_spu_ids): New function.
5203 (linux_qxfer_spu): New function.
5204 (linux_target_ops): Install linux_qxfer_spu.
5206 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5208 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5209 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5210 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5211 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5212 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5213 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5214 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5215 (init_registers_powerpc_cell32l): Add prototype.
5216 (init_registers_powerpc_cell64l): Likewise.
5217 (ppc_arch_setup): Detect Cell/B.E. architecture.
5219 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5221 * Makefile.in (datarootdir): New variable.
5223 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5225 * linux-low.c (linux_write_memory): Update debugging output.
5226 * Makefile.in (clean): Add new descriptions.
5227 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5228 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5229 * configure.srv: Add new files for arm*-*-linux*.
5230 * linux-arm-low.c: Add new declarations.
5231 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5232 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5233 (HWCAP_VFPv3D16): New.
5234 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5235 instead of __IWMMXT__.
5236 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5237 (arm_arch_setup): New.
5238 (target_regsets): Remove #ifdef. Add VFP regset.
5239 (the_low_target): Use arm_arch_setup.
5241 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5243 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5244 the main thread again.
5246 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5248 Adding Neutrino gdbserver.
5249 * configure: Regenerated.
5250 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5251 * configure.srv (i[34567]86-*-nto*): New target.
5252 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5253 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5254 (nto_comctrl) [__QNX__]: New function.
5255 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5257 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5259 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5262 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5263 Pedro Alves <pedro@codesourcery.com>
5265 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5266 don't support CONTEXT_EXTENDED_REGISTERS.
5267 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5268 (the_low_target): Install them.
5269 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5270 failing with ERROR_PIPE_NOT_CONNECTED.
5272 2009-06-30 Doug Evans <dje@google.com>
5273 Pierre Muller <muller@ics.u-strasbg.fr>
5275 Add h/w watchpoint support to x86-linux, win32-i386.
5276 * Makefile.in (SFILES): Add i386-low.c
5277 (i386_low_h): Define.
5278 (i386-low.o): Add dependencies.
5279 (linux-x86-low.o): Add i386-low.h dependency.
5280 (win32-i386-low.o): Ditto.
5281 * i386-low.c: New file.
5282 * i386-low.h: New file.
5283 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5284 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5285 * linux-low.c (linux_add_process): Initialize arch_private.
5286 (linux_remove_process): Free arch_private.
5287 (add_lwp): Initialize arch_private.
5288 (delete_lwp): Free arch_private.
5289 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5291 * linux-low.h (process_info_private): New member arch_private.
5292 (lwp_info): New member arch_private.
5293 (linux_target_ops): New members new_process, new_thread,
5295 (ptid_of): New macro.
5296 * linux-x86-low.c: Include stddef.h, i386-low.h.
5297 (arch_process_info): New struct.
5298 (arch_lwp_info): New struct.
5299 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5300 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5301 (i386_dr_low_get_status): New function.
5302 (x86_insert_point, x86_remove_point): New functions.
5303 (x86_stopped_by_watchpoint): New function.
5304 (x86_stopped_data_address): New function.
5305 (x86_linux_new_process, x86_linux_new_thread): New functions.
5306 (x86_linux_prepare_to_resume): New function.
5307 (the_low_target): Add entries for insert_point, remove_point,
5308 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5310 * server.c (debug_hw_points): New global.
5311 (monitor_show_help): Document set debug-hw-points.
5312 (handle_query): Process "set debug-hw-points".
5313 * server.h (debug_hw_points): Declare.
5314 (paddress): Declare.
5315 * utils.c (NUMCELLS, CELLSIZE): New macros.
5316 (get_sell, xsnprintf, paddress): New functions.
5317 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5318 remove_point, stopped_by_watchpoint, stopped_data_address.
5319 * win32-i386-low.c: Include i386-low.h.
5320 (debug_reg_state): Replaces dr.
5321 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5322 (i386_dr_low_get_status): New function.
5323 (i386_insert_point, i386_remove_point): New functions.
5324 (i386_stopped_by_watchpoint): New function.
5325 (i386_stopped_data_address): New function.
5326 (i386_initial_stuff): Update.
5327 (get_thread_context,set_thread_context,i386_thread_added): Update.
5328 (the_low_target): Add entries for insert_point,
5329 remove_point, stopped_by_watchpoint, stopped_data_address.
5330 * win32-low.c (win32_insert_watchpoint): New function.
5331 (win32_remove_watchpoint): New function.
5332 (win32_stopped_by_watchpoint): New function.
5333 (win32_stopped_data_address): New function.
5334 (win32_target_ops): Add entries for insert_watchpoint,
5335 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5336 * win32-low.h (win32_target_ops): New members insert_point,
5337 remove_point, stopped_by_watchpoint, stopped_data_address.
5339 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5341 * server.c (process_serial_event): Re-return unsupported, not
5342 error, if the type isn't recognized. Re-allow supporting only
5343 insert or remove packets. Also call require_running for
5344 breakpoints. Add missing break statement to default case. Tidy.
5345 * target.h (struct target_ops): Rename insert_watchpoint to
5346 insert_point, and remove_watchpoint to remove_point.
5348 * linux-low.h (struct linux_target_ops): Likewise.
5349 * linux-low.c (linux_insert_watchpoint): Rename to ...
5350 (linux_insert_point): ... this. Adjust.
5351 (linux_remove_watchpoint): Rename to ...
5352 (linux_remove_point): ... this. Adjust.
5353 (linux_target_ops): Adjust.
5354 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5355 (cris_insert_point): ... this.
5356 (cris_remove_watchpoint): Rename to ...
5357 (cris_remove_point): ... this.
5358 (the_low_target): Adjust.
5360 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5362 * server.c (handle_v_kill): Pass signal_pid to
5363 kill_inferior if multi_process is zero.
5365 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5367 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5368 * target.h (target_ops): Comment for *_watchpoint to make it clear
5369 the functions can get types '0' and '1'.
5371 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5373 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5374 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5375 * regcache.c (get_regcache): Likewise.
5376 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5377 * win32-low.c (child_fetch_inferior_registers): Remove check for
5380 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5381 Pedro Alves <pedro@codesourcery.com>
5383 * target.h (struct target_ops) <supports_multi_process>: New
5385 (target_supports_multi_process): New.
5386 * server.c (handle_query): Even if GDB reports support, only
5387 enable multi-process if the target also supports it. Report
5388 multi-process support only if the target backend supports it.
5389 * linux-low.c (linux_supports_multi_process): New function.
5390 (linux_target_ops): Install it as target_supports_multi_process
5393 2009-05-24 Doug Evans <dje@google.com>
5395 Global renaming of find_thread_pid to find_thread_ptid.
5396 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5397 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5398 All callers updated.
5400 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5401 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5404 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5405 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5406 (linux_resume_one_lwp): Ditto.
5408 2009-05-23 Doug Evans <dje@google.com>
5410 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5411 from struct inferior_list_entry * to struct lwp_info *.
5412 All callers updated.
5414 2009-05-13 Doug Evans <dje@google.com>
5416 * linux-x86-low.c: Don't include assert.h.
5417 (x86_siginfo_fixup): Use fatal, not assert.
5418 (x86_arch_setup): Fix comment.
5420 2009-05-12 Doug Evans <dje@google.com>
5422 Biarch support for i386/amd64 gdbserver.
5423 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5424 Add linux-x86-low.c.
5425 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5426 (linux-x86-low.o): Add.
5427 * linux-x86-64-low.c: Delete.
5428 * linux-i386-low.c: Delete.
5429 * linux-x86-low.c: New file.
5430 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5432 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5434 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5435 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5436 (linux_child_pid_to_exec_file): New function.
5437 (elf_64_header_p, elf_64_file_p): New functions.
5438 (siginfo_fixup): New function.
5439 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5440 give target a chance to convert layout.
5441 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5442 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5444 2009-05-07 Doug Evans <dje@google.com>
5446 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5447 (regsets_store_inferior_registers): Ditto.
5449 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5453 * linux-low.c (must_set_ptrace_flags): Delete.
5454 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5456 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5457 `lwp->must_set_ptrace_flags' instead.
5458 (linux_wait_for_event_1): Set ptrace options here.
5459 (linux_wait_1): ... not here.
5461 2009-04-30 Doug Evans <dje@google.com>
5463 * inferiors.c (started_inferior_callback): New function.
5464 (attached_inferior_callback): New function.
5465 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5466 * server.c (print_started_pid, print_attached_pid): New functions.
5467 (detach_or_kill_for_exit): New function.
5468 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5469 * server.h (have_started_inferiors_p): Declare.
5470 (have_attached_inferiors_p): Declare.
5472 * inferiors.c (remove_process): Fix memory leak, free process.
5473 * linux-low.c (linux_remove_process): New function.
5474 (linux_kill): Call it instead of remove_process.
5475 (linux_detach, linux_wait_1): Ditto.
5477 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5479 * configure.srv: Add x86 Windows CE target.
5481 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5483 * inferiors.c (get_thread_process): Make global.
5484 * server.h (get_thread_process): Add prototype.
5485 * thread-db.c (find_one_thread): Use get_thread_process
5486 instead of current_process.
5487 (thread_db_get_tls_address): Do not crash if called when
5488 thread layer is not yet initialized.
5490 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5492 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5493 * spu-low.c (current_tid): Rename to ...
5494 (current_ptid): ... this.
5495 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5496 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5497 ptid_get_lwp (current_ptid) instead of current_tid.
5498 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5499 instead of current_tid. Use find_process_pid to verify pid
5500 argument is valid. Pass proper argument to remove_process.
5501 (spu_thread_alive): Compare current_ptid instead of current_tid.
5502 (spu_resume): Likewise.
5504 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5506 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5509 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5511 Implement the multiprocess extensions, and add linux multiprocess
5514 * server.h (ULONGEST): Declare.
5515 (struct ptid, ptid_t): New.
5516 (minus_one_ptid, null_ptid): Declare.
5517 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5518 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5519 (struct inferior_list_entry): Change `id' type from unsigned from
5521 (struct sym_cache, struct breakpoint, struct
5522 process_info_private): Forward declare.
5523 (struct process_info): Declare.
5524 (current_process): Declare.
5525 (all_processes): Declare.
5526 (initialize_inferiors): Declare.
5527 (add_thread): Adjust to use ptid_t.
5528 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5529 (add_process, remove_process, find_thread_pid): Declare.
5530 (find_inferior_id): Adjust to use ptid_t.
5531 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5532 (multi_process): Declare.
5533 (push_event): Adjust to use ptid_t.
5534 (read_ptid, write_ptid): Declare.
5535 (prepare_resume_reply): Adjust to use ptid_t.
5536 (clear_symbol_cache): Declare.
5537 * inferiors.c (all_processes): New.
5538 (null_ptid, minus_one_ptid): New.
5539 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5540 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5541 (add_thread): Change unsigned long to ptid. Remove gdb_id
5543 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5544 (gdb_id_to_thread): Rename to ...
5545 (find_thread_pid): ... this. Change unsigned long to ptid.
5546 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5547 (loaded_dll, pull_pid_from_list): Adjust.
5548 (add_process, remove_process, find_process_pid)
5549 (get_thread_process, current_process, initialize_inferiors): New.
5550 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5551 (struct target_waitstatus) <related_pid>: Ditto.
5552 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5554 (struct target_ops) <join>: Add `pid' argument.
5555 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5556 (struct target_ops) <wait>: Add `ptid' field. Change return type
5558 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5559 (mywait): Add `ptid' argument. Change return type to ptid_t.
5560 (target_pid_to_str): Declare.
5561 * target.c (set_desired_inferior): Adjust to use ptids.
5562 (mywait): Add new `ptid' argument. Adjust.
5563 (target_pid_to_str): New.
5564 * mem-break.h (free_all_breakpoints): Declare.
5565 * mem-break.c (breakpoints): Delelete.
5566 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5567 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5568 to use per-process breakpoint list.
5569 (free_all_breakpoints): New.
5570 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5571 (symbol_cache, all_symbols_looked_up): Delete.
5573 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5575 (prepare_resume_reply): Change ptid argument's type from unsigned
5576 long to ptid_t. Adjust. Implement W;process and X;process.
5577 (free_sym_cache, clear_symbol_cache): New.
5578 (look_up_one_symbol): Adjust to per-process symbol cache. *
5579 * server.c (cont_thread, general_thread, step_thread): Change type
5582 (multi_process): New.
5583 (last_ptid): Change type to ptid_t.
5584 (struct vstop_notif) <ptid>: Change type to ptid_t.
5585 (queue_stop_reply, push_event): Change `ptid' argument's type to
5587 (discard_queued_stop_replies): Add `pid' argument.
5588 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5589 changes. Don't reference the `attached' global.
5590 (attach_inferior): Adjust to mywait interface changes.
5591 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5592 features. Handle and report "multiprocess+". Handle
5594 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5596 (handle_v_kill): New.
5597 (handle_v_stopped): Adjust to use target_pid_to_str.
5598 (handle_v_requests): Allow multiple attaches and runs when
5599 multiprocess extensions are in effect. Handle "vKill".
5600 (myresume): Adjust to use ptids.
5601 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5602 (handle_status): Adjust to discard_queued_stop_replies interface
5604 (first_thread_of, kill_inferior_callback)
5605 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5606 (main): Call initialize_inferiors. Adjust to use ptids, killing
5607 and detaching from all inferiors. Handle multiprocess packet
5609 * linux-low.h: Include gdb_proc_service.h.
5610 (struct process_info_private): New.
5611 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5612 <lwpid_of>: Use ptid_get_lwp.
5613 (get_lwp_thread): Adjust.
5614 (struct lwp_info): Add `dead' member.
5615 (find_lwp_pid): Declare.
5616 * linux-low.c (thread_db_active): Delete.
5617 (new_inferior): Adjust comment.
5618 (inferior_pid): Delete.
5619 (linux_add_process): New.
5620 (handle_extended_wait): Adjust.
5621 (add_lwp): Change unsigned long to ptid.
5622 (linux_create_inferior): Add process to processes table. Adjust
5623 to use ptids. Don't set new_inferior here.
5624 (linux_attach_lwp): Rename to ...
5625 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5626 it. Adjust to use ptids.
5627 (linux_attach_lwp): New.
5628 (linux_attach): Add process to processes table. Don't set
5630 (struct counter): New.
5631 (second_thread_of_pid_p, last_thread_of_process_p): New.
5632 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5634 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5635 processes. Remove process from process table.
5636 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5637 to multiple processes.
5638 (any_thread_of): New.
5639 (linux_detach): Add `pid' argument, and handle it. Remove process
5640 from processes table.
5641 (linux_join): Add `pid' argument. Handle it.
5642 (linux_thread_alive): Change unsighed long argument to ptid_t.
5643 Consider dead lwps as not being alive.
5644 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5645 threads we're not interested in.
5646 (same_lwp, find_lwp_pid): New.
5647 (linux_wait_for_lwp): Change `pid' argument's type from int to
5649 (linux_wait_for_event): Rename to ...
5650 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5651 from int to ptid_t. Adjust.
5652 (linux_wait_for_event): New.
5653 (linux_wait_1): Add `ptid' argument. Change return type to
5654 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5655 that exit from the process table.
5656 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5658 (mark_lwp_dead): New.
5659 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5660 stopping all threads, mark its main lwp as dead.
5661 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5663 (fetch_register, usr_store_inferior_registers)
5664 (regsets_fetch_inferior_registers)
5665 (regsets_store_inferior_registers, linux_read_memory)
5666 (linux_write_memory): Inline `inferior_pid'.
5667 (linux_look_up_symbols): Adjust to use per-process
5669 (linux_request_interrupt): Adjust to use ptids.
5670 (linux_read_auxv): Inline `inferior_pid'.
5671 (initialize_low): Don't reference thread_db_active.
5672 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5673 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5674 (ps_getpid): Return the pid of the current inferior.
5675 * thread-db.c (proc_handle, thread_agent): Delete.
5676 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5678 (find_one_thread): Change argument type to ptid_t. Adjust to
5680 (maybe_attach_thread): Adjust to per-process data and ptids.
5681 (thread_db_find_new_threads): Ditto.
5682 (thread_db_init): Ditto.
5683 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5684 processes table. Adjust to use ptids.
5685 (spu_kill, spu_detach): Adjust interface. Remove process from
5687 (spu_join, spu_thread_alive): Adjust interface.
5688 (spu_wait): Adjust interface. Remove process from processes
5689 table. Adjust to use ptids.
5690 * win32-low.c (current_inferior_tid): Delete.
5691 (current_inferior_ptid): New.
5692 (debug_event_ptid): New.
5693 (thread_rec): Take a ptid. Adjust.
5694 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5695 (child_delete_thread): Ditto.
5696 (do_initial_child_stuff): Add `attached' argument. Add process to
5698 (child_fetch_inferior_registers, child_store_inferior_registers):
5700 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5701 (win32_attach): Pass 1 to do_initial_child_stuff.
5702 (win32_kill): Adjust interface. Remove process from processes
5704 (win32_detach): Ditto.
5705 (win32_join): Adjust interface.
5706 (win32_thread_alive): Take a ptid.
5707 (win32_resume): Adjust to use ptids.
5708 (get_child_debug_event): Ditto.
5709 (win32_wait): Adjust interface. Remove exiting process from
5712 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5714 Non-stop mode support.
5716 * server.h (non_stop): Declare.
5717 (gdb_client_data, handler_func): Declare.
5718 (delete_file_handler, add_file_handler, start_event_loop):
5720 (handle_serial_event, handle_target_event, push_event)
5721 (putpkt_notif): Declare.
5722 * target.h (enum resume_kind): New.
5723 (struct thread_resume): Replace `step' field by `kind' field.
5724 (TARGET_WNOHANG): Define.
5725 (struct target_ops) <wait>: Add `options' argument.
5726 <supports_non_stop, async, start_non_stop>: New fields.
5727 (target_supports_non_stop, target_async): New.
5728 (start_non_stop): Declare.
5729 (mywait): Add `options' argument.
5730 * target.c (mywait): Add `options' argument. Print child exit
5732 (start_non_stop): New.
5733 * server.c (non_stop, own_buf, mem_buf): New globals.
5734 (struct vstop_notif): New.
5735 (notif_queue): New global.
5736 (queue_stop_reply, push_event, discard_queued_stop_replies)
5737 (send_next_stop_reply): New.
5738 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5740 (attach_inferior): In non-stop mode, don't wait for the target
5742 (handle_general_set): Handle QNonStop.
5743 (handle_query): When handling qC, return the current general
5744 thread, instead of the first thread of the list.
5745 (handle_query): If the backend supports non-stop mode, include
5746 QNonStop+ in the qSupported query response.
5747 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5749 (handle_v_attach, handle_v_run): Handle non-stop mode.
5750 (handle_v_stopped): New.
5751 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5752 (myresume): Adjust to use resume_kind. Handle non-stop.
5753 (queue_stop_reply_callback): New.
5754 (handle_status): Handle non-stop mode.
5755 (main): Clear non_stop flag on reconnection. Use the event-loop.
5756 Refactor serial protocol handling from here ...
5757 (process_serial_event): ... to this new function. When GDB
5758 selects any thread, select one here. In non-stop mode, wait until
5759 GDB acks all pending events before exiting.
5760 (handle_serial_event, handle_target_event): New.
5761 * remote-utils.c (remote_open): Install remote_desc in the event
5763 (remote_close): Remove remote_desc from the event loop.
5764 (putpkt_binary): Rename to...
5765 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5766 (putpkt_binary): New as wrapper around putpkt_binary_1.
5767 (putpkt_notif): New.
5768 (prepare_resume_reply): In non-stop mode, don't change the
5770 * event-loop.c: New.
5771 * Makefile.in (OBJ): Add event-loop.o.
5772 (event-loop.o): New rule.
5774 * linux-low.h (pid_of): Moved here.
5776 (get_lwp_thread): Use lwpid_of.
5777 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5778 * linux-low.c (pid_of): Delete.
5779 (inferior_pid): Use lwpid_of.
5780 (linux_event_pipe): New.
5781 (target_is_async_p): New.
5783 (handle_extended_wait): Use lwpid_of.
5784 (add_lwp): Don't set lwpid field.
5785 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5786 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5787 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5788 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5789 first. Adjust to linux_wait_for_event interface changes. Use
5791 (linux_detach): Don't delete the main lwp here.
5792 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5793 (status_pending_p): Don't consider explicitly suspended lwps.
5794 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5795 pointer. Add OPTIONS argument. Change return type to int. Use
5796 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5797 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5798 pointer. Add status pointer argument. Return a pid instead of a
5799 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5800 changes. In non-stop mode, don't switch to a random thread.
5801 (linux_wait): Rename to...
5802 (linux_wait_1): ... this. Add target_options argument, and handle
5803 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5804 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5805 clean exit and signal exit code. Don't stop all threads in
5806 non-stop mode. In all-stop mode, only stop all threads when
5807 reporting a stop to GDB. Handle explicit thread stop requests.
5808 (async_file_flush, async_file_mark): New.
5810 (send_sigstop): Use lwpid_of.
5811 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5812 interface changes. In non-stop mode, don't switch to a random
5814 (linux_resume_one_lwp): Use lwpid_of.
5815 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5816 (linux_resume_one_thread): ... this. Handle resume_stop. In
5817 non-stop mode, don't look for pending flag in all threads.
5818 (resume_status_pending_p): Don't consider explicitly suspended
5820 (my_waitpid): Reimplement. Emulate __WALL.
5821 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5823 (sigchld_handler, linux_supports_non_stop, linux_async)
5824 (linux_start_non_stop): New.
5825 (linux_target_ops): Register linux_supports_non_stop, linux_async
5826 and linux_start_non_stop.
5827 (initialize_low): Install SIGCHLD handler.
5828 * thread-db.c (thread_db_create_event, find_one_thread)
5829 (thread_db_get_tls_address): Use lwpid_of.
5830 * win32-low.c (win32_detach): Adjust to use resume_kind.
5831 (win32_wait): Add `options' argument.
5832 * spu-low.c (spu_resume): Adjust to use resume_kind.
5833 (spu_wait): Add `options' argument.
5835 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5837 Decouple target code from remote protocol.
5839 * target.h (enum target_waitkind): New.
5840 (struct target_waitstatus): New.
5841 (struct target_ops) <wait>: Return an unsigned long. Take a
5842 target_waitstatus pointer instead of a char pointer.
5844 * target.c (mywait): Change prototype to return an unsigned long.
5845 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5846 * server.h (thread_from_wait, old_thread_from_wait): Delete
5848 (prepare_resume_reply): Change prototype to take a
5850 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5851 (last_status, last_ptid): New.
5852 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5853 pid instead of a signal.
5854 (attach_inferior): Remove "status" and "signal" parameters.
5856 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5858 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5859 (handle_v_requests, myresume): Remove "status" and "signal"
5861 (handle_status): New.
5862 (main): Delete local `status'. Adjust.
5863 * remote-utils.c: Include target.h.
5864 (prepare_resume_reply): Change prototype to take a
5865 target_waitstatus. Adjust.
5867 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5869 * spu-low.c (spu_wait): Adjust.
5870 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5872 (win32_wait): Adjust.
5874 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5876 * target.h (struct thread_resume): Delete leave_stopped member.
5877 (struct target_ops): Add a `n' argument to the `resume' callback.
5878 * server.c (start_inferior): Adjust.
5879 (handle_v_cont, myresume): Adjust.
5880 * linux-low.c (check_removed_breakpoint): Adjust to resume
5881 interface change, and to removed leave_stopped field.
5882 (resume_ptr): Delete.
5883 (struct thread_resume_array): New.
5884 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5885 resume interface change.
5886 (linux_continue_one_thread, linux_queue_one_thread)
5887 (resume_status_pending_p): Check if the resume field is NULL
5888 instead of checking the leave_stopped member.
5889 (linux_resume): Adjust to the target resume interface change.
5890 * spu-low.c (spu_resume): Adjust to the target resume interface
5892 * win32-low.c (win32_detach, win32_resume): Ditto.
5894 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5896 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5898 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5900 (linux_continue_one_thread): Only preserve the stepping flag if
5901 there's a pending breakpoint.
5903 2009-03-31 Pedro Alves <pedro@codesourcery.com>
5905 * server.c (main): After the inferior having exited, call
5906 remote_close before exiting gdbserver.
5908 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5910 Fix size of FPSCR in Power 7 processors.
5911 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5912 (PPC_FEATURE_HAS_DFP): New #define.
5913 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5916 2009-03-23 Pedro Alves <pedro@codesourcery.com>
5918 * server.c (handle_query) Whitespace and formatting.
5920 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5922 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5923 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5924 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5925 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5926 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5927 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5928 Makefile.in, configure.ac: Fix whitespace throughout.
5929 * configure: Regenerate.
5931 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5933 * inferiors.c (find_inferior): Make it safe for the callback
5934 function to delete the currently iterated inferior.
5936 2009-03-22 Pedro Alves <pedro@codesourcery.com>
5938 * Makefile.in (linuw_low_h): Move higher.
5939 (thread-db.o): Depend on $(linux_low_h).
5941 2009-03-17 Pedro Alves <pedro@codesourcery.com>
5943 Rename "process" to "lwp" throughout.
5945 * linux-low.c (all_processes): Rename to...
5946 (all_lwps): ... this.
5947 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5948 (add_process): Rename to ...
5949 (add_lwp): ... this. Adjust.
5950 (linux_create_inferior): Adjust.
5951 (linux_attach_lwp): Adjust.
5952 (linux_attach): Adjust.
5953 (linux_kill_one_process): Rename to ...
5954 (linux_kill_one_lwp): ... this. Adjust.
5955 (linux_kill): Adjust.
5956 (linux_detach_one_process): Rename to ...
5957 (linux_detach_one_lwp): ... this. Adjust.
5958 (linux_detach): Adjust.
5959 (check_removed_breakpoint): Adjust.
5960 (status_pending_p): Adjust.
5961 (linux_wait_for_process): Rename to ...
5962 (linux_wait_for_lwp): ... this. Adjust.
5963 (linux_wait_for_event): Adjust.
5964 (send_sigstop): Adjust.
5965 (wait_for_sigstop): Adjust.
5966 (stop_all_processes): Rename to ...
5967 (stop_all_lwps): ... this.
5968 (linux_resume_one_process): Rename to ...
5969 (linux_resume_one_lwp): ... this. Adjust.
5970 (linux_set_resume_request, linux_continue_one_thread)
5971 (linux_queue_one_thread, resume_status_pending_p)
5972 (usr_store_inferior_registers, regsets_store_inferior_registers)
5973 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5975 * linux-low.h (get_process): Rename to ...
5976 (get_lwp): ... this. Adjust.
5977 (get_thread_process): Rename to ...
5978 (get_thread_lwp): ... this. Adjust.
5979 (get_process_thread): Rename to ...
5980 (get_lwp_thread): ... this. Adjust.
5981 (struct process_info): Rename to ...
5982 (struct lwp_info): ... this.
5983 (all_processes): Rename to ...
5984 (all_lwps): ... this.
5985 * proc-service.c (ps_lgetregs): Adjust.
5986 * thread-db.c (thread_db_create_event, find_one_thread)
5987 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5989 2009-03-14 Pedro Alves <pedro@codesourcery.com>
5991 * server.c (handle_query): Handle "qAttached".
5993 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5995 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5996 GPLv3, update license URL.
5998 2009-03-01 Doug Evans <dje@google.com>
6000 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6001 (server_h): Add gdb_signals.h.
6002 (signals.o): Update.
6003 * server.h (target_signal_from_host,target_signal_to_host_p)
6004 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6006 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6008 * remote-utils.c (getpkt): Also generate remote-debug
6009 information if noack_mode is set.
6011 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6013 * server.c (handle_query): Report qXfer:siginfo:read and
6014 qXfer:siginfo:write as supported and handle them.
6015 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6016 * linux-low.c (linux_xfer_siginfo): New.
6017 (linux_target_ops): Set it.
6019 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6021 * server.c (gdbserver_usage): Mention --remote-debug.
6022 (main): Accept '--remote-debug' switch.
6024 2009-01-18 Doug Evans <dje@google.com>
6026 * regcache.c (new_register_cache): No need to check result of xcalloc.
6027 * server.c (handle_search_memory): Back out calls to xmalloc,
6028 result is checked and error is returned to user upon failure.
6029 (handle_query): Ditto. Add more checks for result of malloc.
6030 (handle_v_cont): Check result of malloc, report error back to
6032 (handle_v_run): Ditto. Call freeargv.
6033 * server.h (freeargv): Declare.
6034 * utils.c (freeargv): New fn.
6036 2009-01-15 Doug Evans <dje@google.com>
6038 * gdbreplay.c (perror_with_name): Make arg const char *.
6039 * server.h (target_signal_to_name): Make return type const char *.
6040 * thread-db.c (thread_db_err_str): Make return type const char *.
6041 * utils.c (perror_with_name): Make arg const char *.
6043 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6045 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6046 when handling a EXIT_PROCESS_DEBUG_EVENT.
6048 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6050 * gdbreplay.c (gdbreplay_version): Update copyright year.
6051 * server.c (gdbserver_version): Likewise.
6053 2009-01-05 Doug Evans <dje@google.com>
6055 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6056 (handle_extended_wait): Improve comment.
6058 2008-12-13 Doug Evans <dje@google.com>
6060 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6061 * server.h (ATTR_MALLOC): New macro.
6062 (xmalloc,xcalloc,xstrdup): Declare.
6063 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6064 * inferiors.c: Ditto.
6065 * linux-low.c: Ditto.
6066 * mem-break.c: Ditto.
6067 * regcache.c: Ditto.
6068 * remote-utils.c: Ditto.
6071 * win32-low.c: Ditto.
6073 2008-12-12 Doug Evans <dje@google.com>
6075 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6076 in debugging printf.
6078 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6080 2008-12-09 Doug Evans <dje@google.com>
6082 * linux-low.h (struct process_info): Delete member tid, unused.
6083 * thread-db.c (find_one_thread): Update.
6084 (maybe_attach_thread): Update.
6086 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6088 * target.h (struct target_ops): Add qxfer_osdata member.
6089 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6091 (linux_qxfer_osdata): New functions.
6092 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6094 * server.c (handle_query): Handle "qXfer:osdata:read:".
6095 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6096 (buffer_xml_printf): New functions.
6097 * server.h (struct buffer): New.
6098 (buffer_grow_str, buffer_grow_str0): New macros.
6099 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6100 (buffer_xml_printf): Declare.
6102 2008-11-24 Doug Evans <dje@google.com>
6104 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6106 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6108 * server.c (handle_v_run): Always use the supplied argument list.
6110 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6112 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6113 (xtensa_regmap_table): Add entry for scompare1.
6115 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6117 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6118 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6119 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6120 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6121 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6122 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6123 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6124 XML target descriptions.
6125 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6126 when inferior is running on an ISA 2.05 or later processor. Add
6127 special case to return offset for full 64-bit slot of FPSCR when
6130 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6132 * Makefile.in (SFILES, clean): Added sparc64 files.
6133 (reg-sparc64.o, reg-sparc64.c): New.
6134 * configure.srv (sparc*-*-linux*): New configuration.
6135 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6136 syscall arguments for SPARC.
6137 (regsets_store_inferior_registers): Likewise.
6138 * linux-sparc-low.c: New file.
6140 2008-10-21 Doug Evans <dje@google.com>
6142 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6143 (READLINE_DIR,READLINE_DEP): Delete.
6144 (INTERNAL_CFLAGS): Update.
6145 (LINTFLAGS): Update.
6147 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6149 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6150 whole argv from the last run, not just argv[0].
6152 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6154 * regcache.c (new_register_cache): Return NULL if the register
6155 cache size isn't known yet.
6156 (free_register_cache): Avoid dereferencing a NULL regcache.
6158 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6160 * configure.srv: Merge MIPS and MIPS64.
6162 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6164 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6166 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6168 * Makefile.in: Add required vsx dependencies.
6170 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6171 Declare init_registers_powerpc_vsx32l.
6172 Declare init_registers_powerpc_vsx64l.
6173 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6174 (ppc_arch_setup): Check for VSX in hwcap.
6175 (ppc_fill_vsxregset): New function.
6176 (ppc_store_vsxregset): New function.
6177 Add new VSX entry in regset_info target_regsets.
6179 * configure.srv: Add new VSX dependencies.
6181 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6183 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6184 (remote_open): Set or clear transport_is_reliable.
6185 (putpkt_binary): Don't expect acks in noack mode.
6186 (getpkt): Don't send ack/nac in noack mode.
6187 * server.c (handle_general_set): Handle QStartNoAckMode.
6188 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6190 (main): Reset noack_mode on every connection.
6191 * server.h (noack_mode): Declare.
6193 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6195 * Makefile.in (GDBREPLAY_OBS): New variable.
6196 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6198 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6199 Daniel Jacobowitz <dan@codesourcery.com>
6201 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6202 (usr_store_inferior_registers): Likewise.
6203 (regsets_store_inferior_registers): Likewise.
6205 2008-07-31 Rolf Jansen <rj@surtec.com>
6206 Pedro Alves <pedro@codesourcery.com>
6208 * configure.ac: Check for memmem declaration.
6209 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6210 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6211 (disable_packet_qfThreadInfo): Unconditionally compile.
6212 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6213 * configure, config.in: Regenerate.
6215 2008-07-28 Doug Kwan <dougkwan@google.com>
6217 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6218 (linux_write_memory): Remove declaration of errno.
6220 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6222 * linux-low.c (handle_extended_wait): Do not use "status"
6223 variable uninitialized.
6225 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6227 * server.c (handle_v_attach): Inhibit reporting dll changes.
6229 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6231 * remote-utils.c (prepare_resume_reply): If requested, don't
6232 output "thread:TID" in the T stop reply.
6234 * server.c (disable_packet_vCont, disable_packet_Tthread)
6235 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6236 (handle_query): If requested, disable support for qC, qfThreadInfo
6238 (handle_v_requests): If requested, disable support for vCont.
6239 (gdbserver_show_disableable): New.
6240 (main): Handle --disable-packet and --disable-packet=LIST.
6242 * server.h (disable_packet_vCont, disable_packet_Tthread)
6243 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6245 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6247 * server.c (gdbserver_usage): Mention --version.
6249 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6251 * Makefile.in (gdbreplay.o): New rule.
6253 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6255 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6256 message, not gdbserver.
6258 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6259 Nathan Sidwell <nathan@codesourcery.com>
6260 Joseph Myers <joseph@codesourcery.com>
6262 * acinclude.m4: Include ../../config/acx.m4.
6263 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6264 * configure, config.in: Regenerate.
6265 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6266 * server.c (gdbserver_version): Print PKGVERSION.
6267 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6268 (main): Adjust gdbserver_usage calls.
6269 * gdbreplay.c (version, host_name): Add declarations.
6270 (gdbreplay_version, gdbreplay_usage): New.
6271 (main): Accept --version and --help options.
6273 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6275 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6276 (arm_breakpoint_at): Handle Thumb.
6277 (the_low_target): Add comment.
6279 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6281 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6283 2008-05-09 Doug Evans <dje@google.com>
6285 * server.h (decode_search_memory_packet): Declare.
6286 * remote-utils.c (decode_search_memory_packet): New fn.
6287 * server.c (handle_search_memory_1): New fn.
6288 (handle_search_memory): New fn.
6289 (handle_query): Process qSearch:memory packets.
6291 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6293 * regcache.c (registers_length): Remove.
6294 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6295 full register packet.
6296 * regcache.h (registers_length): Remove prototype.
6297 * server.h (PBUFSIZ): Define to 16384.
6299 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6301 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6302 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6303 powerpc-64l.o, and powerpc-altivec64l.o.
6304 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6305 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6306 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6307 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6308 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6311 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6312 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6313 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6314 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6315 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6316 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6317 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6318 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6319 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6320 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6323 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6324 (init_registers_powerpc_32l): ... this new prototype.
6325 (init_registers_powerpc_32): Remove, replace by ...
6326 (init_registers_powerpc_altivec32l): ... this new prototype.
6327 (init_registers_powerpc_e500): Remove, replace by ...
6328 (init_registers_powerpc_e500l): ... this new prototype.
6329 (init_registers_ppc64): Remove, replace by ...
6330 (init_registers_powerpc_64l): ... this new prototype.
6331 (init_registers_powerpc_64): Remove, replace by ...
6332 (init_registers_powerpc_altivec64l): ... this new prototype.
6333 (ppc_num_regs): Set to 73.
6334 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6335 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6336 (ppc_cannot_store_register): Handle orig_r3 and trap.
6337 (ppc_arch_setup): Update init_registers_... calls.
6338 (ppc_fill_gregset): Handle orig_r3 and trap.
6340 * inferiors.c (clear_inferiors): Reset current_inferior.
6342 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6344 * acinclude.m4: Add override.m4.
6345 * configure: Regenerate.
6347 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6349 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6350 initial call to init_register_ppc64.
6352 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6354 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6355 single powerpc*-*-linux* case.
6356 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6358 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6360 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6361 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6363 * linux-ppc-low.c: Include <elf.h>.
6364 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6365 (ppc_hwcap): New global variable.
6366 (ppc_regmap): Remove __SPE__ #ifdef sections.
6367 (ppc_regmap_e500): New global variable.
6368 (ppc_cannot_store_register): Update __SPE__ special case.
6369 (ppc_get_hwcap): New function.
6370 (ppc_arch_setup): Use it to determine whether inferior supports
6371 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6372 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6373 Do not access registers if target does not support AltiVec.
6374 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6375 Do not access registers if target does not support SPE.
6376 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6378 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6380 * linux-low.c (disabled_regsets, num_regsets): New.
6381 (use_regsets_p): Delete.
6382 (linux_wait_for_process): Clear disabled_regsets.
6383 (regsets_fetch_inferior_registers): Check and set it.
6384 (regsets_store_inferior_registers): Likewise.
6385 (linux_fetch_registers, linux_store_registers): Do not use
6387 (initialize_low): Allocate disabled_regsets.
6389 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6391 * Makefile.in (LIBOBJS): New.
6393 (memmem.o): New rule.
6394 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6395 * configure: Regenerated.
6397 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6399 * server.c (handle_query): Never return "unsupported" for
6400 qXfer:features:read queries.
6402 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6404 * server.c (get_features_xml): Fix inverted condition.
6405 (handle_query): Always support qXfer:feature:read.
6407 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6409 * server.c (wrapper_argv): New.
6410 (start_inferior): Handle wrapper_argv. If set, expect an extra
6412 (gdbserver_usage): Document --wrapper.
6413 (main): Parse --wrapper.
6415 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6417 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6418 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6419 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6420 (ppc_set_pc): Likewise.
6421 (ppc_arch_setup): New function.
6422 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6423 of collect_register.
6424 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6426 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6428 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6429 instead of linux-ppc64-low.o.
6430 * linux-ppc64-low.c: Remove file.
6431 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6432 (linux-ppc64-low.o): Remove rule.
6434 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6435 (init_registers_powerpc_64): Likewise.
6436 (ppc_regmap): Conditionally define depending on __powerpc64__.
6437 (ppc_cannot_store_register): Do not special-case "fpscr" when
6438 compiled on __powerpc64__.
6439 (ppc_collect_ptrace_register): New function.
6440 (ppc_supply_ptrace_register): New function.
6441 (ppc_breakpoint): Change type to "unsigned int".
6442 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6443 (the_low_target): Conditionally provide initializers for the
6444 arch_setup member depending on __powerpc64__. Install
6445 collect_ptrace_register and supply_ptrace_register members.
6447 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6449 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6450 * server.c (gdbserver_xmltarget): Define.
6451 (get_features_xml): Use it to replace "target.xml" and arch_string.
6453 * configure.srv: Remove srv_xmltarget. Add XML files that were
6454 mentioned there to srv_xmlfiles instead. Remove conditional tests
6455 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6456 srv_xmlfiles and srv_regobj to include all possible choices.
6457 * configure.ac (srv_xmltarget): Remove.
6458 (srv_xmlfiles): Do not add "target.xml".
6459 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6460 checks for supplementary target information.
6461 * configure: Regenerate.
6462 * Makefile.in (XML_TARGET): Remove.
6463 (target.xml): Remove rule.
6464 (clean): Do not clean up target.xml.
6465 (.PRECIOUS): Do not mention target.xml.
6467 * target.h (struct target_ops): Remove arch_string member.
6468 * linux-low.c (linux_arch_string): Remove.
6469 (linux_target_ops): Remove arch_string initializer.
6470 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6471 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6472 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6473 * spu-low.c (spu_arch_string): Remove.
6474 (spu_target_ops): Remove arch_string initializer.
6475 * win32-low.c (win32_arch_string): Remove.
6476 (win32_target_ops): Remove arch_string initializer.
6477 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6478 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6479 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6481 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6483 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6484 by collect_ptrace_register and supply_ptrace_register hooks.
6485 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6486 instead of checking for the_low_target.left_pad_xfer.
6487 (usr_store_inferior_registers): Use collect_ptrace_register callback
6488 instead of checking for the_low_target.left_pad_xfer.
6490 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6491 (s390_supply_ptrace_register): Likewise.
6492 (s390_fill_gregset): Call s390_collect_ptrace_register.
6493 (the_low_target): Update.
6495 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6496 (ppc_supply_ptrace_register): Likewise.
6497 (the_low_target): Update.
6499 * linux-i386-low.c (the_low_target): Update.
6500 * linux-x86-64-low.c (the_low_target): Update.
6502 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6504 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6505 reg-s390.o and reg-s390x.o.
6507 * linux-low.c (new_inferior): New global variable.
6508 (linux_create_inferior, linux_attach): Set it.
6509 (linux_wait_for_process): Call the_low_target.arch_setup after the
6510 target has stopped for the first time.
6511 (initialize_low): Do not call the_low_target.arch_setup.
6513 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6514 (s390_set_pc): Likewise.
6515 (s390_arch_setup): New function.
6516 (the_low_target): Use s390_arch_setup as arch_setup routine.
6518 * regcache.c (realloc_register_cache): New function.
6519 (set_register_cache): Call it for each existing regcache.
6521 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6523 * server.h (init_registers): Remove prototype.
6525 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6526 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6527 instead of init_registers ().
6528 * linux-arm-low.c (init_registers_arm): Add prototype.
6529 (init_registers_arm_with_iwmmxt): Likewise.
6530 (the_low_target): Add initializer for arch_setup field.
6531 * linux-cris-low.c (init_registers_cris): Add prototype.
6532 (the_low_target): Add initializer for arch_setup field.
6533 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6534 (the_low_target): Add initializer for arch_setup field.
6535 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6536 (the_low_target): Add initializer for arch_setup field.
6537 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6538 (the_low_target): Add initializer for arch_setup field.
6539 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6540 (the_low_target): Add initializer for arch_setup field.
6541 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6542 (the_low_target): Add initializer for arch_setup field.
6543 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6544 (init_registers_mips64_linux): Likewise.
6545 (the_low_target): Add initializer for arch_setup field.
6546 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6547 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6548 (the_low_target): Add initializer for arch_setup field.
6549 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6550 (init_registers_powerpc_64): Likewise.
6551 (the_low_target): Add initializer for arch_setup field.
6552 * linux-s390-low.c (init_registers_s390): Add prototype.
6553 (init_registers_s390x): Likewise.
6554 (the_low_target): Add initializer for arch_setup field.
6555 * linux-sh-low.c (init_registers_sh): Add prototype.
6556 (the_low_target): Add initializer for arch_setup field.
6557 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6558 (the_low_target): Add initializer for arch_setup field.
6559 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6560 (the_low_target): Add initializer for arch_setup field.
6562 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6563 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6564 instead of init_registers ().
6565 * win32-arm-low.c (init_registers_arm): Add prototype.
6566 (the_low_target): Add initializer for arch_setup field.
6567 * win32-i386-low.c (init_registers_i386): Add prototype.
6568 (the_low_target): Add initializer for arch_setup field.
6570 * spu-low.c (init_registers_spu): Add prototype.
6571 (initialize_low): Call initialie_registers_spu () instead of
6572 initialize_registers ().
6574 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6576 * server.c (handle_v_requests): When handling the vRun and vAttach
6577 packets, if already debugging a process, don't kill it. Return an
6580 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6582 * server.c (handle_query): Correct length check.
6584 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6586 * win32-low.c (do_initial_child_stuff): Add process handle
6587 parameter. Set current_process_handle and current_process_id from the
6588 parameters. Clear globals.
6589 (win32_create_inferior): Don't set current_process_handle and
6590 current_process_id here. Instead pass them on the call to
6591 do_initial_child_stuff.
6592 (win32_attach): Likewise.
6593 (win32_clear_inferiors): New.
6594 (win32_kill): Don't close the current process handle or the
6595 current thread handle here. Instead call win32_clear_inferiors.
6596 (win32_detach): Don't open a new handle to the process. Call
6597 win32_clear_inferiors.
6598 (win32_join): Don't rely on current_process_handle; open a new
6599 handle using the process id.
6600 (win32_wait): Call win32_clear_inferiors when the inferior process
6603 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6605 * server.c (monitor_show_help): Add "exit".
6607 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6609 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6610 (clean): Add reg-xtensa.c.
6611 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6612 * configure.srv (xtensa*-*-linux*) New target.
6613 * linux-xtensa-low.c: New.
6614 * xtensa-xtregs.c: New.
6616 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6618 * hostio.c: Don't include errno.h.
6619 (errno_to_fileio_errno): Move to hostio-errno.
6620 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6621 error number outputting to the target->hostio_last_error callback.
6622 (hostio_packet_error): Use FILEIO_EINVAL directly.
6623 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6624 calls to hostio_error.
6625 * hostio-errno.c: New.
6626 * server.h (hostio_last_error_from_errno): Declare.
6627 * target.h (target_ops): Add hostio_last_error member.
6628 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6629 as hostio_last_error handler.
6630 * spu-low.c (spu_target_ops): Likewise.
6631 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6632 (wince_hostio_last_error): New functions.
6633 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6634 as hostio_last_error handler.
6635 (win32_target_ops) [!_WIN32_WCE]: Register
6636 hostio_last_error_from_errno as hostio_last_error handler.
6637 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6638 (hostio-errno.o): New rule.
6639 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6640 * configure.srv (srv_hostio_err_objs): New variable. Default to
6642 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6643 * configure: Regenerate.
6645 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6647 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6648 (linux_kill, linux_detach): Clean up the process list.
6649 * remote-utils.c (remote_open): Improve port number parsing.
6650 (putpkt_binary, input_interrupt): Only send interrupts if the target
6652 * server.c (extended_protocol): Make static.
6653 (attached): Define earlier.
6654 (exit_requested, response_needed, program_argv): New variables.
6655 (target_running): New.
6656 (start_inferior): Clear attached here.
6657 (attach_inferior): Set attached here.
6658 (require_running): Define.
6659 (handle_query): Use require_running and target_running. Implement
6661 (handle_v_attach, handle_v_run): New.
6662 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6663 (gdbserver_usage): Update.
6664 (main): Redo argument parsing. Handle --debug and --multi. Handle
6665 --attach along with other options or after the port. Save
6666 program_argv. Support no initial program. Resynchronize
6667 communication with GDB after an error. Handle "monitor exit".
6668 Use require_running and target_running. Always allow the extended
6669 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6670 restart in extended mode.
6671 * README: Refer to the GDB manual. Update --attach usage.
6673 2007-12-20 Andreas Schwab <schwab@suse.de>
6675 * linux-low.c (STACK_SIZE): Define.
6676 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6677 (linux_test_for_tracefork): Likewise.
6679 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6681 * linux-low.c (linux_wait_for_event): Update messages. Do not
6682 reinsert auto-delete breakpoints.
6683 * mem-break.c (struct breakpoint): Change return type of handler to
6685 (set_breakpoint_at): Update handler type.
6686 (reinsert_breakpoint_handler): Return 1 instead of calling
6688 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6690 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6691 * mem-break.h (set_breakpoint_at): Update handler type.
6692 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6693 * win32-low.c (auto_delete_breakpoint): New.
6694 (get_child_debug_event): Use it.
6696 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6698 * configure.ac: Check for pread and pwrite.
6699 * hostio.c (handle_pread): Fall back to lseek and read.
6700 (handle_pwrite): Fall back to lseek and write.
6701 * config.in, configure: Regenerated.
6703 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6705 * server.c (myresume): Add own_buf argument.
6706 (main): Update calls.
6708 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6710 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6711 * remote-utils.c (remote_open): Do not call disable_async_io.
6712 (block_async_io): Delete.
6713 (unblock_async_io): Make static.
6714 (initialize_async_io): New.
6715 * server.c (handle_v_cont): Handle async I/O here.
6716 (myresume): Likewise. Move other common resume tasks here...
6717 (main): ... from here. Call initialize_async_io. Disable async
6718 I/O before the main loop.
6719 * server.h (initialize_async_io): Declare.
6720 (block_async_io, unblock_async_io): Delete prototypes.
6721 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6723 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6725 * remote-utils.c (readchar): Allow binary data in received messages.
6727 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6729 * win32-low.c (attaching): New global.
6730 (win32_create_inferior): Clear the `attaching' global.
6731 (win32_attach): Set the `attaching' global.
6732 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6733 attaching. Only set a breakpoint at the entry point if not
6736 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6738 * server.c (main): Don't report dll events on the initial
6739 connection on attaches.
6741 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6743 * server.c (main): Relax numerical bases supported for the pid of
6744 the --attach command line argument.
6746 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6748 * win32-low.c (win32_attach): Call OpenProcess before
6749 DebugActiveProcess, not after. Add last error output to error
6752 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6754 * win32-low.c (win32_get_thread_context)
6755 (win32_set_thread_context): New functions.
6756 (thread_rec): Use win32_get_thread_context.
6757 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6758 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6761 2007-12-03 Leo Zayas
6762 Pedro Alves <pedro_alves@portugalmail.pt>
6764 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6766 (child_add_thread): Minor cleanup.
6767 (child_continue): Resume artificially suspended threads before
6768 calling ContinueDebugEvent.
6769 (suspend_one_thread): New.
6770 (fake_breakpoint_event): New.
6771 (get_child_debug_event): Change return type to int. Check here if
6772 gdb sent an interrupt request. If a soft interrupt was requested,
6773 fake a breakpoint event. Return 0 if there is no event to handle,
6775 (win32_wait): Don't check here if gdb sent an interrupt request.
6776 Ensure there is a valid event to handle.
6777 (win32_request_interrupt): Add soft interruption method as last
6780 2007-12-03 Leo Zayas
6781 Pedro Alves <pedro_alves@portugalmail.pt>
6783 * win32-low.h (win32_thread_info): Add descriptions to the
6784 structure members. Replace `suspend_count' counter by a
6786 * win32-low.c (thread_rec): Update condition of when to get the
6787 context from the inferior. Rely on ContextFlags being set if it
6788 has already been retrieved. Only suspend the inferior thread if
6789 we haven't already. Warn if that fails.
6790 (continue_one_thread): s/suspend_count/suspended/. Only call
6791 ResumeThread once. Warn if that fails.
6793 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6795 * win32-low.c (win32_wait): Don't read from the inferior when it
6798 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6800 * Makefile.in (win32_low_h): New variable.
6801 (win32-low.o): Add dependency on $(win32_low_h).
6802 (win32-arm-low.o, win32-i386-low.o): New rules.
6804 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6806 * hostio.c: Correct copyright year.
6808 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6810 * Makefile.in (OBS): Add hostio.o.
6811 (hostio.o): New rule.
6812 * server.h (handle_vFile): Declare.
6813 * hostio.c: New file.
6814 * server.c (handle_v_requests): Take packet_len and new_packet_len
6815 for binary packets. Call handle_vFile.
6816 (main): Update call to handle_v_requests.
6818 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6820 * linux-low.c: Include <sched.h>.
6822 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6824 * linux-low.c (linux_tracefork_grandchild): New.
6825 (linux_tracefork_child): Use clone.
6826 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6828 2007-10-31 Joel Brobecker <brobecker@adacore.com>
6830 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6832 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6834 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6836 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6838 * inferiors.c (change_inferior_id): Delete.
6839 (add_pid_to_list, pull_pid_from_list): New.
6840 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6841 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6842 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6843 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6844 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6845 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6846 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6847 (using_threads): Always set to 1.
6848 (handle_extended_wait): New.
6849 (add_process): Do not set TID.
6850 (linux_create_inferior): Set must_set_ptrace_flags.
6851 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6852 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6853 (linux_thread_alive): Rename TID argument to LWPID.
6854 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6855 (linux_wait_for_event): Do not use TID or check using_threads. Update
6856 call to dead_thread_notify. Call handle_extended_wait.
6857 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6858 (send_sigstop): Delete sigstop_sent.
6859 (wait_for_sigstop): Avoid TID.
6860 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6861 (linux_test_for_tracefork): New.
6862 (linux_lookup_signals): Use thread_db_active and
6863 linux_supports_tracefork_flag.
6864 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6865 * linux-low.h (get_process_thread): Avoid TID.
6866 (struct process_ifo): Move thread_known and tid to the end. Remove
6868 (linux_attach_lwp, thread_db_init): Update prototypes.
6869 * server.h (change_inferior_id): Delete prototype.
6870 (add_pid_to_list, pull_pid_from_list): New prototypes.
6871 * thread-db.c (thread_db_use_events): New.
6872 (find_first_thread): Rename to...
6873 (find_one_thread): ...this. Update callers and messages. Do not
6874 call fatal. Check thread_db_use_events. Do not call
6875 change_inferior_id or new_thread_notify.
6876 (maybe_attach_thread): Update. Do not call new_thread_notify.
6877 (thread_db_init): Set thread_db_use_events. Check use_events.
6878 * utils.c (fatal, warning): Correct message prefix.
6880 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6882 * Makefile.in (clean): Remove new files.
6883 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6884 (powerpc-64.o, powerpc-64.c): New rules.
6885 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6886 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6888 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6890 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6891 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6892 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6893 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6894 (target_regsets): Add AltiVec and SPE register sets.
6895 * configure.ac: Check for AltiVec and SPE.
6896 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6897 (ppc_fill_vrregset, ppc_store_vrregset): New.
6898 (target_regsets): Add AltiVec register set.
6899 * configure: Regenerated.
6901 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6903 * linux-low.c (O_LARGEFILE): Define.
6904 (linux_read_memory): Use /proc/PID/mem.
6905 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6906 * configure, config.in: Regenerated.
6908 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6910 * linux-low.c (linux_wait_for_event): Do not pass signals while
6913 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6915 * win32-low.c (create_process): New.
6916 (win32_create_inferior): Use create_process instead of
6917 CreateProcess. If create_process failed retry appending an ".exe"
6918 suffix. Store the GetLastError result immediatelly after
6919 create_process calls and use it on the call to error.
6921 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6923 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6925 2007-08-23 Joel Brobecker <brobecker@adacore.com>
6927 * configure.ac: Switch license to GPLv3.
6929 2007-08-01 Michael Snyder <msnyder@access-company.com>
6931 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6933 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6935 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6937 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6938 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6939 CloseToolhelp32Snapshot.
6940 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6941 CloseToolhelp32Snapshot.
6943 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
6945 * server.c (main): Check for inferior exit before main loop.
6947 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6949 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6950 instead of on tmp_desc.
6952 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6953 Daniel Jacobowitz <dan@codesourcery.com>
6955 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6956 (add_thread): Minor cleanups.
6957 (clear_inferiors): Move lower in the file. Clear the DLL
6959 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6960 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6961 (xml_escape_text): New.
6962 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6964 (handle_v_cont): Report errors.
6965 (gdbserver_version): Update.
6966 (main): Correct size of own_buf. Do not report initial DLL events.
6967 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6968 (unloaded_dll, xml_escape_text): New.
6969 * win32-low.c (enum target_waitkind): Update comments.
6970 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6971 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6972 (win32_EnumProcessModules, win32_GetModuleInformation)
6973 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6974 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6975 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6976 (win32_Module32First, win32_Module32Next, load_toolhelp)
6977 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6978 (get_child_debug_event): Handle DLL events.
6979 (win32_wait): Likewise.
6981 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6983 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6984 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6986 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6988 * win32-low.c (handle_output_debug_string): Ignore event if not
6991 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6993 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6995 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6997 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6999 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7001 * inferiors.c (change_inferior_id): Add comment.
7002 * linux-low.c (check_removed_breakpoint): Add an early
7003 prototype. Improve debug output.
7004 (linux_attach): Doc update.
7005 (linux_detach_one_process, linux_detach): Clean up before releasing
7007 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7008 * linux-low.h (struct process_info): Doc improvement.
7009 * mem-break.c (delete_all_breakpoints): New.
7010 * mem-break.h (delete_all_breakpoints): New prototype.
7011 * thread-db.c (find_first_thread): New.
7012 (thread_db_create_event): Call it instead of
7013 thread_db_find_new_threads. Clean up unused variables.
7014 (maybe_attach_thread): Remove first thread handling.
7015 (thread_db_find_new_threads): Use find_first_thread.
7016 (thread_db_get_tls_address): Likewise.
7018 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7020 * thread-db.c (thread_db_find_new_threads): Add prototype.
7021 (thread_db_create_event): Check for the main thread before adding
7023 (maybe_attach_thread): Only enable event reporting if TID == 0.
7024 (thread_db_get_tls_address): Check for new threads.
7026 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7028 * linux-low.c (linux_create_inferior): Try execv before execvp.
7029 * spu-low.c (spu_create_inferior): Likewise.
7031 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7033 * linux-low.c (linux_create_inferior): Change execv to execvp.
7034 * spu-low.c (spu_create_inferior): Likewies.
7036 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7038 * Makefile.in (clean): Clean new files instead of deleted ones.
7039 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7040 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7042 * configure.srv: Specify XML files and new regformats for MIPS and
7044 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7045 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7046 an entry for the restart register.
7047 (mips_cannot_fetch_register, mips_cannot_store_register)
7048 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7049 register names to match the XML descriptions.
7050 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7051 restart register instead of $0.
7053 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7054 Markus Deuling <deuling@de.ibm.com>
7056 * remote-utils.c (decode_xfer_write): New function.
7057 * server.h (decode_xfer_write): Add prototype.
7058 * server.c (handle_query): Add PACKET_LEN argument. Support
7059 qXfer:spu:read and qXfer:spu:write packets.
7060 (main): Pass packet_len to handle_query.
7061 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7062 * target.h (target_ops): Add qxfer_spu.
7064 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7066 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7067 accessing non-seekable spufs files.
7069 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7071 * server.c (handle_query): Add reply for qC packet.
7073 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7074 Leo Zayas <lerele@champenstudios@com>
7076 * server.h (check_remote_input_interrupt_request): New function.
7077 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7078 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7079 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7080 (check_remote_input_interrupt_request): New function.
7081 * server.h (check_remote_input_interrupt_request): Declare.
7082 * win32-low.c (winapi_DebugBreakProcess,
7083 winapi_GenerateConsoleCtrlEvent): New typedefs.
7084 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7086 (win32_wait): Check for remote interrupt request
7087 with check_remote_input_interrupt_request.
7088 (win32_request_interrupt): New function.
7089 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7093 * win32-low.c (debug_registers_changed,
7094 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7095 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7096 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7097 (thread_rec): Get context using the low target.
7098 (child_add_thread): Call thread_added on the low target,
7099 which does the same thing.
7101 (do_initial_child_stuff): Remove debug registers references.
7102 Set context using the low target. Resume threads after
7103 setting the contexts.
7104 (child_continue): Remove dead variable. Remove debug
7105 registers references.
7106 (child_fetch_inferior_registers): Go through the low target.
7107 (do_child_store_inferior_registers): Remove.
7108 (child_store_inferior_registers): Go through the low target.
7109 (win32_resume): Remove debug registers references.
7110 Set context using the low target.
7111 (handle_exception): Change return type to void. Don't record
7112 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7113 first chance exception.
7114 (get_child_debug_event): Change return type to void. Remove
7115 goto loop. Always return after waiting for debug event.
7116 (win32_wait): Convert to switch statement. Handle spurious
7119 * win32-i386-low.c (debug_registers_changed,
7120 debug_registers_used): New.
7121 (initial_stuff): Rename to ...
7122 (i386_initial_stuff): ... this. Clear debug registers
7124 (store_debug_registers): Delete.
7125 (i386_get_thread_context): New.
7126 (load_debug_registers): Delete.
7127 (i386_set_thread_context): New.
7128 (i386_thread_added): New.
7129 (single_step): Rename to ...
7130 (i386_single_step): ... this.
7131 (do_fetch_inferior_registers): Rename to ...
7132 (i386_fetch_inferior_register): ... this.
7133 (i386_store_inferior_register): New.
7134 (the_low_target): Adapt to new interface.
7136 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7137 (arm_get_thread_context): New.
7138 (arm_set_thread_context): New.
7140 (do_fetch_inferior_registers): Rename to ...
7141 (arm_fetch_inferior_register): ... this.
7142 (arm_store_inferior_register): New.
7143 (arm_wince_breakpoint): Reimplement as unsigned long.
7144 (arm_wince_breakpoint_len): Define.
7145 (the_low_target): Adapt to new interface.
7147 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7148 load_debug_registers. Add get_thread_context, set_thread_context,
7149 thread_added and store_inferior_register. Rename
7150 fetch_inferior_registers to fetch_inferior_register.
7151 (regptr): Remove declaration.
7153 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7155 * linux-low.c (linux_detach): Change return type to int. Return 0.
7156 * spu-low.c (spu_detach): Likewise.
7158 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7160 * target.h (target_ops): Change return type of detach to int.
7162 (join_inferior): New.
7163 * server.c (main): Don't skip detach support on mingw32.
7164 If the inferior doesn't support detaching return error.
7165 Call join_inferior instead of using waitpid.
7166 * linux-low.c (linux_join): New.
7167 (linux_target_op): Add linux_join.
7168 * spu-low.c (spu_join): New.
7169 (spu_target_ops): Add spu_join.
7170 * win32-low.c (win32_detach): Adapt to new interface.
7171 Reopen current_process_handle before detaching. Issue a child
7172 resume before detaching.
7174 (win32_target_op): Add win32_join.
7176 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7178 * win32-low.c (win32-attach): Fix return value.
7179 * target.h (target_ops): Describe ATTACH return values.
7181 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7183 * win32-low.c (GETPROCADDRESS): Define.
7184 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7185 (winapi_DebugSetProcessKillOnExit): Likewise.
7186 (win32_create_inferior): Force usage of ansi CreateProcessA.
7187 (win32_attach): Use GETPROCADDRESS.
7188 (win32_detach): Likewise.
7190 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7192 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7194 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7196 * win32-low.c: Commit leftover changes from 2007-03-29.
7198 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7200 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7201 fields short instead of int. Add explicit padding.
7202 (i387_cache_to_fsave): Remove unnecessary casts.
7203 (i387_fsave_to_cache): Doc fix.
7204 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7206 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7208 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7209 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7211 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7213 * configure.srv (arm*-*-mingw32ce*): Move near the other
7216 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7218 * configure.ac: Add errno checking.
7219 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7220 sys/file.h and malloc.h.
7221 (AC_CHECK_DECLS): Add perror.
7222 (srv_mingwce): Handle.
7223 * configure.srv (i[34567]86-*-cygwin*): Add
7224 win32-i386-low.o to srv_tgtobj.
7225 (i[34567]86-*-mingw*): Likewise.
7226 (arm*-*-mingw32ce*): Add case.
7227 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7228 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7229 [__MINGW32CE__] (strerror): New function.
7230 [__MINGW32CE__] (errno): Define to GetLastError.
7231 [__MINGW32CE__] (COUNTOF): New macro.
7232 (remote_open): Remove extra close call.
7233 * mem-break.c (delete_breakpoint_at): New function.
7234 * mem-break.h (delete_breakpoint_at): Declare.
7235 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7236 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7237 [USE_WIN32API] (read, write): Add char* casts.
7238 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7239 * server.h: Include wincecompat.h on Windows CE.
7240 [HAVE_ERRNO_H]: Check.
7241 (perror): Declare if not declared.
7242 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7243 (perror_with_name): Remove errno declaration.
7244 * wincecompat.h: New.
7245 * wincecompat.c: New.
7247 * win32-arm-low.c: New.
7248 * win32-i386-low.c: New.
7249 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7250 (OUTMSG2): Make it safe.
7252 (COUNTOF): New macro.
7253 (NUM_REGS): Get it from the low target.
7254 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7255 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7256 (thread_rec): Let low target handle debug registers.
7257 (child_add_thread): Likewise.
7258 (child_init_thread_list): Likewise.
7259 (continue_one_thread): Likewise.
7261 (do_child_fetch_inferior_registers): Move to ...
7262 * win32-i386-low.c: ... here, and rename to ...
7263 (do_fetch_inferior_registers): ... this.
7264 * win32-low.c (child_fetch_inferior_registers):
7265 Go through the low target.
7266 (do_child_store_inferior_registers): Use regptr.
7267 (strwinerror): New function.
7268 (win32_create_inferior): Handle Windows CE.
7269 Use strwinerror instead of strerror on Windows error
7270 codes. Add program to the error output.
7271 Don't close the main thread handle on Windows CE.
7272 (win32_attach): Use coredll.dll on Windows CE.
7273 (win32_kill): Close current process and current
7275 (win32_detach): Use coredll.dll on Windows CE.
7276 (win32_resume): Let low target handle debug registers, and
7278 (handle_exception): Add/Remove initial breakpoint. Avoid
7279 non-existant WSTOPSIG on Windows CE.
7280 (win32_read_inferior_memory): Cast to remove warning.
7281 (win32_arch_string): Go through the low target.
7282 (initialize_low): Call set_breakpoint_data with the low
7283 target's breakpoint.
7284 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7285 FOP_REGNUM, mappings): Move to ...
7286 * win32-i386-low.c: ... here.
7287 * win32-low.c (win32_thread_info): Move to ...
7288 * win32-low.h: ... here.
7289 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7290 win32-arm-low.c and wincecompat.c.
7291 (all:): Add $EXEEXT.
7292 (install-only:): Likewise.
7293 (gdbserver:): Likewise.
7294 (gdbreplay:): Likewise.
7295 * config.in: Regenerate.
7296 * configure: Regenerate.
7298 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7300 * win32-low.c: Rename typedef thread_info to
7301 win32_thread_info throughout.
7303 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7305 * win32-i386-low.c: Rename to ...
7306 * win32-low.c: ... this.
7307 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7308 * Makefile.in: Likewise.
7310 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7312 * remote-utils.c (monitor_output): Constify msg parameter.
7313 * server.h (monitor_output): Likewise.
7314 * win32-i386-low.c (handle_output_debug_string): New.
7315 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7316 handle_output_debug_string.
7317 (get_child_debug_event): Likewise.
7319 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7321 * server.c (main): Correct strtoul check.
7323 2007-03-27 Jon Ringle <jon@ringle.org>
7325 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7327 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7329 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7331 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7333 * terminal.h: Check HAVE_SGTTY_H.
7335 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7337 * remote-utils.c (remote_open): Print out the assigned port number.
7339 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7341 * remote-utils.c (monitor_output): New function.
7342 * server.c (debug_threads): Define here.
7343 (monitor_show_help): New function.
7344 (handle_query): Handle qRcmd.
7345 (main): Do not handle 'd' packet.
7346 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7347 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7350 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7352 * Makefile.in (EXEEXT): New.
7353 (clean): Use $(EXEEXT).
7355 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7357 * target.h (target_ops): Rename send_signal to request_interrupt,
7358 and remove enum target_signal parameter.
7359 * linux-low.c (linux_request_interrupt): Rename from
7360 linux_send_signal, and always send SIGINT.
7361 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7362 and always send SIGINT.
7363 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7365 (input_interrupt): Likewise.
7367 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7369 * server.c (get_features_xml): Check if target implemented
7371 * win32-i386-low.c (win32_arch_string): New.
7372 (win32_target_ops): Add win32_arch_string as arch_string member.
7374 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7376 * spu-low.c (spu_arch_string): New.
7377 (spu_target_ops): Add spu_arch_string.
7379 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7381 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7382 * configure.ac: Do not check for terminal.h.
7383 * configure, config.in: Regenerated.
7385 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7387 * Makefile.in (OBS): Add $(XML_BUILTIN).
7388 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7390 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7391 (arm-with-iwmmxt.c): New.
7392 * config.in, configure: Regenerate.
7393 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7394 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7395 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7396 (arm*-*-linux*): Add iWMMXt and regset support.
7397 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7398 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7399 (arm_store_wmmxregset, target_regsets): New.
7400 * server.c (get_features_xml): Take annex argument. Check builtin
7402 (handle_query): Handle multiple annexes.
7404 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7406 * remote-utils.c [USE_WIN32API] (read, write): Define.
7407 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7410 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7412 * linux-i386-low.c (the_low_target): Set arch_string.
7413 * linux-x86-64-low.c (the_low_target): Likewise.
7414 * linux-low.c (linux_arch_string): New.
7415 (linux_target_ops): Add it.
7416 * linux-low.h (struct linux_target_ops): Add arch_string.
7417 * server.c (write_qxfer_response): Use const void * for DATA.
7418 (get_features_xml): New.
7419 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7420 * target.h (struct target_ops): Add arch_string method.
7422 2007-01-03 Denis Pilat <denis.pilat@st.com>
7423 Daniel Jacobowitz <dan@codesourcery.com>
7425 * linux-low.c (linux_kill): Handle being called with no threads.
7426 * win32-i386-low.c (win32_kill): Likewise.
7427 (get_child_debug_event): Clear current_process_handle.
7429 2006-12-30 Denis PILAT <denis.pilat@st.com>
7430 Daniel Jacobowitz <dan@codesourcery.com>
7432 * remote-utils.c (remote_open): Check the type of specified
7433 serial port devices before opening them.
7434 * server.c (main): Kill the inferior if an error occurs during
7435 the first remote_open.
7437 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7439 * README: Update supported targets.
7441 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7443 * Makefile.in (clean): Remove reg-mips64.c.
7444 (reg-mips64.c, reg-mips64.o): New rules.
7445 * configure.srv: Handle mips64. Include regset support for mips.
7446 * linux-mips-low.c (union mips_register): New.
7447 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7448 (mips_breakpoint, mips_breakpoint_at): Use int.
7449 (mips_collect_register, mips_supply_register)
7450 (mips_collect_register_32bit, mips_supply_register_32bit)
7451 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7452 (mips_store_fpregset, target_regsets): New.
7453 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7455 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7457 * configure.srv: Add target "spu*-*-*".
7458 * Makefile.in (clean): Remove reg-spu.c.
7459 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7460 * spu-low.c: New file.
7462 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7464 * configure.ac: Correct td_thr_tls_get_addr test.
7465 * configure: Regenerated.
7467 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7469 * linux-low.c (linux_wait_for_event): Reformat. Use the
7471 * remote-utils.c (decode_address_to_semicolon): New.
7472 * server.c (pass_signals, handle_general_set): New.
7473 (handle_query): Mention QPassSignals for qSupported.
7474 (main): Call handle_general_set.
7475 * server.h (pass_signals, decode_address_to_semicolon): New.
7477 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7479 * server.c (handle_query): Correct error handling for read_auxv.
7481 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7483 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7484 and srv_linux_thread_db to yes.
7485 * linux-s390-low.c (s390_fill_gregset): New function.
7486 (target_regsets): Define data structure.
7488 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7490 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7491 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7492 * config.in, configure: Regenerated.
7493 * inferiors.c (gdb_id_to_thread): New function.
7494 (gdb_id_to_thread_id): Use it.
7495 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7496 * linux-low.h (struct process_info): Add th member.
7497 (thread_db_get_tls_address): New prototype.
7498 * remote-utils.c (decode_address): Make non-static.
7499 * server.c (handle_query): Handle qGetTLSAddr.
7500 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7501 * target.h (struct target_ops): Add get_tls_address.
7502 * thread-db.c (maybe_attach_thread): Save the thread handle.
7503 (thread_db_get_tls_address): New.
7505 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7507 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7508 (linux_resume_one_process): Take a siginfo_t *. Update all
7509 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7510 (struct pending_signals): Add a siginfo_t.
7511 (linux_wait_for_process): Always set last_status.
7512 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7513 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7514 * linux-low.h (struct process_info): Add last_status.
7516 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7518 * remote-utils.c (try_rle): New function.
7519 (putpkt_binary): Use it.
7521 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7523 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7524 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7525 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7526 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7527 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7530 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7532 * server.c (terminal_fd): New variable.
7533 (old_foreground_pgrp): Likewise.
7534 (restore_old_foreground_pgrp): New function.
7535 (start_inferior): Record the terminal file descriptor in terminal_fd
7536 and its original foreground group in old_foreground_pgrp. Register
7537 restore_old_foreground_pgrp with atexit().
7539 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7541 * server.c (handle_query): Correct qPart to qXfer.
7543 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7545 * configure.ac: Check for more headers which are missing on
7546 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7547 * configure.srv: Add Cygwin and mingw32.
7548 * remote-utils.c: Don't include headers unconditionally which
7549 are missing on mingw32. Include <winsock.h> for mingw32.
7550 (remote_open): Adjust for mingw32 support. Flush
7551 standard error after writing to it.
7552 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7553 (unblock_async_io, enable_async_io, disable_async_io)
7554 (readchar, getpkt): Update for Winsock support.
7555 (prepare_resume_reply): Expect a protocol signal number.
7556 * server.c: Disable <sys/wait.h> on mingw32.
7557 (start_inferior): Adjust for mingw32 support. Flush
7558 standard error after writing to it.
7559 (attach_inferior): Likewise. Use protocol signal
7561 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7563 * win32-i386-low.c: New file.
7564 * Makefile.in (XM_CLIBS): Set.
7565 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7566 (win32-i386-low.o): New dependency rule.
7567 * linux-low.c (linux_wait): Use target signal numbers.
7568 * target.h (struct target_ops): Doc fix.
7569 * server.h (target_signal_to_name): New prototype.
7570 * gdbreplay.c: Don't include headers unconditionally which
7571 are missing on mingw32. Include <winsock.h> for mingw32.
7572 (remote_close, remote_open): Adjust for Winsock support.
7573 * configure, config.in: Regenerated.
7575 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7577 * server.c (decode_xfer_read, write_qxfer_response): New.
7578 (handle_query): Take a packet length argument. Handle
7579 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7580 the qSupported response.
7581 (main): Update call to handle_query.
7583 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7585 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7586 (putpkt_binary): Renamed from putpkt and adjusted for binary
7588 (putpkt): New wrapper for putpkt_binary.
7589 (readchar): Don't mask off the high bit.
7590 (decode_X_packet): New function.
7591 * server.c (main): Call putpkt_binary if a handler sets the packet
7592 length. Save the length of the incoming packet. Handle 'X'.
7593 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7595 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7597 * server.c (handle_query): Handle qSupported.
7599 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7601 * remote-utils.c (all_symbols_looked_up): New variable.
7602 (look_up_one_symbol): Check it.
7603 * server.h (look_up_one_symbol): New declaration.
7604 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7606 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7608 * Makefile.in (linux-arm-low.o): Update dependencies.
7609 * linux-arm-low.c: Include "gdb_proc_service.h".
7610 (PTRACE_GET_THREAD_AREA): Define.
7611 (ps_get_thread_area): New function.
7613 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7615 * configure.srv (m68k*-*-uclinux*): New target.
7616 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7617 (linux_resume_one_process): Remove extraneous cast.
7618 (linux_read_offsets): New.
7619 (linux_target_op): Add linux_read_offsets on mmuless systems.
7620 * server.c (handle_query): Add qOffsets logic.
7621 * target.h (struct target_ops): Add read_offsets.
7623 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7625 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7626 (PTRACE_GET_THREAD_AREA): Define.
7627 (ps_get_thread_area): New function.
7628 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7629 (linux-x86-64-low.o): Update.
7631 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7633 * configure.ac: Remove checks for prfpregset_t.
7634 * gdb_proc_service.h: New file.
7635 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7636 new "gdb_proc_service.h".
7637 * proc-service.c: Likewise.
7638 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7639 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7640 * Makefile.in (gdb_proc_service_h): Updated.
7641 * configure, config.in: Regenerated.
7643 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7645 * remote-utils.c (prepare_resume_reply): Move declaration
7646 of gdb_id_from_wait to the top of the block.
7648 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7650 * linux-low.c (regsets_store_inferior_registers): Read the regset
7651 from the target before filling it.
7653 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7655 * server.c (attach_inferior): Return SIGTRAP for a successful
7658 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7660 * Makefile.in (OBS): Add version.o.
7661 (STAGESTUFF): Delete.
7662 (version.o): Add dependencies.
7663 (version.c): Replace rule.
7664 (clean): Remove version.c.
7665 * server.c (gdbserver_version): New.
7666 (gdbserver_usage): Use printf.
7667 (main): Handle --version and --help.
7668 * server.h (version, host_name): Add declarations.
7670 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7682 * linux-x86-64-low.c:
7685 * linux-ppc64-low.c:
7694 * linux-crisv32-low.c:
7706 * gdbserver.1: Add (C) after Copyright. Update the FSF
7709 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7711 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7712 (arm_breakpoint_at): Recognize both breakpoints.
7713 (the_low_target): Use the correct breakpoint instruction.
7715 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7717 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7718 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7719 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7720 (the_low_target): Update.
7722 2005-10-25 Andreas Schwab <schwab@suse.de>
7724 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7726 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7727 (ia64_num_regs): Reduce to 462.
7729 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7731 * acinclude.m4: Correct quoting.
7732 * aclocal.m4: Regenerated.
7734 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7735 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7736 (thread_db_init): Call thread_db_err_str.
7737 * configure.ac: Check for TD_VERSION.
7738 * config.in, configure: Regenerated.
7740 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7742 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7744 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7746 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7747 is not available. Define HAVE_PTRACE_GETREGS if it is.
7748 * config.in, configure: Regenerated.
7749 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7750 * linux-i386-low.c, linux-m68k-low.c: Update to use
7751 HAVE_PTRACE_GETREGS.
7752 * linux-low.c (regsets_fetch_inferior_registers)
7753 (regsets_store_inferior_registers): Only return 0 if we processed
7755 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7756 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7758 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7760 * inferiors.c (struct thread_info): Add gdb_id.
7761 (add_thread): Add gdb_id argument.
7762 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7763 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7764 calls to add_thread.
7765 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7766 * server.c (handle_query): Use thread_to_gdb_id.
7767 (handle_v_cont, main): Use gdb_id_to_thread_id.
7768 * server.h (add_thread): Update prototype.
7769 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7772 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7774 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7775 left-padded registers.
7776 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7777 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7779 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7781 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7782 * configure: Regenerate.
7783 * config.in: Regenerate.
7784 * server.h (NEED_DECLARATION_STRERROR):
7785 Replace with !HAVE_DECL_STRERROR.
7787 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7789 * linux-low.c (linux_wait, linux_send_signal): Don't test
7790 an unsigned long variable for > 0 if it could be MAX_ULONG.
7791 * server.c (myresume): Likewise.
7792 * target.c (set_desired_inferior): Likewise.
7794 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7796 * configure.ac: Simplify and improve check for socklen_t.
7797 * configure, config.in: Regenerate.
7799 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7801 * acconfig.h: Remove.
7802 * configure.ac: Add a test for socklen_t. Use three-argument
7803 AC_DEFINE throughout.
7804 * config.in: Regenerated using autoheader 2.59.
7805 * configure: Regenerated.
7807 * gdbreplay.c (socklen_t): Provide a default.
7808 (remote_open): Use socklen_t.
7809 * remote-utils.c (socklen_t): Provide a default.
7810 (remote_open): Use socklen_t.
7811 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7814 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7816 * linux-low.c (linux_read_memory, linux_write_memory)
7817 (linux_read_auxv): Likewise.
7818 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7819 (check_mem_write): Likewise.
7820 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7822 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7823 (registers_from_string, register_data): Likewise.
7824 * server.c (handle_query, main): Likewise.
7825 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7826 (decode_M_packet): Likewise.
7827 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7828 * target.h (struct target_ops): Update read_memory, write_memory,
7830 (read_inferior_memory, write_inferior_memory): Update.
7831 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7833 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7834 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7835 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7836 linux-s390-low.c, linux-sh-low.c: Update for changes in
7837 read_inferior_memory and the_low_target->breakpoint.
7839 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7841 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7842 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7843 * configure.srv: Add powerpc64-*-linux*.
7844 * linux-ppc64-low.c: New file.
7846 2005-05-23 Orjan Friberg <orjanf@axis.com>
7848 * linux-cris-low.c: New file with support for CRIS.
7849 * linux-crisv32-low.c: Ditto for CRISv32.
7850 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7851 (clean): Add reg-cris.c and reg-crisv32.c.
7852 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
7853 reg-crisv32.o, and reg-crisv32.c to make rules.
7854 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7857 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7859 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7860 of sizeof (PTRACE_XFER_TYPE).
7861 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7863 2005-05-12 Orjan Friberg <orjanf@axis.com>
7865 * target.h (struct target_ops): Add insert_watchpoint,
7866 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7867 pointers for hardware watchpoint support.
7868 * linux-low.h (struct linux_target_ops): Ditto.
7869 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7870 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7871 to linux_target_ops.
7872 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7874 * server.c (main): Recognize 'Z' and 'z' packets.
7876 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7878 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7879 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7880 (the_low_target): Add new members.
7882 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7884 * proc-service.c (ps_lgetregs): Search all_processes instead of
7887 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7889 * server.c (start_inferior): Change return type to int.
7890 (attach_inferior): Change sigptr to int *.
7891 (handle_v_cont, handle_v_requests): Change signal to int *.
7892 (main): Change signal to int.
7894 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7896 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7897 * configure.srv: Add m32r*-*-linux*.
7898 * linux-m32r-low.c: New file.
7900 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7902 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7904 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7906 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7907 Take unsigned long arguments for PIDs.
7908 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7909 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7910 (wait_for_sigstop, linux_resume_one_process)
7911 (regsets_fetch_inferior_registers, linux_send_signal)
7912 (linux_read_auxv): Likewise. Update the types of variables holding
7913 PIDs. Update format string specifiers.
7914 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7915 * remote-utils.c (prepare_resume_reply): Likewise.
7916 * server.c (cont_thread, general_thread, step_thread)
7917 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7919 (handle_query): Update format specifiers.
7920 (handle_v_cont, main): Use strtoul for thread IDs.
7921 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7922 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7923 (general_thread, step_thread, thread_from_wait)
7924 (old_thread_from_wait): Update.
7925 * target.h (struct thread_resume): Use unsigned long for THREAD.
7926 (struct target_ops): Use unsigned long for arguments to attach and
7929 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7931 * acinclude.m4: Include bfd/bfd.m4 directly.
7932 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7933 <agriffis@toolchain.org>.
7934 * aclocal.m4, configure: Regenerated.
7936 2005-01-07 Andrew Cagney <cagney@gnu.org>
7938 * configure.ac: Rename configure.in, require autoconf 2.59.
7939 * configure: Re-generate.
7941 2004-12-08 Daniel Jacobowitz <dan@debian.org>
7943 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7945 * aclocal.m4: Regenerated.
7946 * configure: Regenerated.
7948 2004-11-21 Andreas Schwab <schwab@suse.de>
7950 * linux-m68k-low.c (m68k_num_gregs): Define.
7951 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7952 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7953 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7954 (m68k_breakpoint_at): New. Add to the_low_target.
7956 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7957 srv_linux_thread_db to yes.
7959 2004-10-20 Joel Brobecker <brobecker@gnat.com>
7961 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7962 (ARCH_SET_FS): Likewise.
7963 (ARCH_GET_FS): Likewise.
7964 (ARCH_GET_GS): Likewise.
7966 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7968 * linux-i386-low.c (ps_get_thread_area): New.
7969 * linux-x86-64-low.c (ps_get_thread_area): New.
7970 * linux-low.c: Include <sys/syscall.h>.
7971 (linux_kill_one_process): Don't kill the first thread here.
7972 (linux_kill): Kill the first thread here.
7973 (kill_lwp): New function.
7974 (send_sigstop, linux_send_signal): Use it.
7975 * proc-service.c: Clean up #ifdefs.
7976 (fpregset_info): Delete.
7977 (ps_lgetregs): Update and enable implementation.
7978 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7980 * remote-utils.c (struct sym_cache, symbol_cache): New.
7981 (input_interrupt): Print a clearer message.
7982 (async_io_enabled): New variable.
7983 (enable_async_io, disable_async_io): Use it. Update comments.
7984 (look_up_one_symbol): Use the symbol cache.
7985 * thread-db.c (thread_db_look_up_symbols): New function.
7986 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7988 2004-10-16 Daniel Jacobowitz <dan@debian.org>
7990 * configure.in: Test for -rdynamic.
7991 * configure: Regenerated.
7992 * Makefile (INTERNAL_LDFLAGS): New.
7993 (gdbserver, gdbreplay): Use it.
7995 2004-09-02 Andrew Cagney <cagney@gnu.org>
7997 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7999 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8001 * linux-low.c (linux_wait): Clear all_processes list also.
8003 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8005 * linux-low.c: Include <errno.h>. Remove extern declaration of
8008 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8010 * gdbreplay.c, server.h, utils.c: Update copyright years.
8012 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8014 * server.c (main): Print child status or termination signal from
8015 variable 'signal', not 'sig'.
8017 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8019 * linux-low.c (linux_read_memory): Change return type to
8020 int. Check for and return error from ptrace().
8021 * target.c (read_inferior_memory): Change return type to int. Pass
8022 back return status from the_target->read_memory().
8023 * target.h (struct target_ops): Adapt *read_memory() prototype.
8025 (read_inferior_memory): Adapt prototype.
8026 * server.c (main): Return an error packet if
8027 read_inferior_memory() returns an error.
8029 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8031 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8032 Unify with other clean targets.
8034 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8036 * server.c (handle_v_cont): Call set_desired_inferior.
8038 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8040 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8042 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8044 * linux-low.c (linux_wait): Unblock async I/O.
8045 (linux_resume): Block and enable async I/O.
8046 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8047 * server.h (block_async_io, unblock_async_io): Add prototypes.
8049 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8051 * remote-utils.c (remote_open): Print a status notice after
8053 * server.c (attach_inferior): Print a status notice after
8056 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8058 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8060 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8062 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8064 * server.c, target.h: Update copyright years.
8066 2004-02-25 Roland McGrath <roland@redhat.com>
8068 * target.h (struct target_ops): New member `read_auxv'.
8069 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8070 * linux-low.c (linux_read_auxv): New function.
8071 (linux_target_ops): Initialize `read_auxv' member to that.
8073 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8075 Committed by Jim Blandy <jimb@redhat.com>.
8077 * linux-s390-low.c (s390_num_regs): Update.
8078 (s390_regmap): Remove control registers. Use __s390x__ predefine
8079 instead of GPR_SIZE to distiguish s390 and s390x targets.
8081 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8083 * linux-low.c: Update copyright year.
8084 (check_removed_breakpoint): Clear pending_is_breakpoint.
8085 (linux_set_resume_request, linux_queue_one_thread)
8086 (resume_status_pending_p): New functions.
8087 (linux_continue_one_thread): Use process->resume.
8088 (linux_resume): Only resume threads if there are no pending events.
8089 * linux-low.h (struct process_info): Add resume request
8092 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8094 * regcache.c (new_register_cache): Clear the allocated register
8095 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8097 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8099 * linux-low.c (linux_resume): Take a struct thread_resume *
8101 (linux_wait): Update call.
8102 (resume_ptr): New static variable.
8103 (linux_continue_one_thread): Renamed from
8104 linux_continue_one_process. Use resume_ptr.
8105 (linux_resume): Use linux_continue_one_thread.
8106 * server.c (handle_v_cont, handle_v_requests): New functions.
8107 (myresume): New function.
8108 (main): Handle 'v' case.
8109 * target.h (struct thread_resume): New type.
8110 (struct target_ops): Change argument of "resume" to struct
8112 (myresume): Delete macro.
8114 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8116 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8117 (uninstall): Support DESTDIR.
8119 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8121 * configure.srv: Add xscale*linux copy of arm*linux entry.
8123 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8125 * linux-arm-low.c (arm_reinsert_addr): New function.
8126 (the_low_target): Add arm_reinsert_addr.
8128 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8130 * mem-break.c: Remove whitespace at end of file.
8132 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8134 * configure.in: Check whether we need to prototype strerror.
8135 * server.h: Optionally prototype strerror.
8136 * gdbreplay.c (perror_with_name): Use strerror.
8137 * linux-low.c (linux_attach_lwp): Use strerror.
8138 * utils.c (perror_with_name): Use strerror.
8139 * config.in, configure: Regenerated.
8141 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8143 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8144 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8146 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8148 * Makefile.in (SFILES): Update.
8149 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8150 low-sun3.c: Remove files.
8152 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8154 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8155 (linux_detach_one_process, linux_detach): New functions.
8156 (linux_target_ops): Add linux_detach.
8157 * server.c (main): Handle 'D' packet.
8158 * target.h (struct target_ops): Add "detach" member.
8159 (detach_inferior): Define.
8161 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8163 From Kelley Cook <kelleycook@wideopenwest.com>:
8164 * configure.srv: Accept i[34567]86 variants.
8166 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8168 * linux-low.c (linux_wait_for_event): Correct comment typos.
8169 (linux_resume_one_process): Call check_removed_breakpoint.
8170 (linux_send_signal): New function.
8171 (linux_target_ops): Add linux_send_signal.
8172 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8174 * target.h (struct target_ops): Add send_signal.
8176 2003-05-29 Jim Blandy <jimb@redhat.com>
8178 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8179 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8180 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8181 away part of the register's value.
8183 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8185 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8186 (linux_wait_for_event, linux_init_signals): Likewise.
8188 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8190 * configure.in: Check for stdlib.h.
8191 * configure: Regenerated.
8192 * config.in: Regenerated.
8194 2003-01-04 Andreas Schwab <schwab@suse.de>
8196 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8198 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8200 * Makefile.in: Remove obsolete code.
8202 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8204 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8205 defined(PT_FPR0_HI).
8207 2002-11-17 Stuart Hughes <seh@zee2.com>
8209 * linux-arm-low.c (arm_num_regs): Increase.
8210 (arm_regmap): Include status register.
8212 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8214 * linux-low.c (register_addr): Remove incorrect -1 check.
8216 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8218 * linux-low.c (linux_create_inferior): Call setpgid. Return
8220 (unstopped_p, linux_signal_pid): Remove.
8221 (linux_target_ops): Remove linux_signal_pid.
8222 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8223 global instead of target method.
8224 * target.h (struct target_ops): Remove signal_pid. Update comment
8225 for create_inferior.
8226 * server.c (signal_pid): New variable.
8227 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8228 gdbserver. Set the child to be the foreground process group.
8229 (attach_inferior): Set signal_pid.
8231 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8233 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8235 2002-08-20 Jim Blandy <jimb@redhat.com>
8237 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8240 2002-08-01 Andrew Cagney <cagney@redhat.com>
8242 * Makefile.in: Make chill references obsolete.
8244 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8246 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8247 * configure: Regenerate.
8248 * config.in: Regenerate.
8250 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8252 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8253 (perror_with_name, remote_close, remote_open, expect, play): Static.
8255 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8257 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8258 byte offsets instead of an array of indexes.
8259 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8261 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8263 * regcache.c: Add comment.
8265 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8267 * thread-db.c: New file.
8268 * proc-service.c: New file.
8269 * acinclude.m4: New file.
8270 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8271 proc-service.o, and thread-db.o.
8272 (linux-low.o): Add USE_THREAD_DB.
8273 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8274 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8275 * aclocal.m4: Regenerated.
8276 * config.in: Regenerated.
8277 * configure: Regenerated.
8278 * configure.in: Check for proc_service.h, sys/procfs.h,
8279 thread_db.h, and linux/elf.h headrs.
8280 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8281 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8282 Check for -lthread_db and thread support.
8283 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8284 PowerPC, and SuperH.
8285 * i387-fp.c: Constify arguments.
8286 * i387-fp.h: Likewise.
8287 * inferiors.c: (struct thread_info): Renamed from
8288 `struct inferior_info'. Remove PID member. Use generic inferior
8289 list header. All uses updated.
8290 (inferiors, signal_pid): Removed.
8291 (all_threads): New variable.
8292 (get_thread): Define.
8293 (add_inferior_to_list): New function.
8294 (for_each_inferior): New function.
8295 (change_inferior_id): New function.
8296 (add_inferior): Removed.
8297 (remove_inferior): New function.
8298 (add_thread): New function.
8299 (free_one_thread): New function.
8300 (remove_thread): New function.
8301 (clear_inferiors): Use for_each_inferior and free_one_thread.
8302 (find_inferior): New function.
8303 (find_inferior_id): New function.
8304 (inferior_target_data): Update argument type.
8305 (set_inferior_target_data): Likewise.
8306 (inferior_regcache_data): Likewise.
8307 (set_inferior_regcache_data): Likewise.
8308 * linux-low.c (linux_bp_reinsert): Remove.
8309 (all_processes, stopping_threads, using_thrads)
8310 (struct pending_signals, debug_threads, pid_of): New.
8311 (inferior_pid): Replace with macro.
8312 (struct inferior_linux_data): Remove.
8313 (get_stop_pc, add_process): New functions.
8314 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8315 Use add_process and add_thread.
8316 (linux_attach_lwp): New function, based on old linux_attach. Use
8317 add_process and add_thread. Set stop_expected for new threads.
8318 (linux_attach): New function.
8319 (linux_kill_one_process): New function.
8320 (linux_kill): Kill all LWPs.
8321 (linux_thread_alive): Use find_inferior_id.
8322 (check_removed_breakpoints, status_pending_p): New functions.
8323 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8324 Update. Use WNOHANG. Wait for cloned processes also. Update process
8325 struct for the found process.
8326 (linux_wait_for_event): New function.
8327 (linux_wait): Use it. Support LWPs.
8328 (send_sigstop, wait_for_sigstop, stop_all_processes)
8329 (linux_resume_one_process, linux_continue_one_process): New functions.
8330 (linux_resume): Support LWPs.
8331 (REGISTER_RAW_SIZE): Remove.
8332 (fetch_register): Use register_size instead. Call supply_register.
8333 (usr_store_inferior_registers): Likewise. Call collect_register.
8335 (regsets_fetch_inferior_registers): Improve error message.
8336 (regsets_store_inferior_registers): Add debugging.
8337 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8338 (unstopped_p, linux_signal_pid): New functions.
8339 (linux_target_ops): Add linux_signal_pid.
8340 (linux_init_signals): New function.
8341 (initialize_low): Call it. Initialize using_threads.
8342 * regcache.c (inferior_regcache_data): Add valid
8344 (get_regcache): Fetch registers lazily. Add fetch argument
8345 and update all callers.
8346 (regcache_invalidate_one, regcache_invalidate): New
8348 (new_register_cache): Renamed from create_register_cache.
8349 Return the new regcache.
8350 (free_register_cache): Change argument to a void *.
8351 (registers_to_string, registers_from_string): Call get_regcache
8352 with fetch flag set.
8353 (register_data): Make static. Pass fetch flag to get_regcache.
8354 (supply_register): Call get_regcache with fetch flag clear.
8355 (collect_register): Call get_regcache with fetch flag set.
8356 (collect_register_as_string): New function.
8357 * regcache.h: Update.
8358 * remote-utils.c (putpkt): Flush after debug output and use
8360 Handle input interrupts while waiting for an ACK.
8361 (input_interrupt): Use signal_pid method.
8362 (getpkt): Flush after debug output and use stderr.
8363 (outreg): Use collect_register_as_string.
8364 (new_thread_notify, dead_thread_notify): New functions.
8365 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8367 (look_up_one_symbol): Flush after debug output.
8368 * server.c (step_thread, server_waiting): New variables.
8369 (start_inferior): Don't use signal_pid. Update call to mywait.
8370 (attach_inferior): Update call to mywait.
8371 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8372 (main): Don't fetch/store registers explicitly. Use
8373 set_desired_inferior. Support proposed ``Hs'' packet. Update
8376 (struct inferior_list, struct_inferior_list_entry): New.
8377 * target.c (set_desired_inferior): New.
8378 (write_inferior_memory): Constify.
8379 (mywait): New function.
8381 (struct target_ops): New signal_pid method.
8382 (mywait): Removed macro, added prototype.
8384 * linux-low.h (regset_func): Removed.
8385 (regset_fill_func, regset_store_func): New.
8386 (enum regset_type): New.
8387 (struct regset_info): Add type field. Use new operation types.
8388 (struct linux_target_ops): stop_pc renamed to get_pc.
8389 Add decr_pc_after_break and breakpoint_at.
8390 (get_process, get_thread_proess, get_process_thread)
8391 (strut process_info, all_processes, linux_attach_lwp)
8392 (thread_db_init): New.
8394 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8395 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8396 (the_low_target): Add new members.
8397 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8398 (i386_store_fpxregset): Constify.
8399 (target_regsets): Add new kind identifier.
8400 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8401 (i386_set_pc): Add debugging.
8402 (i386_breakpoint_at): New function.
8403 (the_low_target): Add new members.
8404 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8405 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8406 (mips_breakpoint_at): New.
8407 (the_low_target): Add new members.
8408 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8409 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8410 (the_low_target): Add new members.
8411 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8412 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8413 (the_low_target): Add new members.
8414 * linux-x86-64-low.c (target_regsets): Add new kind
8417 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8419 From Martin Pool <mbp@samba.org>:
8420 * server.c (gdbserver_usage): New function.
8423 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8425 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8428 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8430 * Makefile.in: Remove obsolete code.
8432 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8434 * linux-low.c (regsets_fetch_inferior_registers),
8435 (regsets_store_inferior_registers): Removed cast to int from
8437 * regcache.h: Added declaration of struct inferior_info.
8439 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8441 * inferiors.c (struct inferior_info): Add regcache_data.
8442 (add_inferior): Call create_register_cache.
8443 (clear_inferiors): Call free_register_cache.
8444 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8445 * regcache.c (struct inferior_regcache_data): New.
8446 (registers): Remove.
8447 (get_regcache): New function.
8448 (create_register_cache, free_register_cache): New functions.
8449 (set_register_cache): Don't initialize the register cache here.
8450 (registers_to_string, registers_from_string, register_data): Call
8452 * regcache.h: Add prototypes.
8453 * server.h: Likewise.
8455 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8457 * mem-break.c: New file.
8458 * mem-break.h: New file.
8459 * Makefile.in: Add mem-break.o rule; update server.h
8461 * inferiors.c (struct inferior_info): Add target_data
8463 (clear_inferiors): Free target_data member if set.
8464 (inferior_target_data, set_inferior_target_data): New functions.
8465 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8466 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8467 * linux-low.c (linux_bp_reinsert): New variable.
8468 (struct inferior_linux_data): New.
8469 (linux_create_inferior): Use set_inferior_target_data.
8470 (linux_attach): Likewise. Call add_inferior.
8471 (linux_wait_for_one_inferior): New function.
8472 (linux_wait): Call it.
8473 (linux_write_memory): Add const.
8474 (initialize_low): Call set_breakpoint_data.
8475 * linux-low.h (struct linux_target_ops): Add breakpoint
8477 * server.c (attach_inferior): Remove extra add_inferior
8479 * server.h: Include mem-break.h. Update inferior.c
8481 * target.c (read_inferior_memory)
8482 (write_inferior_memory): New functions.
8483 * target.h (read_inferior_memory)
8484 (write_inferior_memory): Change macros to prototypes.
8485 (struct target_ops): Update comments. Add const to write_memory
8488 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8490 * linux-low.c (usr_store_inferior_registers): Support
8491 registers which are allowed to fail to store.
8492 * linux-low.h (linux_target_ops): Likewise.
8493 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8494 (ppc_cannot_store_register): FPSCR may not be storable.
8496 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8498 * server.h: Include <string.h> if HAVE_STRING_H.
8499 * ChangeLog: Correct paths in last ChangeLog entry.
8501 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8503 * linux-low.h: Remove obsolete prototypes.
8504 (struct linux_target_ops): New.
8505 (extern the_low_target): New.
8506 * linux-low.c (num_regs, regmap): Remove declarations.
8507 (register_addr): Use the_low_target explicitly.
8508 (fetch_register): Likewise.
8509 (usr_fetch_inferior_registers): Likewise.
8510 (usr_store_inferior_registers): Likewise.
8511 * linux-arm-low.c (num_regs): Remove.
8512 (arm_num_regs): Define.
8513 (arm_regmap): Renamed from regmap, made static.
8514 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8516 (arm_cannot_store_register): Renamed from cannot_store_register,
8518 (the_low_target): New.
8519 * linux-i386-low.c (num_regs): Remove.
8520 (i386_num_regs): Define.
8521 (i386_regmap): Renamed from regmap, made static.
8522 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8524 (i386_cannot_store_register): Renamed from cannot_store_register,
8526 (the_low_target): New.
8527 * linux-ia64-low.c (num_regs): Remove.
8528 (ia64_num_regs): Define.
8529 (ia64_regmap): Renamed from regmap, made static.
8530 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8532 (ia64_cannot_store_register): Renamed from cannot_store_register,
8534 (the_low_target): New.
8535 * linux-m68k-low.c (num_regs): Remove.
8536 (m68k_num_regs): Define.
8537 (m68k_regmap): Renamed from regmap, made static.
8538 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8540 (m68k_cannot_store_register): Renamed from cannot_store_register,
8542 (the_low_target): New.
8543 * linux-mips-low.c (num_regs): Remove.
8544 (mips_num_regs): Define.
8545 (mips_regmap): Renamed from regmap, made static.
8546 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8548 (mips_cannot_store_register): Renamed from cannot_store_register,
8550 (the_low_target): New.
8551 * linux-ppc-low.c (num_regs): Remove.
8552 (ppc_num_regs): Define.
8553 (ppc_regmap): Renamed from regmap, made static.
8554 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8556 (ppc_cannot_store_register): Renamed from cannot_store_register,
8558 (the_low_target): New.
8559 * linux-s390-low.c (num_regs): Remove.
8560 (s390_num_regs): Define.
8561 (s390_regmap): Renamed from regmap, made static.
8562 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8564 (s390_cannot_store_register): Renamed from cannot_store_register,
8566 (the_low_target): New.
8567 * linux-sh-low.c (num_regs): Remove.
8568 (sh_num_regs): Define.
8569 (sh_regmap): Renamed from regmap, made static.
8570 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8572 (sh_cannot_store_register): Renamed from cannot_store_register,
8574 (the_low_target): New.
8575 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8576 (the_low_target): New.
8578 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8580 * Makefile.in: Add stamp-h target.
8581 * configure.in: Create stamp-h.
8582 * configure: Regenerated.
8584 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8586 * inferiors.c: New file.
8587 * target.c: New file.
8588 * target.h: New file.
8589 * Makefile.in: Add target.o and inferiors.o. Update
8591 * linux-low.c (inferior_pid): New static variable,
8592 moved from server.c.
8593 (linux_create_inferior): Renamed from create_inferior.
8594 Call add_inferior. Return 0 on success instead of a PID.
8595 (linux_attach): Renamed from myattach.
8596 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8597 (linux_thread_alive): Renamed from mythread_alive.
8598 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8600 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8601 (regsets_store_inferior_registers): Correct error message.
8602 Add missing ``return 0''.
8603 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8604 (linux_store_registers): Renamed from store_inferior_registers.
8605 (linux_read_memory): Renamed from read_inferior_memory.
8606 (linux_write_memory): Renamed from write_inferior_memory.
8607 (linux_target_ops): New structure.
8608 (initialize_low): Call set_target_ops ().
8609 * remote-utils.c (unhexify): New function.
8610 (hexify): New function.
8611 (input_interrupt): Send signals to ``signal_pid''.
8612 * server.c (inferior_pid): Remove.
8613 (start_inferior): Update create_inferior call.
8614 (attach_inferior): Call add_inferior.
8615 (handle_query): New function.
8616 (main): Call handle_query for `q' packets.
8617 * server.h: Include "target.h". Remove obsolete prototypes.
8618 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8620 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8622 * Makefile.in: Add WARN_CFLAGS. Update configury
8624 * configure.in: Check for <string.h>
8625 * configure: Regenerate.
8626 * config.in: Regenerate.
8627 * gdbreplay.c: Include needed system headers.
8628 (remote_open): Remove strchr prototype.
8629 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8630 * regcache.c (supply_register): Change buf argument to const void *.
8631 (supply_register_by_name): Likewise.
8632 (collect_register): Change buf argument to void *.
8633 (collect_register_by_name): Likewise.
8634 * regcache.h: Add missing prototypes.
8635 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8636 * server.c (handle_query): New function.
8637 (attached): New static variable, moved out of main.
8638 (main): Quiet longjmp clobber warnings.
8639 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8640 * utils.c (error): Remove NORETURN.