1 2014-01-08 Pedro Alves <palves@redhat.com>
3 * server.c (handle_status): Don't discard previous queued stop
4 replies or thread's pending status here.
5 (main) <disconnection>: Do it here instead.
7 2014-01-08 Pedro Alves <palves@redhat.com>
9 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10 * server.c (visit_actioned_threads, handle_pending_status): New
12 (handle_v_cont): Factor out parts to ...
13 (resume): ... this new function. If in all-stop, and a thread
14 being resumed has a pending status, report it without actually
16 (myresume): Adjust to use the new 'resume' function.
17 (clear_pending_status_callback, set_pending_status_callback)
18 (find_status_pending_thread_callback): New functions.
19 (handle_status): Handle the case of multiple threads having
20 interesting statuses to report. Report threads' real last signal
21 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
22 with an interesting thread to report the status for, instead of
23 always reporting the status of the first thread.
25 2014-01-01 Joel Brobecker <brobecker@adacore.com>
27 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
28 * gdbreplay.c (gdbreplay_version): Likewise.
30 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
32 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
33 iov.iov_len with the real length in use.
35 2013-12-13 Joel Brobecker <brobecker@adacore.com>
37 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
38 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
39 for all targets that use win32-low.c.
40 * win32-low.c (win32_ensure_ntdll_loaded): New function.
41 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
43 2013-12-13 Pedro Alves <palves@redhat.com>
45 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
46 if equal to TARGET_WAITKIND_LOADED.
47 * win32-low.c (cached_status): New static global.
48 (win32_wait): Add declaration.
49 (do_initial_child_stuff): Flush all initial pending debug events
50 up to the initial breakpoint.
51 (win32_wait): If CACHED_STATUS was set, return that instead
52 of doing a real wait. Remove the code resuming the execution
53 of the inferior after receiving a TARGET_WAITKIND_LOADED event
54 during the initial phase. Also remove the code changing
55 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
56 TARGET_WAITKIND_STOPPED.
58 2013-12-11 Yao Qi <yao@codesourcery.com>
60 * notif.c (handle_notif_ack): Return 0 if no notification
63 2013-11-20 Doug Evans <dje@google.com>
65 * linux-low.c (linux_set_resume_request): Fix comment.
67 2013-11-20 Doug Evans <dje@google.com>
69 * linux-low.c (resume_status_pending_p): Tweak comment.
71 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
73 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
74 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
75 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
76 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
77 (srv_amd64_regobj): Add amd64-mpx.o.
78 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
79 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
80 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
81 * i387-fp.c (num_pl_bnd_register) Added constant.
82 (num_pl_bnd_cfg_registers) Added constant.
83 (struct i387_xsave) Added reserved area and MPX fields.
84 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
85 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
87 (tdesc_i386_mpx_linux): Add MPX amd64 target.
88 (init_registers_amd64_mpx_linux): Declare new function.
89 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
90 (x86_64_regmap): Add MPX registers.
91 (x86_linux_read_description): Add MPX case.
92 (initialize_low_arch): Initialize MPX targets.
94 2013-11-18 Tom Tromey <tromey@redhat.com>
97 * configure.ac: Don't check for stdlib.h.
98 * gdbreplay.c: Unconditionally include stdlib.h.
100 2013-11-18 Tom Tromey <tromey@redhat.com>
102 * config.in: Rebuild.
103 * configure: Rebuild.
104 * configure.ac: Don't use AC_HEADER_DIRENT.
106 2013-11-18 Tom Tromey <tromey@redhat.com>
108 * server.h: Don't check HAVE_STRING_H.
109 * gdbreplay.c: Don't check HAVE_STRING_H.
110 * configure: Rebuild.
112 2013-11-18 Tom Tromey <tromey@redhat.com>
114 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
117 2013-11-08 Tom Tromey <tromey@redhat.com>
119 * configure, config.in: Rebuild.
120 * configure.ac: Remove unused configury.
122 2013-11-08 Tom Tromey <tromey@redhat.com>
124 * acinclude.m4: Include common.m4, codeset.m4.
125 * configure, config.in: Rebuild.
126 * configure.ac: Use GDB_AC_COMMON.
128 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
130 * linux-s390-low.c (HWCAP_S390_TE): New define.
131 (s390_arch_setup): Consider the TE field in the HWCAP for
132 determining 'have_regset_tdb'.
134 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
137 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
140 2013-10-02 Pedro Alves <palves@redhat.com>
142 * server.c (process_serial_event): Don't output "GDBserver
143 exiting" if GDB is connected through stdio.
144 * target.c (mywait): Likewise, be silent if GDB is connected
147 2013-10-01 Joel Brobecker <brobecker@adacore.com>
149 * lynx-low.c (lynx_add_threads_after_attach): New function.
150 (lynx_attach): Remove call to add_thread. Add call to
151 lynx_add_threads_after_attach instead.
153 2013-09-28 Mike Frysinger <vapier@gentoo.org>
155 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
156 * config.in, configure: Regenerated.
158 2013-09-18 Yao Qi <yao@codesourcery.com>
161 * server.c (start_inferior): Clear 'resume_info'.
163 2013-09-16 Jiong Wang <jiwang@tilera.com>
165 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
168 2013-09-16 Jiong Wang <jiwang@tilera.com>
170 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
171 linux-tile-low.o to srv_tgtobj.
173 2013-09-16 Will Newton <will.newton@linaro.org>
175 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
178 2013-09-06 Pedro Alves <palves@redhat.com>
180 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
181 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
182 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
183 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
184 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
185 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
187 2013-09-06 Pedro Alves <palves@redhat.com>
189 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
190 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
192 2013-09-06 Pedro Alves <palves@redhat.com>
194 * linux-amd64-ipa.c: Include tracepoint.h.
195 * linux-i386-ipa.c: Include tracepoint.h.
197 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
199 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
200 (ps_get_thread_area): New function.
202 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
204 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
205 (initialize_low_arch): Call init_registers_crisv32 rather than
206 init_register_crisv32.
208 2013-09-05 Pedro Alves <palves@redhat.com>
210 * server.h (handle_vFile, hostio_last_error_from_errno): Move
212 * hostio.h: ... this new file.
213 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
214 win32-low.c: Include hostio.h.
216 2013-09-05 Pedro Alves <palves@redhat.com>
218 * server.h (gdb_client_data, handler_func, callback_handler_func)
219 (delete_file_handler, add_file_handler, append_callback_event)
220 (delete_callback_event, start_event_loop, initialize_event_loop):
221 Move to event-loop.h and include it.
222 * event-loop.h: New file.
224 2013-09-05 Pedro Alves <palves@redhat.com>
226 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
227 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
228 (loaded_dll, unloaded_dll): Move to ...
229 * dll.h: ... this new file.
230 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
232 2013-09-05 Pedro Alves <palves@redhat.com>
234 * server.h (current_process, get_thread_process, all_processes)
235 (add_inferior_to_list, for_each_inferior, current_inferior)
236 (remove_inferior, add_process, remove_process, find_process_pid)
237 (have_started_inferiors_p, have_attached_inferiors_p)
238 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
239 (clear_inferiors, find_inferior, find_inferior_id)
240 (inferior_target_data, set_inferior_target_data)
241 (inferior_regcache_data, set_inferior_regcache_data): Move to
242 inferiors.h, and include it.
243 * inferiors.h: New file.
245 2013-09-05 Pedro Alves <palves@redhat.com>
247 * server.h (struct emit_ops, current_insn_ptr, emit_error):
251 2013-09-05 Pedro Alves <palves@redhat.com>
253 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
255 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
256 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
257 (handle_tracepoint_general_set, handle_tracepoint_query)
258 (tracepoint_finished_step, tracepoint_was_hit)
259 (release_while_stepping_state_list, current_traceframe)
260 (in_readonly_region, traceframe_read_mem)
261 (fetch_traceframe_registers, traceframe_read_sdata)
262 (traceframe_read_info, struct fast_tpoint_collect_status)
263 (fast_tracepoint_collecting, force_unlock_trace_buffer)
264 (handle_tracepoit_bkpts, initialize_low_tracepoint)
265 (supply_fast_tracepoint_registers)
266 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
267 (ipa_tdesc, claim_trampoline_space)
268 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
269 (agent_mem_read, agent_get_trace_state_variable_value)
270 (agent_set_trace_state_variable_value, agent_tsv_read)
271 (agent_mem_read_string, get_raw_reg_func_addr)
272 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
273 * tracepoint.h: ... this new file.
275 2013-09-05 Pedro Alves <palves@redhat.com>
277 * server.h (perror_with_name, error, fatal, warning, paddress)
278 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
282 2013-09-05 Pedro Alves <palves@redhat.com>
284 * server.h (remote_debug, noack_mode, transport_is_reliable)
285 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
286 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
287 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
288 (write_enn, initialize_async_io, enable_async_io)
289 (disable_async_io, check_remote_input_interrupt_request)
290 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
291 (dead_thread_notify, prepare_resume_reply)
292 (decode_address_to_semicolon, decode_address, decode_m_packet)
293 (decode_M_packet, decode_X_packet, decode_xfer_write)
294 (decode_search_memory_packet, unhexify, hexify)
295 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
296 (look_up_one_symbol, relocate_instruction)
297 (monitor_output): Move to remote-utils.h, and include it.
298 * remote-utils.h: New file.
300 2013-09-05 Pedro Alves <palves@redhat.com>
302 * server.h (_): Delete.
304 2013-09-02 Pedro Alves <palves@redhat.com>
306 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
307 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
309 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
311 2013-09-02 Pierre Muller <muller@sourceware.org>
313 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
314 or WriteProcessMemory complete successfully and handle
315 ERROR_PARTIAL_COPY error.
317 2013-09-02 Pedro Alves <palves@redhat.com>
319 * server.c (gdb_read_memory): Return -1 on traceframe memory read
320 error instead of EIO.
322 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
325 * linux-low.c: Include filestuff.h.
326 (linux_create_inferior) <pid == 0>: Call close_most_fds.
327 * lynx-low.c: Include filestuff.h.
328 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
329 * server.c: Include filestuff.h.
330 (main): Call notice_open_fds.
331 * spu-low.c: Include filestuff.h.
332 (spu_create_inferior) <pid == 0>: Call close_most_fds.
334 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
336 * Makefile.in: Explain why ../target and ../nat are not
337 listed as include file search paths.
338 (linux-waitpid.o): New object file rule.
339 * configure.srv (srv_native_linux_obj): New variable.
340 Replace all occurrences of linux native object files with
341 $srv_native_linux_obj.
342 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
343 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
344 (linux_enable_event_reporting): Remove declaration.
345 (my_waitpid): Moved to common/linux-waitpid.c.
346 (linux_wait_for_event): Pass ptid when calling
347 linux_enable_event_reporting.
348 (linux_supports_tracefork_flag): Remove.
349 (linux_enable_event_reporting): Likewise.
350 (linux_tracefork_grandchild): Remove.
351 (STACK_SIZE): Moved to common/linux-ptrace.c.
352 (linux_tracefork_child): Remove.
353 (linux_test_for_tracefork): Remove.
354 (linux_look_up_symbols): Call linux_supports_traceclone.
355 (initialize_low): Remove call to linux_test_for_tracefork.
356 * linux-low.h (PTRACE_TYPE_ARG3): Move to
357 common/linux-ptrace.h.
358 (PTRACE_TYPE_ARG4): Likewise.
359 Include linux-ptrace.h.
361 2013-08-21 Pedro Alves <palves@redhat.com>
363 * config.in: Renegerate.
365 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
367 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
368 (SFILES): Remove $(srcdir)/common/target-common.c and
369 add $(srcdir)/target/waitstatus.c.
370 (OBS): Remove target-common.o and add waitstatus.o.
371 (server_h): Remove $(srcdir)/../common/target-common.h and
372 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
373 and $(srcdir)/../target/waitstatus.h.
374 (target-common.o): Remove.
375 (waitstatus.o): New target object file.
376 * target.h: Do not include target-common.h and
377 include target/resume.h, target/wait.h and
380 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
382 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
384 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
385 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
387 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
388 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
390 2013-07-27 Jie Zhang <jie@codesourcery.com>
391 Daniel Jacobowitz <dan@codesourcery.com>
392 Yao Qi <yao@codesourcery.com>
394 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
395 (mips-linux-watch.o): New rule.
396 (mips_linux_watch_h): New variable.
397 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
399 * linux-mips-low.c: Include mips-linux-watch.h.
400 (struct arch_process_info, struct arch_lwp_info): New.
401 (update_watch_registers_callback): New function.
402 (mips_linux_new_process, mips_linux_new_thread) New functions.
403 (mips_linux_prepare_to_resume, mips_insert_point): New
405 (mips_remove_point, mips_stopped_by_watchpoint): New
407 (rsp_bp_type_to_target_hw_bp_type): New function.
408 (mips_stopped_data_address): New function.
409 (the_low_target): Add watchpoint support functions.
411 2013-07-27 Yao Qi <yao@codesourcery.com>
413 * i386-low.c: Include break-common.h.
414 (enum target_hw_bp_type): Remove.
416 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
418 * Makefile.in (SFILES): /common/target-common.c.
419 (OBS): Add target-common.o.
420 (server_h): Add $(srcdir)/../common/target-common.h.
421 (target-common.o): New target.
422 * server.c (queue_stop_reply_callback): Free
423 status string after use.
424 * target.c (target_waitstatus_to_string): Remove.
425 * target.h: Include target-common.h.
426 (resume_kind): Likewise.
427 (target_waitkind): Likewise.
428 (target_waitstatus): Likewise.
429 (TARGET_WNOHANG): Likewise.
431 2013-07-04 Yao Qi <yao@codesourcery.com>
433 * Makefile.in (host_alias): Use @host_noncanonical@.
434 (target_alias): Use @target_noncanonical@.
435 * configure.ac: Use ACX_NONCANONICAL_TARGET and
436 ACX_NONCANONICAL_HOST.
437 * configure: Regenerated.
440 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
442 * configure.ac (version_host, version_target): Set and AC_SUBST them.
443 * configure: Rebuild.
444 * Makefile.in (version_host, version_target): Get from configure.
445 (version.c): Use $(version_host) and $(version_target).
447 2013-07-03 Pedro Alves <palves@redhat.com>
449 * Makefile.in (config.status): Depend on development.sh.
450 * acinclude.m4: Include libmcheck.m4.
451 * configure: Regenerate.
453 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
455 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
456 attribute inside the parentheses.
457 (winapi_DebugSetProcessKillOnExit): Ditto.
458 (winapi_DebugBreakProcess): Ditto.
459 (winapi_GenerateConsoleCtrlEvent): Ditto.
461 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
463 * notif.h (notif_event): Add a dummy member to avoid compiler
466 2013-07-01 Pedro Alves <palves@redhat.com>
468 * hostio.c (HOSTIO_PATH_MAX): Define.
469 (require_filename, handle_open, handle_unlink, handle_readlink):
472 2013-07-01 Pedro Alves <palves@redhat.com>
474 * server.h: Include "pathmax.h".
475 * linux-low.c: Don't include sys/param.h.
476 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
478 * win32-low.c: Don't include sys/param.h.
479 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
481 2013-07-01 Pedro Alves <palves@redhat.com>
483 * event-loop.c: Don't check HAVE_UNISTD_H before including
485 * gdbreplay.c: Likewise.
486 * remote-utils.c: Likewise.
487 * server.c: Likewise.
488 * configure.ac: Don't check for unistd.h.
489 * configure: Regenerate.
491 2013-06-28 Tom Tromey <tromey@redhat.com>
493 * Makefile.in (version.c): Use version.in, not
496 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
498 * configure.ac (version_host, version_target): Set and AC_SUBST them.
499 * configure: Rebuild.
500 * Makefile.in (version_host, version_target): Get from configure.
501 (version.c): Use $(version_host) and $(version_target).
503 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
505 Fix trace-status to output user name without trailing colon.
506 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
508 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
510 Fix trace-status to output proper start-time and stop-time.
511 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
512 output start time and stop time in hex as gdb expects.
514 2013-06-26 Pedro Alves <pedro@codesourcery.com>
516 * tracepoint.c (build_traceframe_info_xml): Output trace state
517 variables present in the trace buffer.
519 2013-06-24 Tom Tromey <tromey@redhat.com>
521 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
524 * gdbreplay.c: Include version.h.
525 (version, host_name): Don't declare.
526 * server.h: Include version.h.
527 (version, host_name): Don't declare.
529 2013-06-12 Pedro Alves <palves@redhat.com>
531 * linux-x86-low.c (linux_is_elf64): Delete global.
532 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
533 with local linux_pid_exe_is_elf_64_file use.
535 2013-06-11 Pedro Alves <palves@redhat.com>
537 * linux-low.c (regset_disabled, disable_regset): New functions.
538 (regsets_fetch_inferior_registers)
539 (regsets_store_inferior_registers): Use them.
540 (initialize_regsets_info); Don't allocate the disabled_regsets
542 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
545 2013-06-11 Pedro Alves <palves@redhat.com>
547 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
550 2013-06-11 Pedro Alves <palves@redhat.com>
552 * linux-x86-low.c (initialize_low_arch): Call
553 init_registers_x32_avx_linux.
555 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
557 Fix compatibility with Android Bionic.
558 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
561 2013-06-07 Pedro Alves <palves@redhat.com>
564 * Makefile.in (OBS): Add tdesc.o.
565 (IPA_OBJS): Add tdesc-ipa.o.
566 (tdesc-ipa.o): New rule.
567 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
569 * linux-low.c (new_inferior): Delete.
570 (disabled_regsets, num_regsets): Delete.
571 (linux_add_process): Adjust to set the new per-process
573 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
574 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
575 was a stop. When calling arch_setup, switch the current inferior
576 to the thread that got an event.
577 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
578 (regsets_fetch_inferior_registers)
579 (regsets_store_inferior_registers): New regsets_info parameter.
581 (linux_register_in_regsets): New regs_info parameter. Adjust to
583 (register_addr, fetch_register, store_register): New usrregs_info
584 parameter. Adjust to use it.
585 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
586 parameter regs_info. Adjust to use it.
587 (linux_fetch_registers): Get the current inferior's regs_info, and
589 (linux_store_registers): Ditto.
590 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
591 (initialize_low): Don't initialize the target_regsets here. Call
593 * linux-low.h (target_regsets): Delete declaration.
594 (struct regsets_info): New.
595 (struct usrregs_info): New.
596 (struct regs_info): New.
597 (struct process_info_private) <new_inferior>: New field.
598 (struct linux_target_ops): Delete the num_regs, regmap, and
599 regset_bitmap fields. New field regs_info.
600 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
601 * i387-fp.c (num_xmm_registers): Delete.
602 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
603 calls to new interface.
604 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
605 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
606 Infer the number of xmm registers from the regcache's target
608 * i387-fp.h (num_xmm_registers): Delete.
609 * inferiors.c (add_thread): Don't install the thread's regcache
611 * proc-service.c (gregset_info): Fetch the current inferior's
612 regs_info. Adjust to use it.
613 * regcache.c: Include tdesc.h.
614 (register_bytes, reg_defs, num_registers)
615 (gdbserver_expedite_regs): Delete.
616 (get_thread_regcache): If the thread doesn't have a regcache yet,
617 create one, instead of aborting gdbserver.
618 (regcache_invalidate_one): Rename to ...
619 (regcache_invalidate_thread): ... this.
620 (regcache_invalidate_one): New.
621 (regcache_invalidate): Only invalidate registers of the current
623 (init_register_cache): Add target_desc parameter, and use it.
624 (new_register_cache): Ditto. Assert the target description has a
625 non zero registers_size.
626 (regcache_cpy): Add assertions. Adjust.
627 (realloc_register_cache, set_register_cache): Delete.
628 (registers_to_string, registers_from_string): Adjust.
629 (find_register_by_name, find_regno, find_register_by_number)
630 (register_cache_size): Add target_desc parameter, and use it.
631 (free_register_cache_thread, free_register_cache_thread_one)
632 (regcache_release, register_cache_size): New.
633 (register_size): Add target_desc parameter, and use it.
634 (register_data, supply_register, supply_register_zeroed)
635 (supply_regblock, supply_register_by_name, collect_register)
636 (collect_register_as_string, collect_register_by_name): Adjust.
637 * regcache.h (struct target_desc): Forward declare.
638 (struct regcache) <tdesc>: New field.
639 (init_register_cache, new_register_cache): Add target_desc
641 (regcache_invalidate_thread): Declare.
642 (regcache_invalidate_one): Delete declaration.
643 (regcache_release): Declare.
644 (find_register_by_number, register_cache_size, register_size)
645 (find_regno): Add target_desc parameter.
646 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
648 * remote-utils.c: Include tdesc.h.
649 (outreg, prepare_resume_reply): Adjust.
650 * server.c: Include tdesc.h.
651 (gdbserver_xmltarget): Delete declaration.
652 (get_features_xml, process_serial_event): Adjust.
653 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
655 (struct process_info) <tdesc>: New field.
656 (ipa_tdesc): Declare.
659 * tracepoint.c: Include tdesc.h.
660 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
661 (get_context_regcache): Adjust to pass ipa_tdesc down.
662 (do_action_at_tracepoint): Adjust to get the register cache size
663 from the context regcache's description.
664 (traceframe_walk_blocks): Adjust to get the register cache size
665 from the current trace frame's description.
666 (traceframe_get_pc): Adjust to get current trace frame's
667 description and pass it down.
668 (gdb_collect): Adjust to get the register cache size from the
670 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
671 (gdbserver_xmltarget): Delete.
672 (initialize_low_tracepoint): Set the ipa's target description.
673 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
674 (initialize_low_tracepoint): Set the ipa's target description.
675 * linux-x86-low.c: Include tdesc.h.
676 [__x86_64__] (is_64bit_tdesc): New.
677 (ps_get_thread_area, x86_get_thread_area): Use it.
678 (i386_cannot_store_register): Rename to ...
679 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
680 (i386_cannot_fetch_register): Rename to ...
681 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
682 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
684 (target_regsets): Rename to ...
685 (x86_regsets): ... this.
686 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
688 (x86_siginfo_fixup): Use is_64bit_tdesc.
689 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
690 (tdesc_x32_avx_linux, tdesc_x32_linux)
691 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
693 (x86_linux_update_xmltarget): Delete.
694 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
695 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
696 (AMD64_LINUX_USER64_CS): New.
697 (x86_linux_read_description): New, based on
698 x86_linux_update_xmltarget.
699 (same_process_callback): New.
700 (x86_arch_setup_process_callback): New.
701 (x86_linux_update_xmltarget): New.
702 (x86_regsets_info): New.
703 (amd64_linux_regs_info): New.
704 (i386_linux_usrregs_info): New.
705 (i386_linux_regs_info): New.
706 (x86_linux_regs_info): New.
707 (x86_arch_setup): Reimplement.
708 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
709 (x86_emit_ops): Ditto.
710 (the_low_target): Adjust. Install x86_linux_regs_info,
711 x86_cannot_fetch_register, and x86_cannot_store_register.
712 (initialize_low_arch): New.
713 * linux-ia64-low.c (tdesc_ia64): Declare.
714 (ia64_fetch_register): Adjust.
715 (ia64_usrregs_info, regs_info): New globals.
716 (ia64_regs_info): New function.
717 (the_low_target): Adjust.
718 (initialize_low_arch): New function.
719 * linux-sparc-low.c (tdesc_sparc64): Declare.
720 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
722 (sparc_arch_setup): New function.
723 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
724 (the_low_target): Adjust.
725 (initialize_low_arch): New function.
726 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
727 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
728 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
729 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
730 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
731 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
732 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
733 (tdesc_powerpc_isa205_vsx64l): Declare.
734 (ppc_cannot_store_register, ppc_collect_ptrace_register)
735 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
736 (ppc_set_pc, ppc_get_hwcap): Adjust.
737 (ppc_usrregs_info): Forward declare.
738 (!__powerpc64__) ppc_regmap_adjusted: New global.
739 (ppc_arch_setup): Adjust to the current process'es target
741 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
742 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
743 (ppc_store_evrregset): Adjust.
744 (target_regsets): Rename to ...
745 (ppc_regsets): ... this, and make static.
746 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
747 (ppc_regs_info): New function.
748 (the_low_target): Adjust.
749 (initialize_low_arch): New function.
750 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
751 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
752 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
753 (tdesc_s390x_linux64v2): Declare.
754 (s390_collect_ptrace_register, s390_supply_ptrace_register)
755 (s390_fill_gregset, s390_store_last_break): Adjust.
756 (target_regsets): Rename to ...
757 (s390_regsets): ... this, and make static.
758 (s390_get_pc, s390_set_pc): Adjust.
759 (s390_get_hwcap): New target_desc parameter, and use it.
760 [__s390x__] (have_hwcap_s390_high_gprs): New global.
761 (s390_arch_setup): Adjust to set the current process'es target
762 description. Don't adjust the regmap.
763 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
764 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
765 (regs_info_3264): New globals.
766 (s390_regs_info): New function.
767 (the_low_target): Adjust.
768 (initialize_low_arch): New function.
769 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
770 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
771 [__mips64] (init_registers_mips_linux)
772 (init_registers_mips_dsp_linux): Delete defines.
773 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
774 (have_dsp): New global.
775 (mips_read_description): New, based on mips_arch_setup.
776 (mips_arch_setup): Reimplement.
777 (get_usrregs_info): New function.
778 (mips_cannot_fetch_register, mips_cannot_store_register)
779 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
780 (mips_fill_fpregset, mips_store_fpregset): Adjust.
781 (target_regsets): Rename to ...
782 (mips_regsets): ... this, and make static.
783 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
784 (dsp_regs_info, regs_info): New globals.
785 (mips_regs_info): New function.
786 (the_low_target): Adjust.
787 (initialize_low_arch): New function.
788 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
789 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
791 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
792 (arm_read_description): New, with bits factored from
794 (arm_arch_setup): Reimplement.
795 (target_regsets): Rename to ...
796 (arm_regsets): ... this, and make static.
797 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
798 (arm_regs_info): New function.
799 (the_low_target): Adjust.
800 (initialize_low_arch): New function.
801 * linux-m68k-low.c (tdesc_m68k): Declare.
802 (target_regsets): Rename to ...
803 (m68k_regsets): ... this, and make static.
804 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
805 (m68k_regs_info): New function.
806 (m68k_arch_setup): New function.
807 (the_low_target): Adjust.
808 (initialize_low_arch): New function.
809 * linux-sh-low.c (tdesc_sharch): Declare.
810 (target_regsets): Rename to ...
811 (sh_regsets): ... this, and make static.
812 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
813 (sh_regs_info, sh_arch_setup): New functions.
814 (the_low_target): Adjust.
815 (initialize_low_arch): New function.
816 * linux-bfin-low.c (tdesc_bfin): Declare.
817 (bfin_arch_setup): New function.
818 (bfin_usrregs_info, regs_info): New globals.
819 (bfin_regs_info): New function.
820 (the_low_target): Adjust.
821 (initialize_low_arch): New function.
822 * linux-cris-low.c (tdesc_cris): Declare.
823 (cris_arch_setup): New function.
824 (cris_usrregs_info, regs_info): New globals.
825 (cris_regs_info): New function.
826 (the_low_target): Adjust.
827 (initialize_low_arch): New function.
828 * linux-cris-low.c (tdesc_crisv32): Declare.
829 (cris_arch_setup): New function.
830 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
831 (cris_regs_info): New function.
832 (the_low_target): Adjust.
833 (initialize_low_arch): New function.
834 * linux-m32r-low.c (tdesc_m32r): Declare.
835 (m32r_arch_setup): New function.
836 (m32r_usrregs_info, regs_info): New globals.
837 (m32r_regs_info): Adjust.
838 (initialize_low_arch): New function.
839 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
840 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
841 (tic6x_usrregs_info): Forward declare.
842 (tic6x_read_description): New function, based on ...
843 (tic6x_arch_setup): ... this. Reimplement.
844 (target_regsets): Rename to ...
845 (tic6x_regsets): ... this, and make static.
846 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
847 (tic6x_regs_info): New function.
848 (the_low_target): Adjust.
849 (initialize_low_arch): New function.
850 * linux-xtensa-low.c (tdesc_xtensa): Declare.
851 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
852 (target_regsets): Rename to ...
853 (xtensa_regsets): ... this, and make static.
854 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
856 (xtensa_arch_setup, xtensa_regs_info): New functions.
857 (the_low_target): Adjust.
858 (initialize_low_arch): New function.
859 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
860 (nios2_arch_setup): Set the current process'es tdesc.
861 (target_regsets): Rename to ...
862 (nios2_regsets): ... this.
863 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
864 (nios2_regs_info): New function.
865 (the_low_target): Adjust.
866 (initialize_low_arch): New function.
867 * linux-aarch64-low.c (tdesc_aarch64): Declare.
868 (aarch64_arch_setup): Set the current process'es tdesc.
869 (target_regsets): Rename to ...
870 (aarch64_regsets): ... this.
871 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
872 (aarch64_regs_info): New function.
873 (the_low_target): Adjust.
874 (initialize_low_arch): New function.
875 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
877 (target_regsets): Rename to ...
878 (tile_regsets): ... this.
879 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
880 (tile_regs_info): New function.
881 (tile_arch_setup): Set the current process'es tdesc.
882 (the_low_target): Adjust.
883 (initialize_low_arch): New function.
884 * spu-low.c (tdesc_spu): Declare.
885 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
886 * win32-arm-low.c (tdesc_arm): Declare.
887 (arm_arch_setup): New function.
888 (the_low_target): Install arm_arch_setup instead of
890 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
891 (init_windows_x86): Rename to ...
892 (i386_arch_setup): ... this. Set `win32_tdesc'.
893 (the_low_target): Adjust.
894 * win32-low.c (win32_tdesc): New global.
895 (child_add_thread): Don't create the thread cache here.
896 (do_initial_child_stuff): Set the new process'es tdesc.
897 * win32-low.h (struct target_desc): Forward declare.
898 (win32_tdesc): Declare.
899 * lynx-i386-low.c (tdesc_i386): Declare global.
900 (lynx_i386_arch_setup): Set `lynx_tdesc'.
901 * lynx-low.c (lynx_tdesc): New global.
902 (lynx_add_process): Set the new process'es tdesc.
903 * lynx-low.h (struct target_desc): Forward declare.
904 (lynx_tdesc): Declare global.
905 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
906 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
907 * nto-low.c (nto_tdesc): New global.
908 (do_attach): Set the new process'es tdesc.
909 * nto-low.h (struct target_desc): Forward declare.
910 (nto_tdesc): Declare.
911 * nto-x86-low.c (tdesc_i386): Declare.
912 (nto_x86_arch_setup): Set `nto_tdesc'.
914 2013-06-04 Gary Benson <gbenson@redhat.com>
916 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
917 to qSupported response when appropriate.
918 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
919 with nonzero-length annex.
920 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
921 arguments supplied in annex.
923 2013-05-31 Doug Evans <dje@google.com>
926 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
927 64 bits in 64-cross-32 environment.
929 2013-05-28 Pedro Alves <palves@redhat.com>
931 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
932 (aarch64-without-fpu.c): Delete rule.
933 * configure.srv (aarch64*-*-linux*): Remove references to
934 aarch64-without-fpu.o and aarch64-without-fpu.xml.
935 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
938 2013-05-24 Pedro Alves <palves@redhat.com>
940 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
941 instead of strchr/decode_address. Error if the range isn't split
942 with a ','. Don't assume there's be a ':' in the action.
944 2013-05-23 Yao Qi <yao@codesourcery.com>
945 Pedro Alves <palves@redhat.com>
947 * linux-low.c (lwp_in_step_range): New function.
948 (linux_wait_1): If the thread was range stepping and stopped
949 outside the stepping range, report the stop to GDB. Otherwise,
950 continue stepping. Add range stepping debug output.
951 (linux_set_resume_request): Copy the step range from the resume
953 (linux_supports_range_stepping): New.
954 (linux_target_ops) <supports_range_stepping>: Set to
955 linux_supports_range_stepping.
956 * linux-low.h (struct linux_target_ops)
957 <supports_range_stepping>: New field.
958 (struct lwp_info) <step_range_start, step_range_end>: New fields.
959 * linux-x86-low.c (x86_supports_range_stepping): New.
960 (the_low_target) <supports_range_stepping>: Set to
961 x86_supports_range_stepping.
962 * server.c (handle_v_cont): Handle 'r' action.
963 (handle_v_requests): Append ";r" if the target supports range
965 * target.h (struct thread_resume) <step_range_start,
966 step_range_end>: New fields.
967 (struct target_ops) <supports_range_stepping>:
969 (target_supports_range_stepping): New macro.
971 2013-05-17 Joel Brobecker <brobecker@adacore.com>
973 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
974 confusion in comment.
976 2013-05-17 Joel Brobecker <brobecker@adacore.com>
978 * lynx-low.c (struct process_info_private): New type.
979 (lynx_add_process): New function.
980 (lynx_create_inferior, lynx_attach): Replace calls to
981 add_process by calls to lynx_add_process.
982 (lynx_resume): If PTID is null, then try using
983 current_process()->private->last_wait_event_ptid.
985 (lynx_clear_inferiors): Delete. The contents of that function
986 has been inlined in lynx_mourn;
987 (lynx_wait_1): Save the ptid in the process's private data.
988 (lynx_mourn): Free the process' private data. Replace call
989 to lynx_clear_inferiors by call to clear_inferiors.
991 2013-05-17 Yao Qi <yao@codesourcery.com>
993 * i386-low.c (i386_length_and_rw_bits): Move the comment to
996 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
998 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
999 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1000 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1001 PT_TEXT_END_ADDR guards. Update comments.
1002 (linux_target_op) <read_offsets>: Conditionally define to
1003 linux_read_offsets if the target is UCLIBC and if it defines
1004 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1006 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1007 Andrew Jenner <andrew@codesourcery.com>
1009 * Makefile.in (SFILES): Add linux-nios2-low.c.
1010 (clean): Add action to delete nios2-linux.c.
1011 (nios2-linux.c): New rule.
1012 * configure.srv: Add nios2*-*-linux*.
1013 * linux-nios2-low.c: New.
1015 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1017 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1019 2013-04-25 Hui Zhu <hui@codesourcery.com>
1022 * ax.c (ax_printf): Add fflush.
1024 2013-04-22 Tom Tromey <tromey@redhat.com>
1026 * Makefile.in (SFILES): Add filestuff.c.
1027 (OBS): Add filestuff.o.
1028 (filestuff.o): New target.
1029 * config.in, configure: Rebuild.
1030 * configure.ac: Check for fdwalk, pipe2.
1032 2013-04-17 Pedro Alves <palves@redhat.com>
1034 * configure.ac (USE_THREAD_DB): Delete variable.
1035 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1036 Don't AC_SUBST USE_THREAD_DB.
1037 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1038 * config.in, configure: Regenerate.
1040 2013-04-16 Pedro Alves <palves@redhat.com>
1042 * linux-low.h (struct lwp_info) <thread_known>: Move under
1043 the USE_THREAD_DB #ifdef.
1045 2013-04-16 Pedro Alves <palves@redhat.com>
1047 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1048 (linux-low.o): Delete rule.
1049 * linux-low.h: Always include "gdb_thread_db.h" instead of
1050 conditionally including thread_db.h.
1051 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1054 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1056 * Makefile.in (install-only): Fix make install regression.
1058 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1060 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1061 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1063 * gdbserver.1: Remove.
1065 2013-03-22 Pedro Alves <palves@redhat.com>
1067 * linux-low.c (handle_extended_wait): Don't call
1068 linux_enable_event_reporting.
1070 2013-03-15 Tony Theodore <tonyt@logyst.com>
1073 * Makefile.in (SHELL): Use @SHELL@.
1075 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1077 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1080 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1082 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1083 Remove extraneous NULL element.
1085 2013-03-13 Yao Qi <yao@codesourcery.com>
1087 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1088 'V' block in trace frame.
1090 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1092 * target.h (struct target_ops): Add btrace ops.
1093 (target_supports_btrace): New macro.
1094 (target_enable_btrace): New macro.
1095 (target_disable_btrace): New macro.
1096 (target_read_btrace): New macro.
1097 * gdbthread.h (struct thread_info): Add btrace field.
1098 * server.c: Include btrace-common.h.
1099 (handle_btrace_general_set): New function.
1100 (handle_btrace_enable): New function.
1101 (handle_btrace_disable): New function.
1102 (handle_general_set): Call handle_btrace_general_set.
1103 (handle_qxfer_btrace): New function.
1104 (struct qxfer qxfer_packets[]): Add btrace entry.
1105 * inferiors.c (remove_thread): Disable btrace.
1106 * linux-low: Include linux-btrace.h.
1107 (linux_low_enable_btrace): New function.
1108 (linux_low_read_btrace): New function.
1109 (linux_target_ops): Add btrace ops.
1110 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1111 Add srv_linux_btrace=yes.
1112 (x86_64-*-linux*): Add linux-btrace.o.
1113 Add srv_linux_btrace=yes.
1114 * configure.ac: Define HAVE_LINUX_BTRACE.
1115 * config.in: Regenerated.
1116 * configure: Regenerated.
1118 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1120 * server.c (handle_qxfer): Preserve error message if -3 is
1122 (qxfer): Document the -3 return value.
1124 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1126 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1127 (linux_btrace_h): New variable.
1128 (linux-btrace.o): New rule.
1130 2013-03-08 Stan Shebs <stan@codesourcery.com>
1131 Hafiz Abid Qadeer <abidh@codesourcery.com>
1133 * tracepoint.c (trace_buffer_size): New global.
1134 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1135 (init_trace_buffer): Change to one-argument function. Allocate
1136 trace buffer memory.
1137 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1138 handle QTBuffer:size packet.
1139 (cmd_bigqtbuffer_size): New function.
1140 (initialize_tracepoint): Call init_trace_buffer with
1141 DEFAULT_TRACE_BUFFER_SIZE.
1142 * server.c (handle_query): Add QTBuffer:size in the
1145 2013-03-07 Yao Qi <yao@codesourcery.com>
1147 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1148 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1150 (cmd_qtsp): Adjust condition. Do post increment.
1151 Set cur_action and cur_step_action back to 0.
1153 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1156 * linux-low.c (linux_write_memory): Return early success if LEN is
1159 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1161 * configure.srv: Add x86_64-*-cygwin* as target.
1163 2013-02-28 Tom Tromey <tromey@redhat.com>
1165 * configure.ac: Invoke AC_SYS_LARGEFILE.
1166 * configure, config.in: Rebuild.
1168 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1170 * win32-low.c: Throughout, fix format strings and casts of
1171 printf-like functions to avoid type related warnings on all
1173 (get_child_debug_event): Print dwDebugEventCode as hex since
1174 that's how it's usually documented.
1176 2013-02-28 Yao Qi <yao@codesourcery.com>
1178 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1181 2013-02-27 Jiong Wang <jiwang@tilera.com>
1183 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1184 (reg-tilegx32.c): New rule.
1185 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1186 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1187 different register info initializer according to elf class.
1188 (init_registers_tilgx32): New function. The tilegx32 register info
1190 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1191 (tile_store_gregset): Likewise.
1193 2013-02-27 Yao Qi <yao@codesourcery.com>
1195 * server.c (process_point_options): Print debug message when
1196 debug_threads is true.
1198 2013-02-26 Yao Qi <yao@codesourcery.com>
1200 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1202 2013-02-19 Pedro Alves <palves@redhat.com>
1203 Kai Tietz <ktietz@redhat.com>
1207 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1208 instead of strtoul to extract address from packet.
1209 (process_serial_event) <'z'>: Likewise.
1211 2013-02-18 Yao Qi <yao@codesourcery.com>
1213 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1215 2013-02-14 Pedro Alves <palves@redhat.com>
1219 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1220 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1222 2013-02-14 Pedro Alves <palves@redhat.com>
1224 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1226 2013-02-14 Pedro Alves <palves@redhat.com>
1228 * tracepoint.c (save_string): Delete.
1229 (add_tracepoint_action): Use savestring instead of save_string.
1231 2013-02-12 Pedro Alves <palves@redhat.com>
1233 * linux-xtensa-low.c: Ditto.
1234 * xtensa-xtregs.c: Ditto.
1236 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1238 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1241 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1243 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1244 aarch64_num_wp_regs and aarch64_num_bp_regs to
1245 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1247 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1249 * linux-aarch64-low.c (ps_get_thread_area): Replace
1250 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1252 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1253 Marcus Shawcroft <marcus.shawcroft@arm.com>
1254 Nigel Stephens <nigel.stephens@arm.com>
1255 Yufeng Zhang <yufeng.zhang@arm.com>
1257 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1258 (aarch64.c, aarch64-without-fpu.c): New targets.
1259 * configure.srv (aarch64*-*-linux*): New.
1260 * linux-aarch64-low.c: New file.
1262 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1264 * linux-low.c (handle_extended_wait, linux_create_inferior)
1265 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1266 (dequeue_one_deferred_signal, linux_resume_one_thread)
1267 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1268 (linux_tracefork_grandchild, linux_test_for_tracefork)
1269 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1270 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1271 where the argument is 0.
1273 2013-01-25 Yao Qi <yao@codesourcery.com>
1275 * event-loop.c: Include "queue.h".
1276 (gdb_event_p): New typedef.
1277 (struct gdb_event) <next_event>: Remove.
1278 (event_queue): Change to QUEUE(gdb_event_p).
1279 (async_queue_event): Remove.
1280 (gdb_event_xfree): New.
1281 (initialize_event_loop): New.
1282 (process_event): Use API from QUEUE.
1283 (wait_for_event): Likewise.
1284 * server.c (main): Call initialize_event_loop.
1285 * server.h (initialize_event_loop): Declare.
1287 2013-01-18 Yao Qi <yao@codesourcery.com>
1289 * ax.h (struct eval_agent_expr_context): New.
1290 (gdb_eval_agent_expr): Update declaration.
1291 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1292 TFRAME. Add new argument CTX.
1293 * server.h (struct eval_agent_expr_context): Declare.
1294 (agent_mem_read, agent_tsv_read): Update declaration.
1295 (agent_mem_read_string): Likewise.
1296 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1297 (add_traceframe_block): Add new argument TPOINT.
1298 Increase TPOINT->traceframe_usage.
1299 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1300 eval_tracepoint_agent_expr.
1301 (condition_true_at_tracepoint): Likewise.
1302 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1303 (agent_mem_read_string, agent_tsv_read): Likewise.
1305 2013-01-16 Yao Qi <yao@codesourcery.com>
1307 * linux-low.c (linux_resume_one_lwp): Don't check
1308 'lwp->bp_reinsert != 0'.
1310 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1311 Pedro Alves <palves@redhat.com>
1313 * lynx-low.c (ptrace_request_to_str): Define a temporary
1314 macro and use it to simplify this function's implementation.
1316 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1318 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1321 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1323 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1325 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1327 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1329 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1331 * lynx-low.c (lynx_resume): Use the resume_info parameter
1332 to determine the ptid for the lynx_ptrace call, unless
1333 it is equal to minus_one_ptid, in which case we use the
1334 ptid of the current_inferior.
1335 (lynx_wait_1): After having received a thread create/exit
1336 event, resume the inferior's execution using the signaling
1337 thread's ptid, rather than the old ptid.
1339 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1341 * lynx-low.c (lynx_resume): Delete variable ret.
1343 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1345 * gdbreplay.c (gdbreplay_version): Update copyright year.
1346 * server.c (gdbserver_version): Likewise.
1348 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1350 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1353 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1355 * lynx-low.c (ptrace_request_to_str): Add handling for
1358 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1360 * lynx-low.c (lynx_attach): Delete variable new_process.
1362 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1364 * lynx-low.c (lynx_create_inferior): Delete variable
1367 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1369 * lynx-low.c (ptrace_request_to_str): Do not handle
1370 PTRACE_GETTHREADLIST if this macro does not exist.
1372 2012-12-15 Yao Qi <yao@codesourcery.com>
1374 * Makefile.in (OBS): Add notif.o.
1375 * notif.c, notif.h: New.
1376 * server.c: Include "notif.h".
1377 (struct vstop_notif) <next>: Remove.
1379 (queue_stop_reply): Update.
1380 (push_event, send_next_stop_reply): Remove.
1381 (discard_queued_stop_replies): Update.
1382 (notif_stop): New variable.
1383 (handle_v_stopped): Remove.
1384 (handle_v_requests): Don't call handle_v_stopped. Call
1385 handle_ack_notif instead.
1386 (queue_stop_reply_callback): Call notif_event_enque instead
1387 of queue_stop_reply.
1388 (handle_status): Don't call send_next_stop_reply, call
1389 notif_write_event instead.
1390 (kill_inferior_callback): Likewise.
1391 (detach_or_kill_inferior_callback): Likewise.
1392 (main): Call initialize_notif.
1393 (process_serial_event): Call QUEUE_is_empty.
1394 (handle_target_event): Call notif_push instead of push event.
1395 * server.h (push_event): Remove declaration.
1397 2012-12-10 Tom Tromey <tromey@redhat.com>
1399 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1400 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1403 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1404 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1405 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1406 (amd64-linux-ipa.o, ax.o): Rewrite.
1407 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1408 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1409 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1410 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1411 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1412 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1413 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1414 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1415 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1416 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1417 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1418 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1419 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1420 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1421 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1422 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1423 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1424 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1425 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1426 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1427 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1428 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1429 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1430 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1431 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1432 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1433 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1434 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1435 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1436 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1437 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1438 (reg-tilegx.o): Remove.
1439 (all_object_files): New macro.
1440 Include .deps files.
1441 * aclocal.m4, configure: Rebuild.
1442 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1443 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1444 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1446 2012-12-05 Tom Tromey <tromey@redhat.com>
1449 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1451 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1453 * configure.ac: Check for linux/perf_event.h.
1454 * config.in: Regenerated.
1455 * configure: Regenerated.
1457 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1459 * hostio.c (handle_readlink): Decrease buffer size
1460 parameter passed to readlink by one byte.
1462 2012-11-26 Yao Qi <yao@codesourcery.com>
1464 * configure.ac (build_warnings): Append '-Wempty-body'.
1465 * configure: Regenerated.
1466 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1469 2012-11-15 Pierre Muller <muller@sourceware.org>
1471 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1472 * config.in: Regenerate.
1473 * configure: Regenerate.
1474 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1475 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1476 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1477 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1479 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1480 instead of <sys/wait.h> header.
1481 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1483 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1485 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1486 (various make rules): Remove -DGDBSERVER
1488 2012-11-09 Yao Qi <yao@codesourcery.com>
1490 * spu-low.c (current_ptid): Move it to ..
1491 * gdbthread.h: ... here. New.
1492 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1493 * server.c (myresume, process_serial_event): Likewise.
1494 * thread-db.c (thread_db_find_new_threads): Likewise.
1495 * tracepoint.c (run_inferior_command): Likewise.
1497 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1499 * server.c (handle_search_memory_1): Include access length in
1502 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1504 * linux-crisv32-low.c: Fix compile errors.
1506 2012-09-04 Yao Qi <yao@codesourcery.com>
1508 * tracepoint.c (cmd_qtsv): Adjust debug message.
1509 Don't check CUR_TPOINT.
1511 2012-08-28 Yao Qi <yao@codesourcery.com>
1513 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1514 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1515 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1516 Remove declarations of xmalloc, xreallloc, xstrdup and
1518 * Makefile.in (libiberty_h): New.
1519 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1520 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1522 2012-08-23 Yao Qi <yao@codesourcery.com>
1524 * server.h: Remove declaration of 'xsnprintf'.
1526 2012-08-22 Keith Seitz <keiths@redhat.com>
1528 * server.h: Include build-gnulib-gbserver/config.h.
1529 * gdbreplay.c: Likewise.
1531 2012-08-08 Doug Evans <dje@google.com>
1533 * Makefile.in (SFILES): Add gdb_vecs.c.
1534 (OBS): Add gdb_vecs.o.
1535 (gdb_vecs_h, host_defs_h): New variables.
1536 (thread-db.o): Add $(gdb_vecs_h) dependency.
1537 (gdb_vecs.o): New rule.
1538 * thread-db.c: #include "gdb_vecs.h".
1539 (thread_db_load_search): Use a vector to iterate over path elements.
1540 Handle text appearing after "$pdir".
1542 * configure.ac: Add check for strstr.
1543 * config.in: Regenerate.
1544 * configure: Regenerate.
1546 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1548 * hostio.c (handle_pread): If pread fails, fall back to attempting
1550 (handle_pwrite): Likewise for pwrite.
1552 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1554 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1555 between unsupported TYPE and unimplementable ADDR/LEN combination.
1556 (arm_insert_point): Act on new return value.
1558 2012-07-31 Pedro Alves <palves@redhat.com>
1560 * server.c (process_point_options): Only skip tokens if we find
1561 one that is unrecognized. Don't treat 'X' specially while
1562 skipping unrecognized tokens.
1564 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1566 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1567 to 4-byte-align HW breakpoint addresses for Thumb.
1569 2012-07-27 Yao Qi <yao@codesourcery.com>
1573 * server.h: Declare gdb_agent_about_to_close.
1574 * target.c (kill_inferior): Include "agent.h".
1575 New. Send command 'kill'.
1576 * target.h (kill_inferior): Removed macro.
1577 * tracepoint.c (gdb_agent_about_to_close): New.
1578 (gdb_agent_helper_thread): Handle command 'close'.
1579 Wait endlessly until the inferior stops.
1580 Install gdb_agent_remove_socket to atexit hook.
1581 (agent_socket_name): New static variable.
1582 (gdb_agent_socket_init): Replace local variable 'name' with
1583 'agent_socket_name'.
1584 (gdb_agent_remove_socket): New.
1586 2012-07-27 Yao Qi <yao@codesourcery.com>
1588 * server.c (process_point_options): Stop at 'X' when parsing.
1590 2012-07-19 Michael Eager <eager@eagercon.com>
1592 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1594 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1595 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1596 hardware breakpoint.
1598 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1600 * gdbserver/linux-low.c (initialize_low): Call
1601 linux_ptrace_init_warnings.
1603 2012-07-02 Doug Evans <dje@google.com>
1605 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1608 2012-07-02 Stan Shebs <stan@codesourcery.com>
1610 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1611 (ax.o): Add it to build rule.
1613 (OBS): Add format.o.
1614 (IPA_OBS): Add format.o.
1615 * server.c (handle_query): Claim support for breakpoint commands.
1616 (process_point_options): Add command case.
1617 (process_serial_event): Leave running if there are printfs in
1619 * mem-break.h (any_persistent_commands): Declare.
1620 (add_breakpoint_commands): Declare.
1621 (gdb_no_commands_at_breakpoint): Declare.
1622 (run_breakpoint_commands): Declare.
1623 * mem-break.c (struct point_command_list): New struct.
1624 (struct breakpoint): New field command_list.
1625 (any_persistent_commands): New function.
1626 (add_commands_to_breakpoint): New function.
1627 (add_breakpoint_commands): New function.
1628 (gdb_no_commands_at_breakpoint): New function.
1629 (run_breakpoint_commands): New function.
1630 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1632 * ax.c: Include format.h.
1633 (ax_printf): New function.
1634 (gdb_eval_agent_expr): Add printf opcode.
1636 2012-06-13 Yao Qi <yao@codesourcery.com>
1638 * server.c (start_inferior): Remove duplicated writes to fields
1639 'last_resume_kind' and 'last_status' of 'current_inferior'.
1641 2012-06-12 Yao Qi <yao@codesourcery.com>
1642 Pedro Alves <palves@redhat.com>
1644 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1646 * server.c (handle_v_cont): Extend comment.
1648 2012-06-11 Yao Qi <yao@codesourcery.com>
1650 * linux-low.c (linux_attach): Add 'static'.
1652 2012-06-06 Yao Qi <yao@codesourcery.com>
1654 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1656 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1658 Fix gcc -flto compilation warning.
1659 * server.c (main): Make variable multi_mode and attach volatile.
1661 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1663 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1664 if the platform doesn't know about it.
1666 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1668 * Makefile.in (SFILES): Add linux-tile-low.c.
1669 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1670 * configure.srv: Handle tilegx-*-linux*.
1671 * linux-tile-low.c: New file.
1673 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1675 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1677 2012-05-24 Pedro Alves <palves@redhat.com>
1681 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1683 2012-05-24 Pedro Alves <palves@redhat.com>
1687 Replace target_signal with gdb_signal throughout.
1689 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1691 * linux-low.c (linux_store_registers): Avoid the copying sequence
1692 when no data has been retrieved by ptrace.
1694 2012-05-22 Will Deacon <will.deacon@arm.com>
1696 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1697 Include asm/ptrace.h.
1698 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1701 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1703 * linux-low.c (linux_store_registers): Don't re-retrieve data
1704 with ptrace that has already been obtained from /proc. Always
1705 copy any data retrieved with ptrace to the buffer supplied.
1707 2012-05-11 Yao Qi <yao@codesourcery.com>
1708 Pedro Alves <palves@redhat.com>
1710 * linux-low.c (enum stopping_threads_kind): New.
1711 (stopping_threads): Change type to `enum stopping_threads_kind'.
1712 (handle_extended_wait): If stopping and suspending threads, leave
1713 the new_lwp suspended too.
1714 (linux_wait_for_event): Adjust.
1715 (stop_all_lwps): Set `stopping_threads' to
1716 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1717 whether we're suspending threads or just stopping them. Assert no
1720 2012-04-29 Yao Qi <yao@codesourcery.com>
1722 * server.h: Move some code to ...
1723 * gdbthread.h: ... here. New.
1724 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1725 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1726 (nto-low.o, win32-low.o): Likewise.
1727 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1728 * regcache.c, remote-utils.c, server.c: Likewise.
1729 * target.c, tracepoint.c, win32-low.c: Likewise.
1731 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1733 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1734 (PTRACE_ARG4_TYPE): Likewise.
1735 (PTRACE_XFER_TYPE): Likewise.
1736 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1737 ptrace to PTRACE_ARG3_TYPE.
1738 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1739 (PTRACE_ARG4_TYPE): Likewise.
1740 (PTRACE_XFER_TYPE): Likewise.
1741 (linux_detach_one_lwp): Cast fourth argument of
1742 ptrace to long then PTRACE_ARG4_TYPE.
1743 (regsets_fetch_inferior_registers): Cast third argument of
1744 ptrace to long then PTRACE_ARG3_TYPE.
1745 (regsets_store_inferior_registers): Likewise.
1747 2012-04-20 Pedro Alves <palves@redhat.com>
1749 * configure: Regenerate.
1751 2012-04-19 Pedro Alves <palves@redhat.com>
1753 * Makefile.in (GNULIB_BUILDDIR): New.
1754 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1755 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1756 (all, install-only, uninstall, clean-info, all-lib, clean): No
1757 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1758 (maintainer-clean realclean distclean): Use subdir_do.
1760 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1761 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1762 * acinclude.m4: Include acx_configure_dir.m4.
1763 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1764 calls. Call AC_PROG_RANLIB. Configure gnulib using
1767 (GNULIB_STDINT_H): Adjust.
1768 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1769 * gdbreplay.c: Include build-gnulib/config.h.
1770 * server.h: Likewise.
1771 * aclocal.m4: Regenerate.
1772 * config.in: Regenerate.
1773 * configure: Regenerate.
1775 2012-04-19 Pedro Alves <palves@redhat.com>
1777 * Makefile.in (LIBGNU, INCGNU): Adjust.
1778 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1779 (all, install-only, uninstall, clean-info, all-lib, clean)
1780 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1781 * configure.ac: Adjust AC_OUTPUT output.
1782 * aclocal.m4: Regenerate.
1783 * configure: Regenerate.
1785 2012-04-19 Pedro Alves <palves@redhat.com>
1787 * Makefile.in (generated_files): New.
1788 (server_h): Remove the explicit dependency on config.h, and depend
1789 on $generated_files.
1791 2012-04-19 Pedro Alves <palves@redhat.com>
1793 * Makefile.in (INCGNU): Add -Ignulib.
1795 2012-04-19 Pedro Alves <palves@redhat.com>
1797 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1798 (INCGNU): ... this, and spell out -I here.
1799 (GNULIB_LIB): Rename to ...
1801 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1803 2012-04-19 Pedro Alves <palves@redhat.com>
1805 * config.in: Regenerate.
1807 2012-04-19 Pedro Alves <palves@redhat.com>
1809 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1810 * server.h (memmem): Remove declaration.
1811 * config.in: Regenerate.
1812 * configure: Regenerate.
1814 2012-04-19 Yao Qi <yao@codesourcery.com>
1816 * Makefile.in (SFILES): Add common/vec.c.
1820 2012-04-19 Yao Qi <yao@codesourcery.com>
1822 * remote-utils.c (prepare_resume_reply): Replace with macro
1823 target_core_of_thread.
1824 * server.c (handle_qxfer_threads_proper): Likewise.
1825 * target.h (traget_core_of_thread): New macro.
1827 2012-04-18 Pedro Alves <palves@redhat.com>
1829 * aclocal.m4: Regenerate.
1830 * configure: Regenerate.
1832 2012-04-16 Yao Qi <yao@codesourcery.com>
1834 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1835 duplicated on address.
1837 2012-04-16 Yao Qi <yao@codesourcery.com>
1839 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1840 (struct tracepoint_action_ops) <send>: New field.
1841 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1842 (agent_expr_send, x_tracepoint_action_send): New.
1843 (l_tracepoint_action_send): New.
1844 (cmd_qtdp): Download and install tracepoint
1845 according to `use_agent'.
1846 (run_inferior_command): Add one more parameter `len'.
1848 (tracepoint_send_agent): New.
1849 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1851 2012-04-16 Yao Qi <yao@codesourcery.com>
1853 * tracepoint.c (download_tracepoints): Moved to ...
1854 (cmd_qtstart): ... here.
1856 2012-04-14 Yao Qi <yao@codesourcery.com>
1858 * tracepoint.c: Include inttypes.h.
1859 (struct collect_memory_action): Use sized types.
1860 (struct tracepoint): Likewise.
1861 (cmd_qtdp, stop_tracing): Update print specifiers.
1862 (cmd_qtp, response_tracepoint): Likewise.
1863 (collect_data_at_tracepoint): Likewise.
1864 (collect_data_at_step): Likewise.
1866 2012-04-14 Yao Qi <yao@codesourcery.com>
1868 Import gnulib module inttypes.
1869 * aclocal.m4, config.in, configure: Regenerated.
1871 2012-04-14 Yao Qi <yao@codesourcery.com>
1873 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1874 Makefile and config.status at last.
1876 2012-04-13 Yao Qi <yao@codesourcery.com>
1878 * tracepoint.c: Include stdint.h unconditionally.
1880 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1882 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1883 on BFD_HAVE_SYS_PROCFS_TYPE.
1884 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1885 * configure: Regenerate.
1886 * config.in: Likewise.
1888 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1890 * Makefile.in (clean): Also remove x32.c x32-linux.c
1891 x32-avx.c x32-avx-linux.c.
1892 (x32.o): New target.
1894 (x32-linux.o): Likewise.
1895 (x32-linux.c): Likewise.
1896 (x32-avx.o): Likewise.
1897 (x32-avx.c): Likewise.
1898 (x32-avx-linux.o): Likewise.
1899 (x32-avx-linux.c): Likewise.
1901 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1902 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1903 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1904 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1905 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1906 i386/x32-avx-linux.xml.
1908 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1909 (init_registers_x32_avx_linux): Likwise.
1910 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1911 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1913 2012-04-13 Pedro Alves <palves@redhat.com>
1915 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1916 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1917 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1918 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1921 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1923 * linux-x86-low.c (compat_x32_clock_t): New.
1924 (compat_x32_siginfo_t): Likewise.
1925 (compat_x32_siginfo_from_siginfo): Likewise.
1926 (siginfo_from_compat_x32_siginfo): Likewise.
1927 (linux_is_elf64): Likewise.
1928 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1929 and siginfo_from_compat_x32_siginfo for x32.
1930 (x86_arch_setup): Set linux_is_elf64.
1932 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1935 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1937 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1938 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1939 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1940 compatible with process.
1942 2012-04-12 Yao Qi <yao@codesourcery.com>
1944 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1945 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1946 (install-only, install-info, clean): Handle sub dir gnulib.
1947 (all-lib, am--refresh): New targets.
1948 (memmem.o): Remove target.
1949 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1950 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1951 (AC_REPLACE_FUNCS): Remove memmem.
1952 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1953 (AC_OUTPUT): Generate Makefile in gnulib/.
1954 * aclocal.m4, config.in, configure: Regenerated.
1956 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1958 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1960 2012-04-05 Pedro Alves <palves@redhat.com>
1962 -Werror=strict-aliasing
1964 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1967 2012-04-04 Pedro Alves <palves@redhat.com>
1969 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1970 (sparc_store_gregset_from_stack, sparc_store_gregset)
1971 (sparc_breakpoint_at): Fix formatting.
1973 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1975 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1977 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1978 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1979 * config.in: Regenerate.
1980 * configure: Likewise.
1982 2012-03-29 Pedro Alves <palves@redhat.com>
1984 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1985 Correct ptrace arguments.
1987 2012-03-28 Pedro Alves <palves@redhat.com>
1989 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1990 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1991 (IA64_FR1_REGNUM): New defines.
1992 (ia64_fetch_register): New.
1993 (the_low_target): Install it.
1994 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1996 * linux-low.c (linux_fetch_registers): Try the
1997 the_low_target.fetch_register hook first.
1999 * linux-arm-low.c (the_low_target): Adjust.
2000 * linux-bfin-low.c (the_low_target): Adjust.
2001 * linux-cris-low.c (the_low_target): Adjust.
2002 * linux-crisv32-low.c (the_low_target): Adjust.
2003 * linux-m32r-low.c (the_low_target): Adjust.
2004 * linux-m68k-low.c (the_low_target): Adjust.
2005 * linux-mips-low.c (the_low_target): Adjust.
2006 * linux-ppc-low.c (the_low_target): Adjust.
2007 * linux-s390-low.c (the_low_target): Adjust.
2008 * linux-sh-low.c (the_low_target): Adjust.
2009 * linux-sparc-low.c (the_low_target): Adjust.
2010 * linux-tic6x-low.c (the_low_target): Adjust.
2011 * linux-x86-low.c (the_low_target): Adjust.
2012 * linux-xtensa-low.c (the_low_target): Adjust.
2014 2012-03-26 Pedro Alves <palves@redhat.com>
2016 * server.c (handle_qxfer_libraries): Don't bail early if
2017 the_target->qxfer_libraries_svr4 is not NULL.
2019 2012-03-26 Pedro Alves <palves@redhat.com>
2021 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2023 2012-03-23 Pedro Alves <palves@redhat.com>
2025 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2026 "library-list-svr4" element's start tag when the the DSO list is
2029 2012-03-23 Pedro Alves <palves@redhat.com>
2031 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2032 a variable whose type size is the same as the inferior's pointer
2035 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2037 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2039 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2040 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2041 * linux-low.h: Include <signal.h>.
2042 (struct siginfo): Remove forward declaration.
2043 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2046 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2048 * .gitignore: Ignore more files.
2050 2012-03-19 Pedro Alves <palves@redhat.com>
2051 Jan Kratochvil <jan.kratochvil@redhat.com>
2053 * server.c (cont_thread, general_thread): Add describing comments.
2054 (start_inferior): Clear `cont_thread'.
2055 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2058 2012-03-15 Yao Qi <yao@codesourcery.com>
2060 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2062 (cmd_qtdp): ... here.
2064 2012-03-15 Yao Qi <yao@codesourcery.com>
2066 * tracepoint.c (struct tracepoint_action_ops): New.
2067 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2068 (m_tracepoint_action_download): New.
2069 (r_tracepoint_action_download): New.
2070 (x_tracepoint_action_download): New.
2071 (l_tracepoint_action_download): New.
2072 (add_tracepoint_action): Install `action->ops' according type.
2073 (download_tracepoint_1): Move code `download' function pointer
2074 of various tracepoint_action_ops.
2076 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2078 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2079 linux_ptrace_attach_warnings.
2081 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2083 * Makefile.in (linux-ptrace.o): New.
2084 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2085 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2086 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2087 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2088 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2090 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2092 2012-03-08 Yao Qi <yao@codesourcery.com>
2093 Pedro Alves <palves@redhat.com>
2095 Fix PR server/13392.
2096 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2098 * tracepoint.c (remove_tracepoint): New.
2099 (cmd_qtdp): Call remove_tracepoint when failed to install.
2101 2012-03-07 Pedro Alves <palves@redhat.com>
2103 * linux-low.c (get_detach_signal): New.
2104 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2105 Pass on pending signals to PTRACE_DETACH. Check the result of the
2107 * server.c (program_signals, program_signals_p): New.
2108 (handle_general_set): Handle QProgramSignals.
2109 * server.h (program_signals, program_signals_p): Declare.
2111 2012-03-05 Pedro Alves <palves@redhat.com>
2112 Jan Kratochvil <jan.kratochvil@redhat.com>
2114 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2117 2012-03-03 Yao Qi <yao@codesourcery.com>
2119 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2120 agent_look_up_symbols.
2122 2012-03-03 Yao Qi <yao@codesourcery.com>
2124 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2125 (linux-x86-low.o): Likewise.
2126 * server.h: Remove in_process_agent_loaded.
2127 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2131 2012-03-03 Yao Qi <yao@codesourcery.com>
2133 * tracepoint.c (gdb_agent_capability): New global.
2134 (in_process_agent_loaded_ust): Renamed to
2135 `in_process_agent_supports_ust'.
2137 (in_process_agent_supports_ust): Call agent_capability_check.
2138 (clear_installed_tracepoints): Assert that agent supports
2141 2012-03-03 Yao Qi <yao@codesourcery.com>
2143 * linux-low.c (linux_supports_agent): New.
2144 (linux_target_ops): Initialize field `supports_agent' with
2145 linux_supports_agent.
2146 * target.h (struct target_ops) <supports_agent>: New.
2147 (target_supports_agent): New macro.
2148 * server.c (handle_general_set): Handle packet 'QAgent'.
2149 (handle_query): Send `QAgent+'.
2150 * Makefile.in (server.o): Depends on agent.h.
2152 2012-03-03 Yao Qi <yao@codesourcery.com>
2154 * Makefile.in (OBS): Add agent.o.
2155 Add new rule for agent.o.
2156 Track dependence of tracepoint.c on agent.h.
2157 * tracepoint.c (run_inferior_command_1):
2158 (run_inferior_command): Call agent_run_command.
2159 (gdb_ust_connect_sync_socket): Deleted. Move it to
2161 (resume_thread, stop_thread): Likewise.
2162 (gdb_ust_socket_init): Renamed to ...
2163 (gdb_agent_socket_init): ... New.
2164 (gdb_ust_thread): Renamed to ...
2165 (gdb_agent_helper_thread): ... New.
2166 (gdb_ust_init): Move some code to ...
2167 (gdb_agent_init): ... here. New.
2168 [HAVE_UST]: Call gdb_ust_init.
2169 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2170 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2171 * config.in, configure: Regenerated.
2173 2012-03-02 Pedro Alves <palves@redhat.com>
2175 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2176 * linux-low.c (struct simple_pid_list): New.
2177 (stopped_pids): New a struct simple_pid_list pointer.
2178 (add_to_pid_list, pull_pid_from_list): New.
2179 (handle_extended_wait): Don't assume the first signal new children
2180 report is SIGSTOP. Adjust call to pull_pid_from_list.
2181 (linux_wait_for_lwp): Adjust.
2183 2012-03-02 Yao Qi <yao@codesourcery.com>
2185 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2188 2012-03-02 Yao Qi <yao@codesourcery.com>
2190 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2191 `stop_pc' and `tpoint'. Update caller.
2193 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2195 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2196 * linux-low.c (use_linux_regsets): New macro.
2197 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2198 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2199 (linux_register_in_regsets): New function.
2200 (usr_fetch_inferior_registers): Skip registers covered by
2202 (usr_store_inferior_registers): Likewise.
2203 (usr_fetch_inferior_registers): New macro.
2204 (usr_store_inferior_registers): Likewise.
2205 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2206 (linux_store_registers): Likewise.
2207 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2209 (init_registers_mips64_dsp_linux): Likewise.
2210 (init_registers_mips_linux): New macro.
2211 (init_registers_mips_dsp_linux): Likewise.
2212 (mips_dsp_num_regs): Likewise.
2213 (DSP_BASE, DSP_CONTROL): New fallback macros.
2214 (mips_base_regs): New macro.
2215 (mips_regmap): Use it. Fix the size.
2216 (mips_dsp_regmap): New variable.
2217 (mips_dsp_regset_bitmap): Likewise.
2218 (mips_arch_setup): New function.
2219 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2221 (mips_cannot_store_register): Likewise.
2222 (the_low_target): Update .arch_setup, .num_regs and .regmap
2223 initializers. Add .regset_bitmap initializer.
2224 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2226 * linux-bfin-low.c (the_low_target): Likewise.
2227 * linux-cris-low.c (the_low_target): Likewise.
2228 * linux-crisv32-low.c (the_low_target): Likewise.
2229 * linux-ia64-low.c (the_low_target): Likewise.
2230 * linux-m32r-low.c (the_low_target): Likewise.
2231 * linux-m68k-low.c (the_low_target): Likewise.
2232 * linux-ppc-low.c (the_low_target): Likewise.
2233 * linux-s390-low.c (the_low_target): Likewise.
2234 * linux-sh-low.c (the_low_target): Likewise.
2235 * linux-sparc-low.c (the_low_target): Likewise.
2236 * linux-tic6x-low.c (the_low_target): Likewise.
2237 * linux-x86-low.c (the_low_target): Likewise.
2238 * linux-xtensa-low.c (the_low_target): Likewise.
2239 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2240 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2241 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2243 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2244 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2246 2012-02-29 Yao Qi <yao@codesourcery.com>
2247 Pedro Alves <palves@redhat.com>
2249 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2250 `step_over_finished' is true.
2252 2012-02-27 Pedro Alves <palves@redhat.com>
2254 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2255 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2257 2012-02-27 Pedro Alves <palves@redhat.com>
2260 * linux-low.c (pid_is_stopped): New.
2261 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2263 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2265 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2268 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2270 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2272 2012-02-24 Luis Machado <lgustavo@codesourcery>
2274 * server.c (handle_query): Advertise support for target-side
2275 breakpoint condition evaluation.
2276 (process_point_options): New function.
2277 (process_serial_event): When inserting a breakpoint, check for
2278 a target-side condition that should be evaluated.
2280 * mem-break.c: Include regcache.h and ax.h.
2281 (point_cond_list_t): New data structure.
2282 (breakpoint) <cond_list>: New field.
2283 (find_gdb_breakpoint_at): Make non-static.
2284 (delete_gdb_breakpoint_at): Clear any target-side
2286 (clear_gdb_breakpoint_conditions): New function.
2287 (add_condition_to_breakpoint): Likewise.
2288 (add_breakpoint_condition): Likewise.
2289 (gdb_condition_true_at_breakpoint): Likewise.
2290 (gdb_breakpoint_here): Return result directly instead
2291 of going through a local variable.
2293 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2294 (clear_gdb_breakpoint_conditions): Likewise.
2295 (add_breakpoint_condition): Likewise.
2296 (gdb_condition_true_at_breakpoint): Likewise.
2298 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2299 (need_step_over_p): Take target-side breakpoint condition into
2302 2012-02-24 Luis Machado <lgustavo@codesourcery>
2304 * server.h: Include tracepoint.h.
2305 (agent_mem_read, agent_get_trace_state_variable_value,
2306 agent_set_trace_state_variable_value,
2307 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2308 get_set_tsv_func_addr): New prototypes.
2310 * ax.h: New include file.
2311 * ax.c: New source file.
2313 * tracepoint.c: Include ax.h.
2314 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2315 agent_expr, eval_result_type): Move to ax.h.
2316 (parse_agent_expr): Rename to ...
2317 (gdb_parse_agent_expr): ... this, make it non-static and move
2319 (unparse_agent_expr) Rename to ...
2320 (gdb_unparse_agent_expr): ... this, make it non-static and move
2322 (eval_agent_expr): Rename to ...
2323 (eval_tracepoint_agent_expr): ... this.
2324 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2325 forward declarations.
2326 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2327 (agent_get_trace_state_variable_value): New function.
2328 (agent_set_trace_state_variable_value): New function.
2329 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2330 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2331 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2332 (condition_true_at_tracepoint): Likewise.
2333 (parse_agent_expr): Rename to ...
2334 (gdb_parse_agent_expr): ... this and move to ax.c.
2335 (unparse_agent_expr): Rename to ...
2336 (gdb_unparse_agent_expr): ... this and move to ax.c.
2337 (gdb_agent_op_name): Move to ax.c.
2338 (eval_agent_expr): Rename to ...
2339 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2341 (eval_tracepoint_agent_expr): New function.
2342 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2344 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2346 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2347 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2348 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2349 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2350 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2351 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2352 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2353 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2354 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2355 (compile_bytecodes): Remove forward declaration.
2356 (is_goto_target): Move to ax.c.
2357 (compile_bytecodes): Move to ax.c and call
2358 agent_get_trace_state_variable_value (...) and
2359 agent_set_trace_state_variable_value (...).
2361 * Makefile.in: Update ax.c and IPA dependencies.
2363 2012-02-24 Pedro Alves <palves@redhat.com>
2365 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2366 (cmd_bigqtbuffer_circular): ... this. Only handle
2367 'QTBuffer:circular:'.
2368 (handle_tracepoint_general_set): Adjust.
2370 2012-02-16 Yao Qi <yao@codesourcery.com>
2372 * inferiors.c: Move code to ...
2373 * dll.c: .... here. New.
2374 * server.h: Declare clear_dlls.
2375 * Makefile.in (SFILES): Add dll.c.
2379 2012-02-11 Yao Qi <yao@codesourcery.com>
2381 * server.c: (handle_monitor_command): Add a new parameter
2383 (handle_query): Update caller.
2385 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2387 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2388 * configure, config.in: Regenerate.
2389 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2392 2012-02-02 Pedro Alves <palves@redhat.com>
2394 Try SIGKILL first, then PTRACE_KILL.
2395 * linux-low.c (linux_kill_one_lwp): New.
2396 (linux_kill_one_lwp): Rename to ...
2397 (kill_one_lwp_callback): ... this. Use the new
2400 2012-02-02 Pedro Alves <palves@redhat.com>
2402 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2405 2012-01-27 Pedro Alves <palves@redhat.com>
2407 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2408 (elf_64_file_p): Make static.
2409 (linux_pid_exe_is_elf_64_file): New.
2410 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2411 Delete declarations.
2412 (linux_pid_exe_is_elf_64_file): Declare.
2413 * linux-x86-low.c (x86_arch_setup): Use
2414 linux_pid_exe_is_elf_64_file.
2416 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2418 * linux-low.c (linux_wait_for_event_1): Rename to ...
2419 (linux_wait_for_event): ... here and merge it with former
2420 linux_wait_for_event - new variable wait_ptid, use it.
2421 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2423 2012-01-23 Pedro Alves <palves@redhat.com>
2425 * server.c (main): Avoid yet another case of infinite loop while
2426 detaching/killing after a longjmp.
2428 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2431 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2433 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2435 * hostio.c (handle_readlink): New function.
2436 (handle_vFile): Call it to handle "vFile:readlink" packets.
2438 2012-01-20 Pedro Alves <palves@redhat.com>
2439 Ulrich Weigand <ulrich.weigand@linaro.org>
2441 * server.c (handle_v_requests): Only support vAttach and vRun to
2442 start multiple processes when in extended protocol mode.
2444 2012-01-17 Pedro Alves <palves@redhat.com>
2446 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2447 memalign plus mprotect to allocate the scratch buffer.
2449 2012-01-13 Pedro Alves <palves@redhat.com>
2451 * server.c (attach_inferior): Clear `cont_thread'.
2453 2012-01-13 Pedro Alves <palves@redhat.com>
2455 * server.c (main): Avoid infinite loop while detaching/killing
2458 2012-01-09 Doug Evans <dje@google.com>
2460 * server.c (start_inferior): Set last_ptid in --wrapper case.
2462 2012-01-06 Yao Qi <yao@codesourcery.com>
2464 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2466 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2468 2012-01-04 Yao Qi <yao@codesourcery.com>
2470 * tracepoint.c (cmd_qtdp): Print debug message
2471 for static tracepoint.
2473 2012-01-04 Yao Qi <yao@codesourcery.com>
2475 * tracepoint.c (trace_vdebug): Differentiate debug message
2476 between gdbserver and IPA.
2478 2012-01-03 Yao Qi <yao@codesourcery.com>
2480 * tracepoint.c (tracepoint_was_hit): Don't collect for
2483 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2485 * terminal.h: Reformat copyright header.
2487 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2489 * server.c (gdbserver_version): Update copyright year.
2490 * gdbreplay.c (gdbreplay_version): Likewise.
2492 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2494 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2497 2011-12-18 Hui Zhu <teawater@gmail.com>
2498 * linux-low.c (linux_create_inferior): Save return value to ret.
2500 2011-12-18 Hui Zhu <teawater@gmail.com>
2502 * linux-low.c (linux_create_inferior): Save return value to ret.
2504 2011-12-16 Doug Evans <dje@google.com>
2506 * linux-low.c (linux_create_inferior): If stdio connection,
2507 redirect stdin from /dev/null, stdout to stderr.
2508 * remote-utils.c (remote_is_stdio): New static global.
2509 (remote_connection_is_stdio): New function.
2510 (remote_prepare): Handle stdio connection.
2511 (remote_open): Ditto.
2512 (remote_close): Don't close stdin for stdio connections.
2513 (read_prim,write_prim): New functions. Replace all calls to
2514 read/write to these.
2515 * server.c (main): Watch for "-" argument. Move call to
2516 remote_prepare before start_inferior.
2517 * server.h (STDIO_CONNECTION_NAME): New macro.
2518 (remote_connection_is_stdio): Declare.
2520 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2521 in debugging output.
2523 2011-12-15 Yao Qi <yao@codesourcery.com>
2525 * tracepoint.c: Include sys/syscall.h.
2526 (gdb_ust_thread): Remove preprocessor conditional.
2528 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2530 * linux-low.c (linux_detach_one_lwp): Call
2531 the_low_target.prepare_to_resume before detaching.
2533 2011-12-14 Yao Qi <yao@codesourcery.com>
2535 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2538 2011-12-14 Yao Qi <yao@codesourcery.com>
2540 * i386-low.c (i386_low_stopped_data_address): Initialize local
2543 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2547 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2548 DR_CONTROL unless necessary. Extend comments.
2549 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2550 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2552 2011-12-13 Yao Qi <yao@codesourcery.com>
2554 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2556 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2558 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2560 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2561 Print new debug message for such case.
2563 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2565 Fix overlapping memcpy.
2566 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2567 the read_inferior_memory transfer.
2568 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2569 write_inferior_memory transfer.
2570 (set_fast_tracepoint_jump): New variable buf. Use it for the
2571 read_inferior_memory and write_inferior_memory transfers.
2572 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2573 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2574 Use it for the write_inferior_memory transfer.
2575 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2578 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2580 * linux-low.c (fetch_register, store_register): Make code
2581 consistent, fix formatting.
2583 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2585 * linux-low.c (usr_store_inferior_registers): Factor out code
2586 to handle individual registers into...
2587 (store_register): ... this new function.
2589 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2591 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2592 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2593 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2594 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2595 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2596 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2597 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2598 (srv_xmlfiles): Add new XML files.
2600 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2602 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2603 (init_registers_s390_linux32v1): Add prototype.
2604 (init_registers_s390_linux32v2): Likewise.
2605 (init_registers_s390_linux64v1): Likewise.
2606 (init_registers_s390_linux64v2): Likewise.
2607 (init_registers_s390x_linux64v1): Likewise.
2608 (init_registers_s390x_linux64v2): Likewise.
2609 (s390_num_regs): Increment to 52.
2610 (s390_regmap): Add orig_r2 register.
2611 (s390_num_regs_3264): Increment to 68.
2612 (s390_regmap_3264): Add orig_r2 register.
2613 (s390_collect_ptrace_register): Handle orig_r2 register.
2614 (s390_supply_ptrace_register): Likewise.
2615 (s390_fill_last_break): New function.
2616 (s390_store_last_break): Likewise.
2617 (s390_fill_system_call): New function.
2618 (s390_store_system_call): Likewise.
2619 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2621 (s390_check_regset): New function.
2622 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2623 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2624 Update target_regsets for available register sets.
2626 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2627 Jan Kratochvil <jan.kratochvil@redhat.com>
2629 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2630 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2632 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2633 * linux-low.h (struct process_info_private): New member r_debug.
2634 * server.c (handle_qxfer_libraries): Call
2635 the_target->qxfer_libraries_svr4.
2636 (handle_qxfer_libraries_svr4): New function.
2637 (qxfer_packets): New entry "libraries-svr4".
2638 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2639 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2640 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2641 PACKET_qXfer_libraries_svr4.
2643 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2645 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2646 PSW address/mask between 8-byte and 16-byte formats.
2647 (s390_supply_ptrace_register): Likewise.
2648 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2649 basic addressing mode bit.
2651 2011-11-24 Stan Shebs <stan@codesourcery.com>
2653 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2655 2011-11-17 Stan Shebs <stan@codesourcery.com>
2657 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2658 (tracing_start_time): New global.
2659 (tracing_stop_time): New global.
2660 (tracing_user_name): New global.
2661 (tracing_notes): New global.
2662 (tracing_stop_note): New global.
2663 (cmd_qtstart): Set traceframe_usage, start_time.
2664 (stop_tracing): Set stop_time.
2665 (cmd_qtstatus): Report additional status.
2666 (cmd_qtp): New function.
2667 (handle_tracepoint_query): Call it.
2668 (cmd_qtnotes): New function.
2669 (handle_tracepoint_general_set): Call it.
2670 (get_timestamp): Rename from tsv_get_timestamp.
2672 2011-11-14 Stan Shebs <stan@codesourcery.com>
2673 Kwok Cheung Yeung <kcy@codesourcery.com>
2675 * linux-x86-low.c (small_jump_insn): New.
2676 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2677 trampoline and error message, build a trampoline and issue a small
2678 jump instruction to it.
2679 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2680 trampoline and error message.
2681 (x86_get_min_fast_tracepoint_insn_len): New.
2682 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2683 * linux-low.h (struct linux_target_ops): Add arguments to
2684 install_fast_tracepoint_jump_pad operation, add new operation.
2685 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2687 (linux_get_min_fast_tracepoint_insn_len): New function.
2688 (linux_target_op): Add new operation.
2689 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2690 (gdb_trampoline_buffer_end): Ditto.
2691 (gdb_trampoline_buffer_error): Ditto.
2692 (struct ipa_sym_addresses): Add fields for new IPA variables.
2693 (symbol_list): Add entries for new IPA variables.
2694 (struct tracepoint): Add fields to hold the address range of the
2695 trampoline used by the tracepoint.
2696 (trampoline_buffer_head): New static variable.
2697 (trampoline_buffer_tail): Ditto.
2698 (claim_trampoline_space): New function.
2699 (have_fast_tracepoint_trampoline_buffer): New function.
2700 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2702 (install_fast_tracepoint): Ditto, also add error buffer argument.
2703 (cmd_qtminftpilen): New function.
2704 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2705 (fast_tracepoint_from_trampoline_address): New function.
2706 (fast_tracepoint_collecting): Handle trampoline as part of jump
2708 (set_trampoline_buffer_space): New function.
2709 (initialize_tracepoint): Initialize new IPA variables.
2710 * target.h (struct target_ops): Add arguments to
2711 install_fast_tracepoint_jump_pad operation, add new
2712 get_min_fast_tracepoint_insn_len operation.
2713 (target_get_min_fast_tracepoint_insn_len): New.
2714 (install_fast_tracepoint_jump_pad): Add arguments.
2715 * server.h (IPA_BUFSIZ): Define.
2716 * linux-i386-ipa.c: Include extra header files.
2717 (initialize_fast_tracepoint_trampoline_buffer): New function.
2718 (initialize_low_tracepoint): Call it.
2719 * server.h (set_trampoline_buffer_space): Declare.
2720 (claim_trampoline_space): Ditto.
2721 (have_fast_tracepoint_trampoline_buffer): Ditto.
2723 2011-11-14 Yao Qi <yao@codesourcery.com>
2725 * server.c (handle_query): Handle InstallInTrace for qSupported.
2726 * tracepoint.c (add_tracepoint): Sort list.
2727 (install_tracepoint, download_tracepoint): New.
2728 (cmd_qtdp): Call them to install and download tracepoints.
2729 (sort_tracepoints): Removed.
2730 (cmd_qtstart): Update.
2732 2011-11-14 Yao Qi <yao@codesourcery.com>
2734 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2735 * mem-break.h: Declare.
2736 * tracepoint.c (cmd_qtstart): Move some code to ...
2737 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2739 (download_tracepoints): Move some code to ...
2740 (download_tracepoint_1): ... here. New.
2742 2011-11-08 Yao Qi <yao@codesourcery.com>
2744 * remote-utils.c (relocate_instruction): A comment fix.
2746 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2748 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2749 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2750 dr_status_mirror and dr_control_mirror from debug_reg_state.
2751 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2752 (i386_initial_stuff): Remove use of deleted globals.
2753 (i386_get_thread_context, i386_set_thread_context,
2754 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2755 from debug_reg_state.
2757 2011-11-05 Yao Qi <yao@codesourcery.com>
2759 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2760 address as TPOINT's.
2762 2011-11-02 Stan Shebs <stan@codesourcery.com>
2764 * tracepoint.c (agent_mem_read_string): New function.
2765 (eval_agent_expr): Call it for tracenz.
2766 * server.c (handle_query): Report support for tracenz.
2768 2011-11-02 Yao Qi <yao@codesourcery.com>
2770 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2772 2011-11-02 Yao Qi <yao@codesourcery.com>
2774 * target.h: Fix a typo in comment.
2776 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2778 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2779 clobber the breakpoints' shadows with fast tracepoint jumps.
2780 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2781 * target.c (write_inferior_memory): Also pass MYADDR down to
2784 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2786 * configure.ac: Check support for personality routine.
2787 * configure: Regenerate.
2788 * config.in: Likewise.
2789 * linux-low.c: Include <sys/personality.h>.
2790 Define ADDR_NO_RANDOMIZE if necessary.
2791 (linux_create_inferior): Disable address space randomization when
2792 forking inferior, if requested.
2793 (linux_supports_disable_randomization): New function.
2794 (linux_target_ops): Install it.
2795 * server.h (disable_randomization): Declare.
2796 * server.c (disable_randomization): New global variable.
2797 (handle_general_set): Handle QDisableRandomization.
2798 (handle_query): Likewise for qSupported.
2799 (main): Support --disable-randomization and --no-disable-randomization
2800 command line arguments.
2801 * target.h (struct target_ops): Add supports_disable_randomization.
2802 (target_supports_disable_randomization): New macro.
2804 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2806 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2808 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2809 [!PT_GETDSBT] (target_loadmap): New definition.
2810 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2811 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2812 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2813 and PT_GETDSBT to LINUX_LOADMAP.
2814 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2815 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2817 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2819 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2820 (arm_linux_hwbp_cap): New static variable.
2821 (arm_linux_get_hwbp_cap): Replace by ...
2822 (arm_linux_init_hwbp_cap): ... this new function.
2823 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2824 (arm_linux_get_hw_watchpoint_count): Likewise.
2825 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2826 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2827 (arm_prepare_to_resume): Use perror_with_name instead of error.
2829 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2831 * linux-arm-low.c: Include <signal.h>.
2832 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2833 (struct arm_linux_hwbp_cap): New data type.
2834 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2835 (struct arm_linux_hw_breakpoint): New data type.
2836 (MAX_BPTS, MAX_WPTS): Define.
2837 (struct arch_process_info, struct arch_lwp_info): New data types.
2838 (arm_linux_get_hwbp_cap): New function.
2839 (arm_linux_get_hw_breakpoint_count): Likewise.
2840 (arm_linux_get_hw_watchpoint_count): Likewise.
2841 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2842 (arm_hwbp_control_initialize): Likewise.
2843 (arm_hwbp_control_is_enabled): Likewise.
2844 (arm_hwbp_control_is_initialized): Likewise.
2845 (arm_hwbp_control_disable): Likewise.
2846 (arm_linux_hw_breakpoint_equal): Likewise.
2847 (arm_linux_hw_point_initialize): Likewise.
2848 (struct update_registers_data): New data structure.
2849 (update_registers_callback: New function.
2850 (arm_insert_point): Likewise.
2851 (arm_remove_point): Likewise.
2852 (arm_stopped_by_watchpoint): Likewise.
2853 (arm_stopped_data_address): Likewise.
2854 (arm_new_process): Likewise.
2855 (arm_new_thread): Likewise.
2856 (arm_prepare_to_resume): Likewise.
2857 (the_low_target): Register arm_insert_point, arm_remove_point,
2858 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2859 arm_new_thread, and arm_prepare_to_resume.
2861 2011-09-15 Stan Shebs <stan@codesourcery.com>
2863 * server.h (struct emit_ops): Add compare-goto fields.
2864 * tracepoint.c (gdb_agent_op_sizes): New table.
2865 (emit_eq_goto): New function.
2866 (emit_ne_goto): New function.
2867 (emit_lt_goto): New function.
2868 (emit_le_goto): New function.
2869 (emit_gt_goto): New function.
2870 (emit_ge_goto): New function.
2871 (is_goto_target): New function.
2872 (compile_bytecodes): Recognize special cases of compare-goto
2873 combinations and call specialized emitters for them.
2874 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2875 (amd64_emit_ne_goto): New function.
2876 (amd64_emit_lt_goto): New function.
2877 (amd64_emit_le_goto): New function.
2878 (amd64_emit_gt_goto): New function.
2879 (amd64_emit_ge_goto): New function.
2880 (amd64_emit_ops): Add the new functions.
2881 (i386_emit_eq_goto): New function.
2882 (i386_emit_ne_goto): New function.
2883 (i386_emit_lt_goto): New function.
2884 (i386_emit_le_goto): New function.
2885 (i386_emit_gt_goto): New function.
2886 (i386_emit_ge_goto): New function.
2887 (i386_emit_ops): Add the new functions.
2889 2011-09-08 Stan Shebs <stan@codesourcery.com>
2891 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2892 (i386_emit_epilogue): Restore %ebx.
2894 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2896 * server.c (step_thread): Remove definition.
2897 (process_serial_event): Don't handle Hs.
2898 * server.h (step_thread): Remove declaration.
2899 * target.c (set_desired_inferior): Remove use of step_thread.
2901 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2903 * linux-low.c: Include linux-procfs.h.
2904 (linux_attach_lwp_1): Update comments.
2905 (linux_attach): Scan for existing threads when attaching to a
2906 process that is the tgid.
2907 * Makefile.in: Update dependencies.
2909 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2911 * configure.srv: Add linux-procfs.o dependencies.
2913 2011-08-14 Yao Qi <yao@codesourcery.com>
2915 * target.h (struct target_ops): Fix indent.
2916 * win32-low.c (win32_target_ops): Fix comment.
2918 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2919 Yao Qi <yao@codesourcery.com>
2921 * Makefile.in (clean): Remove tic6x-*.c files.
2922 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2923 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2924 (tic6x-c64xp-linux.c): Likewise.
2925 * configure.srv: Add support for tic6x-*-uclinux.
2926 * linux-tic6x-low.c: New.
2927 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2929 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2930 Yao Qi <yao@codesourcery.com>
2932 * target.h (struct target_ops): Add read_loadmap.
2933 * linux-low.c (struct target_loadseg): New type.
2934 (struct target_loadmap): New type.
2935 (linux_read_loadmap): New function.
2936 (linux_target_ops): Add linux_read_loadmap.
2937 * server.c (handle_query): Support qXfer:fdpic:read packet.
2938 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2941 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2943 * win32-low.c: Include <stdint.h>.
2945 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2947 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2948 to the inferior here.
2949 (i386_remove_aligned_watchpoint): Ditto.
2950 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2951 fit part of the watchpoint in the debug registers.
2952 (i386_update_inferior_debug_regs): New.
2953 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2954 registers, and only update the inferior on success.
2955 (i386_low_remove_watchpoint): Ditto.
2957 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2959 * linux-low.c (compare_ints, unique, list_threads, show_process,
2960 linux_core_of_thread): Delete.
2961 (linux_target_ops): Change linux_core_of_thread to
2962 linux_common_core_of_thread.
2963 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2964 * utils.c (malloc_failure): Change type of argument.
2965 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2966 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2967 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2968 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2969 (IPA_OBJS): Add common-utils-ipa.o.
2970 (ptid_h, linux_osdata_h): New macros.
2971 (server_h): Add common/common-utils.h, common/xml-utils.h,
2972 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2974 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2975 ptid.o, buffer.o): New rules.
2976 (linux-low.o): Add common/linux-osdata.h as a dependency.
2977 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2978 * configure.ac: Add AC_HEADER_DIRENT check.
2979 * config.in: Regenerate.
2980 * configure: Regenerate.
2981 * remote-utils.c (xml_escape_text): Delete.
2982 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2983 buffer_xml_printf): Move to common/buffer.c.
2984 * server.c (main): Remove call to initialize_inferiors.
2985 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2986 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2987 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2988 internal_error, gdb_assert, gdb_assert_fail): Delete.
2989 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2990 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2992 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2993 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2994 initialize_inferiors): Delete.
2996 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2998 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3001 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3003 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3005 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3007 2011-05-26 Yao Qi <yao@codesourcery.com>
3009 * Makefile.in (thread-db.o): Track dependence to
3010 common/gdb_thread_db.h.
3011 * thread-db.c: include gdb_thread_db.h from right place.
3013 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3015 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3016 __FILE__ and __LINE__ to internal_error.
3018 2011-05-13 Doug Evans <dje@google.com>
3020 * thread-db.c (try_thread_db_load_from_sdir): New function.
3021 (try_thread_db_load_from_dir): New function.
3022 (thread_db_load_search): Handle $sdir, ignore $pdir.
3023 Remove trying of system directories if search of
3024 libthread-db-search-path fails, that is now done via $sdir.
3026 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3028 * server.c (handle_query): Add EnableDisableTracepoints to the list
3029 of supported features.
3030 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3032 (cmd_qtenable_disable): New.
3033 (cmd_qtstart): Install tracepoints even if disabled.
3034 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3035 receiving a QTEnable or QTDisable packet.
3036 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3037 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3039 (gdb_probe): Skip data collection if static tracepoint is disabled.
3041 2011-05-10 Doug Evans <dje@google.com>
3043 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3045 2011-05-04 Doug Evans <dje@google.com>
3047 * linux-low.c (linux_join): Skip process lookup.
3048 * spu-low.c (spu_join): Ditto.
3049 * server.c (join_inferiors_callback): Delete.
3050 (process_serial_event): For 'D' packet (detach) call join_inferior
3053 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3055 * README: Don't mention xscale*-*-linux*.
3056 * configure.srv (xscale*-*-linux*): Don't handle target.
3058 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3060 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3062 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3063 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3064 (i386_emit_void_call_2): Likewise.
3066 2011-04-26 Yao Qi <yao@codesourcery.com>
3068 * linux-low.c: Move common macros to linux-ptrace.h.
3069 Include linux-ptrace.h.
3070 * Makefile.in (linux_ptrace_h): New.
3071 (linux-low.o): Depends on linux-ptrace.h.
3073 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3075 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3076 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3077 (remote_prepare): New function with most of the TCP code from ...
3078 (remote_open): ... here. Detect PORT here unconditionally. Move also
3079 setting transport_is_reliable.
3080 * server.c (run_once): New variable.
3081 (gdbserver_usage): Document it.
3082 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3083 the first run if RUN_ONCE.
3084 * server.h (run_once, remote_prepare): New declarations.
3086 2011-04-19 Tom Tromey <tromey@redhat.com>
3088 * win32-low.c (handle_load_dll): Remove duplicate "the".
3090 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3092 Remove support for old Cygwin 1.5 versions.
3093 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3094 function to avoid warning.
3095 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3098 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3100 * gdbserver/server.h (Macro _): Define it if not available.
3102 2011-03-14 Michael Snyder <msnyder@vmware.com>
3104 * hostio.c (handle_close): Remove unnecessary null test.
3106 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3108 * Makefile.in (maintainer-clean realclean distclean): Remove
3109 "make ... subdir_do" command.
3111 2011-03-10 Michael Snyder <msnyder@vmware.com>
3113 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3115 * server.c (handle_v_run): Free alloced buffer on early return.
3117 2011-03-09 Yao Qi <yao@codesourcery.com>
3120 2011-03-04 Yao Qi <yao@codesourcery.com>
3122 * Makefile.in: Remove GNU make feature --directory.
3124 2011-03-05 Yao Qi <yao@codesourcery.com>
3126 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3127 (subdir_do): New make target. Copied from gdb/Makefile.
3128 (maintainer-clean, realclean, distclean, clean): Call corresponding
3129 make targets in common/Makefile.
3131 2011-02-11 Yao Qi <yao@codesourcery.com>
3133 * configure.ac: Call AC_PROG_RANLIB.
3134 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3135 * configure: Regenerate.
3137 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3139 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3141 2011-03-06 Yao Qi <yao@codesourcery.com>
3143 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3145 2011-03-05 Yao Qi <yao@codesourcery.com>
3147 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3148 (subdir_do): New make target. Copied from gdb/Makefile.
3149 (maintainer-clean, realclean, distclean, clean): Call corresponding
3150 make targets in common/Makefile.
3152 2011-03-04 Yao Qi <yao@codesourcery.com>
3154 * Makefile.in: Remove GNU make feature --directory.
3156 2011-03-04 Michael Snyder <msnyder@vmware.com>
3158 * server.c (queue_stop_reply): Call xmalloc not malloc.
3160 2011-03-02 Michael Snyder <msnyder@vmware.com>
3162 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3164 2011-02-28 Michael Snyder <msnyder@vmware.com>
3166 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3167 (cmd_qtframe): Ditto.
3168 (cmd_qtbuffer): Ditto.
3169 (cmd_bigqtbuffer): Ditto.
3171 * utils.c (decimal2str): Initialize 'width' to nine, then
3174 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3176 * hostio.c (require_data): Free *data, not data.
3178 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3180 * hostio.c (require_data): Use free, not xfree.
3182 2011-02-27 Michael Snyder <msnyder@vmware.com>
3184 * server.c (handle_query): Discard unused value.
3186 * hostio.c (require_data): Free malloc memory before returning
3189 2011-02-26 Michael Snyder <msnyder@vmware.com>
3191 * linux-low.c (list_threads): Call closedir for dirent.
3193 2011-02-27 Michael Snyder <msnyder@vmware.com>
3195 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3196 a case statement falls through.
3198 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3200 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3203 2011-02-26 Michael Snyder <msnyder@vmware.com>
3205 * utils.c (decimal2str): Eliminate dead code and dead param.
3206 (pulongest): Drop dead param from call to decimal2str.
3209 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3211 Revert the following patch (not approved yet):
3212 2011-02-21 Hui Zhu <teawater@gmail.com>
3213 * tracepoint.c (tp_printf): New function.
3214 (eval_agent_expr): Handle gdb_agent_op_printf.
3216 2011-02-21 Hui Zhu <teawater@gmail.com>
3218 * tracepoint.c (tp_printf): New function.
3219 (eval_agent_expr): Handle gdb_agent_op_printf.
3221 2011-02-18 Tom Tromey <tromey@redhat.com>
3223 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3224 (tracepoint.o): Likewise.
3225 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3226 (gdb_agent_op_names): Likewise.
3228 2011-02-18 Tom Tromey <tromey@redhat.com>
3230 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3231 gdb_agent_op_rot>: New constants.
3232 (gdb_agent_op_names): Add pick and roll.
3233 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3236 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3238 * aclocal.m4: Regenerated with aclocal-1.11.1.
3240 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3242 * server.c (handle_qxfer_traceframe_info): New.
3243 (qxfer_packets): Register "traceframe-info".
3244 (handle_query): Report support for qXfer:traceframe-info:read+.
3245 * tracepoint.c (match_blocktype): New.
3246 (traceframe_find_block_type): Rename to ...
3247 (traceframe_walk_blocks): ... this. Add callback filter argument,
3249 (traceframe_find_block_type): New, reimplemented on top of
3250 traceframe_walk_blocks.
3251 (build_traceframe_info_xml): New.
3252 (traceframe_read_info): New.
3253 * server.h (traceframe_read_info): Declare.
3255 2011-02-11 Yao Qi <yao@codesourcery.com>
3257 * configure.ac: Call AC_PROG_RANLIB.
3258 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3259 * configure: Regenerate.
3261 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3263 * server.c (gdb_read_memory): Change return semantics to allow
3265 (handle_search_memory_1): Adjust.
3266 (process_serial_event) <'m' packet>: Handle partial transfers.
3267 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3269 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3271 * regcache.c (init_register_cache): Initialize
3272 regcache->register_status.
3273 (free_register_cache): Release regcache->register_status.
3274 (regcache_cpy): Copy register_status.
3275 (registers_to_string): Print 'x's for unavailable registers.
3276 (supply_register): Mark the register's status valid or
3277 unavailable, depending on whether a buffer was passed in or not.
3278 (supply_register_zeroed): New.
3279 (supply_regblock): Mark the registers' status valid or
3280 unavailable, depending on whether a buffer was passed in or not.
3281 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3282 (struct regcache): New `register_status' field.
3283 (supply_register_zeroed): Declare.
3284 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3285 supply_register_zeroed, rather than passing a NULL buffer to
3287 * tracepoint.c (fetch_traceframe_registers): Update comment.
3289 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3291 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3294 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3296 * server.h (decode_xfer_write): Change prototype.
3297 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3298 and don't extract the annex here.
3299 * server.c (decode_xfer_read): Remove `annex' parameter,
3300 and don't extract the annex here.
3302 (struct qxfer): New.
3303 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3304 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3305 (handle_qxfer_statictrace): New functions, abstracted out from
3306 handle_query, and made to use the struct qxfer interface.
3307 (handle_threads_qxfer_proper): Rename to ...
3308 (handle_qxfer_threads_proper): ... this.
3309 (handle_threads_qxfer): Rename to ...
3310 (handle_qxfer_threads): ... this. Adjust.
3311 (qxfer_packets): New array.
3312 (handle_qxfer): New function.
3313 (handle_query): Use handle_qxfer.
3315 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3317 * gdbreplay.c: Shorten lines of >= 80 columns.
3318 * linux-low.c: Ditto.
3319 * linux-ppc-low.c: Ditto.
3320 * linux-s390-low.c: Ditto.
3321 * linux-sparc-low.c: Ditto.
3322 * linux-x86-low.c: Ditto.
3323 * linux-xtensa-low.c: Ditto.
3324 * mem-break.c: Ditto.
3326 * regcache.h: Ditto.
3327 * remote-utils.c: Ditto.
3330 * thread-db.c: Ditto.
3331 * tracepoint.c: Ditto.
3333 * win32-low.h: Ditto.
3335 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3337 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3340 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3342 * server.c (gdbserver_version): Update copyright year in version
3344 * gdbreplay.c (gdbreplay_version): Ditto.
3346 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3348 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3349 * linux-bfin-low.c: New file.
3350 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3351 PT_DATA_ADDR for BFIN targets.
3352 * Makefile.in (SFILES): Add linux-bfin-low.c.
3353 (clean): Remove reg-bfin.c.
3354 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3355 * README: Mention supported Blackfin targets.
3357 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3359 * .gitignore: New file.
3361 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3363 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3365 2010-10-22 Jie Zhang <jie@codesourcery.com>
3367 * Makefile.in: Add FLAGS_TO_PASS variable.
3368 (install): Remove dependency of install-only and recursively
3369 invoke make for install-only.
3371 2010-10-04 Doug Evans <dje@google.com>
3373 * Makefile.in (uninstall): Use $(DESTDIR).
3375 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3379 * linux-x86-low.c (compat_siginfo_from_siginfo)
3380 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3381 si_code is < 0. Check for si_code == SI_TIMER before checking for
3384 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3386 * lynx-i386-low.c: New file.
3387 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3389 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3391 * lynx-low.c (ptrace_request_to_str): Remove handling for
3392 request values that have been removed in LynxOS 5.x.
3394 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3396 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3399 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3401 * configure.ac: Add --enable-inprocess-agent option.
3402 * configure: Rebuilt.
3404 2010-09-06 Yao Qi <yao@codesourcery.com>
3406 * linux-low.c (linux_kill): Remove unused variable.
3407 (linux_stabilize_threads): Likewise.
3408 * server.c (start_inferior): Likewise.
3409 (queue_stop_reply_callback): Likewise.
3410 * tracepoint.c (do_action_at_tracepoint): Likewise.
3412 2010-09-06 Yao Qi <yao@codesourcery.com>
3414 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3417 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3419 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3421 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3423 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3426 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3428 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3429 gdbserver/lynx-ppc-low.c: New files.
3430 * Makefile.in (lynx_low_h): New variable.
3431 (lynx-low.o, lynx-ppc-low.o): New rules.
3432 * configure.ac: On LynxOS, link with -lnetinet.
3433 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3434 * configure: regenerate.
3436 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3438 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3439 * configure.ac: Add check for vasprintf and vsnprintf.
3440 * configure, config.in: Regenerate.
3441 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3443 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3445 * gdbreplay.c: Move include of alloca.h up, next to include of
3447 * server.h: Add include of malloc.h.
3448 * mem-break.c: Remove include of malloc.h.
3449 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3451 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3453 * Makefile.in (memmem.o): Build with -Wno-error.
3455 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3457 * utils.c (xsnprintf): Make non-static.
3458 * server.h: Add xsnprintf declaration.
3459 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3460 replace calls to snprintf by calls to xsnprintf throughout.
3462 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3464 * configure.ac: Add configure check for alloca.
3465 * configure, config.in: Regenerate.
3466 * server.h: Include alloca.h if it exists.
3467 * gdbreplay.c: Include alloca.h if it exists.
3469 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3471 * linux-low.c (__SIGRTMIN): Define if not already defined.
3472 (linux_create_inferior): Check for __ANDROID__ rather than
3474 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3475 are already deferred.
3476 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3477 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3478 stopped and already has a pending signal to report.
3479 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3480 a pending signal to report or is moving out of a jump pad.
3481 (linux_init_signals): Check for __ANDROID__ rather than
3484 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3486 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3487 debug_threads check. Avoid a linear search when not doing debug
3490 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3492 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3493 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3494 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3495 (process_event): Change local fd's type to gdb_fildes_t.
3496 (create_file_handler): Adjust prototype.
3497 (delete_file_handler): Adjust prototype.
3498 (handle_file_event): Adjust prototype. Use pfildes.
3499 (create_file_event): Adjsut prototype.
3500 * remote-utils.c (remote_desc, listen_desc): Change type to
3502 * server.h: New gdb_fildes_t typedef.
3503 [USE_WIN32API]: Include winsock2.h.
3504 (delete_file_handler, add_file_handler): Adjust prototypes.
3506 * utils.c (pfildes): New.
3508 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3510 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3511 * configure: Regenerate.
3513 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3515 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3516 (linux_done_accessing_memory): ... this.
3517 (linux_target_ops): Adjust.
3518 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3519 * nto-low.c (nto_target_ops): Adjust comment.
3520 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3521 * spu-low.c (spu_target_ops): Adjust comment.
3522 * target.h (target_ops): Rename unprepare_to_access_memory field
3523 to done_accessing_memory.
3524 (unprepare_to_access_memory): Rename to ...
3525 (done_accessing_memory): ... this.
3527 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3529 * linux-low.c (linux_prepare_to_access_memory): New.
3530 (linux_unprepare_to_access_memory): New.
3531 (linux_target_ops): Install them.
3532 * server.c (read_memory): Rename to ...
3533 (gdb_read_memory): ... this. Use
3534 prepare_to_access_memory/prepare_to_access_memory.
3535 (write_memory): Rename to ...
3536 (gdb_write_memory): ... this. Use
3537 prepare_to_access_memory/prepare_to_access_memory.
3538 (handle_search_memory_1): Adjust.
3539 (process_serial_event): Adjust.
3540 * target.h (struct target_ops): New fields
3541 prepare_to_access_memory and unprepare_to_access_memory.
3542 (prepare_to_access_memory, unprepare_to_access_memory): New.
3543 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3544 prepare_to_access_memory/prepare_to_access_memory.
3545 * nto-low.c (nto_target_ops): Adjust.
3546 * spu-low.c (spu_target_ops): Adjust.
3547 * win32-low.c (win32_target_ops): Adjust.
3549 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3551 * Makefile.in (WARN_CFLAGS): Get it from configure.
3552 (WERROR_CFLAGS): New.
3553 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3554 * configure.ac: Introduce --enable-werror, which adds -Werror to
3555 the compiler command line. Enabled by default. Disable with
3556 --disable-werror. Add -Wdeclaration-after-statement
3557 Wpointer-arith and -Wformat-nonliteral to warning flags.
3558 * configure: Regenerate.
3560 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3562 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3564 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3566 * gdbreplay.c (remote_error): New.
3568 (expect): Use gdbchar. Check for error reading from GDB.
3569 Clarify sync error output.
3570 (play): Check for errors writing to GDB.
3571 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3572 * remote-utils.c (getpkt): Check for errors writing to the remote
3575 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3577 * linux-low.c (linux_wait_1): Move non-debugging code out of
3578 `debug_threads' control.
3580 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3582 * linux-low.c (linux_wait_1): Don't set last_status here.
3583 * server.c (push_event, queue_stop_reply_callback): Assert we're
3584 not pushing a TARGET_WAITKIND_IGNORE event.
3585 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3586 (myresume, handle_target_event): Set the thread's last_resume_kind
3587 and last_status from the target returned status.
3589 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3593 * linux-x86-low.c (update_debug_registers_callback): New.
3594 (i386_dr_low_set_addr): Use it.
3595 (i386_dr_low_get_addr): New.
3596 (i386_dr_low_set_control): Use update_debug_registers_callback.
3597 (i386_dr_low_get_control): New.
3598 (i386_dr_low_get_status): Adjust.
3599 * linux-low.c (linux_stop_lwp): New.
3600 * linux-low.h (linux_stop_lwp): Declare.
3602 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3603 argument instead of a i386_debug_reg_state.
3604 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3605 a i386_debug_reg_state.
3606 (i386_insert_aligned_watchpoint): Adjust.
3607 (i386_remove_aligned_watchpoint): Adjust.
3608 (i386_low_stopped_data_address): Read the debug registers from the
3609 inferior instead of from the mirrors.
3610 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3611 (i386_dr_low_get_addr): Declare.
3612 (i386_dr_low_get_control): Declare.
3613 (i386_dr_low_get_status): Change prototype.
3615 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3616 (i386_dr_low_get_addr): New.
3617 (i386_dr_low_get_control): New.
3618 (i386_dr_low_get_status): Adjust prototype. Return
3620 (i386_initial_stuff): Clear dr_status_mirror and
3622 (i386_get_thread_context): Adjust.
3623 (i386_set_thread_context): Adjust.
3624 (i386_thread_added): Adjust.
3626 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3628 * linux-low.h (linux_thread_area): Delete declaration.
3630 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3632 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3633 after its termination.
3635 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3637 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3638 (gdb_wants_all_stopped): Delete.
3639 (linux_wait_1): Don't call them.
3640 * server.c (handle_v_cont): Tag all threads as want-stopped.
3641 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3642 stopped as "client-wants-stopped".
3644 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3646 * Makefile.in (signals_h): New.
3647 (server_h): Depend on it.
3648 (server.o): Don't depend on $(signals_def).
3649 (signals.o): Depend on $(signals_def).
3651 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3653 * Makefile.in (signals_def): New.
3654 (server_h): Append include/gdb/signals.h and signals_def.
3655 (server.o): Append signals_def.
3657 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3659 * server.c (handle_target_event): Use target_signal_to_host for
3660 resume_info.sig initialization.
3661 * target.h (struct thread_resume) <sig>: New comment.
3663 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3665 * server.c (handle_query): strcpy() the returned string from paddress()
3666 instead of sprintf().
3667 * utils.c (paddress): Return phex_nz().
3669 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3671 * server.c (handle_v_cont): Call mourn_inferior if process
3673 (myresume): Likewise.
3675 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3677 Static tracepoints, and integration with UST.
3679 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3680 * mem-break.c (uninsert_all_breakpoints)
3681 (reinsert_all_breakpoints): New.
3682 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3683 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3684 (gdb_agent_ust_loaded, helper_thread_id)
3685 (gdb_agent_helper_thread_id): New macros.
3686 (struct ipa_sym_addresses): Add addr_ust_loaded,
3687 addr_helper_thread_id, addr_cmd_buf.
3688 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3689 (in_process_agent_loaded_ust): New.
3690 (write_e_ust_not_loaded): New.
3691 (maybe_write_ipa_ust_not_loaded): New.
3692 (struct collect_static_trace_data_action): New.
3693 (enum tracepoint_type) <static_tracepoint>: New.
3694 (struct tracepoint) <handle>: Mention static tracepoints.
3695 (struct static_tracepoint_ctx): New.
3696 (CMD_BUF_SIZE): New.
3697 (add_tracepoint_action): Handle static tracepoint actions.
3698 (unprobe_marker_at): New.
3699 (clear_installed_tracepoints): Handle static tracepoints.
3700 (cmd_qtdp): Handle static tracepoints.
3701 (probe_marker_at): New.
3702 (cmd_qtstart): Handle static tracepoints.
3703 (response_tracepoint): Handle static tracepoints.
3704 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3705 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3706 (get_context_regcache): Handle static tracepoints.
3707 (do_action_at_tracepoint): Handle static tracepoint actions.
3708 (traceframe_find_block_type): Handle static trace data blocks.
3709 (traceframe_read_sdata): New.
3710 (download_tracepoints): Download static tracepoint actions.
3711 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3712 (GDB_PROBE_NAME): New.
3717 (ust_marker_to_static_tracepoint): New.
3719 (collect_ust_data_at_tracepoint): New.
3720 (gdb_ust_probe): New.
3721 (UNIX_PATH_MAX, SOCK_DIR): New.
3722 (gdb_ust_connect_sync_socket): New.
3723 (resume_thread, stop_thread): New.
3724 (run_inferior_command): New.
3725 (init_named_socket): New.
3726 (gdb_ust_socket_init): New.
3727 (cstr_to_hexstr): New.
3729 (first_marker, next_marker): New.
3730 (response_ust_marker): New.
3731 (cmd_qtfstm, cmd_qtsstm): New.
3732 (unprobe_marker_at, probe_marker_at): New.
3733 (cmd_qtstmat, gdb_ust_thread): New.
3734 (gdb_ust_init): New.
3735 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3736 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3738 (x86_64_st_collect_regmap): New.
3739 (X86_64_NUM_ST_COLLECT_GREGS): New.
3740 (AMD64_RIP_REGNUM): New.
3741 (supply_static_tracepoint_registers): New.
3742 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3744 (i386_st_collect_regmap): New.
3745 (i386_NUM_ST_COLLECT_GREGS): New.
3746 (supply_static_tracepoint_registers): New.
3747 * server.c (handle_query): Handle qXfer:statictrace:read.
3748 <qSupported>: Report support for StaticTracepoints, and
3749 qXfer:statictrace:read features.
3750 * server.h (traceframe_read_sdata)
3751 (supply_static_tracepoint_registers): Declare.
3752 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3753 (unpack_varlen_hex): Include in IPA build.
3754 * Makefile.in (ustlibs, ustinc): New.
3755 (IPA_OBJS): Add remote-utils-ipa.o.
3756 ($(IPA_LIB)): Link -ldl and -lpthread.
3758 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3759 * config.in, configure: Regenerate.
3761 2010-06-20 Ian Lance Taylor <iant@google.com>
3762 Pedro Alves <pedro@codesourcery.com>
3764 * linux-x86-low.c (always_true): Delete.
3765 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3766 trying to fool the compiler with always_true.
3768 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3770 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3771 conditions in gdbserver.
3773 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3775 * spu-low.c (spu_read_memory): Wrap around local store limit.
3776 (spu_write_memory): Likewise.
3778 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3780 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3781 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3783 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3785 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3786 uses with LONGEST uses.
3788 2010-06-14 Stan Shebs <stan@codesourcery.com>
3789 Pedro Alves <pedro@codesourcery.com>
3793 * linux-x86-low.c: Include limits.h.
3798 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3799 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3800 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3801 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3802 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3803 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3804 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3805 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3806 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3807 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3808 (amd64_emit_void_call_2): New.
3809 (amd64_emit_ops): New.
3810 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3811 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3812 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3813 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3814 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3815 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3816 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3817 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3818 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3819 (i386_emit_stack_adjust, i386_emit_int_call_1)
3820 (i386_emit_void_call_2): New.
3821 (i386_emit_ops): New.
3822 (x86_emit_ops): New.
3823 (the_low_target): Install x86_emit_ops.
3824 * server.h (struct emit_ops): New.
3825 (get_raw_reg_func_addr): Declare.
3826 (current_insn_ptr, emit_error): Declare.
3827 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3828 (set_trace_state_variable_value): New defines.
3829 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3830 addr_get_trace_state_variable_value and
3831 addr_set_trace_state_variable_value.
3832 (symbol_list): New fields for get_raw_reg,
3833 get_trace_state_variable_value and set_trace_state_variable_value.
3834 (condfn): New typedef.
3835 (struct tracepoint): New field `compiled_cond'.
3836 (do_action_at_tracepoint): Clear compiled_cond.
3837 (get_trace_state_variable_value, set_trace_state_variable_value):
3839 (condition_true_at_tracepoint): If there's a compiled condition,
3841 (current_insn_ptr, emit_error): New globals.
3842 (struct bytecode_address): New.
3843 (get_raw_reg_func_addr): New.
3844 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3845 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3846 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3847 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3848 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3849 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3850 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3851 (compile_tracepoint_condition, compile_bytecodes): New.
3852 * target.h (emit_ops): Forward declare.
3853 (struct target_ops): New field emit_ops.
3854 (target_emit_ops): New.
3855 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3856 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3857 * linux-low.c (linux_emit_ops): New.
3858 (linux_target_ops): Install it.
3859 * linux-low.h (struct linux_target_ops): New field emit_ops.
3861 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3863 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3864 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3866 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3867 Stan Shebs <stan@codesourcery.com>
3869 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3870 (all): Depend on $(extra_libraries).
3871 (install-only): Install the IPA.
3872 (IPA_OBJS, IPA_LIB): New.
3873 (clean): Remove the IPA lib.
3874 (IPAGENT_CFLAGS): New.
3875 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3876 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3877 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3878 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3879 * configure.ac: Check for atomic builtins support in the compiler.
3880 (IPA_DEPFILES, extra_libraries): Define.
3881 * configure.srv (ipa_obj): Add description.
3882 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3883 (i[34567]86-*-linux*): Set ipa_obj.
3884 (x86_64-*-linux*): Set ipa_obj.
3885 * linux-low.c (stabilizing_threads): New.
3886 (supports_fast_tracepoints): New.
3887 (linux_detach): Stabilize threads before detaching.
3888 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3889 the lwp is either not stabilizing, or is moving out of a jump pad.
3890 (linux_fast_tracepoint_collecting): New.
3891 (maybe_move_out_of_jump_pad): New.
3892 (enqueue_one_deferred_signal): New.
3893 (dequeue_one_deferred_signal): New.
3894 (linux_wait_for_event_1): If moving out of a jump pad, defer
3895 pending signals to later.
3896 (linux_stabilize_threads): New.
3897 (linux_wait_1): Check if threads need moving out of jump pads, and
3899 (stuck_in_jump_pad_callback): New.
3900 (move_out_of_jump_pad_callback): New.
3902 (linux_resume_one_lwp): Handle moving out of jump pads.
3903 (linux_set_resume_request): Dequeue deferred signals.
3904 (need_step_over_p): Also step over fast tracepoint jumps.
3905 (start_step_over): Also uninsert fast tracepoint jumps.
3906 (finish_step_over): Also reinsert fast tracepoint jumps.
3907 (linux_install_fast_tracepoint_jump): New.
3908 (linux_target_ops): Install linux_stabilize_threads and
3909 linux_install_fast_tracepoint_jump_pad.
3910 * linux-low.h (linux_target_ops) <get_thread_area,
3911 install_fast_tracepoint_jump_pad>: New fields.
3912 (struct lwp_info) <collecting_fast_tracepoint,
3913 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3914 (linux_get_thread_area): Declare.
3915 * linux-x86-low.c (jump_insn): New.
3916 (x86_get_thread_area): New.
3917 (append_insns): New.
3919 (amd64_install_fast_tracepoint_jump_pad): New.
3920 (i386_install_fast_tracepoint_jump_pad): New.
3921 (x86_install_fast_tracepoint_jump_pad): New.
3922 (the_low_target): Install x86_get_thread_area and
3923 x86_install_fast_tracepoint_jump_pad.
3924 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3925 (struct fast_tracepoint_jump): New.
3926 (fast_tracepoint_jump_insn): New.
3927 (fast_tracepoint_jump_shadow): New.
3928 (find_fast_tracepoint_jump_at): New.
3929 (fast_tracepoint_jump_here): New.
3930 (delete_fast_tracepoint_jump): New.
3931 (set_fast_tracepoint_jump): New.
3932 (uninsert_fast_tracepoint_jumps_at): New.
3933 (reinsert_fast_tracepoint_jumps_at): New.
3934 (set_breakpoint_at): Use write_inferior_memory.
3935 (uninsert_raw_breakpoint): Use write_inferior_memory.
3936 (check_mem_read): Mask out fast tracepoint jumps.
3937 (check_mem_write): Mask out fast tracepoint jumps.
3938 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3939 (set_fast_tracepoint_jump): Declare.
3940 (delete_fast_tracepoint_jump)
3941 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3942 (reinsert_fast_tracepoint_jumps_at): Declare.
3943 * regcache.c: Don't compile many functions when building the
3944 in-process agent library.
3945 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3946 the register buffer in the heap.
3947 (free_register_cache): If the register buffer isn't owned by the
3948 regcache, don't free it.
3949 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3950 pre-existing register caches.
3951 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3953 (convert_ascii_to_int): : Constify `from' parameter type.
3954 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3955 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3956 the needed buffer in-place.
3957 (relocate_instruction): New.
3958 * server.c (handle_query) <qSymbols>: If the target supports
3959 tracepoints, give it a chance of looking up symbols. Report
3960 support for fast tracepoints.
3961 (handle_status): Stabilize threads.
3962 (process_serial_event): Adjust.
3963 * server.h (struct fast_tracepoint_jump): Forward declare.
3964 (struct process_info) <fast_tracepoint_jumps>: New field.
3965 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3966 (decode_X_packet, decode_M_packet): Adjust.
3967 (relocate_instruction): Declare.
3968 (in_process_agent_loaded): Declare.
3969 (tracepoint_look_up_symbols): Declare.
3970 (struct fast_tpoint_collect_status): Declare.
3971 (fast_tracepoint_collecting): Declare.
3972 (force_unlock_trace_buffer): Declare.
3973 (handle_tracepoint_bkpts): Declare.
3974 (initialize_low_tracepoint)
3975 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3976 * target.h (struct target_ops) <stabilize_threads,
3977 install_fast_tracepoint_jump_pad>: New fields.
3978 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3979 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3980 [HAVE_STDINT_H]: Include stdint.h.
3981 (trace_debug_1): Rename to ...
3982 (trace_vdebug): ... this.
3983 (trace_debug): Rename to ...
3984 (trace_debug_1): ... this. Add `level' parameter.
3986 (ATTR_USED, ATTR_NOINLINE): New.
3987 (IP_AGENT_EXPORT): New.
3988 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3989 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3990 (about_to_request_buffer_space, trace_buffer_is_full)
3991 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3992 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3993 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3994 (traceframe_write_count, traceframes_created)
3995 (trace_state_variables)
3996 New renaming defines.
3997 (struct ipa_sym_addresses): New.
3998 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4000 (ipa_sym_addrs): New.
4001 (all_tracepoint_symbols_looked_up): New.
4002 (in_process_agent_loaded): New.
4003 (write_e_ipa_not_loaded): New.
4004 (maybe_write_ipa_not_loaded): New.
4005 (tracepoint_look_up_symbols): New.
4006 (debug_threads) [IN_PROCESS_AGENT]: New.
4007 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4008 (UNKNOWN_SIDE_EFFECTS): New.
4009 (stop_tracing): New.
4010 (flush_trace_buffer): New.
4011 (stop_tracing_bkpt): New.
4012 (flush_trace_buffer_bkpt): New.
4013 (read_inferior_integer): New.
4014 (read_inferior_uinteger): New.
4015 (read_inferior_data_pointer): New.
4016 (write_inferior_data_pointer): New.
4017 (write_inferior_integer): New.
4018 (write_inferior_uinteger): New.
4019 (struct collect_static_trace_data_action): Delete.
4020 (enum tracepoint_type): New.
4021 (struct tracepoint) <type>: New field `type'.
4022 <actions_str, step_actions, step_actions_str>: Only include in
4024 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4025 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4026 (tracepoints): Use IP_AGENT_EXPORT.
4027 (last_tracepoint): Don't include in the IPA.
4028 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4029 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4030 (alloced_trace_state_variables): New.
4031 (trace_state_variables): Use IP_AGENT_EXPORT.
4032 (traceframe_t): Delete unused variable.
4033 (circular_trace_buffer): Don't include in the IPA.
4034 (trace_buffer_start): Delete.
4035 (struct trace_buffer_control): New.
4036 (trace_buffer_free): Delete.
4037 (struct ipa_trace_buffer_control): New.
4038 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4039 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4041 (trace_buffer_ctrl): New.
4042 (TRACE_BUFFER_CTRL_CURR): New.
4043 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4044 Reimplement as macros.
4045 (trace_buffer_wrap): Delete.
4046 (traceframe_write_count, traceframe_read_count)
4047 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4048 (struct tracepoint_hit_ctx) <type>: New field.
4049 (struct fast_tracepoint_ctx): New.
4050 (memory_barrier): New.
4052 (record_tracepoint_error): Update atomically in the IPA.
4053 (clear_inferior_trace_buffer): New.
4054 (about_to_request_buffer_space): New.
4055 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4056 updating the same buffer.
4057 (add_tracepoint): Default the tracepoint's type to trap
4058 tracepoint, and orig_size to -1.
4059 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4061 (create_trace_state_variable): New parameter `gdb'. Handle it.
4062 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4063 (cmd_qtdp): Handle fast tracepoints.
4065 (max_jump_pad_size): New.
4066 (gdb_jump_pad_head): New.
4067 (get_jump_space_head): New.
4068 (claim_jump_space): New.
4069 (sort_tracepoints): New.
4070 (MAX_JUMP_SIZE): New.
4071 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4073 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4074 support. Upload fast traceframes, and delete internal IPA
4076 (stop_tracing_handler): New.
4077 (flush_trace_buffer_handler): New.
4078 (cmd_qtstop): Upload fast tracepoints.
4079 (response_tracepoint): Handle fast tracepoints.
4080 (tracepoint_finished_step): Upload fast traceframes. Set the
4081 tracepoint hit context's tracepoint type.
4082 (handle_tracepoint_bkpts): New.
4083 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4084 type. Add comment about fast tracepoints.
4085 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4086 non-existing action_str field.
4087 (get_context_regcache): Handle fast tracepoints.
4088 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4090 (fast_tracepoint_from_jump_pad_address): New.
4091 (fast_tracepoint_from_ipa_tpoint_address): New.
4092 (collecting_t): New.
4093 (force_unlock_trace_buffer): New.
4094 (fast_tracepoint_collecting): New.
4097 (write_inferior_data_ptr): New.
4098 (target_tp_heap): New.
4099 (target_malloc): New.
4100 (download_agent_expr): New.
4102 (download_tracepoints): New.
4103 (download_trace_state_variables): New.
4104 (upload_fast_traceframes): New.
4105 (IPA_FIRST_TRACEFRAME): New.
4106 (IPA_NEXT_TRACEFRAME_1): New.
4107 (IPA_NEXT_TRACEFRAME): New.
4108 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4109 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4110 (gdb_jump_pad_buffer_end): New.
4111 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4112 (initialize_tracepoint): Adjust.
4113 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4114 buffer. Initialize the low module.
4115 * utils.c (PREFIX, TOOLNAME): New.
4116 (malloc_failure): Use PREFIX.
4117 (error): In the IPA, an error causes an exit.
4118 (fatal, warning): Use PREFIX.
4119 (internal_error): Use TOOLNAME.
4120 (NUMCELLS): Increase to 10.
4121 * configure, config.in: Regenerate.
4123 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4125 * server.c (handle_query) <qSupported>: Do two passes over the
4126 qSupported string to avoid nesting strtok.
4128 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4130 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4132 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4134 * configure: Regenerate.
4135 * proc-service.list: New.
4137 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4139 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4142 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4144 * gdbreplay.c (remote_open): Check error return from socket() call by
4145 its equality to -1 not by it being negative.
4146 * remote-utils.c (remote_open): Likewise.
4148 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4150 * config.h: Regenerate.
4152 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4154 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4155 doesn't provide PTRACE_GET_THREAD_AREA.
4157 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4159 * linux-m68k-low.c: Include <asm/ptrace.h>
4160 (ps_get_thread_area): Implement.
4162 2010-05-03 Doug Evans <dje@google.com>
4164 * event-loop.c (struct callback_event): New struct.
4165 (callback_list): New global.
4166 (append_callback_event, delete_callback_event): New functions.
4167 (process_callback): New function.
4168 (start_event_loop): Call it.
4169 * remote-utils.c (NOT_SCHEDULED): Define.
4170 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4171 moved out of readchar.
4172 (readchar): Rewrite. Call reschedule before returning.
4173 (reset_readchar): New function.
4174 (remote_close): Call it.
4175 (process_remaining, reschedule): New functions.
4176 * server.h (callback_handler_func): New typedef.
4177 (append_callback_event, delete_callback_event): Declare.
4179 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4181 * proc-service.c (ps_pglobal_lookup): Use
4182 thread_db_look_up_one_symbol.
4183 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4184 parameter. Use it instead of all_symbols_looked_up.
4185 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4187 (all_symbols_looked_up): Don't declare.
4188 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4189 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4191 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4192 Set all_symbols_looked_up here.
4193 (thread_db_look_up_one_symbol): New.
4194 (thread_db_get_tls_address): Adjust.
4195 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4196 thread_db object on the heap, and tentatively set it in the
4198 (thread_db_init): Don't set all_symbols_looked_up here.
4199 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4201 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4203 * linux-low.c (linux_kill, linux_detach): Adjust.
4204 (status_pending_p_callback): Remove redundant statement. Check
4205 for !TARGET_WAITIKIND_IGNORE, instead of
4206 TARGET_WAITKIND_STOPPED.
4207 (handle_tracepoints): Make sure LWP is locked. Adjust.
4208 (linux_wait_for_event_1): Adjust.
4209 (linux_cancel_breakpoints): New.
4210 (unsuspend_one_lwp): New.
4211 (unsuspend_all_lwps): New.
4212 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4213 (send_sigstop_callback): Change return type to int, add new
4214 `except' parameter and handle it.
4215 (suspend_and_send_sigstop_callback): New.
4216 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4217 pass them down. If SUSPEND, also increment the lwp's suspend
4219 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4220 (need_step_over_p): Don't consider suspended LWPs.
4221 (start_step_over): Adjust.
4222 (proceed_one_lwp): Change return type to int, add new `except'
4223 parameter and handle it.
4224 (unsuspend_and_proceed_one_lwp): New.
4225 (proceed_all_lwps): Use find_inferior instead of
4227 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4228 also decrement the suspend count of LWPs. Pass `except' down,
4229 instead of hacking its suspend count.
4230 (linux_pause_all): Add `freeze' parameter. Adjust.
4231 (linux_unpause_all): New.
4232 (linux_target_ops): Install linux_unpause_all.
4233 * server.c (handle_status): Adjust.
4234 * target.h (struct target_ops): New fields `unpause_all' and
4235 `cancel_breakpoints'. Add new parameter to `pause_all'.
4236 (pause_all): Add new `freeze' parameter.
4238 (cancel_breakpoints): New.
4239 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4241 (cmd_qtstart): Pause threads.
4242 (stop_tracing): Pause threads, and cancel breakpoints.
4243 * win32-low.c (win32_target_ops): Adjust.
4245 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4247 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4248 the inferior right away from here...
4249 (linux_wait_1): ... to here, and adjust to check the thread's
4250 last_resume_kind instead of the lwp's step or stop_expected flags.
4252 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4254 * README: Use consistent `GDB' and `GDBserver' spellings.
4256 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4258 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4259 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4260 (linux_detach_one_lwp): Assume the lwp is stopped.
4261 (any_thread_of): Delete.
4262 (linux_detach): Stop all lwps here. Don't blindly delete all
4264 (delete_lwp_callback): New.
4265 (linux_mourn): Delete all lwps of the process that is gone.
4266 (linux_wait_1): Don't delete the last lwp of the process here.
4267 * mem-break.h (mark_breakpoints_out): Declare.
4268 * mem-break.c (mark_breakpoints_out): New.
4269 (free_all_breakpoints): Use it.
4270 * server.c (handle_target_event): If the process is gone, mark
4272 * thread-db.c (struct thread_db) <create_bp>: New field.
4273 (thread_db_enable_reporting): Fix prototype. Store a thread event
4274 breakpoint reference in the thread_db struct.
4275 (thread_db_load_search): Clear the thread_db object.
4276 (try_thread_db_load_1): Ditto.
4277 (switch_to_process): New.
4278 (disable_thread_event_reporting): Use it.
4279 (remove_thread_event_breakpoints): New.
4280 (thread_db_detach, thread_db_mourn): Use it.
4282 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4284 * linux-low.c (linux_enable_event_reporting): New.
4285 (linux_wait_for_event_1, handle_extended_wait): Use it.
4287 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4289 * linux-low.c (linux_kill_one_lwp, linux_kill)
4290 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4291 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4292 SIGSTOP even if the LWP is stopped.
4293 (send_sigstop_callback): New.
4294 (stop_all_lwps): Use send_sigstop_callback instead.
4295 (linux_resume_one_thread): Adjust.
4296 (proceed_one_lwp): Still proceed an LWP that the client has
4297 requested to stop, if we haven't reported it as stopped yet. Make
4298 sure that LWPs the client want stopped, have a pending SIGSTOP.
4300 2010-04-26 Doug Evans <dje@google.com>
4302 * server.c (handle_general_set): Make static.
4304 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4305 Print received char after testing for error/eof instead of before.
4306 (input_interrupt): Tweak comment.
4308 2010-04-23 Doug Evans <dje@google.com>
4310 * server.c (start_inferior): Print inferior argv if --debug.
4312 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4314 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4315 * nto-x86-low.c: Include server.h
4317 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4319 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4320 be consistent with other sources of this directory.
4321 (init_registers_amd64): Correct name of source file of this function
4324 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4326 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4329 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4331 * win32-i386-low.c: Add 64-bit support.
4332 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4333 (init_registers_amd64): Declare.
4334 (mappings): Add 64-bit version of array.
4335 (init_windows_x86): New function.
4336 (the_low_target): Change init_arch field to init_windows_x86.
4338 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4340 * win32-low.c: Adapt to support also 64-bit architecture.
4341 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4342 (get_image_name): Use SIZE_T type for local variable `done'.
4343 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4344 (toolhelp_get_dll_name): Idem.
4345 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4346 Use uintptr_t typecast to avoid warning.
4347 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4348 (handle_exception): Use phex_nz to avoid warning.
4349 (win32_wait): Remove unused local variable `process'.
4351 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4353 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4356 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4358 * configure.ac: Use `ws2_32' library for srv_mingw.
4359 * configure: Regenerate.
4360 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4361 * remote-utils.c: Likewise.
4363 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4365 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4366 if __x86_64__ is defined.
4368 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4370 * configure: Regenerate.
4372 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4374 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4375 * target.h (target_ops): New get_tib_address field.
4376 * win32-low.h (win32_thread_info): Add thread_local_base field.
4377 * win32-low.c (child_add_thread): Add tlb argument.
4378 Set thread_local_base field to TLB.
4379 (get_child_debug_event): Adapt to child_add_thread change.
4380 (win32_get_tib_address): New function.
4381 (win32_target_ops): Set get_tib_address field to
4382 win32_get_tib_address.
4383 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4385 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4387 * linux-low.c (linux_mourn): Also remove the process.
4388 * server.c (handle_target_event): Don't remove the process here.
4389 * nto-low.c (nto_mourn): New.
4390 (nto_target_ops): Install it.
4391 * spu-low.c (spu_mourn): New.
4392 (spu_target_ops): Install it.
4393 * win32-low.c (win32_mourn): New.
4394 (win32_target_ops): Install it.
4396 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4398 * server.h (buffer_xml_printf): Remove redundant `;'.
4400 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4402 * regcache.c (set_register_cache): Invalidate regcaches before
4403 changing the register cache layout.
4404 (regcache_invalidate_one): Allow a NULL regcache.
4405 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4406 regcaches before changing the register cache layout or the target
4409 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4411 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4412 variable warning on Linux/x86-64.
4414 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4416 GDBserver disconnected tracing support.
4418 * linux-low.c (linux_remove_process): Delete.
4419 (add_lwp): Don't set last_resume_kind here.
4420 (linux_kill): Use `mourn'.
4421 (linux_detach): Use `thread_db_detach', and `mourn'.
4423 (linux_attach_lwp_1): Adjust comment.
4424 (linux_attach): last_resume_kind moved the thread_info; adjust.
4425 (status_pending_p_callback): Adjust.
4426 (linux_wait_for_event_1): Adjust.
4427 (count_events_callback, select_singlestep_lwp_callback)
4428 (select_event_lwp_callback, cancel_breakpoints_callback)
4429 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4430 (proceed_one_lwp): Adjust.
4431 (linux_async): Add debug output.
4432 (linux_thread_stopped): New.
4433 (linux_pause_all): New.
4434 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4436 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4437 (thread_db_free): Delete declaration.
4438 (thread_db_detach, thread_db_mourn): Declare.
4439 * thread-db.c (thread_db_init): Use thread_db_mourn.
4440 (thread_db_free): Delete, split in two.
4441 (disable_thread_event_reporting): New.
4442 (thread_db_detach): New.
4443 (thread_db_mourn): New.
4445 * server.h (struct thread_info) <last_resume_kind>: New field.
4446 <attached>: Add comment.
4447 <gdb_detached>: New field.
4448 (handler_func): Change return type to int.
4449 (handle_serial_event, handle_target_event): Ditto.
4450 (gdb_connected): Declare.
4452 (disconnected_tracing): Declare.
4453 (stop_tracing): Declare.
4455 * server.c (handle_query) <qSupported>: Report support for
4456 disconnected tracing.
4457 (queue_stop_reply_callback): Account for running threads.
4458 (gdb_wants_thread_stopped): New.
4459 (gdb_wants_all_threads_stopped): New.
4460 (gdb_reattached_process): New.
4461 (handle_status): Clear the `gdb_detached' flag of all processes.
4462 In all-stop, stop all threads.
4463 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4464 (process_serial_event): If the remote connection breaks, or if an
4465 exit was forced with "monitor exit", force an event loop exit.
4466 Handle disconnected tracing on detach.
4467 (handle_serial_event): Adjust.
4468 (handle_target_event): If GDB isn't connected, forward events back
4469 to the inferior, unless the last process exited, in which case,
4470 exit gdbserver. Adjust interface.
4472 * remote-utils.c (remote_open): Don't block in accept. Instead
4473 register an event loop source on the listen socket file
4474 descriptor. Refactor bits into ...
4475 (listen_desc): ... this new global.
4476 (gdb_connected): ... this new function.
4477 (enable_async_notification): ... this new function.
4478 (handle_accept_event): ... this new function.
4479 (remote_close): Clear remote_desc.
4481 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4483 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4485 (mourn_inferior): Define.
4486 (target_process_qsupported): Avoid the dangling else problem.
4487 (thread_stopped): Define.
4488 (pause_all): Define.
4489 (target_waitstatus_to_string): Declare.
4490 * target.c (target_waitstatus_to_string): New.
4492 * tracepoint.c (tracing): Make extern.
4493 (disconnected_tracing): New.
4494 (stop_tracing): Make extern. Handle tracing stops due to GDB
4496 (cmd_qtdisconnected): New.
4497 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4498 (handle_tracepoint_general_set): Handle QTDisconnected.
4500 * event-loop.c (event_handler_func): Change return type to int.
4501 (process_event): Bail out if the event handler wants the event
4503 (handle_file_event): Ditto.
4504 (start_event_loop): Bail out if the event handler wants the event
4507 * nto-low.c (nto_target_ops): Adjust.
4508 * spu-low.c (spu_wait): Don't remove the process here.
4509 (spu_target_ops): Adjust.
4510 * win32-low.c (win32_wait): Don't remove the process here.
4511 (win32_target_ops): Adjust.
4513 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4515 * regcache.c (realloc_register_cache): Invalidate inferior's
4516 regcache before recreating it.
4518 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4520 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4522 2010-04-09 Stan Shebs <stan@codesourcery.com>
4523 Pedro Alves <pedro@codesourcery.com>
4525 * server.h (LONGEST): New.
4526 (struct thread_info) <while_stepping>: New field.
4527 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4529 (initialize_tracepoint, handle_tracepoint_general_set)
4530 (handle_tracepoint_query, tracepoint_finished_step)
4531 (tracepoint_was_hit, release_while_stepping_state_list):
4532 (current_traceframe): Declare.
4533 * server.c (handle_general_set): Handle tracepoint packets.
4535 (write_memory): New.
4536 (handle_search_memory_1): Use read_memory.
4537 (handle_query): Report support for conditional tracepoints, trace
4538 state variables, and tracepoint sources. Handle tracepoint
4540 (main): Initialize the tracepoints module.
4541 (process_serial_event): Handle traceframe reads/writes.
4543 * linux-low.c (handle_tracepoints): New.
4544 (linux_wait_1): Call it.
4545 (linux_resume_one_lwp): Handle while-stepping.
4546 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4547 (linux_target_ops): Install them.
4548 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4550 * linux-x86-low.c (x86_supports_tracepoints): New.
4551 (the_low_target). Install it.
4553 * mem-break.h (delete_breakpoint): Declare.
4554 * mem-break.c (delete_breakpoint): Make external.
4556 * target.h (struct target_ops): Add `supports_tracepoints',
4557 `read_pc', and `write_pc' fields.
4558 (target_supports_tracepoints): Define.
4559 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4562 * regcache.h (struct regcache) <registers_owned>: New field.
4563 (init_register_cache, regcache_cpy): Declare.
4564 (regcache_read_pc, regcache_write_pc): Declare.
4565 (register_cache_size): Declare.
4566 (supply_regblock): Declare.
4567 * regcache.c (init_register_cache): New.
4568 (new_register_cache): Use it.
4569 (regcache_cpy): New.
4570 (register_cache_size): New.
4571 (supply_regblock): New.
4572 (regcache_read_pc, regcache_write_pc): New.
4574 * tracepoint.c: New.
4576 * Makefile.in (OBS): Add tracepoint.o.
4577 (tracepoint.o): New rule.
4579 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4581 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4583 (i386-mmx.c): Likewise.
4584 (i386-mmx-linux.o): Likewise.
4585 (i386-mmx-linux.c): Likewise.
4587 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4588 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4589 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4590 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4592 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4593 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4594 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4596 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4598 * Makefile.in (clean): Updated.
4600 (i386-avx.c): Likewise.
4601 (i386-avx-linux.o): Likewise.
4602 (i386-avx-linux.c): Likewise.
4603 (amd64-avx.o): Likewise.
4604 (amd64-avx.c): Likewise.
4605 (amd64-avx-linux.o): Likewise.
4606 (amd64-avx-linux.c): Likewise.
4608 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4609 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4610 (srv_amd64_regobj): Add amd64-avx.o.
4611 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4612 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4613 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4614 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4615 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4616 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4617 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4619 * i387-fp.c: Include "i386-xstate.h".
4621 (i387_cache_to_xsave): Likewise.
4622 (i387_xsave_to_cache): Likewise.
4623 (x86_xcr0): Likewise.
4625 * i387-fp.h (i387_cache_to_xsave): Likewise.
4626 (i387_xsave_to_cache): Likewise.
4627 (x86_xcr0): Likewise.
4629 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4630 * linux-crisv32-low.c (target_regsets): Likewise.
4631 * linux-m68k-low.c (target_regsets): Likewise.
4632 * linux-mips-low.c (target_regsets): Likewise.
4633 * linux-ppc-low.c (target_regsets): Likewise.
4634 * linux-s390-low.c (target_regsets): Likewise.
4635 * linux-sh-low.c (target_regsets): Likewise.
4636 * linux-sparc-low.c (target_regsets): Likewise.
4637 * linux-xtensa-low.c (target_regsets): Likewise.
4639 * linux-low.c: Include <sys/uio.h>.
4640 (regsets_fetch_inferior_registers): Support nt_type.
4641 (regsets_store_inferior_registers): Likewise.
4642 (linux_process_qsupported): New.
4643 (linux_target_ops): Add linux_process_qsupported.
4645 * linux-low.h (regset_info): Add nt_type.
4646 (linux_target_ops): Add process_qsupported.
4648 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4650 (init_registers_i386_avx_linux): New.
4651 (init_registers_amd64_avx_linux): Likewise.
4652 (xmltarget_i386_linux_no_xml): Likewise.
4653 (xmltarget_amd64_linux_no_xml): Likewise.
4654 (PTRACE_GETREGSET): Likewise.
4655 (PTRACE_SETREGSET): Likewise.
4656 (x86_fill_xstateregset): Likewise.
4657 (x86_store_xstateregset): Likewise.
4658 (use_xml): Likewise.
4659 (x86_linux_update_xmltarget): Likewise.
4660 (x86_linux_process_qsupported): Likewise.
4661 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4662 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4663 init_registers_i386_linux here. Call
4664 x86_linux_update_xmltarget.
4665 (the_low_target): Add x86_linux_process_qsupported.
4667 * server.c (handle_query): Call target_process_qsupported.
4669 * target.h (target_ops): Add process_qsupported.
4670 (target_process_qsupported): New.
4672 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4674 * inferiors.c (add_thread): Set last_status kind to
4675 TARGET_WAITKIND_IGNORE.
4676 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4677 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4678 (linux_wait_1): Move `thread' local definition to block that uses
4679 it. Don't NULL initialize `event_child'.
4680 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4681 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4682 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4684 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4686 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4687 an extended waitstatus, or by a watchpoint.
4688 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4689 thread was stepping or has been stopped by a watchpoint.
4691 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4693 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4694 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4695 of another, then delete the previous, and validate all
4697 (validate_inserted_breakpoint): New.
4698 (delete_disabled_breakpoints): New.
4699 (validate_breakpoints): New.
4700 (check_mem_read): Validate breakpoints before trusting their
4701 shadow. Delete disabled breakpoints.
4702 (check_mem_write): Validate breakpoints before trusting they
4703 should be inserted. Delete disabled breakpoints.
4704 * mem-break.h (validate_breakpoints):
4705 * server.c (handle_query): Validate breakpoints when we see a
4708 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4710 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4711 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4712 if we could tell there's a GDB breakpoint at stop_pc.
4713 (need_step_over_p): Don't do a step over if we find a GDB
4714 breakpoint at the resume PC.
4716 * mem-break.c (struct raw_breakpoint): New.
4717 (enum bkpt_type): New type `gdb_breakpoint'.
4718 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4719 fields. New field `raw'.
4720 (find_raw_breakpoint_at): New.
4721 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4723 (set_breakpoint_at): Adjust.
4724 (delete_raw_breakpoint): New.
4725 (release_breakpoint): New.
4726 (delete_breakpoint): Rename to...
4727 (delete_breakpoint_1): ... this. Add proc parameter. Use
4728 release_breakpoint. Return ENOENT.
4729 (delete_breakpoint): Reimplement.
4730 (find_breakpoint_at): Delete.
4731 (find_gdb_breakpoint_at): New.
4732 (delete_breakpoint_at): Delete.
4733 (set_gdb_breakpoint_at): New.
4734 (delete_gdb_breakpoint_at): New.
4735 (gdb_breakpoint_here): New.
4736 (set_reinsert_breakpoint): Use release_breakpoint.
4737 (uninsert_breakpoint): Rename to ...
4738 (uninsert_raw_breakpoint): ... this.
4739 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4740 (reinsert_raw_breakpoint): Change parameter type to
4742 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4744 (check_breakpoints): Adjust. Use release_breakpoint.
4745 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4746 (breakpoint_inserted_here): Ditto.
4747 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4748 Don't trust the breakpoint's shadow if it is not inserted.
4749 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4750 (delete_all_breakpoints): Adjust.
4751 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4752 use delete_breakpoint_1.
4754 * mem-break.h (breakpoints_supported): Delete declaration.
4755 (set_gdb_breakpoint_at): Declare.
4756 (gdb_breakpoint_here): Declare.
4757 (delete_breakpoint_at): Delete.
4758 (delete_gdb_breakpoint_at): Declare.
4760 * server.h (struct raw_breakpoint): Forward declare.
4761 (struct process_info): New field `raw_breakpoints'.
4763 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4766 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4768 * linux-low.c (status_pending_p_callback): Fix comment.
4769 (linux_wait_for_event_1): Move most of the internal breakpoint
4770 handling from here...
4771 (linux_wait_1): ... to here.
4772 (count_events_callback): New.
4773 (select_singlestep_lwp_callback): New.
4774 (select_event_lwp_callback): New.
4775 (cancel_breakpoints_callback): New.
4776 (select_event_lwp): New.
4777 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4778 priority to all LWPs that have had events that should be reported
4779 to the client. Cancel breakpoints when about to reporting the
4780 event to the client, not while stopping lwps. No longer cancel
4781 finished single-steps here.
4782 (cancel_finished_single_step): Delete.
4783 (cancel_finished_single_steps): Delete.
4785 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4787 * mem-break.c (enum bkpt_type): New.
4788 (struct breakpoint): New field `type'.
4789 (set_breakpoint_at): Change return type to struct breakpoint
4790 pointer. Set type to `other_breakpoint' by default.
4791 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4792 in the breakpoint list.
4793 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4794 (reinsert_breakpoint): Rename to ...
4795 (reinsert_raw_breakpoint): ... this.
4796 (reinsert_breakpoints_at): Adjust.
4797 * mem-break.h (struct breakpoint): Declare.
4798 (set_breakpoint_at): Change return type to struct breakpoint
4801 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4803 * server.c (handle_query): Assign, not compare.
4805 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4807 Teach linux gdbserver to step-over-breakpoints.
4809 * linux-low.c (can_hardware_single_step): New.
4810 (supports_breakpoints): New.
4811 (handle_extended_wait): If stopping threads, read the stop pc of
4814 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4815 low target doesn't support retrieving the PC.
4816 (add_lwp): Set last_resume_kind to resume_continue.
4817 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4818 (linux_attach): Don't clear stop_expected. Set the lwp's
4819 last_resume_kind to resume_stop.
4820 (linux_detach_one_lwp): Don't check for removed breakpoints.
4821 (check_removed_breakpoint): Delete.
4822 (status_pending_p): Rename to ...
4823 (status_pending_p_callback): ... this. Don't check for removed
4824 breakpoints. Don't consider threads that are stopped from GDB's
4826 (linux_wait_for_lwp): Always read the stop_pc here.
4827 (cancel_breakpoint): New.
4828 (step_over_bkpt): New global.
4829 (linux_wait_for_event_1): Implement stepping over breakpoints.
4830 (gdb_wants_lwp_stopped): New.
4831 (gdb_wants_all_stopped): New.
4832 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4833 single-step traps here. Store the thread's last reported target
4835 (send_sigstop): Don't clear stop_expected. Always set it,
4837 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4838 (cancel_finished_single_step): New.
4839 (cancel_finished_single_steps): New.
4840 (wait_for_sigstop): Don't cancel finished single-step traps here.
4841 (linux_resume_one_lwp): Don't check for removed breakpoints.
4842 Don't set `step' on non-hardware step archs.
4843 (linux_set_resume_request): Ignore resume_stop requests if already
4844 stopping or stopped. Set the lwp's last_resume_kind.
4845 (resume_status_pending_p): Don't check for removed breakpoints.
4846 (need_step_over_p): New.
4847 (start_step_over): New.
4848 (finish_step_over): New.
4849 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4850 requests. Clear the thread's last reported target waitstatus.
4851 Don't use the `suspended' flag. Don't consider pending breakpoints.
4852 (linux_resume): Start a step-over if necessary.
4853 (proceed_one_lwp): New.
4854 (proceed_all_lwps): New.
4855 (unstop_all_lwps): New.
4856 * linux-low.h (struct lwp_info): Rewrite comment for the
4857 `suspended' flag. Add the `stop_pc' field. Delete the
4858 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4859 Add `'last_resume_kind' and `need_step_over' fields.
4860 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4861 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4862 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4863 (set_raw_breakpoint_at): New.
4864 (set_breakpoint_at): Rewrite to use it.
4865 (reinsert_breakpoint_handler): Delete.
4866 (set_reinsert_breakpoint): New.
4867 (reinsert_breakpoint_by_bp): Delete.
4868 (delete_reinsert_breakpoints): New.
4869 (uninsert_breakpoint): Rewrite.
4870 (uninsert_breakpoints_at): New.
4871 (reinsert_breakpoint): Rewrite.
4872 (reinsert_breakpoints_at): New.
4873 (check_breakpoints): Rewrite.
4874 (breakpoint_here): New.
4875 (breakpoint_inserted_here): New.
4876 (check_mem_read): Adjust.
4877 * mem-break.h (breakpoints_supported, breakpoint_here)
4878 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4879 (reinsert_breakpoint_by_bp): Delete declaration.
4880 (delete_reinsert_breakpoints): Declare.
4881 (reinsert_breakpoint): Delete declaration.
4882 (reinsert_breakpoints_at): Declare.
4883 (uninsert_breakpoint): Delete declaration.
4884 (uninsert_breakpoints_at): Declare.
4885 (check_breakpoints): Adjust prototype.
4886 * server.h: Adjust include order.
4887 (struct thread_info): Declare here. Add a `last_status' field.
4889 2010-03-23 Michael Snyder <msnyder@vmware.com>
4891 * server.c (crc32): New function.
4892 (handle_query): Add handling for 'qCRC:' request.
4894 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4896 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4897 lwp had been stopped by a watchpoint.
4899 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4901 * server.h (internal_error): Declare.
4902 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4903 * utils.c (internal_error): New function.
4905 2010-03-15 Andreas Schwab <schwab@redhat.com>
4907 * configure.srv: Fix typo setting srv_regobj.
4909 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4911 * linux-low.c (fetch_register): Avoid passing a non string literal
4913 (usr_store_inferior_registers): Ditto.
4915 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4917 * linux-low.c (linux_write_memory): Bail out early if peeking
4920 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4922 * linux-low.h (struct lwp_info): New fields
4923 `stopped_by_watchpoint' and `stopped_data_address'.
4924 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4925 here, and cache them in the lwp object.
4926 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4928 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4930 (linux_stopped_by_watchpoint): Rewrite.
4931 (linux_stopped_data_address): Rewrite.
4933 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4935 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4936 switching the current inferior, not before.
4938 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4940 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4941 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4942 i386-linux.c and amd64-linux.c.
4943 (reg-i386.o): Removed.
4944 (reg-i386.c): Likewise.
4945 (reg-i386-linux.o): Likewise.
4946 (reg-i386-linux.c): Likewise.
4947 (reg-x86-64.o): Likewise.
4948 (reg-x86-64.c): Likewise.
4949 (reg-x86-64-linux.o): Likewise.
4950 (reg-x86-64-linux.c): Likewise.
4953 (i386-linux.o): Likewise.
4954 (i386-linux.c): Likewise.
4955 (amd64.o): Likewise.
4956 (amd64.c): Likewise.
4957 (amd64-linux.o): Likewise.
4958 (amd64-linux.c): Likewise.
4960 * configure.srv (srv_i386_regobj): New.
4961 (srv_i386_linux_regobj): Likewise.
4962 (srv_amd64_regobj): Likewise.
4963 (srv_amd64_linux_regobj): Likewise.
4964 (srv_i386_32bit_xmlfiles): Likewise.
4965 (srv_i386_64bit_xmlfiles): Likewise.
4966 (srv_i386_xmlfiles): Likewise.
4967 (srv_amd64_xmlfiles): Likewise.
4968 (srv_i386_linux_xmlfiles): Likewise.
4969 (srv_amd64_linux_xmlfiles): Likewise.
4970 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4971 srv_xmlfiles to $srv_i386_xmlfiles.
4972 (i[34567]86-*-mingw32ce*): Likewise.
4973 (i[34567]86-*-mingw*): Likewise.
4974 (i[34567]86-*-nto*): Likewise.
4975 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4976 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4977 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4978 (x86_64-*-linux*): Likewise.
4980 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4981 (init_registers_amd64_linux): New.
4982 (x86_arch_setup): Replace init_registers_x86_64_linux with
4983 init_registers_amd64_linux.
4985 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4987 * configure.ac: Check for libdl. If it is not available link against
4988 static libthread_db.
4989 * configure: Regenerate.
4991 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4995 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4996 handing a read watchpoint.
4997 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4999 2010-02-12 Doug Evans <dje@google.com>
5001 * linux-low.c (linux_supports_tracefork_flag): Document.
5002 (linux_look_up_symbols): Add comment.
5004 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5006 * regcache.c (supply_register): Clear regcache if buf is NULL.
5008 2010-02-02 Nicolas Roche <roche@sourceware.org>
5009 Joel Brobecker <brobecker@adacore.com>
5011 * inferiors.c (find_inferior): Add function documentation.
5012 (unloaded_dll): Handle the case where the unloaded dll has not
5013 been previously registered in the dll list.
5015 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5017 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5018 (thumb2_breakpoint): New.
5019 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5021 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5023 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5024 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5027 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5029 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5031 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5033 * linux-s390-low.c (s390_collect_ptrace_register)
5034 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5036 2010-01-21 Doug Evans <dje@google.com>
5038 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5039 (PTRACE_ARG4_TYPE): New macro.
5040 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5041 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5042 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5043 (usr_store_inferior_registers): Ditto.
5044 (linux_read_memory, linux_write_memory): Ditto.
5045 (linux_test_for_tracefork): Ditto.
5047 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5048 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5050 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5052 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5055 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5057 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5058 prototype to take a regcache. Adjust.
5060 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5062 * regcache.h (struct thread_info): Forward declare.
5063 (struct regcache): New.
5064 (new_register_cache): Adjust prototype.
5065 (get_thread_regcache): Declare.
5066 (free_register_cache): Adjust prototype.
5067 (registers_to_string, registers_from_string): Ditto.
5068 (supply_register, supply_register_by_name, collect_register)
5069 (collect_register_as_string, collect_register_by_name): Ditto.
5070 * regcache.c (struct inferior_regcache_data): Delete.
5071 (get_regcache): Rename to ...
5072 (get_thread_regcache): ... this. Adjust. Switch inferior before
5074 (regcache_invalidate_one): Adjust.
5075 (regcache_invalidate): Fix prototype.
5076 (new_register_cache): Return the new register cache.
5077 (free_register_cache): Change prototype.
5078 (realloc_register_cache): Adjust.
5079 (registers_to_string): Change prototype to take a regcache. Adjust.
5080 (registers_from_string): Ditto.
5081 (register_data): Ditto.
5082 (supply_register): Ditto.
5083 (supply_register_by_name): Ditto.
5084 (collect_register): Ditto.
5085 (collect_register_as_string): Ditto.
5086 (collect_register_by_name): Ditto.
5087 * server.c (process_serial_event): Adjust.
5088 * linux-low.h (regset_fill_func, regset_store_func): Change
5090 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5092 * linux-low.c (get_stop_pc): Adjust.
5093 (check_removed_breakpoint): Adjust.
5094 (linux_wait_for_event): Adjust.
5095 (linux_resume_one_lwp): Adjust.
5096 (fetch_register): Add regcache parameter. Adjust.
5097 (usr_store_inferior_registers): Ditto.
5098 (regsets_fetch_inferior_registers): Ditto.
5099 (regsets_store_inferior_registers): Ditto.
5100 (linux_fetch_registers, linux_store_registers): Ditto.
5101 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5103 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5105 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5106 prototype to take a regcache.
5107 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5108 * remote-utils.c (convert_ascii_to_int, outreg)
5109 (prepare_resume_reply): Change prototype to take a regcache.
5111 * target.h (struct target_ops) <fetch_registers, store_registers>:
5112 Change prototype to take a regcache.
5113 (fetch_inferior_registers, store_inferior_registers): Change
5114 prototype to take a regcache. Adjust.
5115 * proc-service.c (ps_lgetregs): Adjust.
5116 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5117 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5118 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5119 take a regcache. Adjust.
5120 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5121 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5122 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5123 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5124 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5125 (cris_cannot_fetch_register):
5126 (cris_breakpoint_at): Change prototype to take a regcache.
5128 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5129 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5130 to take a regcache. Adjust.
5131 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5133 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5134 take a regcache. Adjust.
5135 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5136 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5137 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5138 * linux-mips-low.c (mips_get_pc):
5139 (mips_set_pc): Change prototype to take a regcache. Adjust.
5140 (mips_reinsert_addr): Adjust.
5141 (mips_collect_register): Change prototype to take a regcache.
5143 (mips_supply_register):
5144 (mips_collect_register_32bit, mips_supply_register_32bit)
5145 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5146 (mips_store_fpregset): Ditto.
5147 * linux-ppc-low.c (ppc_supply_ptrace_register)
5148 (ppc_supply_ptrace_register): Ditto.
5149 (parse_spufs_run): Adjust.
5150 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5151 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5152 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5153 take a regcache. Adjust.
5154 * linux-s390-low.c (s390_collect_ptrace_register)
5155 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5156 (s390_set_pc): Change prototype to take a regcache. Adjust.
5157 (s390_arch_setup): Adjust.
5158 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5159 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5160 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5161 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5162 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5164 (sparc_breakpoint_at): Adjust.
5165 * linux-xtensa-low.c (xtensa_fill_gregset):
5166 (xtensa_store_gregset):
5167 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5168 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5169 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5170 prototype to take a regcache. Adjust.
5171 * win32-arm-low.c (arm_fetch_inferior_register)
5172 (arm_store_inferior_register): Change prototype to take a
5174 * win32-i386-low.c (i386_fetch_inferior_register)
5175 (i386_store_inferior_register): Change prototype to take a
5177 * win32-low.c (child_fetch_inferior_registers)
5178 (child_store_inferior_registers): Change prototype to take a
5180 (win32_wait): Adjust.
5181 (win32_fetch_inferior_registers): Change prototype to take a
5183 (win32_store_inferior_registers): Adjust.
5184 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5185 store_inferior_register>: Change prototype to take a regcache.
5187 2010-01-20 Doug Evans <dje@google.com>
5189 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5191 (linux_wait_for_event1, linux_init_signals): Ditto.
5192 (W_STOPCODE): Provide definition if missing.
5194 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5196 * linux-low.c (linux_core_of_thread): New.
5197 (compare_ints, show_process, list_threads): New.
5198 (linux_qxfer_osdata): Report threads and cores.
5199 (linux_target_op): Register linux_core_of_thread.
5200 * remote-utils.c (prepare_resume_reply): Report the core.
5201 (buffer_xml_printf): Support %d specifier.
5202 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5204 (handle_query): Handle qXfer:threads. Announce availability
5206 * target.h (struct target_ops): New field core_of_thread.
5208 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5210 * Makefile.in (clean): Remove new generated files.
5211 (reg-s390.o, reg-s390.c): Remove rules.
5212 (reg-s390x.o, reg-s390x.c): Likewise.
5213 (s390-linux32.o, s390-linux32.c): Add rules.
5214 (s390-linux64.o, s390-linux64.c): Likewise.
5215 (s390x-linux64.o, s390x-linux64.c): Likewise.
5216 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5217 * linux-s390-low.c: Include <elf.h>.
5218 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5219 (init_registers_s390): Remove prototype.
5220 (init_registers_s390x): Likewise.
5221 (init_registers_s390_linux32): Add prototype.
5222 (init_registers_s390_linux64): Likewise.
5223 (init_registers_s390x_linux64): Likewise.
5224 (s390_num_regs_3264): New define.
5225 (s390_regmap_3264): New global variable.
5226 (s390_cannot_fetch_register): Remove obsolete check.
5227 (s390_cannot_store_register): Likewise.
5228 (s390_collect_ptrace_register): Handle upper/lower register halves.
5229 (s390_supply_ptrace_register): Likewise.
5230 (s390_fill_gregset): Update to register number changes.
5231 (s390_get_hwcap): New routine.
5232 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5233 Install appropriate regmap and register set.
5235 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5237 * server.c (gdbserver_version): Update copyright year to 2010.
5238 * gdbreplay.c (gdbreplay_version): Likewise.
5240 2009-12-28 Doug Evans <dje@google.com>
5242 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5243 elf/external.h. Include <elf.h> instead but only if necessary.
5245 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5247 * linux-low.c (linux_remove_process): Remove `detaching'
5248 parameter. Don't release/detach from thread_db here.
5249 (linux_kill): Release/detach from thread_db here, ...
5250 (linux_detach): ... and here, before actually detaching.
5251 (linux_wait_1): ... and here, when a process exits.
5252 * thread-db.c (any_thread_of): New.
5253 (thread_db_free): Switch the current inferior to a thread of the
5256 2009-12-21 Doug Evans <dje@google.com>
5258 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5260 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5261 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5262 warning ifndef __NR_tkill. Move setting of errno there too.
5263 Delete unnecessary resetting of errno after syscall.
5264 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5266 * configure.ac: Check for dladdr.
5267 * config.in: Regenerate.
5268 * configure: Regenerate.
5269 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5270 (try_thread_db_load): Update.
5272 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5274 2009-12-18 Doug Evans <dje@google.com>
5276 * event-loop.c: Include unistd.h if it exists.
5278 * linux-low.c (my_waitpid): Move definition away from being in
5279 between linux_tracefork_child/linux_test_for_tracefork.
5281 * gdb_proc_service.h (psaddr_t): Fix type.
5282 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5283 signature to match glibc.
5285 2009-12-16 Doug Evans <dje@google.com>
5287 * linux-low.c (linux_read_memory): Fix argument to read.
5289 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5291 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5292 events, don't leave current_inferior pointing at null.
5294 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5296 * win32-low.c (LOG): Delete.
5297 (OUTMSG): Output to stderr.
5298 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5299 on compile time LOG macro.
5300 (win32_wait): Fix debug output.
5302 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5304 * win32-low.c (win32_add_one_solib): If the dll name is
5305 "ntdll.dll", prepend the system directory to the dll path.
5307 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5309 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5311 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5312 Vladimir Prus <vladimir@codesourcery.com>
5314 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5315 * configure.ac: Check for __mcoldfire__ and set
5316 gdb_cv_m68k_is_coldfire.
5317 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5318 reg-cf.o and reg-m68k.o.
5319 * configure: Regenerated.
5321 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5323 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5324 Pass it to thread_db_free.
5325 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5326 proper `detaching' argument to linux_remove_process.
5327 * linux-low.h (thread_db_free): Add `detaching' parameter.
5328 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5330 (thread_db_free): Add `detaching' parameter. Only
5331 call td_ta_clear_event if detaching from process.
5333 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5335 * thread-db.c (thread_db_free): Fix typo.
5337 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5340 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5342 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5344 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5345 with an i686 compiler.
5346 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5348 * configure: Rebuilt.
5350 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5354 * server.c (handle_search_memory_1): Correct read_addr initialization
5355 in loop for searching subsequent chunks.
5357 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5359 * configure.ac: New --with-libthread-db option.
5360 * thread-db.c: Allow direct dependence on libthread_db.
5361 (thread_db_free): Adjust.
5362 * config.in: Regenerate.
5363 * configure: Likewise.
5365 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5368 * thread-db.c (attach_thread): New function.
5369 (maybe_attach_thread): Return success/failure.
5370 (find_new_threads_callback): Adjust.
5371 (thread_db_find_new_threads): Loop until no new threads.
5373 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5375 * proc-service.c (ps_lgetregs): Formatting.
5377 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5379 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5380 * configure.ac: Adjust.
5381 * linux-low.h (struct process_info_private): Move members to struct
5383 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5384 * linux-low.c (linux_remove_process): Adjust.
5385 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5386 * server.c (handle_query): Move code ...
5387 (handle_monitor_command): ... here. New function.
5388 * target.h (struct target_ops): New member.
5389 * thread-db.c (struct thread_db): New.
5390 (libthread_db_search_path): New variable.
5391 (thread_db_create_event, thread_db_enable_reporting)
5392 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5393 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5394 (try_thread_db_load_1, dladdr_to_soname): New functions.
5395 (try_thread_db_load, thread_db_load_search): New functions.
5396 (thread_db_init): Search for libthread_db.
5397 (thread_db_free): New function.
5398 (thread_db_handle_monitor_command): Likewise.
5399 * config.in: Regenerate.
5400 * configure: Regenerate.
5402 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5404 * spu-low.c (spu_kill): Wait for inferior to terminate.
5405 Call clear_inferiors.
5406 (spu_detach): Call clear_inferiors.
5408 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5410 * aclocal.m4: Regenerate.
5411 * config.in: Likewise.
5412 * configure: Likewise.
5414 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5416 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5417 (parse_spufs_run): New function.
5418 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5419 (ppc_breakpoint_at): Handle SPU breakpoints.
5421 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5423 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5424 (SPUFS_MAGIC): Define.
5425 (spu_enumerate_spu_ids): New function.
5426 (linux_qxfer_spu): New function.
5427 (linux_target_ops): Install linux_qxfer_spu.
5429 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5431 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5432 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5433 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5434 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5435 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5436 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5437 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5438 (init_registers_powerpc_cell32l): Add prototype.
5439 (init_registers_powerpc_cell64l): Likewise.
5440 (ppc_arch_setup): Detect Cell/B.E. architecture.
5442 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5444 * Makefile.in (datarootdir): New variable.
5446 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5448 * linux-low.c (linux_write_memory): Update debugging output.
5449 * Makefile.in (clean): Add new descriptions.
5450 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5451 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5452 * configure.srv: Add new files for arm*-*-linux*.
5453 * linux-arm-low.c: Add new declarations.
5454 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5455 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5456 (HWCAP_VFPv3D16): New.
5457 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5458 instead of __IWMMXT__.
5459 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5460 (arm_arch_setup): New.
5461 (target_regsets): Remove #ifdef. Add VFP regset.
5462 (the_low_target): Use arm_arch_setup.
5464 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5466 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5467 the main thread again.
5469 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5471 Adding Neutrino gdbserver.
5472 * configure: Regenerated.
5473 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5474 * configure.srv (i[34567]86-*-nto*): New target.
5475 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5476 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5477 (nto_comctrl) [__QNX__]: New function.
5478 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5480 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5482 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5485 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5486 Pedro Alves <pedro@codesourcery.com>
5488 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5489 don't support CONTEXT_EXTENDED_REGISTERS.
5490 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5491 (the_low_target): Install them.
5492 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5493 failing with ERROR_PIPE_NOT_CONNECTED.
5495 2009-06-30 Doug Evans <dje@google.com>
5496 Pierre Muller <muller@ics.u-strasbg.fr>
5498 Add h/w watchpoint support to x86-linux, win32-i386.
5499 * Makefile.in (SFILES): Add i386-low.c
5500 (i386_low_h): Define.
5501 (i386-low.o): Add dependencies.
5502 (linux-x86-low.o): Add i386-low.h dependency.
5503 (win32-i386-low.o): Ditto.
5504 * i386-low.c: New file.
5505 * i386-low.h: New file.
5506 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5507 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5508 * linux-low.c (linux_add_process): Initialize arch_private.
5509 (linux_remove_process): Free arch_private.
5510 (add_lwp): Initialize arch_private.
5511 (delete_lwp): Free arch_private.
5512 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5514 * linux-low.h (process_info_private): New member arch_private.
5515 (lwp_info): New member arch_private.
5516 (linux_target_ops): New members new_process, new_thread,
5518 (ptid_of): New macro.
5519 * linux-x86-low.c: Include stddef.h, i386-low.h.
5520 (arch_process_info): New struct.
5521 (arch_lwp_info): New struct.
5522 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5523 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5524 (i386_dr_low_get_status): New function.
5525 (x86_insert_point, x86_remove_point): New functions.
5526 (x86_stopped_by_watchpoint): New function.
5527 (x86_stopped_data_address): New function.
5528 (x86_linux_new_process, x86_linux_new_thread): New functions.
5529 (x86_linux_prepare_to_resume): New function.
5530 (the_low_target): Add entries for insert_point, remove_point,
5531 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5533 * server.c (debug_hw_points): New global.
5534 (monitor_show_help): Document set debug-hw-points.
5535 (handle_query): Process "set debug-hw-points".
5536 * server.h (debug_hw_points): Declare.
5537 (paddress): Declare.
5538 * utils.c (NUMCELLS, CELLSIZE): New macros.
5539 (get_sell, xsnprintf, paddress): New functions.
5540 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5541 remove_point, stopped_by_watchpoint, stopped_data_address.
5542 * win32-i386-low.c: Include i386-low.h.
5543 (debug_reg_state): Replaces dr.
5544 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5545 (i386_dr_low_get_status): New function.
5546 (i386_insert_point, i386_remove_point): New functions.
5547 (i386_stopped_by_watchpoint): New function.
5548 (i386_stopped_data_address): New function.
5549 (i386_initial_stuff): Update.
5550 (get_thread_context,set_thread_context,i386_thread_added): Update.
5551 (the_low_target): Add entries for insert_point,
5552 remove_point, stopped_by_watchpoint, stopped_data_address.
5553 * win32-low.c (win32_insert_watchpoint): New function.
5554 (win32_remove_watchpoint): New function.
5555 (win32_stopped_by_watchpoint): New function.
5556 (win32_stopped_data_address): New function.
5557 (win32_target_ops): Add entries for insert_watchpoint,
5558 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5559 * win32-low.h (win32_target_ops): New members insert_point,
5560 remove_point, stopped_by_watchpoint, stopped_data_address.
5562 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5564 * server.c (process_serial_event): Re-return unsupported, not
5565 error, if the type isn't recognized. Re-allow supporting only
5566 insert or remove packets. Also call require_running for
5567 breakpoints. Add missing break statement to default case. Tidy.
5568 * target.h (struct target_ops): Rename insert_watchpoint to
5569 insert_point, and remove_watchpoint to remove_point.
5571 * linux-low.h (struct linux_target_ops): Likewise.
5572 * linux-low.c (linux_insert_watchpoint): Rename to ...
5573 (linux_insert_point): ... this. Adjust.
5574 (linux_remove_watchpoint): Rename to ...
5575 (linux_remove_point): ... this. Adjust.
5576 (linux_target_ops): Adjust.
5577 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5578 (cris_insert_point): ... this.
5579 (cris_remove_watchpoint): Rename to ...
5580 (cris_remove_point): ... this.
5581 (the_low_target): Adjust.
5583 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5585 * server.c (handle_v_kill): Pass signal_pid to
5586 kill_inferior if multi_process is zero.
5588 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5590 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5591 * target.h (target_ops): Comment for *_watchpoint to make it clear
5592 the functions can get types '0' and '1'.
5594 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5596 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5597 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5598 * regcache.c (get_regcache): Likewise.
5599 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5600 * win32-low.c (child_fetch_inferior_registers): Remove check for
5603 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5604 Pedro Alves <pedro@codesourcery.com>
5606 * target.h (struct target_ops) <supports_multi_process>: New
5608 (target_supports_multi_process): New.
5609 * server.c (handle_query): Even if GDB reports support, only
5610 enable multi-process if the target also supports it. Report
5611 multi-process support only if the target backend supports it.
5612 * linux-low.c (linux_supports_multi_process): New function.
5613 (linux_target_ops): Install it as target_supports_multi_process
5616 2009-05-24 Doug Evans <dje@google.com>
5618 Global renaming of find_thread_pid to find_thread_ptid.
5619 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5620 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5621 All callers updated.
5623 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5624 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5627 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5628 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5629 (linux_resume_one_lwp): Ditto.
5631 2009-05-23 Doug Evans <dje@google.com>
5633 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5634 from struct inferior_list_entry * to struct lwp_info *.
5635 All callers updated.
5637 2009-05-13 Doug Evans <dje@google.com>
5639 * linux-x86-low.c: Don't include assert.h.
5640 (x86_siginfo_fixup): Use fatal, not assert.
5641 (x86_arch_setup): Fix comment.
5643 2009-05-12 Doug Evans <dje@google.com>
5645 Biarch support for i386/amd64 gdbserver.
5646 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5647 Add linux-x86-low.c.
5648 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5649 (linux-x86-low.o): Add.
5650 * linux-x86-64-low.c: Delete.
5651 * linux-i386-low.c: Delete.
5652 * linux-x86-low.c: New file.
5653 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5655 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5657 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5658 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5659 (linux_child_pid_to_exec_file): New function.
5660 (elf_64_header_p, elf_64_file_p): New functions.
5661 (siginfo_fixup): New function.
5662 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5663 give target a chance to convert layout.
5664 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5665 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5667 2009-05-07 Doug Evans <dje@google.com>
5669 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5670 (regsets_store_inferior_registers): Ditto.
5672 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5676 * linux-low.c (must_set_ptrace_flags): Delete.
5677 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5679 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5680 `lwp->must_set_ptrace_flags' instead.
5681 (linux_wait_for_event_1): Set ptrace options here.
5682 (linux_wait_1): ... not here.
5684 2009-04-30 Doug Evans <dje@google.com>
5686 * inferiors.c (started_inferior_callback): New function.
5687 (attached_inferior_callback): New function.
5688 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5689 * server.c (print_started_pid, print_attached_pid): New functions.
5690 (detach_or_kill_for_exit): New function.
5691 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5692 * server.h (have_started_inferiors_p): Declare.
5693 (have_attached_inferiors_p): Declare.
5695 * inferiors.c (remove_process): Fix memory leak, free process.
5696 * linux-low.c (linux_remove_process): New function.
5697 (linux_kill): Call it instead of remove_process.
5698 (linux_detach, linux_wait_1): Ditto.
5700 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5702 * configure.srv: Add x86 Windows CE target.
5704 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5706 * inferiors.c (get_thread_process): Make global.
5707 * server.h (get_thread_process): Add prototype.
5708 * thread-db.c (find_one_thread): Use get_thread_process
5709 instead of current_process.
5710 (thread_db_get_tls_address): Do not crash if called when
5711 thread layer is not yet initialized.
5713 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5715 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5716 * spu-low.c (current_tid): Rename to ...
5717 (current_ptid): ... this.
5718 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5719 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5720 ptid_get_lwp (current_ptid) instead of current_tid.
5721 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5722 instead of current_tid. Use find_process_pid to verify pid
5723 argument is valid. Pass proper argument to remove_process.
5724 (spu_thread_alive): Compare current_ptid instead of current_tid.
5725 (spu_resume): Likewise.
5727 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5729 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5732 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5734 Implement the multiprocess extensions, and add linux multiprocess
5737 * server.h (ULONGEST): Declare.
5738 (struct ptid, ptid_t): New.
5739 (minus_one_ptid, null_ptid): Declare.
5740 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5741 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5742 (struct inferior_list_entry): Change `id' type from unsigned from
5744 (struct sym_cache, struct breakpoint, struct
5745 process_info_private): Forward declare.
5746 (struct process_info): Declare.
5747 (current_process): Declare.
5748 (all_processes): Declare.
5749 (initialize_inferiors): Declare.
5750 (add_thread): Adjust to use ptid_t.
5751 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5752 (add_process, remove_process, find_thread_pid): Declare.
5753 (find_inferior_id): Adjust to use ptid_t.
5754 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5755 (multi_process): Declare.
5756 (push_event): Adjust to use ptid_t.
5757 (read_ptid, write_ptid): Declare.
5758 (prepare_resume_reply): Adjust to use ptid_t.
5759 (clear_symbol_cache): Declare.
5760 * inferiors.c (all_processes): New.
5761 (null_ptid, minus_one_ptid): New.
5762 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5763 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5764 (add_thread): Change unsigned long to ptid. Remove gdb_id
5766 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5767 (gdb_id_to_thread): Rename to ...
5768 (find_thread_pid): ... this. Change unsigned long to ptid.
5769 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5770 (loaded_dll, pull_pid_from_list): Adjust.
5771 (add_process, remove_process, find_process_pid)
5772 (get_thread_process, current_process, initialize_inferiors): New.
5773 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5774 (struct target_waitstatus) <related_pid>: Ditto.
5775 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5777 (struct target_ops) <join>: Add `pid' argument.
5778 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5779 (struct target_ops) <wait>: Add `ptid' field. Change return type
5781 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5782 (mywait): Add `ptid' argument. Change return type to ptid_t.
5783 (target_pid_to_str): Declare.
5784 * target.c (set_desired_inferior): Adjust to use ptids.
5785 (mywait): Add new `ptid' argument. Adjust.
5786 (target_pid_to_str): New.
5787 * mem-break.h (free_all_breakpoints): Declare.
5788 * mem-break.c (breakpoints): Delelete.
5789 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5790 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5791 to use per-process breakpoint list.
5792 (free_all_breakpoints): New.
5793 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5794 (symbol_cache, all_symbols_looked_up): Delete.
5796 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5798 (prepare_resume_reply): Change ptid argument's type from unsigned
5799 long to ptid_t. Adjust. Implement W;process and X;process.
5800 (free_sym_cache, clear_symbol_cache): New.
5801 (look_up_one_symbol): Adjust to per-process symbol cache. *
5802 * server.c (cont_thread, general_thread, step_thread): Change type
5805 (multi_process): New.
5806 (last_ptid): Change type to ptid_t.
5807 (struct vstop_notif) <ptid>: Change type to ptid_t.
5808 (queue_stop_reply, push_event): Change `ptid' argument's type to
5810 (discard_queued_stop_replies): Add `pid' argument.
5811 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5812 changes. Don't reference the `attached' global.
5813 (attach_inferior): Adjust to mywait interface changes.
5814 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5815 features. Handle and report "multiprocess+". Handle
5817 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5819 (handle_v_kill): New.
5820 (handle_v_stopped): Adjust to use target_pid_to_str.
5821 (handle_v_requests): Allow multiple attaches and runs when
5822 multiprocess extensions are in effect. Handle "vKill".
5823 (myresume): Adjust to use ptids.
5824 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5825 (handle_status): Adjust to discard_queued_stop_replies interface
5827 (first_thread_of, kill_inferior_callback)
5828 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5829 (main): Call initialize_inferiors. Adjust to use ptids, killing
5830 and detaching from all inferiors. Handle multiprocess packet
5832 * linux-low.h: Include gdb_proc_service.h.
5833 (struct process_info_private): New.
5834 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5835 <lwpid_of>: Use ptid_get_lwp.
5836 (get_lwp_thread): Adjust.
5837 (struct lwp_info): Add `dead' member.
5838 (find_lwp_pid): Declare.
5839 * linux-low.c (thread_db_active): Delete.
5840 (new_inferior): Adjust comment.
5841 (inferior_pid): Delete.
5842 (linux_add_process): New.
5843 (handle_extended_wait): Adjust.
5844 (add_lwp): Change unsigned long to ptid.
5845 (linux_create_inferior): Add process to processes table. Adjust
5846 to use ptids. Don't set new_inferior here.
5847 (linux_attach_lwp): Rename to ...
5848 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5849 it. Adjust to use ptids.
5850 (linux_attach_lwp): New.
5851 (linux_attach): Add process to processes table. Don't set
5853 (struct counter): New.
5854 (second_thread_of_pid_p, last_thread_of_process_p): New.
5855 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5857 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5858 processes. Remove process from process table.
5859 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5860 to multiple processes.
5861 (any_thread_of): New.
5862 (linux_detach): Add `pid' argument, and handle it. Remove process
5863 from processes table.
5864 (linux_join): Add `pid' argument. Handle it.
5865 (linux_thread_alive): Change unsighed long argument to ptid_t.
5866 Consider dead lwps as not being alive.
5867 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5868 threads we're not interested in.
5869 (same_lwp, find_lwp_pid): New.
5870 (linux_wait_for_lwp): Change `pid' argument's type from int to
5872 (linux_wait_for_event): Rename to ...
5873 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5874 from int to ptid_t. Adjust.
5875 (linux_wait_for_event): New.
5876 (linux_wait_1): Add `ptid' argument. Change return type to
5877 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5878 that exit from the process table.
5879 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5881 (mark_lwp_dead): New.
5882 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5883 stopping all threads, mark its main lwp as dead.
5884 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5886 (fetch_register, usr_store_inferior_registers)
5887 (regsets_fetch_inferior_registers)
5888 (regsets_store_inferior_registers, linux_read_memory)
5889 (linux_write_memory): Inline `inferior_pid'.
5890 (linux_look_up_symbols): Adjust to use per-process
5892 (linux_request_interrupt): Adjust to use ptids.
5893 (linux_read_auxv): Inline `inferior_pid'.
5894 (initialize_low): Don't reference thread_db_active.
5895 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5896 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5897 (ps_getpid): Return the pid of the current inferior.
5898 * thread-db.c (proc_handle, thread_agent): Delete.
5899 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5901 (find_one_thread): Change argument type to ptid_t. Adjust to
5903 (maybe_attach_thread): Adjust to per-process data and ptids.
5904 (thread_db_find_new_threads): Ditto.
5905 (thread_db_init): Ditto.
5906 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5907 processes table. Adjust to use ptids.
5908 (spu_kill, spu_detach): Adjust interface. Remove process from
5910 (spu_join, spu_thread_alive): Adjust interface.
5911 (spu_wait): Adjust interface. Remove process from processes
5912 table. Adjust to use ptids.
5913 * win32-low.c (current_inferior_tid): Delete.
5914 (current_inferior_ptid): New.
5915 (debug_event_ptid): New.
5916 (thread_rec): Take a ptid. Adjust.
5917 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5918 (child_delete_thread): Ditto.
5919 (do_initial_child_stuff): Add `attached' argument. Add process to
5921 (child_fetch_inferior_registers, child_store_inferior_registers):
5923 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5924 (win32_attach): Pass 1 to do_initial_child_stuff.
5925 (win32_kill): Adjust interface. Remove process from processes
5927 (win32_detach): Ditto.
5928 (win32_join): Adjust interface.
5929 (win32_thread_alive): Take a ptid.
5930 (win32_resume): Adjust to use ptids.
5931 (get_child_debug_event): Ditto.
5932 (win32_wait): Adjust interface. Remove exiting process from
5935 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5937 Non-stop mode support.
5939 * server.h (non_stop): Declare.
5940 (gdb_client_data, handler_func): Declare.
5941 (delete_file_handler, add_file_handler, start_event_loop):
5943 (handle_serial_event, handle_target_event, push_event)
5944 (putpkt_notif): Declare.
5945 * target.h (enum resume_kind): New.
5946 (struct thread_resume): Replace `step' field by `kind' field.
5947 (TARGET_WNOHANG): Define.
5948 (struct target_ops) <wait>: Add `options' argument.
5949 <supports_non_stop, async, start_non_stop>: New fields.
5950 (target_supports_non_stop, target_async): New.
5951 (start_non_stop): Declare.
5952 (mywait): Add `options' argument.
5953 * target.c (mywait): Add `options' argument. Print child exit
5955 (start_non_stop): New.
5956 * server.c (non_stop, own_buf, mem_buf): New globals.
5957 (struct vstop_notif): New.
5958 (notif_queue): New global.
5959 (queue_stop_reply, push_event, discard_queued_stop_replies)
5960 (send_next_stop_reply): New.
5961 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5963 (attach_inferior): In non-stop mode, don't wait for the target
5965 (handle_general_set): Handle QNonStop.
5966 (handle_query): When handling qC, return the current general
5967 thread, instead of the first thread of the list.
5968 (handle_query): If the backend supports non-stop mode, include
5969 QNonStop+ in the qSupported query response.
5970 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5972 (handle_v_attach, handle_v_run): Handle non-stop mode.
5973 (handle_v_stopped): New.
5974 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5975 (myresume): Adjust to use resume_kind. Handle non-stop.
5976 (queue_stop_reply_callback): New.
5977 (handle_status): Handle non-stop mode.
5978 (main): Clear non_stop flag on reconnection. Use the event-loop.
5979 Refactor serial protocol handling from here ...
5980 (process_serial_event): ... to this new function. When GDB
5981 selects any thread, select one here. In non-stop mode, wait until
5982 GDB acks all pending events before exiting.
5983 (handle_serial_event, handle_target_event): New.
5984 * remote-utils.c (remote_open): Install remote_desc in the event
5986 (remote_close): Remove remote_desc from the event loop.
5987 (putpkt_binary): Rename to...
5988 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5989 (putpkt_binary): New as wrapper around putpkt_binary_1.
5990 (putpkt_notif): New.
5991 (prepare_resume_reply): In non-stop mode, don't change the
5993 * event-loop.c: New.
5994 * Makefile.in (OBJ): Add event-loop.o.
5995 (event-loop.o): New rule.
5997 * linux-low.h (pid_of): Moved here.
5999 (get_lwp_thread): Use lwpid_of.
6000 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6001 * linux-low.c (pid_of): Delete.
6002 (inferior_pid): Use lwpid_of.
6003 (linux_event_pipe): New.
6004 (target_is_async_p): New.
6006 (handle_extended_wait): Use lwpid_of.
6007 (add_lwp): Don't set lwpid field.
6008 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6009 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6010 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6011 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6012 first. Adjust to linux_wait_for_event interface changes. Use
6014 (linux_detach): Don't delete the main lwp here.
6015 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6016 (status_pending_p): Don't consider explicitly suspended lwps.
6017 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6018 pointer. Add OPTIONS argument. Change return type to int. Use
6019 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6020 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6021 pointer. Add status pointer argument. Return a pid instead of a
6022 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6023 changes. In non-stop mode, don't switch to a random thread.
6024 (linux_wait): Rename to...
6025 (linux_wait_1): ... this. Add target_options argument, and handle
6026 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6027 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6028 clean exit and signal exit code. Don't stop all threads in
6029 non-stop mode. In all-stop mode, only stop all threads when
6030 reporting a stop to GDB. Handle explicit thread stop requests.
6031 (async_file_flush, async_file_mark): New.
6033 (send_sigstop): Use lwpid_of.
6034 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6035 interface changes. In non-stop mode, don't switch to a random
6037 (linux_resume_one_lwp): Use lwpid_of.
6038 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6039 (linux_resume_one_thread): ... this. Handle resume_stop. In
6040 non-stop mode, don't look for pending flag in all threads.
6041 (resume_status_pending_p): Don't consider explicitly suspended
6043 (my_waitpid): Reimplement. Emulate __WALL.
6044 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6046 (sigchld_handler, linux_supports_non_stop, linux_async)
6047 (linux_start_non_stop): New.
6048 (linux_target_ops): Register linux_supports_non_stop, linux_async
6049 and linux_start_non_stop.
6050 (initialize_low): Install SIGCHLD handler.
6051 * thread-db.c (thread_db_create_event, find_one_thread)
6052 (thread_db_get_tls_address): Use lwpid_of.
6053 * win32-low.c (win32_detach): Adjust to use resume_kind.
6054 (win32_wait): Add `options' argument.
6055 * spu-low.c (spu_resume): Adjust to use resume_kind.
6056 (spu_wait): Add `options' argument.
6058 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6060 Decouple target code from remote protocol.
6062 * target.h (enum target_waitkind): New.
6063 (struct target_waitstatus): New.
6064 (struct target_ops) <wait>: Return an unsigned long. Take a
6065 target_waitstatus pointer instead of a char pointer.
6067 * target.c (mywait): Change prototype to return an unsigned long.
6068 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6069 * server.h (thread_from_wait, old_thread_from_wait): Delete
6071 (prepare_resume_reply): Change prototype to take a
6073 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6074 (last_status, last_ptid): New.
6075 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6076 pid instead of a signal.
6077 (attach_inferior): Remove "status" and "signal" parameters.
6079 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6081 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6082 (handle_v_requests, myresume): Remove "status" and "signal"
6084 (handle_status): New.
6085 (main): Delete local `status'. Adjust.
6086 * remote-utils.c: Include target.h.
6087 (prepare_resume_reply): Change prototype to take a
6088 target_waitstatus. Adjust.
6090 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6092 * spu-low.c (spu_wait): Adjust.
6093 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6095 (win32_wait): Adjust.
6097 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6099 * target.h (struct thread_resume): Delete leave_stopped member.
6100 (struct target_ops): Add a `n' argument to the `resume' callback.
6101 * server.c (start_inferior): Adjust.
6102 (handle_v_cont, myresume): Adjust.
6103 * linux-low.c (check_removed_breakpoint): Adjust to resume
6104 interface change, and to removed leave_stopped field.
6105 (resume_ptr): Delete.
6106 (struct thread_resume_array): New.
6107 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6108 resume interface change.
6109 (linux_continue_one_thread, linux_queue_one_thread)
6110 (resume_status_pending_p): Check if the resume field is NULL
6111 instead of checking the leave_stopped member.
6112 (linux_resume): Adjust to the target resume interface change.
6113 * spu-low.c (spu_resume): Adjust to the target resume interface
6115 * win32-low.c (win32_detach, win32_resume): Ditto.
6117 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6119 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6121 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6123 (linux_continue_one_thread): Only preserve the stepping flag if
6124 there's a pending breakpoint.
6126 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6128 * server.c (main): After the inferior having exited, call
6129 remote_close before exiting gdbserver.
6131 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6133 Fix size of FPSCR in Power 7 processors.
6134 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6135 (PPC_FEATURE_HAS_DFP): New #define.
6136 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6139 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6141 * server.c (handle_query) Whitespace and formatting.
6143 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6145 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6146 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6147 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6148 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6149 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6150 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6151 Makefile.in, configure.ac: Fix whitespace throughout.
6152 * configure: Regenerate.
6154 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6156 * inferiors.c (find_inferior): Make it safe for the callback
6157 function to delete the currently iterated inferior.
6159 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6161 * Makefile.in (linuw_low_h): Move higher.
6162 (thread-db.o): Depend on $(linux_low_h).
6164 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6166 Rename "process" to "lwp" throughout.
6168 * linux-low.c (all_processes): Rename to...
6169 (all_lwps): ... this.
6170 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6171 (add_process): Rename to ...
6172 (add_lwp): ... this. Adjust.
6173 (linux_create_inferior): Adjust.
6174 (linux_attach_lwp): Adjust.
6175 (linux_attach): Adjust.
6176 (linux_kill_one_process): Rename to ...
6177 (linux_kill_one_lwp): ... this. Adjust.
6178 (linux_kill): Adjust.
6179 (linux_detach_one_process): Rename to ...
6180 (linux_detach_one_lwp): ... this. Adjust.
6181 (linux_detach): Adjust.
6182 (check_removed_breakpoint): Adjust.
6183 (status_pending_p): Adjust.
6184 (linux_wait_for_process): Rename to ...
6185 (linux_wait_for_lwp): ... this. Adjust.
6186 (linux_wait_for_event): Adjust.
6187 (send_sigstop): Adjust.
6188 (wait_for_sigstop): Adjust.
6189 (stop_all_processes): Rename to ...
6190 (stop_all_lwps): ... this.
6191 (linux_resume_one_process): Rename to ...
6192 (linux_resume_one_lwp): ... this. Adjust.
6193 (linux_set_resume_request, linux_continue_one_thread)
6194 (linux_queue_one_thread, resume_status_pending_p)
6195 (usr_store_inferior_registers, regsets_store_inferior_registers)
6196 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6198 * linux-low.h (get_process): Rename to ...
6199 (get_lwp): ... this. Adjust.
6200 (get_thread_process): Rename to ...
6201 (get_thread_lwp): ... this. Adjust.
6202 (get_process_thread): Rename to ...
6203 (get_lwp_thread): ... this. Adjust.
6204 (struct process_info): Rename to ...
6205 (struct lwp_info): ... this.
6206 (all_processes): Rename to ...
6207 (all_lwps): ... this.
6208 * proc-service.c (ps_lgetregs): Adjust.
6209 * thread-db.c (thread_db_create_event, find_one_thread)
6210 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6212 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6214 * server.c (handle_query): Handle "qAttached".
6216 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6218 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6219 GPLv3, update license URL.
6221 2009-03-01 Doug Evans <dje@google.com>
6223 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6224 (server_h): Add gdb_signals.h.
6225 (signals.o): Update.
6226 * server.h (target_signal_from_host,target_signal_to_host_p)
6227 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6229 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6231 * remote-utils.c (getpkt): Also generate remote-debug
6232 information if noack_mode is set.
6234 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6236 * server.c (handle_query): Report qXfer:siginfo:read and
6237 qXfer:siginfo:write as supported and handle them.
6238 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6239 * linux-low.c (linux_xfer_siginfo): New.
6240 (linux_target_ops): Set it.
6242 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6244 * server.c (gdbserver_usage): Mention --remote-debug.
6245 (main): Accept '--remote-debug' switch.
6247 2009-01-18 Doug Evans <dje@google.com>
6249 * regcache.c (new_register_cache): No need to check result of xcalloc.
6250 * server.c (handle_search_memory): Back out calls to xmalloc,
6251 result is checked and error is returned to user upon failure.
6252 (handle_query): Ditto. Add more checks for result of malloc.
6253 (handle_v_cont): Check result of malloc, report error back to
6255 (handle_v_run): Ditto. Call freeargv.
6256 * server.h (freeargv): Declare.
6257 * utils.c (freeargv): New fn.
6259 2009-01-15 Doug Evans <dje@google.com>
6261 * gdbreplay.c (perror_with_name): Make arg const char *.
6262 * server.h (target_signal_to_name): Make return type const char *.
6263 * thread-db.c (thread_db_err_str): Make return type const char *.
6264 * utils.c (perror_with_name): Make arg const char *.
6266 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6268 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6269 when handling a EXIT_PROCESS_DEBUG_EVENT.
6271 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6273 * gdbreplay.c (gdbreplay_version): Update copyright year.
6274 * server.c (gdbserver_version): Likewise.
6276 2009-01-05 Doug Evans <dje@google.com>
6278 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6279 (handle_extended_wait): Improve comment.
6281 2008-12-13 Doug Evans <dje@google.com>
6283 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6284 * server.h (ATTR_MALLOC): New macro.
6285 (xmalloc,xcalloc,xstrdup): Declare.
6286 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6287 * inferiors.c: Ditto.
6288 * linux-low.c: Ditto.
6289 * mem-break.c: Ditto.
6290 * regcache.c: Ditto.
6291 * remote-utils.c: Ditto.
6294 * win32-low.c: Ditto.
6296 2008-12-12 Doug Evans <dje@google.com>
6298 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6299 in debugging printf.
6301 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6303 2008-12-09 Doug Evans <dje@google.com>
6305 * linux-low.h (struct process_info): Delete member tid, unused.
6306 * thread-db.c (find_one_thread): Update.
6307 (maybe_attach_thread): Update.
6309 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6311 * target.h (struct target_ops): Add qxfer_osdata member.
6312 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6314 (linux_qxfer_osdata): New functions.
6315 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6317 * server.c (handle_query): Handle "qXfer:osdata:read:".
6318 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6319 (buffer_xml_printf): New functions.
6320 * server.h (struct buffer): New.
6321 (buffer_grow_str, buffer_grow_str0): New macros.
6322 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6323 (buffer_xml_printf): Declare.
6325 2008-11-24 Doug Evans <dje@google.com>
6327 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6329 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6331 * server.c (handle_v_run): Always use the supplied argument list.
6333 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6335 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6336 (xtensa_regmap_table): Add entry for scompare1.
6338 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6340 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6341 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6342 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6343 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6344 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6345 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6346 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6347 XML target descriptions.
6348 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6349 when inferior is running on an ISA 2.05 or later processor. Add
6350 special case to return offset for full 64-bit slot of FPSCR when
6353 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6355 * Makefile.in (SFILES, clean): Added sparc64 files.
6356 (reg-sparc64.o, reg-sparc64.c): New.
6357 * configure.srv (sparc*-*-linux*): New configuration.
6358 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6359 syscall arguments for SPARC.
6360 (regsets_store_inferior_registers): Likewise.
6361 * linux-sparc-low.c: New file.
6363 2008-10-21 Doug Evans <dje@google.com>
6365 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6366 (READLINE_DIR,READLINE_DEP): Delete.
6367 (INTERNAL_CFLAGS): Update.
6368 (LINTFLAGS): Update.
6370 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6372 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6373 whole argv from the last run, not just argv[0].
6375 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6377 * regcache.c (new_register_cache): Return NULL if the register
6378 cache size isn't known yet.
6379 (free_register_cache): Avoid dereferencing a NULL regcache.
6381 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6383 * configure.srv: Merge MIPS and MIPS64.
6385 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6387 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6389 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6391 * Makefile.in: Add required vsx dependencies.
6393 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6394 Declare init_registers_powerpc_vsx32l.
6395 Declare init_registers_powerpc_vsx64l.
6396 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6397 (ppc_arch_setup): Check for VSX in hwcap.
6398 (ppc_fill_vsxregset): New function.
6399 (ppc_store_vsxregset): New function.
6400 Add new VSX entry in regset_info target_regsets.
6402 * configure.srv: Add new VSX dependencies.
6404 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6406 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6407 (remote_open): Set or clear transport_is_reliable.
6408 (putpkt_binary): Don't expect acks in noack mode.
6409 (getpkt): Don't send ack/nac in noack mode.
6410 * server.c (handle_general_set): Handle QStartNoAckMode.
6411 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6413 (main): Reset noack_mode on every connection.
6414 * server.h (noack_mode): Declare.
6416 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6418 * Makefile.in (GDBREPLAY_OBS): New variable.
6419 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6421 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6422 Daniel Jacobowitz <dan@codesourcery.com>
6424 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6425 (usr_store_inferior_registers): Likewise.
6426 (regsets_store_inferior_registers): Likewise.
6428 2008-07-31 Rolf Jansen <rj@surtec.com>
6429 Pedro Alves <pedro@codesourcery.com>
6431 * configure.ac: Check for memmem declaration.
6432 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6433 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6434 (disable_packet_qfThreadInfo): Unconditionally compile.
6435 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6436 * configure, config.in: Regenerate.
6438 2008-07-28 Doug Kwan <dougkwan@google.com>
6440 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6441 (linux_write_memory): Remove declaration of errno.
6443 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6445 * linux-low.c (handle_extended_wait): Do not use "status"
6446 variable uninitialized.
6448 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6450 * server.c (handle_v_attach): Inhibit reporting dll changes.
6452 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6454 * remote-utils.c (prepare_resume_reply): If requested, don't
6455 output "thread:TID" in the T stop reply.
6457 * server.c (disable_packet_vCont, disable_packet_Tthread)
6458 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6459 (handle_query): If requested, disable support for qC, qfThreadInfo
6461 (handle_v_requests): If requested, disable support for vCont.
6462 (gdbserver_show_disableable): New.
6463 (main): Handle --disable-packet and --disable-packet=LIST.
6465 * server.h (disable_packet_vCont, disable_packet_Tthread)
6466 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6468 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6470 * server.c (gdbserver_usage): Mention --version.
6472 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6474 * Makefile.in (gdbreplay.o): New rule.
6476 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6478 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6479 message, not gdbserver.
6481 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6482 Nathan Sidwell <nathan@codesourcery.com>
6483 Joseph Myers <joseph@codesourcery.com>
6485 * acinclude.m4: Include ../../config/acx.m4.
6486 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6487 * configure, config.in: Regenerate.
6488 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6489 * server.c (gdbserver_version): Print PKGVERSION.
6490 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6491 (main): Adjust gdbserver_usage calls.
6492 * gdbreplay.c (version, host_name): Add declarations.
6493 (gdbreplay_version, gdbreplay_usage): New.
6494 (main): Accept --version and --help options.
6496 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6498 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6499 (arm_breakpoint_at): Handle Thumb.
6500 (the_low_target): Add comment.
6502 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6504 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6506 2008-05-09 Doug Evans <dje@google.com>
6508 * server.h (decode_search_memory_packet): Declare.
6509 * remote-utils.c (decode_search_memory_packet): New fn.
6510 * server.c (handle_search_memory_1): New fn.
6511 (handle_search_memory): New fn.
6512 (handle_query): Process qSearch:memory packets.
6514 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6516 * regcache.c (registers_length): Remove.
6517 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6518 full register packet.
6519 * regcache.h (registers_length): Remove prototype.
6520 * server.h (PBUFSIZ): Define to 16384.
6522 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6524 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6525 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6526 powerpc-64l.o, and powerpc-altivec64l.o.
6527 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6528 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6529 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6530 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6531 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6534 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6535 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6536 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6537 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6538 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6539 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6540 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6541 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6542 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6543 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6546 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6547 (init_registers_powerpc_32l): ... this new prototype.
6548 (init_registers_powerpc_32): Remove, replace by ...
6549 (init_registers_powerpc_altivec32l): ... this new prototype.
6550 (init_registers_powerpc_e500): Remove, replace by ...
6551 (init_registers_powerpc_e500l): ... this new prototype.
6552 (init_registers_ppc64): Remove, replace by ...
6553 (init_registers_powerpc_64l): ... this new prototype.
6554 (init_registers_powerpc_64): Remove, replace by ...
6555 (init_registers_powerpc_altivec64l): ... this new prototype.
6556 (ppc_num_regs): Set to 73.
6557 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6558 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6559 (ppc_cannot_store_register): Handle orig_r3 and trap.
6560 (ppc_arch_setup): Update init_registers_... calls.
6561 (ppc_fill_gregset): Handle orig_r3 and trap.
6563 * inferiors.c (clear_inferiors): Reset current_inferior.
6565 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6567 * acinclude.m4: Add override.m4.
6568 * configure: Regenerate.
6570 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6572 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6573 initial call to init_register_ppc64.
6575 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6577 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6578 single powerpc*-*-linux* case.
6579 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6581 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6583 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6584 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6586 * linux-ppc-low.c: Include <elf.h>.
6587 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6588 (ppc_hwcap): New global variable.
6589 (ppc_regmap): Remove __SPE__ #ifdef sections.
6590 (ppc_regmap_e500): New global variable.
6591 (ppc_cannot_store_register): Update __SPE__ special case.
6592 (ppc_get_hwcap): New function.
6593 (ppc_arch_setup): Use it to determine whether inferior supports
6594 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6595 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6596 Do not access registers if target does not support AltiVec.
6597 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6598 Do not access registers if target does not support SPE.
6599 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6601 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6603 * linux-low.c (disabled_regsets, num_regsets): New.
6604 (use_regsets_p): Delete.
6605 (linux_wait_for_process): Clear disabled_regsets.
6606 (regsets_fetch_inferior_registers): Check and set it.
6607 (regsets_store_inferior_registers): Likewise.
6608 (linux_fetch_registers, linux_store_registers): Do not use
6610 (initialize_low): Allocate disabled_regsets.
6612 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6614 * Makefile.in (LIBOBJS): New.
6616 (memmem.o): New rule.
6617 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6618 * configure: Regenerated.
6620 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6622 * server.c (handle_query): Never return "unsupported" for
6623 qXfer:features:read queries.
6625 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6627 * server.c (get_features_xml): Fix inverted condition.
6628 (handle_query): Always support qXfer:feature:read.
6630 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6632 * server.c (wrapper_argv): New.
6633 (start_inferior): Handle wrapper_argv. If set, expect an extra
6635 (gdbserver_usage): Document --wrapper.
6636 (main): Parse --wrapper.
6638 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6640 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6641 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6642 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6643 (ppc_set_pc): Likewise.
6644 (ppc_arch_setup): New function.
6645 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6646 of collect_register.
6647 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6649 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6651 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6652 instead of linux-ppc64-low.o.
6653 * linux-ppc64-low.c: Remove file.
6654 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6655 (linux-ppc64-low.o): Remove rule.
6657 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6658 (init_registers_powerpc_64): Likewise.
6659 (ppc_regmap): Conditionally define depending on __powerpc64__.
6660 (ppc_cannot_store_register): Do not special-case "fpscr" when
6661 compiled on __powerpc64__.
6662 (ppc_collect_ptrace_register): New function.
6663 (ppc_supply_ptrace_register): New function.
6664 (ppc_breakpoint): Change type to "unsigned int".
6665 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6666 (the_low_target): Conditionally provide initializers for the
6667 arch_setup member depending on __powerpc64__. Install
6668 collect_ptrace_register and supply_ptrace_register members.
6670 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6672 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6673 * server.c (gdbserver_xmltarget): Define.
6674 (get_features_xml): Use it to replace "target.xml" and arch_string.
6676 * configure.srv: Remove srv_xmltarget. Add XML files that were
6677 mentioned there to srv_xmlfiles instead. Remove conditional tests
6678 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6679 srv_xmlfiles and srv_regobj to include all possible choices.
6680 * configure.ac (srv_xmltarget): Remove.
6681 (srv_xmlfiles): Do not add "target.xml".
6682 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6683 checks for supplementary target information.
6684 * configure: Regenerate.
6685 * Makefile.in (XML_TARGET): Remove.
6686 (target.xml): Remove rule.
6687 (clean): Do not clean up target.xml.
6688 (.PRECIOUS): Do not mention target.xml.
6690 * target.h (struct target_ops): Remove arch_string member.
6691 * linux-low.c (linux_arch_string): Remove.
6692 (linux_target_ops): Remove arch_string initializer.
6693 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6694 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6695 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6696 * spu-low.c (spu_arch_string): Remove.
6697 (spu_target_ops): Remove arch_string initializer.
6698 * win32-low.c (win32_arch_string): Remove.
6699 (win32_target_ops): Remove arch_string initializer.
6700 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6701 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6702 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6704 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6706 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6707 by collect_ptrace_register and supply_ptrace_register hooks.
6708 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6709 instead of checking for the_low_target.left_pad_xfer.
6710 (usr_store_inferior_registers): Use collect_ptrace_register callback
6711 instead of checking for the_low_target.left_pad_xfer.
6713 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6714 (s390_supply_ptrace_register): Likewise.
6715 (s390_fill_gregset): Call s390_collect_ptrace_register.
6716 (the_low_target): Update.
6718 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6719 (ppc_supply_ptrace_register): Likewise.
6720 (the_low_target): Update.
6722 * linux-i386-low.c (the_low_target): Update.
6723 * linux-x86-64-low.c (the_low_target): Update.
6725 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6727 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6728 reg-s390.o and reg-s390x.o.
6730 * linux-low.c (new_inferior): New global variable.
6731 (linux_create_inferior, linux_attach): Set it.
6732 (linux_wait_for_process): Call the_low_target.arch_setup after the
6733 target has stopped for the first time.
6734 (initialize_low): Do not call the_low_target.arch_setup.
6736 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6737 (s390_set_pc): Likewise.
6738 (s390_arch_setup): New function.
6739 (the_low_target): Use s390_arch_setup as arch_setup routine.
6741 * regcache.c (realloc_register_cache): New function.
6742 (set_register_cache): Call it for each existing regcache.
6744 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6746 * server.h (init_registers): Remove prototype.
6748 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6749 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6750 instead of init_registers ().
6751 * linux-arm-low.c (init_registers_arm): Add prototype.
6752 (init_registers_arm_with_iwmmxt): Likewise.
6753 (the_low_target): Add initializer for arch_setup field.
6754 * linux-cris-low.c (init_registers_cris): Add prototype.
6755 (the_low_target): Add initializer for arch_setup field.
6756 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6757 (the_low_target): Add initializer for arch_setup field.
6758 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6759 (the_low_target): Add initializer for arch_setup field.
6760 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6761 (the_low_target): Add initializer for arch_setup field.
6762 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6763 (the_low_target): Add initializer for arch_setup field.
6764 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6765 (the_low_target): Add initializer for arch_setup field.
6766 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6767 (init_registers_mips64_linux): Likewise.
6768 (the_low_target): Add initializer for arch_setup field.
6769 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6770 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6771 (the_low_target): Add initializer for arch_setup field.
6772 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6773 (init_registers_powerpc_64): Likewise.
6774 (the_low_target): Add initializer for arch_setup field.
6775 * linux-s390-low.c (init_registers_s390): Add prototype.
6776 (init_registers_s390x): Likewise.
6777 (the_low_target): Add initializer for arch_setup field.
6778 * linux-sh-low.c (init_registers_sh): Add prototype.
6779 (the_low_target): Add initializer for arch_setup field.
6780 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6781 (the_low_target): Add initializer for arch_setup field.
6782 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6783 (the_low_target): Add initializer for arch_setup field.
6785 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6786 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6787 instead of init_registers ().
6788 * win32-arm-low.c (init_registers_arm): Add prototype.
6789 (the_low_target): Add initializer for arch_setup field.
6790 * win32-i386-low.c (init_registers_i386): Add prototype.
6791 (the_low_target): Add initializer for arch_setup field.
6793 * spu-low.c (init_registers_spu): Add prototype.
6794 (initialize_low): Call initialie_registers_spu () instead of
6795 initialize_registers ().
6797 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6799 * server.c (handle_v_requests): When handling the vRun and vAttach
6800 packets, if already debugging a process, don't kill it. Return an
6803 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6805 * server.c (handle_query): Correct length check.
6807 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6809 * win32-low.c (do_initial_child_stuff): Add process handle
6810 parameter. Set current_process_handle and current_process_id from the
6811 parameters. Clear globals.
6812 (win32_create_inferior): Don't set current_process_handle and
6813 current_process_id here. Instead pass them on the call to
6814 do_initial_child_stuff.
6815 (win32_attach): Likewise.
6816 (win32_clear_inferiors): New.
6817 (win32_kill): Don't close the current process handle or the
6818 current thread handle here. Instead call win32_clear_inferiors.
6819 (win32_detach): Don't open a new handle to the process. Call
6820 win32_clear_inferiors.
6821 (win32_join): Don't rely on current_process_handle; open a new
6822 handle using the process id.
6823 (win32_wait): Call win32_clear_inferiors when the inferior process
6826 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6828 * server.c (monitor_show_help): Add "exit".
6830 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6832 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6833 (clean): Add reg-xtensa.c.
6834 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6835 * configure.srv (xtensa*-*-linux*) New target.
6836 * linux-xtensa-low.c: New.
6837 * xtensa-xtregs.c: New.
6839 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6841 * hostio.c: Don't include errno.h.
6842 (errno_to_fileio_errno): Move to hostio-errno.
6843 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6844 error number outputting to the target->hostio_last_error callback.
6845 (hostio_packet_error): Use FILEIO_EINVAL directly.
6846 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6847 calls to hostio_error.
6848 * hostio-errno.c: New.
6849 * server.h (hostio_last_error_from_errno): Declare.
6850 * target.h (target_ops): Add hostio_last_error member.
6851 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6852 as hostio_last_error handler.
6853 * spu-low.c (spu_target_ops): Likewise.
6854 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6855 (wince_hostio_last_error): New functions.
6856 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6857 as hostio_last_error handler.
6858 (win32_target_ops) [!_WIN32_WCE]: Register
6859 hostio_last_error_from_errno as hostio_last_error handler.
6860 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6861 (hostio-errno.o): New rule.
6862 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6863 * configure.srv (srv_hostio_err_objs): New variable. Default to
6865 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6866 * configure: Regenerate.
6868 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6870 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6871 (linux_kill, linux_detach): Clean up the process list.
6872 * remote-utils.c (remote_open): Improve port number parsing.
6873 (putpkt_binary, input_interrupt): Only send interrupts if the target
6875 * server.c (extended_protocol): Make static.
6876 (attached): Define earlier.
6877 (exit_requested, response_needed, program_argv): New variables.
6878 (target_running): New.
6879 (start_inferior): Clear attached here.
6880 (attach_inferior): Set attached here.
6881 (require_running): Define.
6882 (handle_query): Use require_running and target_running. Implement
6884 (handle_v_attach, handle_v_run): New.
6885 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6886 (gdbserver_usage): Update.
6887 (main): Redo argument parsing. Handle --debug and --multi. Handle
6888 --attach along with other options or after the port. Save
6889 program_argv. Support no initial program. Resynchronize
6890 communication with GDB after an error. Handle "monitor exit".
6891 Use require_running and target_running. Always allow the extended
6892 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6893 restart in extended mode.
6894 * README: Refer to the GDB manual. Update --attach usage.
6896 2007-12-20 Andreas Schwab <schwab@suse.de>
6898 * linux-low.c (STACK_SIZE): Define.
6899 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6900 (linux_test_for_tracefork): Likewise.
6902 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6904 * linux-low.c (linux_wait_for_event): Update messages. Do not
6905 reinsert auto-delete breakpoints.
6906 * mem-break.c (struct breakpoint): Change return type of handler to
6908 (set_breakpoint_at): Update handler type.
6909 (reinsert_breakpoint_handler): Return 1 instead of calling
6911 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6913 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6914 * mem-break.h (set_breakpoint_at): Update handler type.
6915 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6916 * win32-low.c (auto_delete_breakpoint): New.
6917 (get_child_debug_event): Use it.
6919 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6921 * configure.ac: Check for pread and pwrite.
6922 * hostio.c (handle_pread): Fall back to lseek and read.
6923 (handle_pwrite): Fall back to lseek and write.
6924 * config.in, configure: Regenerated.
6926 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6928 * server.c (myresume): Add own_buf argument.
6929 (main): Update calls.
6931 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6933 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6934 * remote-utils.c (remote_open): Do not call disable_async_io.
6935 (block_async_io): Delete.
6936 (unblock_async_io): Make static.
6937 (initialize_async_io): New.
6938 * server.c (handle_v_cont): Handle async I/O here.
6939 (myresume): Likewise. Move other common resume tasks here...
6940 (main): ... from here. Call initialize_async_io. Disable async
6941 I/O before the main loop.
6942 * server.h (initialize_async_io): Declare.
6943 (block_async_io, unblock_async_io): Delete prototypes.
6944 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6946 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6948 * remote-utils.c (readchar): Allow binary data in received messages.
6950 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6952 * win32-low.c (attaching): New global.
6953 (win32_create_inferior): Clear the `attaching' global.
6954 (win32_attach): Set the `attaching' global.
6955 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6956 attaching. Only set a breakpoint at the entry point if not
6959 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6961 * server.c (main): Don't report dll events on the initial
6962 connection on attaches.
6964 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6966 * server.c (main): Relax numerical bases supported for the pid of
6967 the --attach command line argument.
6969 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6971 * win32-low.c (win32_attach): Call OpenProcess before
6972 DebugActiveProcess, not after. Add last error output to error
6975 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6977 * win32-low.c (win32_get_thread_context)
6978 (win32_set_thread_context): New functions.
6979 (thread_rec): Use win32_get_thread_context.
6980 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6981 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6984 2007-12-03 Leo Zayas
6985 Pedro Alves <pedro_alves@portugalmail.pt>
6987 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6989 (child_add_thread): Minor cleanup.
6990 (child_continue): Resume artificially suspended threads before
6991 calling ContinueDebugEvent.
6992 (suspend_one_thread): New.
6993 (fake_breakpoint_event): New.
6994 (get_child_debug_event): Change return type to int. Check here if
6995 gdb sent an interrupt request. If a soft interrupt was requested,
6996 fake a breakpoint event. Return 0 if there is no event to handle,
6998 (win32_wait): Don't check here if gdb sent an interrupt request.
6999 Ensure there is a valid event to handle.
7000 (win32_request_interrupt): Add soft interruption method as last
7003 2007-12-03 Leo Zayas
7004 Pedro Alves <pedro_alves@portugalmail.pt>
7006 * win32-low.h (win32_thread_info): Add descriptions to the
7007 structure members. Replace `suspend_count' counter by a
7009 * win32-low.c (thread_rec): Update condition of when to get the
7010 context from the inferior. Rely on ContextFlags being set if it
7011 has already been retrieved. Only suspend the inferior thread if
7012 we haven't already. Warn if that fails.
7013 (continue_one_thread): s/suspend_count/suspended/. Only call
7014 ResumeThread once. Warn if that fails.
7016 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7018 * win32-low.c (win32_wait): Don't read from the inferior when it
7021 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7023 * Makefile.in (win32_low_h): New variable.
7024 (win32-low.o): Add dependency on $(win32_low_h).
7025 (win32-arm-low.o, win32-i386-low.o): New rules.
7027 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7029 * hostio.c: Correct copyright year.
7031 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7033 * Makefile.in (OBS): Add hostio.o.
7034 (hostio.o): New rule.
7035 * server.h (handle_vFile): Declare.
7036 * hostio.c: New file.
7037 * server.c (handle_v_requests): Take packet_len and new_packet_len
7038 for binary packets. Call handle_vFile.
7039 (main): Update call to handle_v_requests.
7041 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7043 * linux-low.c: Include <sched.h>.
7045 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7047 * linux-low.c (linux_tracefork_grandchild): New.
7048 (linux_tracefork_child): Use clone.
7049 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7051 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7053 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7055 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7057 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7059 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7061 * inferiors.c (change_inferior_id): Delete.
7062 (add_pid_to_list, pull_pid_from_list): New.
7063 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7064 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7065 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7066 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7067 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7068 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7069 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7070 (using_threads): Always set to 1.
7071 (handle_extended_wait): New.
7072 (add_process): Do not set TID.
7073 (linux_create_inferior): Set must_set_ptrace_flags.
7074 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7075 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7076 (linux_thread_alive): Rename TID argument to LWPID.
7077 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7078 (linux_wait_for_event): Do not use TID or check using_threads. Update
7079 call to dead_thread_notify. Call handle_extended_wait.
7080 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7081 (send_sigstop): Delete sigstop_sent.
7082 (wait_for_sigstop): Avoid TID.
7083 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7084 (linux_test_for_tracefork): New.
7085 (linux_lookup_signals): Use thread_db_active and
7086 linux_supports_tracefork_flag.
7087 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7088 * linux-low.h (get_process_thread): Avoid TID.
7089 (struct process_ifo): Move thread_known and tid to the end. Remove
7091 (linux_attach_lwp, thread_db_init): Update prototypes.
7092 * server.h (change_inferior_id): Delete prototype.
7093 (add_pid_to_list, pull_pid_from_list): New prototypes.
7094 * thread-db.c (thread_db_use_events): New.
7095 (find_first_thread): Rename to...
7096 (find_one_thread): ...this. Update callers and messages. Do not
7097 call fatal. Check thread_db_use_events. Do not call
7098 change_inferior_id or new_thread_notify.
7099 (maybe_attach_thread): Update. Do not call new_thread_notify.
7100 (thread_db_init): Set thread_db_use_events. Check use_events.
7101 * utils.c (fatal, warning): Correct message prefix.
7103 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7105 * Makefile.in (clean): Remove new files.
7106 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7107 (powerpc-64.o, powerpc-64.c): New rules.
7108 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7109 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7111 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7113 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7114 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7115 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7116 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7117 (target_regsets): Add AltiVec and SPE register sets.
7118 * configure.ac: Check for AltiVec and SPE.
7119 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7120 (ppc_fill_vrregset, ppc_store_vrregset): New.
7121 (target_regsets): Add AltiVec register set.
7122 * configure: Regenerated.
7124 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7126 * linux-low.c (O_LARGEFILE): Define.
7127 (linux_read_memory): Use /proc/PID/mem.
7128 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7129 * configure, config.in: Regenerated.
7131 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7133 * linux-low.c (linux_wait_for_event): Do not pass signals while
7136 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7138 * win32-low.c (create_process): New.
7139 (win32_create_inferior): Use create_process instead of
7140 CreateProcess. If create_process failed retry appending an ".exe"
7141 suffix. Store the GetLastError result immediatelly after
7142 create_process calls and use it on the call to error.
7144 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7146 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7148 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7150 * configure.ac: Switch license to GPLv3.
7152 2007-08-01 Michael Snyder <msnyder@access-company.com>
7154 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7156 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7158 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7160 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7161 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7162 CloseToolhelp32Snapshot.
7163 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7164 CloseToolhelp32Snapshot.
7166 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7168 * server.c (main): Check for inferior exit before main loop.
7170 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7172 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7173 instead of on tmp_desc.
7175 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7176 Daniel Jacobowitz <dan@codesourcery.com>
7178 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7179 (add_thread): Minor cleanups.
7180 (clear_inferiors): Move lower in the file. Clear the DLL
7182 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7183 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7184 (xml_escape_text): New.
7185 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7187 (handle_v_cont): Report errors.
7188 (gdbserver_version): Update.
7189 (main): Correct size of own_buf. Do not report initial DLL events.
7190 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7191 (unloaded_dll, xml_escape_text): New.
7192 * win32-low.c (enum target_waitkind): Update comments.
7193 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7194 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7195 (win32_EnumProcessModules, win32_GetModuleInformation)
7196 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7197 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7198 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7199 (win32_Module32First, win32_Module32Next, load_toolhelp)
7200 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7201 (get_child_debug_event): Handle DLL events.
7202 (win32_wait): Likewise.
7204 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7206 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7207 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7209 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7211 * win32-low.c (handle_output_debug_string): Ignore event if not
7214 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7216 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7218 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7220 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7222 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7224 * inferiors.c (change_inferior_id): Add comment.
7225 * linux-low.c (check_removed_breakpoint): Add an early
7226 prototype. Improve debug output.
7227 (linux_attach): Doc update.
7228 (linux_detach_one_process, linux_detach): Clean up before releasing
7230 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7231 * linux-low.h (struct process_info): Doc improvement.
7232 * mem-break.c (delete_all_breakpoints): New.
7233 * mem-break.h (delete_all_breakpoints): New prototype.
7234 * thread-db.c (find_first_thread): New.
7235 (thread_db_create_event): Call it instead of
7236 thread_db_find_new_threads. Clean up unused variables.
7237 (maybe_attach_thread): Remove first thread handling.
7238 (thread_db_find_new_threads): Use find_first_thread.
7239 (thread_db_get_tls_address): Likewise.
7241 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7243 * thread-db.c (thread_db_find_new_threads): Add prototype.
7244 (thread_db_create_event): Check for the main thread before adding
7246 (maybe_attach_thread): Only enable event reporting if TID == 0.
7247 (thread_db_get_tls_address): Check for new threads.
7249 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7251 * linux-low.c (linux_create_inferior): Try execv before execvp.
7252 * spu-low.c (spu_create_inferior): Likewise.
7254 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7256 * linux-low.c (linux_create_inferior): Change execv to execvp.
7257 * spu-low.c (spu_create_inferior): Likewies.
7259 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7261 * Makefile.in (clean): Clean new files instead of deleted ones.
7262 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7263 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7265 * configure.srv: Specify XML files and new regformats for MIPS and
7267 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7268 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7269 an entry for the restart register.
7270 (mips_cannot_fetch_register, mips_cannot_store_register)
7271 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7272 register names to match the XML descriptions.
7273 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7274 restart register instead of $0.
7276 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7277 Markus Deuling <deuling@de.ibm.com>
7279 * remote-utils.c (decode_xfer_write): New function.
7280 * server.h (decode_xfer_write): Add prototype.
7281 * server.c (handle_query): Add PACKET_LEN argument. Support
7282 qXfer:spu:read and qXfer:spu:write packets.
7283 (main): Pass packet_len to handle_query.
7284 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7285 * target.h (target_ops): Add qxfer_spu.
7287 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7289 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7290 accessing non-seekable spufs files.
7292 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7294 * server.c (handle_query): Add reply for qC packet.
7296 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7297 Leo Zayas <lerele@champenstudios@com>
7299 * server.h (check_remote_input_interrupt_request): New function.
7300 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7301 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7302 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7303 (check_remote_input_interrupt_request): New function.
7304 * server.h (check_remote_input_interrupt_request): Declare.
7305 * win32-low.c (winapi_DebugBreakProcess,
7306 winapi_GenerateConsoleCtrlEvent): New typedefs.
7307 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7309 (win32_wait): Check for remote interrupt request
7310 with check_remote_input_interrupt_request.
7311 (win32_request_interrupt): New function.
7312 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7314 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7316 * win32-low.c (debug_registers_changed,
7317 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7318 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7319 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7320 (thread_rec): Get context using the low target.
7321 (child_add_thread): Call thread_added on the low target,
7322 which does the same thing.
7324 (do_initial_child_stuff): Remove debug registers references.
7325 Set context using the low target. Resume threads after
7326 setting the contexts.
7327 (child_continue): Remove dead variable. Remove debug
7328 registers references.
7329 (child_fetch_inferior_registers): Go through the low target.
7330 (do_child_store_inferior_registers): Remove.
7331 (child_store_inferior_registers): Go through the low target.
7332 (win32_resume): Remove debug registers references.
7333 Set context using the low target.
7334 (handle_exception): Change return type to void. Don't record
7335 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7336 first chance exception.
7337 (get_child_debug_event): Change return type to void. Remove
7338 goto loop. Always return after waiting for debug event.
7339 (win32_wait): Convert to switch statement. Handle spurious
7342 * win32-i386-low.c (debug_registers_changed,
7343 debug_registers_used): New.
7344 (initial_stuff): Rename to ...
7345 (i386_initial_stuff): ... this. Clear debug registers
7347 (store_debug_registers): Delete.
7348 (i386_get_thread_context): New.
7349 (load_debug_registers): Delete.
7350 (i386_set_thread_context): New.
7351 (i386_thread_added): New.
7352 (single_step): Rename to ...
7353 (i386_single_step): ... this.
7354 (do_fetch_inferior_registers): Rename to ...
7355 (i386_fetch_inferior_register): ... this.
7356 (i386_store_inferior_register): New.
7357 (the_low_target): Adapt to new interface.
7359 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7360 (arm_get_thread_context): New.
7361 (arm_set_thread_context): New.
7363 (do_fetch_inferior_registers): Rename to ...
7364 (arm_fetch_inferior_register): ... this.
7365 (arm_store_inferior_register): New.
7366 (arm_wince_breakpoint): Reimplement as unsigned long.
7367 (arm_wince_breakpoint_len): Define.
7368 (the_low_target): Adapt to new interface.
7370 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7371 load_debug_registers. Add get_thread_context, set_thread_context,
7372 thread_added and store_inferior_register. Rename
7373 fetch_inferior_registers to fetch_inferior_register.
7374 (regptr): Remove declaration.
7376 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7378 * linux-low.c (linux_detach): Change return type to int. Return 0.
7379 * spu-low.c (spu_detach): Likewise.
7381 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7383 * target.h (target_ops): Change return type of detach to int.
7385 (join_inferior): New.
7386 * server.c (main): Don't skip detach support on mingw32.
7387 If the inferior doesn't support detaching return error.
7388 Call join_inferior instead of using waitpid.
7389 * linux-low.c (linux_join): New.
7390 (linux_target_op): Add linux_join.
7391 * spu-low.c (spu_join): New.
7392 (spu_target_ops): Add spu_join.
7393 * win32-low.c (win32_detach): Adapt to new interface.
7394 Reopen current_process_handle before detaching. Issue a child
7395 resume before detaching.
7397 (win32_target_op): Add win32_join.
7399 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7401 * win32-low.c (win32-attach): Fix return value.
7402 * target.h (target_ops): Describe ATTACH return values.
7404 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7406 * win32-low.c (GETPROCADDRESS): Define.
7407 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7408 (winapi_DebugSetProcessKillOnExit): Likewise.
7409 (win32_create_inferior): Force usage of ansi CreateProcessA.
7410 (win32_attach): Use GETPROCADDRESS.
7411 (win32_detach): Likewise.
7413 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7415 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7417 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7419 * win32-low.c: Commit leftover changes from 2007-03-29.
7421 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7423 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7424 fields short instead of int. Add explicit padding.
7425 (i387_cache_to_fsave): Remove unnecessary casts.
7426 (i387_fsave_to_cache): Doc fix.
7427 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7429 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7431 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7432 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7434 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7436 * configure.srv (arm*-*-mingw32ce*): Move near the other
7439 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7441 * configure.ac: Add errno checking.
7442 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7443 sys/file.h and malloc.h.
7444 (AC_CHECK_DECLS): Add perror.
7445 (srv_mingwce): Handle.
7446 * configure.srv (i[34567]86-*-cygwin*): Add
7447 win32-i386-low.o to srv_tgtobj.
7448 (i[34567]86-*-mingw*): Likewise.
7449 (arm*-*-mingw32ce*): Add case.
7450 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7451 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7452 [__MINGW32CE__] (strerror): New function.
7453 [__MINGW32CE__] (errno): Define to GetLastError.
7454 [__MINGW32CE__] (COUNTOF): New macro.
7455 (remote_open): Remove extra close call.
7456 * mem-break.c (delete_breakpoint_at): New function.
7457 * mem-break.h (delete_breakpoint_at): Declare.
7458 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7459 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7460 [USE_WIN32API] (read, write): Add char* casts.
7461 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7462 * server.h: Include wincecompat.h on Windows CE.
7463 [HAVE_ERRNO_H]: Check.
7464 (perror): Declare if not declared.
7465 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7466 (perror_with_name): Remove errno declaration.
7467 * wincecompat.h: New.
7468 * wincecompat.c: New.
7470 * win32-arm-low.c: New.
7471 * win32-i386-low.c: New.
7472 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7473 (OUTMSG2): Make it safe.
7475 (COUNTOF): New macro.
7476 (NUM_REGS): Get it from the low target.
7477 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7478 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7479 (thread_rec): Let low target handle debug registers.
7480 (child_add_thread): Likewise.
7481 (child_init_thread_list): Likewise.
7482 (continue_one_thread): Likewise.
7484 (do_child_fetch_inferior_registers): Move to ...
7485 * win32-i386-low.c: ... here, and rename to ...
7486 (do_fetch_inferior_registers): ... this.
7487 * win32-low.c (child_fetch_inferior_registers):
7488 Go through the low target.
7489 (do_child_store_inferior_registers): Use regptr.
7490 (strwinerror): New function.
7491 (win32_create_inferior): Handle Windows CE.
7492 Use strwinerror instead of strerror on Windows error
7493 codes. Add program to the error output.
7494 Don't close the main thread handle on Windows CE.
7495 (win32_attach): Use coredll.dll on Windows CE.
7496 (win32_kill): Close current process and current
7498 (win32_detach): Use coredll.dll on Windows CE.
7499 (win32_resume): Let low target handle debug registers, and
7501 (handle_exception): Add/Remove initial breakpoint. Avoid
7502 non-existant WSTOPSIG on Windows CE.
7503 (win32_read_inferior_memory): Cast to remove warning.
7504 (win32_arch_string): Go through the low target.
7505 (initialize_low): Call set_breakpoint_data with the low
7506 target's breakpoint.
7507 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7508 FOP_REGNUM, mappings): Move to ...
7509 * win32-i386-low.c: ... here.
7510 * win32-low.c (win32_thread_info): Move to ...
7511 * win32-low.h: ... here.
7512 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7513 win32-arm-low.c and wincecompat.c.
7514 (all:): Add $EXEEXT.
7515 (install-only:): Likewise.
7516 (gdbserver:): Likewise.
7517 (gdbreplay:): Likewise.
7518 * config.in: Regenerate.
7519 * configure: Regenerate.
7521 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7523 * win32-low.c: Rename typedef thread_info to
7524 win32_thread_info throughout.
7526 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7528 * win32-i386-low.c: Rename to ...
7529 * win32-low.c: ... this.
7530 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7531 * Makefile.in: Likewise.
7533 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7535 * remote-utils.c (monitor_output): Constify msg parameter.
7536 * server.h (monitor_output): Likewise.
7537 * win32-i386-low.c (handle_output_debug_string): New.
7538 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7539 handle_output_debug_string.
7540 (get_child_debug_event): Likewise.
7542 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7544 * server.c (main): Correct strtoul check.
7546 2007-03-27 Jon Ringle <jon@ringle.org>
7548 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7550 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7552 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7554 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7556 * terminal.h: Check HAVE_SGTTY_H.
7558 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7560 * remote-utils.c (remote_open): Print out the assigned port number.
7562 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7564 * remote-utils.c (monitor_output): New function.
7565 * server.c (debug_threads): Define here.
7566 (monitor_show_help): New function.
7567 (handle_query): Handle qRcmd.
7568 (main): Do not handle 'd' packet.
7569 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7570 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7573 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7575 * Makefile.in (EXEEXT): New.
7576 (clean): Use $(EXEEXT).
7578 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7580 * target.h (target_ops): Rename send_signal to request_interrupt,
7581 and remove enum target_signal parameter.
7582 * linux-low.c (linux_request_interrupt): Rename from
7583 linux_send_signal, and always send SIGINT.
7584 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7585 and always send SIGINT.
7586 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7588 (input_interrupt): Likewise.
7590 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7592 * server.c (get_features_xml): Check if target implemented
7594 * win32-i386-low.c (win32_arch_string): New.
7595 (win32_target_ops): Add win32_arch_string as arch_string member.
7597 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7599 * spu-low.c (spu_arch_string): New.
7600 (spu_target_ops): Add spu_arch_string.
7602 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7604 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7605 * configure.ac: Do not check for terminal.h.
7606 * configure, config.in: Regenerated.
7608 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7610 * Makefile.in (OBS): Add $(XML_BUILTIN).
7611 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7613 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7614 (arm-with-iwmmxt.c): New.
7615 * config.in, configure: Regenerate.
7616 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7617 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7618 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7619 (arm*-*-linux*): Add iWMMXt and regset support.
7620 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7621 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7622 (arm_store_wmmxregset, target_regsets): New.
7623 * server.c (get_features_xml): Take annex argument. Check builtin
7625 (handle_query): Handle multiple annexes.
7627 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7629 * remote-utils.c [USE_WIN32API] (read, write): Define.
7630 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7633 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7635 * linux-i386-low.c (the_low_target): Set arch_string.
7636 * linux-x86-64-low.c (the_low_target): Likewise.
7637 * linux-low.c (linux_arch_string): New.
7638 (linux_target_ops): Add it.
7639 * linux-low.h (struct linux_target_ops): Add arch_string.
7640 * server.c (write_qxfer_response): Use const void * for DATA.
7641 (get_features_xml): New.
7642 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7643 * target.h (struct target_ops): Add arch_string method.
7645 2007-01-03 Denis Pilat <denis.pilat@st.com>
7646 Daniel Jacobowitz <dan@codesourcery.com>
7648 * linux-low.c (linux_kill): Handle being called with no threads.
7649 * win32-i386-low.c (win32_kill): Likewise.
7650 (get_child_debug_event): Clear current_process_handle.
7652 2006-12-30 Denis PILAT <denis.pilat@st.com>
7653 Daniel Jacobowitz <dan@codesourcery.com>
7655 * remote-utils.c (remote_open): Check the type of specified
7656 serial port devices before opening them.
7657 * server.c (main): Kill the inferior if an error occurs during
7658 the first remote_open.
7660 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7662 * README: Update supported targets.
7664 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7666 * Makefile.in (clean): Remove reg-mips64.c.
7667 (reg-mips64.c, reg-mips64.o): New rules.
7668 * configure.srv: Handle mips64. Include regset support for mips.
7669 * linux-mips-low.c (union mips_register): New.
7670 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7671 (mips_breakpoint, mips_breakpoint_at): Use int.
7672 (mips_collect_register, mips_supply_register)
7673 (mips_collect_register_32bit, mips_supply_register_32bit)
7674 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7675 (mips_store_fpregset, target_regsets): New.
7676 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7678 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7680 * configure.srv: Add target "spu*-*-*".
7681 * Makefile.in (clean): Remove reg-spu.c.
7682 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7683 * spu-low.c: New file.
7685 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7687 * configure.ac: Correct td_thr_tls_get_addr test.
7688 * configure: Regenerated.
7690 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7692 * linux-low.c (linux_wait_for_event): Reformat. Use the
7694 * remote-utils.c (decode_address_to_semicolon): New.
7695 * server.c (pass_signals, handle_general_set): New.
7696 (handle_query): Mention QPassSignals for qSupported.
7697 (main): Call handle_general_set.
7698 * server.h (pass_signals, decode_address_to_semicolon): New.
7700 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7702 * server.c (handle_query): Correct error handling for read_auxv.
7704 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7706 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7707 and srv_linux_thread_db to yes.
7708 * linux-s390-low.c (s390_fill_gregset): New function.
7709 (target_regsets): Define data structure.
7711 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7713 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7714 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7715 * config.in, configure: Regenerated.
7716 * inferiors.c (gdb_id_to_thread): New function.
7717 (gdb_id_to_thread_id): Use it.
7718 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7719 * linux-low.h (struct process_info): Add th member.
7720 (thread_db_get_tls_address): New prototype.
7721 * remote-utils.c (decode_address): Make non-static.
7722 * server.c (handle_query): Handle qGetTLSAddr.
7723 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7724 * target.h (struct target_ops): Add get_tls_address.
7725 * thread-db.c (maybe_attach_thread): Save the thread handle.
7726 (thread_db_get_tls_address): New.
7728 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7730 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7731 (linux_resume_one_process): Take a siginfo_t *. Update all
7732 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7733 (struct pending_signals): Add a siginfo_t.
7734 (linux_wait_for_process): Always set last_status.
7735 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7736 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7737 * linux-low.h (struct process_info): Add last_status.
7739 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7741 * remote-utils.c (try_rle): New function.
7742 (putpkt_binary): Use it.
7744 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7746 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7747 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7748 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7749 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7750 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7753 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7755 * server.c (terminal_fd): New variable.
7756 (old_foreground_pgrp): Likewise.
7757 (restore_old_foreground_pgrp): New function.
7758 (start_inferior): Record the terminal file descriptor in terminal_fd
7759 and its original foreground group in old_foreground_pgrp. Register
7760 restore_old_foreground_pgrp with atexit().
7762 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7764 * server.c (handle_query): Correct qPart to qXfer.
7766 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7768 * configure.ac: Check for more headers which are missing on
7769 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7770 * configure.srv: Add Cygwin and mingw32.
7771 * remote-utils.c: Don't include headers unconditionally which
7772 are missing on mingw32. Include <winsock.h> for mingw32.
7773 (remote_open): Adjust for mingw32 support. Flush
7774 standard error after writing to it.
7775 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7776 (unblock_async_io, enable_async_io, disable_async_io)
7777 (readchar, getpkt): Update for Winsock support.
7778 (prepare_resume_reply): Expect a protocol signal number.
7779 * server.c: Disable <sys/wait.h> on mingw32.
7780 (start_inferior): Adjust for mingw32 support. Flush
7781 standard error after writing to it.
7782 (attach_inferior): Likewise. Use protocol signal
7784 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7786 * win32-i386-low.c: New file.
7787 * Makefile.in (XM_CLIBS): Set.
7788 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7789 (win32-i386-low.o): New dependency rule.
7790 * linux-low.c (linux_wait): Use target signal numbers.
7791 * target.h (struct target_ops): Doc fix.
7792 * server.h (target_signal_to_name): New prototype.
7793 * gdbreplay.c: Don't include headers unconditionally which
7794 are missing on mingw32. Include <winsock.h> for mingw32.
7795 (remote_close, remote_open): Adjust for Winsock support.
7796 * configure, config.in: Regenerated.
7798 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7800 * server.c (decode_xfer_read, write_qxfer_response): New.
7801 (handle_query): Take a packet length argument. Handle
7802 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7803 the qSupported response.
7804 (main): Update call to handle_query.
7806 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7808 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7809 (putpkt_binary): Renamed from putpkt and adjusted for binary
7811 (putpkt): New wrapper for putpkt_binary.
7812 (readchar): Don't mask off the high bit.
7813 (decode_X_packet): New function.
7814 * server.c (main): Call putpkt_binary if a handler sets the packet
7815 length. Save the length of the incoming packet. Handle 'X'.
7816 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7818 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7820 * server.c (handle_query): Handle qSupported.
7822 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7824 * remote-utils.c (all_symbols_looked_up): New variable.
7825 (look_up_one_symbol): Check it.
7826 * server.h (look_up_one_symbol): New declaration.
7827 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7829 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7831 * Makefile.in (linux-arm-low.o): Update dependencies.
7832 * linux-arm-low.c: Include "gdb_proc_service.h".
7833 (PTRACE_GET_THREAD_AREA): Define.
7834 (ps_get_thread_area): New function.
7836 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7838 * configure.srv (m68k*-*-uclinux*): New target.
7839 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7840 (linux_resume_one_process): Remove extraneous cast.
7841 (linux_read_offsets): New.
7842 (linux_target_op): Add linux_read_offsets on mmuless systems.
7843 * server.c (handle_query): Add qOffsets logic.
7844 * target.h (struct target_ops): Add read_offsets.
7846 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7848 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7849 (PTRACE_GET_THREAD_AREA): Define.
7850 (ps_get_thread_area): New function.
7851 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7852 (linux-x86-64-low.o): Update.
7854 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7856 * configure.ac: Remove checks for prfpregset_t.
7857 * gdb_proc_service.h: New file.
7858 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7859 new "gdb_proc_service.h".
7860 * proc-service.c: Likewise.
7861 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7862 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7863 * Makefile.in (gdb_proc_service_h): Updated.
7864 * configure, config.in: Regenerated.
7866 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7868 * remote-utils.c (prepare_resume_reply): Move declaration
7869 of gdb_id_from_wait to the top of the block.
7871 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7873 * linux-low.c (regsets_store_inferior_registers): Read the regset
7874 from the target before filling it.
7876 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7878 * server.c (attach_inferior): Return SIGTRAP for a successful
7881 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7883 * Makefile.in (OBS): Add version.o.
7884 (STAGESTUFF): Delete.
7885 (version.o): Add dependencies.
7886 (version.c): Replace rule.
7887 (clean): Remove version.c.
7888 * server.c (gdbserver_version): New.
7889 (gdbserver_usage): Use printf.
7890 (main): Handle --version and --help.
7891 * server.h (version, host_name): Add declarations.
7893 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7905 * linux-x86-64-low.c:
7908 * linux-ppc64-low.c:
7917 * linux-crisv32-low.c:
7929 * gdbserver.1: Add (C) after Copyright. Update the FSF
7932 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7934 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7935 (arm_breakpoint_at): Recognize both breakpoints.
7936 (the_low_target): Use the correct breakpoint instruction.
7938 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7940 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7941 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7942 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7943 (the_low_target): Update.
7945 2005-10-25 Andreas Schwab <schwab@suse.de>
7947 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7949 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7950 (ia64_num_regs): Reduce to 462.
7952 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7954 * acinclude.m4: Correct quoting.
7955 * aclocal.m4: Regenerated.
7957 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7958 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7959 (thread_db_init): Call thread_db_err_str.
7960 * configure.ac: Check for TD_VERSION.
7961 * config.in, configure: Regenerated.
7963 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7965 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7967 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7969 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7970 is not available. Define HAVE_PTRACE_GETREGS if it is.
7971 * config.in, configure: Regenerated.
7972 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7973 * linux-i386-low.c, linux-m68k-low.c: Update to use
7974 HAVE_PTRACE_GETREGS.
7975 * linux-low.c (regsets_fetch_inferior_registers)
7976 (regsets_store_inferior_registers): Only return 0 if we processed
7978 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7979 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7981 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7983 * inferiors.c (struct thread_info): Add gdb_id.
7984 (add_thread): Add gdb_id argument.
7985 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7986 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7987 calls to add_thread.
7988 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7989 * server.c (handle_query): Use thread_to_gdb_id.
7990 (handle_v_cont, main): Use gdb_id_to_thread_id.
7991 * server.h (add_thread): Update prototype.
7992 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7995 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7997 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7998 left-padded registers.
7999 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8000 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8002 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8004 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8005 * configure: Regenerate.
8006 * config.in: Regenerate.
8007 * server.h (NEED_DECLARATION_STRERROR):
8008 Replace with !HAVE_DECL_STRERROR.
8010 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8012 * linux-low.c (linux_wait, linux_send_signal): Don't test
8013 an unsigned long variable for > 0 if it could be MAX_ULONG.
8014 * server.c (myresume): Likewise.
8015 * target.c (set_desired_inferior): Likewise.
8017 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8019 * configure.ac: Simplify and improve check for socklen_t.
8020 * configure, config.in: Regenerate.
8022 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8024 * acconfig.h: Remove.
8025 * configure.ac: Add a test for socklen_t. Use three-argument
8026 AC_DEFINE throughout.
8027 * config.in: Regenerated using autoheader 2.59.
8028 * configure: Regenerated.
8030 * gdbreplay.c (socklen_t): Provide a default.
8031 (remote_open): Use socklen_t.
8032 * remote-utils.c (socklen_t): Provide a default.
8033 (remote_open): Use socklen_t.
8034 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8037 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8039 * linux-low.c (linux_read_memory, linux_write_memory)
8040 (linux_read_auxv): Likewise.
8041 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8042 (check_mem_write): Likewise.
8043 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8045 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8046 (registers_from_string, register_data): Likewise.
8047 * server.c (handle_query, main): Likewise.
8048 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8049 (decode_M_packet): Likewise.
8050 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8051 * target.h (struct target_ops): Update read_memory, write_memory,
8053 (read_inferior_memory, write_inferior_memory): Update.
8054 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8056 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8057 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8058 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8059 linux-s390-low.c, linux-sh-low.c: Update for changes in
8060 read_inferior_memory and the_low_target->breakpoint.
8062 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8064 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8065 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8066 * configure.srv: Add powerpc64-*-linux*.
8067 * linux-ppc64-low.c: New file.
8069 2005-05-23 Orjan Friberg <orjanf@axis.com>
8071 * linux-cris-low.c: New file with support for CRIS.
8072 * linux-crisv32-low.c: Ditto for CRISv32.
8073 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8074 (clean): Add reg-cris.c and reg-crisv32.c.
8075 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8076 reg-crisv32.o, and reg-crisv32.c to make rules.
8077 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8080 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8082 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8083 of sizeof (PTRACE_XFER_TYPE).
8084 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8086 2005-05-12 Orjan Friberg <orjanf@axis.com>
8088 * target.h (struct target_ops): Add insert_watchpoint,
8089 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8090 pointers for hardware watchpoint support.
8091 * linux-low.h (struct linux_target_ops): Ditto.
8092 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8093 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8094 to linux_target_ops.
8095 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8097 * server.c (main): Recognize 'Z' and 'z' packets.
8099 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8101 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8102 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8103 (the_low_target): Add new members.
8105 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8107 * proc-service.c (ps_lgetregs): Search all_processes instead of
8110 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8112 * server.c (start_inferior): Change return type to int.
8113 (attach_inferior): Change sigptr to int *.
8114 (handle_v_cont, handle_v_requests): Change signal to int *.
8115 (main): Change signal to int.
8117 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8119 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8120 * configure.srv: Add m32r*-*-linux*.
8121 * linux-m32r-low.c: New file.
8123 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8125 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8127 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8129 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8130 Take unsigned long arguments for PIDs.
8131 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8132 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8133 (wait_for_sigstop, linux_resume_one_process)
8134 (regsets_fetch_inferior_registers, linux_send_signal)
8135 (linux_read_auxv): Likewise. Update the types of variables holding
8136 PIDs. Update format string specifiers.
8137 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8138 * remote-utils.c (prepare_resume_reply): Likewise.
8139 * server.c (cont_thread, general_thread, step_thread)
8140 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8142 (handle_query): Update format specifiers.
8143 (handle_v_cont, main): Use strtoul for thread IDs.
8144 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8145 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8146 (general_thread, step_thread, thread_from_wait)
8147 (old_thread_from_wait): Update.
8148 * target.h (struct thread_resume): Use unsigned long for THREAD.
8149 (struct target_ops): Use unsigned long for arguments to attach and
8152 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8154 * acinclude.m4: Include bfd/bfd.m4 directly.
8155 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8156 <agriffis@toolchain.org>.
8157 * aclocal.m4, configure: Regenerated.
8159 2005-01-07 Andrew Cagney <cagney@gnu.org>
8161 * configure.ac: Rename configure.in, require autoconf 2.59.
8162 * configure: Re-generate.
8164 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8166 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8168 * aclocal.m4: Regenerated.
8169 * configure: Regenerated.
8171 2004-11-21 Andreas Schwab <schwab@suse.de>
8173 * linux-m68k-low.c (m68k_num_gregs): Define.
8174 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8175 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8176 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8177 (m68k_breakpoint_at): New. Add to the_low_target.
8179 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8180 srv_linux_thread_db to yes.
8182 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8184 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8185 (ARCH_SET_FS): Likewise.
8186 (ARCH_GET_FS): Likewise.
8187 (ARCH_GET_GS): Likewise.
8189 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8191 * linux-i386-low.c (ps_get_thread_area): New.
8192 * linux-x86-64-low.c (ps_get_thread_area): New.
8193 * linux-low.c: Include <sys/syscall.h>.
8194 (linux_kill_one_process): Don't kill the first thread here.
8195 (linux_kill): Kill the first thread here.
8196 (kill_lwp): New function.
8197 (send_sigstop, linux_send_signal): Use it.
8198 * proc-service.c: Clean up #ifdefs.
8199 (fpregset_info): Delete.
8200 (ps_lgetregs): Update and enable implementation.
8201 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8203 * remote-utils.c (struct sym_cache, symbol_cache): New.
8204 (input_interrupt): Print a clearer message.
8205 (async_io_enabled): New variable.
8206 (enable_async_io, disable_async_io): Use it. Update comments.
8207 (look_up_one_symbol): Use the symbol cache.
8208 * thread-db.c (thread_db_look_up_symbols): New function.
8209 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8211 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8213 * configure.in: Test for -rdynamic.
8214 * configure: Regenerated.
8215 * Makefile (INTERNAL_LDFLAGS): New.
8216 (gdbserver, gdbreplay): Use it.
8218 2004-09-02 Andrew Cagney <cagney@gnu.org>
8220 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8222 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8224 * linux-low.c (linux_wait): Clear all_processes list also.
8226 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8228 * linux-low.c: Include <errno.h>. Remove extern declaration of
8231 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8233 * gdbreplay.c, server.h, utils.c: Update copyright years.
8235 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8237 * server.c (main): Print child status or termination signal from
8238 variable 'signal', not 'sig'.
8240 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8242 * linux-low.c (linux_read_memory): Change return type to
8243 int. Check for and return error from ptrace().
8244 * target.c (read_inferior_memory): Change return type to int. Pass
8245 back return status from the_target->read_memory().
8246 * target.h (struct target_ops): Adapt *read_memory() prototype.
8248 (read_inferior_memory): Adapt prototype.
8249 * server.c (main): Return an error packet if
8250 read_inferior_memory() returns an error.
8252 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8254 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8255 Unify with other clean targets.
8257 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8259 * server.c (handle_v_cont): Call set_desired_inferior.
8261 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8263 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8265 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8267 * linux-low.c (linux_wait): Unblock async I/O.
8268 (linux_resume): Block and enable async I/O.
8269 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8270 * server.h (block_async_io, unblock_async_io): Add prototypes.
8272 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8274 * remote-utils.c (remote_open): Print a status notice after
8276 * server.c (attach_inferior): Print a status notice after
8279 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8281 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8283 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8285 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8287 * server.c, target.h: Update copyright years.
8289 2004-02-25 Roland McGrath <roland@redhat.com>
8291 * target.h (struct target_ops): New member `read_auxv'.
8292 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8293 * linux-low.c (linux_read_auxv): New function.
8294 (linux_target_ops): Initialize `read_auxv' member to that.
8296 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8298 Committed by Jim Blandy <jimb@redhat.com>.
8300 * linux-s390-low.c (s390_num_regs): Update.
8301 (s390_regmap): Remove control registers. Use __s390x__ predefine
8302 instead of GPR_SIZE to distiguish s390 and s390x targets.
8304 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8306 * linux-low.c: Update copyright year.
8307 (check_removed_breakpoint): Clear pending_is_breakpoint.
8308 (linux_set_resume_request, linux_queue_one_thread)
8309 (resume_status_pending_p): New functions.
8310 (linux_continue_one_thread): Use process->resume.
8311 (linux_resume): Only resume threads if there are no pending events.
8312 * linux-low.h (struct process_info): Add resume request
8315 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8317 * regcache.c (new_register_cache): Clear the allocated register
8318 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8320 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8322 * linux-low.c (linux_resume): Take a struct thread_resume *
8324 (linux_wait): Update call.
8325 (resume_ptr): New static variable.
8326 (linux_continue_one_thread): Renamed from
8327 linux_continue_one_process. Use resume_ptr.
8328 (linux_resume): Use linux_continue_one_thread.
8329 * server.c (handle_v_cont, handle_v_requests): New functions.
8330 (myresume): New function.
8331 (main): Handle 'v' case.
8332 * target.h (struct thread_resume): New type.
8333 (struct target_ops): Change argument of "resume" to struct
8335 (myresume): Delete macro.
8337 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8339 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8340 (uninstall): Support DESTDIR.
8342 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8344 * configure.srv: Add xscale*linux copy of arm*linux entry.
8346 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8348 * linux-arm-low.c (arm_reinsert_addr): New function.
8349 (the_low_target): Add arm_reinsert_addr.
8351 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8353 * mem-break.c: Remove whitespace at end of file.
8355 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8357 * configure.in: Check whether we need to prototype strerror.
8358 * server.h: Optionally prototype strerror.
8359 * gdbreplay.c (perror_with_name): Use strerror.
8360 * linux-low.c (linux_attach_lwp): Use strerror.
8361 * utils.c (perror_with_name): Use strerror.
8362 * config.in, configure: Regenerated.
8364 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8366 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8367 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8369 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8371 * Makefile.in (SFILES): Update.
8372 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8373 low-sun3.c: Remove files.
8375 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8377 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8378 (linux_detach_one_process, linux_detach): New functions.
8379 (linux_target_ops): Add linux_detach.
8380 * server.c (main): Handle 'D' packet.
8381 * target.h (struct target_ops): Add "detach" member.
8382 (detach_inferior): Define.
8384 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8386 From Kelley Cook <kelleycook@wideopenwest.com>:
8387 * configure.srv: Accept i[34567]86 variants.
8389 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8391 * linux-low.c (linux_wait_for_event): Correct comment typos.
8392 (linux_resume_one_process): Call check_removed_breakpoint.
8393 (linux_send_signal): New function.
8394 (linux_target_ops): Add linux_send_signal.
8395 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8397 * target.h (struct target_ops): Add send_signal.
8399 2003-05-29 Jim Blandy <jimb@redhat.com>
8401 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8402 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8403 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8404 away part of the register's value.
8406 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8408 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8409 (linux_wait_for_event, linux_init_signals): Likewise.
8411 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8413 * configure.in: Check for stdlib.h.
8414 * configure: Regenerated.
8415 * config.in: Regenerated.
8417 2003-01-04 Andreas Schwab <schwab@suse.de>
8419 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8421 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8423 * Makefile.in: Remove obsolete code.
8425 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8427 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8428 defined(PT_FPR0_HI).
8430 2002-11-17 Stuart Hughes <seh@zee2.com>
8432 * linux-arm-low.c (arm_num_regs): Increase.
8433 (arm_regmap): Include status register.
8435 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8437 * linux-low.c (register_addr): Remove incorrect -1 check.
8439 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8441 * linux-low.c (linux_create_inferior): Call setpgid. Return
8443 (unstopped_p, linux_signal_pid): Remove.
8444 (linux_target_ops): Remove linux_signal_pid.
8445 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8446 global instead of target method.
8447 * target.h (struct target_ops): Remove signal_pid. Update comment
8448 for create_inferior.
8449 * server.c (signal_pid): New variable.
8450 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8451 gdbserver. Set the child to be the foreground process group.
8452 (attach_inferior): Set signal_pid.
8454 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8456 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8458 2002-08-20 Jim Blandy <jimb@redhat.com>
8460 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8463 2002-08-01 Andrew Cagney <cagney@redhat.com>
8465 * Makefile.in: Make chill references obsolete.
8467 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8469 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8470 * configure: Regenerate.
8471 * config.in: Regenerate.
8473 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8475 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8476 (perror_with_name, remote_close, remote_open, expect, play): Static.
8478 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8480 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8481 byte offsets instead of an array of indexes.
8482 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8484 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8486 * regcache.c: Add comment.
8488 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8490 * thread-db.c: New file.
8491 * proc-service.c: New file.
8492 * acinclude.m4: New file.
8493 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8494 proc-service.o, and thread-db.o.
8495 (linux-low.o): Add USE_THREAD_DB.
8496 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8497 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8498 * aclocal.m4: Regenerated.
8499 * config.in: Regenerated.
8500 * configure: Regenerated.
8501 * configure.in: Check for proc_service.h, sys/procfs.h,
8502 thread_db.h, and linux/elf.h headrs.
8503 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8504 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8505 Check for -lthread_db and thread support.
8506 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8507 PowerPC, and SuperH.
8508 * i387-fp.c: Constify arguments.
8509 * i387-fp.h: Likewise.
8510 * inferiors.c: (struct thread_info): Renamed from
8511 `struct inferior_info'. Remove PID member. Use generic inferior
8512 list header. All uses updated.
8513 (inferiors, signal_pid): Removed.
8514 (all_threads): New variable.
8515 (get_thread): Define.
8516 (add_inferior_to_list): New function.
8517 (for_each_inferior): New function.
8518 (change_inferior_id): New function.
8519 (add_inferior): Removed.
8520 (remove_inferior): New function.
8521 (add_thread): New function.
8522 (free_one_thread): New function.
8523 (remove_thread): New function.
8524 (clear_inferiors): Use for_each_inferior and free_one_thread.
8525 (find_inferior): New function.
8526 (find_inferior_id): New function.
8527 (inferior_target_data): Update argument type.
8528 (set_inferior_target_data): Likewise.
8529 (inferior_regcache_data): Likewise.
8530 (set_inferior_regcache_data): Likewise.
8531 * linux-low.c (linux_bp_reinsert): Remove.
8532 (all_processes, stopping_threads, using_thrads)
8533 (struct pending_signals, debug_threads, pid_of): New.
8534 (inferior_pid): Replace with macro.
8535 (struct inferior_linux_data): Remove.
8536 (get_stop_pc, add_process): New functions.
8537 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8538 Use add_process and add_thread.
8539 (linux_attach_lwp): New function, based on old linux_attach. Use
8540 add_process and add_thread. Set stop_expected for new threads.
8541 (linux_attach): New function.
8542 (linux_kill_one_process): New function.
8543 (linux_kill): Kill all LWPs.
8544 (linux_thread_alive): Use find_inferior_id.
8545 (check_removed_breakpoints, status_pending_p): New functions.
8546 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8547 Update. Use WNOHANG. Wait for cloned processes also. Update process
8548 struct for the found process.
8549 (linux_wait_for_event): New function.
8550 (linux_wait): Use it. Support LWPs.
8551 (send_sigstop, wait_for_sigstop, stop_all_processes)
8552 (linux_resume_one_process, linux_continue_one_process): New functions.
8553 (linux_resume): Support LWPs.
8554 (REGISTER_RAW_SIZE): Remove.
8555 (fetch_register): Use register_size instead. Call supply_register.
8556 (usr_store_inferior_registers): Likewise. Call collect_register.
8558 (regsets_fetch_inferior_registers): Improve error message.
8559 (regsets_store_inferior_registers): Add debugging.
8560 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8561 (unstopped_p, linux_signal_pid): New functions.
8562 (linux_target_ops): Add linux_signal_pid.
8563 (linux_init_signals): New function.
8564 (initialize_low): Call it. Initialize using_threads.
8565 * regcache.c (inferior_regcache_data): Add valid
8567 (get_regcache): Fetch registers lazily. Add fetch argument
8568 and update all callers.
8569 (regcache_invalidate_one, regcache_invalidate): New
8571 (new_register_cache): Renamed from create_register_cache.
8572 Return the new regcache.
8573 (free_register_cache): Change argument to a void *.
8574 (registers_to_string, registers_from_string): Call get_regcache
8575 with fetch flag set.
8576 (register_data): Make static. Pass fetch flag to get_regcache.
8577 (supply_register): Call get_regcache with fetch flag clear.
8578 (collect_register): Call get_regcache with fetch flag set.
8579 (collect_register_as_string): New function.
8580 * regcache.h: Update.
8581 * remote-utils.c (putpkt): Flush after debug output and use
8583 Handle input interrupts while waiting for an ACK.
8584 (input_interrupt): Use signal_pid method.
8585 (getpkt): Flush after debug output and use stderr.
8586 (outreg): Use collect_register_as_string.
8587 (new_thread_notify, dead_thread_notify): New functions.
8588 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8590 (look_up_one_symbol): Flush after debug output.
8591 * server.c (step_thread, server_waiting): New variables.
8592 (start_inferior): Don't use signal_pid. Update call to mywait.
8593 (attach_inferior): Update call to mywait.
8594 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8595 (main): Don't fetch/store registers explicitly. Use
8596 set_desired_inferior. Support proposed ``Hs'' packet. Update
8599 (struct inferior_list, struct_inferior_list_entry): New.
8600 * target.c (set_desired_inferior): New.
8601 (write_inferior_memory): Constify.
8602 (mywait): New function.
8604 (struct target_ops): New signal_pid method.
8605 (mywait): Removed macro, added prototype.
8607 * linux-low.h (regset_func): Removed.
8608 (regset_fill_func, regset_store_func): New.
8609 (enum regset_type): New.
8610 (struct regset_info): Add type field. Use new operation types.
8611 (struct linux_target_ops): stop_pc renamed to get_pc.
8612 Add decr_pc_after_break and breakpoint_at.
8613 (get_process, get_thread_proess, get_process_thread)
8614 (strut process_info, all_processes, linux_attach_lwp)
8615 (thread_db_init): New.
8617 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8618 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8619 (the_low_target): Add new members.
8620 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8621 (i386_store_fpxregset): Constify.
8622 (target_regsets): Add new kind identifier.
8623 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8624 (i386_set_pc): Add debugging.
8625 (i386_breakpoint_at): New function.
8626 (the_low_target): Add new members.
8627 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8628 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8629 (mips_breakpoint_at): New.
8630 (the_low_target): Add new members.
8631 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8632 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8633 (the_low_target): Add new members.
8634 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8635 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8636 (the_low_target): Add new members.
8637 * linux-x86-64-low.c (target_regsets): Add new kind
8640 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8642 From Martin Pool <mbp@samba.org>:
8643 * server.c (gdbserver_usage): New function.
8646 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8648 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8651 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8653 * Makefile.in: Remove obsolete code.
8655 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8657 * linux-low.c (regsets_fetch_inferior_registers),
8658 (regsets_store_inferior_registers): Removed cast to int from
8660 * regcache.h: Added declaration of struct inferior_info.
8662 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8664 * inferiors.c (struct inferior_info): Add regcache_data.
8665 (add_inferior): Call create_register_cache.
8666 (clear_inferiors): Call free_register_cache.
8667 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8668 * regcache.c (struct inferior_regcache_data): New.
8669 (registers): Remove.
8670 (get_regcache): New function.
8671 (create_register_cache, free_register_cache): New functions.
8672 (set_register_cache): Don't initialize the register cache here.
8673 (registers_to_string, registers_from_string, register_data): Call
8675 * regcache.h: Add prototypes.
8676 * server.h: Likewise.
8678 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8680 * mem-break.c: New file.
8681 * mem-break.h: New file.
8682 * Makefile.in: Add mem-break.o rule; update server.h
8684 * inferiors.c (struct inferior_info): Add target_data
8686 (clear_inferiors): Free target_data member if set.
8687 (inferior_target_data, set_inferior_target_data): New functions.
8688 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8689 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8690 * linux-low.c (linux_bp_reinsert): New variable.
8691 (struct inferior_linux_data): New.
8692 (linux_create_inferior): Use set_inferior_target_data.
8693 (linux_attach): Likewise. Call add_inferior.
8694 (linux_wait_for_one_inferior): New function.
8695 (linux_wait): Call it.
8696 (linux_write_memory): Add const.
8697 (initialize_low): Call set_breakpoint_data.
8698 * linux-low.h (struct linux_target_ops): Add breakpoint
8700 * server.c (attach_inferior): Remove extra add_inferior
8702 * server.h: Include mem-break.h. Update inferior.c
8704 * target.c (read_inferior_memory)
8705 (write_inferior_memory): New functions.
8706 * target.h (read_inferior_memory)
8707 (write_inferior_memory): Change macros to prototypes.
8708 (struct target_ops): Update comments. Add const to write_memory
8711 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8713 * linux-low.c (usr_store_inferior_registers): Support
8714 registers which are allowed to fail to store.
8715 * linux-low.h (linux_target_ops): Likewise.
8716 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8717 (ppc_cannot_store_register): FPSCR may not be storable.
8719 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8721 * server.h: Include <string.h> if HAVE_STRING_H.
8722 * ChangeLog: Correct paths in last ChangeLog entry.
8724 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8726 * linux-low.h: Remove obsolete prototypes.
8727 (struct linux_target_ops): New.
8728 (extern the_low_target): New.
8729 * linux-low.c (num_regs, regmap): Remove declarations.
8730 (register_addr): Use the_low_target explicitly.
8731 (fetch_register): Likewise.
8732 (usr_fetch_inferior_registers): Likewise.
8733 (usr_store_inferior_registers): Likewise.
8734 * linux-arm-low.c (num_regs): Remove.
8735 (arm_num_regs): Define.
8736 (arm_regmap): Renamed from regmap, made static.
8737 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8739 (arm_cannot_store_register): Renamed from cannot_store_register,
8741 (the_low_target): New.
8742 * linux-i386-low.c (num_regs): Remove.
8743 (i386_num_regs): Define.
8744 (i386_regmap): Renamed from regmap, made static.
8745 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8747 (i386_cannot_store_register): Renamed from cannot_store_register,
8749 (the_low_target): New.
8750 * linux-ia64-low.c (num_regs): Remove.
8751 (ia64_num_regs): Define.
8752 (ia64_regmap): Renamed from regmap, made static.
8753 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8755 (ia64_cannot_store_register): Renamed from cannot_store_register,
8757 (the_low_target): New.
8758 * linux-m68k-low.c (num_regs): Remove.
8759 (m68k_num_regs): Define.
8760 (m68k_regmap): Renamed from regmap, made static.
8761 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8763 (m68k_cannot_store_register): Renamed from cannot_store_register,
8765 (the_low_target): New.
8766 * linux-mips-low.c (num_regs): Remove.
8767 (mips_num_regs): Define.
8768 (mips_regmap): Renamed from regmap, made static.
8769 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8771 (mips_cannot_store_register): Renamed from cannot_store_register,
8773 (the_low_target): New.
8774 * linux-ppc-low.c (num_regs): Remove.
8775 (ppc_num_regs): Define.
8776 (ppc_regmap): Renamed from regmap, made static.
8777 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8779 (ppc_cannot_store_register): Renamed from cannot_store_register,
8781 (the_low_target): New.
8782 * linux-s390-low.c (num_regs): Remove.
8783 (s390_num_regs): Define.
8784 (s390_regmap): Renamed from regmap, made static.
8785 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8787 (s390_cannot_store_register): Renamed from cannot_store_register,
8789 (the_low_target): New.
8790 * linux-sh-low.c (num_regs): Remove.
8791 (sh_num_regs): Define.
8792 (sh_regmap): Renamed from regmap, made static.
8793 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8795 (sh_cannot_store_register): Renamed from cannot_store_register,
8797 (the_low_target): New.
8798 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8799 (the_low_target): New.
8801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8803 * Makefile.in: Add stamp-h target.
8804 * configure.in: Create stamp-h.
8805 * configure: Regenerated.
8807 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8809 * inferiors.c: New file.
8810 * target.c: New file.
8811 * target.h: New file.
8812 * Makefile.in: Add target.o and inferiors.o. Update
8814 * linux-low.c (inferior_pid): New static variable,
8815 moved from server.c.
8816 (linux_create_inferior): Renamed from create_inferior.
8817 Call add_inferior. Return 0 on success instead of a PID.
8818 (linux_attach): Renamed from myattach.
8819 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8820 (linux_thread_alive): Renamed from mythread_alive.
8821 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8823 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8824 (regsets_store_inferior_registers): Correct error message.
8825 Add missing ``return 0''.
8826 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8827 (linux_store_registers): Renamed from store_inferior_registers.
8828 (linux_read_memory): Renamed from read_inferior_memory.
8829 (linux_write_memory): Renamed from write_inferior_memory.
8830 (linux_target_ops): New structure.
8831 (initialize_low): Call set_target_ops ().
8832 * remote-utils.c (unhexify): New function.
8833 (hexify): New function.
8834 (input_interrupt): Send signals to ``signal_pid''.
8835 * server.c (inferior_pid): Remove.
8836 (start_inferior): Update create_inferior call.
8837 (attach_inferior): Call add_inferior.
8838 (handle_query): New function.
8839 (main): Call handle_query for `q' packets.
8840 * server.h: Include "target.h". Remove obsolete prototypes.
8841 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8843 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8845 * Makefile.in: Add WARN_CFLAGS. Update configury
8847 * configure.in: Check for <string.h>
8848 * configure: Regenerate.
8849 * config.in: Regenerate.
8850 * gdbreplay.c: Include needed system headers.
8851 (remote_open): Remove strchr prototype.
8852 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8853 * regcache.c (supply_register): Change buf argument to const void *.
8854 (supply_register_by_name): Likewise.
8855 (collect_register): Change buf argument to void *.
8856 (collect_register_by_name): Likewise.
8857 * regcache.h: Add missing prototypes.
8858 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8859 * server.c (handle_query): New function.
8860 (attached): New static variable, moved out of main.
8861 (main): Quiet longjmp clobber warnings.
8862 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8863 * utils.c (error): Remove NORETURN.