1 2014-02-14 Yao Qi <yao@codesourcery.com>
3 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4 (rsp-low-ipa.o): New target.
6 2014-02-12 Tom Tromey <tromey@redhat.com>
8 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10 * regcache.c (registers_to_string): Likewise.
11 * remote-utils.c (decode_M_packet): Likewise.
12 * server.c (process_serial_event): Likewise.
14 2014-02-12 Tom Tromey <tromey@redhat.com>
16 * server.c (handle_query, handle_v_run): Use hex2bin, not
18 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
20 2014-02-12 Tom Tromey <tromey@redhat.com>
22 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
24 * regcache.c (registers_to_string, collect_register_as_string):
26 * remote-utils.c (look_up_one_symbol, relocate_instruction):
28 * server.c (process_serial_event): Likewise.
29 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
30 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
32 2014-02-12 Tom Tromey <tromey@redhat.com>
34 * remote-utils.c (look_up_one_symbol, monitor_output): Use
36 * tracepoint.c (cmd_qtstatus): Likewise.
38 2014-02-12 Tom Tromey <tromey@redhat.com>
40 * remote-utils.c (monitor_output): Pass explicit length to
43 2014-02-12 Tom Tromey <tromey@redhat.com>
45 * tracepoint.c: Include rsp-low.h.
46 * server.c: Include rsp-low.h.
47 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
48 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
50 * remote-utils.c: Include rsp-low.h.
51 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
52 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
53 (convert_int_to_ascii, convert_ascii_to_int): Move to
55 * regcache.c: Include rsp-low.h.
56 * ax.c: Include rsp-low.h.
57 * Makefile.in (SFILES): Add common/rsp-low.c.
59 (rsp-low.o): New target.
61 2014-02-12 Tom Tromey <tromey@redhat.com>
63 * utils.h (pulongest, plongest, phex_nz): Don't declare.
64 Include print-utils.h.
65 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
66 (plongest, thirty_two, phex_nz): Remove.
67 * Makefile.in (SFILES): Add common/print-utils.c.
68 (OBS): Add print-utils.o.
69 (print-utils-ipa.o): New target.
70 (print-utils.o): New target.
71 (IPA_OBJS): Add print-utils-ipa.o.
73 2014-02-06 Tom Tromey <tromey@redhat.com>
75 * Makefile.in (SFILES): Fix indentation.
77 2014-02-05 Doug Evans <dje@google.com>
79 * linux-low.c (linux_wait_for_event): Improve comment.
80 (linux_wait_1): Keep current_inferior in sync with event_child.
82 2014-01-22 Doug Evans <dje@google.com>
84 * gdbthread.h (gdb_id_to_thread): Delete, unused.
86 2014-01-22 Doug Evans <dje@google.com>
88 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
89 * configure: Regenerate.
90 * config.in: Regenerate.
91 * Makefile.in (SFILES): Add debug.c.
95 * linux-aarch64-low.c (*): Update all debugging printfs to use
96 debug_printf instead of fprintf.
97 * linux-arm-low.c (*): Ditto.
98 * linux-cris-low.c (*): Ditto.
99 * linux-crisv32-low.c (*): Ditto.
100 * linux-m32r-low.c (*): Ditto.
101 * linux-sparc-low.c (*): Ditto.
102 * linux-x86.c (*): Ditto.
103 * linux-low.c (*): Ditto.
104 (linux_wait_1): Add calls to debug_enter, debug_exit.
105 (linux_wait): Remove redundant debugging printf.
106 (stop_all_lwps): Add calls to debug_enter, debug_exit.
107 (linux_resume, unstop_all_lwps): Ditto.
108 * mem-break.c (*): Update all debugging printfs to use
109 debug_printf instead of fprintf.
110 * remote-utils.c (*): Ditto.
111 * thread-db.c (*): Ditto.
112 * server.c #include <ctype.h>, "gdb_vecs.h".
113 (debug_threads): Moved to debug.c.
114 (*): Update all debugging printfs to use debug_printf instead of
116 (start_inferior): Replace call to fflush with call to debug_flush.
117 (monitor_show_help): Mention set debug-format.
118 (parse_debug_format_options): New function.
119 (handle_monitor_command): Handle "monitor set debug-format".
120 (gdbserver_usage): Mention --debug-format.
121 (main): Parse --debug-format.
122 * server.h (debug_threads): Declaration moved to debug.h.
124 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
125 trace_debug_1 that uses debug_printf.
126 (tracepoint_look_up_symbols): Update all debugging printfs to use
127 debug_printf instead of fprintf.
129 2014-01-20 Baruch Siach <baruch@tkos.co.il>
131 * linux-xtensa-low.c: Include asm/ptrace.h instead of
134 2014-01-17 Pedro Alves <palves@redhat.com>
137 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
138 defined after including gdb_proc_service.h.
140 2014-01-16 Doug Evans <dje@google.com>
142 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
145 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
147 * target.h (target_ops) <read_btrace>: Change parameters and
148 return type to allow error reporting.
149 * server.c (handle_qxfer_btrace): Support delta reads. Pass
150 trace reading errors on.
151 * linux-low.c (linux_low_read_btrace): Pass trace reading
153 (linux_low_disable_btrace): New.
155 2014-01-15 Doug Evans <dje@google.com>
157 * inferiors.c (thread_id_to_gdb_id): Delete.
158 * inferiors.h (thread_id_to_gdb_id): Delete.
160 2014-01-13 Eli Zaretskii <eliz@gnu.org>
162 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
163 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
166 2014-01-08 Pedro Alves <palves@redhat.com>
168 * server.c (handle_status): Don't discard previous queued stop
169 replies or thread's pending status here.
170 (main) <disconnection>: Do it here instead.
172 2014-01-08 Pedro Alves <palves@redhat.com>
174 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
175 * server.c (visit_actioned_threads, handle_pending_status): New
177 (handle_v_cont): Factor out parts to ...
178 (resume): ... this new function. If in all-stop, and a thread
179 being resumed has a pending status, report it without actually
181 (myresume): Adjust to use the new 'resume' function.
182 (clear_pending_status_callback, set_pending_status_callback)
183 (find_status_pending_thread_callback): New functions.
184 (handle_status): Handle the case of multiple threads having
185 interesting statuses to report. Report threads' real last signal
186 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
187 with an interesting thread to report the status for, instead of
188 always reporting the status of the first thread.
190 2014-01-01 Joel Brobecker <brobecker@adacore.com>
192 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
193 * gdbreplay.c (gdbreplay_version): Likewise.
195 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
197 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
198 iov.iov_len with the real length in use.
200 2013-12-13 Joel Brobecker <brobecker@adacore.com>
202 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
203 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
204 for all targets that use win32-low.c.
205 * win32-low.c (win32_ensure_ntdll_loaded): New function.
206 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
208 2013-12-13 Pedro Alves <palves@redhat.com>
210 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
211 if equal to TARGET_WAITKIND_LOADED.
212 * win32-low.c (cached_status): New static global.
213 (win32_wait): Add declaration.
214 (do_initial_child_stuff): Flush all initial pending debug events
215 up to the initial breakpoint.
216 (win32_wait): If CACHED_STATUS was set, return that instead
217 of doing a real wait. Remove the code resuming the execution
218 of the inferior after receiving a TARGET_WAITKIND_LOADED event
219 during the initial phase. Also remove the code changing
220 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
221 TARGET_WAITKIND_STOPPED.
223 2013-12-11 Yao Qi <yao@codesourcery.com>
225 * notif.c (handle_notif_ack): Return 0 if no notification
228 2013-11-20 Doug Evans <dje@google.com>
230 * linux-low.c (linux_set_resume_request): Fix comment.
232 2013-11-20 Doug Evans <dje@google.com>
234 * linux-low.c (resume_status_pending_p): Tweak comment.
236 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
238 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
239 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
240 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
241 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
242 (srv_amd64_regobj): Add amd64-mpx.o.
243 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
244 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
245 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
246 * i387-fp.c (num_pl_bnd_register) Added constant.
247 (num_pl_bnd_cfg_registers) Added constant.
248 (struct i387_xsave) Added reserved area and MPX fields.
249 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
250 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
252 (tdesc_i386_mpx_linux): Add MPX amd64 target.
253 (init_registers_amd64_mpx_linux): Declare new function.
254 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
255 (x86_64_regmap): Add MPX registers.
256 (x86_linux_read_description): Add MPX case.
257 (initialize_low_arch): Initialize MPX targets.
259 2013-11-18 Tom Tromey <tromey@redhat.com>
261 * configure: Rebuild.
262 * configure.ac: Don't check for stdlib.h.
263 * gdbreplay.c: Unconditionally include stdlib.h.
265 2013-11-18 Tom Tromey <tromey@redhat.com>
267 * config.in: Rebuild.
268 * configure: Rebuild.
269 * configure.ac: Don't use AC_HEADER_DIRENT.
271 2013-11-18 Tom Tromey <tromey@redhat.com>
273 * server.h: Don't check HAVE_STRING_H.
274 * gdbreplay.c: Don't check HAVE_STRING_H.
275 * configure: Rebuild.
277 2013-11-18 Tom Tromey <tromey@redhat.com>
279 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
282 2013-11-08 Tom Tromey <tromey@redhat.com>
284 * configure, config.in: Rebuild.
285 * configure.ac: Remove unused configury.
287 2013-11-08 Tom Tromey <tromey@redhat.com>
289 * acinclude.m4: Include common.m4, codeset.m4.
290 * configure, config.in: Rebuild.
291 * configure.ac: Use GDB_AC_COMMON.
293 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
295 * linux-s390-low.c (HWCAP_S390_TE): New define.
296 (s390_arch_setup): Consider the TE field in the HWCAP for
297 determining 'have_regset_tdb'.
299 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
302 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
305 2013-10-02 Pedro Alves <palves@redhat.com>
307 * server.c (process_serial_event): Don't output "GDBserver
308 exiting" if GDB is connected through stdio.
309 * target.c (mywait): Likewise, be silent if GDB is connected
312 2013-10-01 Joel Brobecker <brobecker@adacore.com>
314 * lynx-low.c (lynx_add_threads_after_attach): New function.
315 (lynx_attach): Remove call to add_thread. Add call to
316 lynx_add_threads_after_attach instead.
318 2013-09-28 Mike Frysinger <vapier@gentoo.org>
320 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
321 * config.in, configure: Regenerated.
323 2013-09-18 Yao Qi <yao@codesourcery.com>
326 * server.c (start_inferior): Clear 'resume_info'.
328 2013-09-16 Jiong Wang <jiwang@tilera.com>
330 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
333 2013-09-16 Jiong Wang <jiwang@tilera.com>
335 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
336 linux-tile-low.o to srv_tgtobj.
338 2013-09-16 Will Newton <will.newton@linaro.org>
340 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
343 2013-09-06 Pedro Alves <palves@redhat.com>
345 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
346 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
347 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
348 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
349 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
350 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
352 2013-09-06 Pedro Alves <palves@redhat.com>
354 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
355 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
357 2013-09-06 Pedro Alves <palves@redhat.com>
359 * linux-amd64-ipa.c: Include tracepoint.h.
360 * linux-i386-ipa.c: Include tracepoint.h.
362 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
364 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
365 (ps_get_thread_area): New function.
367 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
369 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
370 (initialize_low_arch): Call init_registers_crisv32 rather than
371 init_register_crisv32.
373 2013-09-05 Pedro Alves <palves@redhat.com>
375 * server.h (handle_vFile, hostio_last_error_from_errno): Move
377 * hostio.h: ... this new file.
378 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
379 win32-low.c: Include hostio.h.
381 2013-09-05 Pedro Alves <palves@redhat.com>
383 * server.h (gdb_client_data, handler_func, callback_handler_func)
384 (delete_file_handler, add_file_handler, append_callback_event)
385 (delete_callback_event, start_event_loop, initialize_event_loop):
386 Move to event-loop.h and include it.
387 * event-loop.h: New file.
389 2013-09-05 Pedro Alves <palves@redhat.com>
391 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
392 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
393 (loaded_dll, unloaded_dll): Move to ...
394 * dll.h: ... this new file.
395 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
397 2013-09-05 Pedro Alves <palves@redhat.com>
399 * server.h (current_process, get_thread_process, all_processes)
400 (add_inferior_to_list, for_each_inferior, current_inferior)
401 (remove_inferior, add_process, remove_process, find_process_pid)
402 (have_started_inferiors_p, have_attached_inferiors_p)
403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
404 (clear_inferiors, find_inferior, find_inferior_id)
405 (inferior_target_data, set_inferior_target_data)
406 (inferior_regcache_data, set_inferior_regcache_data): Move to
407 inferiors.h, and include it.
408 * inferiors.h: New file.
410 2013-09-05 Pedro Alves <palves@redhat.com>
412 * server.h (struct emit_ops, current_insn_ptr, emit_error):
416 2013-09-05 Pedro Alves <palves@redhat.com>
418 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
420 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
421 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
422 (handle_tracepoint_general_set, handle_tracepoint_query)
423 (tracepoint_finished_step, tracepoint_was_hit)
424 (release_while_stepping_state_list, current_traceframe)
425 (in_readonly_region, traceframe_read_mem)
426 (fetch_traceframe_registers, traceframe_read_sdata)
427 (traceframe_read_info, struct fast_tpoint_collect_status)
428 (fast_tracepoint_collecting, force_unlock_trace_buffer)
429 (handle_tracepoit_bkpts, initialize_low_tracepoint)
430 (supply_fast_tracepoint_registers)
431 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
432 (ipa_tdesc, claim_trampoline_space)
433 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
434 (agent_mem_read, agent_get_trace_state_variable_value)
435 (agent_set_trace_state_variable_value, agent_tsv_read)
436 (agent_mem_read_string, get_raw_reg_func_addr)
437 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
438 * tracepoint.h: ... this new file.
440 2013-09-05 Pedro Alves <palves@redhat.com>
442 * server.h (perror_with_name, error, fatal, warning, paddress)
443 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
447 2013-09-05 Pedro Alves <palves@redhat.com>
449 * server.h (remote_debug, noack_mode, transport_is_reliable)
450 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
451 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
452 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
453 (write_enn, initialize_async_io, enable_async_io)
454 (disable_async_io, check_remote_input_interrupt_request)
455 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
456 (dead_thread_notify, prepare_resume_reply)
457 (decode_address_to_semicolon, decode_address, decode_m_packet)
458 (decode_M_packet, decode_X_packet, decode_xfer_write)
459 (decode_search_memory_packet, unhexify, hexify)
460 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
461 (look_up_one_symbol, relocate_instruction)
462 (monitor_output): Move to remote-utils.h, and include it.
463 * remote-utils.h: New file.
465 2013-09-05 Pedro Alves <palves@redhat.com>
467 * server.h (_): Delete.
469 2013-09-02 Pedro Alves <palves@redhat.com>
471 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
472 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
474 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
476 2013-09-02 Pierre Muller <muller@sourceware.org>
478 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
479 or WriteProcessMemory complete successfully and handle
480 ERROR_PARTIAL_COPY error.
482 2013-09-02 Pedro Alves <palves@redhat.com>
484 * server.c (gdb_read_memory): Return -1 on traceframe memory read
485 error instead of EIO.
487 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
490 * linux-low.c: Include filestuff.h.
491 (linux_create_inferior) <pid == 0>: Call close_most_fds.
492 * lynx-low.c: Include filestuff.h.
493 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
494 * server.c: Include filestuff.h.
495 (main): Call notice_open_fds.
496 * spu-low.c: Include filestuff.h.
497 (spu_create_inferior) <pid == 0>: Call close_most_fds.
499 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
501 * Makefile.in: Explain why ../target and ../nat are not
502 listed as include file search paths.
503 (linux-waitpid.o): New object file rule.
504 * configure.srv (srv_native_linux_obj): New variable.
505 Replace all occurrences of linux native object files with
506 $srv_native_linux_obj.
507 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
508 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
509 (linux_enable_event_reporting): Remove declaration.
510 (my_waitpid): Moved to common/linux-waitpid.c.
511 (linux_wait_for_event): Pass ptid when calling
512 linux_enable_event_reporting.
513 (linux_supports_tracefork_flag): Remove.
514 (linux_enable_event_reporting): Likewise.
515 (linux_tracefork_grandchild): Remove.
516 (STACK_SIZE): Moved to common/linux-ptrace.c.
517 (linux_tracefork_child): Remove.
518 (linux_test_for_tracefork): Remove.
519 (linux_look_up_symbols): Call linux_supports_traceclone.
520 (initialize_low): Remove call to linux_test_for_tracefork.
521 * linux-low.h (PTRACE_TYPE_ARG3): Move to
522 common/linux-ptrace.h.
523 (PTRACE_TYPE_ARG4): Likewise.
524 Include linux-ptrace.h.
526 2013-08-21 Pedro Alves <palves@redhat.com>
528 * config.in: Renegerate.
530 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
532 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
533 (SFILES): Remove $(srcdir)/common/target-common.c and
534 add $(srcdir)/target/waitstatus.c.
535 (OBS): Remove target-common.o and add waitstatus.o.
536 (server_h): Remove $(srcdir)/../common/target-common.h and
537 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
538 and $(srcdir)/../target/waitstatus.h.
539 (target-common.o): Remove.
540 (waitstatus.o): New target object file.
541 * target.h: Do not include target-common.h and
542 include target/resume.h, target/wait.h and
545 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
547 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
549 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
550 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
552 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
553 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
555 2013-07-27 Jie Zhang <jie@codesourcery.com>
556 Daniel Jacobowitz <dan@codesourcery.com>
557 Yao Qi <yao@codesourcery.com>
559 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
560 (mips-linux-watch.o): New rule.
561 (mips_linux_watch_h): New variable.
562 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
564 * linux-mips-low.c: Include mips-linux-watch.h.
565 (struct arch_process_info, struct arch_lwp_info): New.
566 (update_watch_registers_callback): New function.
567 (mips_linux_new_process, mips_linux_new_thread) New functions.
568 (mips_linux_prepare_to_resume, mips_insert_point): New
570 (mips_remove_point, mips_stopped_by_watchpoint): New
572 (rsp_bp_type_to_target_hw_bp_type): New function.
573 (mips_stopped_data_address): New function.
574 (the_low_target): Add watchpoint support functions.
576 2013-07-27 Yao Qi <yao@codesourcery.com>
578 * i386-low.c: Include break-common.h.
579 (enum target_hw_bp_type): Remove.
581 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
583 * Makefile.in (SFILES): /common/target-common.c.
584 (OBS): Add target-common.o.
585 (server_h): Add $(srcdir)/../common/target-common.h.
586 (target-common.o): New target.
587 * server.c (queue_stop_reply_callback): Free
588 status string after use.
589 * target.c (target_waitstatus_to_string): Remove.
590 * target.h: Include target-common.h.
591 (resume_kind): Likewise.
592 (target_waitkind): Likewise.
593 (target_waitstatus): Likewise.
594 (TARGET_WNOHANG): Likewise.
596 2013-07-04 Yao Qi <yao@codesourcery.com>
598 * Makefile.in (host_alias): Use @host_noncanonical@.
599 (target_alias): Use @target_noncanonical@.
600 * configure.ac: Use ACX_NONCANONICAL_TARGET and
601 ACX_NONCANONICAL_HOST.
602 * configure: Regenerated.
605 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
607 * configure.ac (version_host, version_target): Set and AC_SUBST them.
608 * configure: Rebuild.
609 * Makefile.in (version_host, version_target): Get from configure.
610 (version.c): Use $(version_host) and $(version_target).
612 2013-07-03 Pedro Alves <palves@redhat.com>
614 * Makefile.in (config.status): Depend on development.sh.
615 * acinclude.m4: Include libmcheck.m4.
616 * configure: Regenerate.
618 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
620 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
621 attribute inside the parentheses.
622 (winapi_DebugSetProcessKillOnExit): Ditto.
623 (winapi_DebugBreakProcess): Ditto.
624 (winapi_GenerateConsoleCtrlEvent): Ditto.
626 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
628 * notif.h (notif_event): Add a dummy member to avoid compiler
631 2013-07-01 Pedro Alves <palves@redhat.com>
633 * hostio.c (HOSTIO_PATH_MAX): Define.
634 (require_filename, handle_open, handle_unlink, handle_readlink):
637 2013-07-01 Pedro Alves <palves@redhat.com>
639 * server.h: Include "pathmax.h".
640 * linux-low.c: Don't include sys/param.h.
641 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
643 * win32-low.c: Don't include sys/param.h.
644 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
646 2013-07-01 Pedro Alves <palves@redhat.com>
648 * event-loop.c: Don't check HAVE_UNISTD_H before including
650 * gdbreplay.c: Likewise.
651 * remote-utils.c: Likewise.
652 * server.c: Likewise.
653 * configure.ac: Don't check for unistd.h.
654 * configure: Regenerate.
656 2013-06-28 Tom Tromey <tromey@redhat.com>
658 * Makefile.in (version.c): Use version.in, not
661 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
664 * configure: Rebuild.
665 * Makefile.in (version_host, version_target): Get from configure.
666 (version.c): Use $(version_host) and $(version_target).
668 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
670 Fix trace-status to output user name without trailing colon.
671 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
673 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
675 Fix trace-status to output proper start-time and stop-time.
676 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
677 output start time and stop time in hex as gdb expects.
679 2013-06-26 Pedro Alves <pedro@codesourcery.com>
681 * tracepoint.c (build_traceframe_info_xml): Output trace state
682 variables present in the trace buffer.
684 2013-06-24 Tom Tromey <tromey@redhat.com>
686 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
689 * gdbreplay.c: Include version.h.
690 (version, host_name): Don't declare.
691 * server.h: Include version.h.
692 (version, host_name): Don't declare.
694 2013-06-12 Pedro Alves <palves@redhat.com>
696 * linux-x86-low.c (linux_is_elf64): Delete global.
697 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
698 with local linux_pid_exe_is_elf_64_file use.
700 2013-06-11 Pedro Alves <palves@redhat.com>
702 * linux-low.c (regset_disabled, disable_regset): New functions.
703 (regsets_fetch_inferior_registers)
704 (regsets_store_inferior_registers): Use them.
705 (initialize_regsets_info); Don't allocate the disabled_regsets
707 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
710 2013-06-11 Pedro Alves <palves@redhat.com>
712 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
715 2013-06-11 Pedro Alves <palves@redhat.com>
717 * linux-x86-low.c (initialize_low_arch): Call
718 init_registers_x32_avx_linux.
720 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
722 Fix compatibility with Android Bionic.
723 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
726 2013-06-07 Pedro Alves <palves@redhat.com>
729 * Makefile.in (OBS): Add tdesc.o.
730 (IPA_OBJS): Add tdesc-ipa.o.
731 (tdesc-ipa.o): New rule.
732 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
734 * linux-low.c (new_inferior): Delete.
735 (disabled_regsets, num_regsets): Delete.
736 (linux_add_process): Adjust to set the new per-process
738 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
739 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
740 was a stop. When calling arch_setup, switch the current inferior
741 to the thread that got an event.
742 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
743 (regsets_fetch_inferior_registers)
744 (regsets_store_inferior_registers): New regsets_info parameter.
746 (linux_register_in_regsets): New regs_info parameter. Adjust to
748 (register_addr, fetch_register, store_register): New usrregs_info
749 parameter. Adjust to use it.
750 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
751 parameter regs_info. Adjust to use it.
752 (linux_fetch_registers): Get the current inferior's regs_info, and
754 (linux_store_registers): Ditto.
755 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
756 (initialize_low): Don't initialize the target_regsets here. Call
758 * linux-low.h (target_regsets): Delete declaration.
759 (struct regsets_info): New.
760 (struct usrregs_info): New.
761 (struct regs_info): New.
762 (struct process_info_private) <new_inferior>: New field.
763 (struct linux_target_ops): Delete the num_regs, regmap, and
764 regset_bitmap fields. New field regs_info.
765 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
766 * i387-fp.c (num_xmm_registers): Delete.
767 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
768 calls to new interface.
769 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
770 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
771 Infer the number of xmm registers from the regcache's target
773 * i387-fp.h (num_xmm_registers): Delete.
774 * inferiors.c (add_thread): Don't install the thread's regcache
776 * proc-service.c (gregset_info): Fetch the current inferior's
777 regs_info. Adjust to use it.
778 * regcache.c: Include tdesc.h.
779 (register_bytes, reg_defs, num_registers)
780 (gdbserver_expedite_regs): Delete.
781 (get_thread_regcache): If the thread doesn't have a regcache yet,
782 create one, instead of aborting gdbserver.
783 (regcache_invalidate_one): Rename to ...
784 (regcache_invalidate_thread): ... this.
785 (regcache_invalidate_one): New.
786 (regcache_invalidate): Only invalidate registers of the current
788 (init_register_cache): Add target_desc parameter, and use it.
789 (new_register_cache): Ditto. Assert the target description has a
790 non zero registers_size.
791 (regcache_cpy): Add assertions. Adjust.
792 (realloc_register_cache, set_register_cache): Delete.
793 (registers_to_string, registers_from_string): Adjust.
794 (find_register_by_name, find_regno, find_register_by_number)
795 (register_cache_size): Add target_desc parameter, and use it.
796 (free_register_cache_thread, free_register_cache_thread_one)
797 (regcache_release, register_cache_size): New.
798 (register_size): Add target_desc parameter, and use it.
799 (register_data, supply_register, supply_register_zeroed)
800 (supply_regblock, supply_register_by_name, collect_register)
801 (collect_register_as_string, collect_register_by_name): Adjust.
802 * regcache.h (struct target_desc): Forward declare.
803 (struct regcache) <tdesc>: New field.
804 (init_register_cache, new_register_cache): Add target_desc
806 (regcache_invalidate_thread): Declare.
807 (regcache_invalidate_one): Delete declaration.
808 (regcache_release): Declare.
809 (find_register_by_number, register_cache_size, register_size)
810 (find_regno): Add target_desc parameter.
811 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
813 * remote-utils.c: Include tdesc.h.
814 (outreg, prepare_resume_reply): Adjust.
815 * server.c: Include tdesc.h.
816 (gdbserver_xmltarget): Delete declaration.
817 (get_features_xml, process_serial_event): Adjust.
818 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
820 (struct process_info) <tdesc>: New field.
821 (ipa_tdesc): Declare.
824 * tracepoint.c: Include tdesc.h.
825 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
826 (get_context_regcache): Adjust to pass ipa_tdesc down.
827 (do_action_at_tracepoint): Adjust to get the register cache size
828 from the context regcache's description.
829 (traceframe_walk_blocks): Adjust to get the register cache size
830 from the current trace frame's description.
831 (traceframe_get_pc): Adjust to get current trace frame's
832 description and pass it down.
833 (gdb_collect): Adjust to get the register cache size from the
835 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
836 (gdbserver_xmltarget): Delete.
837 (initialize_low_tracepoint): Set the ipa's target description.
838 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
839 (initialize_low_tracepoint): Set the ipa's target description.
840 * linux-x86-low.c: Include tdesc.h.
841 [__x86_64__] (is_64bit_tdesc): New.
842 (ps_get_thread_area, x86_get_thread_area): Use it.
843 (i386_cannot_store_register): Rename to ...
844 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
845 (i386_cannot_fetch_register): Rename to ...
846 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
847 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
849 (target_regsets): Rename to ...
850 (x86_regsets): ... this.
851 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
853 (x86_siginfo_fixup): Use is_64bit_tdesc.
854 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
855 (tdesc_x32_avx_linux, tdesc_x32_linux)
856 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
858 (x86_linux_update_xmltarget): Delete.
859 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
860 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
861 (AMD64_LINUX_USER64_CS): New.
862 (x86_linux_read_description): New, based on
863 x86_linux_update_xmltarget.
864 (same_process_callback): New.
865 (x86_arch_setup_process_callback): New.
866 (x86_linux_update_xmltarget): New.
867 (x86_regsets_info): New.
868 (amd64_linux_regs_info): New.
869 (i386_linux_usrregs_info): New.
870 (i386_linux_regs_info): New.
871 (x86_linux_regs_info): New.
872 (x86_arch_setup): Reimplement.
873 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
874 (x86_emit_ops): Ditto.
875 (the_low_target): Adjust. Install x86_linux_regs_info,
876 x86_cannot_fetch_register, and x86_cannot_store_register.
877 (initialize_low_arch): New.
878 * linux-ia64-low.c (tdesc_ia64): Declare.
879 (ia64_fetch_register): Adjust.
880 (ia64_usrregs_info, regs_info): New globals.
881 (ia64_regs_info): New function.
882 (the_low_target): Adjust.
883 (initialize_low_arch): New function.
884 * linux-sparc-low.c (tdesc_sparc64): Declare.
885 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
887 (sparc_arch_setup): New function.
888 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
889 (the_low_target): Adjust.
890 (initialize_low_arch): New function.
891 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
892 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
893 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
894 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
895 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
896 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
897 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
898 (tdesc_powerpc_isa205_vsx64l): Declare.
899 (ppc_cannot_store_register, ppc_collect_ptrace_register)
900 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
901 (ppc_set_pc, ppc_get_hwcap): Adjust.
902 (ppc_usrregs_info): Forward declare.
903 (!__powerpc64__) ppc_regmap_adjusted: New global.
904 (ppc_arch_setup): Adjust to the current process'es target
906 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
907 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
908 (ppc_store_evrregset): Adjust.
909 (target_regsets): Rename to ...
910 (ppc_regsets): ... this, and make static.
911 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
912 (ppc_regs_info): New function.
913 (the_low_target): Adjust.
914 (initialize_low_arch): New function.
915 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
916 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
917 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
918 (tdesc_s390x_linux64v2): Declare.
919 (s390_collect_ptrace_register, s390_supply_ptrace_register)
920 (s390_fill_gregset, s390_store_last_break): Adjust.
921 (target_regsets): Rename to ...
922 (s390_regsets): ... this, and make static.
923 (s390_get_pc, s390_set_pc): Adjust.
924 (s390_get_hwcap): New target_desc parameter, and use it.
925 [__s390x__] (have_hwcap_s390_high_gprs): New global.
926 (s390_arch_setup): Adjust to set the current process'es target
927 description. Don't adjust the regmap.
928 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
929 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
930 (regs_info_3264): New globals.
931 (s390_regs_info): New function.
932 (the_low_target): Adjust.
933 (initialize_low_arch): New function.
934 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
935 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
936 [__mips64] (init_registers_mips_linux)
937 (init_registers_mips_dsp_linux): Delete defines.
938 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
939 (have_dsp): New global.
940 (mips_read_description): New, based on mips_arch_setup.
941 (mips_arch_setup): Reimplement.
942 (get_usrregs_info): New function.
943 (mips_cannot_fetch_register, mips_cannot_store_register)
944 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
945 (mips_fill_fpregset, mips_store_fpregset): Adjust.
946 (target_regsets): Rename to ...
947 (mips_regsets): ... this, and make static.
948 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
949 (dsp_regs_info, regs_info): New globals.
950 (mips_regs_info): New function.
951 (the_low_target): Adjust.
952 (initialize_low_arch): New function.
953 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
954 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
956 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
957 (arm_read_description): New, with bits factored from
959 (arm_arch_setup): Reimplement.
960 (target_regsets): Rename to ...
961 (arm_regsets): ... this, and make static.
962 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
963 (arm_regs_info): New function.
964 (the_low_target): Adjust.
965 (initialize_low_arch): New function.
966 * linux-m68k-low.c (tdesc_m68k): Declare.
967 (target_regsets): Rename to ...
968 (m68k_regsets): ... this, and make static.
969 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
970 (m68k_regs_info): New function.
971 (m68k_arch_setup): New function.
972 (the_low_target): Adjust.
973 (initialize_low_arch): New function.
974 * linux-sh-low.c (tdesc_sharch): Declare.
975 (target_regsets): Rename to ...
976 (sh_regsets): ... this, and make static.
977 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
978 (sh_regs_info, sh_arch_setup): New functions.
979 (the_low_target): Adjust.
980 (initialize_low_arch): New function.
981 * linux-bfin-low.c (tdesc_bfin): Declare.
982 (bfin_arch_setup): New function.
983 (bfin_usrregs_info, regs_info): New globals.
984 (bfin_regs_info): New function.
985 (the_low_target): Adjust.
986 (initialize_low_arch): New function.
987 * linux-cris-low.c (tdesc_cris): Declare.
988 (cris_arch_setup): New function.
989 (cris_usrregs_info, regs_info): New globals.
990 (cris_regs_info): New function.
991 (the_low_target): Adjust.
992 (initialize_low_arch): New function.
993 * linux-cris-low.c (tdesc_crisv32): Declare.
994 (cris_arch_setup): New function.
995 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
996 (cris_regs_info): New function.
997 (the_low_target): Adjust.
998 (initialize_low_arch): New function.
999 * linux-m32r-low.c (tdesc_m32r): Declare.
1000 (m32r_arch_setup): New function.
1001 (m32r_usrregs_info, regs_info): New globals.
1002 (m32r_regs_info): Adjust.
1003 (initialize_low_arch): New function.
1004 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1005 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1006 (tic6x_usrregs_info): Forward declare.
1007 (tic6x_read_description): New function, based on ...
1008 (tic6x_arch_setup): ... this. Reimplement.
1009 (target_regsets): Rename to ...
1010 (tic6x_regsets): ... this, and make static.
1011 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1012 (tic6x_regs_info): New function.
1013 (the_low_target): Adjust.
1014 (initialize_low_arch): New function.
1015 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1016 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1017 (target_regsets): Rename to ...
1018 (xtensa_regsets): ... this, and make static.
1019 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1021 (xtensa_arch_setup, xtensa_regs_info): New functions.
1022 (the_low_target): Adjust.
1023 (initialize_low_arch): New function.
1024 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1025 (nios2_arch_setup): Set the current process'es tdesc.
1026 (target_regsets): Rename to ...
1027 (nios2_regsets): ... this.
1028 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1029 (nios2_regs_info): New function.
1030 (the_low_target): Adjust.
1031 (initialize_low_arch): New function.
1032 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1033 (aarch64_arch_setup): Set the current process'es tdesc.
1034 (target_regsets): Rename to ...
1035 (aarch64_regsets): ... this.
1036 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1037 (aarch64_regs_info): New function.
1038 (the_low_target): Adjust.
1039 (initialize_low_arch): New function.
1040 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1042 (target_regsets): Rename to ...
1043 (tile_regsets): ... this.
1044 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1045 (tile_regs_info): New function.
1046 (tile_arch_setup): Set the current process'es tdesc.
1047 (the_low_target): Adjust.
1048 (initialize_low_arch): New function.
1049 * spu-low.c (tdesc_spu): Declare.
1050 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1051 * win32-arm-low.c (tdesc_arm): Declare.
1052 (arm_arch_setup): New function.
1053 (the_low_target): Install arm_arch_setup instead of
1055 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1056 (init_windows_x86): Rename to ...
1057 (i386_arch_setup): ... this. Set `win32_tdesc'.
1058 (the_low_target): Adjust.
1059 * win32-low.c (win32_tdesc): New global.
1060 (child_add_thread): Don't create the thread cache here.
1061 (do_initial_child_stuff): Set the new process'es tdesc.
1062 * win32-low.h (struct target_desc): Forward declare.
1063 (win32_tdesc): Declare.
1064 * lynx-i386-low.c (tdesc_i386): Declare global.
1065 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1066 * lynx-low.c (lynx_tdesc): New global.
1067 (lynx_add_process): Set the new process'es tdesc.
1068 * lynx-low.h (struct target_desc): Forward declare.
1069 (lynx_tdesc): Declare global.
1070 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1071 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1072 * nto-low.c (nto_tdesc): New global.
1073 (do_attach): Set the new process'es tdesc.
1074 * nto-low.h (struct target_desc): Forward declare.
1075 (nto_tdesc): Declare.
1076 * nto-x86-low.c (tdesc_i386): Declare.
1077 (nto_x86_arch_setup): Set `nto_tdesc'.
1079 2013-06-04 Gary Benson <gbenson@redhat.com>
1081 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1082 to qSupported response when appropriate.
1083 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1084 with nonzero-length annex.
1085 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1086 arguments supplied in annex.
1088 2013-05-31 Doug Evans <dje@google.com>
1091 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1092 64 bits in 64-cross-32 environment.
1094 2013-05-28 Pedro Alves <palves@redhat.com>
1096 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1097 (aarch64-without-fpu.c): Delete rule.
1098 * configure.srv (aarch64*-*-linux*): Remove references to
1099 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1100 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1103 2013-05-24 Pedro Alves <palves@redhat.com>
1105 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1106 instead of strchr/decode_address. Error if the range isn't split
1107 with a ','. Don't assume there's be a ':' in the action.
1109 2013-05-23 Yao Qi <yao@codesourcery.com>
1110 Pedro Alves <palves@redhat.com>
1112 * linux-low.c (lwp_in_step_range): New function.
1113 (linux_wait_1): If the thread was range stepping and stopped
1114 outside the stepping range, report the stop to GDB. Otherwise,
1115 continue stepping. Add range stepping debug output.
1116 (linux_set_resume_request): Copy the step range from the resume
1118 (linux_supports_range_stepping): New.
1119 (linux_target_ops) <supports_range_stepping>: Set to
1120 linux_supports_range_stepping.
1121 * linux-low.h (struct linux_target_ops)
1122 <supports_range_stepping>: New field.
1123 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1124 * linux-x86-low.c (x86_supports_range_stepping): New.
1125 (the_low_target) <supports_range_stepping>: Set to
1126 x86_supports_range_stepping.
1127 * server.c (handle_v_cont): Handle 'r' action.
1128 (handle_v_requests): Append ";r" if the target supports range
1130 * target.h (struct thread_resume) <step_range_start,
1131 step_range_end>: New fields.
1132 (struct target_ops) <supports_range_stepping>:
1134 (target_supports_range_stepping): New macro.
1136 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1138 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1139 confusion in comment.
1141 2013-05-17 Joel Brobecker <brobecker@adacore.com>
1143 * lynx-low.c (struct process_info_private): New type.
1144 (lynx_add_process): New function.
1145 (lynx_create_inferior, lynx_attach): Replace calls to
1146 add_process by calls to lynx_add_process.
1147 (lynx_resume): If PTID is null, then try using
1148 current_process()->private->last_wait_event_ptid.
1150 (lynx_clear_inferiors): Delete. The contents of that function
1151 has been inlined in lynx_mourn;
1152 (lynx_wait_1): Save the ptid in the process's private data.
1153 (lynx_mourn): Free the process' private data. Replace call
1154 to lynx_clear_inferiors by call to clear_inferiors.
1156 2013-05-17 Yao Qi <yao@codesourcery.com>
1158 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1161 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
1163 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1164 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1165 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1166 PT_TEXT_END_ADDR guards. Update comments.
1167 (linux_target_op) <read_offsets>: Conditionally define to
1168 linux_read_offsets if the target is UCLIBC and if it defines
1169 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1171 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1172 Andrew Jenner <andrew@codesourcery.com>
1174 * Makefile.in (SFILES): Add linux-nios2-low.c.
1175 (clean): Add action to delete nios2-linux.c.
1176 (nios2-linux.c): New rule.
1177 * configure.srv: Add nios2*-*-linux*.
1178 * linux-nios2-low.c: New.
1180 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1182 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1184 2013-04-25 Hui Zhu <hui@codesourcery.com>
1187 * ax.c (ax_printf): Add fflush.
1189 2013-04-22 Tom Tromey <tromey@redhat.com>
1191 * Makefile.in (SFILES): Add filestuff.c.
1192 (OBS): Add filestuff.o.
1193 (filestuff.o): New target.
1194 * config.in, configure: Rebuild.
1195 * configure.ac: Check for fdwalk, pipe2.
1197 2013-04-17 Pedro Alves <palves@redhat.com>
1199 * configure.ac (USE_THREAD_DB): Delete variable.
1200 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1201 Don't AC_SUBST USE_THREAD_DB.
1202 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1203 * config.in, configure: Regenerate.
1205 2013-04-16 Pedro Alves <palves@redhat.com>
1207 * linux-low.h (struct lwp_info) <thread_known>: Move under
1208 the USE_THREAD_DB #ifdef.
1210 2013-04-16 Pedro Alves <palves@redhat.com>
1212 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1213 (linux-low.o): Delete rule.
1214 * linux-low.h: Always include "gdb_thread_db.h" instead of
1215 conditionally including thread_db.h.
1216 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1219 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1221 * Makefile.in (install-only): Fix make install regression.
1223 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1225 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1226 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1228 * gdbserver.1: Remove.
1230 2013-03-22 Pedro Alves <palves@redhat.com>
1232 * linux-low.c (handle_extended_wait): Don't call
1233 linux_enable_event_reporting.
1235 2013-03-15 Tony Theodore <tonyt@logyst.com>
1238 * Makefile.in (SHELL): Use @SHELL@.
1240 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1242 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1245 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1247 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1248 Remove extraneous NULL element.
1250 2013-03-13 Yao Qi <yao@codesourcery.com>
1252 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1253 'V' block in trace frame.
1255 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1257 * target.h (struct target_ops): Add btrace ops.
1258 (target_supports_btrace): New macro.
1259 (target_enable_btrace): New macro.
1260 (target_disable_btrace): New macro.
1261 (target_read_btrace): New macro.
1262 * gdbthread.h (struct thread_info): Add btrace field.
1263 * server.c: Include btrace-common.h.
1264 (handle_btrace_general_set): New function.
1265 (handle_btrace_enable): New function.
1266 (handle_btrace_disable): New function.
1267 (handle_general_set): Call handle_btrace_general_set.
1268 (handle_qxfer_btrace): New function.
1269 (struct qxfer qxfer_packets[]): Add btrace entry.
1270 * inferiors.c (remove_thread): Disable btrace.
1271 * linux-low: Include linux-btrace.h.
1272 (linux_low_enable_btrace): New function.
1273 (linux_low_read_btrace): New function.
1274 (linux_target_ops): Add btrace ops.
1275 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1276 Add srv_linux_btrace=yes.
1277 (x86_64-*-linux*): Add linux-btrace.o.
1278 Add srv_linux_btrace=yes.
1279 * configure.ac: Define HAVE_LINUX_BTRACE.
1280 * config.in: Regenerated.
1281 * configure: Regenerated.
1283 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1285 * server.c (handle_qxfer): Preserve error message if -3 is
1287 (qxfer): Document the -3 return value.
1289 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1291 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1292 (linux_btrace_h): New variable.
1293 (linux-btrace.o): New rule.
1295 2013-03-08 Stan Shebs <stan@codesourcery.com>
1296 Hafiz Abid Qadeer <abidh@codesourcery.com>
1298 * tracepoint.c (trace_buffer_size): New global.
1299 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1300 (init_trace_buffer): Change to one-argument function. Allocate
1301 trace buffer memory.
1302 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1303 handle QTBuffer:size packet.
1304 (cmd_bigqtbuffer_size): New function.
1305 (initialize_tracepoint): Call init_trace_buffer with
1306 DEFAULT_TRACE_BUFFER_SIZE.
1307 * server.c (handle_query): Add QTBuffer:size in the
1310 2013-03-07 Yao Qi <yao@codesourcery.com>
1312 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1313 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1315 (cmd_qtsp): Adjust condition. Do post increment.
1316 Set cur_action and cur_step_action back to 0.
1318 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1321 * linux-low.c (linux_write_memory): Return early success if LEN is
1324 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1326 * configure.srv: Add x86_64-*-cygwin* as target.
1328 2013-02-28 Tom Tromey <tromey@redhat.com>
1330 * configure.ac: Invoke AC_SYS_LARGEFILE.
1331 * configure, config.in: Rebuild.
1333 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1335 * win32-low.c: Throughout, fix format strings and casts of
1336 printf-like functions to avoid type related warnings on all
1338 (get_child_debug_event): Print dwDebugEventCode as hex since
1339 that's how it's usually documented.
1341 2013-02-28 Yao Qi <yao@codesourcery.com>
1343 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1346 2013-02-27 Jiong Wang <jiwang@tilera.com>
1348 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1349 (reg-tilegx32.c): New rule.
1350 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1351 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1352 different register info initializer according to elf class.
1353 (init_registers_tilgx32): New function. The tilegx32 register info
1355 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1356 (tile_store_gregset): Likewise.
1358 2013-02-27 Yao Qi <yao@codesourcery.com>
1360 * server.c (process_point_options): Print debug message when
1361 debug_threads is true.
1363 2013-02-26 Yao Qi <yao@codesourcery.com>
1365 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1367 2013-02-19 Pedro Alves <palves@redhat.com>
1368 Kai Tietz <ktietz@redhat.com>
1372 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1373 instead of strtoul to extract address from packet.
1374 (process_serial_event) <'z'>: Likewise.
1376 2013-02-18 Yao Qi <yao@codesourcery.com>
1378 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1380 2013-02-14 Pedro Alves <palves@redhat.com>
1384 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1385 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1387 2013-02-14 Pedro Alves <palves@redhat.com>
1389 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1391 2013-02-14 Pedro Alves <palves@redhat.com>
1393 * tracepoint.c (save_string): Delete.
1394 (add_tracepoint_action): Use savestring instead of save_string.
1396 2013-02-12 Pedro Alves <palves@redhat.com>
1398 * linux-xtensa-low.c: Ditto.
1399 * xtensa-xtregs.c: Ditto.
1401 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1403 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1406 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1408 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1409 aarch64_num_wp_regs and aarch64_num_bp_regs to
1410 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1412 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1414 * linux-aarch64-low.c (ps_get_thread_area): Replace
1415 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1417 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1418 Marcus Shawcroft <marcus.shawcroft@arm.com>
1419 Nigel Stephens <nigel.stephens@arm.com>
1420 Yufeng Zhang <yufeng.zhang@arm.com>
1422 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1423 (aarch64.c, aarch64-without-fpu.c): New targets.
1424 * configure.srv (aarch64*-*-linux*): New.
1425 * linux-aarch64-low.c: New file.
1427 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1429 * linux-low.c (handle_extended_wait, linux_create_inferior)
1430 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1431 (dequeue_one_deferred_signal, linux_resume_one_thread)
1432 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1433 (linux_tracefork_grandchild, linux_test_for_tracefork)
1434 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1435 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1436 where the argument is 0.
1438 2013-01-25 Yao Qi <yao@codesourcery.com>
1440 * event-loop.c: Include "queue.h".
1441 (gdb_event_p): New typedef.
1442 (struct gdb_event) <next_event>: Remove.
1443 (event_queue): Change to QUEUE(gdb_event_p).
1444 (async_queue_event): Remove.
1445 (gdb_event_xfree): New.
1446 (initialize_event_loop): New.
1447 (process_event): Use API from QUEUE.
1448 (wait_for_event): Likewise.
1449 * server.c (main): Call initialize_event_loop.
1450 * server.h (initialize_event_loop): Declare.
1452 2013-01-18 Yao Qi <yao@codesourcery.com>
1454 * ax.h (struct eval_agent_expr_context): New.
1455 (gdb_eval_agent_expr): Update declaration.
1456 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1457 TFRAME. Add new argument CTX.
1458 * server.h (struct eval_agent_expr_context): Declare.
1459 (agent_mem_read, agent_tsv_read): Update declaration.
1460 (agent_mem_read_string): Likewise.
1461 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1462 (add_traceframe_block): Add new argument TPOINT.
1463 Increase TPOINT->traceframe_usage.
1464 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1465 eval_tracepoint_agent_expr.
1466 (condition_true_at_tracepoint): Likewise.
1467 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1468 (agent_mem_read_string, agent_tsv_read): Likewise.
1470 2013-01-16 Yao Qi <yao@codesourcery.com>
1472 * linux-low.c (linux_resume_one_lwp): Don't check
1473 'lwp->bp_reinsert != 0'.
1475 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1476 Pedro Alves <palves@redhat.com>
1478 * lynx-low.c (ptrace_request_to_str): Define a temporary
1479 macro and use it to simplify this function's implementation.
1481 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1483 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1486 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1488 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1490 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1492 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1494 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1496 * lynx-low.c (lynx_resume): Use the resume_info parameter
1497 to determine the ptid for the lynx_ptrace call, unless
1498 it is equal to minus_one_ptid, in which case we use the
1499 ptid of the current_inferior.
1500 (lynx_wait_1): After having received a thread create/exit
1501 event, resume the inferior's execution using the signaling
1502 thread's ptid, rather than the old ptid.
1504 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1506 * lynx-low.c (lynx_resume): Delete variable ret.
1508 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1510 * gdbreplay.c (gdbreplay_version): Update copyright year.
1511 * server.c (gdbserver_version): Likewise.
1513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1515 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1518 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1520 * lynx-low.c (ptrace_request_to_str): Add handling for
1523 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1525 * lynx-low.c (lynx_attach): Delete variable new_process.
1527 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1529 * lynx-low.c (lynx_create_inferior): Delete variable
1532 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1534 * lynx-low.c (ptrace_request_to_str): Do not handle
1535 PTRACE_GETTHREADLIST if this macro does not exist.
1537 2012-12-15 Yao Qi <yao@codesourcery.com>
1539 * Makefile.in (OBS): Add notif.o.
1540 * notif.c, notif.h: New.
1541 * server.c: Include "notif.h".
1542 (struct vstop_notif) <next>: Remove.
1544 (queue_stop_reply): Update.
1545 (push_event, send_next_stop_reply): Remove.
1546 (discard_queued_stop_replies): Update.
1547 (notif_stop): New variable.
1548 (handle_v_stopped): Remove.
1549 (handle_v_requests): Don't call handle_v_stopped. Call
1550 handle_ack_notif instead.
1551 (queue_stop_reply_callback): Call notif_event_enque instead
1552 of queue_stop_reply.
1553 (handle_status): Don't call send_next_stop_reply, call
1554 notif_write_event instead.
1555 (kill_inferior_callback): Likewise.
1556 (detach_or_kill_inferior_callback): Likewise.
1557 (main): Call initialize_notif.
1558 (process_serial_event): Call QUEUE_is_empty.
1559 (handle_target_event): Call notif_push instead of push event.
1560 * server.h (push_event): Remove declaration.
1562 2012-12-10 Tom Tromey <tromey@redhat.com>
1564 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1565 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1568 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1569 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1570 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1571 (amd64-linux-ipa.o, ax.o): Rewrite.
1572 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1573 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1574 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1575 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1576 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1577 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1578 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1579 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1580 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1581 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1582 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1583 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1584 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1585 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1586 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1587 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1588 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1589 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1590 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1591 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1592 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1593 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1594 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1595 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1596 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1597 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1598 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1599 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1600 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1601 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1602 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1603 (reg-tilegx.o): Remove.
1604 (all_object_files): New macro.
1605 Include .deps files.
1606 * aclocal.m4, configure: Rebuild.
1607 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1608 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1609 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1611 2012-12-05 Tom Tromey <tromey@redhat.com>
1614 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1616 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1618 * configure.ac: Check for linux/perf_event.h.
1619 * config.in: Regenerated.
1620 * configure: Regenerated.
1622 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1624 * hostio.c (handle_readlink): Decrease buffer size
1625 parameter passed to readlink by one byte.
1627 2012-11-26 Yao Qi <yao@codesourcery.com>
1629 * configure.ac (build_warnings): Append '-Wempty-body'.
1630 * configure: Regenerated.
1631 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1634 2012-11-15 Pierre Muller <muller@sourceware.org>
1636 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1637 * config.in: Regenerate.
1638 * configure: Regenerate.
1639 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1640 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1641 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1642 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1644 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1645 instead of <sys/wait.h> header.
1646 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1648 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1650 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1651 (various make rules): Remove -DGDBSERVER
1653 2012-11-09 Yao Qi <yao@codesourcery.com>
1655 * spu-low.c (current_ptid): Move it to ..
1656 * gdbthread.h: ... here. New.
1657 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1658 * server.c (myresume, process_serial_event): Likewise.
1659 * thread-db.c (thread_db_find_new_threads): Likewise.
1660 * tracepoint.c (run_inferior_command): Likewise.
1662 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1664 * server.c (handle_search_memory_1): Include access length in
1667 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1669 * linux-crisv32-low.c: Fix compile errors.
1671 2012-09-04 Yao Qi <yao@codesourcery.com>
1673 * tracepoint.c (cmd_qtsv): Adjust debug message.
1674 Don't check CUR_TPOINT.
1676 2012-08-28 Yao Qi <yao@codesourcery.com>
1678 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1679 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1680 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1681 Remove declarations of xmalloc, xreallloc, xstrdup and
1683 * Makefile.in (libiberty_h): New.
1684 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1685 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1687 2012-08-23 Yao Qi <yao@codesourcery.com>
1689 * server.h: Remove declaration of 'xsnprintf'.
1691 2012-08-22 Keith Seitz <keiths@redhat.com>
1693 * server.h: Include build-gnulib-gbserver/config.h.
1694 * gdbreplay.c: Likewise.
1696 2012-08-08 Doug Evans <dje@google.com>
1698 * Makefile.in (SFILES): Add gdb_vecs.c.
1699 (OBS): Add gdb_vecs.o.
1700 (gdb_vecs_h, host_defs_h): New variables.
1701 (thread-db.o): Add $(gdb_vecs_h) dependency.
1702 (gdb_vecs.o): New rule.
1703 * thread-db.c: #include "gdb_vecs.h".
1704 (thread_db_load_search): Use a vector to iterate over path elements.
1705 Handle text appearing after "$pdir".
1707 * configure.ac: Add check for strstr.
1708 * config.in: Regenerate.
1709 * configure: Regenerate.
1711 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1713 * hostio.c (handle_pread): If pread fails, fall back to attempting
1715 (handle_pwrite): Likewise for pwrite.
1717 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1719 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1720 between unsupported TYPE and unimplementable ADDR/LEN combination.
1721 (arm_insert_point): Act on new return value.
1723 2012-07-31 Pedro Alves <palves@redhat.com>
1725 * server.c (process_point_options): Only skip tokens if we find
1726 one that is unrecognized. Don't treat 'X' specially while
1727 skipping unrecognized tokens.
1729 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1731 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1732 to 4-byte-align HW breakpoint addresses for Thumb.
1734 2012-07-27 Yao Qi <yao@codesourcery.com>
1738 * server.h: Declare gdb_agent_about_to_close.
1739 * target.c (kill_inferior): Include "agent.h".
1740 New. Send command 'kill'.
1741 * target.h (kill_inferior): Removed macro.
1742 * tracepoint.c (gdb_agent_about_to_close): New.
1743 (gdb_agent_helper_thread): Handle command 'close'.
1744 Wait endlessly until the inferior stops.
1745 Install gdb_agent_remove_socket to atexit hook.
1746 (agent_socket_name): New static variable.
1747 (gdb_agent_socket_init): Replace local variable 'name' with
1748 'agent_socket_name'.
1749 (gdb_agent_remove_socket): New.
1751 2012-07-27 Yao Qi <yao@codesourcery.com>
1753 * server.c (process_point_options): Stop at 'X' when parsing.
1755 2012-07-19 Michael Eager <eager@eagercon.com>
1757 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1759 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1760 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1761 hardware breakpoint.
1763 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1765 * gdbserver/linux-low.c (initialize_low): Call
1766 linux_ptrace_init_warnings.
1768 2012-07-02 Doug Evans <dje@google.com>
1770 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1773 2012-07-02 Stan Shebs <stan@codesourcery.com>
1775 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1776 (ax.o): Add it to build rule.
1778 (OBS): Add format.o.
1779 (IPA_OBS): Add format.o.
1780 * server.c (handle_query): Claim support for breakpoint commands.
1781 (process_point_options): Add command case.
1782 (process_serial_event): Leave running if there are printfs in
1784 * mem-break.h (any_persistent_commands): Declare.
1785 (add_breakpoint_commands): Declare.
1786 (gdb_no_commands_at_breakpoint): Declare.
1787 (run_breakpoint_commands): Declare.
1788 * mem-break.c (struct point_command_list): New struct.
1789 (struct breakpoint): New field command_list.
1790 (any_persistent_commands): New function.
1791 (add_commands_to_breakpoint): New function.
1792 (add_breakpoint_commands): New function.
1793 (gdb_no_commands_at_breakpoint): New function.
1794 (run_breakpoint_commands): New function.
1795 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1797 * ax.c: Include format.h.
1798 (ax_printf): New function.
1799 (gdb_eval_agent_expr): Add printf opcode.
1801 2012-06-13 Yao Qi <yao@codesourcery.com>
1803 * server.c (start_inferior): Remove duplicated writes to fields
1804 'last_resume_kind' and 'last_status' of 'current_inferior'.
1806 2012-06-12 Yao Qi <yao@codesourcery.com>
1807 Pedro Alves <palves@redhat.com>
1809 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1811 * server.c (handle_v_cont): Extend comment.
1813 2012-06-11 Yao Qi <yao@codesourcery.com>
1815 * linux-low.c (linux_attach): Add 'static'.
1817 2012-06-06 Yao Qi <yao@codesourcery.com>
1819 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1821 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1823 Fix gcc -flto compilation warning.
1824 * server.c (main): Make variable multi_mode and attach volatile.
1826 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1828 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1829 if the platform doesn't know about it.
1831 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1833 * Makefile.in (SFILES): Add linux-tile-low.c.
1834 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1835 * configure.srv: Handle tilegx-*-linux*.
1836 * linux-tile-low.c: New file.
1838 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1840 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1842 2012-05-24 Pedro Alves <palves@redhat.com>
1846 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1848 2012-05-24 Pedro Alves <palves@redhat.com>
1852 Replace target_signal with gdb_signal throughout.
1854 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1856 * linux-low.c (linux_store_registers): Avoid the copying sequence
1857 when no data has been retrieved by ptrace.
1859 2012-05-22 Will Deacon <will.deacon@arm.com>
1861 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1862 Include asm/ptrace.h.
1863 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1866 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1868 * linux-low.c (linux_store_registers): Don't re-retrieve data
1869 with ptrace that has already been obtained from /proc. Always
1870 copy any data retrieved with ptrace to the buffer supplied.
1872 2012-05-11 Yao Qi <yao@codesourcery.com>
1873 Pedro Alves <palves@redhat.com>
1875 * linux-low.c (enum stopping_threads_kind): New.
1876 (stopping_threads): Change type to `enum stopping_threads_kind'.
1877 (handle_extended_wait): If stopping and suspending threads, leave
1878 the new_lwp suspended too.
1879 (linux_wait_for_event): Adjust.
1880 (stop_all_lwps): Set `stopping_threads' to
1881 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1882 whether we're suspending threads or just stopping them. Assert no
1885 2012-04-29 Yao Qi <yao@codesourcery.com>
1887 * server.h: Move some code to ...
1888 * gdbthread.h: ... here. New.
1889 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1890 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1891 (nto-low.o, win32-low.o): Likewise.
1892 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1893 * regcache.c, remote-utils.c, server.c: Likewise.
1894 * target.c, tracepoint.c, win32-low.c: Likewise.
1896 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1898 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1899 (PTRACE_ARG4_TYPE): Likewise.
1900 (PTRACE_XFER_TYPE): Likewise.
1901 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1902 ptrace to PTRACE_ARG3_TYPE.
1903 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1904 (PTRACE_ARG4_TYPE): Likewise.
1905 (PTRACE_XFER_TYPE): Likewise.
1906 (linux_detach_one_lwp): Cast fourth argument of
1907 ptrace to long then PTRACE_ARG4_TYPE.
1908 (regsets_fetch_inferior_registers): Cast third argument of
1909 ptrace to long then PTRACE_ARG3_TYPE.
1910 (regsets_store_inferior_registers): Likewise.
1912 2012-04-20 Pedro Alves <palves@redhat.com>
1914 * configure: Regenerate.
1916 2012-04-19 Pedro Alves <palves@redhat.com>
1918 * Makefile.in (GNULIB_BUILDDIR): New.
1919 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1920 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1921 (all, install-only, uninstall, clean-info, all-lib, clean): No
1922 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1923 (maintainer-clean realclean distclean): Use subdir_do.
1925 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1926 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1927 * acinclude.m4: Include acx_configure_dir.m4.
1928 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1929 calls. Call AC_PROG_RANLIB. Configure gnulib using
1932 (GNULIB_STDINT_H): Adjust.
1933 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1934 * gdbreplay.c: Include build-gnulib/config.h.
1935 * server.h: Likewise.
1936 * aclocal.m4: Regenerate.
1937 * config.in: Regenerate.
1938 * configure: Regenerate.
1940 2012-04-19 Pedro Alves <palves@redhat.com>
1942 * Makefile.in (LIBGNU, INCGNU): Adjust.
1943 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1944 (all, install-only, uninstall, clean-info, all-lib, clean)
1945 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1946 * configure.ac: Adjust AC_OUTPUT output.
1947 * aclocal.m4: Regenerate.
1948 * configure: Regenerate.
1950 2012-04-19 Pedro Alves <palves@redhat.com>
1952 * Makefile.in (generated_files): New.
1953 (server_h): Remove the explicit dependency on config.h, and depend
1954 on $generated_files.
1956 2012-04-19 Pedro Alves <palves@redhat.com>
1958 * Makefile.in (INCGNU): Add -Ignulib.
1960 2012-04-19 Pedro Alves <palves@redhat.com>
1962 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1963 (INCGNU): ... this, and spell out -I here.
1964 (GNULIB_LIB): Rename to ...
1966 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1968 2012-04-19 Pedro Alves <palves@redhat.com>
1970 * config.in: Regenerate.
1972 2012-04-19 Pedro Alves <palves@redhat.com>
1974 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1975 * server.h (memmem): Remove declaration.
1976 * config.in: Regenerate.
1977 * configure: Regenerate.
1979 2012-04-19 Yao Qi <yao@codesourcery.com>
1981 * Makefile.in (SFILES): Add common/vec.c.
1985 2012-04-19 Yao Qi <yao@codesourcery.com>
1987 * remote-utils.c (prepare_resume_reply): Replace with macro
1988 target_core_of_thread.
1989 * server.c (handle_qxfer_threads_proper): Likewise.
1990 * target.h (traget_core_of_thread): New macro.
1992 2012-04-18 Pedro Alves <palves@redhat.com>
1994 * aclocal.m4: Regenerate.
1995 * configure: Regenerate.
1997 2012-04-16 Yao Qi <yao@codesourcery.com>
1999 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2000 duplicated on address.
2002 2012-04-16 Yao Qi <yao@codesourcery.com>
2004 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2005 (struct tracepoint_action_ops) <send>: New field.
2006 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2007 (agent_expr_send, x_tracepoint_action_send): New.
2008 (l_tracepoint_action_send): New.
2009 (cmd_qtdp): Download and install tracepoint
2010 according to `use_agent'.
2011 (run_inferior_command): Add one more parameter `len'.
2013 (tracepoint_send_agent): New.
2014 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2016 2012-04-16 Yao Qi <yao@codesourcery.com>
2018 * tracepoint.c (download_tracepoints): Moved to ...
2019 (cmd_qtstart): ... here.
2021 2012-04-14 Yao Qi <yao@codesourcery.com>
2023 * tracepoint.c: Include inttypes.h.
2024 (struct collect_memory_action): Use sized types.
2025 (struct tracepoint): Likewise.
2026 (cmd_qtdp, stop_tracing): Update print specifiers.
2027 (cmd_qtp, response_tracepoint): Likewise.
2028 (collect_data_at_tracepoint): Likewise.
2029 (collect_data_at_step): Likewise.
2031 2012-04-14 Yao Qi <yao@codesourcery.com>
2033 Import gnulib module inttypes.
2034 * aclocal.m4, config.in, configure: Regenerated.
2036 2012-04-14 Yao Qi <yao@codesourcery.com>
2038 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2039 Makefile and config.status at last.
2041 2012-04-13 Yao Qi <yao@codesourcery.com>
2043 * tracepoint.c: Include stdint.h unconditionally.
2045 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2047 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2048 on BFD_HAVE_SYS_PROCFS_TYPE.
2049 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2050 * configure: Regenerate.
2051 * config.in: Likewise.
2053 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2055 * Makefile.in (clean): Also remove x32.c x32-linux.c
2056 x32-avx.c x32-avx-linux.c.
2057 (x32.o): New target.
2059 (x32-linux.o): Likewise.
2060 (x32-linux.c): Likewise.
2061 (x32-avx.o): Likewise.
2062 (x32-avx.c): Likewise.
2063 (x32-avx-linux.o): Likewise.
2064 (x32-avx-linux.c): Likewise.
2066 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2067 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2068 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2069 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2070 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2071 i386/x32-avx-linux.xml.
2073 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2074 (init_registers_x32_avx_linux): Likwise.
2075 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2076 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2078 2012-04-13 Pedro Alves <palves@redhat.com>
2080 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2081 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2082 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2083 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2086 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2088 * linux-x86-low.c (compat_x32_clock_t): New.
2089 (compat_x32_siginfo_t): Likewise.
2090 (compat_x32_siginfo_from_siginfo): Likewise.
2091 (siginfo_from_compat_x32_siginfo): Likewise.
2092 (linux_is_elf64): Likewise.
2093 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2094 and siginfo_from_compat_x32_siginfo for x32.
2095 (x86_arch_setup): Set linux_is_elf64.
2097 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2100 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2102 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2103 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2104 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2105 compatible with process.
2107 2012-04-12 Yao Qi <yao@codesourcery.com>
2109 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2110 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2111 (install-only, install-info, clean): Handle sub dir gnulib.
2112 (all-lib, am--refresh): New targets.
2113 (memmem.o): Remove target.
2114 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2115 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2116 (AC_REPLACE_FUNCS): Remove memmem.
2117 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2118 (AC_OUTPUT): Generate Makefile in gnulib/.
2119 * aclocal.m4, config.in, configure: Regenerated.
2121 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2123 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2125 2012-04-05 Pedro Alves <palves@redhat.com>
2127 -Werror=strict-aliasing
2129 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2132 2012-04-04 Pedro Alves <palves@redhat.com>
2134 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2135 (sparc_store_gregset_from_stack, sparc_store_gregset)
2136 (sparc_breakpoint_at): Fix formatting.
2138 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2140 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2142 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2143 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2144 * config.in: Regenerate.
2145 * configure: Likewise.
2147 2012-03-29 Pedro Alves <palves@redhat.com>
2149 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2150 Correct ptrace arguments.
2152 2012-03-28 Pedro Alves <palves@redhat.com>
2154 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2155 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2156 (IA64_FR1_REGNUM): New defines.
2157 (ia64_fetch_register): New.
2158 (the_low_target): Install it.
2159 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2161 * linux-low.c (linux_fetch_registers): Try the
2162 the_low_target.fetch_register hook first.
2164 * linux-arm-low.c (the_low_target): Adjust.
2165 * linux-bfin-low.c (the_low_target): Adjust.
2166 * linux-cris-low.c (the_low_target): Adjust.
2167 * linux-crisv32-low.c (the_low_target): Adjust.
2168 * linux-m32r-low.c (the_low_target): Adjust.
2169 * linux-m68k-low.c (the_low_target): Adjust.
2170 * linux-mips-low.c (the_low_target): Adjust.
2171 * linux-ppc-low.c (the_low_target): Adjust.
2172 * linux-s390-low.c (the_low_target): Adjust.
2173 * linux-sh-low.c (the_low_target): Adjust.
2174 * linux-sparc-low.c (the_low_target): Adjust.
2175 * linux-tic6x-low.c (the_low_target): Adjust.
2176 * linux-x86-low.c (the_low_target): Adjust.
2177 * linux-xtensa-low.c (the_low_target): Adjust.
2179 2012-03-26 Pedro Alves <palves@redhat.com>
2181 * server.c (handle_qxfer_libraries): Don't bail early if
2182 the_target->qxfer_libraries_svr4 is not NULL.
2184 2012-03-26 Pedro Alves <palves@redhat.com>
2186 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2188 2012-03-23 Pedro Alves <palves@redhat.com>
2190 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2191 "library-list-svr4" element's start tag when the the DSO list is
2194 2012-03-23 Pedro Alves <palves@redhat.com>
2196 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2197 a variable whose type size is the same as the inferior's pointer
2200 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2202 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2204 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2205 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2206 * linux-low.h: Include <signal.h>.
2207 (struct siginfo): Remove forward declaration.
2208 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2211 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2213 * .gitignore: Ignore more files.
2215 2012-03-19 Pedro Alves <palves@redhat.com>
2216 Jan Kratochvil <jan.kratochvil@redhat.com>
2218 * server.c (cont_thread, general_thread): Add describing comments.
2219 (start_inferior): Clear `cont_thread'.
2220 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2223 2012-03-15 Yao Qi <yao@codesourcery.com>
2225 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2227 (cmd_qtdp): ... here.
2229 2012-03-15 Yao Qi <yao@codesourcery.com>
2231 * tracepoint.c (struct tracepoint_action_ops): New.
2232 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2233 (m_tracepoint_action_download): New.
2234 (r_tracepoint_action_download): New.
2235 (x_tracepoint_action_download): New.
2236 (l_tracepoint_action_download): New.
2237 (add_tracepoint_action): Install `action->ops' according type.
2238 (download_tracepoint_1): Move code `download' function pointer
2239 of various tracepoint_action_ops.
2241 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2243 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2244 linux_ptrace_attach_warnings.
2246 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2248 * Makefile.in (linux-ptrace.o): New.
2249 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2250 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2251 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2252 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2253 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2255 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2257 2012-03-08 Yao Qi <yao@codesourcery.com>
2258 Pedro Alves <palves@redhat.com>
2260 Fix PR server/13392.
2261 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2263 * tracepoint.c (remove_tracepoint): New.
2264 (cmd_qtdp): Call remove_tracepoint when failed to install.
2266 2012-03-07 Pedro Alves <palves@redhat.com>
2268 * linux-low.c (get_detach_signal): New.
2269 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2270 Pass on pending signals to PTRACE_DETACH. Check the result of the
2272 * server.c (program_signals, program_signals_p): New.
2273 (handle_general_set): Handle QProgramSignals.
2274 * server.h (program_signals, program_signals_p): Declare.
2276 2012-03-05 Pedro Alves <palves@redhat.com>
2277 Jan Kratochvil <jan.kratochvil@redhat.com>
2279 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2282 2012-03-03 Yao Qi <yao@codesourcery.com>
2284 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2285 agent_look_up_symbols.
2287 2012-03-03 Yao Qi <yao@codesourcery.com>
2289 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2290 (linux-x86-low.o): Likewise.
2291 * server.h: Remove in_process_agent_loaded.
2292 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2296 2012-03-03 Yao Qi <yao@codesourcery.com>
2298 * tracepoint.c (gdb_agent_capability): New global.
2299 (in_process_agent_loaded_ust): Renamed to
2300 `in_process_agent_supports_ust'.
2302 (in_process_agent_supports_ust): Call agent_capability_check.
2303 (clear_installed_tracepoints): Assert that agent supports
2306 2012-03-03 Yao Qi <yao@codesourcery.com>
2308 * linux-low.c (linux_supports_agent): New.
2309 (linux_target_ops): Initialize field `supports_agent' with
2310 linux_supports_agent.
2311 * target.h (struct target_ops) <supports_agent>: New.
2312 (target_supports_agent): New macro.
2313 * server.c (handle_general_set): Handle packet 'QAgent'.
2314 (handle_query): Send `QAgent+'.
2315 * Makefile.in (server.o): Depends on agent.h.
2317 2012-03-03 Yao Qi <yao@codesourcery.com>
2319 * Makefile.in (OBS): Add agent.o.
2320 Add new rule for agent.o.
2321 Track dependence of tracepoint.c on agent.h.
2322 * tracepoint.c (run_inferior_command_1):
2323 (run_inferior_command): Call agent_run_command.
2324 (gdb_ust_connect_sync_socket): Deleted. Move it to
2326 (resume_thread, stop_thread): Likewise.
2327 (gdb_ust_socket_init): Renamed to ...
2328 (gdb_agent_socket_init): ... New.
2329 (gdb_ust_thread): Renamed to ...
2330 (gdb_agent_helper_thread): ... New.
2331 (gdb_ust_init): Move some code to ...
2332 (gdb_agent_init): ... here. New.
2333 [HAVE_UST]: Call gdb_ust_init.
2334 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2335 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2336 * config.in, configure: Regenerated.
2338 2012-03-02 Pedro Alves <palves@redhat.com>
2340 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2341 * linux-low.c (struct simple_pid_list): New.
2342 (stopped_pids): New a struct simple_pid_list pointer.
2343 (add_to_pid_list, pull_pid_from_list): New.
2344 (handle_extended_wait): Don't assume the first signal new children
2345 report is SIGSTOP. Adjust call to pull_pid_from_list.
2346 (linux_wait_for_lwp): Adjust.
2348 2012-03-02 Yao Qi <yao@codesourcery.com>
2350 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2353 2012-03-02 Yao Qi <yao@codesourcery.com>
2355 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2356 `stop_pc' and `tpoint'. Update caller.
2358 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2360 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2361 * linux-low.c (use_linux_regsets): New macro.
2362 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2363 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2364 (linux_register_in_regsets): New function.
2365 (usr_fetch_inferior_registers): Skip registers covered by
2367 (usr_store_inferior_registers): Likewise.
2368 (usr_fetch_inferior_registers): New macro.
2369 (usr_store_inferior_registers): Likewise.
2370 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2371 (linux_store_registers): Likewise.
2372 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2374 (init_registers_mips64_dsp_linux): Likewise.
2375 (init_registers_mips_linux): New macro.
2376 (init_registers_mips_dsp_linux): Likewise.
2377 (mips_dsp_num_regs): Likewise.
2378 (DSP_BASE, DSP_CONTROL): New fallback macros.
2379 (mips_base_regs): New macro.
2380 (mips_regmap): Use it. Fix the size.
2381 (mips_dsp_regmap): New variable.
2382 (mips_dsp_regset_bitmap): Likewise.
2383 (mips_arch_setup): New function.
2384 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2386 (mips_cannot_store_register): Likewise.
2387 (the_low_target): Update .arch_setup, .num_regs and .regmap
2388 initializers. Add .regset_bitmap initializer.
2389 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2391 * linux-bfin-low.c (the_low_target): Likewise.
2392 * linux-cris-low.c (the_low_target): Likewise.
2393 * linux-crisv32-low.c (the_low_target): Likewise.
2394 * linux-ia64-low.c (the_low_target): Likewise.
2395 * linux-m32r-low.c (the_low_target): Likewise.
2396 * linux-m68k-low.c (the_low_target): Likewise.
2397 * linux-ppc-low.c (the_low_target): Likewise.
2398 * linux-s390-low.c (the_low_target): Likewise.
2399 * linux-sh-low.c (the_low_target): Likewise.
2400 * linux-sparc-low.c (the_low_target): Likewise.
2401 * linux-tic6x-low.c (the_low_target): Likewise.
2402 * linux-x86-low.c (the_low_target): Likewise.
2403 * linux-xtensa-low.c (the_low_target): Likewise.
2404 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2405 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2406 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2408 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2409 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2411 2012-02-29 Yao Qi <yao@codesourcery.com>
2412 Pedro Alves <palves@redhat.com>
2414 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2415 `step_over_finished' is true.
2417 2012-02-27 Pedro Alves <palves@redhat.com>
2419 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2420 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2422 2012-02-27 Pedro Alves <palves@redhat.com>
2425 * linux-low.c (pid_is_stopped): New.
2426 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2428 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2430 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2433 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2435 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2437 2012-02-24 Luis Machado <lgustavo@codesourcery>
2439 * server.c (handle_query): Advertise support for target-side
2440 breakpoint condition evaluation.
2441 (process_point_options): New function.
2442 (process_serial_event): When inserting a breakpoint, check for
2443 a target-side condition that should be evaluated.
2445 * mem-break.c: Include regcache.h and ax.h.
2446 (point_cond_list_t): New data structure.
2447 (breakpoint) <cond_list>: New field.
2448 (find_gdb_breakpoint_at): Make non-static.
2449 (delete_gdb_breakpoint_at): Clear any target-side
2451 (clear_gdb_breakpoint_conditions): New function.
2452 (add_condition_to_breakpoint): Likewise.
2453 (add_breakpoint_condition): Likewise.
2454 (gdb_condition_true_at_breakpoint): Likewise.
2455 (gdb_breakpoint_here): Return result directly instead
2456 of going through a local variable.
2458 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2459 (clear_gdb_breakpoint_conditions): Likewise.
2460 (add_breakpoint_condition): Likewise.
2461 (gdb_condition_true_at_breakpoint): Likewise.
2463 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2464 (need_step_over_p): Take target-side breakpoint condition into
2467 2012-02-24 Luis Machado <lgustavo@codesourcery>
2469 * server.h: Include tracepoint.h.
2470 (agent_mem_read, agent_get_trace_state_variable_value,
2471 agent_set_trace_state_variable_value,
2472 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2473 get_set_tsv_func_addr): New prototypes.
2475 * ax.h: New include file.
2476 * ax.c: New source file.
2478 * tracepoint.c: Include ax.h.
2479 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2480 agent_expr, eval_result_type): Move to ax.h.
2481 (parse_agent_expr): Rename to ...
2482 (gdb_parse_agent_expr): ... this, make it non-static and move
2484 (unparse_agent_expr) Rename to ...
2485 (gdb_unparse_agent_expr): ... this, make it non-static and move
2487 (eval_agent_expr): Rename to ...
2488 (eval_tracepoint_agent_expr): ... this.
2489 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2490 forward declarations.
2491 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2492 (agent_get_trace_state_variable_value): New function.
2493 (agent_set_trace_state_variable_value): New function.
2494 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2495 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2496 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2497 (condition_true_at_tracepoint): Likewise.
2498 (parse_agent_expr): Rename to ...
2499 (gdb_parse_agent_expr): ... this and move to ax.c.
2500 (unparse_agent_expr): Rename to ...
2501 (gdb_unparse_agent_expr): ... this and move to ax.c.
2502 (gdb_agent_op_name): Move to ax.c.
2503 (eval_agent_expr): Rename to ...
2504 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2506 (eval_tracepoint_agent_expr): New function.
2507 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2509 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2511 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2512 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2513 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2514 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2515 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2516 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2517 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2518 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2519 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2520 (compile_bytecodes): Remove forward declaration.
2521 (is_goto_target): Move to ax.c.
2522 (compile_bytecodes): Move to ax.c and call
2523 agent_get_trace_state_variable_value (...) and
2524 agent_set_trace_state_variable_value (...).
2526 * Makefile.in: Update ax.c and IPA dependencies.
2528 2012-02-24 Pedro Alves <palves@redhat.com>
2530 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2531 (cmd_bigqtbuffer_circular): ... this. Only handle
2532 'QTBuffer:circular:'.
2533 (handle_tracepoint_general_set): Adjust.
2535 2012-02-16 Yao Qi <yao@codesourcery.com>
2537 * inferiors.c: Move code to ...
2538 * dll.c: .... here. New.
2539 * server.h: Declare clear_dlls.
2540 * Makefile.in (SFILES): Add dll.c.
2544 2012-02-11 Yao Qi <yao@codesourcery.com>
2546 * server.c: (handle_monitor_command): Add a new parameter
2548 (handle_query): Update caller.
2550 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2552 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2553 * configure, config.in: Regenerate.
2554 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2557 2012-02-02 Pedro Alves <palves@redhat.com>
2559 Try SIGKILL first, then PTRACE_KILL.
2560 * linux-low.c (linux_kill_one_lwp): New.
2561 (linux_kill_one_lwp): Rename to ...
2562 (kill_one_lwp_callback): ... this. Use the new
2565 2012-02-02 Pedro Alves <palves@redhat.com>
2567 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2570 2012-01-27 Pedro Alves <palves@redhat.com>
2572 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2573 (elf_64_file_p): Make static.
2574 (linux_pid_exe_is_elf_64_file): New.
2575 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2576 Delete declarations.
2577 (linux_pid_exe_is_elf_64_file): Declare.
2578 * linux-x86-low.c (x86_arch_setup): Use
2579 linux_pid_exe_is_elf_64_file.
2581 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2583 * linux-low.c (linux_wait_for_event_1): Rename to ...
2584 (linux_wait_for_event): ... here and merge it with former
2585 linux_wait_for_event - new variable wait_ptid, use it.
2586 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2588 2012-01-23 Pedro Alves <palves@redhat.com>
2590 * server.c (main): Avoid yet another case of infinite loop while
2591 detaching/killing after a longjmp.
2593 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2596 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2598 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2600 * hostio.c (handle_readlink): New function.
2601 (handle_vFile): Call it to handle "vFile:readlink" packets.
2603 2012-01-20 Pedro Alves <palves@redhat.com>
2604 Ulrich Weigand <ulrich.weigand@linaro.org>
2606 * server.c (handle_v_requests): Only support vAttach and vRun to
2607 start multiple processes when in extended protocol mode.
2609 2012-01-17 Pedro Alves <palves@redhat.com>
2611 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2612 memalign plus mprotect to allocate the scratch buffer.
2614 2012-01-13 Pedro Alves <palves@redhat.com>
2616 * server.c (attach_inferior): Clear `cont_thread'.
2618 2012-01-13 Pedro Alves <palves@redhat.com>
2620 * server.c (main): Avoid infinite loop while detaching/killing
2623 2012-01-09 Doug Evans <dje@google.com>
2625 * server.c (start_inferior): Set last_ptid in --wrapper case.
2627 2012-01-06 Yao Qi <yao@codesourcery.com>
2629 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2631 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2633 2012-01-04 Yao Qi <yao@codesourcery.com>
2635 * tracepoint.c (cmd_qtdp): Print debug message
2636 for static tracepoint.
2638 2012-01-04 Yao Qi <yao@codesourcery.com>
2640 * tracepoint.c (trace_vdebug): Differentiate debug message
2641 between gdbserver and IPA.
2643 2012-01-03 Yao Qi <yao@codesourcery.com>
2645 * tracepoint.c (tracepoint_was_hit): Don't collect for
2648 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2650 * terminal.h: Reformat copyright header.
2652 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2654 * server.c (gdbserver_version): Update copyright year.
2655 * gdbreplay.c (gdbreplay_version): Likewise.
2657 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2659 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2662 2011-12-18 Hui Zhu <teawater@gmail.com>
2663 * linux-low.c (linux_create_inferior): Save return value to ret.
2665 2011-12-18 Hui Zhu <teawater@gmail.com>
2667 * linux-low.c (linux_create_inferior): Save return value to ret.
2669 2011-12-16 Doug Evans <dje@google.com>
2671 * linux-low.c (linux_create_inferior): If stdio connection,
2672 redirect stdin from /dev/null, stdout to stderr.
2673 * remote-utils.c (remote_is_stdio): New static global.
2674 (remote_connection_is_stdio): New function.
2675 (remote_prepare): Handle stdio connection.
2676 (remote_open): Ditto.
2677 (remote_close): Don't close stdin for stdio connections.
2678 (read_prim,write_prim): New functions. Replace all calls to
2679 read/write to these.
2680 * server.c (main): Watch for "-" argument. Move call to
2681 remote_prepare before start_inferior.
2682 * server.h (STDIO_CONNECTION_NAME): New macro.
2683 (remote_connection_is_stdio): Declare.
2685 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2686 in debugging output.
2688 2011-12-15 Yao Qi <yao@codesourcery.com>
2690 * tracepoint.c: Include sys/syscall.h.
2691 (gdb_ust_thread): Remove preprocessor conditional.
2693 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2695 * linux-low.c (linux_detach_one_lwp): Call
2696 the_low_target.prepare_to_resume before detaching.
2698 2011-12-14 Yao Qi <yao@codesourcery.com>
2700 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2703 2011-12-14 Yao Qi <yao@codesourcery.com>
2705 * i386-low.c (i386_low_stopped_data_address): Initialize local
2708 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2712 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2713 DR_CONTROL unless necessary. Extend comments.
2714 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2715 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2717 2011-12-13 Yao Qi <yao@codesourcery.com>
2719 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2721 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2723 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2725 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2726 Print new debug message for such case.
2728 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2730 Fix overlapping memcpy.
2731 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2732 the read_inferior_memory transfer.
2733 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2734 write_inferior_memory transfer.
2735 (set_fast_tracepoint_jump): New variable buf. Use it for the
2736 read_inferior_memory and write_inferior_memory transfers.
2737 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2738 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2739 Use it for the write_inferior_memory transfer.
2740 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2743 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2745 * linux-low.c (fetch_register, store_register): Make code
2746 consistent, fix formatting.
2748 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2750 * linux-low.c (usr_store_inferior_registers): Factor out code
2751 to handle individual registers into...
2752 (store_register): ... this new function.
2754 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2756 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2757 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2758 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2759 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2760 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2761 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2762 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2763 (srv_xmlfiles): Add new XML files.
2765 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2767 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2768 (init_registers_s390_linux32v1): Add prototype.
2769 (init_registers_s390_linux32v2): Likewise.
2770 (init_registers_s390_linux64v1): Likewise.
2771 (init_registers_s390_linux64v2): Likewise.
2772 (init_registers_s390x_linux64v1): Likewise.
2773 (init_registers_s390x_linux64v2): Likewise.
2774 (s390_num_regs): Increment to 52.
2775 (s390_regmap): Add orig_r2 register.
2776 (s390_num_regs_3264): Increment to 68.
2777 (s390_regmap_3264): Add orig_r2 register.
2778 (s390_collect_ptrace_register): Handle orig_r2 register.
2779 (s390_supply_ptrace_register): Likewise.
2780 (s390_fill_last_break): New function.
2781 (s390_store_last_break): Likewise.
2782 (s390_fill_system_call): New function.
2783 (s390_store_system_call): Likewise.
2784 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2786 (s390_check_regset): New function.
2787 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2788 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2789 Update target_regsets for available register sets.
2791 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2792 Jan Kratochvil <jan.kratochvil@redhat.com>
2794 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2795 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2797 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2798 * linux-low.h (struct process_info_private): New member r_debug.
2799 * server.c (handle_qxfer_libraries): Call
2800 the_target->qxfer_libraries_svr4.
2801 (handle_qxfer_libraries_svr4): New function.
2802 (qxfer_packets): New entry "libraries-svr4".
2803 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2804 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2805 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2806 PACKET_qXfer_libraries_svr4.
2808 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2810 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2811 PSW address/mask between 8-byte and 16-byte formats.
2812 (s390_supply_ptrace_register): Likewise.
2813 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2814 basic addressing mode bit.
2816 2011-11-24 Stan Shebs <stan@codesourcery.com>
2818 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2820 2011-11-17 Stan Shebs <stan@codesourcery.com>
2822 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2823 (tracing_start_time): New global.
2824 (tracing_stop_time): New global.
2825 (tracing_user_name): New global.
2826 (tracing_notes): New global.
2827 (tracing_stop_note): New global.
2828 (cmd_qtstart): Set traceframe_usage, start_time.
2829 (stop_tracing): Set stop_time.
2830 (cmd_qtstatus): Report additional status.
2831 (cmd_qtp): New function.
2832 (handle_tracepoint_query): Call it.
2833 (cmd_qtnotes): New function.
2834 (handle_tracepoint_general_set): Call it.
2835 (get_timestamp): Rename from tsv_get_timestamp.
2837 2011-11-14 Stan Shebs <stan@codesourcery.com>
2838 Kwok Cheung Yeung <kcy@codesourcery.com>
2840 * linux-x86-low.c (small_jump_insn): New.
2841 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2842 trampoline and error message, build a trampoline and issue a small
2843 jump instruction to it.
2844 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2845 trampoline and error message.
2846 (x86_get_min_fast_tracepoint_insn_len): New.
2847 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2848 * linux-low.h (struct linux_target_ops): Add arguments to
2849 install_fast_tracepoint_jump_pad operation, add new operation.
2850 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2852 (linux_get_min_fast_tracepoint_insn_len): New function.
2853 (linux_target_op): Add new operation.
2854 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2855 (gdb_trampoline_buffer_end): Ditto.
2856 (gdb_trampoline_buffer_error): Ditto.
2857 (struct ipa_sym_addresses): Add fields for new IPA variables.
2858 (symbol_list): Add entries for new IPA variables.
2859 (struct tracepoint): Add fields to hold the address range of the
2860 trampoline used by the tracepoint.
2861 (trampoline_buffer_head): New static variable.
2862 (trampoline_buffer_tail): Ditto.
2863 (claim_trampoline_space): New function.
2864 (have_fast_tracepoint_trampoline_buffer): New function.
2865 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2867 (install_fast_tracepoint): Ditto, also add error buffer argument.
2868 (cmd_qtminftpilen): New function.
2869 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2870 (fast_tracepoint_from_trampoline_address): New function.
2871 (fast_tracepoint_collecting): Handle trampoline as part of jump
2873 (set_trampoline_buffer_space): New function.
2874 (initialize_tracepoint): Initialize new IPA variables.
2875 * target.h (struct target_ops): Add arguments to
2876 install_fast_tracepoint_jump_pad operation, add new
2877 get_min_fast_tracepoint_insn_len operation.
2878 (target_get_min_fast_tracepoint_insn_len): New.
2879 (install_fast_tracepoint_jump_pad): Add arguments.
2880 * server.h (IPA_BUFSIZ): Define.
2881 * linux-i386-ipa.c: Include extra header files.
2882 (initialize_fast_tracepoint_trampoline_buffer): New function.
2883 (initialize_low_tracepoint): Call it.
2884 * server.h (set_trampoline_buffer_space): Declare.
2885 (claim_trampoline_space): Ditto.
2886 (have_fast_tracepoint_trampoline_buffer): Ditto.
2888 2011-11-14 Yao Qi <yao@codesourcery.com>
2890 * server.c (handle_query): Handle InstallInTrace for qSupported.
2891 * tracepoint.c (add_tracepoint): Sort list.
2892 (install_tracepoint, download_tracepoint): New.
2893 (cmd_qtdp): Call them to install and download tracepoints.
2894 (sort_tracepoints): Removed.
2895 (cmd_qtstart): Update.
2897 2011-11-14 Yao Qi <yao@codesourcery.com>
2899 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2900 * mem-break.h: Declare.
2901 * tracepoint.c (cmd_qtstart): Move some code to ...
2902 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2904 (download_tracepoints): Move some code to ...
2905 (download_tracepoint_1): ... here. New.
2907 2011-11-08 Yao Qi <yao@codesourcery.com>
2909 * remote-utils.c (relocate_instruction): A comment fix.
2911 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2913 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2914 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2915 dr_status_mirror and dr_control_mirror from debug_reg_state.
2916 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2917 (i386_initial_stuff): Remove use of deleted globals.
2918 (i386_get_thread_context, i386_set_thread_context,
2919 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2920 from debug_reg_state.
2922 2011-11-05 Yao Qi <yao@codesourcery.com>
2924 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2925 address as TPOINT's.
2927 2011-11-02 Stan Shebs <stan@codesourcery.com>
2929 * tracepoint.c (agent_mem_read_string): New function.
2930 (eval_agent_expr): Call it for tracenz.
2931 * server.c (handle_query): Report support for tracenz.
2933 2011-11-02 Yao Qi <yao@codesourcery.com>
2935 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2937 2011-11-02 Yao Qi <yao@codesourcery.com>
2939 * target.h: Fix a typo in comment.
2941 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2943 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2944 clobber the breakpoints' shadows with fast tracepoint jumps.
2945 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2946 * target.c (write_inferior_memory): Also pass MYADDR down to
2949 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2951 * configure.ac: Check support for personality routine.
2952 * configure: Regenerate.
2953 * config.in: Likewise.
2954 * linux-low.c: Include <sys/personality.h>.
2955 Define ADDR_NO_RANDOMIZE if necessary.
2956 (linux_create_inferior): Disable address space randomization when
2957 forking inferior, if requested.
2958 (linux_supports_disable_randomization): New function.
2959 (linux_target_ops): Install it.
2960 * server.h (disable_randomization): Declare.
2961 * server.c (disable_randomization): New global variable.
2962 (handle_general_set): Handle QDisableRandomization.
2963 (handle_query): Likewise for qSupported.
2964 (main): Support --disable-randomization and --no-disable-randomization
2965 command line arguments.
2966 * target.h (struct target_ops): Add supports_disable_randomization.
2967 (target_supports_disable_randomization): New macro.
2969 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2971 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2973 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2974 [!PT_GETDSBT] (target_loadmap): New definition.
2975 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2976 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2977 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2978 and PT_GETDSBT to LINUX_LOADMAP.
2979 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2980 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2982 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2984 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2985 (arm_linux_hwbp_cap): New static variable.
2986 (arm_linux_get_hwbp_cap): Replace by ...
2987 (arm_linux_init_hwbp_cap): ... this new function.
2988 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2989 (arm_linux_get_hw_watchpoint_count): Likewise.
2990 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2991 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2992 (arm_prepare_to_resume): Use perror_with_name instead of error.
2994 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2996 * linux-arm-low.c: Include <signal.h>.
2997 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2998 (struct arm_linux_hwbp_cap): New data type.
2999 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3000 (struct arm_linux_hw_breakpoint): New data type.
3001 (MAX_BPTS, MAX_WPTS): Define.
3002 (struct arch_process_info, struct arch_lwp_info): New data types.
3003 (arm_linux_get_hwbp_cap): New function.
3004 (arm_linux_get_hw_breakpoint_count): Likewise.
3005 (arm_linux_get_hw_watchpoint_count): Likewise.
3006 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3007 (arm_hwbp_control_initialize): Likewise.
3008 (arm_hwbp_control_is_enabled): Likewise.
3009 (arm_hwbp_control_is_initialized): Likewise.
3010 (arm_hwbp_control_disable): Likewise.
3011 (arm_linux_hw_breakpoint_equal): Likewise.
3012 (arm_linux_hw_point_initialize): Likewise.
3013 (struct update_registers_data): New data structure.
3014 (update_registers_callback: New function.
3015 (arm_insert_point): Likewise.
3016 (arm_remove_point): Likewise.
3017 (arm_stopped_by_watchpoint): Likewise.
3018 (arm_stopped_data_address): Likewise.
3019 (arm_new_process): Likewise.
3020 (arm_new_thread): Likewise.
3021 (arm_prepare_to_resume): Likewise.
3022 (the_low_target): Register arm_insert_point, arm_remove_point,
3023 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3024 arm_new_thread, and arm_prepare_to_resume.
3026 2011-09-15 Stan Shebs <stan@codesourcery.com>
3028 * server.h (struct emit_ops): Add compare-goto fields.
3029 * tracepoint.c (gdb_agent_op_sizes): New table.
3030 (emit_eq_goto): New function.
3031 (emit_ne_goto): New function.
3032 (emit_lt_goto): New function.
3033 (emit_le_goto): New function.
3034 (emit_gt_goto): New function.
3035 (emit_ge_goto): New function.
3036 (is_goto_target): New function.
3037 (compile_bytecodes): Recognize special cases of compare-goto
3038 combinations and call specialized emitters for them.
3039 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3040 (amd64_emit_ne_goto): New function.
3041 (amd64_emit_lt_goto): New function.
3042 (amd64_emit_le_goto): New function.
3043 (amd64_emit_gt_goto): New function.
3044 (amd64_emit_ge_goto): New function.
3045 (amd64_emit_ops): Add the new functions.
3046 (i386_emit_eq_goto): New function.
3047 (i386_emit_ne_goto): New function.
3048 (i386_emit_lt_goto): New function.
3049 (i386_emit_le_goto): New function.
3050 (i386_emit_gt_goto): New function.
3051 (i386_emit_ge_goto): New function.
3052 (i386_emit_ops): Add the new functions.
3054 2011-09-08 Stan Shebs <stan@codesourcery.com>
3056 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3057 (i386_emit_epilogue): Restore %ebx.
3059 2011-08-31 Jie Zhang <jzhang918@gmail.com>
3061 * server.c (step_thread): Remove definition.
3062 (process_serial_event): Don't handle Hs.
3063 * server.h (step_thread): Remove declaration.
3064 * target.c (set_desired_inferior): Remove use of step_thread.
3066 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3068 * linux-low.c: Include linux-procfs.h.
3069 (linux_attach_lwp_1): Update comments.
3070 (linux_attach): Scan for existing threads when attaching to a
3071 process that is the tgid.
3072 * Makefile.in: Update dependencies.
3074 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
3076 * configure.srv: Add linux-procfs.o dependencies.
3078 2011-08-14 Yao Qi <yao@codesourcery.com>
3080 * target.h (struct target_ops): Fix indent.
3081 * win32-low.c (win32_target_ops): Fix comment.
3083 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
3084 Yao Qi <yao@codesourcery.com>
3086 * Makefile.in (clean): Remove tic6x-*.c files.
3087 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3088 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3089 (tic6x-c64xp-linux.c): Likewise.
3090 * configure.srv: Add support for tic6x-*-uclinux.
3091 * linux-tic6x-low.c: New.
3092 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3094 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
3095 Yao Qi <yao@codesourcery.com>
3097 * target.h (struct target_ops): Add read_loadmap.
3098 * linux-low.c (struct target_loadseg): New type.
3099 (struct target_loadmap): New type.
3100 (linux_read_loadmap): New function.
3101 (linux_target_ops): Add linux_read_loadmap.
3102 * server.c (handle_query): Support qXfer:fdpic:read packet.
3103 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3106 2011-08-05 Eli Zaretskii <eliz@gnu.org>
3108 * win32-low.c: Include <stdint.h>.
3110 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3112 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3113 to the inferior here.
3114 (i386_remove_aligned_watchpoint): Ditto.
3115 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3116 fit part of the watchpoint in the debug registers.
3117 (i386_update_inferior_debug_regs): New.
3118 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3119 registers, and only update the inferior on success.
3120 (i386_low_remove_watchpoint): Ditto.
3122 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3124 * linux-low.c (compare_ints, unique, list_threads, show_process,
3125 linux_core_of_thread): Delete.
3126 (linux_target_ops): Change linux_core_of_thread to
3127 linux_common_core_of_thread.
3128 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3129 * utils.c (malloc_failure): Change type of argument.
3130 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3131 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3132 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3133 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3134 (IPA_OBJS): Add common-utils-ipa.o.
3135 (ptid_h, linux_osdata_h): New macros.
3136 (server_h): Add common/common-utils.h, common/xml-utils.h,
3137 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3139 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3140 ptid.o, buffer.o): New rules.
3141 (linux-low.o): Add common/linux-osdata.h as a dependency.
3142 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3143 * configure.ac: Add AC_HEADER_DIRENT check.
3144 * config.in: Regenerate.
3145 * configure: Regenerate.
3146 * remote-utils.c (xml_escape_text): Delete.
3147 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3148 buffer_xml_printf): Move to common/buffer.c.
3149 * server.c (main): Remove call to initialize_inferiors.
3150 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3151 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3152 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3153 internal_error, gdb_assert, gdb_assert_fail): Delete.
3154 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3155 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3157 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3158 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3159 initialize_inferiors): Delete.
3161 2011-07-20 Pedro Alves <pedro@codesourcery.com>
3163 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3166 2011-05-31 Pedro Alves <pedro@codesourcery.com>
3168 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3170 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3172 2011-05-26 Yao Qi <yao@codesourcery.com>
3174 * Makefile.in (thread-db.o): Track dependence to
3175 common/gdb_thread_db.h.
3176 * thread-db.c: include gdb_thread_db.h from right place.
3178 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3180 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3181 __FILE__ and __LINE__ to internal_error.
3183 2011-05-13 Doug Evans <dje@google.com>
3185 * thread-db.c (try_thread_db_load_from_sdir): New function.
3186 (try_thread_db_load_from_dir): New function.
3187 (thread_db_load_search): Handle $sdir, ignore $pdir.
3188 Remove trying of system directories if search of
3189 libthread-db-search-path fails, that is now done via $sdir.
3191 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3193 * server.c (handle_query): Add EnableDisableTracepoints to the list
3194 of supported features.
3195 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
3197 (cmd_qtenable_disable): New.
3198 (cmd_qtstart): Install tracepoints even if disabled.
3199 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3200 receiving a QTEnable or QTDisable packet.
3201 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3202 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3204 (gdb_probe): Skip data collection if static tracepoint is disabled.
3206 2011-05-10 Doug Evans <dje@google.com>
3208 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3210 2011-05-04 Doug Evans <dje@google.com>
3212 * linux-low.c (linux_join): Skip process lookup.
3213 * spu-low.c (spu_join): Ditto.
3214 * server.c (join_inferiors_callback): Delete.
3215 (process_serial_event): For 'D' packet (detach) call join_inferior
3218 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3220 * README: Don't mention xscale*-*-linux*.
3221 * configure.srv (xscale*-*-linux*): Don't handle target.
3223 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3225 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3227 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3228 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3229 (i386_emit_void_call_2): Likewise.
3231 2011-04-26 Yao Qi <yao@codesourcery.com>
3233 * linux-low.c: Move common macros to linux-ptrace.h.
3234 Include linux-ptrace.h.
3235 * Makefile.in (linux_ptrace_h): New.
3236 (linux-low.o): Depends on linux-ptrace.h.
3238 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3240 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3241 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3242 (remote_prepare): New function with most of the TCP code from ...
3243 (remote_open): ... here. Detect PORT here unconditionally. Move also
3244 setting transport_is_reliable.
3245 * server.c (run_once): New variable.
3246 (gdbserver_usage): Document it.
3247 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3248 the first run if RUN_ONCE.
3249 * server.h (run_once, remote_prepare): New declarations.
3251 2011-04-19 Tom Tromey <tromey@redhat.com>
3253 * win32-low.c (handle_load_dll): Remove duplicate "the".
3255 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3257 Remove support for old Cygwin 1.5 versions.
3258 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3259 function to avoid warning.
3260 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3263 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3265 * gdbserver/server.h (Macro _): Define it if not available.
3267 2011-03-14 Michael Snyder <msnyder@vmware.com>
3269 * hostio.c (handle_close): Remove unnecessary null test.
3271 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3273 * Makefile.in (maintainer-clean realclean distclean): Remove
3274 "make ... subdir_do" command.
3276 2011-03-10 Michael Snyder <msnyder@vmware.com>
3278 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3280 * server.c (handle_v_run): Free alloced buffer on early return.
3282 2011-03-09 Yao Qi <yao@codesourcery.com>
3285 2011-03-04 Yao Qi <yao@codesourcery.com>
3287 * Makefile.in: Remove GNU make feature --directory.
3289 2011-03-05 Yao Qi <yao@codesourcery.com>
3291 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3292 (subdir_do): New make target. Copied from gdb/Makefile.
3293 (maintainer-clean, realclean, distclean, clean): Call corresponding
3294 make targets in common/Makefile.
3296 2011-02-11 Yao Qi <yao@codesourcery.com>
3298 * configure.ac: Call AC_PROG_RANLIB.
3299 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3300 * configure: Regenerate.
3302 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3304 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3306 2011-03-06 Yao Qi <yao@codesourcery.com>
3308 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3310 2011-03-05 Yao Qi <yao@codesourcery.com>
3312 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3313 (subdir_do): New make target. Copied from gdb/Makefile.
3314 (maintainer-clean, realclean, distclean, clean): Call corresponding
3315 make targets in common/Makefile.
3317 2011-03-04 Yao Qi <yao@codesourcery.com>
3319 * Makefile.in: Remove GNU make feature --directory.
3321 2011-03-04 Michael Snyder <msnyder@vmware.com>
3323 * server.c (queue_stop_reply): Call xmalloc not malloc.
3325 2011-03-02 Michael Snyder <msnyder@vmware.com>
3327 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3329 2011-02-28 Michael Snyder <msnyder@vmware.com>
3331 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3332 (cmd_qtframe): Ditto.
3333 (cmd_qtbuffer): Ditto.
3334 (cmd_bigqtbuffer): Ditto.
3336 * utils.c (decimal2str): Initialize 'width' to nine, then
3339 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3341 * hostio.c (require_data): Free *data, not data.
3343 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3345 * hostio.c (require_data): Use free, not xfree.
3347 2011-02-27 Michael Snyder <msnyder@vmware.com>
3349 * server.c (handle_query): Discard unused value.
3351 * hostio.c (require_data): Free malloc memory before returning
3354 2011-02-26 Michael Snyder <msnyder@vmware.com>
3356 * linux-low.c (list_threads): Call closedir for dirent.
3358 2011-02-27 Michael Snyder <msnyder@vmware.com>
3360 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3361 a case statement falls through.
3363 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3365 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3368 2011-02-26 Michael Snyder <msnyder@vmware.com>
3370 * utils.c (decimal2str): Eliminate dead code and dead param.
3371 (pulongest): Drop dead param from call to decimal2str.
3374 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3376 Revert the following patch (not approved yet):
3377 2011-02-21 Hui Zhu <teawater@gmail.com>
3378 * tracepoint.c (tp_printf): New function.
3379 (eval_agent_expr): Handle gdb_agent_op_printf.
3381 2011-02-21 Hui Zhu <teawater@gmail.com>
3383 * tracepoint.c (tp_printf): New function.
3384 (eval_agent_expr): Handle gdb_agent_op_printf.
3386 2011-02-18 Tom Tromey <tromey@redhat.com>
3388 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3389 (tracepoint.o): Likewise.
3390 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3391 (gdb_agent_op_names): Likewise.
3393 2011-02-18 Tom Tromey <tromey@redhat.com>
3395 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3396 gdb_agent_op_rot>: New constants.
3397 (gdb_agent_op_names): Add pick and roll.
3398 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3401 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3403 * aclocal.m4: Regenerated with aclocal-1.11.1.
3405 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3407 * server.c (handle_qxfer_traceframe_info): New.
3408 (qxfer_packets): Register "traceframe-info".
3409 (handle_query): Report support for qXfer:traceframe-info:read+.
3410 * tracepoint.c (match_blocktype): New.
3411 (traceframe_find_block_type): Rename to ...
3412 (traceframe_walk_blocks): ... this. Add callback filter argument,
3414 (traceframe_find_block_type): New, reimplemented on top of
3415 traceframe_walk_blocks.
3416 (build_traceframe_info_xml): New.
3417 (traceframe_read_info): New.
3418 * server.h (traceframe_read_info): Declare.
3420 2011-02-11 Yao Qi <yao@codesourcery.com>
3422 * configure.ac: Call AC_PROG_RANLIB.
3423 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3424 * configure: Regenerate.
3426 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3428 * server.c (gdb_read_memory): Change return semantics to allow
3430 (handle_search_memory_1): Adjust.
3431 (process_serial_event) <'m' packet>: Handle partial transfers.
3432 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3434 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3436 * regcache.c (init_register_cache): Initialize
3437 regcache->register_status.
3438 (free_register_cache): Release regcache->register_status.
3439 (regcache_cpy): Copy register_status.
3440 (registers_to_string): Print 'x's for unavailable registers.
3441 (supply_register): Mark the register's status valid or
3442 unavailable, depending on whether a buffer was passed in or not.
3443 (supply_register_zeroed): New.
3444 (supply_regblock): Mark the registers' status valid or
3445 unavailable, depending on whether a buffer was passed in or not.
3446 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3447 (struct regcache): New `register_status' field.
3448 (supply_register_zeroed): Declare.
3449 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3450 supply_register_zeroed, rather than passing a NULL buffer to
3452 * tracepoint.c (fetch_traceframe_registers): Update comment.
3454 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3456 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3459 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3461 * server.h (decode_xfer_write): Change prototype.
3462 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3463 and don't extract the annex here.
3464 * server.c (decode_xfer_read): Remove `annex' parameter,
3465 and don't extract the annex here.
3467 (struct qxfer): New.
3468 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3469 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3470 (handle_qxfer_statictrace): New functions, abstracted out from
3471 handle_query, and made to use the struct qxfer interface.
3472 (handle_threads_qxfer_proper): Rename to ...
3473 (handle_qxfer_threads_proper): ... this.
3474 (handle_threads_qxfer): Rename to ...
3475 (handle_qxfer_threads): ... this. Adjust.
3476 (qxfer_packets): New array.
3477 (handle_qxfer): New function.
3478 (handle_query): Use handle_qxfer.
3480 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3482 * gdbreplay.c: Shorten lines of >= 80 columns.
3483 * linux-low.c: Ditto.
3484 * linux-ppc-low.c: Ditto.
3485 * linux-s390-low.c: Ditto.
3486 * linux-sparc-low.c: Ditto.
3487 * linux-x86-low.c: Ditto.
3488 * linux-xtensa-low.c: Ditto.
3489 * mem-break.c: Ditto.
3491 * regcache.h: Ditto.
3492 * remote-utils.c: Ditto.
3495 * thread-db.c: Ditto.
3496 * tracepoint.c: Ditto.
3498 * win32-low.h: Ditto.
3500 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3502 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3505 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3507 * server.c (gdbserver_version): Update copyright year in version
3509 * gdbreplay.c (gdbreplay_version): Ditto.
3511 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3513 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3514 * linux-bfin-low.c: New file.
3515 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3516 PT_DATA_ADDR for BFIN targets.
3517 * Makefile.in (SFILES): Add linux-bfin-low.c.
3518 (clean): Remove reg-bfin.c.
3519 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3520 * README: Mention supported Blackfin targets.
3522 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3524 * .gitignore: New file.
3526 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3528 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3530 2010-10-22 Jie Zhang <jie@codesourcery.com>
3532 * Makefile.in: Add FLAGS_TO_PASS variable.
3533 (install): Remove dependency of install-only and recursively
3534 invoke make for install-only.
3536 2010-10-04 Doug Evans <dje@google.com>
3538 * Makefile.in (uninstall): Use $(DESTDIR).
3540 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3544 * linux-x86-low.c (compat_siginfo_from_siginfo)
3545 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3546 si_code is < 0. Check for si_code == SI_TIMER before checking for
3549 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3551 * lynx-i386-low.c: New file.
3552 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3554 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3556 * lynx-low.c (ptrace_request_to_str): Remove handling for
3557 request values that have been removed in LynxOS 5.x.
3559 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3561 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3564 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3566 * configure.ac: Add --enable-inprocess-agent option.
3567 * configure: Rebuilt.
3569 2010-09-06 Yao Qi <yao@codesourcery.com>
3571 * linux-low.c (linux_kill): Remove unused variable.
3572 (linux_stabilize_threads): Likewise.
3573 * server.c (start_inferior): Likewise.
3574 (queue_stop_reply_callback): Likewise.
3575 * tracepoint.c (do_action_at_tracepoint): Likewise.
3577 2010-09-06 Yao Qi <yao@codesourcery.com>
3579 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3582 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3584 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3586 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3588 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3591 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3593 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3594 gdbserver/lynx-ppc-low.c: New files.
3595 * Makefile.in (lynx_low_h): New variable.
3596 (lynx-low.o, lynx-ppc-low.o): New rules.
3597 * configure.ac: On LynxOS, link with -lnetinet.
3598 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3599 * configure: regenerate.
3601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3603 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3604 * configure.ac: Add check for vasprintf and vsnprintf.
3605 * configure, config.in: Regenerate.
3606 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3608 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3610 * gdbreplay.c: Move include of alloca.h up, next to include of
3612 * server.h: Add include of malloc.h.
3613 * mem-break.c: Remove include of malloc.h.
3614 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3616 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3618 * Makefile.in (memmem.o): Build with -Wno-error.
3620 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3622 * utils.c (xsnprintf): Make non-static.
3623 * server.h: Add xsnprintf declaration.
3624 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3625 replace calls to snprintf by calls to xsnprintf throughout.
3627 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3629 * configure.ac: Add configure check for alloca.
3630 * configure, config.in: Regenerate.
3631 * server.h: Include alloca.h if it exists.
3632 * gdbreplay.c: Include alloca.h if it exists.
3634 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3636 * linux-low.c (__SIGRTMIN): Define if not already defined.
3637 (linux_create_inferior): Check for __ANDROID__ rather than
3639 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3640 are already deferred.
3641 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3642 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3643 stopped and already has a pending signal to report.
3644 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3645 a pending signal to report or is moving out of a jump pad.
3646 (linux_init_signals): Check for __ANDROID__ rather than
3649 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3651 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3652 debug_threads check. Avoid a linear search when not doing debug
3655 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3657 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3658 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3659 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3660 (process_event): Change local fd's type to gdb_fildes_t.
3661 (create_file_handler): Adjust prototype.
3662 (delete_file_handler): Adjust prototype.
3663 (handle_file_event): Adjust prototype. Use pfildes.
3664 (create_file_event): Adjsut prototype.
3665 * remote-utils.c (remote_desc, listen_desc): Change type to
3667 * server.h: New gdb_fildes_t typedef.
3668 [USE_WIN32API]: Include winsock2.h.
3669 (delete_file_handler, add_file_handler): Adjust prototypes.
3671 * utils.c (pfildes): New.
3673 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3675 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3676 * configure: Regenerate.
3678 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3680 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3681 (linux_done_accessing_memory): ... this.
3682 (linux_target_ops): Adjust.
3683 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3684 * nto-low.c (nto_target_ops): Adjust comment.
3685 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3686 * spu-low.c (spu_target_ops): Adjust comment.
3687 * target.h (target_ops): Rename unprepare_to_access_memory field
3688 to done_accessing_memory.
3689 (unprepare_to_access_memory): Rename to ...
3690 (done_accessing_memory): ... this.
3692 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3694 * linux-low.c (linux_prepare_to_access_memory): New.
3695 (linux_unprepare_to_access_memory): New.
3696 (linux_target_ops): Install them.
3697 * server.c (read_memory): Rename to ...
3698 (gdb_read_memory): ... this. Use
3699 prepare_to_access_memory/prepare_to_access_memory.
3700 (write_memory): Rename to ...
3701 (gdb_write_memory): ... this. Use
3702 prepare_to_access_memory/prepare_to_access_memory.
3703 (handle_search_memory_1): Adjust.
3704 (process_serial_event): Adjust.
3705 * target.h (struct target_ops): New fields
3706 prepare_to_access_memory and unprepare_to_access_memory.
3707 (prepare_to_access_memory, unprepare_to_access_memory): New.
3708 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3709 prepare_to_access_memory/prepare_to_access_memory.
3710 * nto-low.c (nto_target_ops): Adjust.
3711 * spu-low.c (spu_target_ops): Adjust.
3712 * win32-low.c (win32_target_ops): Adjust.
3714 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3716 * Makefile.in (WARN_CFLAGS): Get it from configure.
3717 (WERROR_CFLAGS): New.
3718 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3719 * configure.ac: Introduce --enable-werror, which adds -Werror to
3720 the compiler command line. Enabled by default. Disable with
3721 --disable-werror. Add -Wdeclaration-after-statement
3722 Wpointer-arith and -Wformat-nonliteral to warning flags.
3723 * configure: Regenerate.
3725 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3727 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3729 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3731 * gdbreplay.c (remote_error): New.
3733 (expect): Use gdbchar. Check for error reading from GDB.
3734 Clarify sync error output.
3735 (play): Check for errors writing to GDB.
3736 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3737 * remote-utils.c (getpkt): Check for errors writing to the remote
3740 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3742 * linux-low.c (linux_wait_1): Move non-debugging code out of
3743 `debug_threads' control.
3745 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3747 * linux-low.c (linux_wait_1): Don't set last_status here.
3748 * server.c (push_event, queue_stop_reply_callback): Assert we're
3749 not pushing a TARGET_WAITKIND_IGNORE event.
3750 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3751 (myresume, handle_target_event): Set the thread's last_resume_kind
3752 and last_status from the target returned status.
3754 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3758 * linux-x86-low.c (update_debug_registers_callback): New.
3759 (i386_dr_low_set_addr): Use it.
3760 (i386_dr_low_get_addr): New.
3761 (i386_dr_low_set_control): Use update_debug_registers_callback.
3762 (i386_dr_low_get_control): New.
3763 (i386_dr_low_get_status): Adjust.
3764 * linux-low.c (linux_stop_lwp): New.
3765 * linux-low.h (linux_stop_lwp): Declare.
3767 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3768 argument instead of a i386_debug_reg_state.
3769 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3770 a i386_debug_reg_state.
3771 (i386_insert_aligned_watchpoint): Adjust.
3772 (i386_remove_aligned_watchpoint): Adjust.
3773 (i386_low_stopped_data_address): Read the debug registers from the
3774 inferior instead of from the mirrors.
3775 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3776 (i386_dr_low_get_addr): Declare.
3777 (i386_dr_low_get_control): Declare.
3778 (i386_dr_low_get_status): Change prototype.
3780 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3781 (i386_dr_low_get_addr): New.
3782 (i386_dr_low_get_control): New.
3783 (i386_dr_low_get_status): Adjust prototype. Return
3785 (i386_initial_stuff): Clear dr_status_mirror and
3787 (i386_get_thread_context): Adjust.
3788 (i386_set_thread_context): Adjust.
3789 (i386_thread_added): Adjust.
3791 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3793 * linux-low.h (linux_thread_area): Delete declaration.
3795 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3797 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3798 after its termination.
3800 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3802 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3803 (gdb_wants_all_stopped): Delete.
3804 (linux_wait_1): Don't call them.
3805 * server.c (handle_v_cont): Tag all threads as want-stopped.
3806 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3807 stopped as "client-wants-stopped".
3809 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3811 * Makefile.in (signals_h): New.
3812 (server_h): Depend on it.
3813 (server.o): Don't depend on $(signals_def).
3814 (signals.o): Depend on $(signals_def).
3816 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3818 * Makefile.in (signals_def): New.
3819 (server_h): Append include/gdb/signals.h and signals_def.
3820 (server.o): Append signals_def.
3822 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3824 * server.c (handle_target_event): Use target_signal_to_host for
3825 resume_info.sig initialization.
3826 * target.h (struct thread_resume) <sig>: New comment.
3828 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3830 * server.c (handle_query): strcpy() the returned string from paddress()
3831 instead of sprintf().
3832 * utils.c (paddress): Return phex_nz().
3834 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3836 * server.c (handle_v_cont): Call mourn_inferior if process
3838 (myresume): Likewise.
3840 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3842 Static tracepoints, and integration with UST.
3844 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3845 * mem-break.c (uninsert_all_breakpoints)
3846 (reinsert_all_breakpoints): New.
3847 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3848 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3849 (gdb_agent_ust_loaded, helper_thread_id)
3850 (gdb_agent_helper_thread_id): New macros.
3851 (struct ipa_sym_addresses): Add addr_ust_loaded,
3852 addr_helper_thread_id, addr_cmd_buf.
3853 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3854 (in_process_agent_loaded_ust): New.
3855 (write_e_ust_not_loaded): New.
3856 (maybe_write_ipa_ust_not_loaded): New.
3857 (struct collect_static_trace_data_action): New.
3858 (enum tracepoint_type) <static_tracepoint>: New.
3859 (struct tracepoint) <handle>: Mention static tracepoints.
3860 (struct static_tracepoint_ctx): New.
3861 (CMD_BUF_SIZE): New.
3862 (add_tracepoint_action): Handle static tracepoint actions.
3863 (unprobe_marker_at): New.
3864 (clear_installed_tracepoints): Handle static tracepoints.
3865 (cmd_qtdp): Handle static tracepoints.
3866 (probe_marker_at): New.
3867 (cmd_qtstart): Handle static tracepoints.
3868 (response_tracepoint): Handle static tracepoints.
3869 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3870 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3871 (get_context_regcache): Handle static tracepoints.
3872 (do_action_at_tracepoint): Handle static tracepoint actions.
3873 (traceframe_find_block_type): Handle static trace data blocks.
3874 (traceframe_read_sdata): New.
3875 (download_tracepoints): Download static tracepoint actions.
3876 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3877 (GDB_PROBE_NAME): New.
3882 (ust_marker_to_static_tracepoint): New.
3884 (collect_ust_data_at_tracepoint): New.
3885 (gdb_ust_probe): New.
3886 (UNIX_PATH_MAX, SOCK_DIR): New.
3887 (gdb_ust_connect_sync_socket): New.
3888 (resume_thread, stop_thread): New.
3889 (run_inferior_command): New.
3890 (init_named_socket): New.
3891 (gdb_ust_socket_init): New.
3892 (cstr_to_hexstr): New.
3894 (first_marker, next_marker): New.
3895 (response_ust_marker): New.
3896 (cmd_qtfstm, cmd_qtsstm): New.
3897 (unprobe_marker_at, probe_marker_at): New.
3898 (cmd_qtstmat, gdb_ust_thread): New.
3899 (gdb_ust_init): New.
3900 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3901 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3903 (x86_64_st_collect_regmap): New.
3904 (X86_64_NUM_ST_COLLECT_GREGS): New.
3905 (AMD64_RIP_REGNUM): New.
3906 (supply_static_tracepoint_registers): New.
3907 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3909 (i386_st_collect_regmap): New.
3910 (i386_NUM_ST_COLLECT_GREGS): New.
3911 (supply_static_tracepoint_registers): New.
3912 * server.c (handle_query): Handle qXfer:statictrace:read.
3913 <qSupported>: Report support for StaticTracepoints, and
3914 qXfer:statictrace:read features.
3915 * server.h (traceframe_read_sdata)
3916 (supply_static_tracepoint_registers): Declare.
3917 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3918 (unpack_varlen_hex): Include in IPA build.
3919 * Makefile.in (ustlibs, ustinc): New.
3920 (IPA_OBJS): Add remote-utils-ipa.o.
3921 ($(IPA_LIB)): Link -ldl and -lpthread.
3923 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3924 * config.in, configure: Regenerate.
3926 2010-06-20 Ian Lance Taylor <iant@google.com>
3927 Pedro Alves <pedro@codesourcery.com>
3929 * linux-x86-low.c (always_true): Delete.
3930 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3931 trying to fool the compiler with always_true.
3933 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3935 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3936 conditions in gdbserver.
3938 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3940 * spu-low.c (spu_read_memory): Wrap around local store limit.
3941 (spu_write_memory): Likewise.
3943 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3945 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3946 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3948 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3950 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3951 uses with LONGEST uses.
3953 2010-06-14 Stan Shebs <stan@codesourcery.com>
3954 Pedro Alves <pedro@codesourcery.com>
3958 * linux-x86-low.c: Include limits.h.
3963 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3964 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3965 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3966 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3967 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3968 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3969 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3970 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3971 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3972 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3973 (amd64_emit_void_call_2): New.
3974 (amd64_emit_ops): New.
3975 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3976 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3977 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3978 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3979 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3980 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3981 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3982 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3983 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3984 (i386_emit_stack_adjust, i386_emit_int_call_1)
3985 (i386_emit_void_call_2): New.
3986 (i386_emit_ops): New.
3987 (x86_emit_ops): New.
3988 (the_low_target): Install x86_emit_ops.
3989 * server.h (struct emit_ops): New.
3990 (get_raw_reg_func_addr): Declare.
3991 (current_insn_ptr, emit_error): Declare.
3992 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3993 (set_trace_state_variable_value): New defines.
3994 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3995 addr_get_trace_state_variable_value and
3996 addr_set_trace_state_variable_value.
3997 (symbol_list): New fields for get_raw_reg,
3998 get_trace_state_variable_value and set_trace_state_variable_value.
3999 (condfn): New typedef.
4000 (struct tracepoint): New field `compiled_cond'.
4001 (do_action_at_tracepoint): Clear compiled_cond.
4002 (get_trace_state_variable_value, set_trace_state_variable_value):
4004 (condition_true_at_tracepoint): If there's a compiled condition,
4006 (current_insn_ptr, emit_error): New globals.
4007 (struct bytecode_address): New.
4008 (get_raw_reg_func_addr): New.
4009 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4010 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4011 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4012 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4013 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4014 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4015 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4016 (compile_tracepoint_condition, compile_bytecodes): New.
4017 * target.h (emit_ops): Forward declare.
4018 (struct target_ops): New field emit_ops.
4019 (target_emit_ops): New.
4020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4021 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4022 * linux-low.c (linux_emit_ops): New.
4023 (linux_target_ops): Install it.
4024 * linux-low.h (struct linux_target_ops): New field emit_ops.
4026 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4028 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4029 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4031 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4032 Stan Shebs <stan@codesourcery.com>
4034 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4035 (all): Depend on $(extra_libraries).
4036 (install-only): Install the IPA.
4037 (IPA_OBJS, IPA_LIB): New.
4038 (clean): Remove the IPA lib.
4039 (IPAGENT_CFLAGS): New.
4040 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4041 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4042 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4043 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4044 * configure.ac: Check for atomic builtins support in the compiler.
4045 (IPA_DEPFILES, extra_libraries): Define.
4046 * configure.srv (ipa_obj): Add description.
4047 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4048 (i[34567]86-*-linux*): Set ipa_obj.
4049 (x86_64-*-linux*): Set ipa_obj.
4050 * linux-low.c (stabilizing_threads): New.
4051 (supports_fast_tracepoints): New.
4052 (linux_detach): Stabilize threads before detaching.
4053 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4054 the lwp is either not stabilizing, or is moving out of a jump pad.
4055 (linux_fast_tracepoint_collecting): New.
4056 (maybe_move_out_of_jump_pad): New.
4057 (enqueue_one_deferred_signal): New.
4058 (dequeue_one_deferred_signal): New.
4059 (linux_wait_for_event_1): If moving out of a jump pad, defer
4060 pending signals to later.
4061 (linux_stabilize_threads): New.
4062 (linux_wait_1): Check if threads need moving out of jump pads, and
4064 (stuck_in_jump_pad_callback): New.
4065 (move_out_of_jump_pad_callback): New.
4067 (linux_resume_one_lwp): Handle moving out of jump pads.
4068 (linux_set_resume_request): Dequeue deferred signals.
4069 (need_step_over_p): Also step over fast tracepoint jumps.
4070 (start_step_over): Also uninsert fast tracepoint jumps.
4071 (finish_step_over): Also reinsert fast tracepoint jumps.
4072 (linux_install_fast_tracepoint_jump): New.
4073 (linux_target_ops): Install linux_stabilize_threads and
4074 linux_install_fast_tracepoint_jump_pad.
4075 * linux-low.h (linux_target_ops) <get_thread_area,
4076 install_fast_tracepoint_jump_pad>: New fields.
4077 (struct lwp_info) <collecting_fast_tracepoint,
4078 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4079 (linux_get_thread_area): Declare.
4080 * linux-x86-low.c (jump_insn): New.
4081 (x86_get_thread_area): New.
4082 (append_insns): New.
4084 (amd64_install_fast_tracepoint_jump_pad): New.
4085 (i386_install_fast_tracepoint_jump_pad): New.
4086 (x86_install_fast_tracepoint_jump_pad): New.
4087 (the_low_target): Install x86_get_thread_area and
4088 x86_install_fast_tracepoint_jump_pad.
4089 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4090 (struct fast_tracepoint_jump): New.
4091 (fast_tracepoint_jump_insn): New.
4092 (fast_tracepoint_jump_shadow): New.
4093 (find_fast_tracepoint_jump_at): New.
4094 (fast_tracepoint_jump_here): New.
4095 (delete_fast_tracepoint_jump): New.
4096 (set_fast_tracepoint_jump): New.
4097 (uninsert_fast_tracepoint_jumps_at): New.
4098 (reinsert_fast_tracepoint_jumps_at): New.
4099 (set_breakpoint_at): Use write_inferior_memory.
4100 (uninsert_raw_breakpoint): Use write_inferior_memory.
4101 (check_mem_read): Mask out fast tracepoint jumps.
4102 (check_mem_write): Mask out fast tracepoint jumps.
4103 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4104 (set_fast_tracepoint_jump): Declare.
4105 (delete_fast_tracepoint_jump)
4106 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4107 (reinsert_fast_tracepoint_jumps_at): Declare.
4108 * regcache.c: Don't compile many functions when building the
4109 in-process agent library.
4110 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4111 the register buffer in the heap.
4112 (free_register_cache): If the register buffer isn't owned by the
4113 regcache, don't free it.
4114 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4115 pre-existing register caches.
4116 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4118 (convert_ascii_to_int): : Constify `from' parameter type.
4119 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4120 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4121 the needed buffer in-place.
4122 (relocate_instruction): New.
4123 * server.c (handle_query) <qSymbols>: If the target supports
4124 tracepoints, give it a chance of looking up symbols. Report
4125 support for fast tracepoints.
4126 (handle_status): Stabilize threads.
4127 (process_serial_event): Adjust.
4128 * server.h (struct fast_tracepoint_jump): Forward declare.
4129 (struct process_info) <fast_tracepoint_jumps>: New field.
4130 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4131 (decode_X_packet, decode_M_packet): Adjust.
4132 (relocate_instruction): Declare.
4133 (in_process_agent_loaded): Declare.
4134 (tracepoint_look_up_symbols): Declare.
4135 (struct fast_tpoint_collect_status): Declare.
4136 (fast_tracepoint_collecting): Declare.
4137 (force_unlock_trace_buffer): Declare.
4138 (handle_tracepoint_bkpts): Declare.
4139 (initialize_low_tracepoint)
4140 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4141 * target.h (struct target_ops) <stabilize_threads,
4142 install_fast_tracepoint_jump_pad>: New fields.
4143 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4144 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4145 [HAVE_STDINT_H]: Include stdint.h.
4146 (trace_debug_1): Rename to ...
4147 (trace_vdebug): ... this.
4148 (trace_debug): Rename to ...
4149 (trace_debug_1): ... this. Add `level' parameter.
4151 (ATTR_USED, ATTR_NOINLINE): New.
4152 (IP_AGENT_EXPORT): New.
4153 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4154 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4155 (about_to_request_buffer_space, trace_buffer_is_full)
4156 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4157 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4158 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4159 (traceframe_write_count, traceframes_created)
4160 (trace_state_variables)
4161 New renaming defines.
4162 (struct ipa_sym_addresses): New.
4163 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4165 (ipa_sym_addrs): New.
4166 (all_tracepoint_symbols_looked_up): New.
4167 (in_process_agent_loaded): New.
4168 (write_e_ipa_not_loaded): New.
4169 (maybe_write_ipa_not_loaded): New.
4170 (tracepoint_look_up_symbols): New.
4171 (debug_threads) [IN_PROCESS_AGENT]: New.
4172 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4173 (UNKNOWN_SIDE_EFFECTS): New.
4174 (stop_tracing): New.
4175 (flush_trace_buffer): New.
4176 (stop_tracing_bkpt): New.
4177 (flush_trace_buffer_bkpt): New.
4178 (read_inferior_integer): New.
4179 (read_inferior_uinteger): New.
4180 (read_inferior_data_pointer): New.
4181 (write_inferior_data_pointer): New.
4182 (write_inferior_integer): New.
4183 (write_inferior_uinteger): New.
4184 (struct collect_static_trace_data_action): Delete.
4185 (enum tracepoint_type): New.
4186 (struct tracepoint) <type>: New field `type'.
4187 <actions_str, step_actions, step_actions_str>: Only include in
4189 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4190 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4191 (tracepoints): Use IP_AGENT_EXPORT.
4192 (last_tracepoint): Don't include in the IPA.
4193 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4194 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4195 (alloced_trace_state_variables): New.
4196 (trace_state_variables): Use IP_AGENT_EXPORT.
4197 (traceframe_t): Delete unused variable.
4198 (circular_trace_buffer): Don't include in the IPA.
4199 (trace_buffer_start): Delete.
4200 (struct trace_buffer_control): New.
4201 (trace_buffer_free): Delete.
4202 (struct ipa_trace_buffer_control): New.
4203 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4204 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4206 (trace_buffer_ctrl): New.
4207 (TRACE_BUFFER_CTRL_CURR): New.
4208 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4209 Reimplement as macros.
4210 (trace_buffer_wrap): Delete.
4211 (traceframe_write_count, traceframe_read_count)
4212 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4213 (struct tracepoint_hit_ctx) <type>: New field.
4214 (struct fast_tracepoint_ctx): New.
4215 (memory_barrier): New.
4217 (record_tracepoint_error): Update atomically in the IPA.
4218 (clear_inferior_trace_buffer): New.
4219 (about_to_request_buffer_space): New.
4220 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4221 updating the same buffer.
4222 (add_tracepoint): Default the tracepoint's type to trap
4223 tracepoint, and orig_size to -1.
4224 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4226 (create_trace_state_variable): New parameter `gdb'. Handle it.
4227 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4228 (cmd_qtdp): Handle fast tracepoints.
4230 (max_jump_pad_size): New.
4231 (gdb_jump_pad_head): New.
4232 (get_jump_space_head): New.
4233 (claim_jump_space): New.
4234 (sort_tracepoints): New.
4235 (MAX_JUMP_SIZE): New.
4236 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4238 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4239 support. Upload fast traceframes, and delete internal IPA
4241 (stop_tracing_handler): New.
4242 (flush_trace_buffer_handler): New.
4243 (cmd_qtstop): Upload fast tracepoints.
4244 (response_tracepoint): Handle fast tracepoints.
4245 (tracepoint_finished_step): Upload fast traceframes. Set the
4246 tracepoint hit context's tracepoint type.
4247 (handle_tracepoint_bkpts): New.
4248 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4249 type. Add comment about fast tracepoints.
4250 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4251 non-existing action_str field.
4252 (get_context_regcache): Handle fast tracepoints.
4253 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4255 (fast_tracepoint_from_jump_pad_address): New.
4256 (fast_tracepoint_from_ipa_tpoint_address): New.
4257 (collecting_t): New.
4258 (force_unlock_trace_buffer): New.
4259 (fast_tracepoint_collecting): New.
4262 (write_inferior_data_ptr): New.
4263 (target_tp_heap): New.
4264 (target_malloc): New.
4265 (download_agent_expr): New.
4267 (download_tracepoints): New.
4268 (download_trace_state_variables): New.
4269 (upload_fast_traceframes): New.
4270 (IPA_FIRST_TRACEFRAME): New.
4271 (IPA_NEXT_TRACEFRAME_1): New.
4272 (IPA_NEXT_TRACEFRAME): New.
4273 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4274 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4275 (gdb_jump_pad_buffer_end): New.
4276 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4277 (initialize_tracepoint): Adjust.
4278 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4279 buffer. Initialize the low module.
4280 * utils.c (PREFIX, TOOLNAME): New.
4281 (malloc_failure): Use PREFIX.
4282 (error): In the IPA, an error causes an exit.
4283 (fatal, warning): Use PREFIX.
4284 (internal_error): Use TOOLNAME.
4285 (NUMCELLS): Increase to 10.
4286 * configure, config.in: Regenerate.
4288 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4290 * server.c (handle_query) <qSupported>: Do two passes over the
4291 qSupported string to avoid nesting strtok.
4293 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4295 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4297 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4299 * configure: Regenerate.
4300 * proc-service.list: New.
4302 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4304 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4307 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4309 * gdbreplay.c (remote_open): Check error return from socket() call by
4310 its equality to -1 not by it being negative.
4311 * remote-utils.c (remote_open): Likewise.
4313 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4315 * config.h: Regenerate.
4317 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4319 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4320 doesn't provide PTRACE_GET_THREAD_AREA.
4322 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4324 * linux-m68k-low.c: Include <asm/ptrace.h>
4325 (ps_get_thread_area): Implement.
4327 2010-05-03 Doug Evans <dje@google.com>
4329 * event-loop.c (struct callback_event): New struct.
4330 (callback_list): New global.
4331 (append_callback_event, delete_callback_event): New functions.
4332 (process_callback): New function.
4333 (start_event_loop): Call it.
4334 * remote-utils.c (NOT_SCHEDULED): Define.
4335 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4336 moved out of readchar.
4337 (readchar): Rewrite. Call reschedule before returning.
4338 (reset_readchar): New function.
4339 (remote_close): Call it.
4340 (process_remaining, reschedule): New functions.
4341 * server.h (callback_handler_func): New typedef.
4342 (append_callback_event, delete_callback_event): Declare.
4344 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4346 * proc-service.c (ps_pglobal_lookup): Use
4347 thread_db_look_up_one_symbol.
4348 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4349 parameter. Use it instead of all_symbols_looked_up.
4350 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4352 (all_symbols_looked_up): Don't declare.
4353 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4354 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4356 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4357 Set all_symbols_looked_up here.
4358 (thread_db_look_up_one_symbol): New.
4359 (thread_db_get_tls_address): Adjust.
4360 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4361 thread_db object on the heap, and tentatively set it in the
4363 (thread_db_init): Don't set all_symbols_looked_up here.
4364 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4366 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4368 * linux-low.c (linux_kill, linux_detach): Adjust.
4369 (status_pending_p_callback): Remove redundant statement. Check
4370 for !TARGET_WAITIKIND_IGNORE, instead of
4371 TARGET_WAITKIND_STOPPED.
4372 (handle_tracepoints): Make sure LWP is locked. Adjust.
4373 (linux_wait_for_event_1): Adjust.
4374 (linux_cancel_breakpoints): New.
4375 (unsuspend_one_lwp): New.
4376 (unsuspend_all_lwps): New.
4377 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4378 (send_sigstop_callback): Change return type to int, add new
4379 `except' parameter and handle it.
4380 (suspend_and_send_sigstop_callback): New.
4381 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4382 pass them down. If SUSPEND, also increment the lwp's suspend
4384 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4385 (need_step_over_p): Don't consider suspended LWPs.
4386 (start_step_over): Adjust.
4387 (proceed_one_lwp): Change return type to int, add new `except'
4388 parameter and handle it.
4389 (unsuspend_and_proceed_one_lwp): New.
4390 (proceed_all_lwps): Use find_inferior instead of
4392 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4393 also decrement the suspend count of LWPs. Pass `except' down,
4394 instead of hacking its suspend count.
4395 (linux_pause_all): Add `freeze' parameter. Adjust.
4396 (linux_unpause_all): New.
4397 (linux_target_ops): Install linux_unpause_all.
4398 * server.c (handle_status): Adjust.
4399 * target.h (struct target_ops): New fields `unpause_all' and
4400 `cancel_breakpoints'. Add new parameter to `pause_all'.
4401 (pause_all): Add new `freeze' parameter.
4403 (cancel_breakpoints): New.
4404 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4406 (cmd_qtstart): Pause threads.
4407 (stop_tracing): Pause threads, and cancel breakpoints.
4408 * win32-low.c (win32_target_ops): Adjust.
4410 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4412 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4413 the inferior right away from here...
4414 (linux_wait_1): ... to here, and adjust to check the thread's
4415 last_resume_kind instead of the lwp's step or stop_expected flags.
4417 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4419 * README: Use consistent `GDB' and `GDBserver' spellings.
4421 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4423 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4424 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4425 (linux_detach_one_lwp): Assume the lwp is stopped.
4426 (any_thread_of): Delete.
4427 (linux_detach): Stop all lwps here. Don't blindly delete all
4429 (delete_lwp_callback): New.
4430 (linux_mourn): Delete all lwps of the process that is gone.
4431 (linux_wait_1): Don't delete the last lwp of the process here.
4432 * mem-break.h (mark_breakpoints_out): Declare.
4433 * mem-break.c (mark_breakpoints_out): New.
4434 (free_all_breakpoints): Use it.
4435 * server.c (handle_target_event): If the process is gone, mark
4437 * thread-db.c (struct thread_db) <create_bp>: New field.
4438 (thread_db_enable_reporting): Fix prototype. Store a thread event
4439 breakpoint reference in the thread_db struct.
4440 (thread_db_load_search): Clear the thread_db object.
4441 (try_thread_db_load_1): Ditto.
4442 (switch_to_process): New.
4443 (disable_thread_event_reporting): Use it.
4444 (remove_thread_event_breakpoints): New.
4445 (thread_db_detach, thread_db_mourn): Use it.
4447 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4449 * linux-low.c (linux_enable_event_reporting): New.
4450 (linux_wait_for_event_1, handle_extended_wait): Use it.
4452 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4454 * linux-low.c (linux_kill_one_lwp, linux_kill)
4455 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4456 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4457 SIGSTOP even if the LWP is stopped.
4458 (send_sigstop_callback): New.
4459 (stop_all_lwps): Use send_sigstop_callback instead.
4460 (linux_resume_one_thread): Adjust.
4461 (proceed_one_lwp): Still proceed an LWP that the client has
4462 requested to stop, if we haven't reported it as stopped yet. Make
4463 sure that LWPs the client want stopped, have a pending SIGSTOP.
4465 2010-04-26 Doug Evans <dje@google.com>
4467 * server.c (handle_general_set): Make static.
4469 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4470 Print received char after testing for error/eof instead of before.
4471 (input_interrupt): Tweak comment.
4473 2010-04-23 Doug Evans <dje@google.com>
4475 * server.c (start_inferior): Print inferior argv if --debug.
4477 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4479 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4480 * nto-x86-low.c: Include server.h
4482 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4484 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4485 be consistent with other sources of this directory.
4486 (init_registers_amd64): Correct name of source file of this function
4489 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4491 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4494 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4496 * win32-i386-low.c: Add 64-bit support.
4497 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4498 (init_registers_amd64): Declare.
4499 (mappings): Add 64-bit version of array.
4500 (init_windows_x86): New function.
4501 (the_low_target): Change init_arch field to init_windows_x86.
4503 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4505 * win32-low.c: Adapt to support also 64-bit architecture.
4506 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4507 (get_image_name): Use SIZE_T type for local variable `done'.
4508 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4509 (toolhelp_get_dll_name): Idem.
4510 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4511 Use uintptr_t typecast to avoid warning.
4512 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4513 (handle_exception): Use phex_nz to avoid warning.
4514 (win32_wait): Remove unused local variable `process'.
4516 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4518 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4521 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4523 * configure.ac: Use `ws2_32' library for srv_mingw.
4524 * configure: Regenerate.
4525 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4526 * remote-utils.c: Likewise.
4528 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4530 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4531 if __x86_64__ is defined.
4533 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4535 * configure: Regenerate.
4537 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4539 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4540 * target.h (target_ops): New get_tib_address field.
4541 * win32-low.h (win32_thread_info): Add thread_local_base field.
4542 * win32-low.c (child_add_thread): Add tlb argument.
4543 Set thread_local_base field to TLB.
4544 (get_child_debug_event): Adapt to child_add_thread change.
4545 (win32_get_tib_address): New function.
4546 (win32_target_ops): Set get_tib_address field to
4547 win32_get_tib_address.
4548 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4550 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4552 * linux-low.c (linux_mourn): Also remove the process.
4553 * server.c (handle_target_event): Don't remove the process here.
4554 * nto-low.c (nto_mourn): New.
4555 (nto_target_ops): Install it.
4556 * spu-low.c (spu_mourn): New.
4557 (spu_target_ops): Install it.
4558 * win32-low.c (win32_mourn): New.
4559 (win32_target_ops): Install it.
4561 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4563 * server.h (buffer_xml_printf): Remove redundant `;'.
4565 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4567 * regcache.c (set_register_cache): Invalidate regcaches before
4568 changing the register cache layout.
4569 (regcache_invalidate_one): Allow a NULL regcache.
4570 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4571 regcaches before changing the register cache layout or the target
4574 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4576 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4577 variable warning on Linux/x86-64.
4579 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4581 GDBserver disconnected tracing support.
4583 * linux-low.c (linux_remove_process): Delete.
4584 (add_lwp): Don't set last_resume_kind here.
4585 (linux_kill): Use `mourn'.
4586 (linux_detach): Use `thread_db_detach', and `mourn'.
4588 (linux_attach_lwp_1): Adjust comment.
4589 (linux_attach): last_resume_kind moved the thread_info; adjust.
4590 (status_pending_p_callback): Adjust.
4591 (linux_wait_for_event_1): Adjust.
4592 (count_events_callback, select_singlestep_lwp_callback)
4593 (select_event_lwp_callback, cancel_breakpoints_callback)
4594 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4595 (proceed_one_lwp): Adjust.
4596 (linux_async): Add debug output.
4597 (linux_thread_stopped): New.
4598 (linux_pause_all): New.
4599 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4601 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4602 (thread_db_free): Delete declaration.
4603 (thread_db_detach, thread_db_mourn): Declare.
4604 * thread-db.c (thread_db_init): Use thread_db_mourn.
4605 (thread_db_free): Delete, split in two.
4606 (disable_thread_event_reporting): New.
4607 (thread_db_detach): New.
4608 (thread_db_mourn): New.
4610 * server.h (struct thread_info) <last_resume_kind>: New field.
4611 <attached>: Add comment.
4612 <gdb_detached>: New field.
4613 (handler_func): Change return type to int.
4614 (handle_serial_event, handle_target_event): Ditto.
4615 (gdb_connected): Declare.
4617 (disconnected_tracing): Declare.
4618 (stop_tracing): Declare.
4620 * server.c (handle_query) <qSupported>: Report support for
4621 disconnected tracing.
4622 (queue_stop_reply_callback): Account for running threads.
4623 (gdb_wants_thread_stopped): New.
4624 (gdb_wants_all_threads_stopped): New.
4625 (gdb_reattached_process): New.
4626 (handle_status): Clear the `gdb_detached' flag of all processes.
4627 In all-stop, stop all threads.
4628 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4629 (process_serial_event): If the remote connection breaks, or if an
4630 exit was forced with "monitor exit", force an event loop exit.
4631 Handle disconnected tracing on detach.
4632 (handle_serial_event): Adjust.
4633 (handle_target_event): If GDB isn't connected, forward events back
4634 to the inferior, unless the last process exited, in which case,
4635 exit gdbserver. Adjust interface.
4637 * remote-utils.c (remote_open): Don't block in accept. Instead
4638 register an event loop source on the listen socket file
4639 descriptor. Refactor bits into ...
4640 (listen_desc): ... this new global.
4641 (gdb_connected): ... this new function.
4642 (enable_async_notification): ... this new function.
4643 (handle_accept_event): ... this new function.
4644 (remote_close): Clear remote_desc.
4646 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4648 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4650 (mourn_inferior): Define.
4651 (target_process_qsupported): Avoid the dangling else problem.
4652 (thread_stopped): Define.
4653 (pause_all): Define.
4654 (target_waitstatus_to_string): Declare.
4655 * target.c (target_waitstatus_to_string): New.
4657 * tracepoint.c (tracing): Make extern.
4658 (disconnected_tracing): New.
4659 (stop_tracing): Make extern. Handle tracing stops due to GDB
4661 (cmd_qtdisconnected): New.
4662 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4663 (handle_tracepoint_general_set): Handle QTDisconnected.
4665 * event-loop.c (event_handler_func): Change return type to int.
4666 (process_event): Bail out if the event handler wants the event
4668 (handle_file_event): Ditto.
4669 (start_event_loop): Bail out if the event handler wants the event
4672 * nto-low.c (nto_target_ops): Adjust.
4673 * spu-low.c (spu_wait): Don't remove the process here.
4674 (spu_target_ops): Adjust.
4675 * win32-low.c (win32_wait): Don't remove the process here.
4676 (win32_target_ops): Adjust.
4678 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4680 * regcache.c (realloc_register_cache): Invalidate inferior's
4681 regcache before recreating it.
4683 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4685 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4687 2010-04-09 Stan Shebs <stan@codesourcery.com>
4688 Pedro Alves <pedro@codesourcery.com>
4690 * server.h (LONGEST): New.
4691 (struct thread_info) <while_stepping>: New field.
4692 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4694 (initialize_tracepoint, handle_tracepoint_general_set)
4695 (handle_tracepoint_query, tracepoint_finished_step)
4696 (tracepoint_was_hit, release_while_stepping_state_list):
4697 (current_traceframe): Declare.
4698 * server.c (handle_general_set): Handle tracepoint packets.
4700 (write_memory): New.
4701 (handle_search_memory_1): Use read_memory.
4702 (handle_query): Report support for conditional tracepoints, trace
4703 state variables, and tracepoint sources. Handle tracepoint
4705 (main): Initialize the tracepoints module.
4706 (process_serial_event): Handle traceframe reads/writes.
4708 * linux-low.c (handle_tracepoints): New.
4709 (linux_wait_1): Call it.
4710 (linux_resume_one_lwp): Handle while-stepping.
4711 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4712 (linux_target_ops): Install them.
4713 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4715 * linux-x86-low.c (x86_supports_tracepoints): New.
4716 (the_low_target). Install it.
4718 * mem-break.h (delete_breakpoint): Declare.
4719 * mem-break.c (delete_breakpoint): Make external.
4721 * target.h (struct target_ops): Add `supports_tracepoints',
4722 `read_pc', and `write_pc' fields.
4723 (target_supports_tracepoints): Define.
4724 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4727 * regcache.h (struct regcache) <registers_owned>: New field.
4728 (init_register_cache, regcache_cpy): Declare.
4729 (regcache_read_pc, regcache_write_pc): Declare.
4730 (register_cache_size): Declare.
4731 (supply_regblock): Declare.
4732 * regcache.c (init_register_cache): New.
4733 (new_register_cache): Use it.
4734 (regcache_cpy): New.
4735 (register_cache_size): New.
4736 (supply_regblock): New.
4737 (regcache_read_pc, regcache_write_pc): New.
4739 * tracepoint.c: New.
4741 * Makefile.in (OBS): Add tracepoint.o.
4742 (tracepoint.o): New rule.
4744 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4746 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4748 (i386-mmx.c): Likewise.
4749 (i386-mmx-linux.o): Likewise.
4750 (i386-mmx-linux.c): Likewise.
4752 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4753 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4754 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4755 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4757 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4758 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4759 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4761 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4763 * Makefile.in (clean): Updated.
4765 (i386-avx.c): Likewise.
4766 (i386-avx-linux.o): Likewise.
4767 (i386-avx-linux.c): Likewise.
4768 (amd64-avx.o): Likewise.
4769 (amd64-avx.c): Likewise.
4770 (amd64-avx-linux.o): Likewise.
4771 (amd64-avx-linux.c): Likewise.
4773 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4774 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4775 (srv_amd64_regobj): Add amd64-avx.o.
4776 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4777 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4778 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4779 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4780 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4781 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4784 * i387-fp.c: Include "i386-xstate.h".
4786 (i387_cache_to_xsave): Likewise.
4787 (i387_xsave_to_cache): Likewise.
4788 (x86_xcr0): Likewise.
4790 * i387-fp.h (i387_cache_to_xsave): Likewise.
4791 (i387_xsave_to_cache): Likewise.
4792 (x86_xcr0): Likewise.
4794 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4795 * linux-crisv32-low.c (target_regsets): Likewise.
4796 * linux-m68k-low.c (target_regsets): Likewise.
4797 * linux-mips-low.c (target_regsets): Likewise.
4798 * linux-ppc-low.c (target_regsets): Likewise.
4799 * linux-s390-low.c (target_regsets): Likewise.
4800 * linux-sh-low.c (target_regsets): Likewise.
4801 * linux-sparc-low.c (target_regsets): Likewise.
4802 * linux-xtensa-low.c (target_regsets): Likewise.
4804 * linux-low.c: Include <sys/uio.h>.
4805 (regsets_fetch_inferior_registers): Support nt_type.
4806 (regsets_store_inferior_registers): Likewise.
4807 (linux_process_qsupported): New.
4808 (linux_target_ops): Add linux_process_qsupported.
4810 * linux-low.h (regset_info): Add nt_type.
4811 (linux_target_ops): Add process_qsupported.
4813 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4815 (init_registers_i386_avx_linux): New.
4816 (init_registers_amd64_avx_linux): Likewise.
4817 (xmltarget_i386_linux_no_xml): Likewise.
4818 (xmltarget_amd64_linux_no_xml): Likewise.
4819 (PTRACE_GETREGSET): Likewise.
4820 (PTRACE_SETREGSET): Likewise.
4821 (x86_fill_xstateregset): Likewise.
4822 (x86_store_xstateregset): Likewise.
4823 (use_xml): Likewise.
4824 (x86_linux_update_xmltarget): Likewise.
4825 (x86_linux_process_qsupported): Likewise.
4826 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4827 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4828 init_registers_i386_linux here. Call
4829 x86_linux_update_xmltarget.
4830 (the_low_target): Add x86_linux_process_qsupported.
4832 * server.c (handle_query): Call target_process_qsupported.
4834 * target.h (target_ops): Add process_qsupported.
4835 (target_process_qsupported): New.
4837 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4839 * inferiors.c (add_thread): Set last_status kind to
4840 TARGET_WAITKIND_IGNORE.
4841 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4842 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4843 (linux_wait_1): Move `thread' local definition to block that uses
4844 it. Don't NULL initialize `event_child'.
4845 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4846 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4847 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4849 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4851 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4852 an extended waitstatus, or by a watchpoint.
4853 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4854 thread was stepping or has been stopped by a watchpoint.
4856 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4858 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4859 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4860 of another, then delete the previous, and validate all
4862 (validate_inserted_breakpoint): New.
4863 (delete_disabled_breakpoints): New.
4864 (validate_breakpoints): New.
4865 (check_mem_read): Validate breakpoints before trusting their
4866 shadow. Delete disabled breakpoints.
4867 (check_mem_write): Validate breakpoints before trusting they
4868 should be inserted. Delete disabled breakpoints.
4869 * mem-break.h (validate_breakpoints):
4870 * server.c (handle_query): Validate breakpoints when we see a
4873 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4875 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4876 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4877 if we could tell there's a GDB breakpoint at stop_pc.
4878 (need_step_over_p): Don't do a step over if we find a GDB
4879 breakpoint at the resume PC.
4881 * mem-break.c (struct raw_breakpoint): New.
4882 (enum bkpt_type): New type `gdb_breakpoint'.
4883 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4884 fields. New field `raw'.
4885 (find_raw_breakpoint_at): New.
4886 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4888 (set_breakpoint_at): Adjust.
4889 (delete_raw_breakpoint): New.
4890 (release_breakpoint): New.
4891 (delete_breakpoint): Rename to...
4892 (delete_breakpoint_1): ... this. Add proc parameter. Use
4893 release_breakpoint. Return ENOENT.
4894 (delete_breakpoint): Reimplement.
4895 (find_breakpoint_at): Delete.
4896 (find_gdb_breakpoint_at): New.
4897 (delete_breakpoint_at): Delete.
4898 (set_gdb_breakpoint_at): New.
4899 (delete_gdb_breakpoint_at): New.
4900 (gdb_breakpoint_here): New.
4901 (set_reinsert_breakpoint): Use release_breakpoint.
4902 (uninsert_breakpoint): Rename to ...
4903 (uninsert_raw_breakpoint): ... this.
4904 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4905 (reinsert_raw_breakpoint): Change parameter type to
4907 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4909 (check_breakpoints): Adjust. Use release_breakpoint.
4910 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4911 (breakpoint_inserted_here): Ditto.
4912 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4913 Don't trust the breakpoint's shadow if it is not inserted.
4914 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4915 (delete_all_breakpoints): Adjust.
4916 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4917 use delete_breakpoint_1.
4919 * mem-break.h (breakpoints_supported): Delete declaration.
4920 (set_gdb_breakpoint_at): Declare.
4921 (gdb_breakpoint_here): Declare.
4922 (delete_breakpoint_at): Delete.
4923 (delete_gdb_breakpoint_at): Declare.
4925 * server.h (struct raw_breakpoint): Forward declare.
4926 (struct process_info): New field `raw_breakpoints'.
4928 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4931 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4933 * linux-low.c (status_pending_p_callback): Fix comment.
4934 (linux_wait_for_event_1): Move most of the internal breakpoint
4935 handling from here...
4936 (linux_wait_1): ... to here.
4937 (count_events_callback): New.
4938 (select_singlestep_lwp_callback): New.
4939 (select_event_lwp_callback): New.
4940 (cancel_breakpoints_callback): New.
4941 (select_event_lwp): New.
4942 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4943 priority to all LWPs that have had events that should be reported
4944 to the client. Cancel breakpoints when about to reporting the
4945 event to the client, not while stopping lwps. No longer cancel
4946 finished single-steps here.
4947 (cancel_finished_single_step): Delete.
4948 (cancel_finished_single_steps): Delete.
4950 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4952 * mem-break.c (enum bkpt_type): New.
4953 (struct breakpoint): New field `type'.
4954 (set_breakpoint_at): Change return type to struct breakpoint
4955 pointer. Set type to `other_breakpoint' by default.
4956 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4957 in the breakpoint list.
4958 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4959 (reinsert_breakpoint): Rename to ...
4960 (reinsert_raw_breakpoint): ... this.
4961 (reinsert_breakpoints_at): Adjust.
4962 * mem-break.h (struct breakpoint): Declare.
4963 (set_breakpoint_at): Change return type to struct breakpoint
4966 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4968 * server.c (handle_query): Assign, not compare.
4970 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4972 Teach linux gdbserver to step-over-breakpoints.
4974 * linux-low.c (can_hardware_single_step): New.
4975 (supports_breakpoints): New.
4976 (handle_extended_wait): If stopping threads, read the stop pc of
4979 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4980 low target doesn't support retrieving the PC.
4981 (add_lwp): Set last_resume_kind to resume_continue.
4982 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4983 (linux_attach): Don't clear stop_expected. Set the lwp's
4984 last_resume_kind to resume_stop.
4985 (linux_detach_one_lwp): Don't check for removed breakpoints.
4986 (check_removed_breakpoint): Delete.
4987 (status_pending_p): Rename to ...
4988 (status_pending_p_callback): ... this. Don't check for removed
4989 breakpoints. Don't consider threads that are stopped from GDB's
4991 (linux_wait_for_lwp): Always read the stop_pc here.
4992 (cancel_breakpoint): New.
4993 (step_over_bkpt): New global.
4994 (linux_wait_for_event_1): Implement stepping over breakpoints.
4995 (gdb_wants_lwp_stopped): New.
4996 (gdb_wants_all_stopped): New.
4997 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4998 single-step traps here. Store the thread's last reported target
5000 (send_sigstop): Don't clear stop_expected. Always set it,
5002 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5003 (cancel_finished_single_step): New.
5004 (cancel_finished_single_steps): New.
5005 (wait_for_sigstop): Don't cancel finished single-step traps here.
5006 (linux_resume_one_lwp): Don't check for removed breakpoints.
5007 Don't set `step' on non-hardware step archs.
5008 (linux_set_resume_request): Ignore resume_stop requests if already
5009 stopping or stopped. Set the lwp's last_resume_kind.
5010 (resume_status_pending_p): Don't check for removed breakpoints.
5011 (need_step_over_p): New.
5012 (start_step_over): New.
5013 (finish_step_over): New.
5014 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5015 requests. Clear the thread's last reported target waitstatus.
5016 Don't use the `suspended' flag. Don't consider pending breakpoints.
5017 (linux_resume): Start a step-over if necessary.
5018 (proceed_one_lwp): New.
5019 (proceed_all_lwps): New.
5020 (unstop_all_lwps): New.
5021 * linux-low.h (struct lwp_info): Rewrite comment for the
5022 `suspended' flag. Add the `stop_pc' field. Delete the
5023 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5024 Add `'last_resume_kind' and `need_step_over' fields.
5025 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5026 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5027 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5028 (set_raw_breakpoint_at): New.
5029 (set_breakpoint_at): Rewrite to use it.
5030 (reinsert_breakpoint_handler): Delete.
5031 (set_reinsert_breakpoint): New.
5032 (reinsert_breakpoint_by_bp): Delete.
5033 (delete_reinsert_breakpoints): New.
5034 (uninsert_breakpoint): Rewrite.
5035 (uninsert_breakpoints_at): New.
5036 (reinsert_breakpoint): Rewrite.
5037 (reinsert_breakpoints_at): New.
5038 (check_breakpoints): Rewrite.
5039 (breakpoint_here): New.
5040 (breakpoint_inserted_here): New.
5041 (check_mem_read): Adjust.
5042 * mem-break.h (breakpoints_supported, breakpoint_here)
5043 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5044 (reinsert_breakpoint_by_bp): Delete declaration.
5045 (delete_reinsert_breakpoints): Declare.
5046 (reinsert_breakpoint): Delete declaration.
5047 (reinsert_breakpoints_at): Declare.
5048 (uninsert_breakpoint): Delete declaration.
5049 (uninsert_breakpoints_at): Declare.
5050 (check_breakpoints): Adjust prototype.
5051 * server.h: Adjust include order.
5052 (struct thread_info): Declare here. Add a `last_status' field.
5054 2010-03-23 Michael Snyder <msnyder@vmware.com>
5056 * server.c (crc32): New function.
5057 (handle_query): Add handling for 'qCRC:' request.
5059 2010-03-23 Pedro Alves <pedro@codesourcery.com>
5061 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5062 lwp had been stopped by a watchpoint.
5064 2010-03-16 Pedro Alves <pedro@codesourcery.com>
5066 * server.h (internal_error): Declare.
5067 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5068 * utils.c (internal_error): New function.
5070 2010-03-15 Andreas Schwab <schwab@redhat.com>
5072 * configure.srv: Fix typo setting srv_regobj.
5074 2010-03-15 Pedro Alves <pedro@codesourcery.com>
5076 * linux-low.c (fetch_register): Avoid passing a non string literal
5078 (usr_store_inferior_registers): Ditto.
5080 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5082 * linux-low.c (linux_write_memory): Bail out early if peeking
5085 2010-03-14 Pedro Alves <pedro@codesourcery.com>
5087 * linux-low.h (struct lwp_info): New fields
5088 `stopped_by_watchpoint' and `stopped_data_address'.
5089 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5090 here, and cache them in the lwp object.
5091 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5093 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5095 (linux_stopped_by_watchpoint): Rewrite.
5096 (linux_stopped_data_address): Rewrite.
5098 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
5100 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5101 switching the current inferior, not before.
5103 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5105 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5106 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5107 i386-linux.c and amd64-linux.c.
5108 (reg-i386.o): Removed.
5109 (reg-i386.c): Likewise.
5110 (reg-i386-linux.o): Likewise.
5111 (reg-i386-linux.c): Likewise.
5112 (reg-x86-64.o): Likewise.
5113 (reg-x86-64.c): Likewise.
5114 (reg-x86-64-linux.o): Likewise.
5115 (reg-x86-64-linux.c): Likewise.
5118 (i386-linux.o): Likewise.
5119 (i386-linux.c): Likewise.
5120 (amd64.o): Likewise.
5121 (amd64.c): Likewise.
5122 (amd64-linux.o): Likewise.
5123 (amd64-linux.c): Likewise.
5125 * configure.srv (srv_i386_regobj): New.
5126 (srv_i386_linux_regobj): Likewise.
5127 (srv_amd64_regobj): Likewise.
5128 (srv_amd64_linux_regobj): Likewise.
5129 (srv_i386_32bit_xmlfiles): Likewise.
5130 (srv_i386_64bit_xmlfiles): Likewise.
5131 (srv_i386_xmlfiles): Likewise.
5132 (srv_amd64_xmlfiles): Likewise.
5133 (srv_i386_linux_xmlfiles): Likewise.
5134 (srv_amd64_linux_xmlfiles): Likewise.
5135 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5136 srv_xmlfiles to $srv_i386_xmlfiles.
5137 (i[34567]86-*-mingw32ce*): Likewise.
5138 (i[34567]86-*-mingw*): Likewise.
5139 (i[34567]86-*-nto*): Likewise.
5140 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5141 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5142 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5143 (x86_64-*-linux*): Likewise.
5145 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5146 (init_registers_amd64_linux): New.
5147 (x86_arch_setup): Replace init_registers_x86_64_linux with
5148 init_registers_amd64_linux.
5150 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5152 * configure.ac: Check for libdl. If it is not available link against
5153 static libthread_db.
5154 * configure: Regenerate.
5156 2010-02-22 Pedro Alves <pedro@codesourcery.com>
5160 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5161 handing a read watchpoint.
5162 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5164 2010-02-12 Doug Evans <dje@google.com>
5166 * linux-low.c (linux_supports_tracefork_flag): Document.
5167 (linux_look_up_symbols): Add comment.
5169 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5171 * regcache.c (supply_register): Clear regcache if buf is NULL.
5173 2010-02-02 Nicolas Roche <roche@sourceware.org>
5174 Joel Brobecker <brobecker@adacore.com>
5176 * inferiors.c (find_inferior): Add function documentation.
5177 (unloaded_dll): Handle the case where the unloaded dll has not
5178 been previously registered in the dll list.
5180 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5182 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5183 (thumb2_breakpoint): New.
5184 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5186 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5188 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5189 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5192 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5194 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5196 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5198 * linux-s390-low.c (s390_collect_ptrace_register)
5199 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5201 2010-01-21 Doug Evans <dje@google.com>
5203 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5204 (PTRACE_ARG4_TYPE): New macro.
5205 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5206 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5207 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5208 (usr_store_inferior_registers): Ditto.
5209 (linux_read_memory, linux_write_memory): Ditto.
5210 (linux_test_for_tracefork): Ditto.
5212 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5213 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5215 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5217 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5220 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5222 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5223 prototype to take a regcache. Adjust.
5225 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5227 * regcache.h (struct thread_info): Forward declare.
5228 (struct regcache): New.
5229 (new_register_cache): Adjust prototype.
5230 (get_thread_regcache): Declare.
5231 (free_register_cache): Adjust prototype.
5232 (registers_to_string, registers_from_string): Ditto.
5233 (supply_register, supply_register_by_name, collect_register)
5234 (collect_register_as_string, collect_register_by_name): Ditto.
5235 * regcache.c (struct inferior_regcache_data): Delete.
5236 (get_regcache): Rename to ...
5237 (get_thread_regcache): ... this. Adjust. Switch inferior before
5239 (regcache_invalidate_one): Adjust.
5240 (regcache_invalidate): Fix prototype.
5241 (new_register_cache): Return the new register cache.
5242 (free_register_cache): Change prototype.
5243 (realloc_register_cache): Adjust.
5244 (registers_to_string): Change prototype to take a regcache. Adjust.
5245 (registers_from_string): Ditto.
5246 (register_data): Ditto.
5247 (supply_register): Ditto.
5248 (supply_register_by_name): Ditto.
5249 (collect_register): Ditto.
5250 (collect_register_as_string): Ditto.
5251 (collect_register_by_name): Ditto.
5252 * server.c (process_serial_event): Adjust.
5253 * linux-low.h (regset_fill_func, regset_store_func): Change
5255 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5257 * linux-low.c (get_stop_pc): Adjust.
5258 (check_removed_breakpoint): Adjust.
5259 (linux_wait_for_event): Adjust.
5260 (linux_resume_one_lwp): Adjust.
5261 (fetch_register): Add regcache parameter. Adjust.
5262 (usr_store_inferior_registers): Ditto.
5263 (regsets_fetch_inferior_registers): Ditto.
5264 (regsets_store_inferior_registers): Ditto.
5265 (linux_fetch_registers, linux_store_registers): Ditto.
5266 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5268 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5270 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5271 prototype to take a regcache.
5272 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5273 * remote-utils.c (convert_ascii_to_int, outreg)
5274 (prepare_resume_reply): Change prototype to take a regcache.
5276 * target.h (struct target_ops) <fetch_registers, store_registers>:
5277 Change prototype to take a regcache.
5278 (fetch_inferior_registers, store_inferior_registers): Change
5279 prototype to take a regcache. Adjust.
5280 * proc-service.c (ps_lgetregs): Adjust.
5281 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5282 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5283 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5284 take a regcache. Adjust.
5285 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5286 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5287 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5288 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5289 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5290 (cris_cannot_fetch_register):
5291 (cris_breakpoint_at): Change prototype to take a regcache.
5293 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5294 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5295 to take a regcache. Adjust.
5296 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5298 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5299 take a regcache. Adjust.
5300 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5301 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5302 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5303 * linux-mips-low.c (mips_get_pc):
5304 (mips_set_pc): Change prototype to take a regcache. Adjust.
5305 (mips_reinsert_addr): Adjust.
5306 (mips_collect_register): Change prototype to take a regcache.
5308 (mips_supply_register):
5309 (mips_collect_register_32bit, mips_supply_register_32bit)
5310 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5311 (mips_store_fpregset): Ditto.
5312 * linux-ppc-low.c (ppc_supply_ptrace_register)
5313 (ppc_supply_ptrace_register): Ditto.
5314 (parse_spufs_run): Adjust.
5315 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5316 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5317 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5318 take a regcache. Adjust.
5319 * linux-s390-low.c (s390_collect_ptrace_register)
5320 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5321 (s390_set_pc): Change prototype to take a regcache. Adjust.
5322 (s390_arch_setup): Adjust.
5323 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5324 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5325 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5326 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5327 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5329 (sparc_breakpoint_at): Adjust.
5330 * linux-xtensa-low.c (xtensa_fill_gregset):
5331 (xtensa_store_gregset):
5332 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5333 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5334 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5335 prototype to take a regcache. Adjust.
5336 * win32-arm-low.c (arm_fetch_inferior_register)
5337 (arm_store_inferior_register): Change prototype to take a
5339 * win32-i386-low.c (i386_fetch_inferior_register)
5340 (i386_store_inferior_register): Change prototype to take a
5342 * win32-low.c (child_fetch_inferior_registers)
5343 (child_store_inferior_registers): Change prototype to take a
5345 (win32_wait): Adjust.
5346 (win32_fetch_inferior_registers): Change prototype to take a
5348 (win32_store_inferior_registers): Adjust.
5349 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5350 store_inferior_register>: Change prototype to take a regcache.
5352 2010-01-20 Doug Evans <dje@google.com>
5354 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5356 (linux_wait_for_event1, linux_init_signals): Ditto.
5357 (W_STOPCODE): Provide definition if missing.
5359 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5361 * linux-low.c (linux_core_of_thread): New.
5362 (compare_ints, show_process, list_threads): New.
5363 (linux_qxfer_osdata): Report threads and cores.
5364 (linux_target_op): Register linux_core_of_thread.
5365 * remote-utils.c (prepare_resume_reply): Report the core.
5366 (buffer_xml_printf): Support %d specifier.
5367 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5369 (handle_query): Handle qXfer:threads. Announce availability
5371 * target.h (struct target_ops): New field core_of_thread.
5373 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5375 * Makefile.in (clean): Remove new generated files.
5376 (reg-s390.o, reg-s390.c): Remove rules.
5377 (reg-s390x.o, reg-s390x.c): Likewise.
5378 (s390-linux32.o, s390-linux32.c): Add rules.
5379 (s390-linux64.o, s390-linux64.c): Likewise.
5380 (s390x-linux64.o, s390x-linux64.c): Likewise.
5381 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5382 * linux-s390-low.c: Include <elf.h>.
5383 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5384 (init_registers_s390): Remove prototype.
5385 (init_registers_s390x): Likewise.
5386 (init_registers_s390_linux32): Add prototype.
5387 (init_registers_s390_linux64): Likewise.
5388 (init_registers_s390x_linux64): Likewise.
5389 (s390_num_regs_3264): New define.
5390 (s390_regmap_3264): New global variable.
5391 (s390_cannot_fetch_register): Remove obsolete check.
5392 (s390_cannot_store_register): Likewise.
5393 (s390_collect_ptrace_register): Handle upper/lower register halves.
5394 (s390_supply_ptrace_register): Likewise.
5395 (s390_fill_gregset): Update to register number changes.
5396 (s390_get_hwcap): New routine.
5397 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5398 Install appropriate regmap and register set.
5400 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5402 * server.c (gdbserver_version): Update copyright year to 2010.
5403 * gdbreplay.c (gdbreplay_version): Likewise.
5405 2009-12-28 Doug Evans <dje@google.com>
5407 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5408 elf/external.h. Include <elf.h> instead but only if necessary.
5410 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5412 * linux-low.c (linux_remove_process): Remove `detaching'
5413 parameter. Don't release/detach from thread_db here.
5414 (linux_kill): Release/detach from thread_db here, ...
5415 (linux_detach): ... and here, before actually detaching.
5416 (linux_wait_1): ... and here, when a process exits.
5417 * thread-db.c (any_thread_of): New.
5418 (thread_db_free): Switch the current inferior to a thread of the
5421 2009-12-21 Doug Evans <dje@google.com>
5423 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5425 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5426 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5427 warning ifndef __NR_tkill. Move setting of errno there too.
5428 Delete unnecessary resetting of errno after syscall.
5429 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5431 * configure.ac: Check for dladdr.
5432 * config.in: Regenerate.
5433 * configure: Regenerate.
5434 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5435 (try_thread_db_load): Update.
5437 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5439 2009-12-18 Doug Evans <dje@google.com>
5441 * event-loop.c: Include unistd.h if it exists.
5443 * linux-low.c (my_waitpid): Move definition away from being in
5444 between linux_tracefork_child/linux_test_for_tracefork.
5446 * gdb_proc_service.h (psaddr_t): Fix type.
5447 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5448 signature to match glibc.
5450 2009-12-16 Doug Evans <dje@google.com>
5452 * linux-low.c (linux_read_memory): Fix argument to read.
5454 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5456 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5457 events, don't leave current_inferior pointing at null.
5459 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5461 * win32-low.c (LOG): Delete.
5462 (OUTMSG): Output to stderr.
5463 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5464 on compile time LOG macro.
5465 (win32_wait): Fix debug output.
5467 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5469 * win32-low.c (win32_add_one_solib): If the dll name is
5470 "ntdll.dll", prepend the system directory to the dll path.
5472 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5474 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5476 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5477 Vladimir Prus <vladimir@codesourcery.com>
5479 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5480 * configure.ac: Check for __mcoldfire__ and set
5481 gdb_cv_m68k_is_coldfire.
5482 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5483 reg-cf.o and reg-m68k.o.
5484 * configure: Regenerated.
5486 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5488 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5489 Pass it to thread_db_free.
5490 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5491 proper `detaching' argument to linux_remove_process.
5492 * linux-low.h (thread_db_free): Add `detaching' parameter.
5493 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5495 (thread_db_free): Add `detaching' parameter. Only
5496 call td_ta_clear_event if detaching from process.
5498 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5500 * thread-db.c (thread_db_free): Fix typo.
5502 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5505 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5507 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5509 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5510 with an i686 compiler.
5511 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5513 * configure: Rebuilt.
5515 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5519 * server.c (handle_search_memory_1): Correct read_addr initialization
5520 in loop for searching subsequent chunks.
5522 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5524 * configure.ac: New --with-libthread-db option.
5525 * thread-db.c: Allow direct dependence on libthread_db.
5526 (thread_db_free): Adjust.
5527 * config.in: Regenerate.
5528 * configure: Likewise.
5530 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5533 * thread-db.c (attach_thread): New function.
5534 (maybe_attach_thread): Return success/failure.
5535 (find_new_threads_callback): Adjust.
5536 (thread_db_find_new_threads): Loop until no new threads.
5538 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5540 * proc-service.c (ps_lgetregs): Formatting.
5542 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5544 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5545 * configure.ac: Adjust.
5546 * linux-low.h (struct process_info_private): Move members to struct
5548 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5549 * linux-low.c (linux_remove_process): Adjust.
5550 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5551 * server.c (handle_query): Move code ...
5552 (handle_monitor_command): ... here. New function.
5553 * target.h (struct target_ops): New member.
5554 * thread-db.c (struct thread_db): New.
5555 (libthread_db_search_path): New variable.
5556 (thread_db_create_event, thread_db_enable_reporting)
5557 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5558 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5559 (try_thread_db_load_1, dladdr_to_soname): New functions.
5560 (try_thread_db_load, thread_db_load_search): New functions.
5561 (thread_db_init): Search for libthread_db.
5562 (thread_db_free): New function.
5563 (thread_db_handle_monitor_command): Likewise.
5564 * config.in: Regenerate.
5565 * configure: Regenerate.
5567 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5569 * spu-low.c (spu_kill): Wait for inferior to terminate.
5570 Call clear_inferiors.
5571 (spu_detach): Call clear_inferiors.
5573 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5575 * aclocal.m4: Regenerate.
5576 * config.in: Likewise.
5577 * configure: Likewise.
5579 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5581 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5582 (parse_spufs_run): New function.
5583 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5584 (ppc_breakpoint_at): Handle SPU breakpoints.
5586 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5588 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5589 (SPUFS_MAGIC): Define.
5590 (spu_enumerate_spu_ids): New function.
5591 (linux_qxfer_spu): New function.
5592 (linux_target_ops): Install linux_qxfer_spu.
5594 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5596 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5597 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5598 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5599 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5600 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5601 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5602 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5603 (init_registers_powerpc_cell32l): Add prototype.
5604 (init_registers_powerpc_cell64l): Likewise.
5605 (ppc_arch_setup): Detect Cell/B.E. architecture.
5607 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5609 * Makefile.in (datarootdir): New variable.
5611 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5613 * linux-low.c (linux_write_memory): Update debugging output.
5614 * Makefile.in (clean): Add new descriptions.
5615 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5616 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5617 * configure.srv: Add new files for arm*-*-linux*.
5618 * linux-arm-low.c: Add new declarations.
5619 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5620 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5621 (HWCAP_VFPv3D16): New.
5622 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5623 instead of __IWMMXT__.
5624 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5625 (arm_arch_setup): New.
5626 (target_regsets): Remove #ifdef. Add VFP regset.
5627 (the_low_target): Use arm_arch_setup.
5629 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5631 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5632 the main thread again.
5634 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5636 Adding Neutrino gdbserver.
5637 * configure: Regenerated.
5638 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5639 * configure.srv (i[34567]86-*-nto*): New target.
5640 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5641 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5642 (nto_comctrl) [__QNX__]: New function.
5643 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5645 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5647 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5650 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5651 Pedro Alves <pedro@codesourcery.com>
5653 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5654 don't support CONTEXT_EXTENDED_REGISTERS.
5655 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5656 (the_low_target): Install them.
5657 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5658 failing with ERROR_PIPE_NOT_CONNECTED.
5660 2009-06-30 Doug Evans <dje@google.com>
5661 Pierre Muller <muller@ics.u-strasbg.fr>
5663 Add h/w watchpoint support to x86-linux, win32-i386.
5664 * Makefile.in (SFILES): Add i386-low.c
5665 (i386_low_h): Define.
5666 (i386-low.o): Add dependencies.
5667 (linux-x86-low.o): Add i386-low.h dependency.
5668 (win32-i386-low.o): Ditto.
5669 * i386-low.c: New file.
5670 * i386-low.h: New file.
5671 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5672 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5673 * linux-low.c (linux_add_process): Initialize arch_private.
5674 (linux_remove_process): Free arch_private.
5675 (add_lwp): Initialize arch_private.
5676 (delete_lwp): Free arch_private.
5677 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5679 * linux-low.h (process_info_private): New member arch_private.
5680 (lwp_info): New member arch_private.
5681 (linux_target_ops): New members new_process, new_thread,
5683 (ptid_of): New macro.
5684 * linux-x86-low.c: Include stddef.h, i386-low.h.
5685 (arch_process_info): New struct.
5686 (arch_lwp_info): New struct.
5687 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5688 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5689 (i386_dr_low_get_status): New function.
5690 (x86_insert_point, x86_remove_point): New functions.
5691 (x86_stopped_by_watchpoint): New function.
5692 (x86_stopped_data_address): New function.
5693 (x86_linux_new_process, x86_linux_new_thread): New functions.
5694 (x86_linux_prepare_to_resume): New function.
5695 (the_low_target): Add entries for insert_point, remove_point,
5696 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5698 * server.c (debug_hw_points): New global.
5699 (monitor_show_help): Document set debug-hw-points.
5700 (handle_query): Process "set debug-hw-points".
5701 * server.h (debug_hw_points): Declare.
5702 (paddress): Declare.
5703 * utils.c (NUMCELLS, CELLSIZE): New macros.
5704 (get_sell, xsnprintf, paddress): New functions.
5705 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5706 remove_point, stopped_by_watchpoint, stopped_data_address.
5707 * win32-i386-low.c: Include i386-low.h.
5708 (debug_reg_state): Replaces dr.
5709 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5710 (i386_dr_low_get_status): New function.
5711 (i386_insert_point, i386_remove_point): New functions.
5712 (i386_stopped_by_watchpoint): New function.
5713 (i386_stopped_data_address): New function.
5714 (i386_initial_stuff): Update.
5715 (get_thread_context,set_thread_context,i386_thread_added): Update.
5716 (the_low_target): Add entries for insert_point,
5717 remove_point, stopped_by_watchpoint, stopped_data_address.
5718 * win32-low.c (win32_insert_watchpoint): New function.
5719 (win32_remove_watchpoint): New function.
5720 (win32_stopped_by_watchpoint): New function.
5721 (win32_stopped_data_address): New function.
5722 (win32_target_ops): Add entries for insert_watchpoint,
5723 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5724 * win32-low.h (win32_target_ops): New members insert_point,
5725 remove_point, stopped_by_watchpoint, stopped_data_address.
5727 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5729 * server.c (process_serial_event): Re-return unsupported, not
5730 error, if the type isn't recognized. Re-allow supporting only
5731 insert or remove packets. Also call require_running for
5732 breakpoints. Add missing break statement to default case. Tidy.
5733 * target.h (struct target_ops): Rename insert_watchpoint to
5734 insert_point, and remove_watchpoint to remove_point.
5736 * linux-low.h (struct linux_target_ops): Likewise.
5737 * linux-low.c (linux_insert_watchpoint): Rename to ...
5738 (linux_insert_point): ... this. Adjust.
5739 (linux_remove_watchpoint): Rename to ...
5740 (linux_remove_point): ... this. Adjust.
5741 (linux_target_ops): Adjust.
5742 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5743 (cris_insert_point): ... this.
5744 (cris_remove_watchpoint): Rename to ...
5745 (cris_remove_point): ... this.
5746 (the_low_target): Adjust.
5748 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5750 * server.c (handle_v_kill): Pass signal_pid to
5751 kill_inferior if multi_process is zero.
5753 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5755 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5756 * target.h (target_ops): Comment for *_watchpoint to make it clear
5757 the functions can get types '0' and '1'.
5759 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5761 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5762 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5763 * regcache.c (get_regcache): Likewise.
5764 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5765 * win32-low.c (child_fetch_inferior_registers): Remove check for
5768 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5769 Pedro Alves <pedro@codesourcery.com>
5771 * target.h (struct target_ops) <supports_multi_process>: New
5773 (target_supports_multi_process): New.
5774 * server.c (handle_query): Even if GDB reports support, only
5775 enable multi-process if the target also supports it. Report
5776 multi-process support only if the target backend supports it.
5777 * linux-low.c (linux_supports_multi_process): New function.
5778 (linux_target_ops): Install it as target_supports_multi_process
5781 2009-05-24 Doug Evans <dje@google.com>
5783 Global renaming of find_thread_pid to find_thread_ptid.
5784 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5785 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5786 All callers updated.
5788 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5789 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5792 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5793 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5794 (linux_resume_one_lwp): Ditto.
5796 2009-05-23 Doug Evans <dje@google.com>
5798 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5799 from struct inferior_list_entry * to struct lwp_info *.
5800 All callers updated.
5802 2009-05-13 Doug Evans <dje@google.com>
5804 * linux-x86-low.c: Don't include assert.h.
5805 (x86_siginfo_fixup): Use fatal, not assert.
5806 (x86_arch_setup): Fix comment.
5808 2009-05-12 Doug Evans <dje@google.com>
5810 Biarch support for i386/amd64 gdbserver.
5811 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5812 Add linux-x86-low.c.
5813 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5814 (linux-x86-low.o): Add.
5815 * linux-x86-64-low.c: Delete.
5816 * linux-i386-low.c: Delete.
5817 * linux-x86-low.c: New file.
5818 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5820 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5822 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5823 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5824 (linux_child_pid_to_exec_file): New function.
5825 (elf_64_header_p, elf_64_file_p): New functions.
5826 (siginfo_fixup): New function.
5827 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5828 give target a chance to convert layout.
5829 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5830 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5832 2009-05-07 Doug Evans <dje@google.com>
5834 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5835 (regsets_store_inferior_registers): Ditto.
5837 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5841 * linux-low.c (must_set_ptrace_flags): Delete.
5842 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5844 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5845 `lwp->must_set_ptrace_flags' instead.
5846 (linux_wait_for_event_1): Set ptrace options here.
5847 (linux_wait_1): ... not here.
5849 2009-04-30 Doug Evans <dje@google.com>
5851 * inferiors.c (started_inferior_callback): New function.
5852 (attached_inferior_callback): New function.
5853 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5854 * server.c (print_started_pid, print_attached_pid): New functions.
5855 (detach_or_kill_for_exit): New function.
5856 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5857 * server.h (have_started_inferiors_p): Declare.
5858 (have_attached_inferiors_p): Declare.
5860 * inferiors.c (remove_process): Fix memory leak, free process.
5861 * linux-low.c (linux_remove_process): New function.
5862 (linux_kill): Call it instead of remove_process.
5863 (linux_detach, linux_wait_1): Ditto.
5865 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5867 * configure.srv: Add x86 Windows CE target.
5869 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5871 * inferiors.c (get_thread_process): Make global.
5872 * server.h (get_thread_process): Add prototype.
5873 * thread-db.c (find_one_thread): Use get_thread_process
5874 instead of current_process.
5875 (thread_db_get_tls_address): Do not crash if called when
5876 thread layer is not yet initialized.
5878 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5880 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5881 * spu-low.c (current_tid): Rename to ...
5882 (current_ptid): ... this.
5883 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5884 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5885 ptid_get_lwp (current_ptid) instead of current_tid.
5886 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5887 instead of current_tid. Use find_process_pid to verify pid
5888 argument is valid. Pass proper argument to remove_process.
5889 (spu_thread_alive): Compare current_ptid instead of current_tid.
5890 (spu_resume): Likewise.
5892 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5894 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5897 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5899 Implement the multiprocess extensions, and add linux multiprocess
5902 * server.h (ULONGEST): Declare.
5903 (struct ptid, ptid_t): New.
5904 (minus_one_ptid, null_ptid): Declare.
5905 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5906 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5907 (struct inferior_list_entry): Change `id' type from unsigned from
5909 (struct sym_cache, struct breakpoint, struct
5910 process_info_private): Forward declare.
5911 (struct process_info): Declare.
5912 (current_process): Declare.
5913 (all_processes): Declare.
5914 (initialize_inferiors): Declare.
5915 (add_thread): Adjust to use ptid_t.
5916 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5917 (add_process, remove_process, find_thread_pid): Declare.
5918 (find_inferior_id): Adjust to use ptid_t.
5919 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5920 (multi_process): Declare.
5921 (push_event): Adjust to use ptid_t.
5922 (read_ptid, write_ptid): Declare.
5923 (prepare_resume_reply): Adjust to use ptid_t.
5924 (clear_symbol_cache): Declare.
5925 * inferiors.c (all_processes): New.
5926 (null_ptid, minus_one_ptid): New.
5927 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5928 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5929 (add_thread): Change unsigned long to ptid. Remove gdb_id
5931 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5932 (gdb_id_to_thread): Rename to ...
5933 (find_thread_pid): ... this. Change unsigned long to ptid.
5934 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5935 (loaded_dll, pull_pid_from_list): Adjust.
5936 (add_process, remove_process, find_process_pid)
5937 (get_thread_process, current_process, initialize_inferiors): New.
5938 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5939 (struct target_waitstatus) <related_pid>: Ditto.
5940 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5942 (struct target_ops) <join>: Add `pid' argument.
5943 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5944 (struct target_ops) <wait>: Add `ptid' field. Change return type
5946 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5947 (mywait): Add `ptid' argument. Change return type to ptid_t.
5948 (target_pid_to_str): Declare.
5949 * target.c (set_desired_inferior): Adjust to use ptids.
5950 (mywait): Add new `ptid' argument. Adjust.
5951 (target_pid_to_str): New.
5952 * mem-break.h (free_all_breakpoints): Declare.
5953 * mem-break.c (breakpoints): Delelete.
5954 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5955 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5956 to use per-process breakpoint list.
5957 (free_all_breakpoints): New.
5958 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5959 (symbol_cache, all_symbols_looked_up): Delete.
5961 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5963 (prepare_resume_reply): Change ptid argument's type from unsigned
5964 long to ptid_t. Adjust. Implement W;process and X;process.
5965 (free_sym_cache, clear_symbol_cache): New.
5966 (look_up_one_symbol): Adjust to per-process symbol cache. *
5967 * server.c (cont_thread, general_thread, step_thread): Change type
5970 (multi_process): New.
5971 (last_ptid): Change type to ptid_t.
5972 (struct vstop_notif) <ptid>: Change type to ptid_t.
5973 (queue_stop_reply, push_event): Change `ptid' argument's type to
5975 (discard_queued_stop_replies): Add `pid' argument.
5976 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5977 changes. Don't reference the `attached' global.
5978 (attach_inferior): Adjust to mywait interface changes.
5979 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5980 features. Handle and report "multiprocess+". Handle
5982 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5984 (handle_v_kill): New.
5985 (handle_v_stopped): Adjust to use target_pid_to_str.
5986 (handle_v_requests): Allow multiple attaches and runs when
5987 multiprocess extensions are in effect. Handle "vKill".
5988 (myresume): Adjust to use ptids.
5989 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5990 (handle_status): Adjust to discard_queued_stop_replies interface
5992 (first_thread_of, kill_inferior_callback)
5993 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5994 (main): Call initialize_inferiors. Adjust to use ptids, killing
5995 and detaching from all inferiors. Handle multiprocess packet
5997 * linux-low.h: Include gdb_proc_service.h.
5998 (struct process_info_private): New.
5999 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6000 <lwpid_of>: Use ptid_get_lwp.
6001 (get_lwp_thread): Adjust.
6002 (struct lwp_info): Add `dead' member.
6003 (find_lwp_pid): Declare.
6004 * linux-low.c (thread_db_active): Delete.
6005 (new_inferior): Adjust comment.
6006 (inferior_pid): Delete.
6007 (linux_add_process): New.
6008 (handle_extended_wait): Adjust.
6009 (add_lwp): Change unsigned long to ptid.
6010 (linux_create_inferior): Add process to processes table. Adjust
6011 to use ptids. Don't set new_inferior here.
6012 (linux_attach_lwp): Rename to ...
6013 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6014 it. Adjust to use ptids.
6015 (linux_attach_lwp): New.
6016 (linux_attach): Add process to processes table. Don't set
6018 (struct counter): New.
6019 (second_thread_of_pid_p, last_thread_of_process_p): New.
6020 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6022 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6023 processes. Remove process from process table.
6024 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6025 to multiple processes.
6026 (any_thread_of): New.
6027 (linux_detach): Add `pid' argument, and handle it. Remove process
6028 from processes table.
6029 (linux_join): Add `pid' argument. Handle it.
6030 (linux_thread_alive): Change unsighed long argument to ptid_t.
6031 Consider dead lwps as not being alive.
6032 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6033 threads we're not interested in.
6034 (same_lwp, find_lwp_pid): New.
6035 (linux_wait_for_lwp): Change `pid' argument's type from int to
6037 (linux_wait_for_event): Rename to ...
6038 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6039 from int to ptid_t. Adjust.
6040 (linux_wait_for_event): New.
6041 (linux_wait_1): Add `ptid' argument. Change return type to
6042 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6043 that exit from the process table.
6044 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6046 (mark_lwp_dead): New.
6047 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6048 stopping all threads, mark its main lwp as dead.
6049 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6051 (fetch_register, usr_store_inferior_registers)
6052 (regsets_fetch_inferior_registers)
6053 (regsets_store_inferior_registers, linux_read_memory)
6054 (linux_write_memory): Inline `inferior_pid'.
6055 (linux_look_up_symbols): Adjust to use per-process
6057 (linux_request_interrupt): Adjust to use ptids.
6058 (linux_read_auxv): Inline `inferior_pid'.
6059 (initialize_low): Don't reference thread_db_active.
6060 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6061 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6062 (ps_getpid): Return the pid of the current inferior.
6063 * thread-db.c (proc_handle, thread_agent): Delete.
6064 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6066 (find_one_thread): Change argument type to ptid_t. Adjust to
6068 (maybe_attach_thread): Adjust to per-process data and ptids.
6069 (thread_db_find_new_threads): Ditto.
6070 (thread_db_init): Ditto.
6071 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6072 processes table. Adjust to use ptids.
6073 (spu_kill, spu_detach): Adjust interface. Remove process from
6075 (spu_join, spu_thread_alive): Adjust interface.
6076 (spu_wait): Adjust interface. Remove process from processes
6077 table. Adjust to use ptids.
6078 * win32-low.c (current_inferior_tid): Delete.
6079 (current_inferior_ptid): New.
6080 (debug_event_ptid): New.
6081 (thread_rec): Take a ptid. Adjust.
6082 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6083 (child_delete_thread): Ditto.
6084 (do_initial_child_stuff): Add `attached' argument. Add process to
6086 (child_fetch_inferior_registers, child_store_inferior_registers):
6088 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6089 (win32_attach): Pass 1 to do_initial_child_stuff.
6090 (win32_kill): Adjust interface. Remove process from processes
6092 (win32_detach): Ditto.
6093 (win32_join): Adjust interface.
6094 (win32_thread_alive): Take a ptid.
6095 (win32_resume): Adjust to use ptids.
6096 (get_child_debug_event): Ditto.
6097 (win32_wait): Adjust interface. Remove exiting process from
6100 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6102 Non-stop mode support.
6104 * server.h (non_stop): Declare.
6105 (gdb_client_data, handler_func): Declare.
6106 (delete_file_handler, add_file_handler, start_event_loop):
6108 (handle_serial_event, handle_target_event, push_event)
6109 (putpkt_notif): Declare.
6110 * target.h (enum resume_kind): New.
6111 (struct thread_resume): Replace `step' field by `kind' field.
6112 (TARGET_WNOHANG): Define.
6113 (struct target_ops) <wait>: Add `options' argument.
6114 <supports_non_stop, async, start_non_stop>: New fields.
6115 (target_supports_non_stop, target_async): New.
6116 (start_non_stop): Declare.
6117 (mywait): Add `options' argument.
6118 * target.c (mywait): Add `options' argument. Print child exit
6120 (start_non_stop): New.
6121 * server.c (non_stop, own_buf, mem_buf): New globals.
6122 (struct vstop_notif): New.
6123 (notif_queue): New global.
6124 (queue_stop_reply, push_event, discard_queued_stop_replies)
6125 (send_next_stop_reply): New.
6126 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6128 (attach_inferior): In non-stop mode, don't wait for the target
6130 (handle_general_set): Handle QNonStop.
6131 (handle_query): When handling qC, return the current general
6132 thread, instead of the first thread of the list.
6133 (handle_query): If the backend supports non-stop mode, include
6134 QNonStop+ in the qSupported query response.
6135 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6137 (handle_v_attach, handle_v_run): Handle non-stop mode.
6138 (handle_v_stopped): New.
6139 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6140 (myresume): Adjust to use resume_kind. Handle non-stop.
6141 (queue_stop_reply_callback): New.
6142 (handle_status): Handle non-stop mode.
6143 (main): Clear non_stop flag on reconnection. Use the event-loop.
6144 Refactor serial protocol handling from here ...
6145 (process_serial_event): ... to this new function. When GDB
6146 selects any thread, select one here. In non-stop mode, wait until
6147 GDB acks all pending events before exiting.
6148 (handle_serial_event, handle_target_event): New.
6149 * remote-utils.c (remote_open): Install remote_desc in the event
6151 (remote_close): Remove remote_desc from the event loop.
6152 (putpkt_binary): Rename to...
6153 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6154 (putpkt_binary): New as wrapper around putpkt_binary_1.
6155 (putpkt_notif): New.
6156 (prepare_resume_reply): In non-stop mode, don't change the
6158 * event-loop.c: New.
6159 * Makefile.in (OBJ): Add event-loop.o.
6160 (event-loop.o): New rule.
6162 * linux-low.h (pid_of): Moved here.
6164 (get_lwp_thread): Use lwpid_of.
6165 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6166 * linux-low.c (pid_of): Delete.
6167 (inferior_pid): Use lwpid_of.
6168 (linux_event_pipe): New.
6169 (target_is_async_p): New.
6171 (handle_extended_wait): Use lwpid_of.
6172 (add_lwp): Don't set lwpid field.
6173 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6174 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6175 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6176 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6177 first. Adjust to linux_wait_for_event interface changes. Use
6179 (linux_detach): Don't delete the main lwp here.
6180 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6181 (status_pending_p): Don't consider explicitly suspended lwps.
6182 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6183 pointer. Add OPTIONS argument. Change return type to int. Use
6184 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6185 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6186 pointer. Add status pointer argument. Return a pid instead of a
6187 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6188 changes. In non-stop mode, don't switch to a random thread.
6189 (linux_wait): Rename to...
6190 (linux_wait_1): ... this. Add target_options argument, and handle
6191 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6192 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6193 clean exit and signal exit code. Don't stop all threads in
6194 non-stop mode. In all-stop mode, only stop all threads when
6195 reporting a stop to GDB. Handle explicit thread stop requests.
6196 (async_file_flush, async_file_mark): New.
6198 (send_sigstop): Use lwpid_of.
6199 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6200 interface changes. In non-stop mode, don't switch to a random
6202 (linux_resume_one_lwp): Use lwpid_of.
6203 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6204 (linux_resume_one_thread): ... this. Handle resume_stop. In
6205 non-stop mode, don't look for pending flag in all threads.
6206 (resume_status_pending_p): Don't consider explicitly suspended
6208 (my_waitpid): Reimplement. Emulate __WALL.
6209 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6211 (sigchld_handler, linux_supports_non_stop, linux_async)
6212 (linux_start_non_stop): New.
6213 (linux_target_ops): Register linux_supports_non_stop, linux_async
6214 and linux_start_non_stop.
6215 (initialize_low): Install SIGCHLD handler.
6216 * thread-db.c (thread_db_create_event, find_one_thread)
6217 (thread_db_get_tls_address): Use lwpid_of.
6218 * win32-low.c (win32_detach): Adjust to use resume_kind.
6219 (win32_wait): Add `options' argument.
6220 * spu-low.c (spu_resume): Adjust to use resume_kind.
6221 (spu_wait): Add `options' argument.
6223 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6225 Decouple target code from remote protocol.
6227 * target.h (enum target_waitkind): New.
6228 (struct target_waitstatus): New.
6229 (struct target_ops) <wait>: Return an unsigned long. Take a
6230 target_waitstatus pointer instead of a char pointer.
6232 * target.c (mywait): Change prototype to return an unsigned long.
6233 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6234 * server.h (thread_from_wait, old_thread_from_wait): Delete
6236 (prepare_resume_reply): Change prototype to take a
6238 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6239 (last_status, last_ptid): New.
6240 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6241 pid instead of a signal.
6242 (attach_inferior): Remove "status" and "signal" parameters.
6244 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6246 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6247 (handle_v_requests, myresume): Remove "status" and "signal"
6249 (handle_status): New.
6250 (main): Delete local `status'. Adjust.
6251 * remote-utils.c: Include target.h.
6252 (prepare_resume_reply): Change prototype to take a
6253 target_waitstatus. Adjust.
6255 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6257 * spu-low.c (spu_wait): Adjust.
6258 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6260 (win32_wait): Adjust.
6262 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6264 * target.h (struct thread_resume): Delete leave_stopped member.
6265 (struct target_ops): Add a `n' argument to the `resume' callback.
6266 * server.c (start_inferior): Adjust.
6267 (handle_v_cont, myresume): Adjust.
6268 * linux-low.c (check_removed_breakpoint): Adjust to resume
6269 interface change, and to removed leave_stopped field.
6270 (resume_ptr): Delete.
6271 (struct thread_resume_array): New.
6272 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6273 resume interface change.
6274 (linux_continue_one_thread, linux_queue_one_thread)
6275 (resume_status_pending_p): Check if the resume field is NULL
6276 instead of checking the leave_stopped member.
6277 (linux_resume): Adjust to the target resume interface change.
6278 * spu-low.c (spu_resume): Adjust to the target resume interface
6280 * win32-low.c (win32_detach, win32_resume): Ditto.
6282 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6284 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6286 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6288 (linux_continue_one_thread): Only preserve the stepping flag if
6289 there's a pending breakpoint.
6291 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6293 * server.c (main): After the inferior having exited, call
6294 remote_close before exiting gdbserver.
6296 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6298 Fix size of FPSCR in Power 7 processors.
6299 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6300 (PPC_FEATURE_HAS_DFP): New #define.
6301 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6304 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6306 * server.c (handle_query) Whitespace and formatting.
6308 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6310 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6311 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6312 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6313 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6314 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6315 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6316 Makefile.in, configure.ac: Fix whitespace throughout.
6317 * configure: Regenerate.
6319 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6321 * inferiors.c (find_inferior): Make it safe for the callback
6322 function to delete the currently iterated inferior.
6324 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6326 * Makefile.in (linuw_low_h): Move higher.
6327 (thread-db.o): Depend on $(linux_low_h).
6329 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6331 Rename "process" to "lwp" throughout.
6333 * linux-low.c (all_processes): Rename to...
6334 (all_lwps): ... this.
6335 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6336 (add_process): Rename to ...
6337 (add_lwp): ... this. Adjust.
6338 (linux_create_inferior): Adjust.
6339 (linux_attach_lwp): Adjust.
6340 (linux_attach): Adjust.
6341 (linux_kill_one_process): Rename to ...
6342 (linux_kill_one_lwp): ... this. Adjust.
6343 (linux_kill): Adjust.
6344 (linux_detach_one_process): Rename to ...
6345 (linux_detach_one_lwp): ... this. Adjust.
6346 (linux_detach): Adjust.
6347 (check_removed_breakpoint): Adjust.
6348 (status_pending_p): Adjust.
6349 (linux_wait_for_process): Rename to ...
6350 (linux_wait_for_lwp): ... this. Adjust.
6351 (linux_wait_for_event): Adjust.
6352 (send_sigstop): Adjust.
6353 (wait_for_sigstop): Adjust.
6354 (stop_all_processes): Rename to ...
6355 (stop_all_lwps): ... this.
6356 (linux_resume_one_process): Rename to ...
6357 (linux_resume_one_lwp): ... this. Adjust.
6358 (linux_set_resume_request, linux_continue_one_thread)
6359 (linux_queue_one_thread, resume_status_pending_p)
6360 (usr_store_inferior_registers, regsets_store_inferior_registers)
6361 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6363 * linux-low.h (get_process): Rename to ...
6364 (get_lwp): ... this. Adjust.
6365 (get_thread_process): Rename to ...
6366 (get_thread_lwp): ... this. Adjust.
6367 (get_process_thread): Rename to ...
6368 (get_lwp_thread): ... this. Adjust.
6369 (struct process_info): Rename to ...
6370 (struct lwp_info): ... this.
6371 (all_processes): Rename to ...
6372 (all_lwps): ... this.
6373 * proc-service.c (ps_lgetregs): Adjust.
6374 * thread-db.c (thread_db_create_event, find_one_thread)
6375 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6377 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6379 * server.c (handle_query): Handle "qAttached".
6381 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6383 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6384 GPLv3, update license URL.
6386 2009-03-01 Doug Evans <dje@google.com>
6388 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6389 (server_h): Add gdb_signals.h.
6390 (signals.o): Update.
6391 * server.h (target_signal_from_host,target_signal_to_host_p)
6392 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6394 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6396 * remote-utils.c (getpkt): Also generate remote-debug
6397 information if noack_mode is set.
6399 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6401 * server.c (handle_query): Report qXfer:siginfo:read and
6402 qXfer:siginfo:write as supported and handle them.
6403 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6404 * linux-low.c (linux_xfer_siginfo): New.
6405 (linux_target_ops): Set it.
6407 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6409 * server.c (gdbserver_usage): Mention --remote-debug.
6410 (main): Accept '--remote-debug' switch.
6412 2009-01-18 Doug Evans <dje@google.com>
6414 * regcache.c (new_register_cache): No need to check result of xcalloc.
6415 * server.c (handle_search_memory): Back out calls to xmalloc,
6416 result is checked and error is returned to user upon failure.
6417 (handle_query): Ditto. Add more checks for result of malloc.
6418 (handle_v_cont): Check result of malloc, report error back to
6420 (handle_v_run): Ditto. Call freeargv.
6421 * server.h (freeargv): Declare.
6422 * utils.c (freeargv): New fn.
6424 2009-01-15 Doug Evans <dje@google.com>
6426 * gdbreplay.c (perror_with_name): Make arg const char *.
6427 * server.h (target_signal_to_name): Make return type const char *.
6428 * thread-db.c (thread_db_err_str): Make return type const char *.
6429 * utils.c (perror_with_name): Make arg const char *.
6431 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6433 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6434 when handling a EXIT_PROCESS_DEBUG_EVENT.
6436 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6438 * gdbreplay.c (gdbreplay_version): Update copyright year.
6439 * server.c (gdbserver_version): Likewise.
6441 2009-01-05 Doug Evans <dje@google.com>
6443 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6444 (handle_extended_wait): Improve comment.
6446 2008-12-13 Doug Evans <dje@google.com>
6448 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6449 * server.h (ATTR_MALLOC): New macro.
6450 (xmalloc,xcalloc,xstrdup): Declare.
6451 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6452 * inferiors.c: Ditto.
6453 * linux-low.c: Ditto.
6454 * mem-break.c: Ditto.
6455 * regcache.c: Ditto.
6456 * remote-utils.c: Ditto.
6459 * win32-low.c: Ditto.
6461 2008-12-12 Doug Evans <dje@google.com>
6463 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6464 in debugging printf.
6466 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6468 2008-12-09 Doug Evans <dje@google.com>
6470 * linux-low.h (struct process_info): Delete member tid, unused.
6471 * thread-db.c (find_one_thread): Update.
6472 (maybe_attach_thread): Update.
6474 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6476 * target.h (struct target_ops): Add qxfer_osdata member.
6477 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6479 (linux_qxfer_osdata): New functions.
6480 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6482 * server.c (handle_query): Handle "qXfer:osdata:read:".
6483 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6484 (buffer_xml_printf): New functions.
6485 * server.h (struct buffer): New.
6486 (buffer_grow_str, buffer_grow_str0): New macros.
6487 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6488 (buffer_xml_printf): Declare.
6490 2008-11-24 Doug Evans <dje@google.com>
6492 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6494 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6496 * server.c (handle_v_run): Always use the supplied argument list.
6498 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6500 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6501 (xtensa_regmap_table): Add entry for scompare1.
6503 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6505 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6506 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6507 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6508 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6509 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6510 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6511 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6512 XML target descriptions.
6513 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6514 when inferior is running on an ISA 2.05 or later processor. Add
6515 special case to return offset for full 64-bit slot of FPSCR when
6518 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6520 * Makefile.in (SFILES, clean): Added sparc64 files.
6521 (reg-sparc64.o, reg-sparc64.c): New.
6522 * configure.srv (sparc*-*-linux*): New configuration.
6523 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6524 syscall arguments for SPARC.
6525 (regsets_store_inferior_registers): Likewise.
6526 * linux-sparc-low.c: New file.
6528 2008-10-21 Doug Evans <dje@google.com>
6530 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6531 (READLINE_DIR,READLINE_DEP): Delete.
6532 (INTERNAL_CFLAGS): Update.
6533 (LINTFLAGS): Update.
6535 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6537 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6538 whole argv from the last run, not just argv[0].
6540 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6542 * regcache.c (new_register_cache): Return NULL if the register
6543 cache size isn't known yet.
6544 (free_register_cache): Avoid dereferencing a NULL regcache.
6546 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6548 * configure.srv: Merge MIPS and MIPS64.
6550 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6552 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6554 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6556 * Makefile.in: Add required vsx dependencies.
6558 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6559 Declare init_registers_powerpc_vsx32l.
6560 Declare init_registers_powerpc_vsx64l.
6561 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6562 (ppc_arch_setup): Check for VSX in hwcap.
6563 (ppc_fill_vsxregset): New function.
6564 (ppc_store_vsxregset): New function.
6565 Add new VSX entry in regset_info target_regsets.
6567 * configure.srv: Add new VSX dependencies.
6569 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6571 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6572 (remote_open): Set or clear transport_is_reliable.
6573 (putpkt_binary): Don't expect acks in noack mode.
6574 (getpkt): Don't send ack/nac in noack mode.
6575 * server.c (handle_general_set): Handle QStartNoAckMode.
6576 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6578 (main): Reset noack_mode on every connection.
6579 * server.h (noack_mode): Declare.
6581 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6583 * Makefile.in (GDBREPLAY_OBS): New variable.
6584 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6586 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6587 Daniel Jacobowitz <dan@codesourcery.com>
6589 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6590 (usr_store_inferior_registers): Likewise.
6591 (regsets_store_inferior_registers): Likewise.
6593 2008-07-31 Rolf Jansen <rj@surtec.com>
6594 Pedro Alves <pedro@codesourcery.com>
6596 * configure.ac: Check for memmem declaration.
6597 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6598 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6599 (disable_packet_qfThreadInfo): Unconditionally compile.
6600 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6601 * configure, config.in: Regenerate.
6603 2008-07-28 Doug Kwan <dougkwan@google.com>
6605 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6606 (linux_write_memory): Remove declaration of errno.
6608 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6610 * linux-low.c (handle_extended_wait): Do not use "status"
6611 variable uninitialized.
6613 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6615 * server.c (handle_v_attach): Inhibit reporting dll changes.
6617 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6619 * remote-utils.c (prepare_resume_reply): If requested, don't
6620 output "thread:TID" in the T stop reply.
6622 * server.c (disable_packet_vCont, disable_packet_Tthread)
6623 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6624 (handle_query): If requested, disable support for qC, qfThreadInfo
6626 (handle_v_requests): If requested, disable support for vCont.
6627 (gdbserver_show_disableable): New.
6628 (main): Handle --disable-packet and --disable-packet=LIST.
6630 * server.h (disable_packet_vCont, disable_packet_Tthread)
6631 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6633 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6635 * server.c (gdbserver_usage): Mention --version.
6637 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6639 * Makefile.in (gdbreplay.o): New rule.
6641 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6643 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6644 message, not gdbserver.
6646 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6647 Nathan Sidwell <nathan@codesourcery.com>
6648 Joseph Myers <joseph@codesourcery.com>
6650 * acinclude.m4: Include ../../config/acx.m4.
6651 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6652 * configure, config.in: Regenerate.
6653 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6654 * server.c (gdbserver_version): Print PKGVERSION.
6655 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6656 (main): Adjust gdbserver_usage calls.
6657 * gdbreplay.c (version, host_name): Add declarations.
6658 (gdbreplay_version, gdbreplay_usage): New.
6659 (main): Accept --version and --help options.
6661 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6663 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6664 (arm_breakpoint_at): Handle Thumb.
6665 (the_low_target): Add comment.
6667 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6669 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6671 2008-05-09 Doug Evans <dje@google.com>
6673 * server.h (decode_search_memory_packet): Declare.
6674 * remote-utils.c (decode_search_memory_packet): New fn.
6675 * server.c (handle_search_memory_1): New fn.
6676 (handle_search_memory): New fn.
6677 (handle_query): Process qSearch:memory packets.
6679 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6681 * regcache.c (registers_length): Remove.
6682 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6683 full register packet.
6684 * regcache.h (registers_length): Remove prototype.
6685 * server.h (PBUFSIZ): Define to 16384.
6687 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6689 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6690 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6691 powerpc-64l.o, and powerpc-altivec64l.o.
6692 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6693 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6694 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6695 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6696 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6699 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6700 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6701 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6702 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6703 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6704 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6705 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6706 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6707 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6708 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6711 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6712 (init_registers_powerpc_32l): ... this new prototype.
6713 (init_registers_powerpc_32): Remove, replace by ...
6714 (init_registers_powerpc_altivec32l): ... this new prototype.
6715 (init_registers_powerpc_e500): Remove, replace by ...
6716 (init_registers_powerpc_e500l): ... this new prototype.
6717 (init_registers_ppc64): Remove, replace by ...
6718 (init_registers_powerpc_64l): ... this new prototype.
6719 (init_registers_powerpc_64): Remove, replace by ...
6720 (init_registers_powerpc_altivec64l): ... this new prototype.
6721 (ppc_num_regs): Set to 73.
6722 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6723 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6724 (ppc_cannot_store_register): Handle orig_r3 and trap.
6725 (ppc_arch_setup): Update init_registers_... calls.
6726 (ppc_fill_gregset): Handle orig_r3 and trap.
6728 * inferiors.c (clear_inferiors): Reset current_inferior.
6730 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6732 * acinclude.m4: Add override.m4.
6733 * configure: Regenerate.
6735 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6737 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6738 initial call to init_register_ppc64.
6740 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6742 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6743 single powerpc*-*-linux* case.
6744 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6746 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6748 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6749 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6751 * linux-ppc-low.c: Include <elf.h>.
6752 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6753 (ppc_hwcap): New global variable.
6754 (ppc_regmap): Remove __SPE__ #ifdef sections.
6755 (ppc_regmap_e500): New global variable.
6756 (ppc_cannot_store_register): Update __SPE__ special case.
6757 (ppc_get_hwcap): New function.
6758 (ppc_arch_setup): Use it to determine whether inferior supports
6759 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6760 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6761 Do not access registers if target does not support AltiVec.
6762 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6763 Do not access registers if target does not support SPE.
6764 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6766 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6768 * linux-low.c (disabled_regsets, num_regsets): New.
6769 (use_regsets_p): Delete.
6770 (linux_wait_for_process): Clear disabled_regsets.
6771 (regsets_fetch_inferior_registers): Check and set it.
6772 (regsets_store_inferior_registers): Likewise.
6773 (linux_fetch_registers, linux_store_registers): Do not use
6775 (initialize_low): Allocate disabled_regsets.
6777 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6779 * Makefile.in (LIBOBJS): New.
6781 (memmem.o): New rule.
6782 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6783 * configure: Regenerated.
6785 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6787 * server.c (handle_query): Never return "unsupported" for
6788 qXfer:features:read queries.
6790 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6792 * server.c (get_features_xml): Fix inverted condition.
6793 (handle_query): Always support qXfer:feature:read.
6795 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6797 * server.c (wrapper_argv): New.
6798 (start_inferior): Handle wrapper_argv. If set, expect an extra
6800 (gdbserver_usage): Document --wrapper.
6801 (main): Parse --wrapper.
6803 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6805 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6806 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6807 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6808 (ppc_set_pc): Likewise.
6809 (ppc_arch_setup): New function.
6810 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6811 of collect_register.
6812 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6814 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6816 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6817 instead of linux-ppc64-low.o.
6818 * linux-ppc64-low.c: Remove file.
6819 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6820 (linux-ppc64-low.o): Remove rule.
6822 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6823 (init_registers_powerpc_64): Likewise.
6824 (ppc_regmap): Conditionally define depending on __powerpc64__.
6825 (ppc_cannot_store_register): Do not special-case "fpscr" when
6826 compiled on __powerpc64__.
6827 (ppc_collect_ptrace_register): New function.
6828 (ppc_supply_ptrace_register): New function.
6829 (ppc_breakpoint): Change type to "unsigned int".
6830 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6831 (the_low_target): Conditionally provide initializers for the
6832 arch_setup member depending on __powerpc64__. Install
6833 collect_ptrace_register and supply_ptrace_register members.
6835 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6837 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6838 * server.c (gdbserver_xmltarget): Define.
6839 (get_features_xml): Use it to replace "target.xml" and arch_string.
6841 * configure.srv: Remove srv_xmltarget. Add XML files that were
6842 mentioned there to srv_xmlfiles instead. Remove conditional tests
6843 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6844 srv_xmlfiles and srv_regobj to include all possible choices.
6845 * configure.ac (srv_xmltarget): Remove.
6846 (srv_xmlfiles): Do not add "target.xml".
6847 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6848 checks for supplementary target information.
6849 * configure: Regenerate.
6850 * Makefile.in (XML_TARGET): Remove.
6851 (target.xml): Remove rule.
6852 (clean): Do not clean up target.xml.
6853 (.PRECIOUS): Do not mention target.xml.
6855 * target.h (struct target_ops): Remove arch_string member.
6856 * linux-low.c (linux_arch_string): Remove.
6857 (linux_target_ops): Remove arch_string initializer.
6858 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6859 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6860 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6861 * spu-low.c (spu_arch_string): Remove.
6862 (spu_target_ops): Remove arch_string initializer.
6863 * win32-low.c (win32_arch_string): Remove.
6864 (win32_target_ops): Remove arch_string initializer.
6865 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6866 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6867 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6869 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6871 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6872 by collect_ptrace_register and supply_ptrace_register hooks.
6873 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6874 instead of checking for the_low_target.left_pad_xfer.
6875 (usr_store_inferior_registers): Use collect_ptrace_register callback
6876 instead of checking for the_low_target.left_pad_xfer.
6878 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6879 (s390_supply_ptrace_register): Likewise.
6880 (s390_fill_gregset): Call s390_collect_ptrace_register.
6881 (the_low_target): Update.
6883 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6884 (ppc_supply_ptrace_register): Likewise.
6885 (the_low_target): Update.
6887 * linux-i386-low.c (the_low_target): Update.
6888 * linux-x86-64-low.c (the_low_target): Update.
6890 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6892 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6893 reg-s390.o and reg-s390x.o.
6895 * linux-low.c (new_inferior): New global variable.
6896 (linux_create_inferior, linux_attach): Set it.
6897 (linux_wait_for_process): Call the_low_target.arch_setup after the
6898 target has stopped for the first time.
6899 (initialize_low): Do not call the_low_target.arch_setup.
6901 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6902 (s390_set_pc): Likewise.
6903 (s390_arch_setup): New function.
6904 (the_low_target): Use s390_arch_setup as arch_setup routine.
6906 * regcache.c (realloc_register_cache): New function.
6907 (set_register_cache): Call it for each existing regcache.
6909 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6911 * server.h (init_registers): Remove prototype.
6913 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6914 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6915 instead of init_registers ().
6916 * linux-arm-low.c (init_registers_arm): Add prototype.
6917 (init_registers_arm_with_iwmmxt): Likewise.
6918 (the_low_target): Add initializer for arch_setup field.
6919 * linux-cris-low.c (init_registers_cris): Add prototype.
6920 (the_low_target): Add initializer for arch_setup field.
6921 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6922 (the_low_target): Add initializer for arch_setup field.
6923 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6924 (the_low_target): Add initializer for arch_setup field.
6925 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6926 (the_low_target): Add initializer for arch_setup field.
6927 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6928 (the_low_target): Add initializer for arch_setup field.
6929 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6930 (the_low_target): Add initializer for arch_setup field.
6931 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6932 (init_registers_mips64_linux): Likewise.
6933 (the_low_target): Add initializer for arch_setup field.
6934 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6935 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6936 (the_low_target): Add initializer for arch_setup field.
6937 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6938 (init_registers_powerpc_64): Likewise.
6939 (the_low_target): Add initializer for arch_setup field.
6940 * linux-s390-low.c (init_registers_s390): Add prototype.
6941 (init_registers_s390x): Likewise.
6942 (the_low_target): Add initializer for arch_setup field.
6943 * linux-sh-low.c (init_registers_sh): Add prototype.
6944 (the_low_target): Add initializer for arch_setup field.
6945 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6946 (the_low_target): Add initializer for arch_setup field.
6947 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6948 (the_low_target): Add initializer for arch_setup field.
6950 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6951 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6952 instead of init_registers ().
6953 * win32-arm-low.c (init_registers_arm): Add prototype.
6954 (the_low_target): Add initializer for arch_setup field.
6955 * win32-i386-low.c (init_registers_i386): Add prototype.
6956 (the_low_target): Add initializer for arch_setup field.
6958 * spu-low.c (init_registers_spu): Add prototype.
6959 (initialize_low): Call initialie_registers_spu () instead of
6960 initialize_registers ().
6962 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6964 * server.c (handle_v_requests): When handling the vRun and vAttach
6965 packets, if already debugging a process, don't kill it. Return an
6968 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6970 * server.c (handle_query): Correct length check.
6972 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6974 * win32-low.c (do_initial_child_stuff): Add process handle
6975 parameter. Set current_process_handle and current_process_id from the
6976 parameters. Clear globals.
6977 (win32_create_inferior): Don't set current_process_handle and
6978 current_process_id here. Instead pass them on the call to
6979 do_initial_child_stuff.
6980 (win32_attach): Likewise.
6981 (win32_clear_inferiors): New.
6982 (win32_kill): Don't close the current process handle or the
6983 current thread handle here. Instead call win32_clear_inferiors.
6984 (win32_detach): Don't open a new handle to the process. Call
6985 win32_clear_inferiors.
6986 (win32_join): Don't rely on current_process_handle; open a new
6987 handle using the process id.
6988 (win32_wait): Call win32_clear_inferiors when the inferior process
6991 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6993 * server.c (monitor_show_help): Add "exit".
6995 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6997 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6998 (clean): Add reg-xtensa.c.
6999 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
7000 * configure.srv (xtensa*-*-linux*) New target.
7001 * linux-xtensa-low.c: New.
7002 * xtensa-xtregs.c: New.
7004 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7006 * hostio.c: Don't include errno.h.
7007 (errno_to_fileio_errno): Move to hostio-errno.
7008 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7009 error number outputting to the target->hostio_last_error callback.
7010 (hostio_packet_error): Use FILEIO_EINVAL directly.
7011 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7012 calls to hostio_error.
7013 * hostio-errno.c: New.
7014 * server.h (hostio_last_error_from_errno): Declare.
7015 * target.h (target_ops): Add hostio_last_error member.
7016 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7017 as hostio_last_error handler.
7018 * spu-low.c (spu_target_ops): Likewise.
7019 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7020 (wince_hostio_last_error): New functions.
7021 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7022 as hostio_last_error handler.
7023 (win32_target_ops) [!_WIN32_WCE]: Register
7024 hostio_last_error_from_errno as hostio_last_error handler.
7025 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7026 (hostio-errno.o): New rule.
7027 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7028 * configure.srv (srv_hostio_err_objs): New variable. Default to
7030 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7031 * configure: Regenerate.
7033 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7035 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7036 (linux_kill, linux_detach): Clean up the process list.
7037 * remote-utils.c (remote_open): Improve port number parsing.
7038 (putpkt_binary, input_interrupt): Only send interrupts if the target
7040 * server.c (extended_protocol): Make static.
7041 (attached): Define earlier.
7042 (exit_requested, response_needed, program_argv): New variables.
7043 (target_running): New.
7044 (start_inferior): Clear attached here.
7045 (attach_inferior): Set attached here.
7046 (require_running): Define.
7047 (handle_query): Use require_running and target_running. Implement
7049 (handle_v_attach, handle_v_run): New.
7050 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7051 (gdbserver_usage): Update.
7052 (main): Redo argument parsing. Handle --debug and --multi. Handle
7053 --attach along with other options or after the port. Save
7054 program_argv. Support no initial program. Resynchronize
7055 communication with GDB after an error. Handle "monitor exit".
7056 Use require_running and target_running. Always allow the extended
7057 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7058 restart in extended mode.
7059 * README: Refer to the GDB manual. Update --attach usage.
7061 2007-12-20 Andreas Schwab <schwab@suse.de>
7063 * linux-low.c (STACK_SIZE): Define.
7064 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7065 (linux_test_for_tracefork): Likewise.
7067 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7069 * linux-low.c (linux_wait_for_event): Update messages. Do not
7070 reinsert auto-delete breakpoints.
7071 * mem-break.c (struct breakpoint): Change return type of handler to
7073 (set_breakpoint_at): Update handler type.
7074 (reinsert_breakpoint_handler): Return 1 instead of calling
7076 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7078 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7079 * mem-break.h (set_breakpoint_at): Update handler type.
7080 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7081 * win32-low.c (auto_delete_breakpoint): New.
7082 (get_child_debug_event): Use it.
7084 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7086 * configure.ac: Check for pread and pwrite.
7087 * hostio.c (handle_pread): Fall back to lseek and read.
7088 (handle_pwrite): Fall back to lseek and write.
7089 * config.in, configure: Regenerated.
7091 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7093 * server.c (myresume): Add own_buf argument.
7094 (main): Update calls.
7096 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7098 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7099 * remote-utils.c (remote_open): Do not call disable_async_io.
7100 (block_async_io): Delete.
7101 (unblock_async_io): Make static.
7102 (initialize_async_io): New.
7103 * server.c (handle_v_cont): Handle async I/O here.
7104 (myresume): Likewise. Move other common resume tasks here...
7105 (main): ... from here. Call initialize_async_io. Disable async
7106 I/O before the main loop.
7107 * server.h (initialize_async_io): Declare.
7108 (block_async_io, unblock_async_io): Delete prototypes.
7109 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7111 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7113 * remote-utils.c (readchar): Allow binary data in received messages.
7115 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7117 * win32-low.c (attaching): New global.
7118 (win32_create_inferior): Clear the `attaching' global.
7119 (win32_attach): Set the `attaching' global.
7120 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7121 attaching. Only set a breakpoint at the entry point if not
7124 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7126 * server.c (main): Don't report dll events on the initial
7127 connection on attaches.
7129 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7131 * server.c (main): Relax numerical bases supported for the pid of
7132 the --attach command line argument.
7134 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7136 * win32-low.c (win32_attach): Call OpenProcess before
7137 DebugActiveProcess, not after. Add last error output to error
7140 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7142 * win32-low.c (win32_get_thread_context)
7143 (win32_set_thread_context): New functions.
7144 (thread_rec): Use win32_get_thread_context.
7145 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7146 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7149 2007-12-03 Leo Zayas
7150 Pedro Alves <pedro_alves@portugalmail.pt>
7152 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7154 (child_add_thread): Minor cleanup.
7155 (child_continue): Resume artificially suspended threads before
7156 calling ContinueDebugEvent.
7157 (suspend_one_thread): New.
7158 (fake_breakpoint_event): New.
7159 (get_child_debug_event): Change return type to int. Check here if
7160 gdb sent an interrupt request. If a soft interrupt was requested,
7161 fake a breakpoint event. Return 0 if there is no event to handle,
7163 (win32_wait): Don't check here if gdb sent an interrupt request.
7164 Ensure there is a valid event to handle.
7165 (win32_request_interrupt): Add soft interruption method as last
7168 2007-12-03 Leo Zayas
7169 Pedro Alves <pedro_alves@portugalmail.pt>
7171 * win32-low.h (win32_thread_info): Add descriptions to the
7172 structure members. Replace `suspend_count' counter by a
7174 * win32-low.c (thread_rec): Update condition of when to get the
7175 context from the inferior. Rely on ContextFlags being set if it
7176 has already been retrieved. Only suspend the inferior thread if
7177 we haven't already. Warn if that fails.
7178 (continue_one_thread): s/suspend_count/suspended/. Only call
7179 ResumeThread once. Warn if that fails.
7181 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7183 * win32-low.c (win32_wait): Don't read from the inferior when it
7186 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7188 * Makefile.in (win32_low_h): New variable.
7189 (win32-low.o): Add dependency on $(win32_low_h).
7190 (win32-arm-low.o, win32-i386-low.o): New rules.
7192 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7194 * hostio.c: Correct copyright year.
7196 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7198 * Makefile.in (OBS): Add hostio.o.
7199 (hostio.o): New rule.
7200 * server.h (handle_vFile): Declare.
7201 * hostio.c: New file.
7202 * server.c (handle_v_requests): Take packet_len and new_packet_len
7203 for binary packets. Call handle_vFile.
7204 (main): Update call to handle_v_requests.
7206 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7208 * linux-low.c: Include <sched.h>.
7210 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7212 * linux-low.c (linux_tracefork_grandchild): New.
7213 (linux_tracefork_child): Use clone.
7214 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7216 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7218 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7220 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7222 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7224 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7226 * inferiors.c (change_inferior_id): Delete.
7227 (add_pid_to_list, pull_pid_from_list): New.
7228 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7229 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7230 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7231 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7232 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7233 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7234 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7235 (using_threads): Always set to 1.
7236 (handle_extended_wait): New.
7237 (add_process): Do not set TID.
7238 (linux_create_inferior): Set must_set_ptrace_flags.
7239 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7240 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7241 (linux_thread_alive): Rename TID argument to LWPID.
7242 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7243 (linux_wait_for_event): Do not use TID or check using_threads. Update
7244 call to dead_thread_notify. Call handle_extended_wait.
7245 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7246 (send_sigstop): Delete sigstop_sent.
7247 (wait_for_sigstop): Avoid TID.
7248 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7249 (linux_test_for_tracefork): New.
7250 (linux_lookup_signals): Use thread_db_active and
7251 linux_supports_tracefork_flag.
7252 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7253 * linux-low.h (get_process_thread): Avoid TID.
7254 (struct process_ifo): Move thread_known and tid to the end. Remove
7256 (linux_attach_lwp, thread_db_init): Update prototypes.
7257 * server.h (change_inferior_id): Delete prototype.
7258 (add_pid_to_list, pull_pid_from_list): New prototypes.
7259 * thread-db.c (thread_db_use_events): New.
7260 (find_first_thread): Rename to...
7261 (find_one_thread): ...this. Update callers and messages. Do not
7262 call fatal. Check thread_db_use_events. Do not call
7263 change_inferior_id or new_thread_notify.
7264 (maybe_attach_thread): Update. Do not call new_thread_notify.
7265 (thread_db_init): Set thread_db_use_events. Check use_events.
7266 * utils.c (fatal, warning): Correct message prefix.
7268 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7270 * Makefile.in (clean): Remove new files.
7271 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7272 (powerpc-64.o, powerpc-64.c): New rules.
7273 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7274 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7276 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7278 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7280 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7281 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7282 (target_regsets): Add AltiVec and SPE register sets.
7283 * configure.ac: Check for AltiVec and SPE.
7284 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7285 (ppc_fill_vrregset, ppc_store_vrregset): New.
7286 (target_regsets): Add AltiVec register set.
7287 * configure: Regenerated.
7289 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7291 * linux-low.c (O_LARGEFILE): Define.
7292 (linux_read_memory): Use /proc/PID/mem.
7293 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7294 * configure, config.in: Regenerated.
7296 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7298 * linux-low.c (linux_wait_for_event): Do not pass signals while
7301 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7303 * win32-low.c (create_process): New.
7304 (win32_create_inferior): Use create_process instead of
7305 CreateProcess. If create_process failed retry appending an ".exe"
7306 suffix. Store the GetLastError result immediatelly after
7307 create_process calls and use it on the call to error.
7309 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7311 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7313 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7315 * configure.ac: Switch license to GPLv3.
7317 2007-08-01 Michael Snyder <msnyder@access-company.com>
7319 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7321 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7323 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7325 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7326 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7327 CloseToolhelp32Snapshot.
7328 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7329 CloseToolhelp32Snapshot.
7331 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7333 * server.c (main): Check for inferior exit before main loop.
7335 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7337 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7338 instead of on tmp_desc.
7340 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7341 Daniel Jacobowitz <dan@codesourcery.com>
7343 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7344 (add_thread): Minor cleanups.
7345 (clear_inferiors): Move lower in the file. Clear the DLL
7347 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7348 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7349 (xml_escape_text): New.
7350 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7352 (handle_v_cont): Report errors.
7353 (gdbserver_version): Update.
7354 (main): Correct size of own_buf. Do not report initial DLL events.
7355 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7356 (unloaded_dll, xml_escape_text): New.
7357 * win32-low.c (enum target_waitkind): Update comments.
7358 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7359 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7360 (win32_EnumProcessModules, win32_GetModuleInformation)
7361 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7362 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7363 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7364 (win32_Module32First, win32_Module32Next, load_toolhelp)
7365 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7366 (get_child_debug_event): Handle DLL events.
7367 (win32_wait): Likewise.
7369 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7371 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7372 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7374 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7376 * win32-low.c (handle_output_debug_string): Ignore event if not
7379 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7381 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7383 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7385 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7387 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7389 * inferiors.c (change_inferior_id): Add comment.
7390 * linux-low.c (check_removed_breakpoint): Add an early
7391 prototype. Improve debug output.
7392 (linux_attach): Doc update.
7393 (linux_detach_one_process, linux_detach): Clean up before releasing
7395 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7396 * linux-low.h (struct process_info): Doc improvement.
7397 * mem-break.c (delete_all_breakpoints): New.
7398 * mem-break.h (delete_all_breakpoints): New prototype.
7399 * thread-db.c (find_first_thread): New.
7400 (thread_db_create_event): Call it instead of
7401 thread_db_find_new_threads. Clean up unused variables.
7402 (maybe_attach_thread): Remove first thread handling.
7403 (thread_db_find_new_threads): Use find_first_thread.
7404 (thread_db_get_tls_address): Likewise.
7406 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7408 * thread-db.c (thread_db_find_new_threads): Add prototype.
7409 (thread_db_create_event): Check for the main thread before adding
7411 (maybe_attach_thread): Only enable event reporting if TID == 0.
7412 (thread_db_get_tls_address): Check for new threads.
7414 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7416 * linux-low.c (linux_create_inferior): Try execv before execvp.
7417 * spu-low.c (spu_create_inferior): Likewise.
7419 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7421 * linux-low.c (linux_create_inferior): Change execv to execvp.
7422 * spu-low.c (spu_create_inferior): Likewies.
7424 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7426 * Makefile.in (clean): Clean new files instead of deleted ones.
7427 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7428 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7430 * configure.srv: Specify XML files and new regformats for MIPS and
7432 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7433 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7434 an entry for the restart register.
7435 (mips_cannot_fetch_register, mips_cannot_store_register)
7436 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7437 register names to match the XML descriptions.
7438 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7439 restart register instead of $0.
7441 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7442 Markus Deuling <deuling@de.ibm.com>
7444 * remote-utils.c (decode_xfer_write): New function.
7445 * server.h (decode_xfer_write): Add prototype.
7446 * server.c (handle_query): Add PACKET_LEN argument. Support
7447 qXfer:spu:read and qXfer:spu:write packets.
7448 (main): Pass packet_len to handle_query.
7449 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7450 * target.h (target_ops): Add qxfer_spu.
7452 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7454 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7455 accessing non-seekable spufs files.
7457 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7459 * server.c (handle_query): Add reply for qC packet.
7461 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7462 Leo Zayas <lerele@champenstudios@com>
7464 * server.h (check_remote_input_interrupt_request): New function.
7465 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7466 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7467 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7468 (check_remote_input_interrupt_request): New function.
7469 * server.h (check_remote_input_interrupt_request): Declare.
7470 * win32-low.c (winapi_DebugBreakProcess,
7471 winapi_GenerateConsoleCtrlEvent): New typedefs.
7472 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7474 (win32_wait): Check for remote interrupt request
7475 with check_remote_input_interrupt_request.
7476 (win32_request_interrupt): New function.
7477 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7481 * win32-low.c (debug_registers_changed,
7482 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7483 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7484 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7485 (thread_rec): Get context using the low target.
7486 (child_add_thread): Call thread_added on the low target,
7487 which does the same thing.
7489 (do_initial_child_stuff): Remove debug registers references.
7490 Set context using the low target. Resume threads after
7491 setting the contexts.
7492 (child_continue): Remove dead variable. Remove debug
7493 registers references.
7494 (child_fetch_inferior_registers): Go through the low target.
7495 (do_child_store_inferior_registers): Remove.
7496 (child_store_inferior_registers): Go through the low target.
7497 (win32_resume): Remove debug registers references.
7498 Set context using the low target.
7499 (handle_exception): Change return type to void. Don't record
7500 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7501 first chance exception.
7502 (get_child_debug_event): Change return type to void. Remove
7503 goto loop. Always return after waiting for debug event.
7504 (win32_wait): Convert to switch statement. Handle spurious
7507 * win32-i386-low.c (debug_registers_changed,
7508 debug_registers_used): New.
7509 (initial_stuff): Rename to ...
7510 (i386_initial_stuff): ... this. Clear debug registers
7512 (store_debug_registers): Delete.
7513 (i386_get_thread_context): New.
7514 (load_debug_registers): Delete.
7515 (i386_set_thread_context): New.
7516 (i386_thread_added): New.
7517 (single_step): Rename to ...
7518 (i386_single_step): ... this.
7519 (do_fetch_inferior_registers): Rename to ...
7520 (i386_fetch_inferior_register): ... this.
7521 (i386_store_inferior_register): New.
7522 (the_low_target): Adapt to new interface.
7524 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7525 (arm_get_thread_context): New.
7526 (arm_set_thread_context): New.
7528 (do_fetch_inferior_registers): Rename to ...
7529 (arm_fetch_inferior_register): ... this.
7530 (arm_store_inferior_register): New.
7531 (arm_wince_breakpoint): Reimplement as unsigned long.
7532 (arm_wince_breakpoint_len): Define.
7533 (the_low_target): Adapt to new interface.
7535 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7536 load_debug_registers. Add get_thread_context, set_thread_context,
7537 thread_added and store_inferior_register. Rename
7538 fetch_inferior_registers to fetch_inferior_register.
7539 (regptr): Remove declaration.
7541 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7543 * linux-low.c (linux_detach): Change return type to int. Return 0.
7544 * spu-low.c (spu_detach): Likewise.
7546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7548 * target.h (target_ops): Change return type of detach to int.
7550 (join_inferior): New.
7551 * server.c (main): Don't skip detach support on mingw32.
7552 If the inferior doesn't support detaching return error.
7553 Call join_inferior instead of using waitpid.
7554 * linux-low.c (linux_join): New.
7555 (linux_target_op): Add linux_join.
7556 * spu-low.c (spu_join): New.
7557 (spu_target_ops): Add spu_join.
7558 * win32-low.c (win32_detach): Adapt to new interface.
7559 Reopen current_process_handle before detaching. Issue a child
7560 resume before detaching.
7562 (win32_target_op): Add win32_join.
7564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7566 * win32-low.c (win32-attach): Fix return value.
7567 * target.h (target_ops): Describe ATTACH return values.
7569 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7571 * win32-low.c (GETPROCADDRESS): Define.
7572 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7573 (winapi_DebugSetProcessKillOnExit): Likewise.
7574 (win32_create_inferior): Force usage of ansi CreateProcessA.
7575 (win32_attach): Use GETPROCADDRESS.
7576 (win32_detach): Likewise.
7578 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7580 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7582 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7584 * win32-low.c: Commit leftover changes from 2007-03-29.
7586 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7588 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7589 fields short instead of int. Add explicit padding.
7590 (i387_cache_to_fsave): Remove unnecessary casts.
7591 (i387_fsave_to_cache): Doc fix.
7592 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7594 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7596 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7597 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7599 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7601 * configure.srv (arm*-*-mingw32ce*): Move near the other
7604 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7606 * configure.ac: Add errno checking.
7607 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7608 sys/file.h and malloc.h.
7609 (AC_CHECK_DECLS): Add perror.
7610 (srv_mingwce): Handle.
7611 * configure.srv (i[34567]86-*-cygwin*): Add
7612 win32-i386-low.o to srv_tgtobj.
7613 (i[34567]86-*-mingw*): Likewise.
7614 (arm*-*-mingw32ce*): Add case.
7615 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7616 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7617 [__MINGW32CE__] (strerror): New function.
7618 [__MINGW32CE__] (errno): Define to GetLastError.
7619 [__MINGW32CE__] (COUNTOF): New macro.
7620 (remote_open): Remove extra close call.
7621 * mem-break.c (delete_breakpoint_at): New function.
7622 * mem-break.h (delete_breakpoint_at): Declare.
7623 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7624 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7625 [USE_WIN32API] (read, write): Add char* casts.
7626 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7627 * server.h: Include wincecompat.h on Windows CE.
7628 [HAVE_ERRNO_H]: Check.
7629 (perror): Declare if not declared.
7630 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7631 (perror_with_name): Remove errno declaration.
7632 * wincecompat.h: New.
7633 * wincecompat.c: New.
7635 * win32-arm-low.c: New.
7636 * win32-i386-low.c: New.
7637 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7638 (OUTMSG2): Make it safe.
7640 (COUNTOF): New macro.
7641 (NUM_REGS): Get it from the low target.
7642 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7643 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7644 (thread_rec): Let low target handle debug registers.
7645 (child_add_thread): Likewise.
7646 (child_init_thread_list): Likewise.
7647 (continue_one_thread): Likewise.
7649 (do_child_fetch_inferior_registers): Move to ...
7650 * win32-i386-low.c: ... here, and rename to ...
7651 (do_fetch_inferior_registers): ... this.
7652 * win32-low.c (child_fetch_inferior_registers):
7653 Go through the low target.
7654 (do_child_store_inferior_registers): Use regptr.
7655 (strwinerror): New function.
7656 (win32_create_inferior): Handle Windows CE.
7657 Use strwinerror instead of strerror on Windows error
7658 codes. Add program to the error output.
7659 Don't close the main thread handle on Windows CE.
7660 (win32_attach): Use coredll.dll on Windows CE.
7661 (win32_kill): Close current process and current
7663 (win32_detach): Use coredll.dll on Windows CE.
7664 (win32_resume): Let low target handle debug registers, and
7666 (handle_exception): Add/Remove initial breakpoint. Avoid
7667 non-existant WSTOPSIG on Windows CE.
7668 (win32_read_inferior_memory): Cast to remove warning.
7669 (win32_arch_string): Go through the low target.
7670 (initialize_low): Call set_breakpoint_data with the low
7671 target's breakpoint.
7672 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7673 FOP_REGNUM, mappings): Move to ...
7674 * win32-i386-low.c: ... here.
7675 * win32-low.c (win32_thread_info): Move to ...
7676 * win32-low.h: ... here.
7677 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7678 win32-arm-low.c and wincecompat.c.
7679 (all:): Add $EXEEXT.
7680 (install-only:): Likewise.
7681 (gdbserver:): Likewise.
7682 (gdbreplay:): Likewise.
7683 * config.in: Regenerate.
7684 * configure: Regenerate.
7686 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7688 * win32-low.c: Rename typedef thread_info to
7689 win32_thread_info throughout.
7691 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7693 * win32-i386-low.c: Rename to ...
7694 * win32-low.c: ... this.
7695 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7696 * Makefile.in: Likewise.
7698 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7700 * remote-utils.c (monitor_output): Constify msg parameter.
7701 * server.h (monitor_output): Likewise.
7702 * win32-i386-low.c (handle_output_debug_string): New.
7703 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7704 handle_output_debug_string.
7705 (get_child_debug_event): Likewise.
7707 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7709 * server.c (main): Correct strtoul check.
7711 2007-03-27 Jon Ringle <jon@ringle.org>
7713 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7715 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7717 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7719 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7721 * terminal.h: Check HAVE_SGTTY_H.
7723 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7725 * remote-utils.c (remote_open): Print out the assigned port number.
7727 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7729 * remote-utils.c (monitor_output): New function.
7730 * server.c (debug_threads): Define here.
7731 (monitor_show_help): New function.
7732 (handle_query): Handle qRcmd.
7733 (main): Do not handle 'd' packet.
7734 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7735 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7738 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7740 * Makefile.in (EXEEXT): New.
7741 (clean): Use $(EXEEXT).
7743 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7745 * target.h (target_ops): Rename send_signal to request_interrupt,
7746 and remove enum target_signal parameter.
7747 * linux-low.c (linux_request_interrupt): Rename from
7748 linux_send_signal, and always send SIGINT.
7749 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7750 and always send SIGINT.
7751 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7753 (input_interrupt): Likewise.
7755 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7757 * server.c (get_features_xml): Check if target implemented
7759 * win32-i386-low.c (win32_arch_string): New.
7760 (win32_target_ops): Add win32_arch_string as arch_string member.
7762 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7764 * spu-low.c (spu_arch_string): New.
7765 (spu_target_ops): Add spu_arch_string.
7767 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7769 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7770 * configure.ac: Do not check for terminal.h.
7771 * configure, config.in: Regenerated.
7773 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7775 * Makefile.in (OBS): Add $(XML_BUILTIN).
7776 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7778 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7779 (arm-with-iwmmxt.c): New.
7780 * config.in, configure: Regenerate.
7781 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7782 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7783 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7784 (arm*-*-linux*): Add iWMMXt and regset support.
7785 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7786 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7787 (arm_store_wmmxregset, target_regsets): New.
7788 * server.c (get_features_xml): Take annex argument. Check builtin
7790 (handle_query): Handle multiple annexes.
7792 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7794 * remote-utils.c [USE_WIN32API] (read, write): Define.
7795 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7798 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7800 * linux-i386-low.c (the_low_target): Set arch_string.
7801 * linux-x86-64-low.c (the_low_target): Likewise.
7802 * linux-low.c (linux_arch_string): New.
7803 (linux_target_ops): Add it.
7804 * linux-low.h (struct linux_target_ops): Add arch_string.
7805 * server.c (write_qxfer_response): Use const void * for DATA.
7806 (get_features_xml): New.
7807 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7808 * target.h (struct target_ops): Add arch_string method.
7810 2007-01-03 Denis Pilat <denis.pilat@st.com>
7811 Daniel Jacobowitz <dan@codesourcery.com>
7813 * linux-low.c (linux_kill): Handle being called with no threads.
7814 * win32-i386-low.c (win32_kill): Likewise.
7815 (get_child_debug_event): Clear current_process_handle.
7817 2006-12-30 Denis PILAT <denis.pilat@st.com>
7818 Daniel Jacobowitz <dan@codesourcery.com>
7820 * remote-utils.c (remote_open): Check the type of specified
7821 serial port devices before opening them.
7822 * server.c (main): Kill the inferior if an error occurs during
7823 the first remote_open.
7825 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7827 * README: Update supported targets.
7829 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7831 * Makefile.in (clean): Remove reg-mips64.c.
7832 (reg-mips64.c, reg-mips64.o): New rules.
7833 * configure.srv: Handle mips64. Include regset support for mips.
7834 * linux-mips-low.c (union mips_register): New.
7835 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7836 (mips_breakpoint, mips_breakpoint_at): Use int.
7837 (mips_collect_register, mips_supply_register)
7838 (mips_collect_register_32bit, mips_supply_register_32bit)
7839 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7840 (mips_store_fpregset, target_regsets): New.
7841 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7843 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7845 * configure.srv: Add target "spu*-*-*".
7846 * Makefile.in (clean): Remove reg-spu.c.
7847 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7848 * spu-low.c: New file.
7850 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7852 * configure.ac: Correct td_thr_tls_get_addr test.
7853 * configure: Regenerated.
7855 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7857 * linux-low.c (linux_wait_for_event): Reformat. Use the
7859 * remote-utils.c (decode_address_to_semicolon): New.
7860 * server.c (pass_signals, handle_general_set): New.
7861 (handle_query): Mention QPassSignals for qSupported.
7862 (main): Call handle_general_set.
7863 * server.h (pass_signals, decode_address_to_semicolon): New.
7865 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7867 * server.c (handle_query): Correct error handling for read_auxv.
7869 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7871 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7872 and srv_linux_thread_db to yes.
7873 * linux-s390-low.c (s390_fill_gregset): New function.
7874 (target_regsets): Define data structure.
7876 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7878 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7879 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7880 * config.in, configure: Regenerated.
7881 * inferiors.c (gdb_id_to_thread): New function.
7882 (gdb_id_to_thread_id): Use it.
7883 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7884 * linux-low.h (struct process_info): Add th member.
7885 (thread_db_get_tls_address): New prototype.
7886 * remote-utils.c (decode_address): Make non-static.
7887 * server.c (handle_query): Handle qGetTLSAddr.
7888 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7889 * target.h (struct target_ops): Add get_tls_address.
7890 * thread-db.c (maybe_attach_thread): Save the thread handle.
7891 (thread_db_get_tls_address): New.
7893 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7895 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7896 (linux_resume_one_process): Take a siginfo_t *. Update all
7897 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7898 (struct pending_signals): Add a siginfo_t.
7899 (linux_wait_for_process): Always set last_status.
7900 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7901 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7902 * linux-low.h (struct process_info): Add last_status.
7904 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7906 * remote-utils.c (try_rle): New function.
7907 (putpkt_binary): Use it.
7909 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7911 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7912 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7913 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7914 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7915 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7918 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7920 * server.c (terminal_fd): New variable.
7921 (old_foreground_pgrp): Likewise.
7922 (restore_old_foreground_pgrp): New function.
7923 (start_inferior): Record the terminal file descriptor in terminal_fd
7924 and its original foreground group in old_foreground_pgrp. Register
7925 restore_old_foreground_pgrp with atexit().
7927 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7929 * server.c (handle_query): Correct qPart to qXfer.
7931 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7933 * configure.ac: Check for more headers which are missing on
7934 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7935 * configure.srv: Add Cygwin and mingw32.
7936 * remote-utils.c: Don't include headers unconditionally which
7937 are missing on mingw32. Include <winsock.h> for mingw32.
7938 (remote_open): Adjust for mingw32 support. Flush
7939 standard error after writing to it.
7940 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7941 (unblock_async_io, enable_async_io, disable_async_io)
7942 (readchar, getpkt): Update for Winsock support.
7943 (prepare_resume_reply): Expect a protocol signal number.
7944 * server.c: Disable <sys/wait.h> on mingw32.
7945 (start_inferior): Adjust for mingw32 support. Flush
7946 standard error after writing to it.
7947 (attach_inferior): Likewise. Use protocol signal
7949 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7951 * win32-i386-low.c: New file.
7952 * Makefile.in (XM_CLIBS): Set.
7953 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7954 (win32-i386-low.o): New dependency rule.
7955 * linux-low.c (linux_wait): Use target signal numbers.
7956 * target.h (struct target_ops): Doc fix.
7957 * server.h (target_signal_to_name): New prototype.
7958 * gdbreplay.c: Don't include headers unconditionally which
7959 are missing on mingw32. Include <winsock.h> for mingw32.
7960 (remote_close, remote_open): Adjust for Winsock support.
7961 * configure, config.in: Regenerated.
7963 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7965 * server.c (decode_xfer_read, write_qxfer_response): New.
7966 (handle_query): Take a packet length argument. Handle
7967 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7968 the qSupported response.
7969 (main): Update call to handle_query.
7971 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7973 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7974 (putpkt_binary): Renamed from putpkt and adjusted for binary
7976 (putpkt): New wrapper for putpkt_binary.
7977 (readchar): Don't mask off the high bit.
7978 (decode_X_packet): New function.
7979 * server.c (main): Call putpkt_binary if a handler sets the packet
7980 length. Save the length of the incoming packet. Handle 'X'.
7981 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7983 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7985 * server.c (handle_query): Handle qSupported.
7987 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7989 * remote-utils.c (all_symbols_looked_up): New variable.
7990 (look_up_one_symbol): Check it.
7991 * server.h (look_up_one_symbol): New declaration.
7992 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7994 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7996 * Makefile.in (linux-arm-low.o): Update dependencies.
7997 * linux-arm-low.c: Include "gdb_proc_service.h".
7998 (PTRACE_GET_THREAD_AREA): Define.
7999 (ps_get_thread_area): New function.
8001 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8003 * configure.srv (m68k*-*-uclinux*): New target.
8004 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8005 (linux_resume_one_process): Remove extraneous cast.
8006 (linux_read_offsets): New.
8007 (linux_target_op): Add linux_read_offsets on mmuless systems.
8008 * server.c (handle_query): Add qOffsets logic.
8009 * target.h (struct target_ops): Add read_offsets.
8011 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8013 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8014 (PTRACE_GET_THREAD_AREA): Define.
8015 (ps_get_thread_area): New function.
8016 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8017 (linux-x86-64-low.o): Update.
8019 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8021 * configure.ac: Remove checks for prfpregset_t.
8022 * gdb_proc_service.h: New file.
8023 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8024 new "gdb_proc_service.h".
8025 * proc-service.c: Likewise.
8026 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8027 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8028 * Makefile.in (gdb_proc_service_h): Updated.
8029 * configure, config.in: Regenerated.
8031 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8033 * remote-utils.c (prepare_resume_reply): Move declaration
8034 of gdb_id_from_wait to the top of the block.
8036 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8038 * linux-low.c (regsets_store_inferior_registers): Read the regset
8039 from the target before filling it.
8041 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8043 * server.c (attach_inferior): Return SIGTRAP for a successful
8046 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8048 * Makefile.in (OBS): Add version.o.
8049 (STAGESTUFF): Delete.
8050 (version.o): Add dependencies.
8051 (version.c): Replace rule.
8052 (clean): Remove version.c.
8053 * server.c (gdbserver_version): New.
8054 (gdbserver_usage): Use printf.
8055 (main): Handle --version and --help.
8056 * server.h (version, host_name): Add declarations.
8058 2005-12-23 Eli Zaretskii <eliz@gnu.org>
8070 * linux-x86-64-low.c:
8073 * linux-ppc64-low.c:
8082 * linux-crisv32-low.c:
8094 * gdbserver.1: Add (C) after Copyright. Update the FSF
8097 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8099 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8100 (arm_breakpoint_at): Recognize both breakpoints.
8101 (the_low_target): Use the correct breakpoint instruction.
8103 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8105 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8106 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8107 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8108 (the_low_target): Update.
8110 2005-10-25 Andreas Schwab <schwab@suse.de>
8112 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8114 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8115 (ia64_num_regs): Reduce to 462.
8117 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8119 * acinclude.m4: Correct quoting.
8120 * aclocal.m4: Regenerated.
8122 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8123 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8124 (thread_db_init): Call thread_db_err_str.
8125 * configure.ac: Check for TD_VERSION.
8126 * config.in, configure: Regenerated.
8128 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8130 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8132 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8134 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8135 is not available. Define HAVE_PTRACE_GETREGS if it is.
8136 * config.in, configure: Regenerated.
8137 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8138 * linux-i386-low.c, linux-m68k-low.c: Update to use
8139 HAVE_PTRACE_GETREGS.
8140 * linux-low.c (regsets_fetch_inferior_registers)
8141 (regsets_store_inferior_registers): Only return 0 if we processed
8143 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8144 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8146 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8148 * inferiors.c (struct thread_info): Add gdb_id.
8149 (add_thread): Add gdb_id argument.
8150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8151 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8152 calls to add_thread.
8153 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8154 * server.c (handle_query): Use thread_to_gdb_id.
8155 (handle_v_cont, main): Use gdb_id_to_thread_id.
8156 * server.h (add_thread): Update prototype.
8157 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8160 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8162 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8163 left-padded registers.
8164 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8165 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8167 2005-07-01 Steve Ellcey <sje@cup.hp.com>
8169 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8170 * configure: Regenerate.
8171 * config.in: Regenerate.
8172 * server.h (NEED_DECLARATION_STRERROR):
8173 Replace with !HAVE_DECL_STRERROR.
8175 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8177 * linux-low.c (linux_wait, linux_send_signal): Don't test
8178 an unsigned long variable for > 0 if it could be MAX_ULONG.
8179 * server.c (myresume): Likewise.
8180 * target.c (set_desired_inferior): Likewise.
8182 2005-06-13 Mark Kettenis <kettenis@gnu.org>
8184 * configure.ac: Simplify and improve check for socklen_t.
8185 * configure, config.in: Regenerate.
8187 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8189 * acconfig.h: Remove.
8190 * configure.ac: Add a test for socklen_t. Use three-argument
8191 AC_DEFINE throughout.
8192 * config.in: Regenerated using autoheader 2.59.
8193 * configure: Regenerated.
8195 * gdbreplay.c (socklen_t): Provide a default.
8196 (remote_open): Use socklen_t.
8197 * remote-utils.c (socklen_t): Provide a default.
8198 (remote_open): Use socklen_t.
8199 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8202 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8204 * linux-low.c (linux_read_memory, linux_write_memory)
8205 (linux_read_auxv): Likewise.
8206 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8207 (check_mem_write): Likewise.
8208 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8210 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8211 (registers_from_string, register_data): Likewise.
8212 * server.c (handle_query, main): Likewise.
8213 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8214 (decode_M_packet): Likewise.
8215 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8216 * target.h (struct target_ops): Update read_memory, write_memory,
8218 (read_inferior_memory, write_inferior_memory): Update.
8219 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8221 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8222 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8223 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8224 linux-s390-low.c, linux-sh-low.c: Update for changes in
8225 read_inferior_memory and the_low_target->breakpoint.
8227 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8229 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8230 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8231 * configure.srv: Add powerpc64-*-linux*.
8232 * linux-ppc64-low.c: New file.
8234 2005-05-23 Orjan Friberg <orjanf@axis.com>
8236 * linux-cris-low.c: New file with support for CRIS.
8237 * linux-crisv32-low.c: Ditto for CRISv32.
8238 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8239 (clean): Add reg-cris.c and reg-crisv32.c.
8240 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8241 reg-crisv32.o, and reg-crisv32.c to make rules.
8242 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8245 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8247 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8248 of sizeof (PTRACE_XFER_TYPE).
8249 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8251 2005-05-12 Orjan Friberg <orjanf@axis.com>
8253 * target.h (struct target_ops): Add insert_watchpoint,
8254 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8255 pointers for hardware watchpoint support.
8256 * linux-low.h (struct linux_target_ops): Ditto.
8257 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8258 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8259 to linux_target_ops.
8260 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8262 * server.c (main): Recognize 'Z' and 'z' packets.
8264 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8266 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8267 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8268 (the_low_target): Add new members.
8270 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8272 * proc-service.c (ps_lgetregs): Search all_processes instead of
8275 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8277 * server.c (start_inferior): Change return type to int.
8278 (attach_inferior): Change sigptr to int *.
8279 (handle_v_cont, handle_v_requests): Change signal to int *.
8280 (main): Change signal to int.
8282 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8284 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8285 * configure.srv: Add m32r*-*-linux*.
8286 * linux-m32r-low.c: New file.
8288 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8290 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8292 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8294 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8295 Take unsigned long arguments for PIDs.
8296 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8297 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8298 (wait_for_sigstop, linux_resume_one_process)
8299 (regsets_fetch_inferior_registers, linux_send_signal)
8300 (linux_read_auxv): Likewise. Update the types of variables holding
8301 PIDs. Update format string specifiers.
8302 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8303 * remote-utils.c (prepare_resume_reply): Likewise.
8304 * server.c (cont_thread, general_thread, step_thread)
8305 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8307 (handle_query): Update format specifiers.
8308 (handle_v_cont, main): Use strtoul for thread IDs.
8309 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8310 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8311 (general_thread, step_thread, thread_from_wait)
8312 (old_thread_from_wait): Update.
8313 * target.h (struct thread_resume): Use unsigned long for THREAD.
8314 (struct target_ops): Use unsigned long for arguments to attach and
8317 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8319 * acinclude.m4: Include bfd/bfd.m4 directly.
8320 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8321 <agriffis@toolchain.org>.
8322 * aclocal.m4, configure: Regenerated.
8324 2005-01-07 Andrew Cagney <cagney@gnu.org>
8326 * configure.ac: Rename configure.in, require autoconf 2.59.
8327 * configure: Re-generate.
8329 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8331 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8333 * aclocal.m4: Regenerated.
8334 * configure: Regenerated.
8336 2004-11-21 Andreas Schwab <schwab@suse.de>
8338 * linux-m68k-low.c (m68k_num_gregs): Define.
8339 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8340 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8341 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8342 (m68k_breakpoint_at): New. Add to the_low_target.
8344 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8345 srv_linux_thread_db to yes.
8347 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8349 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8350 (ARCH_SET_FS): Likewise.
8351 (ARCH_GET_FS): Likewise.
8352 (ARCH_GET_GS): Likewise.
8354 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8356 * linux-i386-low.c (ps_get_thread_area): New.
8357 * linux-x86-64-low.c (ps_get_thread_area): New.
8358 * linux-low.c: Include <sys/syscall.h>.
8359 (linux_kill_one_process): Don't kill the first thread here.
8360 (linux_kill): Kill the first thread here.
8361 (kill_lwp): New function.
8362 (send_sigstop, linux_send_signal): Use it.
8363 * proc-service.c: Clean up #ifdefs.
8364 (fpregset_info): Delete.
8365 (ps_lgetregs): Update and enable implementation.
8366 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8368 * remote-utils.c (struct sym_cache, symbol_cache): New.
8369 (input_interrupt): Print a clearer message.
8370 (async_io_enabled): New variable.
8371 (enable_async_io, disable_async_io): Use it. Update comments.
8372 (look_up_one_symbol): Use the symbol cache.
8373 * thread-db.c (thread_db_look_up_symbols): New function.
8374 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8376 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8378 * configure.in: Test for -rdynamic.
8379 * configure: Regenerated.
8380 * Makefile (INTERNAL_LDFLAGS): New.
8381 (gdbserver, gdbreplay): Use it.
8383 2004-09-02 Andrew Cagney <cagney@gnu.org>
8385 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8387 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8389 * linux-low.c (linux_wait): Clear all_processes list also.
8391 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8393 * linux-low.c: Include <errno.h>. Remove extern declaration of
8396 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8398 * gdbreplay.c, server.h, utils.c: Update copyright years.
8400 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8402 * server.c (main): Print child status or termination signal from
8403 variable 'signal', not 'sig'.
8405 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8407 * linux-low.c (linux_read_memory): Change return type to
8408 int. Check for and return error from ptrace().
8409 * target.c (read_inferior_memory): Change return type to int. Pass
8410 back return status from the_target->read_memory().
8411 * target.h (struct target_ops): Adapt *read_memory() prototype.
8413 (read_inferior_memory): Adapt prototype.
8414 * server.c (main): Return an error packet if
8415 read_inferior_memory() returns an error.
8417 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8419 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8420 Unify with other clean targets.
8422 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8424 * server.c (handle_v_cont): Call set_desired_inferior.
8426 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8428 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8432 * linux-low.c (linux_wait): Unblock async I/O.
8433 (linux_resume): Block and enable async I/O.
8434 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8435 * server.h (block_async_io, unblock_async_io): Add prototypes.
8437 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8439 * remote-utils.c (remote_open): Print a status notice after
8441 * server.c (attach_inferior): Print a status notice after
8444 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8446 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8448 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8450 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8452 * server.c, target.h: Update copyright years.
8454 2004-02-25 Roland McGrath <roland@redhat.com>
8456 * target.h (struct target_ops): New member `read_auxv'.
8457 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8458 * linux-low.c (linux_read_auxv): New function.
8459 (linux_target_ops): Initialize `read_auxv' member to that.
8461 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8463 Committed by Jim Blandy <jimb@redhat.com>.
8465 * linux-s390-low.c (s390_num_regs): Update.
8466 (s390_regmap): Remove control registers. Use __s390x__ predefine
8467 instead of GPR_SIZE to distiguish s390 and s390x targets.
8469 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8471 * linux-low.c: Update copyright year.
8472 (check_removed_breakpoint): Clear pending_is_breakpoint.
8473 (linux_set_resume_request, linux_queue_one_thread)
8474 (resume_status_pending_p): New functions.
8475 (linux_continue_one_thread): Use process->resume.
8476 (linux_resume): Only resume threads if there are no pending events.
8477 * linux-low.h (struct process_info): Add resume request
8480 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8482 * regcache.c (new_register_cache): Clear the allocated register
8483 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8485 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8487 * linux-low.c (linux_resume): Take a struct thread_resume *
8489 (linux_wait): Update call.
8490 (resume_ptr): New static variable.
8491 (linux_continue_one_thread): Renamed from
8492 linux_continue_one_process. Use resume_ptr.
8493 (linux_resume): Use linux_continue_one_thread.
8494 * server.c (handle_v_cont, handle_v_requests): New functions.
8495 (myresume): New function.
8496 (main): Handle 'v' case.
8497 * target.h (struct thread_resume): New type.
8498 (struct target_ops): Change argument of "resume" to struct
8500 (myresume): Delete macro.
8502 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8504 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8505 (uninstall): Support DESTDIR.
8507 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8509 * configure.srv: Add xscale*linux copy of arm*linux entry.
8511 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8513 * linux-arm-low.c (arm_reinsert_addr): New function.
8514 (the_low_target): Add arm_reinsert_addr.
8516 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8518 * mem-break.c: Remove whitespace at end of file.
8520 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8522 * configure.in: Check whether we need to prototype strerror.
8523 * server.h: Optionally prototype strerror.
8524 * gdbreplay.c (perror_with_name): Use strerror.
8525 * linux-low.c (linux_attach_lwp): Use strerror.
8526 * utils.c (perror_with_name): Use strerror.
8527 * config.in, configure: Regenerated.
8529 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8531 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8532 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8534 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8536 * Makefile.in (SFILES): Update.
8537 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8538 low-sun3.c: Remove files.
8540 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8542 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8543 (linux_detach_one_process, linux_detach): New functions.
8544 (linux_target_ops): Add linux_detach.
8545 * server.c (main): Handle 'D' packet.
8546 * target.h (struct target_ops): Add "detach" member.
8547 (detach_inferior): Define.
8549 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8551 From Kelley Cook <kelleycook@wideopenwest.com>:
8552 * configure.srv: Accept i[34567]86 variants.
8554 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8556 * linux-low.c (linux_wait_for_event): Correct comment typos.
8557 (linux_resume_one_process): Call check_removed_breakpoint.
8558 (linux_send_signal): New function.
8559 (linux_target_ops): Add linux_send_signal.
8560 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8562 * target.h (struct target_ops): Add send_signal.
8564 2003-05-29 Jim Blandy <jimb@redhat.com>
8566 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8567 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8568 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8569 away part of the register's value.
8571 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8573 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8574 (linux_wait_for_event, linux_init_signals): Likewise.
8576 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8578 * configure.in: Check for stdlib.h.
8579 * configure: Regenerated.
8580 * config.in: Regenerated.
8582 2003-01-04 Andreas Schwab <schwab@suse.de>
8584 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8586 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8588 * Makefile.in: Remove obsolete code.
8590 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8592 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8593 defined(PT_FPR0_HI).
8595 2002-11-17 Stuart Hughes <seh@zee2.com>
8597 * linux-arm-low.c (arm_num_regs): Increase.
8598 (arm_regmap): Include status register.
8600 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8602 * linux-low.c (register_addr): Remove incorrect -1 check.
8604 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8606 * linux-low.c (linux_create_inferior): Call setpgid. Return
8608 (unstopped_p, linux_signal_pid): Remove.
8609 (linux_target_ops): Remove linux_signal_pid.
8610 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8611 global instead of target method.
8612 * target.h (struct target_ops): Remove signal_pid. Update comment
8613 for create_inferior.
8614 * server.c (signal_pid): New variable.
8615 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8616 gdbserver. Set the child to be the foreground process group.
8617 (attach_inferior): Set signal_pid.
8619 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8621 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8623 2002-08-20 Jim Blandy <jimb@redhat.com>
8625 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8628 2002-08-01 Andrew Cagney <cagney@redhat.com>
8630 * Makefile.in: Make chill references obsolete.
8632 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8634 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8635 * configure: Regenerate.
8636 * config.in: Regenerate.
8638 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8640 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8641 (perror_with_name, remote_close, remote_open, expect, play): Static.
8643 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8645 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8646 byte offsets instead of an array of indexes.
8647 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8649 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8651 * regcache.c: Add comment.
8653 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8655 * thread-db.c: New file.
8656 * proc-service.c: New file.
8657 * acinclude.m4: New file.
8658 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8659 proc-service.o, and thread-db.o.
8660 (linux-low.o): Add USE_THREAD_DB.
8661 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8662 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8663 * aclocal.m4: Regenerated.
8664 * config.in: Regenerated.
8665 * configure: Regenerated.
8666 * configure.in: Check for proc_service.h, sys/procfs.h,
8667 thread_db.h, and linux/elf.h headrs.
8668 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8669 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8670 Check for -lthread_db and thread support.
8671 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8672 PowerPC, and SuperH.
8673 * i387-fp.c: Constify arguments.
8674 * i387-fp.h: Likewise.
8675 * inferiors.c: (struct thread_info): Renamed from
8676 `struct inferior_info'. Remove PID member. Use generic inferior
8677 list header. All uses updated.
8678 (inferiors, signal_pid): Removed.
8679 (all_threads): New variable.
8680 (get_thread): Define.
8681 (add_inferior_to_list): New function.
8682 (for_each_inferior): New function.
8683 (change_inferior_id): New function.
8684 (add_inferior): Removed.
8685 (remove_inferior): New function.
8686 (add_thread): New function.
8687 (free_one_thread): New function.
8688 (remove_thread): New function.
8689 (clear_inferiors): Use for_each_inferior and free_one_thread.
8690 (find_inferior): New function.
8691 (find_inferior_id): New function.
8692 (inferior_target_data): Update argument type.
8693 (set_inferior_target_data): Likewise.
8694 (inferior_regcache_data): Likewise.
8695 (set_inferior_regcache_data): Likewise.
8696 * linux-low.c (linux_bp_reinsert): Remove.
8697 (all_processes, stopping_threads, using_thrads)
8698 (struct pending_signals, debug_threads, pid_of): New.
8699 (inferior_pid): Replace with macro.
8700 (struct inferior_linux_data): Remove.
8701 (get_stop_pc, add_process): New functions.
8702 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8703 Use add_process and add_thread.
8704 (linux_attach_lwp): New function, based on old linux_attach. Use
8705 add_process and add_thread. Set stop_expected for new threads.
8706 (linux_attach): New function.
8707 (linux_kill_one_process): New function.
8708 (linux_kill): Kill all LWPs.
8709 (linux_thread_alive): Use find_inferior_id.
8710 (check_removed_breakpoints, status_pending_p): New functions.
8711 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8712 Update. Use WNOHANG. Wait for cloned processes also. Update process
8713 struct for the found process.
8714 (linux_wait_for_event): New function.
8715 (linux_wait): Use it. Support LWPs.
8716 (send_sigstop, wait_for_sigstop, stop_all_processes)
8717 (linux_resume_one_process, linux_continue_one_process): New functions.
8718 (linux_resume): Support LWPs.
8719 (REGISTER_RAW_SIZE): Remove.
8720 (fetch_register): Use register_size instead. Call supply_register.
8721 (usr_store_inferior_registers): Likewise. Call collect_register.
8723 (regsets_fetch_inferior_registers): Improve error message.
8724 (regsets_store_inferior_registers): Add debugging.
8725 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8726 (unstopped_p, linux_signal_pid): New functions.
8727 (linux_target_ops): Add linux_signal_pid.
8728 (linux_init_signals): New function.
8729 (initialize_low): Call it. Initialize using_threads.
8730 * regcache.c (inferior_regcache_data): Add valid
8732 (get_regcache): Fetch registers lazily. Add fetch argument
8733 and update all callers.
8734 (regcache_invalidate_one, regcache_invalidate): New
8736 (new_register_cache): Renamed from create_register_cache.
8737 Return the new regcache.
8738 (free_register_cache): Change argument to a void *.
8739 (registers_to_string, registers_from_string): Call get_regcache
8740 with fetch flag set.
8741 (register_data): Make static. Pass fetch flag to get_regcache.
8742 (supply_register): Call get_regcache with fetch flag clear.
8743 (collect_register): Call get_regcache with fetch flag set.
8744 (collect_register_as_string): New function.
8745 * regcache.h: Update.
8746 * remote-utils.c (putpkt): Flush after debug output and use
8748 Handle input interrupts while waiting for an ACK.
8749 (input_interrupt): Use signal_pid method.
8750 (getpkt): Flush after debug output and use stderr.
8751 (outreg): Use collect_register_as_string.
8752 (new_thread_notify, dead_thread_notify): New functions.
8753 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8755 (look_up_one_symbol): Flush after debug output.
8756 * server.c (step_thread, server_waiting): New variables.
8757 (start_inferior): Don't use signal_pid. Update call to mywait.
8758 (attach_inferior): Update call to mywait.
8759 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8760 (main): Don't fetch/store registers explicitly. Use
8761 set_desired_inferior. Support proposed ``Hs'' packet. Update
8764 (struct inferior_list, struct_inferior_list_entry): New.
8765 * target.c (set_desired_inferior): New.
8766 (write_inferior_memory): Constify.
8767 (mywait): New function.
8769 (struct target_ops): New signal_pid method.
8770 (mywait): Removed macro, added prototype.
8772 * linux-low.h (regset_func): Removed.
8773 (regset_fill_func, regset_store_func): New.
8774 (enum regset_type): New.
8775 (struct regset_info): Add type field. Use new operation types.
8776 (struct linux_target_ops): stop_pc renamed to get_pc.
8777 Add decr_pc_after_break and breakpoint_at.
8778 (get_process, get_thread_proess, get_process_thread)
8779 (strut process_info, all_processes, linux_attach_lwp)
8780 (thread_db_init): New.
8782 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8783 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8784 (the_low_target): Add new members.
8785 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8786 (i386_store_fpxregset): Constify.
8787 (target_regsets): Add new kind identifier.
8788 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8789 (i386_set_pc): Add debugging.
8790 (i386_breakpoint_at): New function.
8791 (the_low_target): Add new members.
8792 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8793 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8794 (mips_breakpoint_at): New.
8795 (the_low_target): Add new members.
8796 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8797 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8798 (the_low_target): Add new members.
8799 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8800 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8801 (the_low_target): Add new members.
8802 * linux-x86-64-low.c (target_regsets): Add new kind
8805 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8807 From Martin Pool <mbp@samba.org>:
8808 * server.c (gdbserver_usage): New function.
8811 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8813 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8816 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8818 * Makefile.in: Remove obsolete code.
8820 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8822 * linux-low.c (regsets_fetch_inferior_registers),
8823 (regsets_store_inferior_registers): Removed cast to int from
8825 * regcache.h: Added declaration of struct inferior_info.
8827 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8829 * inferiors.c (struct inferior_info): Add regcache_data.
8830 (add_inferior): Call create_register_cache.
8831 (clear_inferiors): Call free_register_cache.
8832 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8833 * regcache.c (struct inferior_regcache_data): New.
8834 (registers): Remove.
8835 (get_regcache): New function.
8836 (create_register_cache, free_register_cache): New functions.
8837 (set_register_cache): Don't initialize the register cache here.
8838 (registers_to_string, registers_from_string, register_data): Call
8840 * regcache.h: Add prototypes.
8841 * server.h: Likewise.
8843 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8845 * mem-break.c: New file.
8846 * mem-break.h: New file.
8847 * Makefile.in: Add mem-break.o rule; update server.h
8849 * inferiors.c (struct inferior_info): Add target_data
8851 (clear_inferiors): Free target_data member if set.
8852 (inferior_target_data, set_inferior_target_data): New functions.
8853 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8854 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8855 * linux-low.c (linux_bp_reinsert): New variable.
8856 (struct inferior_linux_data): New.
8857 (linux_create_inferior): Use set_inferior_target_data.
8858 (linux_attach): Likewise. Call add_inferior.
8859 (linux_wait_for_one_inferior): New function.
8860 (linux_wait): Call it.
8861 (linux_write_memory): Add const.
8862 (initialize_low): Call set_breakpoint_data.
8863 * linux-low.h (struct linux_target_ops): Add breakpoint
8865 * server.c (attach_inferior): Remove extra add_inferior
8867 * server.h: Include mem-break.h. Update inferior.c
8869 * target.c (read_inferior_memory)
8870 (write_inferior_memory): New functions.
8871 * target.h (read_inferior_memory)
8872 (write_inferior_memory): Change macros to prototypes.
8873 (struct target_ops): Update comments. Add const to write_memory
8876 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8878 * linux-low.c (usr_store_inferior_registers): Support
8879 registers which are allowed to fail to store.
8880 * linux-low.h (linux_target_ops): Likewise.
8881 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8882 (ppc_cannot_store_register): FPSCR may not be storable.
8884 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8886 * server.h: Include <string.h> if HAVE_STRING_H.
8887 * ChangeLog: Correct paths in last ChangeLog entry.
8889 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8891 * linux-low.h: Remove obsolete prototypes.
8892 (struct linux_target_ops): New.
8893 (extern the_low_target): New.
8894 * linux-low.c (num_regs, regmap): Remove declarations.
8895 (register_addr): Use the_low_target explicitly.
8896 (fetch_register): Likewise.
8897 (usr_fetch_inferior_registers): Likewise.
8898 (usr_store_inferior_registers): Likewise.
8899 * linux-arm-low.c (num_regs): Remove.
8900 (arm_num_regs): Define.
8901 (arm_regmap): Renamed from regmap, made static.
8902 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8904 (arm_cannot_store_register): Renamed from cannot_store_register,
8906 (the_low_target): New.
8907 * linux-i386-low.c (num_regs): Remove.
8908 (i386_num_regs): Define.
8909 (i386_regmap): Renamed from regmap, made static.
8910 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8912 (i386_cannot_store_register): Renamed from cannot_store_register,
8914 (the_low_target): New.
8915 * linux-ia64-low.c (num_regs): Remove.
8916 (ia64_num_regs): Define.
8917 (ia64_regmap): Renamed from regmap, made static.
8918 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8920 (ia64_cannot_store_register): Renamed from cannot_store_register,
8922 (the_low_target): New.
8923 * linux-m68k-low.c (num_regs): Remove.
8924 (m68k_num_regs): Define.
8925 (m68k_regmap): Renamed from regmap, made static.
8926 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8928 (m68k_cannot_store_register): Renamed from cannot_store_register,
8930 (the_low_target): New.
8931 * linux-mips-low.c (num_regs): Remove.
8932 (mips_num_regs): Define.
8933 (mips_regmap): Renamed from regmap, made static.
8934 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8936 (mips_cannot_store_register): Renamed from cannot_store_register,
8938 (the_low_target): New.
8939 * linux-ppc-low.c (num_regs): Remove.
8940 (ppc_num_regs): Define.
8941 (ppc_regmap): Renamed from regmap, made static.
8942 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8944 (ppc_cannot_store_register): Renamed from cannot_store_register,
8946 (the_low_target): New.
8947 * linux-s390-low.c (num_regs): Remove.
8948 (s390_num_regs): Define.
8949 (s390_regmap): Renamed from regmap, made static.
8950 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8952 (s390_cannot_store_register): Renamed from cannot_store_register,
8954 (the_low_target): New.
8955 * linux-sh-low.c (num_regs): Remove.
8956 (sh_num_regs): Define.
8957 (sh_regmap): Renamed from regmap, made static.
8958 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8960 (sh_cannot_store_register): Renamed from cannot_store_register,
8962 (the_low_target): New.
8963 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8964 (the_low_target): New.
8966 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8968 * Makefile.in: Add stamp-h target.
8969 * configure.in: Create stamp-h.
8970 * configure: Regenerated.
8972 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8974 * inferiors.c: New file.
8975 * target.c: New file.
8976 * target.h: New file.
8977 * Makefile.in: Add target.o and inferiors.o. Update
8979 * linux-low.c (inferior_pid): New static variable,
8980 moved from server.c.
8981 (linux_create_inferior): Renamed from create_inferior.
8982 Call add_inferior. Return 0 on success instead of a PID.
8983 (linux_attach): Renamed from myattach.
8984 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8985 (linux_thread_alive): Renamed from mythread_alive.
8986 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8988 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8989 (regsets_store_inferior_registers): Correct error message.
8990 Add missing ``return 0''.
8991 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8992 (linux_store_registers): Renamed from store_inferior_registers.
8993 (linux_read_memory): Renamed from read_inferior_memory.
8994 (linux_write_memory): Renamed from write_inferior_memory.
8995 (linux_target_ops): New structure.
8996 (initialize_low): Call set_target_ops ().
8997 * remote-utils.c (unhexify): New function.
8998 (hexify): New function.
8999 (input_interrupt): Send signals to ``signal_pid''.
9000 * server.c (inferior_pid): Remove.
9001 (start_inferior): Update create_inferior call.
9002 (attach_inferior): Call add_inferior.
9003 (handle_query): New function.
9004 (main): Call handle_query for `q' packets.
9005 * server.h: Include "target.h". Remove obsolete prototypes.
9006 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9008 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
9010 * Makefile.in: Add WARN_CFLAGS. Update configury
9012 * configure.in: Check for <string.h>
9013 * configure: Regenerate.
9014 * config.in: Regenerate.
9015 * gdbreplay.c: Include needed system headers.
9016 (remote_open): Remove strchr prototype.
9017 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9018 * regcache.c (supply_register): Change buf argument to const void *.
9019 (supply_register_by_name): Likewise.
9020 (collect_register): Change buf argument to void *.
9021 (collect_register_by_name): Likewise.
9022 * regcache.h: Add missing prototypes.
9023 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9024 * server.c (handle_query): New function.
9025 (attached): New static variable, moved out of main.
9026 (main): Quiet longjmp clobber warnings.
9027 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9028 * utils.c (error): Remove NORETURN.