1 2014-02-12 Tom Tromey <tromey@redhat.com>
3 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5 * regcache.c (registers_to_string, collect_register_as_string):
7 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9 * server.c (process_serial_event): Likewise.
10 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
11 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13 2014-02-12 Tom Tromey <tromey@redhat.com>
15 * remote-utils.c (look_up_one_symbol, monitor_output): Use
17 * tracepoint.c (cmd_qtstatus): Likewise.
19 2014-02-12 Tom Tromey <tromey@redhat.com>
21 * remote-utils.c (monitor_output): Pass explicit length to
24 2014-02-12 Tom Tromey <tromey@redhat.com>
26 * tracepoint.c: Include rsp-low.h.
27 * server.c: Include rsp-low.h.
28 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
29 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
31 * remote-utils.c: Include rsp-low.h.
32 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
33 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
34 (convert_int_to_ascii, convert_ascii_to_int): Move to
36 * regcache.c: Include rsp-low.h.
37 * ax.c: Include rsp-low.h.
38 * Makefile.in (SFILES): Add common/rsp-low.c.
40 (rsp-low.o): New target.
42 2014-02-12 Tom Tromey <tromey@redhat.com>
44 * utils.h (pulongest, plongest, phex_nz): Don't declare.
45 Include print-utils.h.
46 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
47 (plongest, thirty_two, phex_nz): Remove.
48 * Makefile.in (SFILES): Add common/print-utils.c.
49 (OBS): Add print-utils.o.
50 (print-utils-ipa.o): New target.
51 (print-utils.o): New target.
52 (IPA_OBJS): Add print-utils-ipa.o.
54 2014-02-06 Tom Tromey <tromey@redhat.com>
56 * Makefile.in (SFILES): Fix indentation.
58 2014-02-05 Doug Evans <dje@google.com>
60 * linux-low.c (linux_wait_for_event): Improve comment.
61 (linux_wait_1): Keep current_inferior in sync with event_child.
63 2014-01-22 Doug Evans <dje@google.com>
65 * gdbthread.h (gdb_id_to_thread): Delete, unused.
67 2014-01-22 Doug Evans <dje@google.com>
69 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
70 * configure: Regenerate.
71 * config.in: Regenerate.
72 * Makefile.in (SFILES): Add debug.c.
76 * linux-aarch64-low.c (*): Update all debugging printfs to use
77 debug_printf instead of fprintf.
78 * linux-arm-low.c (*): Ditto.
79 * linux-cris-low.c (*): Ditto.
80 * linux-crisv32-low.c (*): Ditto.
81 * linux-m32r-low.c (*): Ditto.
82 * linux-sparc-low.c (*): Ditto.
83 * linux-x86.c (*): Ditto.
84 * linux-low.c (*): Ditto.
85 (linux_wait_1): Add calls to debug_enter, debug_exit.
86 (linux_wait): Remove redundant debugging printf.
87 (stop_all_lwps): Add calls to debug_enter, debug_exit.
88 (linux_resume, unstop_all_lwps): Ditto.
89 * mem-break.c (*): Update all debugging printfs to use
90 debug_printf instead of fprintf.
91 * remote-utils.c (*): Ditto.
92 * thread-db.c (*): Ditto.
93 * server.c #include <ctype.h>, "gdb_vecs.h".
94 (debug_threads): Moved to debug.c.
95 (*): Update all debugging printfs to use debug_printf instead of
97 (start_inferior): Replace call to fflush with call to debug_flush.
98 (monitor_show_help): Mention set debug-format.
99 (parse_debug_format_options): New function.
100 (handle_monitor_command): Handle "monitor set debug-format".
101 (gdbserver_usage): Mention --debug-format.
102 (main): Parse --debug-format.
103 * server.h (debug_threads): Declaration moved to debug.h.
105 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
106 trace_debug_1 that uses debug_printf.
107 (tracepoint_look_up_symbols): Update all debugging printfs to use
108 debug_printf instead of fprintf.
110 2014-01-20 Baruch Siach <baruch@tkos.co.il>
112 * linux-xtensa-low.c: Include asm/ptrace.h instead of
115 2014-01-17 Pedro Alves <palves@redhat.com>
118 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
119 defined after including gdb_proc_service.h.
121 2014-01-16 Doug Evans <dje@google.com>
123 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
126 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
128 * target.h (target_ops) <read_btrace>: Change parameters and
129 return type to allow error reporting.
130 * server.c (handle_qxfer_btrace): Support delta reads. Pass
131 trace reading errors on.
132 * linux-low.c (linux_low_read_btrace): Pass trace reading
134 (linux_low_disable_btrace): New.
136 2014-01-15 Doug Evans <dje@google.com>
138 * inferiors.c (thread_id_to_gdb_id): Delete.
139 * inferiors.h (thread_id_to_gdb_id): Delete.
141 2014-01-13 Eli Zaretskii <eliz@gnu.org>
143 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
144 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
147 2014-01-08 Pedro Alves <palves@redhat.com>
149 * server.c (handle_status): Don't discard previous queued stop
150 replies or thread's pending status here.
151 (main) <disconnection>: Do it here instead.
153 2014-01-08 Pedro Alves <palves@redhat.com>
155 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
156 * server.c (visit_actioned_threads, handle_pending_status): New
158 (handle_v_cont): Factor out parts to ...
159 (resume): ... this new function. If in all-stop, and a thread
160 being resumed has a pending status, report it without actually
162 (myresume): Adjust to use the new 'resume' function.
163 (clear_pending_status_callback, set_pending_status_callback)
164 (find_status_pending_thread_callback): New functions.
165 (handle_status): Handle the case of multiple threads having
166 interesting statuses to report. Report threads' real last signal
167 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
168 with an interesting thread to report the status for, instead of
169 always reporting the status of the first thread.
171 2014-01-01 Joel Brobecker <brobecker@adacore.com>
173 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
174 * gdbreplay.c (gdbreplay_version): Likewise.
176 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
178 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
179 iov.iov_len with the real length in use.
181 2013-12-13 Joel Brobecker <brobecker@adacore.com>
183 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
184 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
185 for all targets that use win32-low.c.
186 * win32-low.c (win32_ensure_ntdll_loaded): New function.
187 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
189 2013-12-13 Pedro Alves <palves@redhat.com>
191 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
192 if equal to TARGET_WAITKIND_LOADED.
193 * win32-low.c (cached_status): New static global.
194 (win32_wait): Add declaration.
195 (do_initial_child_stuff): Flush all initial pending debug events
196 up to the initial breakpoint.
197 (win32_wait): If CACHED_STATUS was set, return that instead
198 of doing a real wait. Remove the code resuming the execution
199 of the inferior after receiving a TARGET_WAITKIND_LOADED event
200 during the initial phase. Also remove the code changing
201 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
202 TARGET_WAITKIND_STOPPED.
204 2013-12-11 Yao Qi <yao@codesourcery.com>
206 * notif.c (handle_notif_ack): Return 0 if no notification
209 2013-11-20 Doug Evans <dje@google.com>
211 * linux-low.c (linux_set_resume_request): Fix comment.
213 2013-11-20 Doug Evans <dje@google.com>
215 * linux-low.c (resume_status_pending_p): Tweak comment.
217 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
219 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
220 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
221 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
222 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
223 (srv_amd64_regobj): Add amd64-mpx.o.
224 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
225 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
226 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
227 * i387-fp.c (num_pl_bnd_register) Added constant.
228 (num_pl_bnd_cfg_registers) Added constant.
229 (struct i387_xsave) Added reserved area and MPX fields.
230 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
231 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
233 (tdesc_i386_mpx_linux): Add MPX amd64 target.
234 (init_registers_amd64_mpx_linux): Declare new function.
235 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
236 (x86_64_regmap): Add MPX registers.
237 (x86_linux_read_description): Add MPX case.
238 (initialize_low_arch): Initialize MPX targets.
240 2013-11-18 Tom Tromey <tromey@redhat.com>
242 * configure: Rebuild.
243 * configure.ac: Don't check for stdlib.h.
244 * gdbreplay.c: Unconditionally include stdlib.h.
246 2013-11-18 Tom Tromey <tromey@redhat.com>
248 * config.in: Rebuild.
249 * configure: Rebuild.
250 * configure.ac: Don't use AC_HEADER_DIRENT.
252 2013-11-18 Tom Tromey <tromey@redhat.com>
254 * server.h: Don't check HAVE_STRING_H.
255 * gdbreplay.c: Don't check HAVE_STRING_H.
256 * configure: Rebuild.
258 2013-11-18 Tom Tromey <tromey@redhat.com>
260 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
263 2013-11-08 Tom Tromey <tromey@redhat.com>
265 * configure, config.in: Rebuild.
266 * configure.ac: Remove unused configury.
268 2013-11-08 Tom Tromey <tromey@redhat.com>
270 * acinclude.m4: Include common.m4, codeset.m4.
271 * configure, config.in: Rebuild.
272 * configure.ac: Use GDB_AC_COMMON.
274 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
276 * linux-s390-low.c (HWCAP_S390_TE): New define.
277 (s390_arch_setup): Consider the TE field in the HWCAP for
278 determining 'have_regset_tdb'.
280 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
283 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
286 2013-10-02 Pedro Alves <palves@redhat.com>
288 * server.c (process_serial_event): Don't output "GDBserver
289 exiting" if GDB is connected through stdio.
290 * target.c (mywait): Likewise, be silent if GDB is connected
293 2013-10-01 Joel Brobecker <brobecker@adacore.com>
295 * lynx-low.c (lynx_add_threads_after_attach): New function.
296 (lynx_attach): Remove call to add_thread. Add call to
297 lynx_add_threads_after_attach instead.
299 2013-09-28 Mike Frysinger <vapier@gentoo.org>
301 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
302 * config.in, configure: Regenerated.
304 2013-09-18 Yao Qi <yao@codesourcery.com>
307 * server.c (start_inferior): Clear 'resume_info'.
309 2013-09-16 Jiong Wang <jiwang@tilera.com>
311 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
314 2013-09-16 Jiong Wang <jiwang@tilera.com>
316 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
317 linux-tile-low.o to srv_tgtobj.
319 2013-09-16 Will Newton <will.newton@linaro.org>
321 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
324 2013-09-06 Pedro Alves <palves@redhat.com>
326 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
327 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
328 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
329 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
330 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
331 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
333 2013-09-06 Pedro Alves <palves@redhat.com>
335 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
336 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
338 2013-09-06 Pedro Alves <palves@redhat.com>
340 * linux-amd64-ipa.c: Include tracepoint.h.
341 * linux-i386-ipa.c: Include tracepoint.h.
343 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
345 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
346 (ps_get_thread_area): New function.
348 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
350 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
351 (initialize_low_arch): Call init_registers_crisv32 rather than
352 init_register_crisv32.
354 2013-09-05 Pedro Alves <palves@redhat.com>
356 * server.h (handle_vFile, hostio_last_error_from_errno): Move
358 * hostio.h: ... this new file.
359 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
360 win32-low.c: Include hostio.h.
362 2013-09-05 Pedro Alves <palves@redhat.com>
364 * server.h (gdb_client_data, handler_func, callback_handler_func)
365 (delete_file_handler, add_file_handler, append_callback_event)
366 (delete_callback_event, start_event_loop, initialize_event_loop):
367 Move to event-loop.h and include it.
368 * event-loop.h: New file.
370 2013-09-05 Pedro Alves <palves@redhat.com>
372 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
373 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
374 (loaded_dll, unloaded_dll): Move to ...
375 * dll.h: ... this new file.
376 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
378 2013-09-05 Pedro Alves <palves@redhat.com>
380 * server.h (current_process, get_thread_process, all_processes)
381 (add_inferior_to_list, for_each_inferior, current_inferior)
382 (remove_inferior, add_process, remove_process, find_process_pid)
383 (have_started_inferiors_p, have_attached_inferiors_p)
384 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
385 (clear_inferiors, find_inferior, find_inferior_id)
386 (inferior_target_data, set_inferior_target_data)
387 (inferior_regcache_data, set_inferior_regcache_data): Move to
388 inferiors.h, and include it.
389 * inferiors.h: New file.
391 2013-09-05 Pedro Alves <palves@redhat.com>
393 * server.h (struct emit_ops, current_insn_ptr, emit_error):
397 2013-09-05 Pedro Alves <palves@redhat.com>
399 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
401 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
402 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
403 (handle_tracepoint_general_set, handle_tracepoint_query)
404 (tracepoint_finished_step, tracepoint_was_hit)
405 (release_while_stepping_state_list, current_traceframe)
406 (in_readonly_region, traceframe_read_mem)
407 (fetch_traceframe_registers, traceframe_read_sdata)
408 (traceframe_read_info, struct fast_tpoint_collect_status)
409 (fast_tracepoint_collecting, force_unlock_trace_buffer)
410 (handle_tracepoit_bkpts, initialize_low_tracepoint)
411 (supply_fast_tracepoint_registers)
412 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
413 (ipa_tdesc, claim_trampoline_space)
414 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
415 (agent_mem_read, agent_get_trace_state_variable_value)
416 (agent_set_trace_state_variable_value, agent_tsv_read)
417 (agent_mem_read_string, get_raw_reg_func_addr)
418 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
419 * tracepoint.h: ... this new file.
421 2013-09-05 Pedro Alves <palves@redhat.com>
423 * server.h (perror_with_name, error, fatal, warning, paddress)
424 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
428 2013-09-05 Pedro Alves <palves@redhat.com>
430 * server.h (remote_debug, noack_mode, transport_is_reliable)
431 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
432 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
433 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
434 (write_enn, initialize_async_io, enable_async_io)
435 (disable_async_io, check_remote_input_interrupt_request)
436 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
437 (dead_thread_notify, prepare_resume_reply)
438 (decode_address_to_semicolon, decode_address, decode_m_packet)
439 (decode_M_packet, decode_X_packet, decode_xfer_write)
440 (decode_search_memory_packet, unhexify, hexify)
441 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
442 (look_up_one_symbol, relocate_instruction)
443 (monitor_output): Move to remote-utils.h, and include it.
444 * remote-utils.h: New file.
446 2013-09-05 Pedro Alves <palves@redhat.com>
448 * server.h (_): Delete.
450 2013-09-02 Pedro Alves <palves@redhat.com>
452 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
453 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
455 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
457 2013-09-02 Pierre Muller <muller@sourceware.org>
459 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
460 or WriteProcessMemory complete successfully and handle
461 ERROR_PARTIAL_COPY error.
463 2013-09-02 Pedro Alves <palves@redhat.com>
465 * server.c (gdb_read_memory): Return -1 on traceframe memory read
466 error instead of EIO.
468 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
471 * linux-low.c: Include filestuff.h.
472 (linux_create_inferior) <pid == 0>: Call close_most_fds.
473 * lynx-low.c: Include filestuff.h.
474 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
475 * server.c: Include filestuff.h.
476 (main): Call notice_open_fds.
477 * spu-low.c: Include filestuff.h.
478 (spu_create_inferior) <pid == 0>: Call close_most_fds.
480 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
482 * Makefile.in: Explain why ../target and ../nat are not
483 listed as include file search paths.
484 (linux-waitpid.o): New object file rule.
485 * configure.srv (srv_native_linux_obj): New variable.
486 Replace all occurrences of linux native object files with
487 $srv_native_linux_obj.
488 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
489 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
490 (linux_enable_event_reporting): Remove declaration.
491 (my_waitpid): Moved to common/linux-waitpid.c.
492 (linux_wait_for_event): Pass ptid when calling
493 linux_enable_event_reporting.
494 (linux_supports_tracefork_flag): Remove.
495 (linux_enable_event_reporting): Likewise.
496 (linux_tracefork_grandchild): Remove.
497 (STACK_SIZE): Moved to common/linux-ptrace.c.
498 (linux_tracefork_child): Remove.
499 (linux_test_for_tracefork): Remove.
500 (linux_look_up_symbols): Call linux_supports_traceclone.
501 (initialize_low): Remove call to linux_test_for_tracefork.
502 * linux-low.h (PTRACE_TYPE_ARG3): Move to
503 common/linux-ptrace.h.
504 (PTRACE_TYPE_ARG4): Likewise.
505 Include linux-ptrace.h.
507 2013-08-21 Pedro Alves <palves@redhat.com>
509 * config.in: Renegerate.
511 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
513 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
514 (SFILES): Remove $(srcdir)/common/target-common.c and
515 add $(srcdir)/target/waitstatus.c.
516 (OBS): Remove target-common.o and add waitstatus.o.
517 (server_h): Remove $(srcdir)/../common/target-common.h and
518 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
519 and $(srcdir)/../target/waitstatus.h.
520 (target-common.o): Remove.
521 (waitstatus.o): New target object file.
522 * target.h: Do not include target-common.h and
523 include target/resume.h, target/wait.h and
526 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
528 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
530 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
531 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
533 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
534 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
536 2013-07-27 Jie Zhang <jie@codesourcery.com>
537 Daniel Jacobowitz <dan@codesourcery.com>
538 Yao Qi <yao@codesourcery.com>
540 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
541 (mips-linux-watch.o): New rule.
542 (mips_linux_watch_h): New variable.
543 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
545 * linux-mips-low.c: Include mips-linux-watch.h.
546 (struct arch_process_info, struct arch_lwp_info): New.
547 (update_watch_registers_callback): New function.
548 (mips_linux_new_process, mips_linux_new_thread) New functions.
549 (mips_linux_prepare_to_resume, mips_insert_point): New
551 (mips_remove_point, mips_stopped_by_watchpoint): New
553 (rsp_bp_type_to_target_hw_bp_type): New function.
554 (mips_stopped_data_address): New function.
555 (the_low_target): Add watchpoint support functions.
557 2013-07-27 Yao Qi <yao@codesourcery.com>
559 * i386-low.c: Include break-common.h.
560 (enum target_hw_bp_type): Remove.
562 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
564 * Makefile.in (SFILES): /common/target-common.c.
565 (OBS): Add target-common.o.
566 (server_h): Add $(srcdir)/../common/target-common.h.
567 (target-common.o): New target.
568 * server.c (queue_stop_reply_callback): Free
569 status string after use.
570 * target.c (target_waitstatus_to_string): Remove.
571 * target.h: Include target-common.h.
572 (resume_kind): Likewise.
573 (target_waitkind): Likewise.
574 (target_waitstatus): Likewise.
575 (TARGET_WNOHANG): Likewise.
577 2013-07-04 Yao Qi <yao@codesourcery.com>
579 * Makefile.in (host_alias): Use @host_noncanonical@.
580 (target_alias): Use @target_noncanonical@.
581 * configure.ac: Use ACX_NONCANONICAL_TARGET and
582 ACX_NONCANONICAL_HOST.
583 * configure: Regenerated.
586 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
588 * configure.ac (version_host, version_target): Set and AC_SUBST them.
589 * configure: Rebuild.
590 * Makefile.in (version_host, version_target): Get from configure.
591 (version.c): Use $(version_host) and $(version_target).
593 2013-07-03 Pedro Alves <palves@redhat.com>
595 * Makefile.in (config.status): Depend on development.sh.
596 * acinclude.m4: Include libmcheck.m4.
597 * configure: Regenerate.
599 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
601 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
602 attribute inside the parentheses.
603 (winapi_DebugSetProcessKillOnExit): Ditto.
604 (winapi_DebugBreakProcess): Ditto.
605 (winapi_GenerateConsoleCtrlEvent): Ditto.
607 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
609 * notif.h (notif_event): Add a dummy member to avoid compiler
612 2013-07-01 Pedro Alves <palves@redhat.com>
614 * hostio.c (HOSTIO_PATH_MAX): Define.
615 (require_filename, handle_open, handle_unlink, handle_readlink):
618 2013-07-01 Pedro Alves <palves@redhat.com>
620 * server.h: Include "pathmax.h".
621 * linux-low.c: Don't include sys/param.h.
622 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
624 * win32-low.c: Don't include sys/param.h.
625 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
627 2013-07-01 Pedro Alves <palves@redhat.com>
629 * event-loop.c: Don't check HAVE_UNISTD_H before including
631 * gdbreplay.c: Likewise.
632 * remote-utils.c: Likewise.
633 * server.c: Likewise.
634 * configure.ac: Don't check for unistd.h.
635 * configure: Regenerate.
637 2013-06-28 Tom Tromey <tromey@redhat.com>
639 * Makefile.in (version.c): Use version.in, not
642 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
644 * configure.ac (version_host, version_target): Set and AC_SUBST them.
645 * configure: Rebuild.
646 * Makefile.in (version_host, version_target): Get from configure.
647 (version.c): Use $(version_host) and $(version_target).
649 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
651 Fix trace-status to output user name without trailing colon.
652 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
654 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
656 Fix trace-status to output proper start-time and stop-time.
657 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
658 output start time and stop time in hex as gdb expects.
660 2013-06-26 Pedro Alves <pedro@codesourcery.com>
662 * tracepoint.c (build_traceframe_info_xml): Output trace state
663 variables present in the trace buffer.
665 2013-06-24 Tom Tromey <tromey@redhat.com>
667 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
670 * gdbreplay.c: Include version.h.
671 (version, host_name): Don't declare.
672 * server.h: Include version.h.
673 (version, host_name): Don't declare.
675 2013-06-12 Pedro Alves <palves@redhat.com>
677 * linux-x86-low.c (linux_is_elf64): Delete global.
678 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
679 with local linux_pid_exe_is_elf_64_file use.
681 2013-06-11 Pedro Alves <palves@redhat.com>
683 * linux-low.c (regset_disabled, disable_regset): New functions.
684 (regsets_fetch_inferior_registers)
685 (regsets_store_inferior_registers): Use them.
686 (initialize_regsets_info); Don't allocate the disabled_regsets
688 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
691 2013-06-11 Pedro Alves <palves@redhat.com>
693 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
696 2013-06-11 Pedro Alves <palves@redhat.com>
698 * linux-x86-low.c (initialize_low_arch): Call
699 init_registers_x32_avx_linux.
701 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
703 Fix compatibility with Android Bionic.
704 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
707 2013-06-07 Pedro Alves <palves@redhat.com>
710 * Makefile.in (OBS): Add tdesc.o.
711 (IPA_OBJS): Add tdesc-ipa.o.
712 (tdesc-ipa.o): New rule.
713 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
715 * linux-low.c (new_inferior): Delete.
716 (disabled_regsets, num_regsets): Delete.
717 (linux_add_process): Adjust to set the new per-process
719 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
720 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
721 was a stop. When calling arch_setup, switch the current inferior
722 to the thread that got an event.
723 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
724 (regsets_fetch_inferior_registers)
725 (regsets_store_inferior_registers): New regsets_info parameter.
727 (linux_register_in_regsets): New regs_info parameter. Adjust to
729 (register_addr, fetch_register, store_register): New usrregs_info
730 parameter. Adjust to use it.
731 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
732 parameter regs_info. Adjust to use it.
733 (linux_fetch_registers): Get the current inferior's regs_info, and
735 (linux_store_registers): Ditto.
736 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
737 (initialize_low): Don't initialize the target_regsets here. Call
739 * linux-low.h (target_regsets): Delete declaration.
740 (struct regsets_info): New.
741 (struct usrregs_info): New.
742 (struct regs_info): New.
743 (struct process_info_private) <new_inferior>: New field.
744 (struct linux_target_ops): Delete the num_regs, regmap, and
745 regset_bitmap fields. New field regs_info.
746 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
747 * i387-fp.c (num_xmm_registers): Delete.
748 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
749 calls to new interface.
750 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
751 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
752 Infer the number of xmm registers from the regcache's target
754 * i387-fp.h (num_xmm_registers): Delete.
755 * inferiors.c (add_thread): Don't install the thread's regcache
757 * proc-service.c (gregset_info): Fetch the current inferior's
758 regs_info. Adjust to use it.
759 * regcache.c: Include tdesc.h.
760 (register_bytes, reg_defs, num_registers)
761 (gdbserver_expedite_regs): Delete.
762 (get_thread_regcache): If the thread doesn't have a regcache yet,
763 create one, instead of aborting gdbserver.
764 (regcache_invalidate_one): Rename to ...
765 (regcache_invalidate_thread): ... this.
766 (regcache_invalidate_one): New.
767 (regcache_invalidate): Only invalidate registers of the current
769 (init_register_cache): Add target_desc parameter, and use it.
770 (new_register_cache): Ditto. Assert the target description has a
771 non zero registers_size.
772 (regcache_cpy): Add assertions. Adjust.
773 (realloc_register_cache, set_register_cache): Delete.
774 (registers_to_string, registers_from_string): Adjust.
775 (find_register_by_name, find_regno, find_register_by_number)
776 (register_cache_size): Add target_desc parameter, and use it.
777 (free_register_cache_thread, free_register_cache_thread_one)
778 (regcache_release, register_cache_size): New.
779 (register_size): Add target_desc parameter, and use it.
780 (register_data, supply_register, supply_register_zeroed)
781 (supply_regblock, supply_register_by_name, collect_register)
782 (collect_register_as_string, collect_register_by_name): Adjust.
783 * regcache.h (struct target_desc): Forward declare.
784 (struct regcache) <tdesc>: New field.
785 (init_register_cache, new_register_cache): Add target_desc
787 (regcache_invalidate_thread): Declare.
788 (regcache_invalidate_one): Delete declaration.
789 (regcache_release): Declare.
790 (find_register_by_number, register_cache_size, register_size)
791 (find_regno): Add target_desc parameter.
792 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
794 * remote-utils.c: Include tdesc.h.
795 (outreg, prepare_resume_reply): Adjust.
796 * server.c: Include tdesc.h.
797 (gdbserver_xmltarget): Delete declaration.
798 (get_features_xml, process_serial_event): Adjust.
799 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
801 (struct process_info) <tdesc>: New field.
802 (ipa_tdesc): Declare.
805 * tracepoint.c: Include tdesc.h.
806 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
807 (get_context_regcache): Adjust to pass ipa_tdesc down.
808 (do_action_at_tracepoint): Adjust to get the register cache size
809 from the context regcache's description.
810 (traceframe_walk_blocks): Adjust to get the register cache size
811 from the current trace frame's description.
812 (traceframe_get_pc): Adjust to get current trace frame's
813 description and pass it down.
814 (gdb_collect): Adjust to get the register cache size from the
816 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
817 (gdbserver_xmltarget): Delete.
818 (initialize_low_tracepoint): Set the ipa's target description.
819 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
820 (initialize_low_tracepoint): Set the ipa's target description.
821 * linux-x86-low.c: Include tdesc.h.
822 [__x86_64__] (is_64bit_tdesc): New.
823 (ps_get_thread_area, x86_get_thread_area): Use it.
824 (i386_cannot_store_register): Rename to ...
825 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
826 (i386_cannot_fetch_register): Rename to ...
827 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
828 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
830 (target_regsets): Rename to ...
831 (x86_regsets): ... this.
832 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
834 (x86_siginfo_fixup): Use is_64bit_tdesc.
835 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
836 (tdesc_x32_avx_linux, tdesc_x32_linux)
837 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
839 (x86_linux_update_xmltarget): Delete.
840 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
841 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
842 (AMD64_LINUX_USER64_CS): New.
843 (x86_linux_read_description): New, based on
844 x86_linux_update_xmltarget.
845 (same_process_callback): New.
846 (x86_arch_setup_process_callback): New.
847 (x86_linux_update_xmltarget): New.
848 (x86_regsets_info): New.
849 (amd64_linux_regs_info): New.
850 (i386_linux_usrregs_info): New.
851 (i386_linux_regs_info): New.
852 (x86_linux_regs_info): New.
853 (x86_arch_setup): Reimplement.
854 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
855 (x86_emit_ops): Ditto.
856 (the_low_target): Adjust. Install x86_linux_regs_info,
857 x86_cannot_fetch_register, and x86_cannot_store_register.
858 (initialize_low_arch): New.
859 * linux-ia64-low.c (tdesc_ia64): Declare.
860 (ia64_fetch_register): Adjust.
861 (ia64_usrregs_info, regs_info): New globals.
862 (ia64_regs_info): New function.
863 (the_low_target): Adjust.
864 (initialize_low_arch): New function.
865 * linux-sparc-low.c (tdesc_sparc64): Declare.
866 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
868 (sparc_arch_setup): New function.
869 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
870 (the_low_target): Adjust.
871 (initialize_low_arch): New function.
872 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
873 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
874 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
875 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
876 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
877 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
878 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
879 (tdesc_powerpc_isa205_vsx64l): Declare.
880 (ppc_cannot_store_register, ppc_collect_ptrace_register)
881 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
882 (ppc_set_pc, ppc_get_hwcap): Adjust.
883 (ppc_usrregs_info): Forward declare.
884 (!__powerpc64__) ppc_regmap_adjusted: New global.
885 (ppc_arch_setup): Adjust to the current process'es target
887 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
888 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
889 (ppc_store_evrregset): Adjust.
890 (target_regsets): Rename to ...
891 (ppc_regsets): ... this, and make static.
892 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
893 (ppc_regs_info): New function.
894 (the_low_target): Adjust.
895 (initialize_low_arch): New function.
896 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
897 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
898 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
899 (tdesc_s390x_linux64v2): Declare.
900 (s390_collect_ptrace_register, s390_supply_ptrace_register)
901 (s390_fill_gregset, s390_store_last_break): Adjust.
902 (target_regsets): Rename to ...
903 (s390_regsets): ... this, and make static.
904 (s390_get_pc, s390_set_pc): Adjust.
905 (s390_get_hwcap): New target_desc parameter, and use it.
906 [__s390x__] (have_hwcap_s390_high_gprs): New global.
907 (s390_arch_setup): Adjust to set the current process'es target
908 description. Don't adjust the regmap.
909 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
910 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
911 (regs_info_3264): New globals.
912 (s390_regs_info): New function.
913 (the_low_target): Adjust.
914 (initialize_low_arch): New function.
915 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
916 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
917 [__mips64] (init_registers_mips_linux)
918 (init_registers_mips_dsp_linux): Delete defines.
919 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
920 (have_dsp): New global.
921 (mips_read_description): New, based on mips_arch_setup.
922 (mips_arch_setup): Reimplement.
923 (get_usrregs_info): New function.
924 (mips_cannot_fetch_register, mips_cannot_store_register)
925 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
926 (mips_fill_fpregset, mips_store_fpregset): Adjust.
927 (target_regsets): Rename to ...
928 (mips_regsets): ... this, and make static.
929 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
930 (dsp_regs_info, regs_info): New globals.
931 (mips_regs_info): New function.
932 (the_low_target): Adjust.
933 (initialize_low_arch): New function.
934 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
935 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
937 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
938 (arm_read_description): New, with bits factored from
940 (arm_arch_setup): Reimplement.
941 (target_regsets): Rename to ...
942 (arm_regsets): ... this, and make static.
943 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
944 (arm_regs_info): New function.
945 (the_low_target): Adjust.
946 (initialize_low_arch): New function.
947 * linux-m68k-low.c (tdesc_m68k): Declare.
948 (target_regsets): Rename to ...
949 (m68k_regsets): ... this, and make static.
950 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
951 (m68k_regs_info): New function.
952 (m68k_arch_setup): New function.
953 (the_low_target): Adjust.
954 (initialize_low_arch): New function.
955 * linux-sh-low.c (tdesc_sharch): Declare.
956 (target_regsets): Rename to ...
957 (sh_regsets): ... this, and make static.
958 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
959 (sh_regs_info, sh_arch_setup): New functions.
960 (the_low_target): Adjust.
961 (initialize_low_arch): New function.
962 * linux-bfin-low.c (tdesc_bfin): Declare.
963 (bfin_arch_setup): New function.
964 (bfin_usrregs_info, regs_info): New globals.
965 (bfin_regs_info): New function.
966 (the_low_target): Adjust.
967 (initialize_low_arch): New function.
968 * linux-cris-low.c (tdesc_cris): Declare.
969 (cris_arch_setup): New function.
970 (cris_usrregs_info, regs_info): New globals.
971 (cris_regs_info): New function.
972 (the_low_target): Adjust.
973 (initialize_low_arch): New function.
974 * linux-cris-low.c (tdesc_crisv32): Declare.
975 (cris_arch_setup): New function.
976 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
977 (cris_regs_info): New function.
978 (the_low_target): Adjust.
979 (initialize_low_arch): New function.
980 * linux-m32r-low.c (tdesc_m32r): Declare.
981 (m32r_arch_setup): New function.
982 (m32r_usrregs_info, regs_info): New globals.
983 (m32r_regs_info): Adjust.
984 (initialize_low_arch): New function.
985 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
986 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
987 (tic6x_usrregs_info): Forward declare.
988 (tic6x_read_description): New function, based on ...
989 (tic6x_arch_setup): ... this. Reimplement.
990 (target_regsets): Rename to ...
991 (tic6x_regsets): ... this, and make static.
992 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
993 (tic6x_regs_info): New function.
994 (the_low_target): Adjust.
995 (initialize_low_arch): New function.
996 * linux-xtensa-low.c (tdesc_xtensa): Declare.
997 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
998 (target_regsets): Rename to ...
999 (xtensa_regsets): ... this, and make static.
1000 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1002 (xtensa_arch_setup, xtensa_regs_info): New functions.
1003 (the_low_target): Adjust.
1004 (initialize_low_arch): New function.
1005 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1006 (nios2_arch_setup): Set the current process'es tdesc.
1007 (target_regsets): Rename to ...
1008 (nios2_regsets): ... this.
1009 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1010 (nios2_regs_info): New function.
1011 (the_low_target): Adjust.
1012 (initialize_low_arch): New function.
1013 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1014 (aarch64_arch_setup): Set the current process'es tdesc.
1015 (target_regsets): Rename to ...
1016 (aarch64_regsets): ... this.
1017 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1018 (aarch64_regs_info): New function.
1019 (the_low_target): Adjust.
1020 (initialize_low_arch): New function.
1021 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1023 (target_regsets): Rename to ...
1024 (tile_regsets): ... this.
1025 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1026 (tile_regs_info): New function.
1027 (tile_arch_setup): Set the current process'es tdesc.
1028 (the_low_target): Adjust.
1029 (initialize_low_arch): New function.
1030 * spu-low.c (tdesc_spu): Declare.
1031 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1032 * win32-arm-low.c (tdesc_arm): Declare.
1033 (arm_arch_setup): New function.
1034 (the_low_target): Install arm_arch_setup instead of
1036 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1037 (init_windows_x86): Rename to ...
1038 (i386_arch_setup): ... this. Set `win32_tdesc'.
1039 (the_low_target): Adjust.
1040 * win32-low.c (win32_tdesc): New global.
1041 (child_add_thread): Don't create the thread cache here.
1042 (do_initial_child_stuff): Set the new process'es tdesc.
1043 * win32-low.h (struct target_desc): Forward declare.
1044 (win32_tdesc): Declare.
1045 * lynx-i386-low.c (tdesc_i386): Declare global.
1046 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1047 * lynx-low.c (lynx_tdesc): New global.
1048 (lynx_add_process): Set the new process'es tdesc.
1049 * lynx-low.h (struct target_desc): Forward declare.
1050 (lynx_tdesc): Declare global.
1051 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1052 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1053 * nto-low.c (nto_tdesc): New global.
1054 (do_attach): Set the new process'es tdesc.
1055 * nto-low.h (struct target_desc): Forward declare.
1056 (nto_tdesc): Declare.
1057 * nto-x86-low.c (tdesc_i386): Declare.
1058 (nto_x86_arch_setup): Set `nto_tdesc'.
1060 2013-06-04 Gary Benson <gbenson@redhat.com>
1062 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1063 to qSupported response when appropriate.
1064 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1065 with nonzero-length annex.
1066 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1067 arguments supplied in annex.
1069 2013-05-31 Doug Evans <dje@google.com>
1072 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1073 64 bits in 64-cross-32 environment.
1075 2013-05-28 Pedro Alves <palves@redhat.com>
1077 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1078 (aarch64-without-fpu.c): Delete rule.
1079 * configure.srv (aarch64*-*-linux*): Remove references to
1080 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1081 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1084 2013-05-24 Pedro Alves <palves@redhat.com>
1086 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1087 instead of strchr/decode_address. Error if the range isn't split
1088 with a ','. Don't assume there's be a ':' in the action.
1090 2013-05-23 Yao Qi <yao@codesourcery.com>
1091 Pedro Alves <palves@redhat.com>
1093 * linux-low.c (lwp_in_step_range): New function.
1094 (linux_wait_1): If the thread was range stepping and stopped
1095 outside the stepping range, report the stop to GDB. Otherwise,
1096 continue stepping. Add range stepping debug output.
1097 (linux_set_resume_request): Copy the step range from the resume
1099 (linux_supports_range_stepping): New.
1100 (linux_target_ops) <supports_range_stepping>: Set to
1101 linux_supports_range_stepping.
1102 * linux-low.h (struct linux_target_ops)
1103 <supports_range_stepping>: New field.
1104 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1105 * linux-x86-low.c (x86_supports_range_stepping): New.
1106 (the_low_target) <supports_range_stepping>: Set to
1107 x86_supports_range_stepping.
1108 * server.c (handle_v_cont): Handle 'r' action.
1109 (handle_v_requests): Append ";r" if the target supports range
1111 * target.h (struct thread_resume) <step_range_start,
1112 step_range_end>: New fields.
1113 (struct target_ops) <supports_range_stepping>:
1115 (target_supports_range_stepping): New macro.
1117 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1119 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1120 confusion in comment.
1122 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1124 * lynx-low.c (struct process_info_private): New type.
1125 (lynx_add_process): New function.
1126 (lynx_create_inferior, lynx_attach): Replace calls to
1127 add_process by calls to lynx_add_process.
1128 (lynx_resume): If PTID is null, then try using
1129 current_process()->private->last_wait_event_ptid.
1131 (lynx_clear_inferiors): Delete. The contents of that function
1132 has been inlined in lynx_mourn;
1133 (lynx_wait_1): Save the ptid in the process's private data.
1134 (lynx_mourn): Free the process' private data. Replace call
1135 to lynx_clear_inferiors by call to clear_inferiors.
1137 2013-05-17 Yao Qi <yao@codesourcery.com>
1139 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1142 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1144 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1145 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1146 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1147 PT_TEXT_END_ADDR guards. Update comments.
1148 (linux_target_op) <read_offsets>: Conditionally define to
1149 linux_read_offsets if the target is UCLIBC and if it defines
1150 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1152 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1153 Andrew Jenner <andrew@codesourcery.com>
1155 * Makefile.in (SFILES): Add linux-nios2-low.c.
1156 (clean): Add action to delete nios2-linux.c.
1157 (nios2-linux.c): New rule.
1158 * configure.srv: Add nios2*-*-linux*.
1159 * linux-nios2-low.c: New.
1161 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1163 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1165 2013-04-25 Hui Zhu <hui@codesourcery.com>
1168 * ax.c (ax_printf): Add fflush.
1170 2013-04-22 Tom Tromey <tromey@redhat.com>
1172 * Makefile.in (SFILES): Add filestuff.c.
1173 (OBS): Add filestuff.o.
1174 (filestuff.o): New target.
1175 * config.in, configure: Rebuild.
1176 * configure.ac: Check for fdwalk, pipe2.
1178 2013-04-17 Pedro Alves <palves@redhat.com>
1180 * configure.ac (USE_THREAD_DB): Delete variable.
1181 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1182 Don't AC_SUBST USE_THREAD_DB.
1183 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1184 * config.in, configure: Regenerate.
1186 2013-04-16 Pedro Alves <palves@redhat.com>
1188 * linux-low.h (struct lwp_info) <thread_known>: Move under
1189 the USE_THREAD_DB #ifdef.
1191 2013-04-16 Pedro Alves <palves@redhat.com>
1193 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1194 (linux-low.o): Delete rule.
1195 * linux-low.h: Always include "gdb_thread_db.h" instead of
1196 conditionally including thread_db.h.
1197 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1200 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1202 * Makefile.in (install-only): Fix make install regression.
1204 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1206 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1207 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1209 * gdbserver.1: Remove.
1211 2013-03-22 Pedro Alves <palves@redhat.com>
1213 * linux-low.c (handle_extended_wait): Don't call
1214 linux_enable_event_reporting.
1216 2013-03-15 Tony Theodore <tonyt@logyst.com>
1219 * Makefile.in (SHELL): Use @SHELL@.
1221 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1223 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1226 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1228 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1229 Remove extraneous NULL element.
1231 2013-03-13 Yao Qi <yao@codesourcery.com>
1233 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1234 'V' block in trace frame.
1236 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1238 * target.h (struct target_ops): Add btrace ops.
1239 (target_supports_btrace): New macro.
1240 (target_enable_btrace): New macro.
1241 (target_disable_btrace): New macro.
1242 (target_read_btrace): New macro.
1243 * gdbthread.h (struct thread_info): Add btrace field.
1244 * server.c: Include btrace-common.h.
1245 (handle_btrace_general_set): New function.
1246 (handle_btrace_enable): New function.
1247 (handle_btrace_disable): New function.
1248 (handle_general_set): Call handle_btrace_general_set.
1249 (handle_qxfer_btrace): New function.
1250 (struct qxfer qxfer_packets[]): Add btrace entry.
1251 * inferiors.c (remove_thread): Disable btrace.
1252 * linux-low: Include linux-btrace.h.
1253 (linux_low_enable_btrace): New function.
1254 (linux_low_read_btrace): New function.
1255 (linux_target_ops): Add btrace ops.
1256 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1257 Add srv_linux_btrace=yes.
1258 (x86_64-*-linux*): Add linux-btrace.o.
1259 Add srv_linux_btrace=yes.
1260 * configure.ac: Define HAVE_LINUX_BTRACE.
1261 * config.in: Regenerated.
1262 * configure: Regenerated.
1264 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1266 * server.c (handle_qxfer): Preserve error message if -3 is
1268 (qxfer): Document the -3 return value.
1270 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1272 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1273 (linux_btrace_h): New variable.
1274 (linux-btrace.o): New rule.
1276 2013-03-08 Stan Shebs <stan@codesourcery.com>
1277 Hafiz Abid Qadeer <abidh@codesourcery.com>
1279 * tracepoint.c (trace_buffer_size): New global.
1280 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1281 (init_trace_buffer): Change to one-argument function. Allocate
1282 trace buffer memory.
1283 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1284 handle QTBuffer:size packet.
1285 (cmd_bigqtbuffer_size): New function.
1286 (initialize_tracepoint): Call init_trace_buffer with
1287 DEFAULT_TRACE_BUFFER_SIZE.
1288 * server.c (handle_query): Add QTBuffer:size in the
1291 2013-03-07 Yao Qi <yao@codesourcery.com>
1293 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1294 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1296 (cmd_qtsp): Adjust condition. Do post increment.
1297 Set cur_action and cur_step_action back to 0.
1299 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1302 * linux-low.c (linux_write_memory): Return early success if LEN is
1305 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1307 * configure.srv: Add x86_64-*-cygwin* as target.
1309 2013-02-28 Tom Tromey <tromey@redhat.com>
1311 * configure.ac: Invoke AC_SYS_LARGEFILE.
1312 * configure, config.in: Rebuild.
1314 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1316 * win32-low.c: Throughout, fix format strings and casts of
1317 printf-like functions to avoid type related warnings on all
1319 (get_child_debug_event): Print dwDebugEventCode as hex since
1320 that's how it's usually documented.
1322 2013-02-28 Yao Qi <yao@codesourcery.com>
1324 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1327 2013-02-27 Jiong Wang <jiwang@tilera.com>
1329 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1330 (reg-tilegx32.c): New rule.
1331 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1332 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1333 different register info initializer according to elf class.
1334 (init_registers_tilgx32): New function. The tilegx32 register info
1336 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1337 (tile_store_gregset): Likewise.
1339 2013-02-27 Yao Qi <yao@codesourcery.com>
1341 * server.c (process_point_options): Print debug message when
1342 debug_threads is true.
1344 2013-02-26 Yao Qi <yao@codesourcery.com>
1346 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1348 2013-02-19 Pedro Alves <palves@redhat.com>
1349 Kai Tietz <ktietz@redhat.com>
1353 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1354 instead of strtoul to extract address from packet.
1355 (process_serial_event) <'z'>: Likewise.
1357 2013-02-18 Yao Qi <yao@codesourcery.com>
1359 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1361 2013-02-14 Pedro Alves <palves@redhat.com>
1365 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1366 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1368 2013-02-14 Pedro Alves <palves@redhat.com>
1370 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1372 2013-02-14 Pedro Alves <palves@redhat.com>
1374 * tracepoint.c (save_string): Delete.
1375 (add_tracepoint_action): Use savestring instead of save_string.
1377 2013-02-12 Pedro Alves <palves@redhat.com>
1379 * linux-xtensa-low.c: Ditto.
1380 * xtensa-xtregs.c: Ditto.
1382 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1384 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1387 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1389 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1390 aarch64_num_wp_regs and aarch64_num_bp_regs to
1391 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1393 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1395 * linux-aarch64-low.c (ps_get_thread_area): Replace
1396 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1398 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1399 Marcus Shawcroft <marcus.shawcroft@arm.com>
1400 Nigel Stephens <nigel.stephens@arm.com>
1401 Yufeng Zhang <yufeng.zhang@arm.com>
1403 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1404 (aarch64.c, aarch64-without-fpu.c): New targets.
1405 * configure.srv (aarch64*-*-linux*): New.
1406 * linux-aarch64-low.c: New file.
1408 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1410 * linux-low.c (handle_extended_wait, linux_create_inferior)
1411 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1412 (dequeue_one_deferred_signal, linux_resume_one_thread)
1413 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1414 (linux_tracefork_grandchild, linux_test_for_tracefork)
1415 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1416 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1417 where the argument is 0.
1419 2013-01-25 Yao Qi <yao@codesourcery.com>
1421 * event-loop.c: Include "queue.h".
1422 (gdb_event_p): New typedef.
1423 (struct gdb_event) <next_event>: Remove.
1424 (event_queue): Change to QUEUE(gdb_event_p).
1425 (async_queue_event): Remove.
1426 (gdb_event_xfree): New.
1427 (initialize_event_loop): New.
1428 (process_event): Use API from QUEUE.
1429 (wait_for_event): Likewise.
1430 * server.c (main): Call initialize_event_loop.
1431 * server.h (initialize_event_loop): Declare.
1433 2013-01-18 Yao Qi <yao@codesourcery.com>
1435 * ax.h (struct eval_agent_expr_context): New.
1436 (gdb_eval_agent_expr): Update declaration.
1437 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1438 TFRAME. Add new argument CTX.
1439 * server.h (struct eval_agent_expr_context): Declare.
1440 (agent_mem_read, agent_tsv_read): Update declaration.
1441 (agent_mem_read_string): Likewise.
1442 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1443 (add_traceframe_block): Add new argument TPOINT.
1444 Increase TPOINT->traceframe_usage.
1445 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1446 eval_tracepoint_agent_expr.
1447 (condition_true_at_tracepoint): Likewise.
1448 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1449 (agent_mem_read_string, agent_tsv_read): Likewise.
1451 2013-01-16 Yao Qi <yao@codesourcery.com>
1453 * linux-low.c (linux_resume_one_lwp): Don't check
1454 'lwp->bp_reinsert != 0'.
1456 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1457 Pedro Alves <palves@redhat.com>
1459 * lynx-low.c (ptrace_request_to_str): Define a temporary
1460 macro and use it to simplify this function's implementation.
1462 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1464 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1467 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1469 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1471 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1473 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1475 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1477 * lynx-low.c (lynx_resume): Use the resume_info parameter
1478 to determine the ptid for the lynx_ptrace call, unless
1479 it is equal to minus_one_ptid, in which case we use the
1480 ptid of the current_inferior.
1481 (lynx_wait_1): After having received a thread create/exit
1482 event, resume the inferior's execution using the signaling
1483 thread's ptid, rather than the old ptid.
1485 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1487 * lynx-low.c (lynx_resume): Delete variable ret.
1489 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1491 * gdbreplay.c (gdbreplay_version): Update copyright year.
1492 * server.c (gdbserver_version): Likewise.
1494 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1496 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1499 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1501 * lynx-low.c (ptrace_request_to_str): Add handling for
1504 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1506 * lynx-low.c (lynx_attach): Delete variable new_process.
1508 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1510 * lynx-low.c (lynx_create_inferior): Delete variable
1513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1515 * lynx-low.c (ptrace_request_to_str): Do not handle
1516 PTRACE_GETTHREADLIST if this macro does not exist.
1518 2012-12-15 Yao Qi <yao@codesourcery.com>
1520 * Makefile.in (OBS): Add notif.o.
1521 * notif.c, notif.h: New.
1522 * server.c: Include "notif.h".
1523 (struct vstop_notif) <next>: Remove.
1525 (queue_stop_reply): Update.
1526 (push_event, send_next_stop_reply): Remove.
1527 (discard_queued_stop_replies): Update.
1528 (notif_stop): New variable.
1529 (handle_v_stopped): Remove.
1530 (handle_v_requests): Don't call handle_v_stopped. Call
1531 handle_ack_notif instead.
1532 (queue_stop_reply_callback): Call notif_event_enque instead
1533 of queue_stop_reply.
1534 (handle_status): Don't call send_next_stop_reply, call
1535 notif_write_event instead.
1536 (kill_inferior_callback): Likewise.
1537 (detach_or_kill_inferior_callback): Likewise.
1538 (main): Call initialize_notif.
1539 (process_serial_event): Call QUEUE_is_empty.
1540 (handle_target_event): Call notif_push instead of push event.
1541 * server.h (push_event): Remove declaration.
1543 2012-12-10 Tom Tromey <tromey@redhat.com>
1545 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1546 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1549 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1550 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1551 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1552 (amd64-linux-ipa.o, ax.o): Rewrite.
1553 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1554 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1555 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1556 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1557 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1558 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1559 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1560 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1561 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1562 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1563 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1564 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1565 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1566 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1567 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1568 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1569 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1570 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1571 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1572 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1573 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1574 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1575 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1576 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1577 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1578 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1579 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1580 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1581 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1582 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1583 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1584 (reg-tilegx.o): Remove.
1585 (all_object_files): New macro.
1586 Include .deps files.
1587 * aclocal.m4, configure: Rebuild.
1588 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1589 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1590 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1592 2012-12-05 Tom Tromey <tromey@redhat.com>
1595 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1597 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1599 * configure.ac: Check for linux/perf_event.h.
1600 * config.in: Regenerated.
1601 * configure: Regenerated.
1603 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1605 * hostio.c (handle_readlink): Decrease buffer size
1606 parameter passed to readlink by one byte.
1608 2012-11-26 Yao Qi <yao@codesourcery.com>
1610 * configure.ac (build_warnings): Append '-Wempty-body'.
1611 * configure: Regenerated.
1612 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1615 2012-11-15 Pierre Muller <muller@sourceware.org>
1617 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1618 * config.in: Regenerate.
1619 * configure: Regenerate.
1620 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1621 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1622 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1623 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1625 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1626 instead of <sys/wait.h> header.
1627 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1629 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1631 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1632 (various make rules): Remove -DGDBSERVER
1634 2012-11-09 Yao Qi <yao@codesourcery.com>
1636 * spu-low.c (current_ptid): Move it to ..
1637 * gdbthread.h: ... here. New.
1638 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1639 * server.c (myresume, process_serial_event): Likewise.
1640 * thread-db.c (thread_db_find_new_threads): Likewise.
1641 * tracepoint.c (run_inferior_command): Likewise.
1643 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1645 * server.c (handle_search_memory_1): Include access length in
1648 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1650 * linux-crisv32-low.c: Fix compile errors.
1652 2012-09-04 Yao Qi <yao@codesourcery.com>
1654 * tracepoint.c (cmd_qtsv): Adjust debug message.
1655 Don't check CUR_TPOINT.
1657 2012-08-28 Yao Qi <yao@codesourcery.com>
1659 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1660 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1661 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1662 Remove declarations of xmalloc, xreallloc, xstrdup and
1664 * Makefile.in (libiberty_h): New.
1665 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1666 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1668 2012-08-23 Yao Qi <yao@codesourcery.com>
1670 * server.h: Remove declaration of 'xsnprintf'.
1672 2012-08-22 Keith Seitz <keiths@redhat.com>
1674 * server.h: Include build-gnulib-gbserver/config.h.
1675 * gdbreplay.c: Likewise.
1677 2012-08-08 Doug Evans <dje@google.com>
1679 * Makefile.in (SFILES): Add gdb_vecs.c.
1680 (OBS): Add gdb_vecs.o.
1681 (gdb_vecs_h, host_defs_h): New variables.
1682 (thread-db.o): Add $(gdb_vecs_h) dependency.
1683 (gdb_vecs.o): New rule.
1684 * thread-db.c: #include "gdb_vecs.h".
1685 (thread_db_load_search): Use a vector to iterate over path elements.
1686 Handle text appearing after "$pdir".
1688 * configure.ac: Add check for strstr.
1689 * config.in: Regenerate.
1690 * configure: Regenerate.
1692 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1694 * hostio.c (handle_pread): If pread fails, fall back to attempting
1696 (handle_pwrite): Likewise for pwrite.
1698 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1700 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1701 between unsupported TYPE and unimplementable ADDR/LEN combination.
1702 (arm_insert_point): Act on new return value.
1704 2012-07-31 Pedro Alves <palves@redhat.com>
1706 * server.c (process_point_options): Only skip tokens if we find
1707 one that is unrecognized. Don't treat 'X' specially while
1708 skipping unrecognized tokens.
1710 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1712 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1713 to 4-byte-align HW breakpoint addresses for Thumb.
1715 2012-07-27 Yao Qi <yao@codesourcery.com>
1719 * server.h: Declare gdb_agent_about_to_close.
1720 * target.c (kill_inferior): Include "agent.h".
1721 New. Send command 'kill'.
1722 * target.h (kill_inferior): Removed macro.
1723 * tracepoint.c (gdb_agent_about_to_close): New.
1724 (gdb_agent_helper_thread): Handle command 'close'.
1725 Wait endlessly until the inferior stops.
1726 Install gdb_agent_remove_socket to atexit hook.
1727 (agent_socket_name): New static variable.
1728 (gdb_agent_socket_init): Replace local variable 'name' with
1729 'agent_socket_name'.
1730 (gdb_agent_remove_socket): New.
1732 2012-07-27 Yao Qi <yao@codesourcery.com>
1734 * server.c (process_point_options): Stop at 'X' when parsing.
1736 2012-07-19 Michael Eager <eager@eagercon.com>
1738 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1740 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1741 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1742 hardware breakpoint.
1744 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1746 * gdbserver/linux-low.c (initialize_low): Call
1747 linux_ptrace_init_warnings.
1749 2012-07-02 Doug Evans <dje@google.com>
1751 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1754 2012-07-02 Stan Shebs <stan@codesourcery.com>
1756 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1757 (ax.o): Add it to build rule.
1759 (OBS): Add format.o.
1760 (IPA_OBS): Add format.o.
1761 * server.c (handle_query): Claim support for breakpoint commands.
1762 (process_point_options): Add command case.
1763 (process_serial_event): Leave running if there are printfs in
1765 * mem-break.h (any_persistent_commands): Declare.
1766 (add_breakpoint_commands): Declare.
1767 (gdb_no_commands_at_breakpoint): Declare.
1768 (run_breakpoint_commands): Declare.
1769 * mem-break.c (struct point_command_list): New struct.
1770 (struct breakpoint): New field command_list.
1771 (any_persistent_commands): New function.
1772 (add_commands_to_breakpoint): New function.
1773 (add_breakpoint_commands): New function.
1774 (gdb_no_commands_at_breakpoint): New function.
1775 (run_breakpoint_commands): New function.
1776 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1778 * ax.c: Include format.h.
1779 (ax_printf): New function.
1780 (gdb_eval_agent_expr): Add printf opcode.
1782 2012-06-13 Yao Qi <yao@codesourcery.com>
1784 * server.c (start_inferior): Remove duplicated writes to fields
1785 'last_resume_kind' and 'last_status' of 'current_inferior'.
1787 2012-06-12 Yao Qi <yao@codesourcery.com>
1788 Pedro Alves <palves@redhat.com>
1790 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1792 * server.c (handle_v_cont): Extend comment.
1794 2012-06-11 Yao Qi <yao@codesourcery.com>
1796 * linux-low.c (linux_attach): Add 'static'.
1798 2012-06-06 Yao Qi <yao@codesourcery.com>
1800 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1802 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1804 Fix gcc -flto compilation warning.
1805 * server.c (main): Make variable multi_mode and attach volatile.
1807 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1809 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1810 if the platform doesn't know about it.
1812 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1814 * Makefile.in (SFILES): Add linux-tile-low.c.
1815 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1816 * configure.srv: Handle tilegx-*-linux*.
1817 * linux-tile-low.c: New file.
1819 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1821 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1823 2012-05-24 Pedro Alves <palves@redhat.com>
1827 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1829 2012-05-24 Pedro Alves <palves@redhat.com>
1833 Replace target_signal with gdb_signal throughout.
1835 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1837 * linux-low.c (linux_store_registers): Avoid the copying sequence
1838 when no data has been retrieved by ptrace.
1840 2012-05-22 Will Deacon <will.deacon@arm.com>
1842 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1843 Include asm/ptrace.h.
1844 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1847 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1849 * linux-low.c (linux_store_registers): Don't re-retrieve data
1850 with ptrace that has already been obtained from /proc. Always
1851 copy any data retrieved with ptrace to the buffer supplied.
1853 2012-05-11 Yao Qi <yao@codesourcery.com>
1854 Pedro Alves <palves@redhat.com>
1856 * linux-low.c (enum stopping_threads_kind): New.
1857 (stopping_threads): Change type to `enum stopping_threads_kind'.
1858 (handle_extended_wait): If stopping and suspending threads, leave
1859 the new_lwp suspended too.
1860 (linux_wait_for_event): Adjust.
1861 (stop_all_lwps): Set `stopping_threads' to
1862 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1863 whether we're suspending threads or just stopping them. Assert no
1866 2012-04-29 Yao Qi <yao@codesourcery.com>
1868 * server.h: Move some code to ...
1869 * gdbthread.h: ... here. New.
1870 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1871 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1872 (nto-low.o, win32-low.o): Likewise.
1873 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1874 * regcache.c, remote-utils.c, server.c: Likewise.
1875 * target.c, tracepoint.c, win32-low.c: Likewise.
1877 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1879 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1880 (PTRACE_ARG4_TYPE): Likewise.
1881 (PTRACE_XFER_TYPE): Likewise.
1882 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1883 ptrace to PTRACE_ARG3_TYPE.
1884 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1885 (PTRACE_ARG4_TYPE): Likewise.
1886 (PTRACE_XFER_TYPE): Likewise.
1887 (linux_detach_one_lwp): Cast fourth argument of
1888 ptrace to long then PTRACE_ARG4_TYPE.
1889 (regsets_fetch_inferior_registers): Cast third argument of
1890 ptrace to long then PTRACE_ARG3_TYPE.
1891 (regsets_store_inferior_registers): Likewise.
1893 2012-04-20 Pedro Alves <palves@redhat.com>
1895 * configure: Regenerate.
1897 2012-04-19 Pedro Alves <palves@redhat.com>
1899 * Makefile.in (GNULIB_BUILDDIR): New.
1900 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1901 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1902 (all, install-only, uninstall, clean-info, all-lib, clean): No
1903 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1904 (maintainer-clean realclean distclean): Use subdir_do.
1906 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1907 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1908 * acinclude.m4: Include acx_configure_dir.m4.
1909 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1910 calls. Call AC_PROG_RANLIB. Configure gnulib using
1913 (GNULIB_STDINT_H): Adjust.
1914 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1915 * gdbreplay.c: Include build-gnulib/config.h.
1916 * server.h: Likewise.
1917 * aclocal.m4: Regenerate.
1918 * config.in: Regenerate.
1919 * configure: Regenerate.
1921 2012-04-19 Pedro Alves <palves@redhat.com>
1923 * Makefile.in (LIBGNU, INCGNU): Adjust.
1924 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1925 (all, install-only, uninstall, clean-info, all-lib, clean)
1926 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1927 * configure.ac: Adjust AC_OUTPUT output.
1928 * aclocal.m4: Regenerate.
1929 * configure: Regenerate.
1931 2012-04-19 Pedro Alves <palves@redhat.com>
1933 * Makefile.in (generated_files): New.
1934 (server_h): Remove the explicit dependency on config.h, and depend
1935 on $generated_files.
1937 2012-04-19 Pedro Alves <palves@redhat.com>
1939 * Makefile.in (INCGNU): Add -Ignulib.
1941 2012-04-19 Pedro Alves <palves@redhat.com>
1943 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1944 (INCGNU): ... this, and spell out -I here.
1945 (GNULIB_LIB): Rename to ...
1947 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1949 2012-04-19 Pedro Alves <palves@redhat.com>
1951 * config.in: Regenerate.
1953 2012-04-19 Pedro Alves <palves@redhat.com>
1955 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1956 * server.h (memmem): Remove declaration.
1957 * config.in: Regenerate.
1958 * configure: Regenerate.
1960 2012-04-19 Yao Qi <yao@codesourcery.com>
1962 * Makefile.in (SFILES): Add common/vec.c.
1966 2012-04-19 Yao Qi <yao@codesourcery.com>
1968 * remote-utils.c (prepare_resume_reply): Replace with macro
1969 target_core_of_thread.
1970 * server.c (handle_qxfer_threads_proper): Likewise.
1971 * target.h (traget_core_of_thread): New macro.
1973 2012-04-18 Pedro Alves <palves@redhat.com>
1975 * aclocal.m4: Regenerate.
1976 * configure: Regenerate.
1978 2012-04-16 Yao Qi <yao@codesourcery.com>
1980 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1981 duplicated on address.
1983 2012-04-16 Yao Qi <yao@codesourcery.com>
1985 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1986 (struct tracepoint_action_ops) <send>: New field.
1987 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1988 (agent_expr_send, x_tracepoint_action_send): New.
1989 (l_tracepoint_action_send): New.
1990 (cmd_qtdp): Download and install tracepoint
1991 according to `use_agent'.
1992 (run_inferior_command): Add one more parameter `len'.
1994 (tracepoint_send_agent): New.
1995 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1997 2012-04-16 Yao Qi <yao@codesourcery.com>
1999 * tracepoint.c (download_tracepoints): Moved to ...
2000 (cmd_qtstart): ... here.
2002 2012-04-14 Yao Qi <yao@codesourcery.com>
2004 * tracepoint.c: Include inttypes.h.
2005 (struct collect_memory_action): Use sized types.
2006 (struct tracepoint): Likewise.
2007 (cmd_qtdp, stop_tracing): Update print specifiers.
2008 (cmd_qtp, response_tracepoint): Likewise.
2009 (collect_data_at_tracepoint): Likewise.
2010 (collect_data_at_step): Likewise.
2012 2012-04-14 Yao Qi <yao@codesourcery.com>
2014 Import gnulib module inttypes.
2015 * aclocal.m4, config.in, configure: Regenerated.
2017 2012-04-14 Yao Qi <yao@codesourcery.com>
2019 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2020 Makefile and config.status at last.
2022 2012-04-13 Yao Qi <yao@codesourcery.com>
2024 * tracepoint.c: Include stdint.h unconditionally.
2026 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2028 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2029 on BFD_HAVE_SYS_PROCFS_TYPE.
2030 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2031 * configure: Regenerate.
2032 * config.in: Likewise.
2034 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2036 * Makefile.in (clean): Also remove x32.c x32-linux.c
2037 x32-avx.c x32-avx-linux.c.
2038 (x32.o): New target.
2040 (x32-linux.o): Likewise.
2041 (x32-linux.c): Likewise.
2042 (x32-avx.o): Likewise.
2043 (x32-avx.c): Likewise.
2044 (x32-avx-linux.o): Likewise.
2045 (x32-avx-linux.c): Likewise.
2047 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2048 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2049 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2050 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2051 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2052 i386/x32-avx-linux.xml.
2054 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2055 (init_registers_x32_avx_linux): Likwise.
2056 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2057 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2059 2012-04-13 Pedro Alves <palves@redhat.com>
2061 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2062 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2063 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2064 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2067 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2069 * linux-x86-low.c (compat_x32_clock_t): New.
2070 (compat_x32_siginfo_t): Likewise.
2071 (compat_x32_siginfo_from_siginfo): Likewise.
2072 (siginfo_from_compat_x32_siginfo): Likewise.
2073 (linux_is_elf64): Likewise.
2074 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2075 and siginfo_from_compat_x32_siginfo for x32.
2076 (x86_arch_setup): Set linux_is_elf64.
2078 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2081 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2083 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2084 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2085 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2086 compatible with process.
2088 2012-04-12 Yao Qi <yao@codesourcery.com>
2090 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2091 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2092 (install-only, install-info, clean): Handle sub dir gnulib.
2093 (all-lib, am--refresh): New targets.
2094 (memmem.o): Remove target.
2095 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2096 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2097 (AC_REPLACE_FUNCS): Remove memmem.
2098 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2099 (AC_OUTPUT): Generate Makefile in gnulib/.
2100 * aclocal.m4, config.in, configure: Regenerated.
2102 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2104 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2106 2012-04-05 Pedro Alves <palves@redhat.com>
2108 -Werror=strict-aliasing
2110 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2113 2012-04-04 Pedro Alves <palves@redhat.com>
2115 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2116 (sparc_store_gregset_from_stack, sparc_store_gregset)
2117 (sparc_breakpoint_at): Fix formatting.
2119 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2121 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2123 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2124 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2125 * config.in: Regenerate.
2126 * configure: Likewise.
2128 2012-03-29 Pedro Alves <palves@redhat.com>
2130 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2131 Correct ptrace arguments.
2133 2012-03-28 Pedro Alves <palves@redhat.com>
2135 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2136 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2137 (IA64_FR1_REGNUM): New defines.
2138 (ia64_fetch_register): New.
2139 (the_low_target): Install it.
2140 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2142 * linux-low.c (linux_fetch_registers): Try the
2143 the_low_target.fetch_register hook first.
2145 * linux-arm-low.c (the_low_target): Adjust.
2146 * linux-bfin-low.c (the_low_target): Adjust.
2147 * linux-cris-low.c (the_low_target): Adjust.
2148 * linux-crisv32-low.c (the_low_target): Adjust.
2149 * linux-m32r-low.c (the_low_target): Adjust.
2150 * linux-m68k-low.c (the_low_target): Adjust.
2151 * linux-mips-low.c (the_low_target): Adjust.
2152 * linux-ppc-low.c (the_low_target): Adjust.
2153 * linux-s390-low.c (the_low_target): Adjust.
2154 * linux-sh-low.c (the_low_target): Adjust.
2155 * linux-sparc-low.c (the_low_target): Adjust.
2156 * linux-tic6x-low.c (the_low_target): Adjust.
2157 * linux-x86-low.c (the_low_target): Adjust.
2158 * linux-xtensa-low.c (the_low_target): Adjust.
2160 2012-03-26 Pedro Alves <palves@redhat.com>
2162 * server.c (handle_qxfer_libraries): Don't bail early if
2163 the_target->qxfer_libraries_svr4 is not NULL.
2165 2012-03-26 Pedro Alves <palves@redhat.com>
2167 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2169 2012-03-23 Pedro Alves <palves@redhat.com>
2171 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2172 "library-list-svr4" element's start tag when the the DSO list is
2175 2012-03-23 Pedro Alves <palves@redhat.com>
2177 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2178 a variable whose type size is the same as the inferior's pointer
2181 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2183 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2185 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2186 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2187 * linux-low.h: Include <signal.h>.
2188 (struct siginfo): Remove forward declaration.
2189 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2192 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2194 * .gitignore: Ignore more files.
2196 2012-03-19 Pedro Alves <palves@redhat.com>
2197 Jan Kratochvil <jan.kratochvil@redhat.com>
2199 * server.c (cont_thread, general_thread): Add describing comments.
2200 (start_inferior): Clear `cont_thread'.
2201 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2204 2012-03-15 Yao Qi <yao@codesourcery.com>
2206 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2208 (cmd_qtdp): ... here.
2210 2012-03-15 Yao Qi <yao@codesourcery.com>
2212 * tracepoint.c (struct tracepoint_action_ops): New.
2213 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2214 (m_tracepoint_action_download): New.
2215 (r_tracepoint_action_download): New.
2216 (x_tracepoint_action_download): New.
2217 (l_tracepoint_action_download): New.
2218 (add_tracepoint_action): Install `action->ops' according type.
2219 (download_tracepoint_1): Move code `download' function pointer
2220 of various tracepoint_action_ops.
2222 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2224 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2225 linux_ptrace_attach_warnings.
2227 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2229 * Makefile.in (linux-ptrace.o): New.
2230 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2231 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2232 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2233 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2234 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2236 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2238 2012-03-08 Yao Qi <yao@codesourcery.com>
2239 Pedro Alves <palves@redhat.com>
2241 Fix PR server/13392.
2242 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2244 * tracepoint.c (remove_tracepoint): New.
2245 (cmd_qtdp): Call remove_tracepoint when failed to install.
2247 2012-03-07 Pedro Alves <palves@redhat.com>
2249 * linux-low.c (get_detach_signal): New.
2250 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2251 Pass on pending signals to PTRACE_DETACH. Check the result of the
2253 * server.c (program_signals, program_signals_p): New.
2254 (handle_general_set): Handle QProgramSignals.
2255 * server.h (program_signals, program_signals_p): Declare.
2257 2012-03-05 Pedro Alves <palves@redhat.com>
2258 Jan Kratochvil <jan.kratochvil@redhat.com>
2260 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2263 2012-03-03 Yao Qi <yao@codesourcery.com>
2265 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2266 agent_look_up_symbols.
2268 2012-03-03 Yao Qi <yao@codesourcery.com>
2270 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2271 (linux-x86-low.o): Likewise.
2272 * server.h: Remove in_process_agent_loaded.
2273 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2277 2012-03-03 Yao Qi <yao@codesourcery.com>
2279 * tracepoint.c (gdb_agent_capability): New global.
2280 (in_process_agent_loaded_ust): Renamed to
2281 `in_process_agent_supports_ust'.
2283 (in_process_agent_supports_ust): Call agent_capability_check.
2284 (clear_installed_tracepoints): Assert that agent supports
2287 2012-03-03 Yao Qi <yao@codesourcery.com>
2289 * linux-low.c (linux_supports_agent): New.
2290 (linux_target_ops): Initialize field `supports_agent' with
2291 linux_supports_agent.
2292 * target.h (struct target_ops) <supports_agent>: New.
2293 (target_supports_agent): New macro.
2294 * server.c (handle_general_set): Handle packet 'QAgent'.
2295 (handle_query): Send `QAgent+'.
2296 * Makefile.in (server.o): Depends on agent.h.
2298 2012-03-03 Yao Qi <yao@codesourcery.com>
2300 * Makefile.in (OBS): Add agent.o.
2301 Add new rule for agent.o.
2302 Track dependence of tracepoint.c on agent.h.
2303 * tracepoint.c (run_inferior_command_1):
2304 (run_inferior_command): Call agent_run_command.
2305 (gdb_ust_connect_sync_socket): Deleted. Move it to
2307 (resume_thread, stop_thread): Likewise.
2308 (gdb_ust_socket_init): Renamed to ...
2309 (gdb_agent_socket_init): ... New.
2310 (gdb_ust_thread): Renamed to ...
2311 (gdb_agent_helper_thread): ... New.
2312 (gdb_ust_init): Move some code to ...
2313 (gdb_agent_init): ... here. New.
2314 [HAVE_UST]: Call gdb_ust_init.
2315 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2316 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2317 * config.in, configure: Regenerated.
2319 2012-03-02 Pedro Alves <palves@redhat.com>
2321 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2322 * linux-low.c (struct simple_pid_list): New.
2323 (stopped_pids): New a struct simple_pid_list pointer.
2324 (add_to_pid_list, pull_pid_from_list): New.
2325 (handle_extended_wait): Don't assume the first signal new children
2326 report is SIGSTOP. Adjust call to pull_pid_from_list.
2327 (linux_wait_for_lwp): Adjust.
2329 2012-03-02 Yao Qi <yao@codesourcery.com>
2331 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2334 2012-03-02 Yao Qi <yao@codesourcery.com>
2336 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2337 `stop_pc' and `tpoint'. Update caller.
2339 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2341 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2342 * linux-low.c (use_linux_regsets): New macro.
2343 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2344 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2345 (linux_register_in_regsets): New function.
2346 (usr_fetch_inferior_registers): Skip registers covered by
2348 (usr_store_inferior_registers): Likewise.
2349 (usr_fetch_inferior_registers): New macro.
2350 (usr_store_inferior_registers): Likewise.
2351 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2352 (linux_store_registers): Likewise.
2353 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2355 (init_registers_mips64_dsp_linux): Likewise.
2356 (init_registers_mips_linux): New macro.
2357 (init_registers_mips_dsp_linux): Likewise.
2358 (mips_dsp_num_regs): Likewise.
2359 (DSP_BASE, DSP_CONTROL): New fallback macros.
2360 (mips_base_regs): New macro.
2361 (mips_regmap): Use it. Fix the size.
2362 (mips_dsp_regmap): New variable.
2363 (mips_dsp_regset_bitmap): Likewise.
2364 (mips_arch_setup): New function.
2365 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2367 (mips_cannot_store_register): Likewise.
2368 (the_low_target): Update .arch_setup, .num_regs and .regmap
2369 initializers. Add .regset_bitmap initializer.
2370 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2372 * linux-bfin-low.c (the_low_target): Likewise.
2373 * linux-cris-low.c (the_low_target): Likewise.
2374 * linux-crisv32-low.c (the_low_target): Likewise.
2375 * linux-ia64-low.c (the_low_target): Likewise.
2376 * linux-m32r-low.c (the_low_target): Likewise.
2377 * linux-m68k-low.c (the_low_target): Likewise.
2378 * linux-ppc-low.c (the_low_target): Likewise.
2379 * linux-s390-low.c (the_low_target): Likewise.
2380 * linux-sh-low.c (the_low_target): Likewise.
2381 * linux-sparc-low.c (the_low_target): Likewise.
2382 * linux-tic6x-low.c (the_low_target): Likewise.
2383 * linux-x86-low.c (the_low_target): Likewise.
2384 * linux-xtensa-low.c (the_low_target): Likewise.
2385 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2386 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2387 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2389 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2390 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2392 2012-02-29 Yao Qi <yao@codesourcery.com>
2393 Pedro Alves <palves@redhat.com>
2395 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2396 `step_over_finished' is true.
2398 2012-02-27 Pedro Alves <palves@redhat.com>
2400 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2401 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2403 2012-02-27 Pedro Alves <palves@redhat.com>
2406 * linux-low.c (pid_is_stopped): New.
2407 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2409 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2411 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2414 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2416 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2418 2012-02-24 Luis Machado <lgustavo@codesourcery>
2420 * server.c (handle_query): Advertise support for target-side
2421 breakpoint condition evaluation.
2422 (process_point_options): New function.
2423 (process_serial_event): When inserting a breakpoint, check for
2424 a target-side condition that should be evaluated.
2426 * mem-break.c: Include regcache.h and ax.h.
2427 (point_cond_list_t): New data structure.
2428 (breakpoint) <cond_list>: New field.
2429 (find_gdb_breakpoint_at): Make non-static.
2430 (delete_gdb_breakpoint_at): Clear any target-side
2432 (clear_gdb_breakpoint_conditions): New function.
2433 (add_condition_to_breakpoint): Likewise.
2434 (add_breakpoint_condition): Likewise.
2435 (gdb_condition_true_at_breakpoint): Likewise.
2436 (gdb_breakpoint_here): Return result directly instead
2437 of going through a local variable.
2439 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2440 (clear_gdb_breakpoint_conditions): Likewise.
2441 (add_breakpoint_condition): Likewise.
2442 (gdb_condition_true_at_breakpoint): Likewise.
2444 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2445 (need_step_over_p): Take target-side breakpoint condition into
2448 2012-02-24 Luis Machado <lgustavo@codesourcery>
2450 * server.h: Include tracepoint.h.
2451 (agent_mem_read, agent_get_trace_state_variable_value,
2452 agent_set_trace_state_variable_value,
2453 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2454 get_set_tsv_func_addr): New prototypes.
2456 * ax.h: New include file.
2457 * ax.c: New source file.
2459 * tracepoint.c: Include ax.h.
2460 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2461 agent_expr, eval_result_type): Move to ax.h.
2462 (parse_agent_expr): Rename to ...
2463 (gdb_parse_agent_expr): ... this, make it non-static and move
2465 (unparse_agent_expr) Rename to ...
2466 (gdb_unparse_agent_expr): ... this, make it non-static and move
2468 (eval_agent_expr): Rename to ...
2469 (eval_tracepoint_agent_expr): ... this.
2470 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2471 forward declarations.
2472 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2473 (agent_get_trace_state_variable_value): New function.
2474 (agent_set_trace_state_variable_value): New function.
2475 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2476 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2477 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2478 (condition_true_at_tracepoint): Likewise.
2479 (parse_agent_expr): Rename to ...
2480 (gdb_parse_agent_expr): ... this and move to ax.c.
2481 (unparse_agent_expr): Rename to ...
2482 (gdb_unparse_agent_expr): ... this and move to ax.c.
2483 (gdb_agent_op_name): Move to ax.c.
2484 (eval_agent_expr): Rename to ...
2485 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2487 (eval_tracepoint_agent_expr): New function.
2488 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2490 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2492 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2493 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2494 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2495 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2496 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2497 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2498 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2499 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2500 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2501 (compile_bytecodes): Remove forward declaration.
2502 (is_goto_target): Move to ax.c.
2503 (compile_bytecodes): Move to ax.c and call
2504 agent_get_trace_state_variable_value (...) and
2505 agent_set_trace_state_variable_value (...).
2507 * Makefile.in: Update ax.c and IPA dependencies.
2509 2012-02-24 Pedro Alves <palves@redhat.com>
2511 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2512 (cmd_bigqtbuffer_circular): ... this. Only handle
2513 'QTBuffer:circular:'.
2514 (handle_tracepoint_general_set): Adjust.
2516 2012-02-16 Yao Qi <yao@codesourcery.com>
2518 * inferiors.c: Move code to ...
2519 * dll.c: .... here. New.
2520 * server.h: Declare clear_dlls.
2521 * Makefile.in (SFILES): Add dll.c.
2525 2012-02-11 Yao Qi <yao@codesourcery.com>
2527 * server.c: (handle_monitor_command): Add a new parameter
2529 (handle_query): Update caller.
2531 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2533 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2534 * configure, config.in: Regenerate.
2535 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2538 2012-02-02 Pedro Alves <palves@redhat.com>
2540 Try SIGKILL first, then PTRACE_KILL.
2541 * linux-low.c (linux_kill_one_lwp): New.
2542 (linux_kill_one_lwp): Rename to ...
2543 (kill_one_lwp_callback): ... this. Use the new
2546 2012-02-02 Pedro Alves <palves@redhat.com>
2548 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2551 2012-01-27 Pedro Alves <palves@redhat.com>
2553 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2554 (elf_64_file_p): Make static.
2555 (linux_pid_exe_is_elf_64_file): New.
2556 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2557 Delete declarations.
2558 (linux_pid_exe_is_elf_64_file): Declare.
2559 * linux-x86-low.c (x86_arch_setup): Use
2560 linux_pid_exe_is_elf_64_file.
2562 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2564 * linux-low.c (linux_wait_for_event_1): Rename to ...
2565 (linux_wait_for_event): ... here and merge it with former
2566 linux_wait_for_event - new variable wait_ptid, use it.
2567 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2569 2012-01-23 Pedro Alves <palves@redhat.com>
2571 * server.c (main): Avoid yet another case of infinite loop while
2572 detaching/killing after a longjmp.
2574 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2577 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2579 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2581 * hostio.c (handle_readlink): New function.
2582 (handle_vFile): Call it to handle "vFile:readlink" packets.
2584 2012-01-20 Pedro Alves <palves@redhat.com>
2585 Ulrich Weigand <ulrich.weigand@linaro.org>
2587 * server.c (handle_v_requests): Only support vAttach and vRun to
2588 start multiple processes when in extended protocol mode.
2590 2012-01-17 Pedro Alves <palves@redhat.com>
2592 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2593 memalign plus mprotect to allocate the scratch buffer.
2595 2012-01-13 Pedro Alves <palves@redhat.com>
2597 * server.c (attach_inferior): Clear `cont_thread'.
2599 2012-01-13 Pedro Alves <palves@redhat.com>
2601 * server.c (main): Avoid infinite loop while detaching/killing
2604 2012-01-09 Doug Evans <dje@google.com>
2606 * server.c (start_inferior): Set last_ptid in --wrapper case.
2608 2012-01-06 Yao Qi <yao@codesourcery.com>
2610 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2612 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2614 2012-01-04 Yao Qi <yao@codesourcery.com>
2616 * tracepoint.c (cmd_qtdp): Print debug message
2617 for static tracepoint.
2619 2012-01-04 Yao Qi <yao@codesourcery.com>
2621 * tracepoint.c (trace_vdebug): Differentiate debug message
2622 between gdbserver and IPA.
2624 2012-01-03 Yao Qi <yao@codesourcery.com>
2626 * tracepoint.c (tracepoint_was_hit): Don't collect for
2629 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2631 * terminal.h: Reformat copyright header.
2633 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2635 * server.c (gdbserver_version): Update copyright year.
2636 * gdbreplay.c (gdbreplay_version): Likewise.
2638 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2640 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2643 2011-12-18 Hui Zhu <teawater@gmail.com>
2644 * linux-low.c (linux_create_inferior): Save return value to ret.
2646 2011-12-18 Hui Zhu <teawater@gmail.com>
2648 * linux-low.c (linux_create_inferior): Save return value to ret.
2650 2011-12-16 Doug Evans <dje@google.com>
2652 * linux-low.c (linux_create_inferior): If stdio connection,
2653 redirect stdin from /dev/null, stdout to stderr.
2654 * remote-utils.c (remote_is_stdio): New static global.
2655 (remote_connection_is_stdio): New function.
2656 (remote_prepare): Handle stdio connection.
2657 (remote_open): Ditto.
2658 (remote_close): Don't close stdin for stdio connections.
2659 (read_prim,write_prim): New functions. Replace all calls to
2660 read/write to these.
2661 * server.c (main): Watch for "-" argument. Move call to
2662 remote_prepare before start_inferior.
2663 * server.h (STDIO_CONNECTION_NAME): New macro.
2664 (remote_connection_is_stdio): Declare.
2666 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2667 in debugging output.
2669 2011-12-15 Yao Qi <yao@codesourcery.com>
2671 * tracepoint.c: Include sys/syscall.h.
2672 (gdb_ust_thread): Remove preprocessor conditional.
2674 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2676 * linux-low.c (linux_detach_one_lwp): Call
2677 the_low_target.prepare_to_resume before detaching.
2679 2011-12-14 Yao Qi <yao@codesourcery.com>
2681 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2684 2011-12-14 Yao Qi <yao@codesourcery.com>
2686 * i386-low.c (i386_low_stopped_data_address): Initialize local
2689 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2693 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2694 DR_CONTROL unless necessary. Extend comments.
2695 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2696 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2698 2011-12-13 Yao Qi <yao@codesourcery.com>
2700 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2702 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2704 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2706 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2707 Print new debug message for such case.
2709 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2711 Fix overlapping memcpy.
2712 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2713 the read_inferior_memory transfer.
2714 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2715 write_inferior_memory transfer.
2716 (set_fast_tracepoint_jump): New variable buf. Use it for the
2717 read_inferior_memory and write_inferior_memory transfers.
2718 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2719 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2720 Use it for the write_inferior_memory transfer.
2721 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2724 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2726 * linux-low.c (fetch_register, store_register): Make code
2727 consistent, fix formatting.
2729 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2731 * linux-low.c (usr_store_inferior_registers): Factor out code
2732 to handle individual registers into...
2733 (store_register): ... this new function.
2735 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2737 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2738 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2739 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2740 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2741 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2742 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2743 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2744 (srv_xmlfiles): Add new XML files.
2746 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2748 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2749 (init_registers_s390_linux32v1): Add prototype.
2750 (init_registers_s390_linux32v2): Likewise.
2751 (init_registers_s390_linux64v1): Likewise.
2752 (init_registers_s390_linux64v2): Likewise.
2753 (init_registers_s390x_linux64v1): Likewise.
2754 (init_registers_s390x_linux64v2): Likewise.
2755 (s390_num_regs): Increment to 52.
2756 (s390_regmap): Add orig_r2 register.
2757 (s390_num_regs_3264): Increment to 68.
2758 (s390_regmap_3264): Add orig_r2 register.
2759 (s390_collect_ptrace_register): Handle orig_r2 register.
2760 (s390_supply_ptrace_register): Likewise.
2761 (s390_fill_last_break): New function.
2762 (s390_store_last_break): Likewise.
2763 (s390_fill_system_call): New function.
2764 (s390_store_system_call): Likewise.
2765 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2767 (s390_check_regset): New function.
2768 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2769 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2770 Update target_regsets for available register sets.
2772 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2773 Jan Kratochvil <jan.kratochvil@redhat.com>
2775 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2776 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2778 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2779 * linux-low.h (struct process_info_private): New member r_debug.
2780 * server.c (handle_qxfer_libraries): Call
2781 the_target->qxfer_libraries_svr4.
2782 (handle_qxfer_libraries_svr4): New function.
2783 (qxfer_packets): New entry "libraries-svr4".
2784 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2785 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2786 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2787 PACKET_qXfer_libraries_svr4.
2789 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2791 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2792 PSW address/mask between 8-byte and 16-byte formats.
2793 (s390_supply_ptrace_register): Likewise.
2794 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2795 basic addressing mode bit.
2797 2011-11-24 Stan Shebs <stan@codesourcery.com>
2799 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2801 2011-11-17 Stan Shebs <stan@codesourcery.com>
2803 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2804 (tracing_start_time): New global.
2805 (tracing_stop_time): New global.
2806 (tracing_user_name): New global.
2807 (tracing_notes): New global.
2808 (tracing_stop_note): New global.
2809 (cmd_qtstart): Set traceframe_usage, start_time.
2810 (stop_tracing): Set stop_time.
2811 (cmd_qtstatus): Report additional status.
2812 (cmd_qtp): New function.
2813 (handle_tracepoint_query): Call it.
2814 (cmd_qtnotes): New function.
2815 (handle_tracepoint_general_set): Call it.
2816 (get_timestamp): Rename from tsv_get_timestamp.
2818 2011-11-14 Stan Shebs <stan@codesourcery.com>
2819 Kwok Cheung Yeung <kcy@codesourcery.com>
2821 * linux-x86-low.c (small_jump_insn): New.
2822 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2823 trampoline and error message, build a trampoline and issue a small
2824 jump instruction to it.
2825 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2826 trampoline and error message.
2827 (x86_get_min_fast_tracepoint_insn_len): New.
2828 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2829 * linux-low.h (struct linux_target_ops): Add arguments to
2830 install_fast_tracepoint_jump_pad operation, add new operation.
2831 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2833 (linux_get_min_fast_tracepoint_insn_len): New function.
2834 (linux_target_op): Add new operation.
2835 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2836 (gdb_trampoline_buffer_end): Ditto.
2837 (gdb_trampoline_buffer_error): Ditto.
2838 (struct ipa_sym_addresses): Add fields for new IPA variables.
2839 (symbol_list): Add entries for new IPA variables.
2840 (struct tracepoint): Add fields to hold the address range of the
2841 trampoline used by the tracepoint.
2842 (trampoline_buffer_head): New static variable.
2843 (trampoline_buffer_tail): Ditto.
2844 (claim_trampoline_space): New function.
2845 (have_fast_tracepoint_trampoline_buffer): New function.
2846 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2848 (install_fast_tracepoint): Ditto, also add error buffer argument.
2849 (cmd_qtminftpilen): New function.
2850 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2851 (fast_tracepoint_from_trampoline_address): New function.
2852 (fast_tracepoint_collecting): Handle trampoline as part of jump
2854 (set_trampoline_buffer_space): New function.
2855 (initialize_tracepoint): Initialize new IPA variables.
2856 * target.h (struct target_ops): Add arguments to
2857 install_fast_tracepoint_jump_pad operation, add new
2858 get_min_fast_tracepoint_insn_len operation.
2859 (target_get_min_fast_tracepoint_insn_len): New.
2860 (install_fast_tracepoint_jump_pad): Add arguments.
2861 * server.h (IPA_BUFSIZ): Define.
2862 * linux-i386-ipa.c: Include extra header files.
2863 (initialize_fast_tracepoint_trampoline_buffer): New function.
2864 (initialize_low_tracepoint): Call it.
2865 * server.h (set_trampoline_buffer_space): Declare.
2866 (claim_trampoline_space): Ditto.
2867 (have_fast_tracepoint_trampoline_buffer): Ditto.
2869 2011-11-14 Yao Qi <yao@codesourcery.com>
2871 * server.c (handle_query): Handle InstallInTrace for qSupported.
2872 * tracepoint.c (add_tracepoint): Sort list.
2873 (install_tracepoint, download_tracepoint): New.
2874 (cmd_qtdp): Call them to install and download tracepoints.
2875 (sort_tracepoints): Removed.
2876 (cmd_qtstart): Update.
2878 2011-11-14 Yao Qi <yao@codesourcery.com>
2880 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2881 * mem-break.h: Declare.
2882 * tracepoint.c (cmd_qtstart): Move some code to ...
2883 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2885 (download_tracepoints): Move some code to ...
2886 (download_tracepoint_1): ... here. New.
2888 2011-11-08 Yao Qi <yao@codesourcery.com>
2890 * remote-utils.c (relocate_instruction): A comment fix.
2892 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2894 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2895 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2896 dr_status_mirror and dr_control_mirror from debug_reg_state.
2897 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2898 (i386_initial_stuff): Remove use of deleted globals.
2899 (i386_get_thread_context, i386_set_thread_context,
2900 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2901 from debug_reg_state.
2903 2011-11-05 Yao Qi <yao@codesourcery.com>
2905 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2906 address as TPOINT's.
2908 2011-11-02 Stan Shebs <stan@codesourcery.com>
2910 * tracepoint.c (agent_mem_read_string): New function.
2911 (eval_agent_expr): Call it for tracenz.
2912 * server.c (handle_query): Report support for tracenz.
2914 2011-11-02 Yao Qi <yao@codesourcery.com>
2916 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2918 2011-11-02 Yao Qi <yao@codesourcery.com>
2920 * target.h: Fix a typo in comment.
2922 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2924 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2925 clobber the breakpoints' shadows with fast tracepoint jumps.
2926 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2927 * target.c (write_inferior_memory): Also pass MYADDR down to
2930 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2932 * configure.ac: Check support for personality routine.
2933 * configure: Regenerate.
2934 * config.in: Likewise.
2935 * linux-low.c: Include <sys/personality.h>.
2936 Define ADDR_NO_RANDOMIZE if necessary.
2937 (linux_create_inferior): Disable address space randomization when
2938 forking inferior, if requested.
2939 (linux_supports_disable_randomization): New function.
2940 (linux_target_ops): Install it.
2941 * server.h (disable_randomization): Declare.
2942 * server.c (disable_randomization): New global variable.
2943 (handle_general_set): Handle QDisableRandomization.
2944 (handle_query): Likewise for qSupported.
2945 (main): Support --disable-randomization and --no-disable-randomization
2946 command line arguments.
2947 * target.h (struct target_ops): Add supports_disable_randomization.
2948 (target_supports_disable_randomization): New macro.
2950 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2952 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2954 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2955 [!PT_GETDSBT] (target_loadmap): New definition.
2956 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2957 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2958 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2959 and PT_GETDSBT to LINUX_LOADMAP.
2960 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2961 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2963 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2965 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2966 (arm_linux_hwbp_cap): New static variable.
2967 (arm_linux_get_hwbp_cap): Replace by ...
2968 (arm_linux_init_hwbp_cap): ... this new function.
2969 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2970 (arm_linux_get_hw_watchpoint_count): Likewise.
2971 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2972 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2973 (arm_prepare_to_resume): Use perror_with_name instead of error.
2975 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2977 * linux-arm-low.c: Include <signal.h>.
2978 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2979 (struct arm_linux_hwbp_cap): New data type.
2980 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2981 (struct arm_linux_hw_breakpoint): New data type.
2982 (MAX_BPTS, MAX_WPTS): Define.
2983 (struct arch_process_info, struct arch_lwp_info): New data types.
2984 (arm_linux_get_hwbp_cap): New function.
2985 (arm_linux_get_hw_breakpoint_count): Likewise.
2986 (arm_linux_get_hw_watchpoint_count): Likewise.
2987 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2988 (arm_hwbp_control_initialize): Likewise.
2989 (arm_hwbp_control_is_enabled): Likewise.
2990 (arm_hwbp_control_is_initialized): Likewise.
2991 (arm_hwbp_control_disable): Likewise.
2992 (arm_linux_hw_breakpoint_equal): Likewise.
2993 (arm_linux_hw_point_initialize): Likewise.
2994 (struct update_registers_data): New data structure.
2995 (update_registers_callback: New function.
2996 (arm_insert_point): Likewise.
2997 (arm_remove_point): Likewise.
2998 (arm_stopped_by_watchpoint): Likewise.
2999 (arm_stopped_data_address): Likewise.
3000 (arm_new_process): Likewise.
3001 (arm_new_thread): Likewise.
3002 (arm_prepare_to_resume): Likewise.
3003 (the_low_target): Register arm_insert_point, arm_remove_point,
3004 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3005 arm_new_thread, and arm_prepare_to_resume.
3007 2011-09-15 Stan Shebs <stan@codesourcery.com>
3009 * server.h (struct emit_ops): Add compare-goto fields.
3010 * tracepoint.c (gdb_agent_op_sizes): New table.
3011 (emit_eq_goto): New function.
3012 (emit_ne_goto): New function.
3013 (emit_lt_goto): New function.
3014 (emit_le_goto): New function.
3015 (emit_gt_goto): New function.
3016 (emit_ge_goto): New function.
3017 (is_goto_target): New function.
3018 (compile_bytecodes): Recognize special cases of compare-goto
3019 combinations and call specialized emitters for them.
3020 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3021 (amd64_emit_ne_goto): New function.
3022 (amd64_emit_lt_goto): New function.
3023 (amd64_emit_le_goto): New function.
3024 (amd64_emit_gt_goto): New function.
3025 (amd64_emit_ge_goto): New function.
3026 (amd64_emit_ops): Add the new functions.
3027 (i386_emit_eq_goto): New function.
3028 (i386_emit_ne_goto): New function.
3029 (i386_emit_lt_goto): New function.
3030 (i386_emit_le_goto): New function.
3031 (i386_emit_gt_goto): New function.
3032 (i386_emit_ge_goto): New function.
3033 (i386_emit_ops): Add the new functions.
3035 2011-09-08 Stan Shebs <stan@codesourcery.com>
3037 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3038 (i386_emit_epilogue): Restore %ebx.
3040 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3042 * server.c (step_thread): Remove definition.
3043 (process_serial_event): Don't handle Hs.
3044 * server.h (step_thread): Remove declaration.
3045 * target.c (set_desired_inferior): Remove use of step_thread.
3047 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3049 * linux-low.c: Include linux-procfs.h.
3050 (linux_attach_lwp_1): Update comments.
3051 (linux_attach): Scan for existing threads when attaching to a
3052 process that is the tgid.
3053 * Makefile.in: Update dependencies.
3055 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3057 * configure.srv: Add linux-procfs.o dependencies.
3059 2011-08-14 Yao Qi <yao@codesourcery.com>
3061 * target.h (struct target_ops): Fix indent.
3062 * win32-low.c (win32_target_ops): Fix comment.
3064 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3065 Yao Qi <yao@codesourcery.com>
3067 * Makefile.in (clean): Remove tic6x-*.c files.
3068 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3069 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3070 (tic6x-c64xp-linux.c): Likewise.
3071 * configure.srv: Add support for tic6x-*-uclinux.
3072 * linux-tic6x-low.c: New.
3073 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3075 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3076 Yao Qi <yao@codesourcery.com>
3078 * target.h (struct target_ops): Add read_loadmap.
3079 * linux-low.c (struct target_loadseg): New type.
3080 (struct target_loadmap): New type.
3081 (linux_read_loadmap): New function.
3082 (linux_target_ops): Add linux_read_loadmap.
3083 * server.c (handle_query): Support qXfer:fdpic:read packet.
3084 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3087 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3089 * win32-low.c: Include <stdint.h>.
3091 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3093 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3094 to the inferior here.
3095 (i386_remove_aligned_watchpoint): Ditto.
3096 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3097 fit part of the watchpoint in the debug registers.
3098 (i386_update_inferior_debug_regs): New.
3099 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3100 registers, and only update the inferior on success.
3101 (i386_low_remove_watchpoint): Ditto.
3103 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3105 * linux-low.c (compare_ints, unique, list_threads, show_process,
3106 linux_core_of_thread): Delete.
3107 (linux_target_ops): Change linux_core_of_thread to
3108 linux_common_core_of_thread.
3109 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3110 * utils.c (malloc_failure): Change type of argument.
3111 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3112 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3113 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3114 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3115 (IPA_OBJS): Add common-utils-ipa.o.
3116 (ptid_h, linux_osdata_h): New macros.
3117 (server_h): Add common/common-utils.h, common/xml-utils.h,
3118 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3120 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3121 ptid.o, buffer.o): New rules.
3122 (linux-low.o): Add common/linux-osdata.h as a dependency.
3123 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3124 * configure.ac: Add AC_HEADER_DIRENT check.
3125 * config.in: Regenerate.
3126 * configure: Regenerate.
3127 * remote-utils.c (xml_escape_text): Delete.
3128 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3129 buffer_xml_printf): Move to common/buffer.c.
3130 * server.c (main): Remove call to initialize_inferiors.
3131 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3132 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3133 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3134 internal_error, gdb_assert, gdb_assert_fail): Delete.
3135 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3136 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3138 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3139 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3140 initialize_inferiors): Delete.
3142 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3144 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3147 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3149 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3151 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3153 2011-05-26 Yao Qi <yao@codesourcery.com>
3155 * Makefile.in (thread-db.o): Track dependence to
3156 common/gdb_thread_db.h.
3157 * thread-db.c: include gdb_thread_db.h from right place.
3159 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3161 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3162 __FILE__ and __LINE__ to internal_error.
3164 2011-05-13 Doug Evans <dje@google.com>
3166 * thread-db.c (try_thread_db_load_from_sdir): New function.
3167 (try_thread_db_load_from_dir): New function.
3168 (thread_db_load_search): Handle $sdir, ignore $pdir.
3169 Remove trying of system directories if search of
3170 libthread-db-search-path fails, that is now done via $sdir.
3172 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3174 * server.c (handle_query): Add EnableDisableTracepoints to the list
3175 of supported features.
3176 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3178 (cmd_qtenable_disable): New.
3179 (cmd_qtstart): Install tracepoints even if disabled.
3180 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3181 receiving a QTEnable or QTDisable packet.
3182 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3183 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3185 (gdb_probe): Skip data collection if static tracepoint is disabled.
3187 2011-05-10 Doug Evans <dje@google.com>
3189 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3191 2011-05-04 Doug Evans <dje@google.com>
3193 * linux-low.c (linux_join): Skip process lookup.
3194 * spu-low.c (spu_join): Ditto.
3195 * server.c (join_inferiors_callback): Delete.
3196 (process_serial_event): For 'D' packet (detach) call join_inferior
3199 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3201 * README: Don't mention xscale*-*-linux*.
3202 * configure.srv (xscale*-*-linux*): Don't handle target.
3204 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3206 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3208 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3209 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3210 (i386_emit_void_call_2): Likewise.
3212 2011-04-26 Yao Qi <yao@codesourcery.com>
3214 * linux-low.c: Move common macros to linux-ptrace.h.
3215 Include linux-ptrace.h.
3216 * Makefile.in (linux_ptrace_h): New.
3217 (linux-low.o): Depends on linux-ptrace.h.
3219 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3221 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3222 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3223 (remote_prepare): New function with most of the TCP code from ...
3224 (remote_open): ... here. Detect PORT here unconditionally. Move also
3225 setting transport_is_reliable.
3226 * server.c (run_once): New variable.
3227 (gdbserver_usage): Document it.
3228 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3229 the first run if RUN_ONCE.
3230 * server.h (run_once, remote_prepare): New declarations.
3232 2011-04-19 Tom Tromey <tromey@redhat.com>
3234 * win32-low.c (handle_load_dll): Remove duplicate "the".
3236 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3238 Remove support for old Cygwin 1.5 versions.
3239 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3240 function to avoid warning.
3241 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3244 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3246 * gdbserver/server.h (Macro _): Define it if not available.
3248 2011-03-14 Michael Snyder <msnyder@vmware.com>
3250 * hostio.c (handle_close): Remove unnecessary null test.
3252 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3254 * Makefile.in (maintainer-clean realclean distclean): Remove
3255 "make ... subdir_do" command.
3257 2011-03-10 Michael Snyder <msnyder@vmware.com>
3259 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3261 * server.c (handle_v_run): Free alloced buffer on early return.
3263 2011-03-09 Yao Qi <yao@codesourcery.com>
3266 2011-03-04 Yao Qi <yao@codesourcery.com>
3268 * Makefile.in: Remove GNU make feature --directory.
3270 2011-03-05 Yao Qi <yao@codesourcery.com>
3272 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3273 (subdir_do): New make target. Copied from gdb/Makefile.
3274 (maintainer-clean, realclean, distclean, clean): Call corresponding
3275 make targets in common/Makefile.
3277 2011-02-11 Yao Qi <yao@codesourcery.com>
3279 * configure.ac: Call AC_PROG_RANLIB.
3280 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3281 * configure: Regenerate.
3283 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3285 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3287 2011-03-06 Yao Qi <yao@codesourcery.com>
3289 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3291 2011-03-05 Yao Qi <yao@codesourcery.com>
3293 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3294 (subdir_do): New make target. Copied from gdb/Makefile.
3295 (maintainer-clean, realclean, distclean, clean): Call corresponding
3296 make targets in common/Makefile.
3298 2011-03-04 Yao Qi <yao@codesourcery.com>
3300 * Makefile.in: Remove GNU make feature --directory.
3302 2011-03-04 Michael Snyder <msnyder@vmware.com>
3304 * server.c (queue_stop_reply): Call xmalloc not malloc.
3306 2011-03-02 Michael Snyder <msnyder@vmware.com>
3308 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3310 2011-02-28 Michael Snyder <msnyder@vmware.com>
3312 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3313 (cmd_qtframe): Ditto.
3314 (cmd_qtbuffer): Ditto.
3315 (cmd_bigqtbuffer): Ditto.
3317 * utils.c (decimal2str): Initialize 'width' to nine, then
3320 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3322 * hostio.c (require_data): Free *data, not data.
3324 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3326 * hostio.c (require_data): Use free, not xfree.
3328 2011-02-27 Michael Snyder <msnyder@vmware.com>
3330 * server.c (handle_query): Discard unused value.
3332 * hostio.c (require_data): Free malloc memory before returning
3335 2011-02-26 Michael Snyder <msnyder@vmware.com>
3337 * linux-low.c (list_threads): Call closedir for dirent.
3339 2011-02-27 Michael Snyder <msnyder@vmware.com>
3341 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3342 a case statement falls through.
3344 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3346 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3349 2011-02-26 Michael Snyder <msnyder@vmware.com>
3351 * utils.c (decimal2str): Eliminate dead code and dead param.
3352 (pulongest): Drop dead param from call to decimal2str.
3355 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3357 Revert the following patch (not approved yet):
3358 2011-02-21 Hui Zhu <teawater@gmail.com>
3359 * tracepoint.c (tp_printf): New function.
3360 (eval_agent_expr): Handle gdb_agent_op_printf.
3362 2011-02-21 Hui Zhu <teawater@gmail.com>
3364 * tracepoint.c (tp_printf): New function.
3365 (eval_agent_expr): Handle gdb_agent_op_printf.
3367 2011-02-18 Tom Tromey <tromey@redhat.com>
3369 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3370 (tracepoint.o): Likewise.
3371 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3372 (gdb_agent_op_names): Likewise.
3374 2011-02-18 Tom Tromey <tromey@redhat.com>
3376 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3377 gdb_agent_op_rot>: New constants.
3378 (gdb_agent_op_names): Add pick and roll.
3379 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3382 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3384 * aclocal.m4: Regenerated with aclocal-1.11.1.
3386 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3388 * server.c (handle_qxfer_traceframe_info): New.
3389 (qxfer_packets): Register "traceframe-info".
3390 (handle_query): Report support for qXfer:traceframe-info:read+.
3391 * tracepoint.c (match_blocktype): New.
3392 (traceframe_find_block_type): Rename to ...
3393 (traceframe_walk_blocks): ... this. Add callback filter argument,
3395 (traceframe_find_block_type): New, reimplemented on top of
3396 traceframe_walk_blocks.
3397 (build_traceframe_info_xml): New.
3398 (traceframe_read_info): New.
3399 * server.h (traceframe_read_info): Declare.
3401 2011-02-11 Yao Qi <yao@codesourcery.com>
3403 * configure.ac: Call AC_PROG_RANLIB.
3404 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3405 * configure: Regenerate.
3407 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3409 * server.c (gdb_read_memory): Change return semantics to allow
3411 (handle_search_memory_1): Adjust.
3412 (process_serial_event) <'m' packet>: Handle partial transfers.
3413 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3415 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3417 * regcache.c (init_register_cache): Initialize
3418 regcache->register_status.
3419 (free_register_cache): Release regcache->register_status.
3420 (regcache_cpy): Copy register_status.
3421 (registers_to_string): Print 'x's for unavailable registers.
3422 (supply_register): Mark the register's status valid or
3423 unavailable, depending on whether a buffer was passed in or not.
3424 (supply_register_zeroed): New.
3425 (supply_regblock): Mark the registers' status valid or
3426 unavailable, depending on whether a buffer was passed in or not.
3427 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3428 (struct regcache): New `register_status' field.
3429 (supply_register_zeroed): Declare.
3430 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3431 supply_register_zeroed, rather than passing a NULL buffer to
3433 * tracepoint.c (fetch_traceframe_registers): Update comment.
3435 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3437 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3440 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3442 * server.h (decode_xfer_write): Change prototype.
3443 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3444 and don't extract the annex here.
3445 * server.c (decode_xfer_read): Remove `annex' parameter,
3446 and don't extract the annex here.
3448 (struct qxfer): New.
3449 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3450 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3451 (handle_qxfer_statictrace): New functions, abstracted out from
3452 handle_query, and made to use the struct qxfer interface.
3453 (handle_threads_qxfer_proper): Rename to ...
3454 (handle_qxfer_threads_proper): ... this.
3455 (handle_threads_qxfer): Rename to ...
3456 (handle_qxfer_threads): ... this. Adjust.
3457 (qxfer_packets): New array.
3458 (handle_qxfer): New function.
3459 (handle_query): Use handle_qxfer.
3461 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3463 * gdbreplay.c: Shorten lines of >= 80 columns.
3464 * linux-low.c: Ditto.
3465 * linux-ppc-low.c: Ditto.
3466 * linux-s390-low.c: Ditto.
3467 * linux-sparc-low.c: Ditto.
3468 * linux-x86-low.c: Ditto.
3469 * linux-xtensa-low.c: Ditto.
3470 * mem-break.c: Ditto.
3472 * regcache.h: Ditto.
3473 * remote-utils.c: Ditto.
3476 * thread-db.c: Ditto.
3477 * tracepoint.c: Ditto.
3479 * win32-low.h: Ditto.
3481 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3483 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3486 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3488 * server.c (gdbserver_version): Update copyright year in version
3490 * gdbreplay.c (gdbreplay_version): Ditto.
3492 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3494 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3495 * linux-bfin-low.c: New file.
3496 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3497 PT_DATA_ADDR for BFIN targets.
3498 * Makefile.in (SFILES): Add linux-bfin-low.c.
3499 (clean): Remove reg-bfin.c.
3500 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3501 * README: Mention supported Blackfin targets.
3503 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3505 * .gitignore: New file.
3507 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3509 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3511 2010-10-22 Jie Zhang <jie@codesourcery.com>
3513 * Makefile.in: Add FLAGS_TO_PASS variable.
3514 (install): Remove dependency of install-only and recursively
3515 invoke make for install-only.
3517 2010-10-04 Doug Evans <dje@google.com>
3519 * Makefile.in (uninstall): Use $(DESTDIR).
3521 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3525 * linux-x86-low.c (compat_siginfo_from_siginfo)
3526 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3527 si_code is < 0. Check for si_code == SI_TIMER before checking for
3530 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3532 * lynx-i386-low.c: New file.
3533 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3535 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3537 * lynx-low.c (ptrace_request_to_str): Remove handling for
3538 request values that have been removed in LynxOS 5.x.
3540 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3542 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3545 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3547 * configure.ac: Add --enable-inprocess-agent option.
3548 * configure: Rebuilt.
3550 2010-09-06 Yao Qi <yao@codesourcery.com>
3552 * linux-low.c (linux_kill): Remove unused variable.
3553 (linux_stabilize_threads): Likewise.
3554 * server.c (start_inferior): Likewise.
3555 (queue_stop_reply_callback): Likewise.
3556 * tracepoint.c (do_action_at_tracepoint): Likewise.
3558 2010-09-06 Yao Qi <yao@codesourcery.com>
3560 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3563 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3565 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3567 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3569 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3572 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3574 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3575 gdbserver/lynx-ppc-low.c: New files.
3576 * Makefile.in (lynx_low_h): New variable.
3577 (lynx-low.o, lynx-ppc-low.o): New rules.
3578 * configure.ac: On LynxOS, link with -lnetinet.
3579 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3580 * configure: regenerate.
3582 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3584 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3585 * configure.ac: Add check for vasprintf and vsnprintf.
3586 * configure, config.in: Regenerate.
3587 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3589 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3591 * gdbreplay.c: Move include of alloca.h up, next to include of
3593 * server.h: Add include of malloc.h.
3594 * mem-break.c: Remove include of malloc.h.
3595 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3597 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3599 * Makefile.in (memmem.o): Build with -Wno-error.
3601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3603 * utils.c (xsnprintf): Make non-static.
3604 * server.h: Add xsnprintf declaration.
3605 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3606 replace calls to snprintf by calls to xsnprintf throughout.
3608 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3610 * configure.ac: Add configure check for alloca.
3611 * configure, config.in: Regenerate.
3612 * server.h: Include alloca.h if it exists.
3613 * gdbreplay.c: Include alloca.h if it exists.
3615 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3617 * linux-low.c (__SIGRTMIN): Define if not already defined.
3618 (linux_create_inferior): Check for __ANDROID__ rather than
3620 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3621 are already deferred.
3622 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3623 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3624 stopped and already has a pending signal to report.
3625 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3626 a pending signal to report or is moving out of a jump pad.
3627 (linux_init_signals): Check for __ANDROID__ rather than
3630 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3632 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3633 debug_threads check. Avoid a linear search when not doing debug
3636 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3638 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3639 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3640 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3641 (process_event): Change local fd's type to gdb_fildes_t.
3642 (create_file_handler): Adjust prototype.
3643 (delete_file_handler): Adjust prototype.
3644 (handle_file_event): Adjust prototype. Use pfildes.
3645 (create_file_event): Adjsut prototype.
3646 * remote-utils.c (remote_desc, listen_desc): Change type to
3648 * server.h: New gdb_fildes_t typedef.
3649 [USE_WIN32API]: Include winsock2.h.
3650 (delete_file_handler, add_file_handler): Adjust prototypes.
3652 * utils.c (pfildes): New.
3654 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3656 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3657 * configure: Regenerate.
3659 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3661 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3662 (linux_done_accessing_memory): ... this.
3663 (linux_target_ops): Adjust.
3664 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3665 * nto-low.c (nto_target_ops): Adjust comment.
3666 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3667 * spu-low.c (spu_target_ops): Adjust comment.
3668 * target.h (target_ops): Rename unprepare_to_access_memory field
3669 to done_accessing_memory.
3670 (unprepare_to_access_memory): Rename to ...
3671 (done_accessing_memory): ... this.
3673 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3675 * linux-low.c (linux_prepare_to_access_memory): New.
3676 (linux_unprepare_to_access_memory): New.
3677 (linux_target_ops): Install them.
3678 * server.c (read_memory): Rename to ...
3679 (gdb_read_memory): ... this. Use
3680 prepare_to_access_memory/prepare_to_access_memory.
3681 (write_memory): Rename to ...
3682 (gdb_write_memory): ... this. Use
3683 prepare_to_access_memory/prepare_to_access_memory.
3684 (handle_search_memory_1): Adjust.
3685 (process_serial_event): Adjust.
3686 * target.h (struct target_ops): New fields
3687 prepare_to_access_memory and unprepare_to_access_memory.
3688 (prepare_to_access_memory, unprepare_to_access_memory): New.
3689 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3690 prepare_to_access_memory/prepare_to_access_memory.
3691 * nto-low.c (nto_target_ops): Adjust.
3692 * spu-low.c (spu_target_ops): Adjust.
3693 * win32-low.c (win32_target_ops): Adjust.
3695 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3697 * Makefile.in (WARN_CFLAGS): Get it from configure.
3698 (WERROR_CFLAGS): New.
3699 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3700 * configure.ac: Introduce --enable-werror, which adds -Werror to
3701 the compiler command line. Enabled by default. Disable with
3702 --disable-werror. Add -Wdeclaration-after-statement
3703 Wpointer-arith and -Wformat-nonliteral to warning flags.
3704 * configure: Regenerate.
3706 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3708 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3710 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3712 * gdbreplay.c (remote_error): New.
3714 (expect): Use gdbchar. Check for error reading from GDB.
3715 Clarify sync error output.
3716 (play): Check for errors writing to GDB.
3717 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3718 * remote-utils.c (getpkt): Check for errors writing to the remote
3721 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3723 * linux-low.c (linux_wait_1): Move non-debugging code out of
3724 `debug_threads' control.
3726 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3728 * linux-low.c (linux_wait_1): Don't set last_status here.
3729 * server.c (push_event, queue_stop_reply_callback): Assert we're
3730 not pushing a TARGET_WAITKIND_IGNORE event.
3731 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3732 (myresume, handle_target_event): Set the thread's last_resume_kind
3733 and last_status from the target returned status.
3735 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3739 * linux-x86-low.c (update_debug_registers_callback): New.
3740 (i386_dr_low_set_addr): Use it.
3741 (i386_dr_low_get_addr): New.
3742 (i386_dr_low_set_control): Use update_debug_registers_callback.
3743 (i386_dr_low_get_control): New.
3744 (i386_dr_low_get_status): Adjust.
3745 * linux-low.c (linux_stop_lwp): New.
3746 * linux-low.h (linux_stop_lwp): Declare.
3748 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3749 argument instead of a i386_debug_reg_state.
3750 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3751 a i386_debug_reg_state.
3752 (i386_insert_aligned_watchpoint): Adjust.
3753 (i386_remove_aligned_watchpoint): Adjust.
3754 (i386_low_stopped_data_address): Read the debug registers from the
3755 inferior instead of from the mirrors.
3756 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3757 (i386_dr_low_get_addr): Declare.
3758 (i386_dr_low_get_control): Declare.
3759 (i386_dr_low_get_status): Change prototype.
3761 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3762 (i386_dr_low_get_addr): New.
3763 (i386_dr_low_get_control): New.
3764 (i386_dr_low_get_status): Adjust prototype. Return
3766 (i386_initial_stuff): Clear dr_status_mirror and
3768 (i386_get_thread_context): Adjust.
3769 (i386_set_thread_context): Adjust.
3770 (i386_thread_added): Adjust.
3772 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3774 * linux-low.h (linux_thread_area): Delete declaration.
3776 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3778 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3779 after its termination.
3781 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3783 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3784 (gdb_wants_all_stopped): Delete.
3785 (linux_wait_1): Don't call them.
3786 * server.c (handle_v_cont): Tag all threads as want-stopped.
3787 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3788 stopped as "client-wants-stopped".
3790 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3792 * Makefile.in (signals_h): New.
3793 (server_h): Depend on it.
3794 (server.o): Don't depend on $(signals_def).
3795 (signals.o): Depend on $(signals_def).
3797 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3799 * Makefile.in (signals_def): New.
3800 (server_h): Append include/gdb/signals.h and signals_def.
3801 (server.o): Append signals_def.
3803 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3805 * server.c (handle_target_event): Use target_signal_to_host for
3806 resume_info.sig initialization.
3807 * target.h (struct thread_resume) <sig>: New comment.
3809 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3811 * server.c (handle_query): strcpy() the returned string from paddress()
3812 instead of sprintf().
3813 * utils.c (paddress): Return phex_nz().
3815 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3817 * server.c (handle_v_cont): Call mourn_inferior if process
3819 (myresume): Likewise.
3821 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3823 Static tracepoints, and integration with UST.
3825 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3826 * mem-break.c (uninsert_all_breakpoints)
3827 (reinsert_all_breakpoints): New.
3828 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3829 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3830 (gdb_agent_ust_loaded, helper_thread_id)
3831 (gdb_agent_helper_thread_id): New macros.
3832 (struct ipa_sym_addresses): Add addr_ust_loaded,
3833 addr_helper_thread_id, addr_cmd_buf.
3834 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3835 (in_process_agent_loaded_ust): New.
3836 (write_e_ust_not_loaded): New.
3837 (maybe_write_ipa_ust_not_loaded): New.
3838 (struct collect_static_trace_data_action): New.
3839 (enum tracepoint_type) <static_tracepoint>: New.
3840 (struct tracepoint) <handle>: Mention static tracepoints.
3841 (struct static_tracepoint_ctx): New.
3842 (CMD_BUF_SIZE): New.
3843 (add_tracepoint_action): Handle static tracepoint actions.
3844 (unprobe_marker_at): New.
3845 (clear_installed_tracepoints): Handle static tracepoints.
3846 (cmd_qtdp): Handle static tracepoints.
3847 (probe_marker_at): New.
3848 (cmd_qtstart): Handle static tracepoints.
3849 (response_tracepoint): Handle static tracepoints.
3850 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3851 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3852 (get_context_regcache): Handle static tracepoints.
3853 (do_action_at_tracepoint): Handle static tracepoint actions.
3854 (traceframe_find_block_type): Handle static trace data blocks.
3855 (traceframe_read_sdata): New.
3856 (download_tracepoints): Download static tracepoint actions.
3857 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3858 (GDB_PROBE_NAME): New.
3863 (ust_marker_to_static_tracepoint): New.
3865 (collect_ust_data_at_tracepoint): New.
3866 (gdb_ust_probe): New.
3867 (UNIX_PATH_MAX, SOCK_DIR): New.
3868 (gdb_ust_connect_sync_socket): New.
3869 (resume_thread, stop_thread): New.
3870 (run_inferior_command): New.
3871 (init_named_socket): New.
3872 (gdb_ust_socket_init): New.
3873 (cstr_to_hexstr): New.
3875 (first_marker, next_marker): New.
3876 (response_ust_marker): New.
3877 (cmd_qtfstm, cmd_qtsstm): New.
3878 (unprobe_marker_at, probe_marker_at): New.
3879 (cmd_qtstmat, gdb_ust_thread): New.
3880 (gdb_ust_init): New.
3881 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3882 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3884 (x86_64_st_collect_regmap): New.
3885 (X86_64_NUM_ST_COLLECT_GREGS): New.
3886 (AMD64_RIP_REGNUM): New.
3887 (supply_static_tracepoint_registers): New.
3888 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3890 (i386_st_collect_regmap): New.
3891 (i386_NUM_ST_COLLECT_GREGS): New.
3892 (supply_static_tracepoint_registers): New.
3893 * server.c (handle_query): Handle qXfer:statictrace:read.
3894 <qSupported>: Report support for StaticTracepoints, and
3895 qXfer:statictrace:read features.
3896 * server.h (traceframe_read_sdata)
3897 (supply_static_tracepoint_registers): Declare.
3898 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3899 (unpack_varlen_hex): Include in IPA build.
3900 * Makefile.in (ustlibs, ustinc): New.
3901 (IPA_OBJS): Add remote-utils-ipa.o.
3902 ($(IPA_LIB)): Link -ldl and -lpthread.
3904 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3905 * config.in, configure: Regenerate.
3907 2010-06-20 Ian Lance Taylor <iant@google.com>
3908 Pedro Alves <pedro@codesourcery.com>
3910 * linux-x86-low.c (always_true): Delete.
3911 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3912 trying to fool the compiler with always_true.
3914 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3916 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3917 conditions in gdbserver.
3919 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3921 * spu-low.c (spu_read_memory): Wrap around local store limit.
3922 (spu_write_memory): Likewise.
3924 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3926 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3927 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3929 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3931 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3932 uses with LONGEST uses.
3934 2010-06-14 Stan Shebs <stan@codesourcery.com>
3935 Pedro Alves <pedro@codesourcery.com>
3939 * linux-x86-low.c: Include limits.h.
3944 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3945 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3946 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3947 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3948 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3949 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3950 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3951 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3952 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3953 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3954 (amd64_emit_void_call_2): New.
3955 (amd64_emit_ops): New.
3956 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3957 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3958 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3959 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3960 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3961 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3962 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3963 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3964 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3965 (i386_emit_stack_adjust, i386_emit_int_call_1)
3966 (i386_emit_void_call_2): New.
3967 (i386_emit_ops): New.
3968 (x86_emit_ops): New.
3969 (the_low_target): Install x86_emit_ops.
3970 * server.h (struct emit_ops): New.
3971 (get_raw_reg_func_addr): Declare.
3972 (current_insn_ptr, emit_error): Declare.
3973 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3974 (set_trace_state_variable_value): New defines.
3975 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3976 addr_get_trace_state_variable_value and
3977 addr_set_trace_state_variable_value.
3978 (symbol_list): New fields for get_raw_reg,
3979 get_trace_state_variable_value and set_trace_state_variable_value.
3980 (condfn): New typedef.
3981 (struct tracepoint): New field `compiled_cond'.
3982 (do_action_at_tracepoint): Clear compiled_cond.
3983 (get_trace_state_variable_value, set_trace_state_variable_value):
3985 (condition_true_at_tracepoint): If there's a compiled condition,
3987 (current_insn_ptr, emit_error): New globals.
3988 (struct bytecode_address): New.
3989 (get_raw_reg_func_addr): New.
3990 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3991 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3992 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3993 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3994 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3995 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3996 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3997 (compile_tracepoint_condition, compile_bytecodes): New.
3998 * target.h (emit_ops): Forward declare.
3999 (struct target_ops): New field emit_ops.
4000 (target_emit_ops): New.
4001 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4002 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4003 * linux-low.c (linux_emit_ops): New.
4004 (linux_target_ops): Install it.
4005 * linux-low.h (struct linux_target_ops): New field emit_ops.
4007 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4009 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4010 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4012 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4013 Stan Shebs <stan@codesourcery.com>
4015 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4016 (all): Depend on $(extra_libraries).
4017 (install-only): Install the IPA.
4018 (IPA_OBJS, IPA_LIB): New.
4019 (clean): Remove the IPA lib.
4020 (IPAGENT_CFLAGS): New.
4021 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4022 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4023 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4024 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4025 * configure.ac: Check for atomic builtins support in the compiler.
4026 (IPA_DEPFILES, extra_libraries): Define.
4027 * configure.srv (ipa_obj): Add description.
4028 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4029 (i[34567]86-*-linux*): Set ipa_obj.
4030 (x86_64-*-linux*): Set ipa_obj.
4031 * linux-low.c (stabilizing_threads): New.
4032 (supports_fast_tracepoints): New.
4033 (linux_detach): Stabilize threads before detaching.
4034 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4035 the lwp is either not stabilizing, or is moving out of a jump pad.
4036 (linux_fast_tracepoint_collecting): New.
4037 (maybe_move_out_of_jump_pad): New.
4038 (enqueue_one_deferred_signal): New.
4039 (dequeue_one_deferred_signal): New.
4040 (linux_wait_for_event_1): If moving out of a jump pad, defer
4041 pending signals to later.
4042 (linux_stabilize_threads): New.
4043 (linux_wait_1): Check if threads need moving out of jump pads, and
4045 (stuck_in_jump_pad_callback): New.
4046 (move_out_of_jump_pad_callback): New.
4048 (linux_resume_one_lwp): Handle moving out of jump pads.
4049 (linux_set_resume_request): Dequeue deferred signals.
4050 (need_step_over_p): Also step over fast tracepoint jumps.
4051 (start_step_over): Also uninsert fast tracepoint jumps.
4052 (finish_step_over): Also reinsert fast tracepoint jumps.
4053 (linux_install_fast_tracepoint_jump): New.
4054 (linux_target_ops): Install linux_stabilize_threads and
4055 linux_install_fast_tracepoint_jump_pad.
4056 * linux-low.h (linux_target_ops) <get_thread_area,
4057 install_fast_tracepoint_jump_pad>: New fields.
4058 (struct lwp_info) <collecting_fast_tracepoint,
4059 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4060 (linux_get_thread_area): Declare.
4061 * linux-x86-low.c (jump_insn): New.
4062 (x86_get_thread_area): New.
4063 (append_insns): New.
4065 (amd64_install_fast_tracepoint_jump_pad): New.
4066 (i386_install_fast_tracepoint_jump_pad): New.
4067 (x86_install_fast_tracepoint_jump_pad): New.
4068 (the_low_target): Install x86_get_thread_area and
4069 x86_install_fast_tracepoint_jump_pad.
4070 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4071 (struct fast_tracepoint_jump): New.
4072 (fast_tracepoint_jump_insn): New.
4073 (fast_tracepoint_jump_shadow): New.
4074 (find_fast_tracepoint_jump_at): New.
4075 (fast_tracepoint_jump_here): New.
4076 (delete_fast_tracepoint_jump): New.
4077 (set_fast_tracepoint_jump): New.
4078 (uninsert_fast_tracepoint_jumps_at): New.
4079 (reinsert_fast_tracepoint_jumps_at): New.
4080 (set_breakpoint_at): Use write_inferior_memory.
4081 (uninsert_raw_breakpoint): Use write_inferior_memory.
4082 (check_mem_read): Mask out fast tracepoint jumps.
4083 (check_mem_write): Mask out fast tracepoint jumps.
4084 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4085 (set_fast_tracepoint_jump): Declare.
4086 (delete_fast_tracepoint_jump)
4087 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4088 (reinsert_fast_tracepoint_jumps_at): Declare.
4089 * regcache.c: Don't compile many functions when building the
4090 in-process agent library.
4091 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4092 the register buffer in the heap.
4093 (free_register_cache): If the register buffer isn't owned by the
4094 regcache, don't free it.
4095 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4096 pre-existing register caches.
4097 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4099 (convert_ascii_to_int): : Constify `from' parameter type.
4100 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4101 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4102 the needed buffer in-place.
4103 (relocate_instruction): New.
4104 * server.c (handle_query) <qSymbols>: If the target supports
4105 tracepoints, give it a chance of looking up symbols. Report
4106 support for fast tracepoints.
4107 (handle_status): Stabilize threads.
4108 (process_serial_event): Adjust.
4109 * server.h (struct fast_tracepoint_jump): Forward declare.
4110 (struct process_info) <fast_tracepoint_jumps>: New field.
4111 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4112 (decode_X_packet, decode_M_packet): Adjust.
4113 (relocate_instruction): Declare.
4114 (in_process_agent_loaded): Declare.
4115 (tracepoint_look_up_symbols): Declare.
4116 (struct fast_tpoint_collect_status): Declare.
4117 (fast_tracepoint_collecting): Declare.
4118 (force_unlock_trace_buffer): Declare.
4119 (handle_tracepoint_bkpts): Declare.
4120 (initialize_low_tracepoint)
4121 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4122 * target.h (struct target_ops) <stabilize_threads,
4123 install_fast_tracepoint_jump_pad>: New fields.
4124 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4125 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4126 [HAVE_STDINT_H]: Include stdint.h.
4127 (trace_debug_1): Rename to ...
4128 (trace_vdebug): ... this.
4129 (trace_debug): Rename to ...
4130 (trace_debug_1): ... this. Add `level' parameter.
4132 (ATTR_USED, ATTR_NOINLINE): New.
4133 (IP_AGENT_EXPORT): New.
4134 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4135 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4136 (about_to_request_buffer_space, trace_buffer_is_full)
4137 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4138 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4139 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4140 (traceframe_write_count, traceframes_created)
4141 (trace_state_variables)
4142 New renaming defines.
4143 (struct ipa_sym_addresses): New.
4144 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4146 (ipa_sym_addrs): New.
4147 (all_tracepoint_symbols_looked_up): New.
4148 (in_process_agent_loaded): New.
4149 (write_e_ipa_not_loaded): New.
4150 (maybe_write_ipa_not_loaded): New.
4151 (tracepoint_look_up_symbols): New.
4152 (debug_threads) [IN_PROCESS_AGENT]: New.
4153 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4154 (UNKNOWN_SIDE_EFFECTS): New.
4155 (stop_tracing): New.
4156 (flush_trace_buffer): New.
4157 (stop_tracing_bkpt): New.
4158 (flush_trace_buffer_bkpt): New.
4159 (read_inferior_integer): New.
4160 (read_inferior_uinteger): New.
4161 (read_inferior_data_pointer): New.
4162 (write_inferior_data_pointer): New.
4163 (write_inferior_integer): New.
4164 (write_inferior_uinteger): New.
4165 (struct collect_static_trace_data_action): Delete.
4166 (enum tracepoint_type): New.
4167 (struct tracepoint) <type>: New field `type'.
4168 <actions_str, step_actions, step_actions_str>: Only include in
4170 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4171 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4172 (tracepoints): Use IP_AGENT_EXPORT.
4173 (last_tracepoint): Don't include in the IPA.
4174 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4175 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4176 (alloced_trace_state_variables): New.
4177 (trace_state_variables): Use IP_AGENT_EXPORT.
4178 (traceframe_t): Delete unused variable.
4179 (circular_trace_buffer): Don't include in the IPA.
4180 (trace_buffer_start): Delete.
4181 (struct trace_buffer_control): New.
4182 (trace_buffer_free): Delete.
4183 (struct ipa_trace_buffer_control): New.
4184 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4185 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4187 (trace_buffer_ctrl): New.
4188 (TRACE_BUFFER_CTRL_CURR): New.
4189 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4190 Reimplement as macros.
4191 (trace_buffer_wrap): Delete.
4192 (traceframe_write_count, traceframe_read_count)
4193 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4194 (struct tracepoint_hit_ctx) <type>: New field.
4195 (struct fast_tracepoint_ctx): New.
4196 (memory_barrier): New.
4198 (record_tracepoint_error): Update atomically in the IPA.
4199 (clear_inferior_trace_buffer): New.
4200 (about_to_request_buffer_space): New.
4201 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4202 updating the same buffer.
4203 (add_tracepoint): Default the tracepoint's type to trap
4204 tracepoint, and orig_size to -1.
4205 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4207 (create_trace_state_variable): New parameter `gdb'. Handle it.
4208 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4209 (cmd_qtdp): Handle fast tracepoints.
4211 (max_jump_pad_size): New.
4212 (gdb_jump_pad_head): New.
4213 (get_jump_space_head): New.
4214 (claim_jump_space): New.
4215 (sort_tracepoints): New.
4216 (MAX_JUMP_SIZE): New.
4217 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4219 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4220 support. Upload fast traceframes, and delete internal IPA
4222 (stop_tracing_handler): New.
4223 (flush_trace_buffer_handler): New.
4224 (cmd_qtstop): Upload fast tracepoints.
4225 (response_tracepoint): Handle fast tracepoints.
4226 (tracepoint_finished_step): Upload fast traceframes. Set the
4227 tracepoint hit context's tracepoint type.
4228 (handle_tracepoint_bkpts): New.
4229 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4230 type. Add comment about fast tracepoints.
4231 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4232 non-existing action_str field.
4233 (get_context_regcache): Handle fast tracepoints.
4234 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4236 (fast_tracepoint_from_jump_pad_address): New.
4237 (fast_tracepoint_from_ipa_tpoint_address): New.
4238 (collecting_t): New.
4239 (force_unlock_trace_buffer): New.
4240 (fast_tracepoint_collecting): New.
4243 (write_inferior_data_ptr): New.
4244 (target_tp_heap): New.
4245 (target_malloc): New.
4246 (download_agent_expr): New.
4248 (download_tracepoints): New.
4249 (download_trace_state_variables): New.
4250 (upload_fast_traceframes): New.
4251 (IPA_FIRST_TRACEFRAME): New.
4252 (IPA_NEXT_TRACEFRAME_1): New.
4253 (IPA_NEXT_TRACEFRAME): New.
4254 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4255 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4256 (gdb_jump_pad_buffer_end): New.
4257 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4258 (initialize_tracepoint): Adjust.
4259 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4260 buffer. Initialize the low module.
4261 * utils.c (PREFIX, TOOLNAME): New.
4262 (malloc_failure): Use PREFIX.
4263 (error): In the IPA, an error causes an exit.
4264 (fatal, warning): Use PREFIX.
4265 (internal_error): Use TOOLNAME.
4266 (NUMCELLS): Increase to 10.
4267 * configure, config.in: Regenerate.
4269 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4271 * server.c (handle_query) <qSupported>: Do two passes over the
4272 qSupported string to avoid nesting strtok.
4274 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4276 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4278 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4280 * configure: Regenerate.
4281 * proc-service.list: New.
4283 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4285 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4288 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4290 * gdbreplay.c (remote_open): Check error return from socket() call by
4291 its equality to -1 not by it being negative.
4292 * remote-utils.c (remote_open): Likewise.
4294 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4296 * config.h: Regenerate.
4298 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4300 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4301 doesn't provide PTRACE_GET_THREAD_AREA.
4303 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4305 * linux-m68k-low.c: Include <asm/ptrace.h>
4306 (ps_get_thread_area): Implement.
4308 2010-05-03 Doug Evans <dje@google.com>
4310 * event-loop.c (struct callback_event): New struct.
4311 (callback_list): New global.
4312 (append_callback_event, delete_callback_event): New functions.
4313 (process_callback): New function.
4314 (start_event_loop): Call it.
4315 * remote-utils.c (NOT_SCHEDULED): Define.
4316 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4317 moved out of readchar.
4318 (readchar): Rewrite. Call reschedule before returning.
4319 (reset_readchar): New function.
4320 (remote_close): Call it.
4321 (process_remaining, reschedule): New functions.
4322 * server.h (callback_handler_func): New typedef.
4323 (append_callback_event, delete_callback_event): Declare.
4325 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4327 * proc-service.c (ps_pglobal_lookup): Use
4328 thread_db_look_up_one_symbol.
4329 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4330 parameter. Use it instead of all_symbols_looked_up.
4331 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4333 (all_symbols_looked_up): Don't declare.
4334 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4335 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4337 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4338 Set all_symbols_looked_up here.
4339 (thread_db_look_up_one_symbol): New.
4340 (thread_db_get_tls_address): Adjust.
4341 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4342 thread_db object on the heap, and tentatively set it in the
4344 (thread_db_init): Don't set all_symbols_looked_up here.
4345 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4347 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4349 * linux-low.c (linux_kill, linux_detach): Adjust.
4350 (status_pending_p_callback): Remove redundant statement. Check
4351 for !TARGET_WAITIKIND_IGNORE, instead of
4352 TARGET_WAITKIND_STOPPED.
4353 (handle_tracepoints): Make sure LWP is locked. Adjust.
4354 (linux_wait_for_event_1): Adjust.
4355 (linux_cancel_breakpoints): New.
4356 (unsuspend_one_lwp): New.
4357 (unsuspend_all_lwps): New.
4358 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4359 (send_sigstop_callback): Change return type to int, add new
4360 `except' parameter and handle it.
4361 (suspend_and_send_sigstop_callback): New.
4362 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4363 pass them down. If SUSPEND, also increment the lwp's suspend
4365 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4366 (need_step_over_p): Don't consider suspended LWPs.
4367 (start_step_over): Adjust.
4368 (proceed_one_lwp): Change return type to int, add new `except'
4369 parameter and handle it.
4370 (unsuspend_and_proceed_one_lwp): New.
4371 (proceed_all_lwps): Use find_inferior instead of
4373 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4374 also decrement the suspend count of LWPs. Pass `except' down,
4375 instead of hacking its suspend count.
4376 (linux_pause_all): Add `freeze' parameter. Adjust.
4377 (linux_unpause_all): New.
4378 (linux_target_ops): Install linux_unpause_all.
4379 * server.c (handle_status): Adjust.
4380 * target.h (struct target_ops): New fields `unpause_all' and
4381 `cancel_breakpoints'. Add new parameter to `pause_all'.
4382 (pause_all): Add new `freeze' parameter.
4384 (cancel_breakpoints): New.
4385 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4387 (cmd_qtstart): Pause threads.
4388 (stop_tracing): Pause threads, and cancel breakpoints.
4389 * win32-low.c (win32_target_ops): Adjust.
4391 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4393 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4394 the inferior right away from here...
4395 (linux_wait_1): ... to here, and adjust to check the thread's
4396 last_resume_kind instead of the lwp's step or stop_expected flags.
4398 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4400 * README: Use consistent `GDB' and `GDBserver' spellings.
4402 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4404 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4405 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4406 (linux_detach_one_lwp): Assume the lwp is stopped.
4407 (any_thread_of): Delete.
4408 (linux_detach): Stop all lwps here. Don't blindly delete all
4410 (delete_lwp_callback): New.
4411 (linux_mourn): Delete all lwps of the process that is gone.
4412 (linux_wait_1): Don't delete the last lwp of the process here.
4413 * mem-break.h (mark_breakpoints_out): Declare.
4414 * mem-break.c (mark_breakpoints_out): New.
4415 (free_all_breakpoints): Use it.
4416 * server.c (handle_target_event): If the process is gone, mark
4418 * thread-db.c (struct thread_db) <create_bp>: New field.
4419 (thread_db_enable_reporting): Fix prototype. Store a thread event
4420 breakpoint reference in the thread_db struct.
4421 (thread_db_load_search): Clear the thread_db object.
4422 (try_thread_db_load_1): Ditto.
4423 (switch_to_process): New.
4424 (disable_thread_event_reporting): Use it.
4425 (remove_thread_event_breakpoints): New.
4426 (thread_db_detach, thread_db_mourn): Use it.
4428 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4430 * linux-low.c (linux_enable_event_reporting): New.
4431 (linux_wait_for_event_1, handle_extended_wait): Use it.
4433 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4435 * linux-low.c (linux_kill_one_lwp, linux_kill)
4436 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4437 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4438 SIGSTOP even if the LWP is stopped.
4439 (send_sigstop_callback): New.
4440 (stop_all_lwps): Use send_sigstop_callback instead.
4441 (linux_resume_one_thread): Adjust.
4442 (proceed_one_lwp): Still proceed an LWP that the client has
4443 requested to stop, if we haven't reported it as stopped yet. Make
4444 sure that LWPs the client want stopped, have a pending SIGSTOP.
4446 2010-04-26 Doug Evans <dje@google.com>
4448 * server.c (handle_general_set): Make static.
4450 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4451 Print received char after testing for error/eof instead of before.
4452 (input_interrupt): Tweak comment.
4454 2010-04-23 Doug Evans <dje@google.com>
4456 * server.c (start_inferior): Print inferior argv if --debug.
4458 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4460 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4461 * nto-x86-low.c: Include server.h
4463 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4465 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4466 be consistent with other sources of this directory.
4467 (init_registers_amd64): Correct name of source file of this function
4470 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4472 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4475 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4477 * win32-i386-low.c: Add 64-bit support.
4478 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4479 (init_registers_amd64): Declare.
4480 (mappings): Add 64-bit version of array.
4481 (init_windows_x86): New function.
4482 (the_low_target): Change init_arch field to init_windows_x86.
4484 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4486 * win32-low.c: Adapt to support also 64-bit architecture.
4487 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4488 (get_image_name): Use SIZE_T type for local variable `done'.
4489 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4490 (toolhelp_get_dll_name): Idem.
4491 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4492 Use uintptr_t typecast to avoid warning.
4493 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4494 (handle_exception): Use phex_nz to avoid warning.
4495 (win32_wait): Remove unused local variable `process'.
4497 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4499 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4502 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4504 * configure.ac: Use `ws2_32' library for srv_mingw.
4505 * configure: Regenerate.
4506 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4507 * remote-utils.c: Likewise.
4509 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4511 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4512 if __x86_64__ is defined.
4514 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4516 * configure: Regenerate.
4518 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4520 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4521 * target.h (target_ops): New get_tib_address field.
4522 * win32-low.h (win32_thread_info): Add thread_local_base field.
4523 * win32-low.c (child_add_thread): Add tlb argument.
4524 Set thread_local_base field to TLB.
4525 (get_child_debug_event): Adapt to child_add_thread change.
4526 (win32_get_tib_address): New function.
4527 (win32_target_ops): Set get_tib_address field to
4528 win32_get_tib_address.
4529 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4531 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4533 * linux-low.c (linux_mourn): Also remove the process.
4534 * server.c (handle_target_event): Don't remove the process here.
4535 * nto-low.c (nto_mourn): New.
4536 (nto_target_ops): Install it.
4537 * spu-low.c (spu_mourn): New.
4538 (spu_target_ops): Install it.
4539 * win32-low.c (win32_mourn): New.
4540 (win32_target_ops): Install it.
4542 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4544 * server.h (buffer_xml_printf): Remove redundant `;'.
4546 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4548 * regcache.c (set_register_cache): Invalidate regcaches before
4549 changing the register cache layout.
4550 (regcache_invalidate_one): Allow a NULL regcache.
4551 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4552 regcaches before changing the register cache layout or the target
4555 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4557 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4558 variable warning on Linux/x86-64.
4560 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4562 GDBserver disconnected tracing support.
4564 * linux-low.c (linux_remove_process): Delete.
4565 (add_lwp): Don't set last_resume_kind here.
4566 (linux_kill): Use `mourn'.
4567 (linux_detach): Use `thread_db_detach', and `mourn'.
4569 (linux_attach_lwp_1): Adjust comment.
4570 (linux_attach): last_resume_kind moved the thread_info; adjust.
4571 (status_pending_p_callback): Adjust.
4572 (linux_wait_for_event_1): Adjust.
4573 (count_events_callback, select_singlestep_lwp_callback)
4574 (select_event_lwp_callback, cancel_breakpoints_callback)
4575 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4576 (proceed_one_lwp): Adjust.
4577 (linux_async): Add debug output.
4578 (linux_thread_stopped): New.
4579 (linux_pause_all): New.
4580 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4582 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4583 (thread_db_free): Delete declaration.
4584 (thread_db_detach, thread_db_mourn): Declare.
4585 * thread-db.c (thread_db_init): Use thread_db_mourn.
4586 (thread_db_free): Delete, split in two.
4587 (disable_thread_event_reporting): New.
4588 (thread_db_detach): New.
4589 (thread_db_mourn): New.
4591 * server.h (struct thread_info) <last_resume_kind>: New field.
4592 <attached>: Add comment.
4593 <gdb_detached>: New field.
4594 (handler_func): Change return type to int.
4595 (handle_serial_event, handle_target_event): Ditto.
4596 (gdb_connected): Declare.
4598 (disconnected_tracing): Declare.
4599 (stop_tracing): Declare.
4601 * server.c (handle_query) <qSupported>: Report support for
4602 disconnected tracing.
4603 (queue_stop_reply_callback): Account for running threads.
4604 (gdb_wants_thread_stopped): New.
4605 (gdb_wants_all_threads_stopped): New.
4606 (gdb_reattached_process): New.
4607 (handle_status): Clear the `gdb_detached' flag of all processes.
4608 In all-stop, stop all threads.
4609 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4610 (process_serial_event): If the remote connection breaks, or if an
4611 exit was forced with "monitor exit", force an event loop exit.
4612 Handle disconnected tracing on detach.
4613 (handle_serial_event): Adjust.
4614 (handle_target_event): If GDB isn't connected, forward events back
4615 to the inferior, unless the last process exited, in which case,
4616 exit gdbserver. Adjust interface.
4618 * remote-utils.c (remote_open): Don't block in accept. Instead
4619 register an event loop source on the listen socket file
4620 descriptor. Refactor bits into ...
4621 (listen_desc): ... this new global.
4622 (gdb_connected): ... this new function.
4623 (enable_async_notification): ... this new function.
4624 (handle_accept_event): ... this new function.
4625 (remote_close): Clear remote_desc.
4627 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4629 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4631 (mourn_inferior): Define.
4632 (target_process_qsupported): Avoid the dangling else problem.
4633 (thread_stopped): Define.
4634 (pause_all): Define.
4635 (target_waitstatus_to_string): Declare.
4636 * target.c (target_waitstatus_to_string): New.
4638 * tracepoint.c (tracing): Make extern.
4639 (disconnected_tracing): New.
4640 (stop_tracing): Make extern. Handle tracing stops due to GDB
4642 (cmd_qtdisconnected): New.
4643 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4644 (handle_tracepoint_general_set): Handle QTDisconnected.
4646 * event-loop.c (event_handler_func): Change return type to int.
4647 (process_event): Bail out if the event handler wants the event
4649 (handle_file_event): Ditto.
4650 (start_event_loop): Bail out if the event handler wants the event
4653 * nto-low.c (nto_target_ops): Adjust.
4654 * spu-low.c (spu_wait): Don't remove the process here.
4655 (spu_target_ops): Adjust.
4656 * win32-low.c (win32_wait): Don't remove the process here.
4657 (win32_target_ops): Adjust.
4659 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4661 * regcache.c (realloc_register_cache): Invalidate inferior's
4662 regcache before recreating it.
4664 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4666 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4668 2010-04-09 Stan Shebs <stan@codesourcery.com>
4669 Pedro Alves <pedro@codesourcery.com>
4671 * server.h (LONGEST): New.
4672 (struct thread_info) <while_stepping>: New field.
4673 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4675 (initialize_tracepoint, handle_tracepoint_general_set)
4676 (handle_tracepoint_query, tracepoint_finished_step)
4677 (tracepoint_was_hit, release_while_stepping_state_list):
4678 (current_traceframe): Declare.
4679 * server.c (handle_general_set): Handle tracepoint packets.
4681 (write_memory): New.
4682 (handle_search_memory_1): Use read_memory.
4683 (handle_query): Report support for conditional tracepoints, trace
4684 state variables, and tracepoint sources. Handle tracepoint
4686 (main): Initialize the tracepoints module.
4687 (process_serial_event): Handle traceframe reads/writes.
4689 * linux-low.c (handle_tracepoints): New.
4690 (linux_wait_1): Call it.
4691 (linux_resume_one_lwp): Handle while-stepping.
4692 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4693 (linux_target_ops): Install them.
4694 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4696 * linux-x86-low.c (x86_supports_tracepoints): New.
4697 (the_low_target). Install it.
4699 * mem-break.h (delete_breakpoint): Declare.
4700 * mem-break.c (delete_breakpoint): Make external.
4702 * target.h (struct target_ops): Add `supports_tracepoints',
4703 `read_pc', and `write_pc' fields.
4704 (target_supports_tracepoints): Define.
4705 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4708 * regcache.h (struct regcache) <registers_owned>: New field.
4709 (init_register_cache, regcache_cpy): Declare.
4710 (regcache_read_pc, regcache_write_pc): Declare.
4711 (register_cache_size): Declare.
4712 (supply_regblock): Declare.
4713 * regcache.c (init_register_cache): New.
4714 (new_register_cache): Use it.
4715 (regcache_cpy): New.
4716 (register_cache_size): New.
4717 (supply_regblock): New.
4718 (regcache_read_pc, regcache_write_pc): New.
4720 * tracepoint.c: New.
4722 * Makefile.in (OBS): Add tracepoint.o.
4723 (tracepoint.o): New rule.
4725 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4727 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4729 (i386-mmx.c): Likewise.
4730 (i386-mmx-linux.o): Likewise.
4731 (i386-mmx-linux.c): Likewise.
4733 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4734 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4735 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4736 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4738 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4739 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4740 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4742 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4744 * Makefile.in (clean): Updated.
4746 (i386-avx.c): Likewise.
4747 (i386-avx-linux.o): Likewise.
4748 (i386-avx-linux.c): Likewise.
4749 (amd64-avx.o): Likewise.
4750 (amd64-avx.c): Likewise.
4751 (amd64-avx-linux.o): Likewise.
4752 (amd64-avx-linux.c): Likewise.
4754 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4755 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4756 (srv_amd64_regobj): Add amd64-avx.o.
4757 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4758 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4759 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4760 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4761 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4762 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4763 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4765 * i387-fp.c: Include "i386-xstate.h".
4767 (i387_cache_to_xsave): Likewise.
4768 (i387_xsave_to_cache): Likewise.
4769 (x86_xcr0): Likewise.
4771 * i387-fp.h (i387_cache_to_xsave): Likewise.
4772 (i387_xsave_to_cache): Likewise.
4773 (x86_xcr0): Likewise.
4775 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4776 * linux-crisv32-low.c (target_regsets): Likewise.
4777 * linux-m68k-low.c (target_regsets): Likewise.
4778 * linux-mips-low.c (target_regsets): Likewise.
4779 * linux-ppc-low.c (target_regsets): Likewise.
4780 * linux-s390-low.c (target_regsets): Likewise.
4781 * linux-sh-low.c (target_regsets): Likewise.
4782 * linux-sparc-low.c (target_regsets): Likewise.
4783 * linux-xtensa-low.c (target_regsets): Likewise.
4785 * linux-low.c: Include <sys/uio.h>.
4786 (regsets_fetch_inferior_registers): Support nt_type.
4787 (regsets_store_inferior_registers): Likewise.
4788 (linux_process_qsupported): New.
4789 (linux_target_ops): Add linux_process_qsupported.
4791 * linux-low.h (regset_info): Add nt_type.
4792 (linux_target_ops): Add process_qsupported.
4794 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4796 (init_registers_i386_avx_linux): New.
4797 (init_registers_amd64_avx_linux): Likewise.
4798 (xmltarget_i386_linux_no_xml): Likewise.
4799 (xmltarget_amd64_linux_no_xml): Likewise.
4800 (PTRACE_GETREGSET): Likewise.
4801 (PTRACE_SETREGSET): Likewise.
4802 (x86_fill_xstateregset): Likewise.
4803 (x86_store_xstateregset): Likewise.
4804 (use_xml): Likewise.
4805 (x86_linux_update_xmltarget): Likewise.
4806 (x86_linux_process_qsupported): Likewise.
4807 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4808 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4809 init_registers_i386_linux here. Call
4810 x86_linux_update_xmltarget.
4811 (the_low_target): Add x86_linux_process_qsupported.
4813 * server.c (handle_query): Call target_process_qsupported.
4815 * target.h (target_ops): Add process_qsupported.
4816 (target_process_qsupported): New.
4818 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4820 * inferiors.c (add_thread): Set last_status kind to
4821 TARGET_WAITKIND_IGNORE.
4822 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4823 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4824 (linux_wait_1): Move `thread' local definition to block that uses
4825 it. Don't NULL initialize `event_child'.
4826 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4827 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4828 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4830 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4832 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4833 an extended waitstatus, or by a watchpoint.
4834 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4835 thread was stepping or has been stopped by a watchpoint.
4837 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4839 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4840 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4841 of another, then delete the previous, and validate all
4843 (validate_inserted_breakpoint): New.
4844 (delete_disabled_breakpoints): New.
4845 (validate_breakpoints): New.
4846 (check_mem_read): Validate breakpoints before trusting their
4847 shadow. Delete disabled breakpoints.
4848 (check_mem_write): Validate breakpoints before trusting they
4849 should be inserted. Delete disabled breakpoints.
4850 * mem-break.h (validate_breakpoints):
4851 * server.c (handle_query): Validate breakpoints when we see a
4854 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4856 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4857 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4858 if we could tell there's a GDB breakpoint at stop_pc.
4859 (need_step_over_p): Don't do a step over if we find a GDB
4860 breakpoint at the resume PC.
4862 * mem-break.c (struct raw_breakpoint): New.
4863 (enum bkpt_type): New type `gdb_breakpoint'.
4864 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4865 fields. New field `raw'.
4866 (find_raw_breakpoint_at): New.
4867 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4869 (set_breakpoint_at): Adjust.
4870 (delete_raw_breakpoint): New.
4871 (release_breakpoint): New.
4872 (delete_breakpoint): Rename to...
4873 (delete_breakpoint_1): ... this. Add proc parameter. Use
4874 release_breakpoint. Return ENOENT.
4875 (delete_breakpoint): Reimplement.
4876 (find_breakpoint_at): Delete.
4877 (find_gdb_breakpoint_at): New.
4878 (delete_breakpoint_at): Delete.
4879 (set_gdb_breakpoint_at): New.
4880 (delete_gdb_breakpoint_at): New.
4881 (gdb_breakpoint_here): New.
4882 (set_reinsert_breakpoint): Use release_breakpoint.
4883 (uninsert_breakpoint): Rename to ...
4884 (uninsert_raw_breakpoint): ... this.
4885 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4886 (reinsert_raw_breakpoint): Change parameter type to
4888 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4890 (check_breakpoints): Adjust. Use release_breakpoint.
4891 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4892 (breakpoint_inserted_here): Ditto.
4893 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4894 Don't trust the breakpoint's shadow if it is not inserted.
4895 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4896 (delete_all_breakpoints): Adjust.
4897 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4898 use delete_breakpoint_1.
4900 * mem-break.h (breakpoints_supported): Delete declaration.
4901 (set_gdb_breakpoint_at): Declare.
4902 (gdb_breakpoint_here): Declare.
4903 (delete_breakpoint_at): Delete.
4904 (delete_gdb_breakpoint_at): Declare.
4906 * server.h (struct raw_breakpoint): Forward declare.
4907 (struct process_info): New field `raw_breakpoints'.
4909 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4912 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4914 * linux-low.c (status_pending_p_callback): Fix comment.
4915 (linux_wait_for_event_1): Move most of the internal breakpoint
4916 handling from here...
4917 (linux_wait_1): ... to here.
4918 (count_events_callback): New.
4919 (select_singlestep_lwp_callback): New.
4920 (select_event_lwp_callback): New.
4921 (cancel_breakpoints_callback): New.
4922 (select_event_lwp): New.
4923 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4924 priority to all LWPs that have had events that should be reported
4925 to the client. Cancel breakpoints when about to reporting the
4926 event to the client, not while stopping lwps. No longer cancel
4927 finished single-steps here.
4928 (cancel_finished_single_step): Delete.
4929 (cancel_finished_single_steps): Delete.
4931 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4933 * mem-break.c (enum bkpt_type): New.
4934 (struct breakpoint): New field `type'.
4935 (set_breakpoint_at): Change return type to struct breakpoint
4936 pointer. Set type to `other_breakpoint' by default.
4937 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4938 in the breakpoint list.
4939 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4940 (reinsert_breakpoint): Rename to ...
4941 (reinsert_raw_breakpoint): ... this.
4942 (reinsert_breakpoints_at): Adjust.
4943 * mem-break.h (struct breakpoint): Declare.
4944 (set_breakpoint_at): Change return type to struct breakpoint
4947 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4949 * server.c (handle_query): Assign, not compare.
4951 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4953 Teach linux gdbserver to step-over-breakpoints.
4955 * linux-low.c (can_hardware_single_step): New.
4956 (supports_breakpoints): New.
4957 (handle_extended_wait): If stopping threads, read the stop pc of
4960 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4961 low target doesn't support retrieving the PC.
4962 (add_lwp): Set last_resume_kind to resume_continue.
4963 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4964 (linux_attach): Don't clear stop_expected. Set the lwp's
4965 last_resume_kind to resume_stop.
4966 (linux_detach_one_lwp): Don't check for removed breakpoints.
4967 (check_removed_breakpoint): Delete.
4968 (status_pending_p): Rename to ...
4969 (status_pending_p_callback): ... this. Don't check for removed
4970 breakpoints. Don't consider threads that are stopped from GDB's
4972 (linux_wait_for_lwp): Always read the stop_pc here.
4973 (cancel_breakpoint): New.
4974 (step_over_bkpt): New global.
4975 (linux_wait_for_event_1): Implement stepping over breakpoints.
4976 (gdb_wants_lwp_stopped): New.
4977 (gdb_wants_all_stopped): New.
4978 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4979 single-step traps here. Store the thread's last reported target
4981 (send_sigstop): Don't clear stop_expected. Always set it,
4983 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4984 (cancel_finished_single_step): New.
4985 (cancel_finished_single_steps): New.
4986 (wait_for_sigstop): Don't cancel finished single-step traps here.
4987 (linux_resume_one_lwp): Don't check for removed breakpoints.
4988 Don't set `step' on non-hardware step archs.
4989 (linux_set_resume_request): Ignore resume_stop requests if already
4990 stopping or stopped. Set the lwp's last_resume_kind.
4991 (resume_status_pending_p): Don't check for removed breakpoints.
4992 (need_step_over_p): New.
4993 (start_step_over): New.
4994 (finish_step_over): New.
4995 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4996 requests. Clear the thread's last reported target waitstatus.
4997 Don't use the `suspended' flag. Don't consider pending breakpoints.
4998 (linux_resume): Start a step-over if necessary.
4999 (proceed_one_lwp): New.
5000 (proceed_all_lwps): New.
5001 (unstop_all_lwps): New.
5002 * linux-low.h (struct lwp_info): Rewrite comment for the
5003 `suspended' flag. Add the `stop_pc' field. Delete the
5004 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5005 Add `'last_resume_kind' and `need_step_over' fields.
5006 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5007 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5008 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5009 (set_raw_breakpoint_at): New.
5010 (set_breakpoint_at): Rewrite to use it.
5011 (reinsert_breakpoint_handler): Delete.
5012 (set_reinsert_breakpoint): New.
5013 (reinsert_breakpoint_by_bp): Delete.
5014 (delete_reinsert_breakpoints): New.
5015 (uninsert_breakpoint): Rewrite.
5016 (uninsert_breakpoints_at): New.
5017 (reinsert_breakpoint): Rewrite.
5018 (reinsert_breakpoints_at): New.
5019 (check_breakpoints): Rewrite.
5020 (breakpoint_here): New.
5021 (breakpoint_inserted_here): New.
5022 (check_mem_read): Adjust.
5023 * mem-break.h (breakpoints_supported, breakpoint_here)
5024 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5025 (reinsert_breakpoint_by_bp): Delete declaration.
5026 (delete_reinsert_breakpoints): Declare.
5027 (reinsert_breakpoint): Delete declaration.
5028 (reinsert_breakpoints_at): Declare.
5029 (uninsert_breakpoint): Delete declaration.
5030 (uninsert_breakpoints_at): Declare.
5031 (check_breakpoints): Adjust prototype.
5032 * server.h: Adjust include order.
5033 (struct thread_info): Declare here. Add a `last_status' field.
5035 2010-03-23 Michael Snyder <msnyder@vmware.com>
5037 * server.c (crc32): New function.
5038 (handle_query): Add handling for 'qCRC:' request.
5040 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5042 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5043 lwp had been stopped by a watchpoint.
5045 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5047 * server.h (internal_error): Declare.
5048 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5049 * utils.c (internal_error): New function.
5051 2010-03-15 Andreas Schwab <schwab@redhat.com>
5053 * configure.srv: Fix typo setting srv_regobj.
5055 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5057 * linux-low.c (fetch_register): Avoid passing a non string literal
5059 (usr_store_inferior_registers): Ditto.
5061 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5063 * linux-low.c (linux_write_memory): Bail out early if peeking
5066 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5068 * linux-low.h (struct lwp_info): New fields
5069 `stopped_by_watchpoint' and `stopped_data_address'.
5070 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5071 here, and cache them in the lwp object.
5072 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5074 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5076 (linux_stopped_by_watchpoint): Rewrite.
5077 (linux_stopped_data_address): Rewrite.
5079 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5081 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5082 switching the current inferior, not before.
5084 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5086 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5087 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5088 i386-linux.c and amd64-linux.c.
5089 (reg-i386.o): Removed.
5090 (reg-i386.c): Likewise.
5091 (reg-i386-linux.o): Likewise.
5092 (reg-i386-linux.c): Likewise.
5093 (reg-x86-64.o): Likewise.
5094 (reg-x86-64.c): Likewise.
5095 (reg-x86-64-linux.o): Likewise.
5096 (reg-x86-64-linux.c): Likewise.
5099 (i386-linux.o): Likewise.
5100 (i386-linux.c): Likewise.
5101 (amd64.o): Likewise.
5102 (amd64.c): Likewise.
5103 (amd64-linux.o): Likewise.
5104 (amd64-linux.c): Likewise.
5106 * configure.srv (srv_i386_regobj): New.
5107 (srv_i386_linux_regobj): Likewise.
5108 (srv_amd64_regobj): Likewise.
5109 (srv_amd64_linux_regobj): Likewise.
5110 (srv_i386_32bit_xmlfiles): Likewise.
5111 (srv_i386_64bit_xmlfiles): Likewise.
5112 (srv_i386_xmlfiles): Likewise.
5113 (srv_amd64_xmlfiles): Likewise.
5114 (srv_i386_linux_xmlfiles): Likewise.
5115 (srv_amd64_linux_xmlfiles): Likewise.
5116 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5117 srv_xmlfiles to $srv_i386_xmlfiles.
5118 (i[34567]86-*-mingw32ce*): Likewise.
5119 (i[34567]86-*-mingw*): Likewise.
5120 (i[34567]86-*-nto*): Likewise.
5121 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5122 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5123 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5124 (x86_64-*-linux*): Likewise.
5126 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5127 (init_registers_amd64_linux): New.
5128 (x86_arch_setup): Replace init_registers_x86_64_linux with
5129 init_registers_amd64_linux.
5131 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5133 * configure.ac: Check for libdl. If it is not available link against
5134 static libthread_db.
5135 * configure: Regenerate.
5137 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5141 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5142 handing a read watchpoint.
5143 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5145 2010-02-12 Doug Evans <dje@google.com>
5147 * linux-low.c (linux_supports_tracefork_flag): Document.
5148 (linux_look_up_symbols): Add comment.
5150 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5152 * regcache.c (supply_register): Clear regcache if buf is NULL.
5154 2010-02-02 Nicolas Roche <roche@sourceware.org>
5155 Joel Brobecker <brobecker@adacore.com>
5157 * inferiors.c (find_inferior): Add function documentation.
5158 (unloaded_dll): Handle the case where the unloaded dll has not
5159 been previously registered in the dll list.
5161 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5163 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5164 (thumb2_breakpoint): New.
5165 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5167 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5169 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5170 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5173 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5175 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5177 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5179 * linux-s390-low.c (s390_collect_ptrace_register)
5180 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5182 2010-01-21 Doug Evans <dje@google.com>
5184 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5185 (PTRACE_ARG4_TYPE): New macro.
5186 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5187 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5188 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5189 (usr_store_inferior_registers): Ditto.
5190 (linux_read_memory, linux_write_memory): Ditto.
5191 (linux_test_for_tracefork): Ditto.
5193 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5194 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5196 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5198 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5201 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5203 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5204 prototype to take a regcache. Adjust.
5206 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5208 * regcache.h (struct thread_info): Forward declare.
5209 (struct regcache): New.
5210 (new_register_cache): Adjust prototype.
5211 (get_thread_regcache): Declare.
5212 (free_register_cache): Adjust prototype.
5213 (registers_to_string, registers_from_string): Ditto.
5214 (supply_register, supply_register_by_name, collect_register)
5215 (collect_register_as_string, collect_register_by_name): Ditto.
5216 * regcache.c (struct inferior_regcache_data): Delete.
5217 (get_regcache): Rename to ...
5218 (get_thread_regcache): ... this. Adjust. Switch inferior before
5220 (regcache_invalidate_one): Adjust.
5221 (regcache_invalidate): Fix prototype.
5222 (new_register_cache): Return the new register cache.
5223 (free_register_cache): Change prototype.
5224 (realloc_register_cache): Adjust.
5225 (registers_to_string): Change prototype to take a regcache. Adjust.
5226 (registers_from_string): Ditto.
5227 (register_data): Ditto.
5228 (supply_register): Ditto.
5229 (supply_register_by_name): Ditto.
5230 (collect_register): Ditto.
5231 (collect_register_as_string): Ditto.
5232 (collect_register_by_name): Ditto.
5233 * server.c (process_serial_event): Adjust.
5234 * linux-low.h (regset_fill_func, regset_store_func): Change
5236 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5238 * linux-low.c (get_stop_pc): Adjust.
5239 (check_removed_breakpoint): Adjust.
5240 (linux_wait_for_event): Adjust.
5241 (linux_resume_one_lwp): Adjust.
5242 (fetch_register): Add regcache parameter. Adjust.
5243 (usr_store_inferior_registers): Ditto.
5244 (regsets_fetch_inferior_registers): Ditto.
5245 (regsets_store_inferior_registers): Ditto.
5246 (linux_fetch_registers, linux_store_registers): Ditto.
5247 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5249 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5251 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5252 prototype to take a regcache.
5253 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5254 * remote-utils.c (convert_ascii_to_int, outreg)
5255 (prepare_resume_reply): Change prototype to take a regcache.
5257 * target.h (struct target_ops) <fetch_registers, store_registers>:
5258 Change prototype to take a regcache.
5259 (fetch_inferior_registers, store_inferior_registers): Change
5260 prototype to take a regcache. Adjust.
5261 * proc-service.c (ps_lgetregs): Adjust.
5262 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5263 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5264 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5265 take a regcache. Adjust.
5266 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5267 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5268 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5269 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5270 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5271 (cris_cannot_fetch_register):
5272 (cris_breakpoint_at): Change prototype to take a regcache.
5274 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5275 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5276 to take a regcache. Adjust.
5277 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5279 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5280 take a regcache. Adjust.
5281 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5282 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5283 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5284 * linux-mips-low.c (mips_get_pc):
5285 (mips_set_pc): Change prototype to take a regcache. Adjust.
5286 (mips_reinsert_addr): Adjust.
5287 (mips_collect_register): Change prototype to take a regcache.
5289 (mips_supply_register):
5290 (mips_collect_register_32bit, mips_supply_register_32bit)
5291 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5292 (mips_store_fpregset): Ditto.
5293 * linux-ppc-low.c (ppc_supply_ptrace_register)
5294 (ppc_supply_ptrace_register): Ditto.
5295 (parse_spufs_run): Adjust.
5296 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5297 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5298 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5299 take a regcache. Adjust.
5300 * linux-s390-low.c (s390_collect_ptrace_register)
5301 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5302 (s390_set_pc): Change prototype to take a regcache. Adjust.
5303 (s390_arch_setup): Adjust.
5304 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5305 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5306 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5307 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5308 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5310 (sparc_breakpoint_at): Adjust.
5311 * linux-xtensa-low.c (xtensa_fill_gregset):
5312 (xtensa_store_gregset):
5313 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5314 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5315 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5316 prototype to take a regcache. Adjust.
5317 * win32-arm-low.c (arm_fetch_inferior_register)
5318 (arm_store_inferior_register): Change prototype to take a
5320 * win32-i386-low.c (i386_fetch_inferior_register)
5321 (i386_store_inferior_register): Change prototype to take a
5323 * win32-low.c (child_fetch_inferior_registers)
5324 (child_store_inferior_registers): Change prototype to take a
5326 (win32_wait): Adjust.
5327 (win32_fetch_inferior_registers): Change prototype to take a
5329 (win32_store_inferior_registers): Adjust.
5330 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5331 store_inferior_register>: Change prototype to take a regcache.
5333 2010-01-20 Doug Evans <dje@google.com>
5335 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5337 (linux_wait_for_event1, linux_init_signals): Ditto.
5338 (W_STOPCODE): Provide definition if missing.
5340 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5342 * linux-low.c (linux_core_of_thread): New.
5343 (compare_ints, show_process, list_threads): New.
5344 (linux_qxfer_osdata): Report threads and cores.
5345 (linux_target_op): Register linux_core_of_thread.
5346 * remote-utils.c (prepare_resume_reply): Report the core.
5347 (buffer_xml_printf): Support %d specifier.
5348 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5350 (handle_query): Handle qXfer:threads. Announce availability
5352 * target.h (struct target_ops): New field core_of_thread.
5354 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5356 * Makefile.in (clean): Remove new generated files.
5357 (reg-s390.o, reg-s390.c): Remove rules.
5358 (reg-s390x.o, reg-s390x.c): Likewise.
5359 (s390-linux32.o, s390-linux32.c): Add rules.
5360 (s390-linux64.o, s390-linux64.c): Likewise.
5361 (s390x-linux64.o, s390x-linux64.c): Likewise.
5362 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5363 * linux-s390-low.c: Include <elf.h>.
5364 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5365 (init_registers_s390): Remove prototype.
5366 (init_registers_s390x): Likewise.
5367 (init_registers_s390_linux32): Add prototype.
5368 (init_registers_s390_linux64): Likewise.
5369 (init_registers_s390x_linux64): Likewise.
5370 (s390_num_regs_3264): New define.
5371 (s390_regmap_3264): New global variable.
5372 (s390_cannot_fetch_register): Remove obsolete check.
5373 (s390_cannot_store_register): Likewise.
5374 (s390_collect_ptrace_register): Handle upper/lower register halves.
5375 (s390_supply_ptrace_register): Likewise.
5376 (s390_fill_gregset): Update to register number changes.
5377 (s390_get_hwcap): New routine.
5378 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5379 Install appropriate regmap and register set.
5381 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5383 * server.c (gdbserver_version): Update copyright year to 2010.
5384 * gdbreplay.c (gdbreplay_version): Likewise.
5386 2009-12-28 Doug Evans <dje@google.com>
5388 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5389 elf/external.h. Include <elf.h> instead but only if necessary.
5391 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5393 * linux-low.c (linux_remove_process): Remove `detaching'
5394 parameter. Don't release/detach from thread_db here.
5395 (linux_kill): Release/detach from thread_db here, ...
5396 (linux_detach): ... and here, before actually detaching.
5397 (linux_wait_1): ... and here, when a process exits.
5398 * thread-db.c (any_thread_of): New.
5399 (thread_db_free): Switch the current inferior to a thread of the
5402 2009-12-21 Doug Evans <dje@google.com>
5404 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5406 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5407 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5408 warning ifndef __NR_tkill. Move setting of errno there too.
5409 Delete unnecessary resetting of errno after syscall.
5410 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5412 * configure.ac: Check for dladdr.
5413 * config.in: Regenerate.
5414 * configure: Regenerate.
5415 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5416 (try_thread_db_load): Update.
5418 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5420 2009-12-18 Doug Evans <dje@google.com>
5422 * event-loop.c: Include unistd.h if it exists.
5424 * linux-low.c (my_waitpid): Move definition away from being in
5425 between linux_tracefork_child/linux_test_for_tracefork.
5427 * gdb_proc_service.h (psaddr_t): Fix type.
5428 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5429 signature to match glibc.
5431 2009-12-16 Doug Evans <dje@google.com>
5433 * linux-low.c (linux_read_memory): Fix argument to read.
5435 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5437 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5438 events, don't leave current_inferior pointing at null.
5440 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5442 * win32-low.c (LOG): Delete.
5443 (OUTMSG): Output to stderr.
5444 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5445 on compile time LOG macro.
5446 (win32_wait): Fix debug output.
5448 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5450 * win32-low.c (win32_add_one_solib): If the dll name is
5451 "ntdll.dll", prepend the system directory to the dll path.
5453 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5455 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5457 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5458 Vladimir Prus <vladimir@codesourcery.com>
5460 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5461 * configure.ac: Check for __mcoldfire__ and set
5462 gdb_cv_m68k_is_coldfire.
5463 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5464 reg-cf.o and reg-m68k.o.
5465 * configure: Regenerated.
5467 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5469 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5470 Pass it to thread_db_free.
5471 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5472 proper `detaching' argument to linux_remove_process.
5473 * linux-low.h (thread_db_free): Add `detaching' parameter.
5474 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5476 (thread_db_free): Add `detaching' parameter. Only
5477 call td_ta_clear_event if detaching from process.
5479 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5481 * thread-db.c (thread_db_free): Fix typo.
5483 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5486 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5488 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5490 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5491 with an i686 compiler.
5492 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5494 * configure: Rebuilt.
5496 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5500 * server.c (handle_search_memory_1): Correct read_addr initialization
5501 in loop for searching subsequent chunks.
5503 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5505 * configure.ac: New --with-libthread-db option.
5506 * thread-db.c: Allow direct dependence on libthread_db.
5507 (thread_db_free): Adjust.
5508 * config.in: Regenerate.
5509 * configure: Likewise.
5511 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5514 * thread-db.c (attach_thread): New function.
5515 (maybe_attach_thread): Return success/failure.
5516 (find_new_threads_callback): Adjust.
5517 (thread_db_find_new_threads): Loop until no new threads.
5519 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5521 * proc-service.c (ps_lgetregs): Formatting.
5523 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5525 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5526 * configure.ac: Adjust.
5527 * linux-low.h (struct process_info_private): Move members to struct
5529 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5530 * linux-low.c (linux_remove_process): Adjust.
5531 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5532 * server.c (handle_query): Move code ...
5533 (handle_monitor_command): ... here. New function.
5534 * target.h (struct target_ops): New member.
5535 * thread-db.c (struct thread_db): New.
5536 (libthread_db_search_path): New variable.
5537 (thread_db_create_event, thread_db_enable_reporting)
5538 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5539 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5540 (try_thread_db_load_1, dladdr_to_soname): New functions.
5541 (try_thread_db_load, thread_db_load_search): New functions.
5542 (thread_db_init): Search for libthread_db.
5543 (thread_db_free): New function.
5544 (thread_db_handle_monitor_command): Likewise.
5545 * config.in: Regenerate.
5546 * configure: Regenerate.
5548 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5550 * spu-low.c (spu_kill): Wait for inferior to terminate.
5551 Call clear_inferiors.
5552 (spu_detach): Call clear_inferiors.
5554 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5556 * aclocal.m4: Regenerate.
5557 * config.in: Likewise.
5558 * configure: Likewise.
5560 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5562 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5563 (parse_spufs_run): New function.
5564 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5565 (ppc_breakpoint_at): Handle SPU breakpoints.
5567 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5569 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5570 (SPUFS_MAGIC): Define.
5571 (spu_enumerate_spu_ids): New function.
5572 (linux_qxfer_spu): New function.
5573 (linux_target_ops): Install linux_qxfer_spu.
5575 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5577 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5578 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5579 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5580 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5581 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5582 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5583 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5584 (init_registers_powerpc_cell32l): Add prototype.
5585 (init_registers_powerpc_cell64l): Likewise.
5586 (ppc_arch_setup): Detect Cell/B.E. architecture.
5588 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5590 * Makefile.in (datarootdir): New variable.
5592 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5594 * linux-low.c (linux_write_memory): Update debugging output.
5595 * Makefile.in (clean): Add new descriptions.
5596 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5597 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5598 * configure.srv: Add new files for arm*-*-linux*.
5599 * linux-arm-low.c: Add new declarations.
5600 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5601 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5602 (HWCAP_VFPv3D16): New.
5603 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5604 instead of __IWMMXT__.
5605 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5606 (arm_arch_setup): New.
5607 (target_regsets): Remove #ifdef. Add VFP regset.
5608 (the_low_target): Use arm_arch_setup.
5610 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5612 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5613 the main thread again.
5615 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5617 Adding Neutrino gdbserver.
5618 * configure: Regenerated.
5619 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5620 * configure.srv (i[34567]86-*-nto*): New target.
5621 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5622 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5623 (nto_comctrl) [__QNX__]: New function.
5624 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5626 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5628 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5631 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5632 Pedro Alves <pedro@codesourcery.com>
5634 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5635 don't support CONTEXT_EXTENDED_REGISTERS.
5636 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5637 (the_low_target): Install them.
5638 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5639 failing with ERROR_PIPE_NOT_CONNECTED.
5641 2009-06-30 Doug Evans <dje@google.com>
5642 Pierre Muller <muller@ics.u-strasbg.fr>
5644 Add h/w watchpoint support to x86-linux, win32-i386.
5645 * Makefile.in (SFILES): Add i386-low.c
5646 (i386_low_h): Define.
5647 (i386-low.o): Add dependencies.
5648 (linux-x86-low.o): Add i386-low.h dependency.
5649 (win32-i386-low.o): Ditto.
5650 * i386-low.c: New file.
5651 * i386-low.h: New file.
5652 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5653 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5654 * linux-low.c (linux_add_process): Initialize arch_private.
5655 (linux_remove_process): Free arch_private.
5656 (add_lwp): Initialize arch_private.
5657 (delete_lwp): Free arch_private.
5658 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5660 * linux-low.h (process_info_private): New member arch_private.
5661 (lwp_info): New member arch_private.
5662 (linux_target_ops): New members new_process, new_thread,
5664 (ptid_of): New macro.
5665 * linux-x86-low.c: Include stddef.h, i386-low.h.
5666 (arch_process_info): New struct.
5667 (arch_lwp_info): New struct.
5668 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5669 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5670 (i386_dr_low_get_status): New function.
5671 (x86_insert_point, x86_remove_point): New functions.
5672 (x86_stopped_by_watchpoint): New function.
5673 (x86_stopped_data_address): New function.
5674 (x86_linux_new_process, x86_linux_new_thread): New functions.
5675 (x86_linux_prepare_to_resume): New function.
5676 (the_low_target): Add entries for insert_point, remove_point,
5677 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5679 * server.c (debug_hw_points): New global.
5680 (monitor_show_help): Document set debug-hw-points.
5681 (handle_query): Process "set debug-hw-points".
5682 * server.h (debug_hw_points): Declare.
5683 (paddress): Declare.
5684 * utils.c (NUMCELLS, CELLSIZE): New macros.
5685 (get_sell, xsnprintf, paddress): New functions.
5686 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5687 remove_point, stopped_by_watchpoint, stopped_data_address.
5688 * win32-i386-low.c: Include i386-low.h.
5689 (debug_reg_state): Replaces dr.
5690 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5691 (i386_dr_low_get_status): New function.
5692 (i386_insert_point, i386_remove_point): New functions.
5693 (i386_stopped_by_watchpoint): New function.
5694 (i386_stopped_data_address): New function.
5695 (i386_initial_stuff): Update.
5696 (get_thread_context,set_thread_context,i386_thread_added): Update.
5697 (the_low_target): Add entries for insert_point,
5698 remove_point, stopped_by_watchpoint, stopped_data_address.
5699 * win32-low.c (win32_insert_watchpoint): New function.
5700 (win32_remove_watchpoint): New function.
5701 (win32_stopped_by_watchpoint): New function.
5702 (win32_stopped_data_address): New function.
5703 (win32_target_ops): Add entries for insert_watchpoint,
5704 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5705 * win32-low.h (win32_target_ops): New members insert_point,
5706 remove_point, stopped_by_watchpoint, stopped_data_address.
5708 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5710 * server.c (process_serial_event): Re-return unsupported, not
5711 error, if the type isn't recognized. Re-allow supporting only
5712 insert or remove packets. Also call require_running for
5713 breakpoints. Add missing break statement to default case. Tidy.
5714 * target.h (struct target_ops): Rename insert_watchpoint to
5715 insert_point, and remove_watchpoint to remove_point.
5717 * linux-low.h (struct linux_target_ops): Likewise.
5718 * linux-low.c (linux_insert_watchpoint): Rename to ...
5719 (linux_insert_point): ... this. Adjust.
5720 (linux_remove_watchpoint): Rename to ...
5721 (linux_remove_point): ... this. Adjust.
5722 (linux_target_ops): Adjust.
5723 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5724 (cris_insert_point): ... this.
5725 (cris_remove_watchpoint): Rename to ...
5726 (cris_remove_point): ... this.
5727 (the_low_target): Adjust.
5729 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5731 * server.c (handle_v_kill): Pass signal_pid to
5732 kill_inferior if multi_process is zero.
5734 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5736 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5737 * target.h (target_ops): Comment for *_watchpoint to make it clear
5738 the functions can get types '0' and '1'.
5740 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5742 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5743 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5744 * regcache.c (get_regcache): Likewise.
5745 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5746 * win32-low.c (child_fetch_inferior_registers): Remove check for
5749 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5750 Pedro Alves <pedro@codesourcery.com>
5752 * target.h (struct target_ops) <supports_multi_process>: New
5754 (target_supports_multi_process): New.
5755 * server.c (handle_query): Even if GDB reports support, only
5756 enable multi-process if the target also supports it. Report
5757 multi-process support only if the target backend supports it.
5758 * linux-low.c (linux_supports_multi_process): New function.
5759 (linux_target_ops): Install it as target_supports_multi_process
5762 2009-05-24 Doug Evans <dje@google.com>
5764 Global renaming of find_thread_pid to find_thread_ptid.
5765 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5766 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5767 All callers updated.
5769 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5770 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5773 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5774 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5775 (linux_resume_one_lwp): Ditto.
5777 2009-05-23 Doug Evans <dje@google.com>
5779 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5780 from struct inferior_list_entry * to struct lwp_info *.
5781 All callers updated.
5783 2009-05-13 Doug Evans <dje@google.com>
5785 * linux-x86-low.c: Don't include assert.h.
5786 (x86_siginfo_fixup): Use fatal, not assert.
5787 (x86_arch_setup): Fix comment.
5789 2009-05-12 Doug Evans <dje@google.com>
5791 Biarch support for i386/amd64 gdbserver.
5792 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5793 Add linux-x86-low.c.
5794 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5795 (linux-x86-low.o): Add.
5796 * linux-x86-64-low.c: Delete.
5797 * linux-i386-low.c: Delete.
5798 * linux-x86-low.c: New file.
5799 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5801 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5803 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5804 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5805 (linux_child_pid_to_exec_file): New function.
5806 (elf_64_header_p, elf_64_file_p): New functions.
5807 (siginfo_fixup): New function.
5808 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5809 give target a chance to convert layout.
5810 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5811 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5813 2009-05-07 Doug Evans <dje@google.com>
5815 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5816 (regsets_store_inferior_registers): Ditto.
5818 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5822 * linux-low.c (must_set_ptrace_flags): Delete.
5823 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5825 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5826 `lwp->must_set_ptrace_flags' instead.
5827 (linux_wait_for_event_1): Set ptrace options here.
5828 (linux_wait_1): ... not here.
5830 2009-04-30 Doug Evans <dje@google.com>
5832 * inferiors.c (started_inferior_callback): New function.
5833 (attached_inferior_callback): New function.
5834 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5835 * server.c (print_started_pid, print_attached_pid): New functions.
5836 (detach_or_kill_for_exit): New function.
5837 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5838 * server.h (have_started_inferiors_p): Declare.
5839 (have_attached_inferiors_p): Declare.
5841 * inferiors.c (remove_process): Fix memory leak, free process.
5842 * linux-low.c (linux_remove_process): New function.
5843 (linux_kill): Call it instead of remove_process.
5844 (linux_detach, linux_wait_1): Ditto.
5846 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5848 * configure.srv: Add x86 Windows CE target.
5850 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5852 * inferiors.c (get_thread_process): Make global.
5853 * server.h (get_thread_process): Add prototype.
5854 * thread-db.c (find_one_thread): Use get_thread_process
5855 instead of current_process.
5856 (thread_db_get_tls_address): Do not crash if called when
5857 thread layer is not yet initialized.
5859 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5861 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5862 * spu-low.c (current_tid): Rename to ...
5863 (current_ptid): ... this.
5864 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5865 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5866 ptid_get_lwp (current_ptid) instead of current_tid.
5867 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5868 instead of current_tid. Use find_process_pid to verify pid
5869 argument is valid. Pass proper argument to remove_process.
5870 (spu_thread_alive): Compare current_ptid instead of current_tid.
5871 (spu_resume): Likewise.
5873 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5875 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5878 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5880 Implement the multiprocess extensions, and add linux multiprocess
5883 * server.h (ULONGEST): Declare.
5884 (struct ptid, ptid_t): New.
5885 (minus_one_ptid, null_ptid): Declare.
5886 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5887 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5888 (struct inferior_list_entry): Change `id' type from unsigned from
5890 (struct sym_cache, struct breakpoint, struct
5891 process_info_private): Forward declare.
5892 (struct process_info): Declare.
5893 (current_process): Declare.
5894 (all_processes): Declare.
5895 (initialize_inferiors): Declare.
5896 (add_thread): Adjust to use ptid_t.
5897 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5898 (add_process, remove_process, find_thread_pid): Declare.
5899 (find_inferior_id): Adjust to use ptid_t.
5900 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5901 (multi_process): Declare.
5902 (push_event): Adjust to use ptid_t.
5903 (read_ptid, write_ptid): Declare.
5904 (prepare_resume_reply): Adjust to use ptid_t.
5905 (clear_symbol_cache): Declare.
5906 * inferiors.c (all_processes): New.
5907 (null_ptid, minus_one_ptid): New.
5908 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5909 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5910 (add_thread): Change unsigned long to ptid. Remove gdb_id
5912 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5913 (gdb_id_to_thread): Rename to ...
5914 (find_thread_pid): ... this. Change unsigned long to ptid.
5915 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5916 (loaded_dll, pull_pid_from_list): Adjust.
5917 (add_process, remove_process, find_process_pid)
5918 (get_thread_process, current_process, initialize_inferiors): New.
5919 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5920 (struct target_waitstatus) <related_pid>: Ditto.
5921 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5923 (struct target_ops) <join>: Add `pid' argument.
5924 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5925 (struct target_ops) <wait>: Add `ptid' field. Change return type
5927 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5928 (mywait): Add `ptid' argument. Change return type to ptid_t.
5929 (target_pid_to_str): Declare.
5930 * target.c (set_desired_inferior): Adjust to use ptids.
5931 (mywait): Add new `ptid' argument. Adjust.
5932 (target_pid_to_str): New.
5933 * mem-break.h (free_all_breakpoints): Declare.
5934 * mem-break.c (breakpoints): Delelete.
5935 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5936 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5937 to use per-process breakpoint list.
5938 (free_all_breakpoints): New.
5939 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5940 (symbol_cache, all_symbols_looked_up): Delete.
5942 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5944 (prepare_resume_reply): Change ptid argument's type from unsigned
5945 long to ptid_t. Adjust. Implement W;process and X;process.
5946 (free_sym_cache, clear_symbol_cache): New.
5947 (look_up_one_symbol): Adjust to per-process symbol cache. *
5948 * server.c (cont_thread, general_thread, step_thread): Change type
5951 (multi_process): New.
5952 (last_ptid): Change type to ptid_t.
5953 (struct vstop_notif) <ptid>: Change type to ptid_t.
5954 (queue_stop_reply, push_event): Change `ptid' argument's type to
5956 (discard_queued_stop_replies): Add `pid' argument.
5957 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5958 changes. Don't reference the `attached' global.
5959 (attach_inferior): Adjust to mywait interface changes.
5960 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5961 features. Handle and report "multiprocess+". Handle
5963 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5965 (handle_v_kill): New.
5966 (handle_v_stopped): Adjust to use target_pid_to_str.
5967 (handle_v_requests): Allow multiple attaches and runs when
5968 multiprocess extensions are in effect. Handle "vKill".
5969 (myresume): Adjust to use ptids.
5970 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5971 (handle_status): Adjust to discard_queued_stop_replies interface
5973 (first_thread_of, kill_inferior_callback)
5974 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5975 (main): Call initialize_inferiors. Adjust to use ptids, killing
5976 and detaching from all inferiors. Handle multiprocess packet
5978 * linux-low.h: Include gdb_proc_service.h.
5979 (struct process_info_private): New.
5980 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5981 <lwpid_of>: Use ptid_get_lwp.
5982 (get_lwp_thread): Adjust.
5983 (struct lwp_info): Add `dead' member.
5984 (find_lwp_pid): Declare.
5985 * linux-low.c (thread_db_active): Delete.
5986 (new_inferior): Adjust comment.
5987 (inferior_pid): Delete.
5988 (linux_add_process): New.
5989 (handle_extended_wait): Adjust.
5990 (add_lwp): Change unsigned long to ptid.
5991 (linux_create_inferior): Add process to processes table. Adjust
5992 to use ptids. Don't set new_inferior here.
5993 (linux_attach_lwp): Rename to ...
5994 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5995 it. Adjust to use ptids.
5996 (linux_attach_lwp): New.
5997 (linux_attach): Add process to processes table. Don't set
5999 (struct counter): New.
6000 (second_thread_of_pid_p, last_thread_of_process_p): New.
6001 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6003 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6004 processes. Remove process from process table.
6005 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6006 to multiple processes.
6007 (any_thread_of): New.
6008 (linux_detach): Add `pid' argument, and handle it. Remove process
6009 from processes table.
6010 (linux_join): Add `pid' argument. Handle it.
6011 (linux_thread_alive): Change unsighed long argument to ptid_t.
6012 Consider dead lwps as not being alive.
6013 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6014 threads we're not interested in.
6015 (same_lwp, find_lwp_pid): New.
6016 (linux_wait_for_lwp): Change `pid' argument's type from int to
6018 (linux_wait_for_event): Rename to ...
6019 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6020 from int to ptid_t. Adjust.
6021 (linux_wait_for_event): New.
6022 (linux_wait_1): Add `ptid' argument. Change return type to
6023 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6024 that exit from the process table.
6025 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6027 (mark_lwp_dead): New.
6028 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6029 stopping all threads, mark its main lwp as dead.
6030 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6032 (fetch_register, usr_store_inferior_registers)
6033 (regsets_fetch_inferior_registers)
6034 (regsets_store_inferior_registers, linux_read_memory)
6035 (linux_write_memory): Inline `inferior_pid'.
6036 (linux_look_up_symbols): Adjust to use per-process
6038 (linux_request_interrupt): Adjust to use ptids.
6039 (linux_read_auxv): Inline `inferior_pid'.
6040 (initialize_low): Don't reference thread_db_active.
6041 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6042 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6043 (ps_getpid): Return the pid of the current inferior.
6044 * thread-db.c (proc_handle, thread_agent): Delete.
6045 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6047 (find_one_thread): Change argument type to ptid_t. Adjust to
6049 (maybe_attach_thread): Adjust to per-process data and ptids.
6050 (thread_db_find_new_threads): Ditto.
6051 (thread_db_init): Ditto.
6052 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6053 processes table. Adjust to use ptids.
6054 (spu_kill, spu_detach): Adjust interface. Remove process from
6056 (spu_join, spu_thread_alive): Adjust interface.
6057 (spu_wait): Adjust interface. Remove process from processes
6058 table. Adjust to use ptids.
6059 * win32-low.c (current_inferior_tid): Delete.
6060 (current_inferior_ptid): New.
6061 (debug_event_ptid): New.
6062 (thread_rec): Take a ptid. Adjust.
6063 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6064 (child_delete_thread): Ditto.
6065 (do_initial_child_stuff): Add `attached' argument. Add process to
6067 (child_fetch_inferior_registers, child_store_inferior_registers):
6069 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6070 (win32_attach): Pass 1 to do_initial_child_stuff.
6071 (win32_kill): Adjust interface. Remove process from processes
6073 (win32_detach): Ditto.
6074 (win32_join): Adjust interface.
6075 (win32_thread_alive): Take a ptid.
6076 (win32_resume): Adjust to use ptids.
6077 (get_child_debug_event): Ditto.
6078 (win32_wait): Adjust interface. Remove exiting process from
6081 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6083 Non-stop mode support.
6085 * server.h (non_stop): Declare.
6086 (gdb_client_data, handler_func): Declare.
6087 (delete_file_handler, add_file_handler, start_event_loop):
6089 (handle_serial_event, handle_target_event, push_event)
6090 (putpkt_notif): Declare.
6091 * target.h (enum resume_kind): New.
6092 (struct thread_resume): Replace `step' field by `kind' field.
6093 (TARGET_WNOHANG): Define.
6094 (struct target_ops) <wait>: Add `options' argument.
6095 <supports_non_stop, async, start_non_stop>: New fields.
6096 (target_supports_non_stop, target_async): New.
6097 (start_non_stop): Declare.
6098 (mywait): Add `options' argument.
6099 * target.c (mywait): Add `options' argument. Print child exit
6101 (start_non_stop): New.
6102 * server.c (non_stop, own_buf, mem_buf): New globals.
6103 (struct vstop_notif): New.
6104 (notif_queue): New global.
6105 (queue_stop_reply, push_event, discard_queued_stop_replies)
6106 (send_next_stop_reply): New.
6107 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6109 (attach_inferior): In non-stop mode, don't wait for the target
6111 (handle_general_set): Handle QNonStop.
6112 (handle_query): When handling qC, return the current general
6113 thread, instead of the first thread of the list.
6114 (handle_query): If the backend supports non-stop mode, include
6115 QNonStop+ in the qSupported query response.
6116 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6118 (handle_v_attach, handle_v_run): Handle non-stop mode.
6119 (handle_v_stopped): New.
6120 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6121 (myresume): Adjust to use resume_kind. Handle non-stop.
6122 (queue_stop_reply_callback): New.
6123 (handle_status): Handle non-stop mode.
6124 (main): Clear non_stop flag on reconnection. Use the event-loop.
6125 Refactor serial protocol handling from here ...
6126 (process_serial_event): ... to this new function. When GDB
6127 selects any thread, select one here. In non-stop mode, wait until
6128 GDB acks all pending events before exiting.
6129 (handle_serial_event, handle_target_event): New.
6130 * remote-utils.c (remote_open): Install remote_desc in the event
6132 (remote_close): Remove remote_desc from the event loop.
6133 (putpkt_binary): Rename to...
6134 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6135 (putpkt_binary): New as wrapper around putpkt_binary_1.
6136 (putpkt_notif): New.
6137 (prepare_resume_reply): In non-stop mode, don't change the
6139 * event-loop.c: New.
6140 * Makefile.in (OBJ): Add event-loop.o.
6141 (event-loop.o): New rule.
6143 * linux-low.h (pid_of): Moved here.
6145 (get_lwp_thread): Use lwpid_of.
6146 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6147 * linux-low.c (pid_of): Delete.
6148 (inferior_pid): Use lwpid_of.
6149 (linux_event_pipe): New.
6150 (target_is_async_p): New.
6152 (handle_extended_wait): Use lwpid_of.
6153 (add_lwp): Don't set lwpid field.
6154 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6155 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6156 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6157 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6158 first. Adjust to linux_wait_for_event interface changes. Use
6160 (linux_detach): Don't delete the main lwp here.
6161 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6162 (status_pending_p): Don't consider explicitly suspended lwps.
6163 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6164 pointer. Add OPTIONS argument. Change return type to int. Use
6165 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6166 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6167 pointer. Add status pointer argument. Return a pid instead of a
6168 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6169 changes. In non-stop mode, don't switch to a random thread.
6170 (linux_wait): Rename to...
6171 (linux_wait_1): ... this. Add target_options argument, and handle
6172 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6173 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6174 clean exit and signal exit code. Don't stop all threads in
6175 non-stop mode. In all-stop mode, only stop all threads when
6176 reporting a stop to GDB. Handle explicit thread stop requests.
6177 (async_file_flush, async_file_mark): New.
6179 (send_sigstop): Use lwpid_of.
6180 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6181 interface changes. In non-stop mode, don't switch to a random
6183 (linux_resume_one_lwp): Use lwpid_of.
6184 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6185 (linux_resume_one_thread): ... this. Handle resume_stop. In
6186 non-stop mode, don't look for pending flag in all threads.
6187 (resume_status_pending_p): Don't consider explicitly suspended
6189 (my_waitpid): Reimplement. Emulate __WALL.
6190 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6192 (sigchld_handler, linux_supports_non_stop, linux_async)
6193 (linux_start_non_stop): New.
6194 (linux_target_ops): Register linux_supports_non_stop, linux_async
6195 and linux_start_non_stop.
6196 (initialize_low): Install SIGCHLD handler.
6197 * thread-db.c (thread_db_create_event, find_one_thread)
6198 (thread_db_get_tls_address): Use lwpid_of.
6199 * win32-low.c (win32_detach): Adjust to use resume_kind.
6200 (win32_wait): Add `options' argument.
6201 * spu-low.c (spu_resume): Adjust to use resume_kind.
6202 (spu_wait): Add `options' argument.
6204 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6206 Decouple target code from remote protocol.
6208 * target.h (enum target_waitkind): New.
6209 (struct target_waitstatus): New.
6210 (struct target_ops) <wait>: Return an unsigned long. Take a
6211 target_waitstatus pointer instead of a char pointer.
6213 * target.c (mywait): Change prototype to return an unsigned long.
6214 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6215 * server.h (thread_from_wait, old_thread_from_wait): Delete
6217 (prepare_resume_reply): Change prototype to take a
6219 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6220 (last_status, last_ptid): New.
6221 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6222 pid instead of a signal.
6223 (attach_inferior): Remove "status" and "signal" parameters.
6225 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6227 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6228 (handle_v_requests, myresume): Remove "status" and "signal"
6230 (handle_status): New.
6231 (main): Delete local `status'. Adjust.
6232 * remote-utils.c: Include target.h.
6233 (prepare_resume_reply): Change prototype to take a
6234 target_waitstatus. Adjust.
6236 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6238 * spu-low.c (spu_wait): Adjust.
6239 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6241 (win32_wait): Adjust.
6243 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6245 * target.h (struct thread_resume): Delete leave_stopped member.
6246 (struct target_ops): Add a `n' argument to the `resume' callback.
6247 * server.c (start_inferior): Adjust.
6248 (handle_v_cont, myresume): Adjust.
6249 * linux-low.c (check_removed_breakpoint): Adjust to resume
6250 interface change, and to removed leave_stopped field.
6251 (resume_ptr): Delete.
6252 (struct thread_resume_array): New.
6253 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6254 resume interface change.
6255 (linux_continue_one_thread, linux_queue_one_thread)
6256 (resume_status_pending_p): Check if the resume field is NULL
6257 instead of checking the leave_stopped member.
6258 (linux_resume): Adjust to the target resume interface change.
6259 * spu-low.c (spu_resume): Adjust to the target resume interface
6261 * win32-low.c (win32_detach, win32_resume): Ditto.
6263 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6265 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6267 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6269 (linux_continue_one_thread): Only preserve the stepping flag if
6270 there's a pending breakpoint.
6272 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6274 * server.c (main): After the inferior having exited, call
6275 remote_close before exiting gdbserver.
6277 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6279 Fix size of FPSCR in Power 7 processors.
6280 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6281 (PPC_FEATURE_HAS_DFP): New #define.
6282 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6285 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6287 * server.c (handle_query) Whitespace and formatting.
6289 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6291 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6292 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6293 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6294 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6295 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6296 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6297 Makefile.in, configure.ac: Fix whitespace throughout.
6298 * configure: Regenerate.
6300 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6302 * inferiors.c (find_inferior): Make it safe for the callback
6303 function to delete the currently iterated inferior.
6305 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6307 * Makefile.in (linuw_low_h): Move higher.
6308 (thread-db.o): Depend on $(linux_low_h).
6310 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6312 Rename "process" to "lwp" throughout.
6314 * linux-low.c (all_processes): Rename to...
6315 (all_lwps): ... this.
6316 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6317 (add_process): Rename to ...
6318 (add_lwp): ... this. Adjust.
6319 (linux_create_inferior): Adjust.
6320 (linux_attach_lwp): Adjust.
6321 (linux_attach): Adjust.
6322 (linux_kill_one_process): Rename to ...
6323 (linux_kill_one_lwp): ... this. Adjust.
6324 (linux_kill): Adjust.
6325 (linux_detach_one_process): Rename to ...
6326 (linux_detach_one_lwp): ... this. Adjust.
6327 (linux_detach): Adjust.
6328 (check_removed_breakpoint): Adjust.
6329 (status_pending_p): Adjust.
6330 (linux_wait_for_process): Rename to ...
6331 (linux_wait_for_lwp): ... this. Adjust.
6332 (linux_wait_for_event): Adjust.
6333 (send_sigstop): Adjust.
6334 (wait_for_sigstop): Adjust.
6335 (stop_all_processes): Rename to ...
6336 (stop_all_lwps): ... this.
6337 (linux_resume_one_process): Rename to ...
6338 (linux_resume_one_lwp): ... this. Adjust.
6339 (linux_set_resume_request, linux_continue_one_thread)
6340 (linux_queue_one_thread, resume_status_pending_p)
6341 (usr_store_inferior_registers, regsets_store_inferior_registers)
6342 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6344 * linux-low.h (get_process): Rename to ...
6345 (get_lwp): ... this. Adjust.
6346 (get_thread_process): Rename to ...
6347 (get_thread_lwp): ... this. Adjust.
6348 (get_process_thread): Rename to ...
6349 (get_lwp_thread): ... this. Adjust.
6350 (struct process_info): Rename to ...
6351 (struct lwp_info): ... this.
6352 (all_processes): Rename to ...
6353 (all_lwps): ... this.
6354 * proc-service.c (ps_lgetregs): Adjust.
6355 * thread-db.c (thread_db_create_event, find_one_thread)
6356 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6358 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6360 * server.c (handle_query): Handle "qAttached".
6362 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6364 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6365 GPLv3, update license URL.
6367 2009-03-01 Doug Evans <dje@google.com>
6369 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6370 (server_h): Add gdb_signals.h.
6371 (signals.o): Update.
6372 * server.h (target_signal_from_host,target_signal_to_host_p)
6373 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6375 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6377 * remote-utils.c (getpkt): Also generate remote-debug
6378 information if noack_mode is set.
6380 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6382 * server.c (handle_query): Report qXfer:siginfo:read and
6383 qXfer:siginfo:write as supported and handle them.
6384 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6385 * linux-low.c (linux_xfer_siginfo): New.
6386 (linux_target_ops): Set it.
6388 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6390 * server.c (gdbserver_usage): Mention --remote-debug.
6391 (main): Accept '--remote-debug' switch.
6393 2009-01-18 Doug Evans <dje@google.com>
6395 * regcache.c (new_register_cache): No need to check result of xcalloc.
6396 * server.c (handle_search_memory): Back out calls to xmalloc,
6397 result is checked and error is returned to user upon failure.
6398 (handle_query): Ditto. Add more checks for result of malloc.
6399 (handle_v_cont): Check result of malloc, report error back to
6401 (handle_v_run): Ditto. Call freeargv.
6402 * server.h (freeargv): Declare.
6403 * utils.c (freeargv): New fn.
6405 2009-01-15 Doug Evans <dje@google.com>
6407 * gdbreplay.c (perror_with_name): Make arg const char *.
6408 * server.h (target_signal_to_name): Make return type const char *.
6409 * thread-db.c (thread_db_err_str): Make return type const char *.
6410 * utils.c (perror_with_name): Make arg const char *.
6412 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6414 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6415 when handling a EXIT_PROCESS_DEBUG_EVENT.
6417 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6419 * gdbreplay.c (gdbreplay_version): Update copyright year.
6420 * server.c (gdbserver_version): Likewise.
6422 2009-01-05 Doug Evans <dje@google.com>
6424 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6425 (handle_extended_wait): Improve comment.
6427 2008-12-13 Doug Evans <dje@google.com>
6429 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6430 * server.h (ATTR_MALLOC): New macro.
6431 (xmalloc,xcalloc,xstrdup): Declare.
6432 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6433 * inferiors.c: Ditto.
6434 * linux-low.c: Ditto.
6435 * mem-break.c: Ditto.
6436 * regcache.c: Ditto.
6437 * remote-utils.c: Ditto.
6440 * win32-low.c: Ditto.
6442 2008-12-12 Doug Evans <dje@google.com>
6444 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6445 in debugging printf.
6447 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6449 2008-12-09 Doug Evans <dje@google.com>
6451 * linux-low.h (struct process_info): Delete member tid, unused.
6452 * thread-db.c (find_one_thread): Update.
6453 (maybe_attach_thread): Update.
6455 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6457 * target.h (struct target_ops): Add qxfer_osdata member.
6458 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6460 (linux_qxfer_osdata): New functions.
6461 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6463 * server.c (handle_query): Handle "qXfer:osdata:read:".
6464 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6465 (buffer_xml_printf): New functions.
6466 * server.h (struct buffer): New.
6467 (buffer_grow_str, buffer_grow_str0): New macros.
6468 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6469 (buffer_xml_printf): Declare.
6471 2008-11-24 Doug Evans <dje@google.com>
6473 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6475 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6477 * server.c (handle_v_run): Always use the supplied argument list.
6479 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6481 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6482 (xtensa_regmap_table): Add entry for scompare1.
6484 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6486 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6487 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6488 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6489 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6490 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6491 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6492 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6493 XML target descriptions.
6494 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6495 when inferior is running on an ISA 2.05 or later processor. Add
6496 special case to return offset for full 64-bit slot of FPSCR when
6499 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6501 * Makefile.in (SFILES, clean): Added sparc64 files.
6502 (reg-sparc64.o, reg-sparc64.c): New.
6503 * configure.srv (sparc*-*-linux*): New configuration.
6504 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6505 syscall arguments for SPARC.
6506 (regsets_store_inferior_registers): Likewise.
6507 * linux-sparc-low.c: New file.
6509 2008-10-21 Doug Evans <dje@google.com>
6511 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6512 (READLINE_DIR,READLINE_DEP): Delete.
6513 (INTERNAL_CFLAGS): Update.
6514 (LINTFLAGS): Update.
6516 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6518 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6519 whole argv from the last run, not just argv[0].
6521 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6523 * regcache.c (new_register_cache): Return NULL if the register
6524 cache size isn't known yet.
6525 (free_register_cache): Avoid dereferencing a NULL regcache.
6527 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6529 * configure.srv: Merge MIPS and MIPS64.
6531 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6533 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6535 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6537 * Makefile.in: Add required vsx dependencies.
6539 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6540 Declare init_registers_powerpc_vsx32l.
6541 Declare init_registers_powerpc_vsx64l.
6542 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6543 (ppc_arch_setup): Check for VSX in hwcap.
6544 (ppc_fill_vsxregset): New function.
6545 (ppc_store_vsxregset): New function.
6546 Add new VSX entry in regset_info target_regsets.
6548 * configure.srv: Add new VSX dependencies.
6550 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6552 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6553 (remote_open): Set or clear transport_is_reliable.
6554 (putpkt_binary): Don't expect acks in noack mode.
6555 (getpkt): Don't send ack/nac in noack mode.
6556 * server.c (handle_general_set): Handle QStartNoAckMode.
6557 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6559 (main): Reset noack_mode on every connection.
6560 * server.h (noack_mode): Declare.
6562 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6564 * Makefile.in (GDBREPLAY_OBS): New variable.
6565 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6567 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6568 Daniel Jacobowitz <dan@codesourcery.com>
6570 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6571 (usr_store_inferior_registers): Likewise.
6572 (regsets_store_inferior_registers): Likewise.
6574 2008-07-31 Rolf Jansen <rj@surtec.com>
6575 Pedro Alves <pedro@codesourcery.com>
6577 * configure.ac: Check for memmem declaration.
6578 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6579 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6580 (disable_packet_qfThreadInfo): Unconditionally compile.
6581 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6582 * configure, config.in: Regenerate.
6584 2008-07-28 Doug Kwan <dougkwan@google.com>
6586 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6587 (linux_write_memory): Remove declaration of errno.
6589 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6591 * linux-low.c (handle_extended_wait): Do not use "status"
6592 variable uninitialized.
6594 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6596 * server.c (handle_v_attach): Inhibit reporting dll changes.
6598 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6600 * remote-utils.c (prepare_resume_reply): If requested, don't
6601 output "thread:TID" in the T stop reply.
6603 * server.c (disable_packet_vCont, disable_packet_Tthread)
6604 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6605 (handle_query): If requested, disable support for qC, qfThreadInfo
6607 (handle_v_requests): If requested, disable support for vCont.
6608 (gdbserver_show_disableable): New.
6609 (main): Handle --disable-packet and --disable-packet=LIST.
6611 * server.h (disable_packet_vCont, disable_packet_Tthread)
6612 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6614 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6616 * server.c (gdbserver_usage): Mention --version.
6618 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6620 * Makefile.in (gdbreplay.o): New rule.
6622 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6624 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6625 message, not gdbserver.
6627 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6628 Nathan Sidwell <nathan@codesourcery.com>
6629 Joseph Myers <joseph@codesourcery.com>
6631 * acinclude.m4: Include ../../config/acx.m4.
6632 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6633 * configure, config.in: Regenerate.
6634 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6635 * server.c (gdbserver_version): Print PKGVERSION.
6636 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6637 (main): Adjust gdbserver_usage calls.
6638 * gdbreplay.c (version, host_name): Add declarations.
6639 (gdbreplay_version, gdbreplay_usage): New.
6640 (main): Accept --version and --help options.
6642 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6644 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6645 (arm_breakpoint_at): Handle Thumb.
6646 (the_low_target): Add comment.
6648 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6650 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6652 2008-05-09 Doug Evans <dje@google.com>
6654 * server.h (decode_search_memory_packet): Declare.
6655 * remote-utils.c (decode_search_memory_packet): New fn.
6656 * server.c (handle_search_memory_1): New fn.
6657 (handle_search_memory): New fn.
6658 (handle_query): Process qSearch:memory packets.
6660 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6662 * regcache.c (registers_length): Remove.
6663 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6664 full register packet.
6665 * regcache.h (registers_length): Remove prototype.
6666 * server.h (PBUFSIZ): Define to 16384.
6668 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6670 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6671 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6672 powerpc-64l.o, and powerpc-altivec64l.o.
6673 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6674 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6675 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6676 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6677 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6680 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6681 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6682 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6683 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6684 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6685 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6686 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6687 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6688 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6689 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6692 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6693 (init_registers_powerpc_32l): ... this new prototype.
6694 (init_registers_powerpc_32): Remove, replace by ...
6695 (init_registers_powerpc_altivec32l): ... this new prototype.
6696 (init_registers_powerpc_e500): Remove, replace by ...
6697 (init_registers_powerpc_e500l): ... this new prototype.
6698 (init_registers_ppc64): Remove, replace by ...
6699 (init_registers_powerpc_64l): ... this new prototype.
6700 (init_registers_powerpc_64): Remove, replace by ...
6701 (init_registers_powerpc_altivec64l): ... this new prototype.
6702 (ppc_num_regs): Set to 73.
6703 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6704 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6705 (ppc_cannot_store_register): Handle orig_r3 and trap.
6706 (ppc_arch_setup): Update init_registers_... calls.
6707 (ppc_fill_gregset): Handle orig_r3 and trap.
6709 * inferiors.c (clear_inferiors): Reset current_inferior.
6711 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6713 * acinclude.m4: Add override.m4.
6714 * configure: Regenerate.
6716 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6718 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6719 initial call to init_register_ppc64.
6721 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6723 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6724 single powerpc*-*-linux* case.
6725 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6727 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6729 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6730 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6732 * linux-ppc-low.c: Include <elf.h>.
6733 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6734 (ppc_hwcap): New global variable.
6735 (ppc_regmap): Remove __SPE__ #ifdef sections.
6736 (ppc_regmap_e500): New global variable.
6737 (ppc_cannot_store_register): Update __SPE__ special case.
6738 (ppc_get_hwcap): New function.
6739 (ppc_arch_setup): Use it to determine whether inferior supports
6740 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6741 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6742 Do not access registers if target does not support AltiVec.
6743 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6744 Do not access registers if target does not support SPE.
6745 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6747 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6749 * linux-low.c (disabled_regsets, num_regsets): New.
6750 (use_regsets_p): Delete.
6751 (linux_wait_for_process): Clear disabled_regsets.
6752 (regsets_fetch_inferior_registers): Check and set it.
6753 (regsets_store_inferior_registers): Likewise.
6754 (linux_fetch_registers, linux_store_registers): Do not use
6756 (initialize_low): Allocate disabled_regsets.
6758 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6760 * Makefile.in (LIBOBJS): New.
6762 (memmem.o): New rule.
6763 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6764 * configure: Regenerated.
6766 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6768 * server.c (handle_query): Never return "unsupported" for
6769 qXfer:features:read queries.
6771 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6773 * server.c (get_features_xml): Fix inverted condition.
6774 (handle_query): Always support qXfer:feature:read.
6776 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6778 * server.c (wrapper_argv): New.
6779 (start_inferior): Handle wrapper_argv. If set, expect an extra
6781 (gdbserver_usage): Document --wrapper.
6782 (main): Parse --wrapper.
6784 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6786 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6787 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6788 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6789 (ppc_set_pc): Likewise.
6790 (ppc_arch_setup): New function.
6791 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6792 of collect_register.
6793 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6795 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6797 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6798 instead of linux-ppc64-low.o.
6799 * linux-ppc64-low.c: Remove file.
6800 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6801 (linux-ppc64-low.o): Remove rule.
6803 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6804 (init_registers_powerpc_64): Likewise.
6805 (ppc_regmap): Conditionally define depending on __powerpc64__.
6806 (ppc_cannot_store_register): Do not special-case "fpscr" when
6807 compiled on __powerpc64__.
6808 (ppc_collect_ptrace_register): New function.
6809 (ppc_supply_ptrace_register): New function.
6810 (ppc_breakpoint): Change type to "unsigned int".
6811 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6812 (the_low_target): Conditionally provide initializers for the
6813 arch_setup member depending on __powerpc64__. Install
6814 collect_ptrace_register and supply_ptrace_register members.
6816 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6818 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6819 * server.c (gdbserver_xmltarget): Define.
6820 (get_features_xml): Use it to replace "target.xml" and arch_string.
6822 * configure.srv: Remove srv_xmltarget. Add XML files that were
6823 mentioned there to srv_xmlfiles instead. Remove conditional tests
6824 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6825 srv_xmlfiles and srv_regobj to include all possible choices.
6826 * configure.ac (srv_xmltarget): Remove.
6827 (srv_xmlfiles): Do not add "target.xml".
6828 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6829 checks for supplementary target information.
6830 * configure: Regenerate.
6831 * Makefile.in (XML_TARGET): Remove.
6832 (target.xml): Remove rule.
6833 (clean): Do not clean up target.xml.
6834 (.PRECIOUS): Do not mention target.xml.
6836 * target.h (struct target_ops): Remove arch_string member.
6837 * linux-low.c (linux_arch_string): Remove.
6838 (linux_target_ops): Remove arch_string initializer.
6839 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6840 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6841 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6842 * spu-low.c (spu_arch_string): Remove.
6843 (spu_target_ops): Remove arch_string initializer.
6844 * win32-low.c (win32_arch_string): Remove.
6845 (win32_target_ops): Remove arch_string initializer.
6846 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6847 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6848 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6850 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6852 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6853 by collect_ptrace_register and supply_ptrace_register hooks.
6854 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6855 instead of checking for the_low_target.left_pad_xfer.
6856 (usr_store_inferior_registers): Use collect_ptrace_register callback
6857 instead of checking for the_low_target.left_pad_xfer.
6859 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6860 (s390_supply_ptrace_register): Likewise.
6861 (s390_fill_gregset): Call s390_collect_ptrace_register.
6862 (the_low_target): Update.
6864 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6865 (ppc_supply_ptrace_register): Likewise.
6866 (the_low_target): Update.
6868 * linux-i386-low.c (the_low_target): Update.
6869 * linux-x86-64-low.c (the_low_target): Update.
6871 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6873 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6874 reg-s390.o and reg-s390x.o.
6876 * linux-low.c (new_inferior): New global variable.
6877 (linux_create_inferior, linux_attach): Set it.
6878 (linux_wait_for_process): Call the_low_target.arch_setup after the
6879 target has stopped for the first time.
6880 (initialize_low): Do not call the_low_target.arch_setup.
6882 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6883 (s390_set_pc): Likewise.
6884 (s390_arch_setup): New function.
6885 (the_low_target): Use s390_arch_setup as arch_setup routine.
6887 * regcache.c (realloc_register_cache): New function.
6888 (set_register_cache): Call it for each existing regcache.
6890 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6892 * server.h (init_registers): Remove prototype.
6894 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6895 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6896 instead of init_registers ().
6897 * linux-arm-low.c (init_registers_arm): Add prototype.
6898 (init_registers_arm_with_iwmmxt): Likewise.
6899 (the_low_target): Add initializer for arch_setup field.
6900 * linux-cris-low.c (init_registers_cris): Add prototype.
6901 (the_low_target): Add initializer for arch_setup field.
6902 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6903 (the_low_target): Add initializer for arch_setup field.
6904 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6905 (the_low_target): Add initializer for arch_setup field.
6906 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6907 (the_low_target): Add initializer for arch_setup field.
6908 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6909 (the_low_target): Add initializer for arch_setup field.
6910 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6911 (the_low_target): Add initializer for arch_setup field.
6912 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6913 (init_registers_mips64_linux): Likewise.
6914 (the_low_target): Add initializer for arch_setup field.
6915 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6916 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6917 (the_low_target): Add initializer for arch_setup field.
6918 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6919 (init_registers_powerpc_64): Likewise.
6920 (the_low_target): Add initializer for arch_setup field.
6921 * linux-s390-low.c (init_registers_s390): Add prototype.
6922 (init_registers_s390x): Likewise.
6923 (the_low_target): Add initializer for arch_setup field.
6924 * linux-sh-low.c (init_registers_sh): Add prototype.
6925 (the_low_target): Add initializer for arch_setup field.
6926 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6927 (the_low_target): Add initializer for arch_setup field.
6928 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6929 (the_low_target): Add initializer for arch_setup field.
6931 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6932 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6933 instead of init_registers ().
6934 * win32-arm-low.c (init_registers_arm): Add prototype.
6935 (the_low_target): Add initializer for arch_setup field.
6936 * win32-i386-low.c (init_registers_i386): Add prototype.
6937 (the_low_target): Add initializer for arch_setup field.
6939 * spu-low.c (init_registers_spu): Add prototype.
6940 (initialize_low): Call initialie_registers_spu () instead of
6941 initialize_registers ().
6943 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6945 * server.c (handle_v_requests): When handling the vRun and vAttach
6946 packets, if already debugging a process, don't kill it. Return an
6949 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6951 * server.c (handle_query): Correct length check.
6953 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6955 * win32-low.c (do_initial_child_stuff): Add process handle
6956 parameter. Set current_process_handle and current_process_id from the
6957 parameters. Clear globals.
6958 (win32_create_inferior): Don't set current_process_handle and
6959 current_process_id here. Instead pass them on the call to
6960 do_initial_child_stuff.
6961 (win32_attach): Likewise.
6962 (win32_clear_inferiors): New.
6963 (win32_kill): Don't close the current process handle or the
6964 current thread handle here. Instead call win32_clear_inferiors.
6965 (win32_detach): Don't open a new handle to the process. Call
6966 win32_clear_inferiors.
6967 (win32_join): Don't rely on current_process_handle; open a new
6968 handle using the process id.
6969 (win32_wait): Call win32_clear_inferiors when the inferior process
6972 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6974 * server.c (monitor_show_help): Add "exit".
6976 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6978 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6979 (clean): Add reg-xtensa.c.
6980 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6981 * configure.srv (xtensa*-*-linux*) New target.
6982 * linux-xtensa-low.c: New.
6983 * xtensa-xtregs.c: New.
6985 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6987 * hostio.c: Don't include errno.h.
6988 (errno_to_fileio_errno): Move to hostio-errno.
6989 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6990 error number outputting to the target->hostio_last_error callback.
6991 (hostio_packet_error): Use FILEIO_EINVAL directly.
6992 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6993 calls to hostio_error.
6994 * hostio-errno.c: New.
6995 * server.h (hostio_last_error_from_errno): Declare.
6996 * target.h (target_ops): Add hostio_last_error member.
6997 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6998 as hostio_last_error handler.
6999 * spu-low.c (spu_target_ops): Likewise.
7000 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7001 (wince_hostio_last_error): New functions.
7002 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7003 as hostio_last_error handler.
7004 (win32_target_ops) [!_WIN32_WCE]: Register
7005 hostio_last_error_from_errno as hostio_last_error handler.
7006 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7007 (hostio-errno.o): New rule.
7008 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7009 * configure.srv (srv_hostio_err_objs): New variable. Default to
7011 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7012 * configure: Regenerate.
7014 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7016 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7017 (linux_kill, linux_detach): Clean up the process list.
7018 * remote-utils.c (remote_open): Improve port number parsing.
7019 (putpkt_binary, input_interrupt): Only send interrupts if the target
7021 * server.c (extended_protocol): Make static.
7022 (attached): Define earlier.
7023 (exit_requested, response_needed, program_argv): New variables.
7024 (target_running): New.
7025 (start_inferior): Clear attached here.
7026 (attach_inferior): Set attached here.
7027 (require_running): Define.
7028 (handle_query): Use require_running and target_running. Implement
7030 (handle_v_attach, handle_v_run): New.
7031 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7032 (gdbserver_usage): Update.
7033 (main): Redo argument parsing. Handle --debug and --multi. Handle
7034 --attach along with other options or after the port. Save
7035 program_argv. Support no initial program. Resynchronize
7036 communication with GDB after an error. Handle "monitor exit".
7037 Use require_running and target_running. Always allow the extended
7038 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7039 restart in extended mode.
7040 * README: Refer to the GDB manual. Update --attach usage.
7042 2007-12-20 Andreas Schwab <schwab@suse.de>
7044 * linux-low.c (STACK_SIZE): Define.
7045 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7046 (linux_test_for_tracefork): Likewise.
7048 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7050 * linux-low.c (linux_wait_for_event): Update messages. Do not
7051 reinsert auto-delete breakpoints.
7052 * mem-break.c (struct breakpoint): Change return type of handler to
7054 (set_breakpoint_at): Update handler type.
7055 (reinsert_breakpoint_handler): Return 1 instead of calling
7057 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7059 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7060 * mem-break.h (set_breakpoint_at): Update handler type.
7061 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7062 * win32-low.c (auto_delete_breakpoint): New.
7063 (get_child_debug_event): Use it.
7065 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7067 * configure.ac: Check for pread and pwrite.
7068 * hostio.c (handle_pread): Fall back to lseek and read.
7069 (handle_pwrite): Fall back to lseek and write.
7070 * config.in, configure: Regenerated.
7072 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7074 * server.c (myresume): Add own_buf argument.
7075 (main): Update calls.
7077 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7079 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7080 * remote-utils.c (remote_open): Do not call disable_async_io.
7081 (block_async_io): Delete.
7082 (unblock_async_io): Make static.
7083 (initialize_async_io): New.
7084 * server.c (handle_v_cont): Handle async I/O here.
7085 (myresume): Likewise. Move other common resume tasks here...
7086 (main): ... from here. Call initialize_async_io. Disable async
7087 I/O before the main loop.
7088 * server.h (initialize_async_io): Declare.
7089 (block_async_io, unblock_async_io): Delete prototypes.
7090 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7092 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7094 * remote-utils.c (readchar): Allow binary data in received messages.
7096 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7098 * win32-low.c (attaching): New global.
7099 (win32_create_inferior): Clear the `attaching' global.
7100 (win32_attach): Set the `attaching' global.
7101 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7102 attaching. Only set a breakpoint at the entry point if not
7105 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7107 * server.c (main): Don't report dll events on the initial
7108 connection on attaches.
7110 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7112 * server.c (main): Relax numerical bases supported for the pid of
7113 the --attach command line argument.
7115 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7117 * win32-low.c (win32_attach): Call OpenProcess before
7118 DebugActiveProcess, not after. Add last error output to error
7121 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7123 * win32-low.c (win32_get_thread_context)
7124 (win32_set_thread_context): New functions.
7125 (thread_rec): Use win32_get_thread_context.
7126 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7127 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7130 2007-12-03 Leo Zayas
7131 Pedro Alves <pedro_alves@portugalmail.pt>
7133 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7135 (child_add_thread): Minor cleanup.
7136 (child_continue): Resume artificially suspended threads before
7137 calling ContinueDebugEvent.
7138 (suspend_one_thread): New.
7139 (fake_breakpoint_event): New.
7140 (get_child_debug_event): Change return type to int. Check here if
7141 gdb sent an interrupt request. If a soft interrupt was requested,
7142 fake a breakpoint event. Return 0 if there is no event to handle,
7144 (win32_wait): Don't check here if gdb sent an interrupt request.
7145 Ensure there is a valid event to handle.
7146 (win32_request_interrupt): Add soft interruption method as last
7149 2007-12-03 Leo Zayas
7150 Pedro Alves <pedro_alves@portugalmail.pt>
7152 * win32-low.h (win32_thread_info): Add descriptions to the
7153 structure members. Replace `suspend_count' counter by a
7155 * win32-low.c (thread_rec): Update condition of when to get the
7156 context from the inferior. Rely on ContextFlags being set if it
7157 has already been retrieved. Only suspend the inferior thread if
7158 we haven't already. Warn if that fails.
7159 (continue_one_thread): s/suspend_count/suspended/. Only call
7160 ResumeThread once. Warn if that fails.
7162 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7164 * win32-low.c (win32_wait): Don't read from the inferior when it
7167 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7169 * Makefile.in (win32_low_h): New variable.
7170 (win32-low.o): Add dependency on $(win32_low_h).
7171 (win32-arm-low.o, win32-i386-low.o): New rules.
7173 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7175 * hostio.c: Correct copyright year.
7177 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7179 * Makefile.in (OBS): Add hostio.o.
7180 (hostio.o): New rule.
7181 * server.h (handle_vFile): Declare.
7182 * hostio.c: New file.
7183 * server.c (handle_v_requests): Take packet_len and new_packet_len
7184 for binary packets. Call handle_vFile.
7185 (main): Update call to handle_v_requests.
7187 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7189 * linux-low.c: Include <sched.h>.
7191 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7193 * linux-low.c (linux_tracefork_grandchild): New.
7194 (linux_tracefork_child): Use clone.
7195 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7197 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7199 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7201 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7203 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7205 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7207 * inferiors.c (change_inferior_id): Delete.
7208 (add_pid_to_list, pull_pid_from_list): New.
7209 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7210 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7211 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7212 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7213 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7214 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7215 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7216 (using_threads): Always set to 1.
7217 (handle_extended_wait): New.
7218 (add_process): Do not set TID.
7219 (linux_create_inferior): Set must_set_ptrace_flags.
7220 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7221 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7222 (linux_thread_alive): Rename TID argument to LWPID.
7223 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7224 (linux_wait_for_event): Do not use TID or check using_threads. Update
7225 call to dead_thread_notify. Call handle_extended_wait.
7226 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7227 (send_sigstop): Delete sigstop_sent.
7228 (wait_for_sigstop): Avoid TID.
7229 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7230 (linux_test_for_tracefork): New.
7231 (linux_lookup_signals): Use thread_db_active and
7232 linux_supports_tracefork_flag.
7233 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7234 * linux-low.h (get_process_thread): Avoid TID.
7235 (struct process_ifo): Move thread_known and tid to the end. Remove
7237 (linux_attach_lwp, thread_db_init): Update prototypes.
7238 * server.h (change_inferior_id): Delete prototype.
7239 (add_pid_to_list, pull_pid_from_list): New prototypes.
7240 * thread-db.c (thread_db_use_events): New.
7241 (find_first_thread): Rename to...
7242 (find_one_thread): ...this. Update callers and messages. Do not
7243 call fatal. Check thread_db_use_events. Do not call
7244 change_inferior_id or new_thread_notify.
7245 (maybe_attach_thread): Update. Do not call new_thread_notify.
7246 (thread_db_init): Set thread_db_use_events. Check use_events.
7247 * utils.c (fatal, warning): Correct message prefix.
7249 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7251 * Makefile.in (clean): Remove new files.
7252 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7253 (powerpc-64.o, powerpc-64.c): New rules.
7254 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7255 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7257 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7259 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7260 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7261 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7262 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7263 (target_regsets): Add AltiVec and SPE register sets.
7264 * configure.ac: Check for AltiVec and SPE.
7265 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7266 (ppc_fill_vrregset, ppc_store_vrregset): New.
7267 (target_regsets): Add AltiVec register set.
7268 * configure: Regenerated.
7270 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7272 * linux-low.c (O_LARGEFILE): Define.
7273 (linux_read_memory): Use /proc/PID/mem.
7274 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7275 * configure, config.in: Regenerated.
7277 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7279 * linux-low.c (linux_wait_for_event): Do not pass signals while
7282 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7284 * win32-low.c (create_process): New.
7285 (win32_create_inferior): Use create_process instead of
7286 CreateProcess. If create_process failed retry appending an ".exe"
7287 suffix. Store the GetLastError result immediatelly after
7288 create_process calls and use it on the call to error.
7290 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7292 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7294 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7296 * configure.ac: Switch license to GPLv3.
7298 2007-08-01 Michael Snyder <msnyder@access-company.com>
7300 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7302 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7304 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7306 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7307 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7308 CloseToolhelp32Snapshot.
7309 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7310 CloseToolhelp32Snapshot.
7312 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7314 * server.c (main): Check for inferior exit before main loop.
7316 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7318 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7319 instead of on tmp_desc.
7321 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7322 Daniel Jacobowitz <dan@codesourcery.com>
7324 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7325 (add_thread): Minor cleanups.
7326 (clear_inferiors): Move lower in the file. Clear the DLL
7328 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7329 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7330 (xml_escape_text): New.
7331 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7333 (handle_v_cont): Report errors.
7334 (gdbserver_version): Update.
7335 (main): Correct size of own_buf. Do not report initial DLL events.
7336 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7337 (unloaded_dll, xml_escape_text): New.
7338 * win32-low.c (enum target_waitkind): Update comments.
7339 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7340 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7341 (win32_EnumProcessModules, win32_GetModuleInformation)
7342 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7343 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7344 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7345 (win32_Module32First, win32_Module32Next, load_toolhelp)
7346 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7347 (get_child_debug_event): Handle DLL events.
7348 (win32_wait): Likewise.
7350 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7352 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7353 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7355 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7357 * win32-low.c (handle_output_debug_string): Ignore event if not
7360 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7362 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7364 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7366 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7368 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7370 * inferiors.c (change_inferior_id): Add comment.
7371 * linux-low.c (check_removed_breakpoint): Add an early
7372 prototype. Improve debug output.
7373 (linux_attach): Doc update.
7374 (linux_detach_one_process, linux_detach): Clean up before releasing
7376 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7377 * linux-low.h (struct process_info): Doc improvement.
7378 * mem-break.c (delete_all_breakpoints): New.
7379 * mem-break.h (delete_all_breakpoints): New prototype.
7380 * thread-db.c (find_first_thread): New.
7381 (thread_db_create_event): Call it instead of
7382 thread_db_find_new_threads. Clean up unused variables.
7383 (maybe_attach_thread): Remove first thread handling.
7384 (thread_db_find_new_threads): Use find_first_thread.
7385 (thread_db_get_tls_address): Likewise.
7387 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7389 * thread-db.c (thread_db_find_new_threads): Add prototype.
7390 (thread_db_create_event): Check for the main thread before adding
7392 (maybe_attach_thread): Only enable event reporting if TID == 0.
7393 (thread_db_get_tls_address): Check for new threads.
7395 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7397 * linux-low.c (linux_create_inferior): Try execv before execvp.
7398 * spu-low.c (spu_create_inferior): Likewise.
7400 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7402 * linux-low.c (linux_create_inferior): Change execv to execvp.
7403 * spu-low.c (spu_create_inferior): Likewies.
7405 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7407 * Makefile.in (clean): Clean new files instead of deleted ones.
7408 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7409 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7411 * configure.srv: Specify XML files and new regformats for MIPS and
7413 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7414 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7415 an entry for the restart register.
7416 (mips_cannot_fetch_register, mips_cannot_store_register)
7417 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7418 register names to match the XML descriptions.
7419 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7420 restart register instead of $0.
7422 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7423 Markus Deuling <deuling@de.ibm.com>
7425 * remote-utils.c (decode_xfer_write): New function.
7426 * server.h (decode_xfer_write): Add prototype.
7427 * server.c (handle_query): Add PACKET_LEN argument. Support
7428 qXfer:spu:read and qXfer:spu:write packets.
7429 (main): Pass packet_len to handle_query.
7430 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7431 * target.h (target_ops): Add qxfer_spu.
7433 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7435 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7436 accessing non-seekable spufs files.
7438 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7440 * server.c (handle_query): Add reply for qC packet.
7442 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7443 Leo Zayas <lerele@champenstudios@com>
7445 * server.h (check_remote_input_interrupt_request): New function.
7446 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7447 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7448 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7449 (check_remote_input_interrupt_request): New function.
7450 * server.h (check_remote_input_interrupt_request): Declare.
7451 * win32-low.c (winapi_DebugBreakProcess,
7452 winapi_GenerateConsoleCtrlEvent): New typedefs.
7453 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7455 (win32_wait): Check for remote interrupt request
7456 with check_remote_input_interrupt_request.
7457 (win32_request_interrupt): New function.
7458 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7460 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7462 * win32-low.c (debug_registers_changed,
7463 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7464 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7465 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7466 (thread_rec): Get context using the low target.
7467 (child_add_thread): Call thread_added on the low target,
7468 which does the same thing.
7470 (do_initial_child_stuff): Remove debug registers references.
7471 Set context using the low target. Resume threads after
7472 setting the contexts.
7473 (child_continue): Remove dead variable. Remove debug
7474 registers references.
7475 (child_fetch_inferior_registers): Go through the low target.
7476 (do_child_store_inferior_registers): Remove.
7477 (child_store_inferior_registers): Go through the low target.
7478 (win32_resume): Remove debug registers references.
7479 Set context using the low target.
7480 (handle_exception): Change return type to void. Don't record
7481 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7482 first chance exception.
7483 (get_child_debug_event): Change return type to void. Remove
7484 goto loop. Always return after waiting for debug event.
7485 (win32_wait): Convert to switch statement. Handle spurious
7488 * win32-i386-low.c (debug_registers_changed,
7489 debug_registers_used): New.
7490 (initial_stuff): Rename to ...
7491 (i386_initial_stuff): ... this. Clear debug registers
7493 (store_debug_registers): Delete.
7494 (i386_get_thread_context): New.
7495 (load_debug_registers): Delete.
7496 (i386_set_thread_context): New.
7497 (i386_thread_added): New.
7498 (single_step): Rename to ...
7499 (i386_single_step): ... this.
7500 (do_fetch_inferior_registers): Rename to ...
7501 (i386_fetch_inferior_register): ... this.
7502 (i386_store_inferior_register): New.
7503 (the_low_target): Adapt to new interface.
7505 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7506 (arm_get_thread_context): New.
7507 (arm_set_thread_context): New.
7509 (do_fetch_inferior_registers): Rename to ...
7510 (arm_fetch_inferior_register): ... this.
7511 (arm_store_inferior_register): New.
7512 (arm_wince_breakpoint): Reimplement as unsigned long.
7513 (arm_wince_breakpoint_len): Define.
7514 (the_low_target): Adapt to new interface.
7516 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7517 load_debug_registers. Add get_thread_context, set_thread_context,
7518 thread_added and store_inferior_register. Rename
7519 fetch_inferior_registers to fetch_inferior_register.
7520 (regptr): Remove declaration.
7522 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7524 * linux-low.c (linux_detach): Change return type to int. Return 0.
7525 * spu-low.c (spu_detach): Likewise.
7527 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7529 * target.h (target_ops): Change return type of detach to int.
7531 (join_inferior): New.
7532 * server.c (main): Don't skip detach support on mingw32.
7533 If the inferior doesn't support detaching return error.
7534 Call join_inferior instead of using waitpid.
7535 * linux-low.c (linux_join): New.
7536 (linux_target_op): Add linux_join.
7537 * spu-low.c (spu_join): New.
7538 (spu_target_ops): Add spu_join.
7539 * win32-low.c (win32_detach): Adapt to new interface.
7540 Reopen current_process_handle before detaching. Issue a child
7541 resume before detaching.
7543 (win32_target_op): Add win32_join.
7545 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7547 * win32-low.c (win32-attach): Fix return value.
7548 * target.h (target_ops): Describe ATTACH return values.
7550 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7552 * win32-low.c (GETPROCADDRESS): Define.
7553 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7554 (winapi_DebugSetProcessKillOnExit): Likewise.
7555 (win32_create_inferior): Force usage of ansi CreateProcessA.
7556 (win32_attach): Use GETPROCADDRESS.
7557 (win32_detach): Likewise.
7559 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7561 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7563 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7565 * win32-low.c: Commit leftover changes from 2007-03-29.
7567 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7569 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7570 fields short instead of int. Add explicit padding.
7571 (i387_cache_to_fsave): Remove unnecessary casts.
7572 (i387_fsave_to_cache): Doc fix.
7573 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7575 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7577 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7578 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7580 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7582 * configure.srv (arm*-*-mingw32ce*): Move near the other
7585 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7587 * configure.ac: Add errno checking.
7588 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7589 sys/file.h and malloc.h.
7590 (AC_CHECK_DECLS): Add perror.
7591 (srv_mingwce): Handle.
7592 * configure.srv (i[34567]86-*-cygwin*): Add
7593 win32-i386-low.o to srv_tgtobj.
7594 (i[34567]86-*-mingw*): Likewise.
7595 (arm*-*-mingw32ce*): Add case.
7596 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7597 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7598 [__MINGW32CE__] (strerror): New function.
7599 [__MINGW32CE__] (errno): Define to GetLastError.
7600 [__MINGW32CE__] (COUNTOF): New macro.
7601 (remote_open): Remove extra close call.
7602 * mem-break.c (delete_breakpoint_at): New function.
7603 * mem-break.h (delete_breakpoint_at): Declare.
7604 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7605 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7606 [USE_WIN32API] (read, write): Add char* casts.
7607 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7608 * server.h: Include wincecompat.h on Windows CE.
7609 [HAVE_ERRNO_H]: Check.
7610 (perror): Declare if not declared.
7611 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7612 (perror_with_name): Remove errno declaration.
7613 * wincecompat.h: New.
7614 * wincecompat.c: New.
7616 * win32-arm-low.c: New.
7617 * win32-i386-low.c: New.
7618 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7619 (OUTMSG2): Make it safe.
7621 (COUNTOF): New macro.
7622 (NUM_REGS): Get it from the low target.
7623 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7624 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7625 (thread_rec): Let low target handle debug registers.
7626 (child_add_thread): Likewise.
7627 (child_init_thread_list): Likewise.
7628 (continue_one_thread): Likewise.
7630 (do_child_fetch_inferior_registers): Move to ...
7631 * win32-i386-low.c: ... here, and rename to ...
7632 (do_fetch_inferior_registers): ... this.
7633 * win32-low.c (child_fetch_inferior_registers):
7634 Go through the low target.
7635 (do_child_store_inferior_registers): Use regptr.
7636 (strwinerror): New function.
7637 (win32_create_inferior): Handle Windows CE.
7638 Use strwinerror instead of strerror on Windows error
7639 codes. Add program to the error output.
7640 Don't close the main thread handle on Windows CE.
7641 (win32_attach): Use coredll.dll on Windows CE.
7642 (win32_kill): Close current process and current
7644 (win32_detach): Use coredll.dll on Windows CE.
7645 (win32_resume): Let low target handle debug registers, and
7647 (handle_exception): Add/Remove initial breakpoint. Avoid
7648 non-existant WSTOPSIG on Windows CE.
7649 (win32_read_inferior_memory): Cast to remove warning.
7650 (win32_arch_string): Go through the low target.
7651 (initialize_low): Call set_breakpoint_data with the low
7652 target's breakpoint.
7653 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7654 FOP_REGNUM, mappings): Move to ...
7655 * win32-i386-low.c: ... here.
7656 * win32-low.c (win32_thread_info): Move to ...
7657 * win32-low.h: ... here.
7658 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7659 win32-arm-low.c and wincecompat.c.
7660 (all:): Add $EXEEXT.
7661 (install-only:): Likewise.
7662 (gdbserver:): Likewise.
7663 (gdbreplay:): Likewise.
7664 * config.in: Regenerate.
7665 * configure: Regenerate.
7667 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7669 * win32-low.c: Rename typedef thread_info to
7670 win32_thread_info throughout.
7672 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7674 * win32-i386-low.c: Rename to ...
7675 * win32-low.c: ... this.
7676 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7677 * Makefile.in: Likewise.
7679 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7681 * remote-utils.c (monitor_output): Constify msg parameter.
7682 * server.h (monitor_output): Likewise.
7683 * win32-i386-low.c (handle_output_debug_string): New.
7684 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7685 handle_output_debug_string.
7686 (get_child_debug_event): Likewise.
7688 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7690 * server.c (main): Correct strtoul check.
7692 2007-03-27 Jon Ringle <jon@ringle.org>
7694 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7696 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7698 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7700 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7702 * terminal.h: Check HAVE_SGTTY_H.
7704 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7706 * remote-utils.c (remote_open): Print out the assigned port number.
7708 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7710 * remote-utils.c (monitor_output): New function.
7711 * server.c (debug_threads): Define here.
7712 (monitor_show_help): New function.
7713 (handle_query): Handle qRcmd.
7714 (main): Do not handle 'd' packet.
7715 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7716 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7719 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7721 * Makefile.in (EXEEXT): New.
7722 (clean): Use $(EXEEXT).
7724 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7726 * target.h (target_ops): Rename send_signal to request_interrupt,
7727 and remove enum target_signal parameter.
7728 * linux-low.c (linux_request_interrupt): Rename from
7729 linux_send_signal, and always send SIGINT.
7730 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7731 and always send SIGINT.
7732 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7734 (input_interrupt): Likewise.
7736 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7738 * server.c (get_features_xml): Check if target implemented
7740 * win32-i386-low.c (win32_arch_string): New.
7741 (win32_target_ops): Add win32_arch_string as arch_string member.
7743 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7745 * spu-low.c (spu_arch_string): New.
7746 (spu_target_ops): Add spu_arch_string.
7748 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7750 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7751 * configure.ac: Do not check for terminal.h.
7752 * configure, config.in: Regenerated.
7754 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7756 * Makefile.in (OBS): Add $(XML_BUILTIN).
7757 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7759 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7760 (arm-with-iwmmxt.c): New.
7761 * config.in, configure: Regenerate.
7762 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7763 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7764 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7765 (arm*-*-linux*): Add iWMMXt and regset support.
7766 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7767 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7768 (arm_store_wmmxregset, target_regsets): New.
7769 * server.c (get_features_xml): Take annex argument. Check builtin
7771 (handle_query): Handle multiple annexes.
7773 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7775 * remote-utils.c [USE_WIN32API] (read, write): Define.
7776 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7779 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7781 * linux-i386-low.c (the_low_target): Set arch_string.
7782 * linux-x86-64-low.c (the_low_target): Likewise.
7783 * linux-low.c (linux_arch_string): New.
7784 (linux_target_ops): Add it.
7785 * linux-low.h (struct linux_target_ops): Add arch_string.
7786 * server.c (write_qxfer_response): Use const void * for DATA.
7787 (get_features_xml): New.
7788 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7789 * target.h (struct target_ops): Add arch_string method.
7791 2007-01-03 Denis Pilat <denis.pilat@st.com>
7792 Daniel Jacobowitz <dan@codesourcery.com>
7794 * linux-low.c (linux_kill): Handle being called with no threads.
7795 * win32-i386-low.c (win32_kill): Likewise.
7796 (get_child_debug_event): Clear current_process_handle.
7798 2006-12-30 Denis PILAT <denis.pilat@st.com>
7799 Daniel Jacobowitz <dan@codesourcery.com>
7801 * remote-utils.c (remote_open): Check the type of specified
7802 serial port devices before opening them.
7803 * server.c (main): Kill the inferior if an error occurs during
7804 the first remote_open.
7806 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7808 * README: Update supported targets.
7810 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7812 * Makefile.in (clean): Remove reg-mips64.c.
7813 (reg-mips64.c, reg-mips64.o): New rules.
7814 * configure.srv: Handle mips64. Include regset support for mips.
7815 * linux-mips-low.c (union mips_register): New.
7816 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7817 (mips_breakpoint, mips_breakpoint_at): Use int.
7818 (mips_collect_register, mips_supply_register)
7819 (mips_collect_register_32bit, mips_supply_register_32bit)
7820 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7821 (mips_store_fpregset, target_regsets): New.
7822 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7824 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7826 * configure.srv: Add target "spu*-*-*".
7827 * Makefile.in (clean): Remove reg-spu.c.
7828 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7829 * spu-low.c: New file.
7831 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7833 * configure.ac: Correct td_thr_tls_get_addr test.
7834 * configure: Regenerated.
7836 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7838 * linux-low.c (linux_wait_for_event): Reformat. Use the
7840 * remote-utils.c (decode_address_to_semicolon): New.
7841 * server.c (pass_signals, handle_general_set): New.
7842 (handle_query): Mention QPassSignals for qSupported.
7843 (main): Call handle_general_set.
7844 * server.h (pass_signals, decode_address_to_semicolon): New.
7846 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7848 * server.c (handle_query): Correct error handling for read_auxv.
7850 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7852 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7853 and srv_linux_thread_db to yes.
7854 * linux-s390-low.c (s390_fill_gregset): New function.
7855 (target_regsets): Define data structure.
7857 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7859 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7860 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7861 * config.in, configure: Regenerated.
7862 * inferiors.c (gdb_id_to_thread): New function.
7863 (gdb_id_to_thread_id): Use it.
7864 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7865 * linux-low.h (struct process_info): Add th member.
7866 (thread_db_get_tls_address): New prototype.
7867 * remote-utils.c (decode_address): Make non-static.
7868 * server.c (handle_query): Handle qGetTLSAddr.
7869 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7870 * target.h (struct target_ops): Add get_tls_address.
7871 * thread-db.c (maybe_attach_thread): Save the thread handle.
7872 (thread_db_get_tls_address): New.
7874 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7876 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7877 (linux_resume_one_process): Take a siginfo_t *. Update all
7878 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7879 (struct pending_signals): Add a siginfo_t.
7880 (linux_wait_for_process): Always set last_status.
7881 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7882 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7883 * linux-low.h (struct process_info): Add last_status.
7885 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7887 * remote-utils.c (try_rle): New function.
7888 (putpkt_binary): Use it.
7890 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7892 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7893 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7894 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7895 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7896 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7899 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7901 * server.c (terminal_fd): New variable.
7902 (old_foreground_pgrp): Likewise.
7903 (restore_old_foreground_pgrp): New function.
7904 (start_inferior): Record the terminal file descriptor in terminal_fd
7905 and its original foreground group in old_foreground_pgrp. Register
7906 restore_old_foreground_pgrp with atexit().
7908 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7910 * server.c (handle_query): Correct qPart to qXfer.
7912 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7914 * configure.ac: Check for more headers which are missing on
7915 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7916 * configure.srv: Add Cygwin and mingw32.
7917 * remote-utils.c: Don't include headers unconditionally which
7918 are missing on mingw32. Include <winsock.h> for mingw32.
7919 (remote_open): Adjust for mingw32 support. Flush
7920 standard error after writing to it.
7921 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7922 (unblock_async_io, enable_async_io, disable_async_io)
7923 (readchar, getpkt): Update for Winsock support.
7924 (prepare_resume_reply): Expect a protocol signal number.
7925 * server.c: Disable <sys/wait.h> on mingw32.
7926 (start_inferior): Adjust for mingw32 support. Flush
7927 standard error after writing to it.
7928 (attach_inferior): Likewise. Use protocol signal
7930 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7932 * win32-i386-low.c: New file.
7933 * Makefile.in (XM_CLIBS): Set.
7934 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7935 (win32-i386-low.o): New dependency rule.
7936 * linux-low.c (linux_wait): Use target signal numbers.
7937 * target.h (struct target_ops): Doc fix.
7938 * server.h (target_signal_to_name): New prototype.
7939 * gdbreplay.c: Don't include headers unconditionally which
7940 are missing on mingw32. Include <winsock.h> for mingw32.
7941 (remote_close, remote_open): Adjust for Winsock support.
7942 * configure, config.in: Regenerated.
7944 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7946 * server.c (decode_xfer_read, write_qxfer_response): New.
7947 (handle_query): Take a packet length argument. Handle
7948 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7949 the qSupported response.
7950 (main): Update call to handle_query.
7952 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7954 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7955 (putpkt_binary): Renamed from putpkt and adjusted for binary
7957 (putpkt): New wrapper for putpkt_binary.
7958 (readchar): Don't mask off the high bit.
7959 (decode_X_packet): New function.
7960 * server.c (main): Call putpkt_binary if a handler sets the packet
7961 length. Save the length of the incoming packet. Handle 'X'.
7962 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7964 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7966 * server.c (handle_query): Handle qSupported.
7968 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7970 * remote-utils.c (all_symbols_looked_up): New variable.
7971 (look_up_one_symbol): Check it.
7972 * server.h (look_up_one_symbol): New declaration.
7973 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7975 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7977 * Makefile.in (linux-arm-low.o): Update dependencies.
7978 * linux-arm-low.c: Include "gdb_proc_service.h".
7979 (PTRACE_GET_THREAD_AREA): Define.
7980 (ps_get_thread_area): New function.
7982 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7984 * configure.srv (m68k*-*-uclinux*): New target.
7985 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7986 (linux_resume_one_process): Remove extraneous cast.
7987 (linux_read_offsets): New.
7988 (linux_target_op): Add linux_read_offsets on mmuless systems.
7989 * server.c (handle_query): Add qOffsets logic.
7990 * target.h (struct target_ops): Add read_offsets.
7992 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7994 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7995 (PTRACE_GET_THREAD_AREA): Define.
7996 (ps_get_thread_area): New function.
7997 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7998 (linux-x86-64-low.o): Update.
8000 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8002 * configure.ac: Remove checks for prfpregset_t.
8003 * gdb_proc_service.h: New file.
8004 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8005 new "gdb_proc_service.h".
8006 * proc-service.c: Likewise.
8007 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8008 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8009 * Makefile.in (gdb_proc_service_h): Updated.
8010 * configure, config.in: Regenerated.
8012 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8014 * remote-utils.c (prepare_resume_reply): Move declaration
8015 of gdb_id_from_wait to the top of the block.
8017 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8019 * linux-low.c (regsets_store_inferior_registers): Read the regset
8020 from the target before filling it.
8022 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8024 * server.c (attach_inferior): Return SIGTRAP for a successful
8027 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8029 * Makefile.in (OBS): Add version.o.
8030 (STAGESTUFF): Delete.
8031 (version.o): Add dependencies.
8032 (version.c): Replace rule.
8033 (clean): Remove version.c.
8034 * server.c (gdbserver_version): New.
8035 (gdbserver_usage): Use printf.
8036 (main): Handle --version and --help.
8037 * server.h (version, host_name): Add declarations.
8039 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8051 * linux-x86-64-low.c:
8054 * linux-ppc64-low.c:
8063 * linux-crisv32-low.c:
8075 * gdbserver.1: Add (C) after Copyright. Update the FSF
8078 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8080 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8081 (arm_breakpoint_at): Recognize both breakpoints.
8082 (the_low_target): Use the correct breakpoint instruction.
8084 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8086 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8087 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8088 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8089 (the_low_target): Update.
8091 2005-10-25 Andreas Schwab <schwab@suse.de>
8093 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8095 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8096 (ia64_num_regs): Reduce to 462.
8098 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8100 * acinclude.m4: Correct quoting.
8101 * aclocal.m4: Regenerated.
8103 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8104 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8105 (thread_db_init): Call thread_db_err_str.
8106 * configure.ac: Check for TD_VERSION.
8107 * config.in, configure: Regenerated.
8109 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8111 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8113 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8115 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8116 is not available. Define HAVE_PTRACE_GETREGS if it is.
8117 * config.in, configure: Regenerated.
8118 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8119 * linux-i386-low.c, linux-m68k-low.c: Update to use
8120 HAVE_PTRACE_GETREGS.
8121 * linux-low.c (regsets_fetch_inferior_registers)
8122 (regsets_store_inferior_registers): Only return 0 if we processed
8124 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8125 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8127 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8129 * inferiors.c (struct thread_info): Add gdb_id.
8130 (add_thread): Add gdb_id argument.
8131 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8132 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8133 calls to add_thread.
8134 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8135 * server.c (handle_query): Use thread_to_gdb_id.
8136 (handle_v_cont, main): Use gdb_id_to_thread_id.
8137 * server.h (add_thread): Update prototype.
8138 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8141 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8143 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8144 left-padded registers.
8145 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8146 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8148 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8150 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8151 * configure: Regenerate.
8152 * config.in: Regenerate.
8153 * server.h (NEED_DECLARATION_STRERROR):
8154 Replace with !HAVE_DECL_STRERROR.
8156 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8158 * linux-low.c (linux_wait, linux_send_signal): Don't test
8159 an unsigned long variable for > 0 if it could be MAX_ULONG.
8160 * server.c (myresume): Likewise.
8161 * target.c (set_desired_inferior): Likewise.
8163 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8165 * configure.ac: Simplify and improve check for socklen_t.
8166 * configure, config.in: Regenerate.
8168 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8170 * acconfig.h: Remove.
8171 * configure.ac: Add a test for socklen_t. Use three-argument
8172 AC_DEFINE throughout.
8173 * config.in: Regenerated using autoheader 2.59.
8174 * configure: Regenerated.
8176 * gdbreplay.c (socklen_t): Provide a default.
8177 (remote_open): Use socklen_t.
8178 * remote-utils.c (socklen_t): Provide a default.
8179 (remote_open): Use socklen_t.
8180 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8183 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8185 * linux-low.c (linux_read_memory, linux_write_memory)
8186 (linux_read_auxv): Likewise.
8187 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8188 (check_mem_write): Likewise.
8189 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8191 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8192 (registers_from_string, register_data): Likewise.
8193 * server.c (handle_query, main): Likewise.
8194 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8195 (decode_M_packet): Likewise.
8196 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8197 * target.h (struct target_ops): Update read_memory, write_memory,
8199 (read_inferior_memory, write_inferior_memory): Update.
8200 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8202 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8203 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8204 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8205 linux-s390-low.c, linux-sh-low.c: Update for changes in
8206 read_inferior_memory and the_low_target->breakpoint.
8208 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8210 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8211 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8212 * configure.srv: Add powerpc64-*-linux*.
8213 * linux-ppc64-low.c: New file.
8215 2005-05-23 Orjan Friberg <orjanf@axis.com>
8217 * linux-cris-low.c: New file with support for CRIS.
8218 * linux-crisv32-low.c: Ditto for CRISv32.
8219 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8220 (clean): Add reg-cris.c and reg-crisv32.c.
8221 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8222 reg-crisv32.o, and reg-crisv32.c to make rules.
8223 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8226 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8228 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8229 of sizeof (PTRACE_XFER_TYPE).
8230 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8232 2005-05-12 Orjan Friberg <orjanf@axis.com>
8234 * target.h (struct target_ops): Add insert_watchpoint,
8235 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8236 pointers for hardware watchpoint support.
8237 * linux-low.h (struct linux_target_ops): Ditto.
8238 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8239 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8240 to linux_target_ops.
8241 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8243 * server.c (main): Recognize 'Z' and 'z' packets.
8245 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8247 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8248 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8249 (the_low_target): Add new members.
8251 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8253 * proc-service.c (ps_lgetregs): Search all_processes instead of
8256 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8258 * server.c (start_inferior): Change return type to int.
8259 (attach_inferior): Change sigptr to int *.
8260 (handle_v_cont, handle_v_requests): Change signal to int *.
8261 (main): Change signal to int.
8263 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8265 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8266 * configure.srv: Add m32r*-*-linux*.
8267 * linux-m32r-low.c: New file.
8269 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8271 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8273 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8275 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8276 Take unsigned long arguments for PIDs.
8277 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8278 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8279 (wait_for_sigstop, linux_resume_one_process)
8280 (regsets_fetch_inferior_registers, linux_send_signal)
8281 (linux_read_auxv): Likewise. Update the types of variables holding
8282 PIDs. Update format string specifiers.
8283 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8284 * remote-utils.c (prepare_resume_reply): Likewise.
8285 * server.c (cont_thread, general_thread, step_thread)
8286 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8288 (handle_query): Update format specifiers.
8289 (handle_v_cont, main): Use strtoul for thread IDs.
8290 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8291 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8292 (general_thread, step_thread, thread_from_wait)
8293 (old_thread_from_wait): Update.
8294 * target.h (struct thread_resume): Use unsigned long for THREAD.
8295 (struct target_ops): Use unsigned long for arguments to attach and
8298 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8300 * acinclude.m4: Include bfd/bfd.m4 directly.
8301 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8302 <agriffis@toolchain.org>.
8303 * aclocal.m4, configure: Regenerated.
8305 2005-01-07 Andrew Cagney <cagney@gnu.org>
8307 * configure.ac: Rename configure.in, require autoconf 2.59.
8308 * configure: Re-generate.
8310 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8312 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8314 * aclocal.m4: Regenerated.
8315 * configure: Regenerated.
8317 2004-11-21 Andreas Schwab <schwab@suse.de>
8319 * linux-m68k-low.c (m68k_num_gregs): Define.
8320 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8321 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8322 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8323 (m68k_breakpoint_at): New. Add to the_low_target.
8325 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8326 srv_linux_thread_db to yes.
8328 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8330 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8331 (ARCH_SET_FS): Likewise.
8332 (ARCH_GET_FS): Likewise.
8333 (ARCH_GET_GS): Likewise.
8335 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8337 * linux-i386-low.c (ps_get_thread_area): New.
8338 * linux-x86-64-low.c (ps_get_thread_area): New.
8339 * linux-low.c: Include <sys/syscall.h>.
8340 (linux_kill_one_process): Don't kill the first thread here.
8341 (linux_kill): Kill the first thread here.
8342 (kill_lwp): New function.
8343 (send_sigstop, linux_send_signal): Use it.
8344 * proc-service.c: Clean up #ifdefs.
8345 (fpregset_info): Delete.
8346 (ps_lgetregs): Update and enable implementation.
8347 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8349 * remote-utils.c (struct sym_cache, symbol_cache): New.
8350 (input_interrupt): Print a clearer message.
8351 (async_io_enabled): New variable.
8352 (enable_async_io, disable_async_io): Use it. Update comments.
8353 (look_up_one_symbol): Use the symbol cache.
8354 * thread-db.c (thread_db_look_up_symbols): New function.
8355 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8357 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8359 * configure.in: Test for -rdynamic.
8360 * configure: Regenerated.
8361 * Makefile (INTERNAL_LDFLAGS): New.
8362 (gdbserver, gdbreplay): Use it.
8364 2004-09-02 Andrew Cagney <cagney@gnu.org>
8366 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8368 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8370 * linux-low.c (linux_wait): Clear all_processes list also.
8372 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8374 * linux-low.c: Include <errno.h>. Remove extern declaration of
8377 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8379 * gdbreplay.c, server.h, utils.c: Update copyright years.
8381 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8383 * server.c (main): Print child status or termination signal from
8384 variable 'signal', not 'sig'.
8386 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8388 * linux-low.c (linux_read_memory): Change return type to
8389 int. Check for and return error from ptrace().
8390 * target.c (read_inferior_memory): Change return type to int. Pass
8391 back return status from the_target->read_memory().
8392 * target.h (struct target_ops): Adapt *read_memory() prototype.
8394 (read_inferior_memory): Adapt prototype.
8395 * server.c (main): Return an error packet if
8396 read_inferior_memory() returns an error.
8398 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8400 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8401 Unify with other clean targets.
8403 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8405 * server.c (handle_v_cont): Call set_desired_inferior.
8407 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8409 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8411 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8413 * linux-low.c (linux_wait): Unblock async I/O.
8414 (linux_resume): Block and enable async I/O.
8415 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8416 * server.h (block_async_io, unblock_async_io): Add prototypes.
8418 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8420 * remote-utils.c (remote_open): Print a status notice after
8422 * server.c (attach_inferior): Print a status notice after
8425 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8427 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8429 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8431 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8433 * server.c, target.h: Update copyright years.
8435 2004-02-25 Roland McGrath <roland@redhat.com>
8437 * target.h (struct target_ops): New member `read_auxv'.
8438 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8439 * linux-low.c (linux_read_auxv): New function.
8440 (linux_target_ops): Initialize `read_auxv' member to that.
8442 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8444 Committed by Jim Blandy <jimb@redhat.com>.
8446 * linux-s390-low.c (s390_num_regs): Update.
8447 (s390_regmap): Remove control registers. Use __s390x__ predefine
8448 instead of GPR_SIZE to distiguish s390 and s390x targets.
8450 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8452 * linux-low.c: Update copyright year.
8453 (check_removed_breakpoint): Clear pending_is_breakpoint.
8454 (linux_set_resume_request, linux_queue_one_thread)
8455 (resume_status_pending_p): New functions.
8456 (linux_continue_one_thread): Use process->resume.
8457 (linux_resume): Only resume threads if there are no pending events.
8458 * linux-low.h (struct process_info): Add resume request
8461 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8463 * regcache.c (new_register_cache): Clear the allocated register
8464 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8466 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8468 * linux-low.c (linux_resume): Take a struct thread_resume *
8470 (linux_wait): Update call.
8471 (resume_ptr): New static variable.
8472 (linux_continue_one_thread): Renamed from
8473 linux_continue_one_process. Use resume_ptr.
8474 (linux_resume): Use linux_continue_one_thread.
8475 * server.c (handle_v_cont, handle_v_requests): New functions.
8476 (myresume): New function.
8477 (main): Handle 'v' case.
8478 * target.h (struct thread_resume): New type.
8479 (struct target_ops): Change argument of "resume" to struct
8481 (myresume): Delete macro.
8483 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8485 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8486 (uninstall): Support DESTDIR.
8488 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8490 * configure.srv: Add xscale*linux copy of arm*linux entry.
8492 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8494 * linux-arm-low.c (arm_reinsert_addr): New function.
8495 (the_low_target): Add arm_reinsert_addr.
8497 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8499 * mem-break.c: Remove whitespace at end of file.
8501 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8503 * configure.in: Check whether we need to prototype strerror.
8504 * server.h: Optionally prototype strerror.
8505 * gdbreplay.c (perror_with_name): Use strerror.
8506 * linux-low.c (linux_attach_lwp): Use strerror.
8507 * utils.c (perror_with_name): Use strerror.
8508 * config.in, configure: Regenerated.
8510 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8512 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8513 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8515 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8517 * Makefile.in (SFILES): Update.
8518 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8519 low-sun3.c: Remove files.
8521 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8523 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8524 (linux_detach_one_process, linux_detach): New functions.
8525 (linux_target_ops): Add linux_detach.
8526 * server.c (main): Handle 'D' packet.
8527 * target.h (struct target_ops): Add "detach" member.
8528 (detach_inferior): Define.
8530 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8532 From Kelley Cook <kelleycook@wideopenwest.com>:
8533 * configure.srv: Accept i[34567]86 variants.
8535 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8537 * linux-low.c (linux_wait_for_event): Correct comment typos.
8538 (linux_resume_one_process): Call check_removed_breakpoint.
8539 (linux_send_signal): New function.
8540 (linux_target_ops): Add linux_send_signal.
8541 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8543 * target.h (struct target_ops): Add send_signal.
8545 2003-05-29 Jim Blandy <jimb@redhat.com>
8547 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8548 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8549 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8550 away part of the register's value.
8552 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8554 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8555 (linux_wait_for_event, linux_init_signals): Likewise.
8557 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8559 * configure.in: Check for stdlib.h.
8560 * configure: Regenerated.
8561 * config.in: Regenerated.
8563 2003-01-04 Andreas Schwab <schwab@suse.de>
8565 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8567 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8569 * Makefile.in: Remove obsolete code.
8571 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8573 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8574 defined(PT_FPR0_HI).
8576 2002-11-17 Stuart Hughes <seh@zee2.com>
8578 * linux-arm-low.c (arm_num_regs): Increase.
8579 (arm_regmap): Include status register.
8581 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8583 * linux-low.c (register_addr): Remove incorrect -1 check.
8585 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8587 * linux-low.c (linux_create_inferior): Call setpgid. Return
8589 (unstopped_p, linux_signal_pid): Remove.
8590 (linux_target_ops): Remove linux_signal_pid.
8591 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8592 global instead of target method.
8593 * target.h (struct target_ops): Remove signal_pid. Update comment
8594 for create_inferior.
8595 * server.c (signal_pid): New variable.
8596 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8597 gdbserver. Set the child to be the foreground process group.
8598 (attach_inferior): Set signal_pid.
8600 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8602 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8604 2002-08-20 Jim Blandy <jimb@redhat.com>
8606 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8609 2002-08-01 Andrew Cagney <cagney@redhat.com>
8611 * Makefile.in: Make chill references obsolete.
8613 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8615 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8616 * configure: Regenerate.
8617 * config.in: Regenerate.
8619 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8621 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8622 (perror_with_name, remote_close, remote_open, expect, play): Static.
8624 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8626 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8627 byte offsets instead of an array of indexes.
8628 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8630 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8632 * regcache.c: Add comment.
8634 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8636 * thread-db.c: New file.
8637 * proc-service.c: New file.
8638 * acinclude.m4: New file.
8639 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8640 proc-service.o, and thread-db.o.
8641 (linux-low.o): Add USE_THREAD_DB.
8642 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8643 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8644 * aclocal.m4: Regenerated.
8645 * config.in: Regenerated.
8646 * configure: Regenerated.
8647 * configure.in: Check for proc_service.h, sys/procfs.h,
8648 thread_db.h, and linux/elf.h headrs.
8649 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8650 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8651 Check for -lthread_db and thread support.
8652 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8653 PowerPC, and SuperH.
8654 * i387-fp.c: Constify arguments.
8655 * i387-fp.h: Likewise.
8656 * inferiors.c: (struct thread_info): Renamed from
8657 `struct inferior_info'. Remove PID member. Use generic inferior
8658 list header. All uses updated.
8659 (inferiors, signal_pid): Removed.
8660 (all_threads): New variable.
8661 (get_thread): Define.
8662 (add_inferior_to_list): New function.
8663 (for_each_inferior): New function.
8664 (change_inferior_id): New function.
8665 (add_inferior): Removed.
8666 (remove_inferior): New function.
8667 (add_thread): New function.
8668 (free_one_thread): New function.
8669 (remove_thread): New function.
8670 (clear_inferiors): Use for_each_inferior and free_one_thread.
8671 (find_inferior): New function.
8672 (find_inferior_id): New function.
8673 (inferior_target_data): Update argument type.
8674 (set_inferior_target_data): Likewise.
8675 (inferior_regcache_data): Likewise.
8676 (set_inferior_regcache_data): Likewise.
8677 * linux-low.c (linux_bp_reinsert): Remove.
8678 (all_processes, stopping_threads, using_thrads)
8679 (struct pending_signals, debug_threads, pid_of): New.
8680 (inferior_pid): Replace with macro.
8681 (struct inferior_linux_data): Remove.
8682 (get_stop_pc, add_process): New functions.
8683 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8684 Use add_process and add_thread.
8685 (linux_attach_lwp): New function, based on old linux_attach. Use
8686 add_process and add_thread. Set stop_expected for new threads.
8687 (linux_attach): New function.
8688 (linux_kill_one_process): New function.
8689 (linux_kill): Kill all LWPs.
8690 (linux_thread_alive): Use find_inferior_id.
8691 (check_removed_breakpoints, status_pending_p): New functions.
8692 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8693 Update. Use WNOHANG. Wait for cloned processes also. Update process
8694 struct for the found process.
8695 (linux_wait_for_event): New function.
8696 (linux_wait): Use it. Support LWPs.
8697 (send_sigstop, wait_for_sigstop, stop_all_processes)
8698 (linux_resume_one_process, linux_continue_one_process): New functions.
8699 (linux_resume): Support LWPs.
8700 (REGISTER_RAW_SIZE): Remove.
8701 (fetch_register): Use register_size instead. Call supply_register.
8702 (usr_store_inferior_registers): Likewise. Call collect_register.
8704 (regsets_fetch_inferior_registers): Improve error message.
8705 (regsets_store_inferior_registers): Add debugging.
8706 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8707 (unstopped_p, linux_signal_pid): New functions.
8708 (linux_target_ops): Add linux_signal_pid.
8709 (linux_init_signals): New function.
8710 (initialize_low): Call it. Initialize using_threads.
8711 * regcache.c (inferior_regcache_data): Add valid
8713 (get_regcache): Fetch registers lazily. Add fetch argument
8714 and update all callers.
8715 (regcache_invalidate_one, regcache_invalidate): New
8717 (new_register_cache): Renamed from create_register_cache.
8718 Return the new regcache.
8719 (free_register_cache): Change argument to a void *.
8720 (registers_to_string, registers_from_string): Call get_regcache
8721 with fetch flag set.
8722 (register_data): Make static. Pass fetch flag to get_regcache.
8723 (supply_register): Call get_regcache with fetch flag clear.
8724 (collect_register): Call get_regcache with fetch flag set.
8725 (collect_register_as_string): New function.
8726 * regcache.h: Update.
8727 * remote-utils.c (putpkt): Flush after debug output and use
8729 Handle input interrupts while waiting for an ACK.
8730 (input_interrupt): Use signal_pid method.
8731 (getpkt): Flush after debug output and use stderr.
8732 (outreg): Use collect_register_as_string.
8733 (new_thread_notify, dead_thread_notify): New functions.
8734 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8736 (look_up_one_symbol): Flush after debug output.
8737 * server.c (step_thread, server_waiting): New variables.
8738 (start_inferior): Don't use signal_pid. Update call to mywait.
8739 (attach_inferior): Update call to mywait.
8740 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8741 (main): Don't fetch/store registers explicitly. Use
8742 set_desired_inferior. Support proposed ``Hs'' packet. Update
8745 (struct inferior_list, struct_inferior_list_entry): New.
8746 * target.c (set_desired_inferior): New.
8747 (write_inferior_memory): Constify.
8748 (mywait): New function.
8750 (struct target_ops): New signal_pid method.
8751 (mywait): Removed macro, added prototype.
8753 * linux-low.h (regset_func): Removed.
8754 (regset_fill_func, regset_store_func): New.
8755 (enum regset_type): New.
8756 (struct regset_info): Add type field. Use new operation types.
8757 (struct linux_target_ops): stop_pc renamed to get_pc.
8758 Add decr_pc_after_break and breakpoint_at.
8759 (get_process, get_thread_proess, get_process_thread)
8760 (strut process_info, all_processes, linux_attach_lwp)
8761 (thread_db_init): New.
8763 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8764 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8765 (the_low_target): Add new members.
8766 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8767 (i386_store_fpxregset): Constify.
8768 (target_regsets): Add new kind identifier.
8769 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8770 (i386_set_pc): Add debugging.
8771 (i386_breakpoint_at): New function.
8772 (the_low_target): Add new members.
8773 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8774 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8775 (mips_breakpoint_at): New.
8776 (the_low_target): Add new members.
8777 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8778 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8779 (the_low_target): Add new members.
8780 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8781 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8782 (the_low_target): Add new members.
8783 * linux-x86-64-low.c (target_regsets): Add new kind
8786 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8788 From Martin Pool <mbp@samba.org>:
8789 * server.c (gdbserver_usage): New function.
8792 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8794 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8797 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8799 * Makefile.in: Remove obsolete code.
8801 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8803 * linux-low.c (regsets_fetch_inferior_registers),
8804 (regsets_store_inferior_registers): Removed cast to int from
8806 * regcache.h: Added declaration of struct inferior_info.
8808 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8810 * inferiors.c (struct inferior_info): Add regcache_data.
8811 (add_inferior): Call create_register_cache.
8812 (clear_inferiors): Call free_register_cache.
8813 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8814 * regcache.c (struct inferior_regcache_data): New.
8815 (registers): Remove.
8816 (get_regcache): New function.
8817 (create_register_cache, free_register_cache): New functions.
8818 (set_register_cache): Don't initialize the register cache here.
8819 (registers_to_string, registers_from_string, register_data): Call
8821 * regcache.h: Add prototypes.
8822 * server.h: Likewise.
8824 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8826 * mem-break.c: New file.
8827 * mem-break.h: New file.
8828 * Makefile.in: Add mem-break.o rule; update server.h
8830 * inferiors.c (struct inferior_info): Add target_data
8832 (clear_inferiors): Free target_data member if set.
8833 (inferior_target_data, set_inferior_target_data): New functions.
8834 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8835 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8836 * linux-low.c (linux_bp_reinsert): New variable.
8837 (struct inferior_linux_data): New.
8838 (linux_create_inferior): Use set_inferior_target_data.
8839 (linux_attach): Likewise. Call add_inferior.
8840 (linux_wait_for_one_inferior): New function.
8841 (linux_wait): Call it.
8842 (linux_write_memory): Add const.
8843 (initialize_low): Call set_breakpoint_data.
8844 * linux-low.h (struct linux_target_ops): Add breakpoint
8846 * server.c (attach_inferior): Remove extra add_inferior
8848 * server.h: Include mem-break.h. Update inferior.c
8850 * target.c (read_inferior_memory)
8851 (write_inferior_memory): New functions.
8852 * target.h (read_inferior_memory)
8853 (write_inferior_memory): Change macros to prototypes.
8854 (struct target_ops): Update comments. Add const to write_memory
8857 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8859 * linux-low.c (usr_store_inferior_registers): Support
8860 registers which are allowed to fail to store.
8861 * linux-low.h (linux_target_ops): Likewise.
8862 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8863 (ppc_cannot_store_register): FPSCR may not be storable.
8865 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8867 * server.h: Include <string.h> if HAVE_STRING_H.
8868 * ChangeLog: Correct paths in last ChangeLog entry.
8870 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8872 * linux-low.h: Remove obsolete prototypes.
8873 (struct linux_target_ops): New.
8874 (extern the_low_target): New.
8875 * linux-low.c (num_regs, regmap): Remove declarations.
8876 (register_addr): Use the_low_target explicitly.
8877 (fetch_register): Likewise.
8878 (usr_fetch_inferior_registers): Likewise.
8879 (usr_store_inferior_registers): Likewise.
8880 * linux-arm-low.c (num_regs): Remove.
8881 (arm_num_regs): Define.
8882 (arm_regmap): Renamed from regmap, made static.
8883 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8885 (arm_cannot_store_register): Renamed from cannot_store_register,
8887 (the_low_target): New.
8888 * linux-i386-low.c (num_regs): Remove.
8889 (i386_num_regs): Define.
8890 (i386_regmap): Renamed from regmap, made static.
8891 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8893 (i386_cannot_store_register): Renamed from cannot_store_register,
8895 (the_low_target): New.
8896 * linux-ia64-low.c (num_regs): Remove.
8897 (ia64_num_regs): Define.
8898 (ia64_regmap): Renamed from regmap, made static.
8899 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8901 (ia64_cannot_store_register): Renamed from cannot_store_register,
8903 (the_low_target): New.
8904 * linux-m68k-low.c (num_regs): Remove.
8905 (m68k_num_regs): Define.
8906 (m68k_regmap): Renamed from regmap, made static.
8907 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8909 (m68k_cannot_store_register): Renamed from cannot_store_register,
8911 (the_low_target): New.
8912 * linux-mips-low.c (num_regs): Remove.
8913 (mips_num_regs): Define.
8914 (mips_regmap): Renamed from regmap, made static.
8915 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8917 (mips_cannot_store_register): Renamed from cannot_store_register,
8919 (the_low_target): New.
8920 * linux-ppc-low.c (num_regs): Remove.
8921 (ppc_num_regs): Define.
8922 (ppc_regmap): Renamed from regmap, made static.
8923 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8925 (ppc_cannot_store_register): Renamed from cannot_store_register,
8927 (the_low_target): New.
8928 * linux-s390-low.c (num_regs): Remove.
8929 (s390_num_regs): Define.
8930 (s390_regmap): Renamed from regmap, made static.
8931 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8933 (s390_cannot_store_register): Renamed from cannot_store_register,
8935 (the_low_target): New.
8936 * linux-sh-low.c (num_regs): Remove.
8937 (sh_num_regs): Define.
8938 (sh_regmap): Renamed from regmap, made static.
8939 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8941 (sh_cannot_store_register): Renamed from cannot_store_register,
8943 (the_low_target): New.
8944 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8945 (the_low_target): New.
8947 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8949 * Makefile.in: Add stamp-h target.
8950 * configure.in: Create stamp-h.
8951 * configure: Regenerated.
8953 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8955 * inferiors.c: New file.
8956 * target.c: New file.
8957 * target.h: New file.
8958 * Makefile.in: Add target.o and inferiors.o. Update
8960 * linux-low.c (inferior_pid): New static variable,
8961 moved from server.c.
8962 (linux_create_inferior): Renamed from create_inferior.
8963 Call add_inferior. Return 0 on success instead of a PID.
8964 (linux_attach): Renamed from myattach.
8965 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8966 (linux_thread_alive): Renamed from mythread_alive.
8967 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8969 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8970 (regsets_store_inferior_registers): Correct error message.
8971 Add missing ``return 0''.
8972 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8973 (linux_store_registers): Renamed from store_inferior_registers.
8974 (linux_read_memory): Renamed from read_inferior_memory.
8975 (linux_write_memory): Renamed from write_inferior_memory.
8976 (linux_target_ops): New structure.
8977 (initialize_low): Call set_target_ops ().
8978 * remote-utils.c (unhexify): New function.
8979 (hexify): New function.
8980 (input_interrupt): Send signals to ``signal_pid''.
8981 * server.c (inferior_pid): Remove.
8982 (start_inferior): Update create_inferior call.
8983 (attach_inferior): Call add_inferior.
8984 (handle_query): New function.
8985 (main): Call handle_query for `q' packets.
8986 * server.h: Include "target.h". Remove obsolete prototypes.
8987 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8989 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8991 * Makefile.in: Add WARN_CFLAGS. Update configury
8993 * configure.in: Check for <string.h>
8994 * configure: Regenerate.
8995 * config.in: Regenerate.
8996 * gdbreplay.c: Include needed system headers.
8997 (remote_open): Remove strchr prototype.
8998 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8999 * regcache.c (supply_register): Change buf argument to const void *.
9000 (supply_register_by_name): Likewise.
9001 (collect_register): Change buf argument to void *.
9002 (collect_register_by_name): Likewise.
9003 * regcache.h: Add missing prototypes.
9004 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9005 * server.c (handle_query): New function.
9006 (attached): New static variable, moved out of main.
9007 (main): Quiet longjmp clobber warnings.
9008 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9009 * utils.c (error): Remove NORETURN.