1 2013-12-13 Pedro Alves <palves@redhat.com>
3 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4 if equal to TARGET_WAITKIND_LOADED.
5 * win32-low.c (cached_status): New static global.
6 (win32_wait): Add declaration.
7 (do_initial_child_stuff): Flush all initial pending debug events
8 up to the initial breakpoint.
9 (win32_wait): If CACHED_STATUS was set, return that instead
10 of doing a real wait. Remove the code resuming the execution
11 of the inferior after receiving a TARGET_WAITKIND_LOADED event
12 during the initial phase. Also remove the code changing
13 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
14 TARGET_WAITKIND_STOPPED.
16 2013-12-11 Yao Qi <yao@codesourcery.com>
18 * notif.c (handle_notif_ack): Return 0 if no notification
21 2013-11-20 Doug Evans <dje@google.com>
23 * linux-low.c (linux_set_resume_request): Fix comment.
25 2013-11-20 Doug Evans <dje@google.com>
27 * linux-low.c (resume_status_pending_p): Tweak comment.
29 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
31 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
32 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
33 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
34 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
35 (srv_amd64_regobj): Add amd64-mpx.o.
36 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
37 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
38 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
39 * i387-fp.c (num_pl_bnd_register) Added constant.
40 (num_pl_bnd_cfg_registers) Added constant.
41 (struct i387_xsave) Added reserved area and MPX fields.
42 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
43 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
45 (tdesc_i386_mpx_linux): Add MPX amd64 target.
46 (init_registers_amd64_mpx_linux): Declare new function.
47 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
48 (x86_64_regmap): Add MPX registers.
49 (x86_linux_read_description): Add MPX case.
50 (initialize_low_arch): Initialize MPX targets.
52 2013-11-18 Tom Tromey <tromey@redhat.com>
55 * configure.ac: Don't check for stdlib.h.
56 * gdbreplay.c: Unconditionally include stdlib.h.
58 2013-11-18 Tom Tromey <tromey@redhat.com>
62 * configure.ac: Don't use AC_HEADER_DIRENT.
64 2013-11-18 Tom Tromey <tromey@redhat.com>
66 * server.h: Don't check HAVE_STRING_H.
67 * gdbreplay.c: Don't check HAVE_STRING_H.
70 2013-11-18 Tom Tromey <tromey@redhat.com>
72 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
75 2013-11-08 Tom Tromey <tromey@redhat.com>
77 * configure, config.in: Rebuild.
78 * configure.ac: Remove unused configury.
80 2013-11-08 Tom Tromey <tromey@redhat.com>
82 * acinclude.m4: Include common.m4, codeset.m4.
83 * configure, config.in: Rebuild.
84 * configure.ac: Use GDB_AC_COMMON.
86 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
88 * linux-s390-low.c (HWCAP_S390_TE): New define.
89 (s390_arch_setup): Consider the TE field in the HWCAP for
90 determining 'have_regset_tdb'.
92 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
95 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
98 2013-10-02 Pedro Alves <palves@redhat.com>
100 * server.c (process_serial_event): Don't output "GDBserver
101 exiting" if GDB is connected through stdio.
102 * target.c (mywait): Likewise, be silent if GDB is connected
105 2013-10-01 Joel Brobecker <brobecker@adacore.com>
107 * lynx-low.c (lynx_add_threads_after_attach): New function.
108 (lynx_attach): Remove call to add_thread. Add call to
109 lynx_add_threads_after_attach instead.
111 2013-09-28 Mike Frysinger <vapier@gentoo.org>
113 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
114 * config.in, configure: Regenerated.
116 2013-09-18 Yao Qi <yao@codesourcery.com>
119 * server.c (start_inferior): Clear 'resume_info'.
121 2013-09-16 Jiong Wang <jiwang@tilera.com>
123 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
126 2013-09-16 Jiong Wang <jiwang@tilera.com>
128 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
129 linux-tile-low.o to srv_tgtobj.
131 2013-09-16 Will Newton <will.newton@linaro.org>
133 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
136 2013-09-06 Pedro Alves <palves@redhat.com>
138 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
139 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
140 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
141 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
142 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
143 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
145 2013-09-06 Pedro Alves <palves@redhat.com>
147 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
148 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
150 2013-09-06 Pedro Alves <palves@redhat.com>
152 * linux-amd64-ipa.c: Include tracepoint.h.
153 * linux-i386-ipa.c: Include tracepoint.h.
155 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
157 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
158 (ps_get_thread_area): New function.
160 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
162 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
163 (initialize_low_arch): Call init_registers_crisv32 rather than
164 init_register_crisv32.
166 2013-09-05 Pedro Alves <palves@redhat.com>
168 * server.h (handle_vFile, hostio_last_error_from_errno): Move
170 * hostio.h: ... this new file.
171 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
172 win32-low.c: Include hostio.h.
174 2013-09-05 Pedro Alves <palves@redhat.com>
176 * server.h (gdb_client_data, handler_func, callback_handler_func)
177 (delete_file_handler, add_file_handler, append_callback_event)
178 (delete_callback_event, start_event_loop, initialize_event_loop):
179 Move to event-loop.h and include it.
180 * event-loop.h: New file.
182 2013-09-05 Pedro Alves <palves@redhat.com>
184 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
185 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
186 (loaded_dll, unloaded_dll): Move to ...
187 * dll.h: ... this new file.
188 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
190 2013-09-05 Pedro Alves <palves@redhat.com>
192 * server.h (current_process, get_thread_process, all_processes)
193 (add_inferior_to_list, for_each_inferior, current_inferior)
194 (remove_inferior, add_process, remove_process, find_process_pid)
195 (have_started_inferiors_p, have_attached_inferiors_p)
196 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
197 (clear_inferiors, find_inferior, find_inferior_id)
198 (inferior_target_data, set_inferior_target_data)
199 (inferior_regcache_data, set_inferior_regcache_data): Move to
200 inferiors.h, and include it.
201 * inferiors.h: New file.
203 2013-09-05 Pedro Alves <palves@redhat.com>
205 * server.h (struct emit_ops, current_insn_ptr, emit_error):
209 2013-09-05 Pedro Alves <palves@redhat.com>
211 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
213 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
214 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
215 (handle_tracepoint_general_set, handle_tracepoint_query)
216 (tracepoint_finished_step, tracepoint_was_hit)
217 (release_while_stepping_state_list, current_traceframe)
218 (in_readonly_region, traceframe_read_mem)
219 (fetch_traceframe_registers, traceframe_read_sdata)
220 (traceframe_read_info, struct fast_tpoint_collect_status)
221 (fast_tracepoint_collecting, force_unlock_trace_buffer)
222 (handle_tracepoit_bkpts, initialize_low_tracepoint)
223 (supply_fast_tracepoint_registers)
224 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
225 (ipa_tdesc, claim_trampoline_space)
226 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
227 (agent_mem_read, agent_get_trace_state_variable_value)
228 (agent_set_trace_state_variable_value, agent_tsv_read)
229 (agent_mem_read_string, get_raw_reg_func_addr)
230 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
231 * tracepoint.h: ... this new file.
233 2013-09-05 Pedro Alves <palves@redhat.com>
235 * server.h (perror_with_name, error, fatal, warning, paddress)
236 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
240 2013-09-05 Pedro Alves <palves@redhat.com>
242 * server.h (remote_debug, noack_mode, transport_is_reliable)
243 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
244 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
245 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
246 (write_enn, initialize_async_io, enable_async_io)
247 (disable_async_io, check_remote_input_interrupt_request)
248 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
249 (dead_thread_notify, prepare_resume_reply)
250 (decode_address_to_semicolon, decode_address, decode_m_packet)
251 (decode_M_packet, decode_X_packet, decode_xfer_write)
252 (decode_search_memory_packet, unhexify, hexify)
253 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
254 (look_up_one_symbol, relocate_instruction)
255 (monitor_output): Move to remote-utils.h, and include it.
256 * remote-utils.h: New file.
258 2013-09-05 Pedro Alves <palves@redhat.com>
260 * server.h (_): Delete.
262 2013-09-02 Pedro Alves <palves@redhat.com>
264 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
265 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
267 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
269 2013-09-02 Pierre Muller <muller@sourceware.org>
271 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
272 or WriteProcessMemory complete successfully and handle
273 ERROR_PARTIAL_COPY error.
275 2013-09-02 Pedro Alves <palves@redhat.com>
277 * server.c (gdb_read_memory): Return -1 on traceframe memory read
278 error instead of EIO.
280 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
283 * linux-low.c: Include filestuff.h.
284 (linux_create_inferior) <pid == 0>: Call close_most_fds.
285 * lynx-low.c: Include filestuff.h.
286 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
287 * server.c: Include filestuff.h.
288 (main): Call notice_open_fds.
289 * spu-low.c: Include filestuff.h.
290 (spu_create_inferior) <pid == 0>: Call close_most_fds.
292 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
294 * Makefile.in: Explain why ../target and ../nat are not
295 listed as include file search paths.
296 (linux-waitpid.o): New object file rule.
297 * configure.srv (srv_native_linux_obj): New variable.
298 Replace all occurrences of linux native object files with
299 $srv_native_linux_obj.
300 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
301 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
302 (linux_enable_event_reporting): Remove declaration.
303 (my_waitpid): Moved to common/linux-waitpid.c.
304 (linux_wait_for_event): Pass ptid when calling
305 linux_enable_event_reporting.
306 (linux_supports_tracefork_flag): Remove.
307 (linux_enable_event_reporting): Likewise.
308 (linux_tracefork_grandchild): Remove.
309 (STACK_SIZE): Moved to common/linux-ptrace.c.
310 (linux_tracefork_child): Remove.
311 (linux_test_for_tracefork): Remove.
312 (linux_look_up_symbols): Call linux_supports_traceclone.
313 (initialize_low): Remove call to linux_test_for_tracefork.
314 * linux-low.h (PTRACE_TYPE_ARG3): Move to
315 common/linux-ptrace.h.
316 (PTRACE_TYPE_ARG4): Likewise.
317 Include linux-ptrace.h.
319 2013-08-21 Pedro Alves <palves@redhat.com>
321 * config.in: Renegerate.
323 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
325 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
326 (SFILES): Remove $(srcdir)/common/target-common.c and
327 add $(srcdir)/target/waitstatus.c.
328 (OBS): Remove target-common.o and add waitstatus.o.
329 (server_h): Remove $(srcdir)/../common/target-common.h and
330 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
331 and $(srcdir)/../target/waitstatus.h.
332 (target-common.o): Remove.
333 (waitstatus.o): New target object file.
334 * target.h: Do not include target-common.h and
335 include target/resume.h, target/wait.h and
338 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
340 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
342 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
343 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
345 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
346 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
348 2013-07-27 Jie Zhang <jie@codesourcery.com>
349 Daniel Jacobowitz <dan@codesourcery.com>
350 Yao Qi <yao@codesourcery.com>
352 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
353 (mips-linux-watch.o): New rule.
354 (mips_linux_watch_h): New variable.
355 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
357 * linux-mips-low.c: Include mips-linux-watch.h.
358 (struct arch_process_info, struct arch_lwp_info): New.
359 (update_watch_registers_callback): New function.
360 (mips_linux_new_process, mips_linux_new_thread) New functions.
361 (mips_linux_prepare_to_resume, mips_insert_point): New
363 (mips_remove_point, mips_stopped_by_watchpoint): New
365 (rsp_bp_type_to_target_hw_bp_type): New function.
366 (mips_stopped_data_address): New function.
367 (the_low_target): Add watchpoint support functions.
369 2013-07-27 Yao Qi <yao@codesourcery.com>
371 * i386-low.c: Include break-common.h.
372 (enum target_hw_bp_type): Remove.
374 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
376 * Makefile.in (SFILES): /common/target-common.c.
377 (OBS): Add target-common.o.
378 (server_h): Add $(srcdir)/../common/target-common.h.
379 (target-common.o): New target.
380 * server.c (queue_stop_reply_callback): Free
381 status string after use.
382 * target.c (target_waitstatus_to_string): Remove.
383 * target.h: Include target-common.h.
384 (resume_kind): Likewise.
385 (target_waitkind): Likewise.
386 (target_waitstatus): Likewise.
387 (TARGET_WNOHANG): Likewise.
389 2013-07-04 Yao Qi <yao@codesourcery.com>
391 * Makefile.in (host_alias): Use @host_noncanonical@.
392 (target_alias): Use @target_noncanonical@.
393 * configure.ac: Use ACX_NONCANONICAL_TARGET and
394 ACX_NONCANONICAL_HOST.
395 * configure: Regenerated.
398 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
400 * configure.ac (version_host, version_target): Set and AC_SUBST them.
401 * configure: Rebuild.
402 * Makefile.in (version_host, version_target): Get from configure.
403 (version.c): Use $(version_host) and $(version_target).
405 2013-07-03 Pedro Alves <palves@redhat.com>
407 * Makefile.in (config.status): Depend on development.sh.
408 * acinclude.m4: Include libmcheck.m4.
409 * configure: Regenerate.
411 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
413 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
414 attribute inside the parentheses.
415 (winapi_DebugSetProcessKillOnExit): Ditto.
416 (winapi_DebugBreakProcess): Ditto.
417 (winapi_GenerateConsoleCtrlEvent): Ditto.
419 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
421 * notif.h (notif_event): Add a dummy member to avoid compiler
424 2013-07-01 Pedro Alves <palves@redhat.com>
426 * hostio.c (HOSTIO_PATH_MAX): Define.
427 (require_filename, handle_open, handle_unlink, handle_readlink):
430 2013-07-01 Pedro Alves <palves@redhat.com>
432 * server.h: Include "pathmax.h".
433 * linux-low.c: Don't include sys/param.h.
434 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
436 * win32-low.c: Don't include sys/param.h.
437 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
439 2013-07-01 Pedro Alves <palves@redhat.com>
441 * event-loop.c: Don't check HAVE_UNISTD_H before including
443 * gdbreplay.c: Likewise.
444 * remote-utils.c: Likewise.
445 * server.c: Likewise.
446 * configure.ac: Don't check for unistd.h.
447 * configure: Regenerate.
449 2013-06-28 Tom Tromey <tromey@redhat.com>
451 * Makefile.in (version.c): Use version.in, not
454 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
456 * configure.ac (version_host, version_target): Set and AC_SUBST them.
457 * configure: Rebuild.
458 * Makefile.in (version_host, version_target): Get from configure.
459 (version.c): Use $(version_host) and $(version_target).
461 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
463 Fix trace-status to output user name without trailing colon.
464 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
466 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
468 Fix trace-status to output proper start-time and stop-time.
469 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
470 output start time and stop time in hex as gdb expects.
472 2013-06-26 Pedro Alves <pedro@codesourcery.com>
474 * tracepoint.c (build_traceframe_info_xml): Output trace state
475 variables present in the trace buffer.
477 2013-06-24 Tom Tromey <tromey@redhat.com>
479 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
482 * gdbreplay.c: Include version.h.
483 (version, host_name): Don't declare.
484 * server.h: Include version.h.
485 (version, host_name): Don't declare.
487 2013-06-12 Pedro Alves <palves@redhat.com>
489 * linux-x86-low.c (linux_is_elf64): Delete global.
490 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
491 with local linux_pid_exe_is_elf_64_file use.
493 2013-06-11 Pedro Alves <palves@redhat.com>
495 * linux-low.c (regset_disabled, disable_regset): New functions.
496 (regsets_fetch_inferior_registers)
497 (regsets_store_inferior_registers): Use them.
498 (initialize_regsets_info); Don't allocate the disabled_regsets
500 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
503 2013-06-11 Pedro Alves <palves@redhat.com>
505 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
508 2013-06-11 Pedro Alves <palves@redhat.com>
510 * linux-x86-low.c (initialize_low_arch): Call
511 init_registers_x32_avx_linux.
513 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
515 Fix compatibility with Android Bionic.
516 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
519 2013-06-07 Pedro Alves <palves@redhat.com>
522 * Makefile.in (OBS): Add tdesc.o.
523 (IPA_OBJS): Add tdesc-ipa.o.
524 (tdesc-ipa.o): New rule.
525 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
527 * linux-low.c (new_inferior): Delete.
528 (disabled_regsets, num_regsets): Delete.
529 (linux_add_process): Adjust to set the new per-process
531 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
532 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
533 was a stop. When calling arch_setup, switch the current inferior
534 to the thread that got an event.
535 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
536 (regsets_fetch_inferior_registers)
537 (regsets_store_inferior_registers): New regsets_info parameter.
539 (linux_register_in_regsets): New regs_info parameter. Adjust to
541 (register_addr, fetch_register, store_register): New usrregs_info
542 parameter. Adjust to use it.
543 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
544 parameter regs_info. Adjust to use it.
545 (linux_fetch_registers): Get the current inferior's regs_info, and
547 (linux_store_registers): Ditto.
548 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
549 (initialize_low): Don't initialize the target_regsets here. Call
551 * linux-low.h (target_regsets): Delete declaration.
552 (struct regsets_info): New.
553 (struct usrregs_info): New.
554 (struct regs_info): New.
555 (struct process_info_private) <new_inferior>: New field.
556 (struct linux_target_ops): Delete the num_regs, regmap, and
557 regset_bitmap fields. New field regs_info.
558 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
559 * i387-fp.c (num_xmm_registers): Delete.
560 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
561 calls to new interface.
562 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
563 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
564 Infer the number of xmm registers from the regcache's target
566 * i387-fp.h (num_xmm_registers): Delete.
567 * inferiors.c (add_thread): Don't install the thread's regcache
569 * proc-service.c (gregset_info): Fetch the current inferior's
570 regs_info. Adjust to use it.
571 * regcache.c: Include tdesc.h.
572 (register_bytes, reg_defs, num_registers)
573 (gdbserver_expedite_regs): Delete.
574 (get_thread_regcache): If the thread doesn't have a regcache yet,
575 create one, instead of aborting gdbserver.
576 (regcache_invalidate_one): Rename to ...
577 (regcache_invalidate_thread): ... this.
578 (regcache_invalidate_one): New.
579 (regcache_invalidate): Only invalidate registers of the current
581 (init_register_cache): Add target_desc parameter, and use it.
582 (new_register_cache): Ditto. Assert the target description has a
583 non zero registers_size.
584 (regcache_cpy): Add assertions. Adjust.
585 (realloc_register_cache, set_register_cache): Delete.
586 (registers_to_string, registers_from_string): Adjust.
587 (find_register_by_name, find_regno, find_register_by_number)
588 (register_cache_size): Add target_desc parameter, and use it.
589 (free_register_cache_thread, free_register_cache_thread_one)
590 (regcache_release, register_cache_size): New.
591 (register_size): Add target_desc parameter, and use it.
592 (register_data, supply_register, supply_register_zeroed)
593 (supply_regblock, supply_register_by_name, collect_register)
594 (collect_register_as_string, collect_register_by_name): Adjust.
595 * regcache.h (struct target_desc): Forward declare.
596 (struct regcache) <tdesc>: New field.
597 (init_register_cache, new_register_cache): Add target_desc
599 (regcache_invalidate_thread): Declare.
600 (regcache_invalidate_one): Delete declaration.
601 (regcache_release): Declare.
602 (find_register_by_number, register_cache_size, register_size)
603 (find_regno): Add target_desc parameter.
604 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
606 * remote-utils.c: Include tdesc.h.
607 (outreg, prepare_resume_reply): Adjust.
608 * server.c: Include tdesc.h.
609 (gdbserver_xmltarget): Delete declaration.
610 (get_features_xml, process_serial_event): Adjust.
611 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
613 (struct process_info) <tdesc>: New field.
614 (ipa_tdesc): Declare.
617 * tracepoint.c: Include tdesc.h.
618 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
619 (get_context_regcache): Adjust to pass ipa_tdesc down.
620 (do_action_at_tracepoint): Adjust to get the register cache size
621 from the context regcache's description.
622 (traceframe_walk_blocks): Adjust to get the register cache size
623 from the current trace frame's description.
624 (traceframe_get_pc): Adjust to get current trace frame's
625 description and pass it down.
626 (gdb_collect): Adjust to get the register cache size from the
628 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
629 (gdbserver_xmltarget): Delete.
630 (initialize_low_tracepoint): Set the ipa's target description.
631 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
632 (initialize_low_tracepoint): Set the ipa's target description.
633 * linux-x86-low.c: Include tdesc.h.
634 [__x86_64__] (is_64bit_tdesc): New.
635 (ps_get_thread_area, x86_get_thread_area): Use it.
636 (i386_cannot_store_register): Rename to ...
637 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
638 (i386_cannot_fetch_register): Rename to ...
639 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
640 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
642 (target_regsets): Rename to ...
643 (x86_regsets): ... this.
644 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
646 (x86_siginfo_fixup): Use is_64bit_tdesc.
647 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
648 (tdesc_x32_avx_linux, tdesc_x32_linux)
649 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
651 (x86_linux_update_xmltarget): Delete.
652 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
653 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
654 (AMD64_LINUX_USER64_CS): New.
655 (x86_linux_read_description): New, based on
656 x86_linux_update_xmltarget.
657 (same_process_callback): New.
658 (x86_arch_setup_process_callback): New.
659 (x86_linux_update_xmltarget): New.
660 (x86_regsets_info): New.
661 (amd64_linux_regs_info): New.
662 (i386_linux_usrregs_info): New.
663 (i386_linux_regs_info): New.
664 (x86_linux_regs_info): New.
665 (x86_arch_setup): Reimplement.
666 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
667 (x86_emit_ops): Ditto.
668 (the_low_target): Adjust. Install x86_linux_regs_info,
669 x86_cannot_fetch_register, and x86_cannot_store_register.
670 (initialize_low_arch): New.
671 * linux-ia64-low.c (tdesc_ia64): Declare.
672 (ia64_fetch_register): Adjust.
673 (ia64_usrregs_info, regs_info): New globals.
674 (ia64_regs_info): New function.
675 (the_low_target): Adjust.
676 (initialize_low_arch): New function.
677 * linux-sparc-low.c (tdesc_sparc64): Declare.
678 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
680 (sparc_arch_setup): New function.
681 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
682 (the_low_target): Adjust.
683 (initialize_low_arch): New function.
684 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
685 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
686 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
687 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
688 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
689 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
690 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
691 (tdesc_powerpc_isa205_vsx64l): Declare.
692 (ppc_cannot_store_register, ppc_collect_ptrace_register)
693 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
694 (ppc_set_pc, ppc_get_hwcap): Adjust.
695 (ppc_usrregs_info): Forward declare.
696 (!__powerpc64__) ppc_regmap_adjusted: New global.
697 (ppc_arch_setup): Adjust to the current process'es target
699 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
700 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
701 (ppc_store_evrregset): Adjust.
702 (target_regsets): Rename to ...
703 (ppc_regsets): ... this, and make static.
704 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
705 (ppc_regs_info): New function.
706 (the_low_target): Adjust.
707 (initialize_low_arch): New function.
708 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
709 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
710 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
711 (tdesc_s390x_linux64v2): Declare.
712 (s390_collect_ptrace_register, s390_supply_ptrace_register)
713 (s390_fill_gregset, s390_store_last_break): Adjust.
714 (target_regsets): Rename to ...
715 (s390_regsets): ... this, and make static.
716 (s390_get_pc, s390_set_pc): Adjust.
717 (s390_get_hwcap): New target_desc parameter, and use it.
718 [__s390x__] (have_hwcap_s390_high_gprs): New global.
719 (s390_arch_setup): Adjust to set the current process'es target
720 description. Don't adjust the regmap.
721 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
722 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
723 (regs_info_3264): New globals.
724 (s390_regs_info): New function.
725 (the_low_target): Adjust.
726 (initialize_low_arch): New function.
727 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
728 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
729 [__mips64] (init_registers_mips_linux)
730 (init_registers_mips_dsp_linux): Delete defines.
731 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
732 (have_dsp): New global.
733 (mips_read_description): New, based on mips_arch_setup.
734 (mips_arch_setup): Reimplement.
735 (get_usrregs_info): New function.
736 (mips_cannot_fetch_register, mips_cannot_store_register)
737 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
738 (mips_fill_fpregset, mips_store_fpregset): Adjust.
739 (target_regsets): Rename to ...
740 (mips_regsets): ... this, and make static.
741 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
742 (dsp_regs_info, regs_info): New globals.
743 (mips_regs_info): New function.
744 (the_low_target): Adjust.
745 (initialize_low_arch): New function.
746 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
747 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
749 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
750 (arm_read_description): New, with bits factored from
752 (arm_arch_setup): Reimplement.
753 (target_regsets): Rename to ...
754 (arm_regsets): ... this, and make static.
755 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
756 (arm_regs_info): New function.
757 (the_low_target): Adjust.
758 (initialize_low_arch): New function.
759 * linux-m68k-low.c (tdesc_m68k): Declare.
760 (target_regsets): Rename to ...
761 (m68k_regsets): ... this, and make static.
762 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
763 (m68k_regs_info): New function.
764 (m68k_arch_setup): New function.
765 (the_low_target): Adjust.
766 (initialize_low_arch): New function.
767 * linux-sh-low.c (tdesc_sharch): Declare.
768 (target_regsets): Rename to ...
769 (sh_regsets): ... this, and make static.
770 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
771 (sh_regs_info, sh_arch_setup): New functions.
772 (the_low_target): Adjust.
773 (initialize_low_arch): New function.
774 * linux-bfin-low.c (tdesc_bfin): Declare.
775 (bfin_arch_setup): New function.
776 (bfin_usrregs_info, regs_info): New globals.
777 (bfin_regs_info): New function.
778 (the_low_target): Adjust.
779 (initialize_low_arch): New function.
780 * linux-cris-low.c (tdesc_cris): Declare.
781 (cris_arch_setup): New function.
782 (cris_usrregs_info, regs_info): New globals.
783 (cris_regs_info): New function.
784 (the_low_target): Adjust.
785 (initialize_low_arch): New function.
786 * linux-cris-low.c (tdesc_crisv32): Declare.
787 (cris_arch_setup): New function.
788 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
789 (cris_regs_info): New function.
790 (the_low_target): Adjust.
791 (initialize_low_arch): New function.
792 * linux-m32r-low.c (tdesc_m32r): Declare.
793 (m32r_arch_setup): New function.
794 (m32r_usrregs_info, regs_info): New globals.
795 (m32r_regs_info): Adjust.
796 (initialize_low_arch): New function.
797 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
798 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
799 (tic6x_usrregs_info): Forward declare.
800 (tic6x_read_description): New function, based on ...
801 (tic6x_arch_setup): ... this. Reimplement.
802 (target_regsets): Rename to ...
803 (tic6x_regsets): ... this, and make static.
804 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
805 (tic6x_regs_info): New function.
806 (the_low_target): Adjust.
807 (initialize_low_arch): New function.
808 * linux-xtensa-low.c (tdesc_xtensa): Declare.
809 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
810 (target_regsets): Rename to ...
811 (xtensa_regsets): ... this, and make static.
812 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
814 (xtensa_arch_setup, xtensa_regs_info): New functions.
815 (the_low_target): Adjust.
816 (initialize_low_arch): New function.
817 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
818 (nios2_arch_setup): Set the current process'es tdesc.
819 (target_regsets): Rename to ...
820 (nios2_regsets): ... this.
821 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
822 (nios2_regs_info): New function.
823 (the_low_target): Adjust.
824 (initialize_low_arch): New function.
825 * linux-aarch64-low.c (tdesc_aarch64): Declare.
826 (aarch64_arch_setup): Set the current process'es tdesc.
827 (target_regsets): Rename to ...
828 (aarch64_regsets): ... this.
829 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
830 (aarch64_regs_info): New function.
831 (the_low_target): Adjust.
832 (initialize_low_arch): New function.
833 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
835 (target_regsets): Rename to ...
836 (tile_regsets): ... this.
837 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
838 (tile_regs_info): New function.
839 (tile_arch_setup): Set the current process'es tdesc.
840 (the_low_target): Adjust.
841 (initialize_low_arch): New function.
842 * spu-low.c (tdesc_spu): Declare.
843 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
844 * win32-arm-low.c (tdesc_arm): Declare.
845 (arm_arch_setup): New function.
846 (the_low_target): Install arm_arch_setup instead of
848 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
849 (init_windows_x86): Rename to ...
850 (i386_arch_setup): ... this. Set `win32_tdesc'.
851 (the_low_target): Adjust.
852 * win32-low.c (win32_tdesc): New global.
853 (child_add_thread): Don't create the thread cache here.
854 (do_initial_child_stuff): Set the new process'es tdesc.
855 * win32-low.h (struct target_desc): Forward declare.
856 (win32_tdesc): Declare.
857 * lynx-i386-low.c (tdesc_i386): Declare global.
858 (lynx_i386_arch_setup): Set `lynx_tdesc'.
859 * lynx-low.c (lynx_tdesc): New global.
860 (lynx_add_process): Set the new process'es tdesc.
861 * lynx-low.h (struct target_desc): Forward declare.
862 (lynx_tdesc): Declare global.
863 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
864 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
865 * nto-low.c (nto_tdesc): New global.
866 (do_attach): Set the new process'es tdesc.
867 * nto-low.h (struct target_desc): Forward declare.
868 (nto_tdesc): Declare.
869 * nto-x86-low.c (tdesc_i386): Declare.
870 (nto_x86_arch_setup): Set `nto_tdesc'.
872 2013-06-04 Gary Benson <gbenson@redhat.com>
874 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
875 to qSupported response when appropriate.
876 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
877 with nonzero-length annex.
878 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
879 arguments supplied in annex.
881 2013-05-31 Doug Evans <dje@google.com>
884 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
885 64 bits in 64-cross-32 environment.
887 2013-05-28 Pedro Alves <palves@redhat.com>
889 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
890 (aarch64-without-fpu.c): Delete rule.
891 * configure.srv (aarch64*-*-linux*): Remove references to
892 aarch64-without-fpu.o and aarch64-without-fpu.xml.
893 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
896 2013-05-24 Pedro Alves <palves@redhat.com>
898 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
899 instead of strchr/decode_address. Error if the range isn't split
900 with a ','. Don't assume there's be a ':' in the action.
902 2013-05-23 Yao Qi <yao@codesourcery.com>
903 Pedro Alves <palves@redhat.com>
905 * linux-low.c (lwp_in_step_range): New function.
906 (linux_wait_1): If the thread was range stepping and stopped
907 outside the stepping range, report the stop to GDB. Otherwise,
908 continue stepping. Add range stepping debug output.
909 (linux_set_resume_request): Copy the step range from the resume
911 (linux_supports_range_stepping): New.
912 (linux_target_ops) <supports_range_stepping>: Set to
913 linux_supports_range_stepping.
914 * linux-low.h (struct linux_target_ops)
915 <supports_range_stepping>: New field.
916 (struct lwp_info) <step_range_start, step_range_end>: New fields.
917 * linux-x86-low.c (x86_supports_range_stepping): New.
918 (the_low_target) <supports_range_stepping>: Set to
919 x86_supports_range_stepping.
920 * server.c (handle_v_cont): Handle 'r' action.
921 (handle_v_requests): Append ";r" if the target supports range
923 * target.h (struct thread_resume) <step_range_start,
924 step_range_end>: New fields.
925 (struct target_ops) <supports_range_stepping>:
927 (target_supports_range_stepping): New macro.
929 2013-05-17 Joel Brobecker <brobecker@adacore.com>
931 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
932 confusion in comment.
934 2013-05-17 Joel Brobecker <brobecker@adacore.com>
936 * lynx-low.c (struct process_info_private): New type.
937 (lynx_add_process): New function.
938 (lynx_create_inferior, lynx_attach): Replace calls to
939 add_process by calls to lynx_add_process.
940 (lynx_resume): If PTID is null, then try using
941 current_process()->private->last_wait_event_ptid.
943 (lynx_clear_inferiors): Delete. The contents of that function
944 has been inlined in lynx_mourn;
945 (lynx_wait_1): Save the ptid in the process's private data.
946 (lynx_mourn): Free the process' private data. Replace call
947 to lynx_clear_inferiors by call to clear_inferiors.
949 2013-05-17 Yao Qi <yao@codesourcery.com>
951 * i386-low.c (i386_length_and_rw_bits): Move the comment to
954 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
956 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
957 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
958 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
959 PT_TEXT_END_ADDR guards. Update comments.
960 (linux_target_op) <read_offsets>: Conditionally define to
961 linux_read_offsets if the target is UCLIBC and if it defines
962 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
964 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
965 Andrew Jenner <andrew@codesourcery.com>
967 * Makefile.in (SFILES): Add linux-nios2-low.c.
968 (clean): Add action to delete nios2-linux.c.
969 (nios2-linux.c): New rule.
970 * configure.srv: Add nios2*-*-linux*.
971 * linux-nios2-low.c: New.
973 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
975 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
977 2013-04-25 Hui Zhu <hui@codesourcery.com>
980 * ax.c (ax_printf): Add fflush.
982 2013-04-22 Tom Tromey <tromey@redhat.com>
984 * Makefile.in (SFILES): Add filestuff.c.
985 (OBS): Add filestuff.o.
986 (filestuff.o): New target.
987 * config.in, configure: Rebuild.
988 * configure.ac: Check for fdwalk, pipe2.
990 2013-04-17 Pedro Alves <palves@redhat.com>
992 * configure.ac (USE_THREAD_DB): Delete variable.
993 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
994 Don't AC_SUBST USE_THREAD_DB.
995 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
996 * config.in, configure: Regenerate.
998 2013-04-16 Pedro Alves <palves@redhat.com>
1000 * linux-low.h (struct lwp_info) <thread_known>: Move under
1001 the USE_THREAD_DB #ifdef.
1003 2013-04-16 Pedro Alves <palves@redhat.com>
1005 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1006 (linux-low.o): Delete rule.
1007 * linux-low.h: Always include "gdb_thread_db.h" instead of
1008 conditionally including thread_db.h.
1009 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1012 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1014 * Makefile.in (install-only): Fix make install regression.
1016 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1018 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1019 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1021 * gdbserver.1: Remove.
1023 2013-03-22 Pedro Alves <palves@redhat.com>
1025 * linux-low.c (handle_extended_wait): Don't call
1026 linux_enable_event_reporting.
1028 2013-03-15 Tony Theodore <tonyt@logyst.com>
1031 * Makefile.in (SHELL): Use @SHELL@.
1033 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1035 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1038 2013-03-13 Joel Brobecker <brobecker@adacore.com>
1040 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1041 Remove extraneous NULL element.
1043 2013-03-13 Yao Qi <yao@codesourcery.com>
1045 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1046 'V' block in trace frame.
1048 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1050 * target.h (struct target_ops): Add btrace ops.
1051 (target_supports_btrace): New macro.
1052 (target_enable_btrace): New macro.
1053 (target_disable_btrace): New macro.
1054 (target_read_btrace): New macro.
1055 * gdbthread.h (struct thread_info): Add btrace field.
1056 * server.c: Include btrace-common.h.
1057 (handle_btrace_general_set): New function.
1058 (handle_btrace_enable): New function.
1059 (handle_btrace_disable): New function.
1060 (handle_general_set): Call handle_btrace_general_set.
1061 (handle_qxfer_btrace): New function.
1062 (struct qxfer qxfer_packets[]): Add btrace entry.
1063 * inferiors.c (remove_thread): Disable btrace.
1064 * linux-low: Include linux-btrace.h.
1065 (linux_low_enable_btrace): New function.
1066 (linux_low_read_btrace): New function.
1067 (linux_target_ops): Add btrace ops.
1068 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1069 Add srv_linux_btrace=yes.
1070 (x86_64-*-linux*): Add linux-btrace.o.
1071 Add srv_linux_btrace=yes.
1072 * configure.ac: Define HAVE_LINUX_BTRACE.
1073 * config.in: Regenerated.
1074 * configure: Regenerated.
1076 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1078 * server.c (handle_qxfer): Preserve error message if -3 is
1080 (qxfer): Document the -3 return value.
1082 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1084 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1085 (linux_btrace_h): New variable.
1086 (linux-btrace.o): New rule.
1088 2013-03-08 Stan Shebs <stan@codesourcery.com>
1089 Hafiz Abid Qadeer <abidh@codesourcery.com>
1091 * tracepoint.c (trace_buffer_size): New global.
1092 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1093 (init_trace_buffer): Change to one-argument function. Allocate
1094 trace buffer memory.
1095 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1096 handle QTBuffer:size packet.
1097 (cmd_bigqtbuffer_size): New function.
1098 (initialize_tracepoint): Call init_trace_buffer with
1099 DEFAULT_TRACE_BUFFER_SIZE.
1100 * server.c (handle_query): Add QTBuffer:size in the
1103 2013-03-07 Yao Qi <yao@codesourcery.com>
1105 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1106 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1108 (cmd_qtsp): Adjust condition. Do post increment.
1109 Set cur_action and cur_step_action back to 0.
1111 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1114 * linux-low.c (linux_write_memory): Return early success if LEN is
1117 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
1119 * configure.srv: Add x86_64-*-cygwin* as target.
1121 2013-02-28 Tom Tromey <tromey@redhat.com>
1123 * configure.ac: Invoke AC_SYS_LARGEFILE.
1124 * configure, config.in: Rebuild.
1126 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
1128 * win32-low.c: Throughout, fix format strings and casts of
1129 printf-like functions to avoid type related warnings on all
1131 (get_child_debug_event): Print dwDebugEventCode as hex since
1132 that's how it's usually documented.
1134 2013-02-28 Yao Qi <yao@codesourcery.com>
1136 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1139 2013-02-27 Jiong Wang <jiwang@tilera.com>
1141 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1142 (reg-tilegx32.c): New rule.
1143 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1144 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1145 different register info initializer according to elf class.
1146 (init_registers_tilgx32): New function. The tilegx32 register info
1148 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1149 (tile_store_gregset): Likewise.
1151 2013-02-27 Yao Qi <yao@codesourcery.com>
1153 * server.c (process_point_options): Print debug message when
1154 debug_threads is true.
1156 2013-02-26 Yao Qi <yao@codesourcery.com>
1158 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1160 2013-02-19 Pedro Alves <palves@redhat.com>
1161 Kai Tietz <ktietz@redhat.com>
1165 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1166 instead of strtoul to extract address from packet.
1167 (process_serial_event) <'z'>: Likewise.
1169 2013-02-18 Yao Qi <yao@codesourcery.com>
1171 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1173 2013-02-14 Pedro Alves <palves@redhat.com>
1177 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1178 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1180 2013-02-14 Pedro Alves <palves@redhat.com>
1182 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1184 2013-02-14 Pedro Alves <palves@redhat.com>
1186 * tracepoint.c (save_string): Delete.
1187 (add_tracepoint_action): Use savestring instead of save_string.
1189 2013-02-12 Pedro Alves <palves@redhat.com>
1191 * linux-xtensa-low.c: Ditto.
1192 * xtensa-xtregs.c: Ditto.
1194 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1196 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1199 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1201 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1202 aarch64_num_wp_regs and aarch64_num_bp_regs to
1203 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1205 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1207 * linux-aarch64-low.c (ps_get_thread_area): Replace
1208 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1210 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1211 Marcus Shawcroft <marcus.shawcroft@arm.com>
1212 Nigel Stephens <nigel.stephens@arm.com>
1213 Yufeng Zhang <yufeng.zhang@arm.com>
1215 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1216 (aarch64.c, aarch64-without-fpu.c): New targets.
1217 * configure.srv (aarch64*-*-linux*): New.
1218 * linux-aarch64-low.c: New file.
1220 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1222 * linux-low.c (handle_extended_wait, linux_create_inferior)
1223 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1224 (dequeue_one_deferred_signal, linux_resume_one_thread)
1225 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1226 (linux_tracefork_grandchild, linux_test_for_tracefork)
1227 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1228 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1229 where the argument is 0.
1231 2013-01-25 Yao Qi <yao@codesourcery.com>
1233 * event-loop.c: Include "queue.h".
1234 (gdb_event_p): New typedef.
1235 (struct gdb_event) <next_event>: Remove.
1236 (event_queue): Change to QUEUE(gdb_event_p).
1237 (async_queue_event): Remove.
1238 (gdb_event_xfree): New.
1239 (initialize_event_loop): New.
1240 (process_event): Use API from QUEUE.
1241 (wait_for_event): Likewise.
1242 * server.c (main): Call initialize_event_loop.
1243 * server.h (initialize_event_loop): Declare.
1245 2013-01-18 Yao Qi <yao@codesourcery.com>
1247 * ax.h (struct eval_agent_expr_context): New.
1248 (gdb_eval_agent_expr): Update declaration.
1249 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1250 TFRAME. Add new argument CTX.
1251 * server.h (struct eval_agent_expr_context): Declare.
1252 (agent_mem_read, agent_tsv_read): Update declaration.
1253 (agent_mem_read_string): Likewise.
1254 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1255 (add_traceframe_block): Add new argument TPOINT.
1256 Increase TPOINT->traceframe_usage.
1257 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1258 eval_tracepoint_agent_expr.
1259 (condition_true_at_tracepoint): Likewise.
1260 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1261 (agent_mem_read_string, agent_tsv_read): Likewise.
1263 2013-01-16 Yao Qi <yao@codesourcery.com>
1265 * linux-low.c (linux_resume_one_lwp): Don't check
1266 'lwp->bp_reinsert != 0'.
1268 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1269 Pedro Alves <palves@redhat.com>
1271 * lynx-low.c (ptrace_request_to_str): Define a temporary
1272 macro and use it to simplify this function's implementation.
1274 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1276 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1281 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1285 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1289 * lynx-low.c (lynx_resume): Use the resume_info parameter
1290 to determine the ptid for the lynx_ptrace call, unless
1291 it is equal to minus_one_ptid, in which case we use the
1292 ptid of the current_inferior.
1293 (lynx_wait_1): After having received a thread create/exit
1294 event, resume the inferior's execution using the signaling
1295 thread's ptid, rather than the old ptid.
1297 2013-01-07 Joel Brobecker <brobecker@adacore.com>
1299 * lynx-low.c (lynx_resume): Delete variable ret.
1301 2013-01-01 Joel Brobecker <brobecker@adacore.com>
1303 * gdbreplay.c (gdbreplay_version): Update copyright year.
1304 * server.c (gdbserver_version): Likewise.
1306 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1308 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1311 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1313 * lynx-low.c (ptrace_request_to_str): Add handling for
1316 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1318 * lynx-low.c (lynx_attach): Delete variable new_process.
1320 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1322 * lynx-low.c (lynx_create_inferior): Delete variable
1325 2012-12-17 Joel Brobecker <brobecker@adacore.com>
1327 * lynx-low.c (ptrace_request_to_str): Do not handle
1328 PTRACE_GETTHREADLIST if this macro does not exist.
1330 2012-12-15 Yao Qi <yao@codesourcery.com>
1332 * Makefile.in (OBS): Add notif.o.
1333 * notif.c, notif.h: New.
1334 * server.c: Include "notif.h".
1335 (struct vstop_notif) <next>: Remove.
1337 (queue_stop_reply): Update.
1338 (push_event, send_next_stop_reply): Remove.
1339 (discard_queued_stop_replies): Update.
1340 (notif_stop): New variable.
1341 (handle_v_stopped): Remove.
1342 (handle_v_requests): Don't call handle_v_stopped. Call
1343 handle_ack_notif instead.
1344 (queue_stop_reply_callback): Call notif_event_enque instead
1345 of queue_stop_reply.
1346 (handle_status): Don't call send_next_stop_reply, call
1347 notif_write_event instead.
1348 (kill_inferior_callback): Likewise.
1349 (detach_or_kill_inferior_callback): Likewise.
1350 (main): Call initialize_notif.
1351 (process_serial_event): Call QUEUE_is_empty.
1352 (handle_target_event): Call notif_push instead of push event.
1353 * server.h (push_event): Remove declaration.
1355 2012-12-10 Tom Tromey <tromey@redhat.com>
1357 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1358 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1361 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1362 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1363 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1364 (amd64-linux-ipa.o, ax.o): Rewrite.
1365 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1366 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1367 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1368 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1369 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1370 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1371 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1372 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1373 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1374 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1375 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1376 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1377 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1378 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1379 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1380 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1381 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1382 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1383 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1384 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1385 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1386 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1387 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1388 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1389 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1390 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1391 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1392 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1393 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1394 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1395 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1396 (reg-tilegx.o): Remove.
1397 (all_object_files): New macro.
1398 Include .deps files.
1399 * aclocal.m4, configure: Rebuild.
1400 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1401 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1402 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1404 2012-12-05 Tom Tromey <tromey@redhat.com>
1407 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1409 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
1411 * configure.ac: Check for linux/perf_event.h.
1412 * config.in: Regenerated.
1413 * configure: Regenerated.
1415 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1417 * hostio.c (handle_readlink): Decrease buffer size
1418 parameter passed to readlink by one byte.
1420 2012-11-26 Yao Qi <yao@codesourcery.com>
1422 * configure.ac (build_warnings): Append '-Wempty-body'.
1423 * configure: Regenerated.
1424 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1427 2012-11-15 Pierre Muller <muller@sourceware.org>
1429 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1430 * config.in: Regenerate.
1431 * configure: Regenerate.
1432 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1433 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1434 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1435 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1437 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1438 instead of <sys/wait.h> header.
1439 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1441 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
1443 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1444 (various make rules): Remove -DGDBSERVER
1446 2012-11-09 Yao Qi <yao@codesourcery.com>
1448 * spu-low.c (current_ptid): Move it to ..
1449 * gdbthread.h: ... here. New.
1450 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1451 * server.c (myresume, process_serial_event): Likewise.
1452 * thread-db.c (thread_db_find_new_threads): Likewise.
1453 * tracepoint.c (run_inferior_command): Likewise.
1455 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
1457 * server.c (handle_search_memory_1): Include access length in
1460 2012-09-05 Michael Brandt <michael.brandt@axis.com>
1462 * linux-crisv32-low.c: Fix compile errors.
1464 2012-09-04 Yao Qi <yao@codesourcery.com>
1466 * tracepoint.c (cmd_qtsv): Adjust debug message.
1467 Don't check CUR_TPOINT.
1469 2012-08-28 Yao Qi <yao@codesourcery.com>
1471 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1472 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1473 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1474 Remove declarations of xmalloc, xreallloc, xstrdup and
1476 * Makefile.in (libiberty_h): New.
1477 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1478 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1480 2012-08-23 Yao Qi <yao@codesourcery.com>
1482 * server.h: Remove declaration of 'xsnprintf'.
1484 2012-08-22 Keith Seitz <keiths@redhat.com>
1486 * server.h: Include build-gnulib-gbserver/config.h.
1487 * gdbreplay.c: Likewise.
1489 2012-08-08 Doug Evans <dje@google.com>
1491 * Makefile.in (SFILES): Add gdb_vecs.c.
1492 (OBS): Add gdb_vecs.o.
1493 (gdb_vecs_h, host_defs_h): New variables.
1494 (thread-db.o): Add $(gdb_vecs_h) dependency.
1495 (gdb_vecs.o): New rule.
1496 * thread-db.c: #include "gdb_vecs.h".
1497 (thread_db_load_search): Use a vector to iterate over path elements.
1498 Handle text appearing after "$pdir".
1500 * configure.ac: Add check for strstr.
1501 * config.in: Regenerate.
1502 * configure: Regenerate.
1504 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1506 * hostio.c (handle_pread): If pread fails, fall back to attempting
1508 (handle_pwrite): Likewise for pwrite.
1510 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1512 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1513 between unsupported TYPE and unimplementable ADDR/LEN combination.
1514 (arm_insert_point): Act on new return value.
1516 2012-07-31 Pedro Alves <palves@redhat.com>
1518 * server.c (process_point_options): Only skip tokens if we find
1519 one that is unrecognized. Don't treat 'X' specially while
1520 skipping unrecognized tokens.
1522 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1524 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1525 to 4-byte-align HW breakpoint addresses for Thumb.
1527 2012-07-27 Yao Qi <yao@codesourcery.com>
1531 * server.h: Declare gdb_agent_about_to_close.
1532 * target.c (kill_inferior): Include "agent.h".
1533 New. Send command 'kill'.
1534 * target.h (kill_inferior): Removed macro.
1535 * tracepoint.c (gdb_agent_about_to_close): New.
1536 (gdb_agent_helper_thread): Handle command 'close'.
1537 Wait endlessly until the inferior stops.
1538 Install gdb_agent_remove_socket to atexit hook.
1539 (agent_socket_name): New static variable.
1540 (gdb_agent_socket_init): Replace local variable 'name' with
1541 'agent_socket_name'.
1542 (gdb_agent_remove_socket): New.
1544 2012-07-27 Yao Qi <yao@codesourcery.com>
1546 * server.c (process_point_options): Stop at 'X' when parsing.
1548 2012-07-19 Michael Eager <eager@eagercon.com>
1550 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
1552 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1553 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1554 hardware breakpoint.
1556 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1558 * gdbserver/linux-low.c (initialize_low): Call
1559 linux_ptrace_init_warnings.
1561 2012-07-02 Doug Evans <dje@google.com>
1563 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1566 2012-07-02 Stan Shebs <stan@codesourcery.com>
1568 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1569 (ax.o): Add it to build rule.
1571 (OBS): Add format.o.
1572 (IPA_OBS): Add format.o.
1573 * server.c (handle_query): Claim support for breakpoint commands.
1574 (process_point_options): Add command case.
1575 (process_serial_event): Leave running if there are printfs in
1577 * mem-break.h (any_persistent_commands): Declare.
1578 (add_breakpoint_commands): Declare.
1579 (gdb_no_commands_at_breakpoint): Declare.
1580 (run_breakpoint_commands): Declare.
1581 * mem-break.c (struct point_command_list): New struct.
1582 (struct breakpoint): New field command_list.
1583 (any_persistent_commands): New function.
1584 (add_commands_to_breakpoint): New function.
1585 (add_breakpoint_commands): New function.
1586 (gdb_no_commands_at_breakpoint): New function.
1587 (run_breakpoint_commands): New function.
1588 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1590 * ax.c: Include format.h.
1591 (ax_printf): New function.
1592 (gdb_eval_agent_expr): Add printf opcode.
1594 2012-06-13 Yao Qi <yao@codesourcery.com>
1596 * server.c (start_inferior): Remove duplicated writes to fields
1597 'last_resume_kind' and 'last_status' of 'current_inferior'.
1599 2012-06-12 Yao Qi <yao@codesourcery.com>
1600 Pedro Alves <palves@redhat.com>
1602 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1604 * server.c (handle_v_cont): Extend comment.
1606 2012-06-11 Yao Qi <yao@codesourcery.com>
1608 * linux-low.c (linux_attach): Add 'static'.
1610 2012-06-06 Yao Qi <yao@codesourcery.com>
1612 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1614 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1616 Fix gcc -flto compilation warning.
1617 * server.c (main): Make variable multi_mode and attach volatile.
1619 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1621 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1622 if the platform doesn't know about it.
1624 2012-05-30 Jeff Kenton <jkenton@tilera.com>
1626 * Makefile.in (SFILES): Add linux-tile-low.c.
1627 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1628 * configure.srv: Handle tilegx-*-linux*.
1629 * linux-tile-low.c: New file.
1631 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1633 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1635 2012-05-24 Pedro Alves <palves@redhat.com>
1639 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
1641 2012-05-24 Pedro Alves <palves@redhat.com>
1645 Replace target_signal with gdb_signal throughout.
1647 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1649 * linux-low.c (linux_store_registers): Avoid the copying sequence
1650 when no data has been retrieved by ptrace.
1652 2012-05-22 Will Deacon <will.deacon@arm.com>
1654 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1655 Include asm/ptrace.h.
1656 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1659 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1661 * linux-low.c (linux_store_registers): Don't re-retrieve data
1662 with ptrace that has already been obtained from /proc. Always
1663 copy any data retrieved with ptrace to the buffer supplied.
1665 2012-05-11 Yao Qi <yao@codesourcery.com>
1666 Pedro Alves <palves@redhat.com>
1668 * linux-low.c (enum stopping_threads_kind): New.
1669 (stopping_threads): Change type to `enum stopping_threads_kind'.
1670 (handle_extended_wait): If stopping and suspending threads, leave
1671 the new_lwp suspended too.
1672 (linux_wait_for_event): Adjust.
1673 (stop_all_lwps): Set `stopping_threads' to
1674 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1675 whether we're suspending threads or just stopping them. Assert no
1678 2012-04-29 Yao Qi <yao@codesourcery.com>
1680 * server.h: Move some code to ...
1681 * gdbthread.h: ... here. New.
1682 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1683 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1684 (nto-low.o, win32-low.o): Likewise.
1685 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1686 * regcache.c, remote-utils.c, server.c: Likewise.
1687 * target.c, tracepoint.c, win32-low.c: Likewise.
1689 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1691 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1692 (PTRACE_ARG4_TYPE): Likewise.
1693 (PTRACE_XFER_TYPE): Likewise.
1694 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1695 ptrace to PTRACE_ARG3_TYPE.
1696 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1697 (PTRACE_ARG4_TYPE): Likewise.
1698 (PTRACE_XFER_TYPE): Likewise.
1699 (linux_detach_one_lwp): Cast fourth argument of
1700 ptrace to long then PTRACE_ARG4_TYPE.
1701 (regsets_fetch_inferior_registers): Cast third argument of
1702 ptrace to long then PTRACE_ARG3_TYPE.
1703 (regsets_store_inferior_registers): Likewise.
1705 2012-04-20 Pedro Alves <palves@redhat.com>
1707 * configure: Regenerate.
1709 2012-04-19 Pedro Alves <palves@redhat.com>
1711 * Makefile.in (GNULIB_BUILDDIR): New.
1712 (LIBGNU, INCGNU, GNULIB_H): Adjust.
1713 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
1714 (all, install-only, uninstall, clean-info, all-lib, clean): No
1715 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
1716 (maintainer-clean realclean distclean): Use subdir_do.
1718 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
1719 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
1720 * acinclude.m4: Include acx_configure_dir.m4.
1721 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
1722 calls. Call AC_PROG_RANLIB. Configure gnulib using
1725 (GNULIB_STDINT_H): Adjust.
1726 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
1727 * gdbreplay.c: Include build-gnulib/config.h.
1728 * server.h: Likewise.
1729 * aclocal.m4: Regenerate.
1730 * config.in: Regenerate.
1731 * configure: Regenerate.
1733 2012-04-19 Pedro Alves <palves@redhat.com>
1735 * Makefile.in (LIBGNU, INCGNU): Adjust.
1736 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
1737 (all, install-only, uninstall, clean-info, all-lib, clean)
1738 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
1739 * configure.ac: Adjust AC_OUTPUT output.
1740 * aclocal.m4: Regenerate.
1741 * configure: Regenerate.
1743 2012-04-19 Pedro Alves <palves@redhat.com>
1745 * Makefile.in (generated_files): New.
1746 (server_h): Remove the explicit dependency on config.h, and depend
1747 on $generated_files.
1749 2012-04-19 Pedro Alves <palves@redhat.com>
1751 * Makefile.in (INCGNU): Add -Ignulib.
1753 2012-04-19 Pedro Alves <palves@redhat.com>
1755 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
1756 (INCGNU): ... this, and spell out -I here.
1757 (GNULIB_LIB): Rename to ...
1759 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
1761 2012-04-19 Pedro Alves <palves@redhat.com>
1763 * config.in: Regenerate.
1765 2012-04-19 Pedro Alves <palves@redhat.com>
1767 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
1768 * server.h (memmem): Remove declaration.
1769 * config.in: Regenerate.
1770 * configure: Regenerate.
1772 2012-04-19 Yao Qi <yao@codesourcery.com>
1774 * Makefile.in (SFILES): Add common/vec.c.
1778 2012-04-19 Yao Qi <yao@codesourcery.com>
1780 * remote-utils.c (prepare_resume_reply): Replace with macro
1781 target_core_of_thread.
1782 * server.c (handle_qxfer_threads_proper): Likewise.
1783 * target.h (traget_core_of_thread): New macro.
1785 2012-04-18 Pedro Alves <palves@redhat.com>
1787 * aclocal.m4: Regenerate.
1788 * configure: Regenerate.
1790 2012-04-16 Yao Qi <yao@codesourcery.com>
1792 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
1793 duplicated on address.
1795 2012-04-16 Yao Qi <yao@codesourcery.com>
1797 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
1798 (struct tracepoint_action_ops) <send>: New field.
1799 (m_tracepoint_action_send, r_tracepoint_action_send): New.
1800 (agent_expr_send, x_tracepoint_action_send): New.
1801 (l_tracepoint_action_send): New.
1802 (cmd_qtdp): Download and install tracepoint
1803 according to `use_agent'.
1804 (run_inferior_command): Add one more parameter `len'.
1806 (tracepoint_send_agent): New.
1807 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
1809 2012-04-16 Yao Qi <yao@codesourcery.com>
1811 * tracepoint.c (download_tracepoints): Moved to ...
1812 (cmd_qtstart): ... here.
1814 2012-04-14 Yao Qi <yao@codesourcery.com>
1816 * tracepoint.c: Include inttypes.h.
1817 (struct collect_memory_action): Use sized types.
1818 (struct tracepoint): Likewise.
1819 (cmd_qtdp, stop_tracing): Update print specifiers.
1820 (cmd_qtp, response_tracepoint): Likewise.
1821 (collect_data_at_tracepoint): Likewise.
1822 (collect_data_at_step): Likewise.
1824 2012-04-14 Yao Qi <yao@codesourcery.com>
1826 Import gnulib module inttypes.
1827 * aclocal.m4, config.in, configure: Regenerated.
1829 2012-04-14 Yao Qi <yao@codesourcery.com>
1831 * Makefile.in (maintainer-clean, realclean, distclean): Remove
1832 Makefile and config.status at last.
1834 2012-04-13 Yao Qi <yao@codesourcery.com>
1836 * tracepoint.c: Include stdint.h unconditionally.
1838 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1840 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
1841 on BFD_HAVE_SYS_PROCFS_TYPE.
1842 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
1843 * configure: Regenerate.
1844 * config.in: Likewise.
1846 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
1848 * Makefile.in (clean): Also remove x32.c x32-linux.c
1849 x32-avx.c x32-avx-linux.c.
1850 (x32.o): New target.
1852 (x32-linux.o): Likewise.
1853 (x32-linux.c): Likewise.
1854 (x32-avx.o): Likewise.
1855 (x32-avx.c): Likewise.
1856 (x32-avx-linux.o): Likewise.
1857 (x32-avx-linux.c): Likewise.
1859 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
1860 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
1861 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
1862 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
1863 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
1864 i386/x32-avx-linux.xml.
1866 * linux-x86-low.c (init_registers_x32_linux): New prototype.
1867 (init_registers_x32_avx_linux): Likwise.
1868 (x86_linux_update_xmltarget): Call init_registers_x32_linux
1869 or init_registers_x32_avx_linux if linux_is_elf64 is false.
1871 2012-04-13 Pedro Alves <palves@redhat.com>
1873 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
1874 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
1875 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
1876 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
1879 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1881 * linux-x86-low.c (compat_x32_clock_t): New.
1882 (compat_x32_siginfo_t): Likewise.
1883 (compat_x32_siginfo_from_siginfo): Likewise.
1884 (siginfo_from_compat_x32_siginfo): Likewise.
1885 (linux_is_elf64): Likewise.
1886 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
1887 and siginfo_from_compat_x32_siginfo for x32.
1888 (x86_arch_setup): Set linux_is_elf64.
1890 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
1893 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
1895 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
1896 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
1897 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
1898 compatible with process.
1900 2012-04-12 Yao Qi <yao@codesourcery.com>
1902 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
1903 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
1904 (install-only, install-info, clean): Handle sub dir gnulib.
1905 (all-lib, am--refresh): New targets.
1906 (memmem.o): Remove target.
1907 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
1908 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
1909 (AC_REPLACE_FUNCS): Remove memmem.
1910 Invoke gl_INIT and AM_INIT_AUTOMAKE.
1911 (AC_OUTPUT): Generate Makefile in gnulib/.
1912 * aclocal.m4, config.in, configure: Regenerated.
1914 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
1916 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
1918 2012-04-05 Pedro Alves <palves@redhat.com>
1920 -Werror=strict-aliasing
1922 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
1925 2012-04-04 Pedro Alves <palves@redhat.com>
1927 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1928 (sparc_store_gregset_from_stack, sparc_store_gregset)
1929 (sparc_breakpoint_at): Fix formatting.
1931 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1933 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
1935 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
1936 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
1937 * config.in: Regenerate.
1938 * configure: Likewise.
1940 2012-03-29 Pedro Alves <palves@redhat.com>
1942 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
1943 Correct ptrace arguments.
1945 2012-03-28 Pedro Alves <palves@redhat.com>
1947 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
1948 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
1949 (IA64_FR1_REGNUM): New defines.
1950 (ia64_fetch_register): New.
1951 (the_low_target): Install it.
1952 * linux-low.h (struct linux_target_ops) <fetch_register>: New
1954 * linux-low.c (linux_fetch_registers): Try the
1955 the_low_target.fetch_register hook first.
1957 * linux-arm-low.c (the_low_target): Adjust.
1958 * linux-bfin-low.c (the_low_target): Adjust.
1959 * linux-cris-low.c (the_low_target): Adjust.
1960 * linux-crisv32-low.c (the_low_target): Adjust.
1961 * linux-m32r-low.c (the_low_target): Adjust.
1962 * linux-m68k-low.c (the_low_target): Adjust.
1963 * linux-mips-low.c (the_low_target): Adjust.
1964 * linux-ppc-low.c (the_low_target): Adjust.
1965 * linux-s390-low.c (the_low_target): Adjust.
1966 * linux-sh-low.c (the_low_target): Adjust.
1967 * linux-sparc-low.c (the_low_target): Adjust.
1968 * linux-tic6x-low.c (the_low_target): Adjust.
1969 * linux-x86-low.c (the_low_target): Adjust.
1970 * linux-xtensa-low.c (the_low_target): Adjust.
1972 2012-03-26 Pedro Alves <palves@redhat.com>
1974 * server.c (handle_qxfer_libraries): Don't bail early if
1975 the_target->qxfer_libraries_svr4 is not NULL.
1977 2012-03-26 Pedro Alves <palves@redhat.com>
1979 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
1981 2012-03-23 Pedro Alves <palves@redhat.com>
1983 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
1984 "library-list-svr4" element's start tag when the the DSO list is
1987 2012-03-23 Pedro Alves <palves@redhat.com>
1989 * linux-low.c (read_one_ptr): Read the inferior's pointer through
1990 a variable whose type size is the same as the inferior's pointer
1993 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
1995 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
1997 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1998 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1999 * linux-low.h: Include <signal.h>.
2000 (struct siginfo): Remove forward declaration.
2001 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2004 2012-03-21 Mike Frysinger <vapier@gentoo.org>
2006 * .gitignore: Ignore more files.
2008 2012-03-19 Pedro Alves <palves@redhat.com>
2009 Jan Kratochvil <jan.kratochvil@redhat.com>
2011 * server.c (cont_thread, general_thread): Add describing comments.
2012 (start_inferior): Clear `cont_thread'.
2013 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2016 2012-03-15 Yao Qi <yao@codesourcery.com>
2018 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2020 (cmd_qtdp): ... here.
2022 2012-03-15 Yao Qi <yao@codesourcery.com>
2024 * tracepoint.c (struct tracepoint_action_ops): New.
2025 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2026 (m_tracepoint_action_download): New.
2027 (r_tracepoint_action_download): New.
2028 (x_tracepoint_action_download): New.
2029 (l_tracepoint_action_download): New.
2030 (add_tracepoint_action): Install `action->ops' according type.
2031 (download_tracepoint_1): Move code `download' function pointer
2032 of various tracepoint_action_ops.
2034 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2036 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2037 linux_ptrace_attach_warnings.
2039 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2041 * Makefile.in (linux-ptrace.o): New.
2042 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2043 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2044 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2045 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2046 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2048 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2050 2012-03-08 Yao Qi <yao@codesourcery.com>
2051 Pedro Alves <palves@redhat.com>
2053 Fix PR server/13392.
2054 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2056 * tracepoint.c (remove_tracepoint): New.
2057 (cmd_qtdp): Call remove_tracepoint when failed to install.
2059 2012-03-07 Pedro Alves <palves@redhat.com>
2061 * linux-low.c (get_detach_signal): New.
2062 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2063 Pass on pending signals to PTRACE_DETACH. Check the result of the
2065 * server.c (program_signals, program_signals_p): New.
2066 (handle_general_set): Handle QProgramSignals.
2067 * server.h (program_signals, program_signals_p): Declare.
2069 2012-03-05 Pedro Alves <palves@redhat.com>
2070 Jan Kratochvil <jan.kratochvil@redhat.com>
2072 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2075 2012-03-03 Yao Qi <yao@codesourcery.com>
2077 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2078 agent_look_up_symbols.
2080 2012-03-03 Yao Qi <yao@codesourcery.com>
2082 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2083 (linux-x86-low.o): Likewise.
2084 * server.h: Remove in_process_agent_loaded.
2085 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2089 2012-03-03 Yao Qi <yao@codesourcery.com>
2091 * tracepoint.c (gdb_agent_capability): New global.
2092 (in_process_agent_loaded_ust): Renamed to
2093 `in_process_agent_supports_ust'.
2095 (in_process_agent_supports_ust): Call agent_capability_check.
2096 (clear_installed_tracepoints): Assert that agent supports
2099 2012-03-03 Yao Qi <yao@codesourcery.com>
2101 * linux-low.c (linux_supports_agent): New.
2102 (linux_target_ops): Initialize field `supports_agent' with
2103 linux_supports_agent.
2104 * target.h (struct target_ops) <supports_agent>: New.
2105 (target_supports_agent): New macro.
2106 * server.c (handle_general_set): Handle packet 'QAgent'.
2107 (handle_query): Send `QAgent+'.
2108 * Makefile.in (server.o): Depends on agent.h.
2110 2012-03-03 Yao Qi <yao@codesourcery.com>
2112 * Makefile.in (OBS): Add agent.o.
2113 Add new rule for agent.o.
2114 Track dependence of tracepoint.c on agent.h.
2115 * tracepoint.c (run_inferior_command_1):
2116 (run_inferior_command): Call agent_run_command.
2117 (gdb_ust_connect_sync_socket): Deleted. Move it to
2119 (resume_thread, stop_thread): Likewise.
2120 (gdb_ust_socket_init): Renamed to ...
2121 (gdb_agent_socket_init): ... New.
2122 (gdb_ust_thread): Renamed to ...
2123 (gdb_agent_helper_thread): ... New.
2124 (gdb_ust_init): Move some code to ...
2125 (gdb_agent_init): ... here. New.
2126 [HAVE_UST]: Call gdb_ust_init.
2127 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2128 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2129 * config.in, configure: Regenerated.
2131 2012-03-02 Pedro Alves <palves@redhat.com>
2133 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2134 * linux-low.c (struct simple_pid_list): New.
2135 (stopped_pids): New a struct simple_pid_list pointer.
2136 (add_to_pid_list, pull_pid_from_list): New.
2137 (handle_extended_wait): Don't assume the first signal new children
2138 report is SIGSTOP. Adjust call to pull_pid_from_list.
2139 (linux_wait_for_lwp): Adjust.
2141 2012-03-02 Yao Qi <yao@codesourcery.com>
2143 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2146 2012-03-02 Yao Qi <yao@codesourcery.com>
2148 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2149 `stop_pc' and `tpoint'. Update caller.
2151 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2153 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2154 * linux-low.c (use_linux_regsets): New macro.
2155 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2156 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2157 (linux_register_in_regsets): New function.
2158 (usr_fetch_inferior_registers): Skip registers covered by
2160 (usr_store_inferior_registers): Likewise.
2161 (usr_fetch_inferior_registers): New macro.
2162 (usr_store_inferior_registers): Likewise.
2163 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2164 (linux_store_registers): Likewise.
2165 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2167 (init_registers_mips64_dsp_linux): Likewise.
2168 (init_registers_mips_linux): New macro.
2169 (init_registers_mips_dsp_linux): Likewise.
2170 (mips_dsp_num_regs): Likewise.
2171 (DSP_BASE, DSP_CONTROL): New fallback macros.
2172 (mips_base_regs): New macro.
2173 (mips_regmap): Use it. Fix the size.
2174 (mips_dsp_regmap): New variable.
2175 (mips_dsp_regset_bitmap): Likewise.
2176 (mips_arch_setup): New function.
2177 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2179 (mips_cannot_store_register): Likewise.
2180 (the_low_target): Update .arch_setup, .num_regs and .regmap
2181 initializers. Add .regset_bitmap initializer.
2182 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2184 * linux-bfin-low.c (the_low_target): Likewise.
2185 * linux-cris-low.c (the_low_target): Likewise.
2186 * linux-crisv32-low.c (the_low_target): Likewise.
2187 * linux-ia64-low.c (the_low_target): Likewise.
2188 * linux-m32r-low.c (the_low_target): Likewise.
2189 * linux-m68k-low.c (the_low_target): Likewise.
2190 * linux-ppc-low.c (the_low_target): Likewise.
2191 * linux-s390-low.c (the_low_target): Likewise.
2192 * linux-sh-low.c (the_low_target): Likewise.
2193 * linux-sparc-low.c (the_low_target): Likewise.
2194 * linux-tic6x-low.c (the_low_target): Likewise.
2195 * linux-x86-low.c (the_low_target): Likewise.
2196 * linux-xtensa-low.c (the_low_target): Likewise.
2197 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2198 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2199 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2201 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2202 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2204 2012-02-29 Yao Qi <yao@codesourcery.com>
2205 Pedro Alves <palves@redhat.com>
2207 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2208 `step_over_finished' is true.
2210 2012-02-27 Pedro Alves <palves@redhat.com>
2212 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2213 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2215 2012-02-27 Pedro Alves <palves@redhat.com>
2218 * linux-low.c (pid_is_stopped): New.
2219 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2221 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
2223 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2226 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2228 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2230 2012-02-24 Luis Machado <lgustavo@codesourcery>
2232 * server.c (handle_query): Advertise support for target-side
2233 breakpoint condition evaluation.
2234 (process_point_options): New function.
2235 (process_serial_event): When inserting a breakpoint, check for
2236 a target-side condition that should be evaluated.
2238 * mem-break.c: Include regcache.h and ax.h.
2239 (point_cond_list_t): New data structure.
2240 (breakpoint) <cond_list>: New field.
2241 (find_gdb_breakpoint_at): Make non-static.
2242 (delete_gdb_breakpoint_at): Clear any target-side
2244 (clear_gdb_breakpoint_conditions): New function.
2245 (add_condition_to_breakpoint): Likewise.
2246 (add_breakpoint_condition): Likewise.
2247 (gdb_condition_true_at_breakpoint): Likewise.
2248 (gdb_breakpoint_here): Return result directly instead
2249 of going through a local variable.
2251 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2252 (clear_gdb_breakpoint_conditions): Likewise.
2253 (add_breakpoint_condition): Likewise.
2254 (gdb_condition_true_at_breakpoint): Likewise.
2256 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2257 (need_step_over_p): Take target-side breakpoint condition into
2260 2012-02-24 Luis Machado <lgustavo@codesourcery>
2262 * server.h: Include tracepoint.h.
2263 (agent_mem_read, agent_get_trace_state_variable_value,
2264 agent_set_trace_state_variable_value,
2265 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2266 get_set_tsv_func_addr): New prototypes.
2268 * ax.h: New include file.
2269 * ax.c: New source file.
2271 * tracepoint.c: Include ax.h.
2272 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2273 agent_expr, eval_result_type): Move to ax.h.
2274 (parse_agent_expr): Rename to ...
2275 (gdb_parse_agent_expr): ... this, make it non-static and move
2277 (unparse_agent_expr) Rename to ...
2278 (gdb_unparse_agent_expr): ... this, make it non-static and move
2280 (eval_agent_expr): Rename to ...
2281 (eval_tracepoint_agent_expr): ... this.
2282 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2283 forward declarations.
2284 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2285 (agent_get_trace_state_variable_value): New function.
2286 (agent_set_trace_state_variable_value): New function.
2287 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2288 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2289 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2290 (condition_true_at_tracepoint): Likewise.
2291 (parse_agent_expr): Rename to ...
2292 (gdb_parse_agent_expr): ... this and move to ax.c.
2293 (unparse_agent_expr): Rename to ...
2294 (gdb_unparse_agent_expr): ... this and move to ax.c.
2295 (gdb_agent_op_name): Move to ax.c.
2296 (eval_agent_expr): Rename to ...
2297 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2299 (eval_tracepoint_agent_expr): New function.
2300 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
2302 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2304 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2305 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2306 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2307 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2308 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2309 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2310 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2311 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2312 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2313 (compile_bytecodes): Remove forward declaration.
2314 (is_goto_target): Move to ax.c.
2315 (compile_bytecodes): Move to ax.c and call
2316 agent_get_trace_state_variable_value (...) and
2317 agent_set_trace_state_variable_value (...).
2319 * Makefile.in: Update ax.c and IPA dependencies.
2321 2012-02-24 Pedro Alves <palves@redhat.com>
2323 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2324 (cmd_bigqtbuffer_circular): ... this. Only handle
2325 'QTBuffer:circular:'.
2326 (handle_tracepoint_general_set): Adjust.
2328 2012-02-16 Yao Qi <yao@codesourcery.com>
2330 * inferiors.c: Move code to ...
2331 * dll.c: .... here. New.
2332 * server.h: Declare clear_dlls.
2333 * Makefile.in (SFILES): Add dll.c.
2337 2012-02-11 Yao Qi <yao@codesourcery.com>
2339 * server.c: (handle_monitor_command): Add a new parameter
2341 (handle_query): Update caller.
2343 2012-02-09 Joel Brobecker <brobecker@adacore.com>
2345 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2346 * configure, config.in: Regenerate.
2347 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2350 2012-02-02 Pedro Alves <palves@redhat.com>
2352 Try SIGKILL first, then PTRACE_KILL.
2353 * linux-low.c (linux_kill_one_lwp): New.
2354 (linux_kill_one_lwp): Rename to ...
2355 (kill_one_lwp_callback): ... this. Use the new
2358 2012-02-02 Pedro Alves <palves@redhat.com>
2360 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2363 2012-01-27 Pedro Alves <palves@redhat.com>
2365 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2366 (elf_64_file_p): Make static.
2367 (linux_pid_exe_is_elf_64_file): New.
2368 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2369 Delete declarations.
2370 (linux_pid_exe_is_elf_64_file): Declare.
2371 * linux-x86-low.c (x86_arch_setup): Use
2372 linux_pid_exe_is_elf_64_file.
2374 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2376 * linux-low.c (linux_wait_for_event_1): Rename to ...
2377 (linux_wait_for_event): ... here and merge it with former
2378 linux_wait_for_event - new variable wait_ptid, use it.
2379 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2381 2012-01-23 Pedro Alves <palves@redhat.com>
2383 * server.c (main): Avoid yet another case of infinite loop while
2384 detaching/killing after a longjmp.
2386 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2389 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2391 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2393 * hostio.c (handle_readlink): New function.
2394 (handle_vFile): Call it to handle "vFile:readlink" packets.
2396 2012-01-20 Pedro Alves <palves@redhat.com>
2397 Ulrich Weigand <ulrich.weigand@linaro.org>
2399 * server.c (handle_v_requests): Only support vAttach and vRun to
2400 start multiple processes when in extended protocol mode.
2402 2012-01-17 Pedro Alves <palves@redhat.com>
2404 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2405 memalign plus mprotect to allocate the scratch buffer.
2407 2012-01-13 Pedro Alves <palves@redhat.com>
2409 * server.c (attach_inferior): Clear `cont_thread'.
2411 2012-01-13 Pedro Alves <palves@redhat.com>
2413 * server.c (main): Avoid infinite loop while detaching/killing
2416 2012-01-09 Doug Evans <dje@google.com>
2418 * server.c (start_inferior): Set last_ptid in --wrapper case.
2420 2012-01-06 Yao Qi <yao@codesourcery.com>
2422 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2424 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2426 2012-01-04 Yao Qi <yao@codesourcery.com>
2428 * tracepoint.c (cmd_qtdp): Print debug message
2429 for static tracepoint.
2431 2012-01-04 Yao Qi <yao@codesourcery.com>
2433 * tracepoint.c (trace_vdebug): Differentiate debug message
2434 between gdbserver and IPA.
2436 2012-01-03 Yao Qi <yao@codesourcery.com>
2438 * tracepoint.c (tracepoint_was_hit): Don't collect for
2441 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2443 * terminal.h: Reformat copyright header.
2445 2012-01-02 Joel Brobecker <brobecker@adacore.com>
2447 * server.c (gdbserver_version): Update copyright year.
2448 * gdbreplay.c (gdbreplay_version): Likewise.
2450 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2452 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2455 2011-12-18 Hui Zhu <teawater@gmail.com>
2456 * linux-low.c (linux_create_inferior): Save return value to ret.
2458 2011-12-18 Hui Zhu <teawater@gmail.com>
2460 * linux-low.c (linux_create_inferior): Save return value to ret.
2462 2011-12-16 Doug Evans <dje@google.com>
2464 * linux-low.c (linux_create_inferior): If stdio connection,
2465 redirect stdin from /dev/null, stdout to stderr.
2466 * remote-utils.c (remote_is_stdio): New static global.
2467 (remote_connection_is_stdio): New function.
2468 (remote_prepare): Handle stdio connection.
2469 (remote_open): Ditto.
2470 (remote_close): Don't close stdin for stdio connections.
2471 (read_prim,write_prim): New functions. Replace all calls to
2472 read/write to these.
2473 * server.c (main): Watch for "-" argument. Move call to
2474 remote_prepare before start_inferior.
2475 * server.h (STDIO_CONNECTION_NAME): New macro.
2476 (remote_connection_is_stdio): Declare.
2478 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2479 in debugging output.
2481 2011-12-15 Yao Qi <yao@codesourcery.com>
2483 * tracepoint.c: Include sys/syscall.h.
2484 (gdb_ust_thread): Remove preprocessor conditional.
2486 2011-12-14 Pedro Alves <pedro@codesourcery.com>
2488 * linux-low.c (linux_detach_one_lwp): Call
2489 the_low_target.prepare_to_resume before detaching.
2491 2011-12-14 Yao Qi <yao@codesourcery.com>
2493 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2496 2011-12-14 Yao Qi <yao@codesourcery.com>
2498 * i386-low.c (i386_low_stopped_data_address): Initialize local
2501 2011-12-13 Pedro Alves <pedro@codesourcery.com>
2505 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2506 DR_CONTROL unless necessary. Extend comments.
2507 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2508 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2510 2011-12-13 Yao Qi <yao@codesourcery.com>
2512 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2514 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2516 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2518 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2519 Print new debug message for such case.
2521 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2523 Fix overlapping memcpy.
2524 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2525 the read_inferior_memory transfer.
2526 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2527 write_inferior_memory transfer.
2528 (set_fast_tracepoint_jump): New variable buf. Use it for the
2529 read_inferior_memory and write_inferior_memory transfers.
2530 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2531 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2532 Use it for the write_inferior_memory transfer.
2533 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2536 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2538 * linux-low.c (fetch_register, store_register): Make code
2539 consistent, fix formatting.
2541 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2543 * linux-low.c (usr_store_inferior_registers): Factor out code
2544 to handle individual registers into...
2545 (store_register): ... this new function.
2547 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2549 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2550 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2551 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2552 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2553 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2554 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2555 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2556 (srv_xmlfiles): Add new XML files.
2558 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2560 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2561 (init_registers_s390_linux32v1): Add prototype.
2562 (init_registers_s390_linux32v2): Likewise.
2563 (init_registers_s390_linux64v1): Likewise.
2564 (init_registers_s390_linux64v2): Likewise.
2565 (init_registers_s390x_linux64v1): Likewise.
2566 (init_registers_s390x_linux64v2): Likewise.
2567 (s390_num_regs): Increment to 52.
2568 (s390_regmap): Add orig_r2 register.
2569 (s390_num_regs_3264): Increment to 68.
2570 (s390_regmap_3264): Add orig_r2 register.
2571 (s390_collect_ptrace_register): Handle orig_r2 register.
2572 (s390_supply_ptrace_register): Likewise.
2573 (s390_fill_last_break): New function.
2574 (s390_store_last_break): Likewise.
2575 (s390_fill_system_call): New function.
2576 (s390_store_system_call): Likewise.
2577 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2579 (s390_check_regset): New function.
2580 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2581 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2582 Update target_regsets for available register sets.
2584 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2585 Jan Kratochvil <jan.kratochvil@redhat.com>
2587 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2588 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2590 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2591 * linux-low.h (struct process_info_private): New member r_debug.
2592 * server.c (handle_qxfer_libraries): Call
2593 the_target->qxfer_libraries_svr4.
2594 (handle_qxfer_libraries_svr4): New function.
2595 (qxfer_packets): New entry "libraries-svr4".
2596 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2597 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2598 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2599 PACKET_qXfer_libraries_svr4.
2601 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2603 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2604 PSW address/mask between 8-byte and 16-byte formats.
2605 (s390_supply_ptrace_register): Likewise.
2606 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2607 basic addressing mode bit.
2609 2011-11-24 Stan Shebs <stan@codesourcery.com>
2611 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2613 2011-11-17 Stan Shebs <stan@codesourcery.com>
2615 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2616 (tracing_start_time): New global.
2617 (tracing_stop_time): New global.
2618 (tracing_user_name): New global.
2619 (tracing_notes): New global.
2620 (tracing_stop_note): New global.
2621 (cmd_qtstart): Set traceframe_usage, start_time.
2622 (stop_tracing): Set stop_time.
2623 (cmd_qtstatus): Report additional status.
2624 (cmd_qtp): New function.
2625 (handle_tracepoint_query): Call it.
2626 (cmd_qtnotes): New function.
2627 (handle_tracepoint_general_set): Call it.
2628 (get_timestamp): Rename from tsv_get_timestamp.
2630 2011-11-14 Stan Shebs <stan@codesourcery.com>
2631 Kwok Cheung Yeung <kcy@codesourcery.com>
2633 * linux-x86-low.c (small_jump_insn): New.
2634 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2635 trampoline and error message, build a trampoline and issue a small
2636 jump instruction to it.
2637 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2638 trampoline and error message.
2639 (x86_get_min_fast_tracepoint_insn_len): New.
2640 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2641 * linux-low.h (struct linux_target_ops): Add arguments to
2642 install_fast_tracepoint_jump_pad operation, add new operation.
2643 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2645 (linux_get_min_fast_tracepoint_insn_len): New function.
2646 (linux_target_op): Add new operation.
2647 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2648 (gdb_trampoline_buffer_end): Ditto.
2649 (gdb_trampoline_buffer_error): Ditto.
2650 (struct ipa_sym_addresses): Add fields for new IPA variables.
2651 (symbol_list): Add entries for new IPA variables.
2652 (struct tracepoint): Add fields to hold the address range of the
2653 trampoline used by the tracepoint.
2654 (trampoline_buffer_head): New static variable.
2655 (trampoline_buffer_tail): Ditto.
2656 (claim_trampoline_space): New function.
2657 (have_fast_tracepoint_trampoline_buffer): New function.
2658 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2660 (install_fast_tracepoint): Ditto, also add error buffer argument.
2661 (cmd_qtminftpilen): New function.
2662 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2663 (fast_tracepoint_from_trampoline_address): New function.
2664 (fast_tracepoint_collecting): Handle trampoline as part of jump
2666 (set_trampoline_buffer_space): New function.
2667 (initialize_tracepoint): Initialize new IPA variables.
2668 * target.h (struct target_ops): Add arguments to
2669 install_fast_tracepoint_jump_pad operation, add new
2670 get_min_fast_tracepoint_insn_len operation.
2671 (target_get_min_fast_tracepoint_insn_len): New.
2672 (install_fast_tracepoint_jump_pad): Add arguments.
2673 * server.h (IPA_BUFSIZ): Define.
2674 * linux-i386-ipa.c: Include extra header files.
2675 (initialize_fast_tracepoint_trampoline_buffer): New function.
2676 (initialize_low_tracepoint): Call it.
2677 * server.h (set_trampoline_buffer_space): Declare.
2678 (claim_trampoline_space): Ditto.
2679 (have_fast_tracepoint_trampoline_buffer): Ditto.
2681 2011-11-14 Yao Qi <yao@codesourcery.com>
2683 * server.c (handle_query): Handle InstallInTrace for qSupported.
2684 * tracepoint.c (add_tracepoint): Sort list.
2685 (install_tracepoint, download_tracepoint): New.
2686 (cmd_qtdp): Call them to install and download tracepoints.
2687 (sort_tracepoints): Removed.
2688 (cmd_qtstart): Update.
2690 2011-11-14 Yao Qi <yao@codesourcery.com>
2692 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2693 * mem-break.h: Declare.
2694 * tracepoint.c (cmd_qtstart): Move some code to ...
2695 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2697 (download_tracepoints): Move some code to ...
2698 (download_tracepoint_1): ... here. New.
2700 2011-11-08 Yao Qi <yao@codesourcery.com>
2702 * remote-utils.c (relocate_instruction): A comment fix.
2704 2011-11-07 Joel Brobecker <brobecker@adacore.com>
2706 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2707 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2708 dr_status_mirror and dr_control_mirror from debug_reg_state.
2709 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2710 (i386_initial_stuff): Remove use of deleted globals.
2711 (i386_get_thread_context, i386_set_thread_context,
2712 i386_thread_added): Use dr_status_mirror and dr_control_mirror
2713 from debug_reg_state.
2715 2011-11-05 Yao Qi <yao@codesourcery.com>
2717 * tracepoint.c (gdb_collect): Loop over tracepoints of same
2718 address as TPOINT's.
2720 2011-11-02 Stan Shebs <stan@codesourcery.com>
2722 * tracepoint.c (agent_mem_read_string): New function.
2723 (eval_agent_expr): Call it for tracenz.
2724 * server.c (handle_query): Report support for tracenz.
2726 2011-11-02 Yao Qi <yao@codesourcery.com>
2728 * tracepoint.c (cmd_qtstart): Remove unused local variables.
2730 2011-11-02 Yao Qi <yao@codesourcery.com>
2732 * target.h: Fix a typo in comment.
2734 2011-10-31 Pedro Alves <pedro@codesourcery.com>
2736 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
2737 clobber the breakpoints' shadows with fast tracepoint jumps.
2738 * mem-break.h (check_mem_write): Add `myaddr' parameter.
2739 * target.c (write_inferior_memory): Also pass MYADDR down to
2742 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
2744 * configure.ac: Check support for personality routine.
2745 * configure: Regenerate.
2746 * config.in: Likewise.
2747 * linux-low.c: Include <sys/personality.h>.
2748 Define ADDR_NO_RANDOMIZE if necessary.
2749 (linux_create_inferior): Disable address space randomization when
2750 forking inferior, if requested.
2751 (linux_supports_disable_randomization): New function.
2752 (linux_target_ops): Install it.
2753 * server.h (disable_randomization): Declare.
2754 * server.c (disable_randomization): New global variable.
2755 (handle_general_set): Handle QDisableRandomization.
2756 (handle_query): Likewise for qSupported.
2757 (main): Support --disable-randomization and --no-disable-randomization
2758 command line arguments.
2759 * target.h (struct target_ops): Add supports_disable_randomization.
2760 (target_supports_disable_randomization): New macro.
2762 2011-09-29 Mike Frysinger <vapier@gentoo.org>
2764 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
2766 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
2767 [!PT_GETDSBT] (target_loadmap): New definition.
2768 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
2769 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
2770 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
2771 and PT_GETDSBT to LINUX_LOADMAP.
2772 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
2773 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
2775 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2777 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
2778 (arm_linux_hwbp_cap): New static variable.
2779 (arm_linux_get_hwbp_cap): Replace by ...
2780 (arm_linux_init_hwbp_cap): ... this new function.
2781 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
2782 (arm_linux_get_hw_watchpoint_count): Likewise.
2783 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2784 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
2785 (arm_prepare_to_resume): Use perror_with_name instead of error.
2787 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
2789 * linux-arm-low.c: Include <signal.h>.
2790 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
2791 (struct arm_linux_hwbp_cap): New data type.
2792 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
2793 (struct arm_linux_hw_breakpoint): New data type.
2794 (MAX_BPTS, MAX_WPTS): Define.
2795 (struct arch_process_info, struct arch_lwp_info): New data types.
2796 (arm_linux_get_hwbp_cap): New function.
2797 (arm_linux_get_hw_breakpoint_count): Likewise.
2798 (arm_linux_get_hw_watchpoint_count): Likewise.
2799 (arm_linux_get_hw_watchpoint_max_length): Likewise.
2800 (arm_hwbp_control_initialize): Likewise.
2801 (arm_hwbp_control_is_enabled): Likewise.
2802 (arm_hwbp_control_is_initialized): Likewise.
2803 (arm_hwbp_control_disable): Likewise.
2804 (arm_linux_hw_breakpoint_equal): Likewise.
2805 (arm_linux_hw_point_initialize): Likewise.
2806 (struct update_registers_data): New data structure.
2807 (update_registers_callback: New function.
2808 (arm_insert_point): Likewise.
2809 (arm_remove_point): Likewise.
2810 (arm_stopped_by_watchpoint): Likewise.
2811 (arm_stopped_data_address): Likewise.
2812 (arm_new_process): Likewise.
2813 (arm_new_thread): Likewise.
2814 (arm_prepare_to_resume): Likewise.
2815 (the_low_target): Register arm_insert_point, arm_remove_point,
2816 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
2817 arm_new_thread, and arm_prepare_to_resume.
2819 2011-09-15 Stan Shebs <stan@codesourcery.com>
2821 * server.h (struct emit_ops): Add compare-goto fields.
2822 * tracepoint.c (gdb_agent_op_sizes): New table.
2823 (emit_eq_goto): New function.
2824 (emit_ne_goto): New function.
2825 (emit_lt_goto): New function.
2826 (emit_le_goto): New function.
2827 (emit_gt_goto): New function.
2828 (emit_ge_goto): New function.
2829 (is_goto_target): New function.
2830 (compile_bytecodes): Recognize special cases of compare-goto
2831 combinations and call specialized emitters for them.
2832 * linux-x86-low.c (amd64_emit_eq_goto): New function.
2833 (amd64_emit_ne_goto): New function.
2834 (amd64_emit_lt_goto): New function.
2835 (amd64_emit_le_goto): New function.
2836 (amd64_emit_gt_goto): New function.
2837 (amd64_emit_ge_goto): New function.
2838 (amd64_emit_ops): Add the new functions.
2839 (i386_emit_eq_goto): New function.
2840 (i386_emit_ne_goto): New function.
2841 (i386_emit_lt_goto): New function.
2842 (i386_emit_le_goto): New function.
2843 (i386_emit_gt_goto): New function.
2844 (i386_emit_ge_goto): New function.
2845 (i386_emit_ops): Add the new functions.
2847 2011-09-08 Stan Shebs <stan@codesourcery.com>
2849 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
2850 (i386_emit_epilogue): Restore %ebx.
2852 2011-08-31 Jie Zhang <jzhang918@gmail.com>
2854 * server.c (step_thread): Remove definition.
2855 (process_serial_event): Don't handle Hs.
2856 * server.h (step_thread): Remove declaration.
2857 * target.c (set_desired_inferior): Remove use of step_thread.
2859 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2861 * linux-low.c: Include linux-procfs.h.
2862 (linux_attach_lwp_1): Update comments.
2863 (linux_attach): Scan for existing threads when attaching to a
2864 process that is the tgid.
2865 * Makefile.in: Update dependencies.
2867 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
2869 * configure.srv: Add linux-procfs.o dependencies.
2871 2011-08-14 Yao Qi <yao@codesourcery.com>
2873 * target.h (struct target_ops): Fix indent.
2874 * win32-low.c (win32_target_ops): Fix comment.
2876 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
2877 Yao Qi <yao@codesourcery.com>
2879 * Makefile.in (clean): Remove tic6x-*.c files.
2880 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
2881 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
2882 (tic6x-c64xp-linux.c): Likewise.
2883 * configure.srv: Add support for tic6x-*-uclinux.
2884 * linux-tic6x-low.c: New.
2885 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
2887 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
2888 Yao Qi <yao@codesourcery.com>
2890 * target.h (struct target_ops): Add read_loadmap.
2891 * linux-low.c (struct target_loadseg): New type.
2892 (struct target_loadmap): New type.
2893 (linux_read_loadmap): New function.
2894 (linux_target_ops): Add linux_read_loadmap.
2895 * server.c (handle_query): Support qXfer:fdpic:read packet.
2896 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
2899 2011-08-05 Eli Zaretskii <eliz@gnu.org>
2901 * win32-low.c: Include <stdint.h>.
2903 2011-07-22 Pedro Alves <pedro@codesourcery.com>
2905 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
2906 to the inferior here.
2907 (i386_remove_aligned_watchpoint): Ditto.
2908 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
2909 fit part of the watchpoint in the debug registers.
2910 (i386_update_inferior_debug_regs): New.
2911 (i386_low_insert_watchpoint): Work on a local mirror of the debug
2912 registers, and only update the inferior on success.
2913 (i386_low_remove_watchpoint): Ditto.
2915 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
2917 * linux-low.c (compare_ints, unique, list_threads, show_process,
2918 linux_core_of_thread): Delete.
2919 (linux_target_ops): Change linux_core_of_thread to
2920 linux_common_core_of_thread.
2921 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
2922 * utils.c (malloc_failure): Change type of argument.
2923 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
2924 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
2925 common/linux-osdata.c, common/ptid.c and common/buffer.c.
2926 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
2927 (IPA_OBJS): Add common-utils-ipa.o.
2928 (ptid_h, linux_osdata_h): New macros.
2929 (server_h): Add common/common-utils.h, common/xml-utils.h,
2930 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
2932 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
2933 ptid.o, buffer.o): New rules.
2934 (linux-low.o): Add common/linux-osdata.h as a dependency.
2935 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
2936 * configure.ac: Add AC_HEADER_DIRENT check.
2937 * config.in: Regenerate.
2938 * configure: Regenerate.
2939 * remote-utils.c (xml_escape_text): Delete.
2940 (buffer_grow, buffer_free, buffer_init, buffer_finish,
2941 buffer_xml_printf): Move to common/buffer.c.
2942 * server.c (main): Remove call to initialize_inferiors.
2943 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
2944 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
2945 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
2946 internal_error, gdb_assert, gdb_assert_fail): Delete.
2947 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
2948 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
2950 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
2951 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
2952 initialize_inferiors): Delete.
2954 2011-07-20 Pedro Alves <pedro@codesourcery.com>
2956 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
2959 2011-05-31 Pedro Alves <pedro@codesourcery.com>
2961 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
2963 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
2965 2011-05-26 Yao Qi <yao@codesourcery.com>
2967 * Makefile.in (thread-db.o): Track dependence to
2968 common/gdb_thread_db.h.
2969 * thread-db.c: include gdb_thread_db.h from right place.
2971 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
2973 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
2974 __FILE__ and __LINE__ to internal_error.
2976 2011-05-13 Doug Evans <dje@google.com>
2978 * thread-db.c (try_thread_db_load_from_sdir): New function.
2979 (try_thread_db_load_from_dir): New function.
2980 (thread_db_load_search): Handle $sdir, ignore $pdir.
2981 Remove trying of system directories if search of
2982 libthread-db-search-path fails, that is now done via $sdir.
2984 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
2986 * server.c (handle_query): Add EnableDisableTracepoints to the list
2987 of supported features.
2988 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
2990 (cmd_qtenable_disable): New.
2991 (cmd_qtstart): Install tracepoints even if disabled.
2992 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
2993 receiving a QTEnable or QTDisable packet.
2994 (gdb_collect): Skip data collection if fast tracepoint is disabled.
2995 (ust_marker_to_static_tracepoint): Do not ignore disabled static
2997 (gdb_probe): Skip data collection if static tracepoint is disabled.
2999 2011-05-10 Doug Evans <dje@google.com>
3001 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3003 2011-05-04 Doug Evans <dje@google.com>
3005 * linux-low.c (linux_join): Skip process lookup.
3006 * spu-low.c (spu_join): Ditto.
3007 * server.c (join_inferiors_callback): Delete.
3008 (process_serial_event): For 'D' packet (detach) call join_inferior
3011 2011-05-04 Joseph Myers <joseph@codesourcery.com>
3013 * README: Don't mention xscale*-*-linux*.
3014 * configure.srv (xscale*-*-linux*): Don't handle target.
3016 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3018 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3020 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3021 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3022 (i386_emit_void_call_2): Likewise.
3024 2011-04-26 Yao Qi <yao@codesourcery.com>
3026 * linux-low.c: Move common macros to linux-ptrace.h.
3027 Include linux-ptrace.h.
3028 * Makefile.in (linux_ptrace_h): New.
3029 (linux-low.o): Depends on linux-ptrace.h.
3031 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3033 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3034 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3035 (remote_prepare): New function with most of the TCP code from ...
3036 (remote_open): ... here. Detect PORT here unconditionally. Move also
3037 setting transport_is_reliable.
3038 * server.c (run_once): New variable.
3039 (gdbserver_usage): Document it.
3040 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3041 the first run if RUN_ONCE.
3042 * server.h (run_once, remote_prepare): New declarations.
3044 2011-04-19 Tom Tromey <tromey@redhat.com>
3046 * win32-low.c (handle_load_dll): Remove duplicate "the".
3048 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3050 Remove support for old Cygwin 1.5 versions.
3051 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3052 function to avoid warning.
3053 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3056 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3058 * gdbserver/server.h (Macro _): Define it if not available.
3060 2011-03-14 Michael Snyder <msnyder@vmware.com>
3062 * hostio.c (handle_close): Remove unnecessary null test.
3064 2011-03-10 Joel Brobecker <brobecker@adacore.com>
3066 * Makefile.in (maintainer-clean realclean distclean): Remove
3067 "make ... subdir_do" command.
3069 2011-03-10 Michael Snyder <msnyder@vmware.com>
3071 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3073 * server.c (handle_v_run): Free alloced buffer on early return.
3075 2011-03-09 Yao Qi <yao@codesourcery.com>
3078 2011-03-04 Yao Qi <yao@codesourcery.com>
3080 * Makefile.in: Remove GNU make feature --directory.
3082 2011-03-05 Yao Qi <yao@codesourcery.com>
3084 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3085 (subdir_do): New make target. Copied from gdb/Makefile.
3086 (maintainer-clean, realclean, distclean, clean): Call corresponding
3087 make targets in common/Makefile.
3089 2011-02-11 Yao Qi <yao@codesourcery.com>
3091 * configure.ac: Call AC_PROG_RANLIB.
3092 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3093 * configure: Regenerate.
3095 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3097 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3099 2011-03-06 Yao Qi <yao@codesourcery.com>
3101 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3103 2011-03-05 Yao Qi <yao@codesourcery.com>
3105 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3106 (subdir_do): New make target. Copied from gdb/Makefile.
3107 (maintainer-clean, realclean, distclean, clean): Call corresponding
3108 make targets in common/Makefile.
3110 2011-03-04 Yao Qi <yao@codesourcery.com>
3112 * Makefile.in: Remove GNU make feature --directory.
3114 2011-03-04 Michael Snyder <msnyder@vmware.com>
3116 * server.c (queue_stop_reply): Call xmalloc not malloc.
3118 2011-03-02 Michael Snyder <msnyder@vmware.com>
3120 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3122 2011-02-28 Michael Snyder <msnyder@vmware.com>
3124 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3125 (cmd_qtframe): Ditto.
3126 (cmd_qtbuffer): Ditto.
3127 (cmd_bigqtbuffer): Ditto.
3129 * utils.c (decimal2str): Initialize 'width' to nine, then
3132 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3134 * hostio.c (require_data): Free *data, not data.
3136 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3138 * hostio.c (require_data): Use free, not xfree.
3140 2011-02-27 Michael Snyder <msnyder@vmware.com>
3142 * server.c (handle_query): Discard unused value.
3144 * hostio.c (require_data): Free malloc memory before returning
3147 2011-02-26 Michael Snyder <msnyder@vmware.com>
3149 * linux-low.c (list_threads): Call closedir for dirent.
3151 2011-02-27 Michael Snyder <msnyder@vmware.com>
3153 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3154 a case statement falls through.
3156 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3158 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3161 2011-02-26 Michael Snyder <msnyder@vmware.com>
3163 * utils.c (decimal2str): Eliminate dead code and dead param.
3164 (pulongest): Drop dead param from call to decimal2str.
3167 2011-02-24 Joel Brobecker <brobecker@adacore.com>
3169 Revert the following patch (not approved yet):
3170 2011-02-21 Hui Zhu <teawater@gmail.com>
3171 * tracepoint.c (tp_printf): New function.
3172 (eval_agent_expr): Handle gdb_agent_op_printf.
3174 2011-02-21 Hui Zhu <teawater@gmail.com>
3176 * tracepoint.c (tp_printf): New function.
3177 (eval_agent_expr): Handle gdb_agent_op_printf.
3179 2011-02-18 Tom Tromey <tromey@redhat.com>
3181 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3182 (tracepoint.o): Likewise.
3183 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3184 (gdb_agent_op_names): Likewise.
3186 2011-02-18 Tom Tromey <tromey@redhat.com>
3188 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3189 gdb_agent_op_rot>: New constants.
3190 (gdb_agent_op_names): Add pick and roll.
3191 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3194 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3196 * aclocal.m4: Regenerated with aclocal-1.11.1.
3198 2011-02-14 Pedro Alves <pedro@codesourcery.com>
3200 * server.c (handle_qxfer_traceframe_info): New.
3201 (qxfer_packets): Register "traceframe-info".
3202 (handle_query): Report support for qXfer:traceframe-info:read+.
3203 * tracepoint.c (match_blocktype): New.
3204 (traceframe_find_block_type): Rename to ...
3205 (traceframe_walk_blocks): ... this. Add callback filter argument,
3207 (traceframe_find_block_type): New, reimplemented on top of
3208 traceframe_walk_blocks.
3209 (build_traceframe_info_xml): New.
3210 (traceframe_read_info): New.
3211 * server.h (traceframe_read_info): Declare.
3213 2011-02-11 Yao Qi <yao@codesourcery.com>
3215 * configure.ac: Call AC_PROG_RANLIB.
3216 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3217 * configure: Regenerate.
3219 2011-02-07 Pedro Alves <pedro@codesourcery.com>
3221 * server.c (gdb_read_memory): Change return semantics to allow
3223 (handle_search_memory_1): Adjust.
3224 (process_serial_event) <'m' packet>: Handle partial transfers.
3225 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3227 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3229 * regcache.c (init_register_cache): Initialize
3230 regcache->register_status.
3231 (free_register_cache): Release regcache->register_status.
3232 (regcache_cpy): Copy register_status.
3233 (registers_to_string): Print 'x's for unavailable registers.
3234 (supply_register): Mark the register's status valid or
3235 unavailable, depending on whether a buffer was passed in or not.
3236 (supply_register_zeroed): New.
3237 (supply_regblock): Mark the registers' status valid or
3238 unavailable, depending on whether a buffer was passed in or not.
3239 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3240 (struct regcache): New `register_status' field.
3241 (supply_register_zeroed): Declare.
3242 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3243 supply_register_zeroed, rather than passing a NULL buffer to
3245 * tracepoint.c (fetch_traceframe_registers): Update comment.
3247 2011-01-28 Pedro Alves <pedro@codesourcery.com>
3249 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3252 2011-01-25 Pedro Alves <pedro@codesourcery.com>
3254 * server.h (decode_xfer_write): Change prototype.
3255 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3256 and don't extract the annex here.
3257 * server.c (decode_xfer_read): Remove `annex' parameter,
3258 and don't extract the annex here.
3260 (struct qxfer): New.
3261 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3262 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3263 (handle_qxfer_statictrace): New functions, abstracted out from
3264 handle_query, and made to use the struct qxfer interface.
3265 (handle_threads_qxfer_proper): Rename to ...
3266 (handle_qxfer_threads_proper): ... this.
3267 (handle_threads_qxfer): Rename to ...
3268 (handle_qxfer_threads): ... this. Adjust.
3269 (qxfer_packets): New array.
3270 (handle_qxfer): New function.
3271 (handle_query): Use handle_qxfer.
3273 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3275 * gdbreplay.c: Shorten lines of >= 80 columns.
3276 * linux-low.c: Ditto.
3277 * linux-ppc-low.c: Ditto.
3278 * linux-s390-low.c: Ditto.
3279 * linux-sparc-low.c: Ditto.
3280 * linux-x86-low.c: Ditto.
3281 * linux-xtensa-low.c: Ditto.
3282 * mem-break.c: Ditto.
3284 * regcache.h: Ditto.
3285 * remote-utils.c: Ditto.
3288 * thread-db.c: Ditto.
3289 * tracepoint.c: Ditto.
3291 * win32-low.h: Ditto.
3293 2011-01-05 Joel Brobecker <brobecker@adacore.com>
3295 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3298 2011-01-01 Joel Brobecker <brobecker@adacore.com>
3300 * server.c (gdbserver_version): Update copyright year in version
3302 * gdbreplay.c (gdbreplay_version): Ditto.
3304 2010-12-29 Jie Zhang <jie.zhang@analog.com>
3306 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3307 * linux-bfin-low.c: New file.
3308 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3309 PT_DATA_ADDR for BFIN targets.
3310 * Makefile.in (SFILES): Add linux-bfin-low.c.
3311 (clean): Remove reg-bfin.c.
3312 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3313 * README: Mention supported Blackfin targets.
3315 2010-12-23 Mike Frysinger <vapier@gentoo.org>
3317 * .gitignore: New file.
3319 2010-11-16 Mike Frysinger <vapier@gentoo.org>
3321 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3323 2010-10-22 Jie Zhang <jie@codesourcery.com>
3325 * Makefile.in: Add FLAGS_TO_PASS variable.
3326 (install): Remove dependency of install-only and recursively
3327 invoke make for install-only.
3329 2010-10-04 Doug Evans <dje@google.com>
3331 * Makefile.in (uninstall): Use $(DESTDIR).
3333 2010-09-24 Pedro Alves <pedro@codesourcery.com>
3337 * linux-x86-low.c (compat_siginfo_from_siginfo)
3338 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3339 si_code is < 0. Check for si_code == SI_TIMER before checking for
3342 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3344 * lynx-i386-low.c: New file.
3345 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3347 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3349 * lynx-low.c (ptrace_request_to_str): Remove handling for
3350 request values that have been removed in LynxOS 5.x.
3352 2010-09-13 Joel Brobecker <brobecker@adacore.com>
3354 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3357 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3359 * configure.ac: Add --enable-inprocess-agent option.
3360 * configure: Rebuilt.
3362 2010-09-06 Yao Qi <yao@codesourcery.com>
3364 * linux-low.c (linux_kill): Remove unused variable.
3365 (linux_stabilize_threads): Likewise.
3366 * server.c (start_inferior): Likewise.
3367 (queue_stop_reply_callback): Likewise.
3368 * tracepoint.c (do_action_at_tracepoint): Likewise.
3370 2010-09-06 Yao Qi <yao@codesourcery.com>
3372 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3375 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3377 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3379 2010-09-06 Pedro Alves <pedro@codesourcery.com>
3381 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3384 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3386 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3387 gdbserver/lynx-ppc-low.c: New files.
3388 * Makefile.in (lynx_low_h): New variable.
3389 (lynx-low.o, lynx-ppc-low.o): New rules.
3390 * configure.ac: On LynxOS, link with -lnetinet.
3391 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3392 * configure: regenerate.
3394 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3396 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3397 * configure.ac: Add check for vasprintf and vsnprintf.
3398 * configure, config.in: Regenerate.
3399 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3401 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3403 * gdbreplay.c: Move include of alloca.h up, next to include of
3405 * server.h: Add include of malloc.h.
3406 * mem-break.c: Remove include of malloc.h.
3407 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3411 * Makefile.in (memmem.o): Build with -Wno-error.
3413 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3415 * utils.c (xsnprintf): Make non-static.
3416 * server.h: Add xsnprintf declaration.
3417 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3418 replace calls to snprintf by calls to xsnprintf throughout.
3420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
3422 * configure.ac: Add configure check for alloca.
3423 * configure, config.in: Regenerate.
3424 * server.h: Include alloca.h if it exists.
3425 * gdbreplay.c: Include alloca.h if it exists.
3427 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3429 * linux-low.c (__SIGRTMIN): Define if not already defined.
3430 (linux_create_inferior): Check for __ANDROID__ rather than
3432 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3433 are already deferred.
3434 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3435 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3436 stopped and already has a pending signal to report.
3437 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3438 a pending signal to report or is moving out of a jump pad.
3439 (linux_init_signals): Check for __ANDROID__ rather than
3442 2010-08-28 Pedro Alves <pedro@codesourcery.com>
3444 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3445 debug_threads check. Avoid a linear search when not doing debug
3448 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3450 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3451 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3452 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3453 (process_event): Change local fd's type to gdb_fildes_t.
3454 (create_file_handler): Adjust prototype.
3455 (delete_file_handler): Adjust prototype.
3456 (handle_file_event): Adjust prototype. Use pfildes.
3457 (create_file_event): Adjsut prototype.
3458 * remote-utils.c (remote_desc, listen_desc): Change type to
3460 * server.h: New gdb_fildes_t typedef.
3461 [USE_WIN32API]: Include winsock2.h.
3462 (delete_file_handler, add_file_handler): Adjust prototypes.
3464 * utils.c (pfildes): New.
3466 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3468 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3469 * configure: Regenerate.
3471 2010-08-27 Pedro Alves <pedro@codesourcery.com>
3473 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3474 (linux_done_accessing_memory): ... this.
3475 (linux_target_ops): Adjust.
3476 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3477 * nto-low.c (nto_target_ops): Adjust comment.
3478 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3479 * spu-low.c (spu_target_ops): Adjust comment.
3480 * target.h (target_ops): Rename unprepare_to_access_memory field
3481 to done_accessing_memory.
3482 (unprepare_to_access_memory): Rename to ...
3483 (done_accessing_memory): ... this.
3485 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3487 * linux-low.c (linux_prepare_to_access_memory): New.
3488 (linux_unprepare_to_access_memory): New.
3489 (linux_target_ops): Install them.
3490 * server.c (read_memory): Rename to ...
3491 (gdb_read_memory): ... this. Use
3492 prepare_to_access_memory/prepare_to_access_memory.
3493 (write_memory): Rename to ...
3494 (gdb_write_memory): ... this. Use
3495 prepare_to_access_memory/prepare_to_access_memory.
3496 (handle_search_memory_1): Adjust.
3497 (process_serial_event): Adjust.
3498 * target.h (struct target_ops): New fields
3499 prepare_to_access_memory and unprepare_to_access_memory.
3500 (prepare_to_access_memory, unprepare_to_access_memory): New.
3501 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3502 prepare_to_access_memory/prepare_to_access_memory.
3503 * nto-low.c (nto_target_ops): Adjust.
3504 * spu-low.c (spu_target_ops): Adjust.
3505 * win32-low.c (win32_target_ops): Adjust.
3507 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3509 * Makefile.in (WARN_CFLAGS): Get it from configure.
3510 (WERROR_CFLAGS): New.
3511 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3512 * configure.ac: Introduce --enable-werror, which adds -Werror to
3513 the compiler command line. Enabled by default. Disable with
3514 --disable-werror. Add -Wdeclaration-after-statement
3515 Wpointer-arith and -Wformat-nonliteral to warning flags.
3516 * configure: Regenerate.
3518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3520 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3522 2010-08-26 Pedro Alves <pedro@codesourcery.com>
3524 * gdbreplay.c (remote_error): New.
3526 (expect): Use gdbchar. Check for error reading from GDB.
3527 Clarify sync error output.
3528 (play): Check for errors writing to GDB.
3529 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3530 * remote-utils.c (getpkt): Check for errors writing to the remote
3533 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3535 * linux-low.c (linux_wait_1): Move non-debugging code out of
3536 `debug_threads' control.
3538 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3540 * linux-low.c (linux_wait_1): Don't set last_status here.
3541 * server.c (push_event, queue_stop_reply_callback): Assert we're
3542 not pushing a TARGET_WAITKIND_IGNORE event.
3543 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3544 (myresume, handle_target_event): Set the thread's last_resume_kind
3545 and last_status from the target returned status.
3547 2010-08-25 Pedro Alves <pedro@codesourcery.com>
3551 * linux-x86-low.c (update_debug_registers_callback): New.
3552 (i386_dr_low_set_addr): Use it.
3553 (i386_dr_low_get_addr): New.
3554 (i386_dr_low_set_control): Use update_debug_registers_callback.
3555 (i386_dr_low_get_control): New.
3556 (i386_dr_low_get_status): Adjust.
3557 * linux-low.c (linux_stop_lwp): New.
3558 * linux-low.h (linux_stop_lwp): Declare.
3560 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3561 argument instead of a i386_debug_reg_state.
3562 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3563 a i386_debug_reg_state.
3564 (i386_insert_aligned_watchpoint): Adjust.
3565 (i386_remove_aligned_watchpoint): Adjust.
3566 (i386_low_stopped_data_address): Read the debug registers from the
3567 inferior instead of from the mirrors.
3568 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3569 (i386_dr_low_get_addr): Declare.
3570 (i386_dr_low_get_control): Declare.
3571 (i386_dr_low_get_status): Change prototype.
3573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3574 (i386_dr_low_get_addr): New.
3575 (i386_dr_low_get_control): New.
3576 (i386_dr_low_get_status): Adjust prototype. Return
3578 (i386_initial_stuff): Clear dr_status_mirror and
3580 (i386_get_thread_context): Adjust.
3581 (i386_set_thread_context): Adjust.
3582 (i386_thread_added): Adjust.
3584 2010-08-24 Pedro Alves <pedro@codesourcery.com>
3586 * linux-low.h (linux_thread_area): Delete declaration.
3588 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3590 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3591 after its termination.
3593 2010-08-09 Pedro Alves <pedro@codesourcery.com>
3595 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3596 (gdb_wants_all_stopped): Delete.
3597 (linux_wait_1): Don't call them.
3598 * server.c (handle_v_cont): Tag all threads as want-stopped.
3599 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3600 stopped as "client-wants-stopped".
3602 2010-07-31 Pedro Alves <pedro@codesourcery.com>
3604 * Makefile.in (signals_h): New.
3605 (server_h): Depend on it.
3606 (server.o): Don't depend on $(signals_def).
3607 (signals.o): Depend on $(signals_def).
3609 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3611 * Makefile.in (signals_def): New.
3612 (server_h): Append include/gdb/signals.h and signals_def.
3613 (server.o): Append signals_def.
3615 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3617 * server.c (handle_target_event): Use target_signal_to_host for
3618 resume_info.sig initialization.
3619 * target.h (struct thread_resume) <sig>: New comment.
3621 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3623 * server.c (handle_query): strcpy() the returned string from paddress()
3624 instead of sprintf().
3625 * utils.c (paddress): Return phex_nz().
3627 2010-07-07 Joel Brobecker <brobecker@adacore.com>
3629 * server.c (handle_v_cont): Call mourn_inferior if process
3631 (myresume): Likewise.
3633 2010-07-01 Pedro Alves <pedro@codesourcery.com>
3635 Static tracepoints, and integration with UST.
3637 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3638 * mem-break.c (uninsert_all_breakpoints)
3639 (reinsert_all_breakpoints): New.
3640 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3641 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3642 (gdb_agent_ust_loaded, helper_thread_id)
3643 (gdb_agent_helper_thread_id): New macros.
3644 (struct ipa_sym_addresses): Add addr_ust_loaded,
3645 addr_helper_thread_id, addr_cmd_buf.
3646 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3647 (in_process_agent_loaded_ust): New.
3648 (write_e_ust_not_loaded): New.
3649 (maybe_write_ipa_ust_not_loaded): New.
3650 (struct collect_static_trace_data_action): New.
3651 (enum tracepoint_type) <static_tracepoint>: New.
3652 (struct tracepoint) <handle>: Mention static tracepoints.
3653 (struct static_tracepoint_ctx): New.
3654 (CMD_BUF_SIZE): New.
3655 (add_tracepoint_action): Handle static tracepoint actions.
3656 (unprobe_marker_at): New.
3657 (clear_installed_tracepoints): Handle static tracepoints.
3658 (cmd_qtdp): Handle static tracepoints.
3659 (probe_marker_at): New.
3660 (cmd_qtstart): Handle static tracepoints.
3661 (response_tracepoint): Handle static tracepoints.
3662 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3663 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3664 (get_context_regcache): Handle static tracepoints.
3665 (do_action_at_tracepoint): Handle static tracepoint actions.
3666 (traceframe_find_block_type): Handle static trace data blocks.
3667 (traceframe_read_sdata): New.
3668 (download_tracepoints): Download static tracepoint actions.
3669 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3670 (GDB_PROBE_NAME): New.
3675 (ust_marker_to_static_tracepoint): New.
3677 (collect_ust_data_at_tracepoint): New.
3678 (gdb_ust_probe): New.
3679 (UNIX_PATH_MAX, SOCK_DIR): New.
3680 (gdb_ust_connect_sync_socket): New.
3681 (resume_thread, stop_thread): New.
3682 (run_inferior_command): New.
3683 (init_named_socket): New.
3684 (gdb_ust_socket_init): New.
3685 (cstr_to_hexstr): New.
3687 (first_marker, next_marker): New.
3688 (response_ust_marker): New.
3689 (cmd_qtfstm, cmd_qtsstm): New.
3690 (unprobe_marker_at, probe_marker_at): New.
3691 (cmd_qtstmat, gdb_ust_thread): New.
3692 (gdb_ust_init): New.
3693 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3694 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3696 (x86_64_st_collect_regmap): New.
3697 (X86_64_NUM_ST_COLLECT_GREGS): New.
3698 (AMD64_RIP_REGNUM): New.
3699 (supply_static_tracepoint_registers): New.
3700 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3702 (i386_st_collect_regmap): New.
3703 (i386_NUM_ST_COLLECT_GREGS): New.
3704 (supply_static_tracepoint_registers): New.
3705 * server.c (handle_query): Handle qXfer:statictrace:read.
3706 <qSupported>: Report support for StaticTracepoints, and
3707 qXfer:statictrace:read features.
3708 * server.h (traceframe_read_sdata)
3709 (supply_static_tracepoint_registers): Declare.
3710 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
3711 (unpack_varlen_hex): Include in IPA build.
3712 * Makefile.in (ustlibs, ustinc): New.
3713 (IPA_OBJS): Add remote-utils-ipa.o.
3714 ($(IPA_LIB)): Link -ldl and -lpthread.
3716 (IPAGENT_CFLAGS): Add UST_CFLAGS.
3717 * config.in, configure: Regenerate.
3719 2010-06-20 Ian Lance Taylor <iant@google.com>
3720 Pedro Alves <pedro@codesourcery.com>
3722 * linux-x86-low.c (always_true): Delete.
3723 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
3724 trying to fool the compiler with always_true.
3726 2010-06-20 Pedro Alves <pedro@codesourcery.com>
3728 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
3729 conditions in gdbserver.
3731 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
3733 * spu-low.c (spu_read_memory): Wrap around local store limit.
3734 (spu_write_memory): Likewise.
3736 2010-06-15 Pedro Alves <pedro@codesourcery.com>
3738 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
3739 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
3741 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
3743 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
3744 uses with LONGEST uses.
3746 2010-06-14 Stan Shebs <stan@codesourcery.com>
3747 Pedro Alves <pedro@codesourcery.com>
3751 * linux-x86-low.c: Include limits.h.
3756 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
3757 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
3758 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
3759 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
3760 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
3761 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
3762 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
3763 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
3764 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
3765 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
3766 (amd64_emit_void_call_2): New.
3767 (amd64_emit_ops): New.
3768 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
3769 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
3770 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
3771 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
3772 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
3773 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
3774 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
3775 (i386_emit_call, i386_emit_reg, i386_emit_pop)
3776 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
3777 (i386_emit_stack_adjust, i386_emit_int_call_1)
3778 (i386_emit_void_call_2): New.
3779 (i386_emit_ops): New.
3780 (x86_emit_ops): New.
3781 (the_low_target): Install x86_emit_ops.
3782 * server.h (struct emit_ops): New.
3783 (get_raw_reg_func_addr): Declare.
3784 (current_insn_ptr, emit_error): Declare.
3785 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
3786 (set_trace_state_variable_value): New defines.
3787 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
3788 addr_get_trace_state_variable_value and
3789 addr_set_trace_state_variable_value.
3790 (symbol_list): New fields for get_raw_reg,
3791 get_trace_state_variable_value and set_trace_state_variable_value.
3792 (condfn): New typedef.
3793 (struct tracepoint): New field `compiled_cond'.
3794 (do_action_at_tracepoint): Clear compiled_cond.
3795 (get_trace_state_variable_value, set_trace_state_variable_value):
3797 (condition_true_at_tracepoint): If there's a compiled condition,
3799 (current_insn_ptr, emit_error): New globals.
3800 (struct bytecode_address): New.
3801 (get_raw_reg_func_addr): New.
3802 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
3803 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
3804 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
3805 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
3806 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
3807 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
3808 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
3809 (compile_tracepoint_condition, compile_bytecodes): New.
3810 * target.h (emit_ops): Forward declare.
3811 (struct target_ops): New field emit_ops.
3812 (target_emit_ops): New.
3813 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
3814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
3815 * linux-low.c (linux_emit_ops): New.
3816 (linux_target_ops): Install it.
3817 * linux-low.h (struct linux_target_ops): New field emit_ops.
3819 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
3821 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
3822 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
3824 2010-06-01 Pedro Alves <pedro@codesourcery.com>
3825 Stan Shebs <stan@codesourcery.com>
3827 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
3828 (all): Depend on $(extra_libraries).
3829 (install-only): Install the IPA.
3830 (IPA_OBJS, IPA_LIB): New.
3831 (clean): Remove the IPA lib.
3832 (IPAGENT_CFLAGS): New.
3833 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
3834 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
3835 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
3836 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
3837 * configure.ac: Check for atomic builtins support in the compiler.
3838 (IPA_DEPFILES, extra_libraries): Define.
3839 * configure.srv (ipa_obj): Add description.
3840 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
3841 (i[34567]86-*-linux*): Set ipa_obj.
3842 (x86_64-*-linux*): Set ipa_obj.
3843 * linux-low.c (stabilizing_threads): New.
3844 (supports_fast_tracepoints): New.
3845 (linux_detach): Stabilize threads before detaching.
3846 (handle_tracepoints): Handle internal tracing breakpoints. Assert
3847 the lwp is either not stabilizing, or is moving out of a jump pad.
3848 (linux_fast_tracepoint_collecting): New.
3849 (maybe_move_out_of_jump_pad): New.
3850 (enqueue_one_deferred_signal): New.
3851 (dequeue_one_deferred_signal): New.
3852 (linux_wait_for_event_1): If moving out of a jump pad, defer
3853 pending signals to later.
3854 (linux_stabilize_threads): New.
3855 (linux_wait_1): Check if threads need moving out of jump pads, and
3857 (stuck_in_jump_pad_callback): New.
3858 (move_out_of_jump_pad_callback): New.
3860 (linux_resume_one_lwp): Handle moving out of jump pads.
3861 (linux_set_resume_request): Dequeue deferred signals.
3862 (need_step_over_p): Also step over fast tracepoint jumps.
3863 (start_step_over): Also uninsert fast tracepoint jumps.
3864 (finish_step_over): Also reinsert fast tracepoint jumps.
3865 (linux_install_fast_tracepoint_jump): New.
3866 (linux_target_ops): Install linux_stabilize_threads and
3867 linux_install_fast_tracepoint_jump_pad.
3868 * linux-low.h (linux_target_ops) <get_thread_area,
3869 install_fast_tracepoint_jump_pad>: New fields.
3870 (struct lwp_info) <collecting_fast_tracepoint,
3871 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
3872 (linux_get_thread_area): Declare.
3873 * linux-x86-low.c (jump_insn): New.
3874 (x86_get_thread_area): New.
3875 (append_insns): New.
3877 (amd64_install_fast_tracepoint_jump_pad): New.
3878 (i386_install_fast_tracepoint_jump_pad): New.
3879 (x86_install_fast_tracepoint_jump_pad): New.
3880 (the_low_target): Install x86_get_thread_area and
3881 x86_install_fast_tracepoint_jump_pad.
3882 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
3883 (struct fast_tracepoint_jump): New.
3884 (fast_tracepoint_jump_insn): New.
3885 (fast_tracepoint_jump_shadow): New.
3886 (find_fast_tracepoint_jump_at): New.
3887 (fast_tracepoint_jump_here): New.
3888 (delete_fast_tracepoint_jump): New.
3889 (set_fast_tracepoint_jump): New.
3890 (uninsert_fast_tracepoint_jumps_at): New.
3891 (reinsert_fast_tracepoint_jumps_at): New.
3892 (set_breakpoint_at): Use write_inferior_memory.
3893 (uninsert_raw_breakpoint): Use write_inferior_memory.
3894 (check_mem_read): Mask out fast tracepoint jumps.
3895 (check_mem_write): Mask out fast tracepoint jumps.
3896 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
3897 (set_fast_tracepoint_jump): Declare.
3898 (delete_fast_tracepoint_jump)
3899 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
3900 (reinsert_fast_tracepoint_jumps_at): Declare.
3901 * regcache.c: Don't compile many functions when building the
3902 in-process agent library.
3903 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
3904 the register buffer in the heap.
3905 (free_register_cache): If the register buffer isn't owned by the
3906 regcache, don't free it.
3907 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
3908 pre-existing register caches.
3909 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
3911 (convert_ascii_to_int): : Constify `from' parameter type.
3912 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
3913 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
3914 the needed buffer in-place.
3915 (relocate_instruction): New.
3916 * server.c (handle_query) <qSymbols>: If the target supports
3917 tracepoints, give it a chance of looking up symbols. Report
3918 support for fast tracepoints.
3919 (handle_status): Stabilize threads.
3920 (process_serial_event): Adjust.
3921 * server.h (struct fast_tracepoint_jump): Forward declare.
3922 (struct process_info) <fast_tracepoint_jumps>: New field.
3923 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
3924 (decode_X_packet, decode_M_packet): Adjust.
3925 (relocate_instruction): Declare.
3926 (in_process_agent_loaded): Declare.
3927 (tracepoint_look_up_symbols): Declare.
3928 (struct fast_tpoint_collect_status): Declare.
3929 (fast_tracepoint_collecting): Declare.
3930 (force_unlock_trace_buffer): Declare.
3931 (handle_tracepoint_bkpts): Declare.
3932 (initialize_low_tracepoint)
3933 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
3934 * target.h (struct target_ops) <stabilize_threads,
3935 install_fast_tracepoint_jump_pad>: New fields.
3936 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
3937 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
3938 [HAVE_STDINT_H]: Include stdint.h.
3939 (trace_debug_1): Rename to ...
3940 (trace_vdebug): ... this.
3941 (trace_debug): Rename to ...
3942 (trace_debug_1): ... this. Add `level' parameter.
3944 (ATTR_USED, ATTR_NOINLINE): New.
3945 (IP_AGENT_EXPORT): New.
3946 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3947 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
3948 (about_to_request_buffer_space, trace_buffer_is_full)
3949 (stopping_tracepoint, expr_eval_result, error_tracepoint)
3950 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
3951 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
3952 (traceframe_write_count, traceframes_created)
3953 (trace_state_variables)
3954 New renaming defines.
3955 (struct ipa_sym_addresses): New.
3956 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
3958 (ipa_sym_addrs): New.
3959 (all_tracepoint_symbols_looked_up): New.
3960 (in_process_agent_loaded): New.
3961 (write_e_ipa_not_loaded): New.
3962 (maybe_write_ipa_not_loaded): New.
3963 (tracepoint_look_up_symbols): New.
3964 (debug_threads) [IN_PROCESS_AGENT]: New.
3965 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
3966 (UNKNOWN_SIDE_EFFECTS): New.
3967 (stop_tracing): New.
3968 (flush_trace_buffer): New.
3969 (stop_tracing_bkpt): New.
3970 (flush_trace_buffer_bkpt): New.
3971 (read_inferior_integer): New.
3972 (read_inferior_uinteger): New.
3973 (read_inferior_data_pointer): New.
3974 (write_inferior_data_pointer): New.
3975 (write_inferior_integer): New.
3976 (write_inferior_uinteger): New.
3977 (struct collect_static_trace_data_action): Delete.
3978 (enum tracepoint_type): New.
3979 (struct tracepoint) <type>: New field `type'.
3980 <actions_str, step_actions, step_actions_str>: Only include in
3982 <orig_size, obj_addr_on_target, adjusted_insn_addr>
3983 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
3984 (tracepoints): Use IP_AGENT_EXPORT.
3985 (last_tracepoint): Don't include in the IPA.
3986 (stopping_tracepoint): Use IP_AGENT_EXPORT.
3987 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
3988 (alloced_trace_state_variables): New.
3989 (trace_state_variables): Use IP_AGENT_EXPORT.
3990 (traceframe_t): Delete unused variable.
3991 (circular_trace_buffer): Don't include in the IPA.
3992 (trace_buffer_start): Delete.
3993 (struct trace_buffer_control): New.
3994 (trace_buffer_free): Delete.
3995 (struct ipa_trace_buffer_control): New.
3996 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3997 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3999 (trace_buffer_ctrl): New.
4000 (TRACE_BUFFER_CTRL_CURR): New.
4001 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4002 Reimplement as macros.
4003 (trace_buffer_wrap): Delete.
4004 (traceframe_write_count, traceframe_read_count)
4005 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4006 (struct tracepoint_hit_ctx) <type>: New field.
4007 (struct fast_tracepoint_ctx): New.
4008 (memory_barrier): New.
4010 (record_tracepoint_error): Update atomically in the IPA.
4011 (clear_inferior_trace_buffer): New.
4012 (about_to_request_buffer_space): New.
4013 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4014 updating the same buffer.
4015 (add_tracepoint): Default the tracepoint's type to trap
4016 tracepoint, and orig_size to -1.
4017 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4019 (create_trace_state_variable): New parameter `gdb'. Handle it.
4020 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4021 (cmd_qtdp): Handle fast tracepoints.
4023 (max_jump_pad_size): New.
4024 (gdb_jump_pad_head): New.
4025 (get_jump_space_head): New.
4026 (claim_jump_space): New.
4027 (sort_tracepoints): New.
4028 (MAX_JUMP_SIZE): New.
4029 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4031 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4032 support. Upload fast traceframes, and delete internal IPA
4034 (stop_tracing_handler): New.
4035 (flush_trace_buffer_handler): New.
4036 (cmd_qtstop): Upload fast tracepoints.
4037 (response_tracepoint): Handle fast tracepoints.
4038 (tracepoint_finished_step): Upload fast traceframes. Set the
4039 tracepoint hit context's tracepoint type.
4040 (handle_tracepoint_bkpts): New.
4041 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4042 type. Add comment about fast tracepoints.
4043 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4044 non-existing action_str field.
4045 (get_context_regcache): Handle fast tracepoints.
4046 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4048 (fast_tracepoint_from_jump_pad_address): New.
4049 (fast_tracepoint_from_ipa_tpoint_address): New.
4050 (collecting_t): New.
4051 (force_unlock_trace_buffer): New.
4052 (fast_tracepoint_collecting): New.
4055 (write_inferior_data_ptr): New.
4056 (target_tp_heap): New.
4057 (target_malloc): New.
4058 (download_agent_expr): New.
4060 (download_tracepoints): New.
4061 (download_trace_state_variables): New.
4062 (upload_fast_traceframes): New.
4063 (IPA_FIRST_TRACEFRAME): New.
4064 (IPA_NEXT_TRACEFRAME_1): New.
4065 (IPA_NEXT_TRACEFRAME): New.
4066 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4067 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4068 (gdb_jump_pad_buffer_end): New.
4069 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4070 (initialize_tracepoint): Adjust.
4071 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4072 buffer. Initialize the low module.
4073 * utils.c (PREFIX, TOOLNAME): New.
4074 (malloc_failure): Use PREFIX.
4075 (error): In the IPA, an error causes an exit.
4076 (fatal, warning): Use PREFIX.
4077 (internal_error): Use TOOLNAME.
4078 (NUMCELLS): Increase to 10.
4079 * configure, config.in: Regenerate.
4081 2010-06-01 Pedro Alves <pedro@codesourcery.com>
4083 * server.c (handle_query) <qSupported>: Do two passes over the
4084 qSupported string to avoid nesting strtok.
4086 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4088 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4090 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4092 * configure: Regenerate.
4093 * proc-service.list: New.
4095 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4097 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4100 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4102 * gdbreplay.c (remote_open): Check error return from socket() call by
4103 its equality to -1 not by it being negative.
4104 * remote-utils.c (remote_open): Likewise.
4106 2010-05-23 Pedro Alves <pedro@codesourcery.com>
4108 * config.h: Regenerate.
4110 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4112 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4113 doesn't provide PTRACE_GET_THREAD_AREA.
4115 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4117 * linux-m68k-low.c: Include <asm/ptrace.h>
4118 (ps_get_thread_area): Implement.
4120 2010-05-03 Doug Evans <dje@google.com>
4122 * event-loop.c (struct callback_event): New struct.
4123 (callback_list): New global.
4124 (append_callback_event, delete_callback_event): New functions.
4125 (process_callback): New function.
4126 (start_event_loop): Call it.
4127 * remote-utils.c (NOT_SCHEDULED): Define.
4128 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4129 moved out of readchar.
4130 (readchar): Rewrite. Call reschedule before returning.
4131 (reset_readchar): New function.
4132 (remote_close): Call it.
4133 (process_remaining, reschedule): New functions.
4134 * server.h (callback_handler_func): New typedef.
4135 (append_callback_event, delete_callback_event): Declare.
4137 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4139 * proc-service.c (ps_pglobal_lookup): Use
4140 thread_db_look_up_one_symbol.
4141 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4142 parameter. Use it instead of all_symbols_looked_up.
4143 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4145 (all_symbols_looked_up): Don't declare.
4146 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4147 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4149 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4150 Set all_symbols_looked_up here.
4151 (thread_db_look_up_one_symbol): New.
4152 (thread_db_get_tls_address): Adjust.
4153 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4154 thread_db object on the heap, and tentatively set it in the
4156 (thread_db_init): Don't set all_symbols_looked_up here.
4157 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4159 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4161 * linux-low.c (linux_kill, linux_detach): Adjust.
4162 (status_pending_p_callback): Remove redundant statement. Check
4163 for !TARGET_WAITIKIND_IGNORE, instead of
4164 TARGET_WAITKIND_STOPPED.
4165 (handle_tracepoints): Make sure LWP is locked. Adjust.
4166 (linux_wait_for_event_1): Adjust.
4167 (linux_cancel_breakpoints): New.
4168 (unsuspend_one_lwp): New.
4169 (unsuspend_all_lwps): New.
4170 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4171 (send_sigstop_callback): Change return type to int, add new
4172 `except' parameter and handle it.
4173 (suspend_and_send_sigstop_callback): New.
4174 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4175 pass them down. If SUSPEND, also increment the lwp's suspend
4177 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4178 (need_step_over_p): Don't consider suspended LWPs.
4179 (start_step_over): Adjust.
4180 (proceed_one_lwp): Change return type to int, add new `except'
4181 parameter and handle it.
4182 (unsuspend_and_proceed_one_lwp): New.
4183 (proceed_all_lwps): Use find_inferior instead of
4185 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4186 also decrement the suspend count of LWPs. Pass `except' down,
4187 instead of hacking its suspend count.
4188 (linux_pause_all): Add `freeze' parameter. Adjust.
4189 (linux_unpause_all): New.
4190 (linux_target_ops): Install linux_unpause_all.
4191 * server.c (handle_status): Adjust.
4192 * target.h (struct target_ops): New fields `unpause_all' and
4193 `cancel_breakpoints'. Add new parameter to `pause_all'.
4194 (pause_all): Add new `freeze' parameter.
4196 (cancel_breakpoints): New.
4197 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4199 (cmd_qtstart): Pause threads.
4200 (stop_tracing): Pause threads, and cancel breakpoints.
4201 * win32-low.c (win32_target_ops): Adjust.
4203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
4205 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4206 the inferior right away from here...
4207 (linux_wait_1): ... to here, and adjust to check the thread's
4208 last_resume_kind instead of the lwp's step or stop_expected flags.
4210 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4212 * README: Use consistent `GDB' and `GDBserver' spellings.
4214 2010-05-02 Pedro Alves <pedro@codesourcery.com>
4216 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4217 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4218 (linux_detach_one_lwp): Assume the lwp is stopped.
4219 (any_thread_of): Delete.
4220 (linux_detach): Stop all lwps here. Don't blindly delete all
4222 (delete_lwp_callback): New.
4223 (linux_mourn): Delete all lwps of the process that is gone.
4224 (linux_wait_1): Don't delete the last lwp of the process here.
4225 * mem-break.h (mark_breakpoints_out): Declare.
4226 * mem-break.c (mark_breakpoints_out): New.
4227 (free_all_breakpoints): Use it.
4228 * server.c (handle_target_event): If the process is gone, mark
4230 * thread-db.c (struct thread_db) <create_bp>: New field.
4231 (thread_db_enable_reporting): Fix prototype. Store a thread event
4232 breakpoint reference in the thread_db struct.
4233 (thread_db_load_search): Clear the thread_db object.
4234 (try_thread_db_load_1): Ditto.
4235 (switch_to_process): New.
4236 (disable_thread_event_reporting): Use it.
4237 (remove_thread_event_breakpoints): New.
4238 (thread_db_detach, thread_db_mourn): Use it.
4240 2010-05-01 Pedro Alves <pedro@codesourcery.com>
4242 * linux-low.c (linux_enable_event_reporting): New.
4243 (linux_wait_for_event_1, handle_extended_wait): Use it.
4245 2010-04-30 Pedro Alves <pedro@codesourcery.com>
4247 * linux-low.c (linux_kill_one_lwp, linux_kill)
4248 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4249 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4250 SIGSTOP even if the LWP is stopped.
4251 (send_sigstop_callback): New.
4252 (stop_all_lwps): Use send_sigstop_callback instead.
4253 (linux_resume_one_thread): Adjust.
4254 (proceed_one_lwp): Still proceed an LWP that the client has
4255 requested to stop, if we haven't reported it as stopped yet. Make
4256 sure that LWPs the client want stopped, have a pending SIGSTOP.
4258 2010-04-26 Doug Evans <dje@google.com>
4260 * server.c (handle_general_set): Make static.
4262 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4263 Print received char after testing for error/eof instead of before.
4264 (input_interrupt): Tweak comment.
4266 2010-04-23 Doug Evans <dje@google.com>
4268 * server.c (start_inferior): Print inferior argv if --debug.
4270 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4272 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4273 * nto-x86-low.c: Include server.h
4275 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4277 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4278 be consistent with other sources of this directory.
4279 (init_registers_amd64): Correct name of source file of this function
4282 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4284 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4287 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4289 * win32-i386-low.c: Add 64-bit support.
4290 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4291 (init_registers_amd64): Declare.
4292 (mappings): Add 64-bit version of array.
4293 (init_windows_x86): New function.
4294 (the_low_target): Change init_arch field to init_windows_x86.
4296 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4298 * win32-low.c: Adapt to support also 64-bit architecture.
4299 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4300 (get_image_name): Use SIZE_T type for local variable `done'.
4301 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4302 (toolhelp_get_dll_name): Idem.
4303 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4304 Use uintptr_t typecast to avoid warning.
4305 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4306 (handle_exception): Use phex_nz to avoid warning.
4307 (win32_wait): Remove unused local variable `process'.
4309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4311 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4314 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4316 * configure.ac: Use `ws2_32' library for srv_mingw.
4317 * configure: Regenerate.
4318 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4319 * remote-utils.c: Likewise.
4321 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4323 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4324 if __x86_64__ is defined.
4326 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4328 * configure: Regenerate.
4330 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4332 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4333 * target.h (target_ops): New get_tib_address field.
4334 * win32-low.h (win32_thread_info): Add thread_local_base field.
4335 * win32-low.c (child_add_thread): Add tlb argument.
4336 Set thread_local_base field to TLB.
4337 (get_child_debug_event): Adapt to child_add_thread change.
4338 (win32_get_tib_address): New function.
4339 (win32_target_ops): Set get_tib_address field to
4340 win32_get_tib_address.
4341 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4343 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4345 * linux-low.c (linux_mourn): Also remove the process.
4346 * server.c (handle_target_event): Don't remove the process here.
4347 * nto-low.c (nto_mourn): New.
4348 (nto_target_ops): Install it.
4349 * spu-low.c (spu_mourn): New.
4350 (spu_target_ops): Install it.
4351 * win32-low.c (win32_mourn): New.
4352 (win32_target_ops): Install it.
4354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4356 * server.h (buffer_xml_printf): Remove redundant `;'.
4358 2010-04-12 Pedro Alves <pedro@codesourcery.com>
4360 * regcache.c (set_register_cache): Invalidate regcaches before
4361 changing the register cache layout.
4362 (regcache_invalidate_one): Allow a NULL regcache.
4363 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4364 regcaches before changing the register cache layout or the target
4367 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4369 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4370 variable warning on Linux/x86-64.
4372 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4374 GDBserver disconnected tracing support.
4376 * linux-low.c (linux_remove_process): Delete.
4377 (add_lwp): Don't set last_resume_kind here.
4378 (linux_kill): Use `mourn'.
4379 (linux_detach): Use `thread_db_detach', and `mourn'.
4381 (linux_attach_lwp_1): Adjust comment.
4382 (linux_attach): last_resume_kind moved the thread_info; adjust.
4383 (status_pending_p_callback): Adjust.
4384 (linux_wait_for_event_1): Adjust.
4385 (count_events_callback, select_singlestep_lwp_callback)
4386 (select_event_lwp_callback, cancel_breakpoints_callback)
4387 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4388 (proceed_one_lwp): Adjust.
4389 (linux_async): Add debug output.
4390 (linux_thread_stopped): New.
4391 (linux_pause_all): New.
4392 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4394 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4395 (thread_db_free): Delete declaration.
4396 (thread_db_detach, thread_db_mourn): Declare.
4397 * thread-db.c (thread_db_init): Use thread_db_mourn.
4398 (thread_db_free): Delete, split in two.
4399 (disable_thread_event_reporting): New.
4400 (thread_db_detach): New.
4401 (thread_db_mourn): New.
4403 * server.h (struct thread_info) <last_resume_kind>: New field.
4404 <attached>: Add comment.
4405 <gdb_detached>: New field.
4406 (handler_func): Change return type to int.
4407 (handle_serial_event, handle_target_event): Ditto.
4408 (gdb_connected): Declare.
4410 (disconnected_tracing): Declare.
4411 (stop_tracing): Declare.
4413 * server.c (handle_query) <qSupported>: Report support for
4414 disconnected tracing.
4415 (queue_stop_reply_callback): Account for running threads.
4416 (gdb_wants_thread_stopped): New.
4417 (gdb_wants_all_threads_stopped): New.
4418 (gdb_reattached_process): New.
4419 (handle_status): Clear the `gdb_detached' flag of all processes.
4420 In all-stop, stop all threads.
4421 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4422 (process_serial_event): If the remote connection breaks, or if an
4423 exit was forced with "monitor exit", force an event loop exit.
4424 Handle disconnected tracing on detach.
4425 (handle_serial_event): Adjust.
4426 (handle_target_event): If GDB isn't connected, forward events back
4427 to the inferior, unless the last process exited, in which case,
4428 exit gdbserver. Adjust interface.
4430 * remote-utils.c (remote_open): Don't block in accept. Instead
4431 register an event loop source on the listen socket file
4432 descriptor. Refactor bits into ...
4433 (listen_desc): ... this new global.
4434 (gdb_connected): ... this new function.
4435 (enable_async_notification): ... this new function.
4436 (handle_accept_event): ... this new function.
4437 (remote_close): Clear remote_desc.
4439 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4441 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4443 (mourn_inferior): Define.
4444 (target_process_qsupported): Avoid the dangling else problem.
4445 (thread_stopped): Define.
4446 (pause_all): Define.
4447 (target_waitstatus_to_string): Declare.
4448 * target.c (target_waitstatus_to_string): New.
4450 * tracepoint.c (tracing): Make extern.
4451 (disconnected_tracing): New.
4452 (stop_tracing): Make extern. Handle tracing stops due to GDB
4454 (cmd_qtdisconnected): New.
4455 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4456 (handle_tracepoint_general_set): Handle QTDisconnected.
4458 * event-loop.c (event_handler_func): Change return type to int.
4459 (process_event): Bail out if the event handler wants the event
4461 (handle_file_event): Ditto.
4462 (start_event_loop): Bail out if the event handler wants the event
4465 * nto-low.c (nto_target_ops): Adjust.
4466 * spu-low.c (spu_wait): Don't remove the process here.
4467 (spu_target_ops): Adjust.
4468 * win32-low.c (win32_wait): Don't remove the process here.
4469 (win32_target_ops): Adjust.
4471 2010-04-11 Pedro Alves <pedro@codesourcery.com>
4473 * regcache.c (realloc_register_cache): Invalidate inferior's
4474 regcache before recreating it.
4476 2010-04-09 Pedro Alves <pedro@codesourcery.com>
4478 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4480 2010-04-09 Stan Shebs <stan@codesourcery.com>
4481 Pedro Alves <pedro@codesourcery.com>
4483 * server.h (LONGEST): New.
4484 (struct thread_info) <while_stepping>: New field.
4485 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4487 (initialize_tracepoint, handle_tracepoint_general_set)
4488 (handle_tracepoint_query, tracepoint_finished_step)
4489 (tracepoint_was_hit, release_while_stepping_state_list):
4490 (current_traceframe): Declare.
4491 * server.c (handle_general_set): Handle tracepoint packets.
4493 (write_memory): New.
4494 (handle_search_memory_1): Use read_memory.
4495 (handle_query): Report support for conditional tracepoints, trace
4496 state variables, and tracepoint sources. Handle tracepoint
4498 (main): Initialize the tracepoints module.
4499 (process_serial_event): Handle traceframe reads/writes.
4501 * linux-low.c (handle_tracepoints): New.
4502 (linux_wait_1): Call it.
4503 (linux_resume_one_lwp): Handle while-stepping.
4504 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4505 (linux_target_ops): Install them.
4506 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4508 * linux-x86-low.c (x86_supports_tracepoints): New.
4509 (the_low_target). Install it.
4511 * mem-break.h (delete_breakpoint): Declare.
4512 * mem-break.c (delete_breakpoint): Make external.
4514 * target.h (struct target_ops): Add `supports_tracepoints',
4515 `read_pc', and `write_pc' fields.
4516 (target_supports_tracepoints): Define.
4517 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4520 * regcache.h (struct regcache) <registers_owned>: New field.
4521 (init_register_cache, regcache_cpy): Declare.
4522 (regcache_read_pc, regcache_write_pc): Declare.
4523 (register_cache_size): Declare.
4524 (supply_regblock): Declare.
4525 * regcache.c (init_register_cache): New.
4526 (new_register_cache): Use it.
4527 (regcache_cpy): New.
4528 (register_cache_size): New.
4529 (supply_regblock): New.
4530 (regcache_read_pc, regcache_write_pc): New.
4532 * tracepoint.c: New.
4534 * Makefile.in (OBS): Add tracepoint.o.
4535 (tracepoint.o): New rule.
4537 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4539 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4541 (i386-mmx.c): Likewise.
4542 (i386-mmx-linux.o): Likewise.
4543 (i386-mmx-linux.c): Likewise.
4545 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4546 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4547 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4548 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4550 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4551 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4552 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4554 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4556 * Makefile.in (clean): Updated.
4558 (i386-avx.c): Likewise.
4559 (i386-avx-linux.o): Likewise.
4560 (i386-avx-linux.c): Likewise.
4561 (amd64-avx.o): Likewise.
4562 (amd64-avx.c): Likewise.
4563 (amd64-avx-linux.o): Likewise.
4564 (amd64-avx-linux.c): Likewise.
4566 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4567 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4568 (srv_amd64_regobj): Add amd64-avx.o.
4569 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4570 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4571 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4572 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4573 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4574 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4575 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4577 * i387-fp.c: Include "i386-xstate.h".
4579 (i387_cache_to_xsave): Likewise.
4580 (i387_xsave_to_cache): Likewise.
4581 (x86_xcr0): Likewise.
4583 * i387-fp.h (i387_cache_to_xsave): Likewise.
4584 (i387_xsave_to_cache): Likewise.
4585 (x86_xcr0): Likewise.
4587 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4588 * linux-crisv32-low.c (target_regsets): Likewise.
4589 * linux-m68k-low.c (target_regsets): Likewise.
4590 * linux-mips-low.c (target_regsets): Likewise.
4591 * linux-ppc-low.c (target_regsets): Likewise.
4592 * linux-s390-low.c (target_regsets): Likewise.
4593 * linux-sh-low.c (target_regsets): Likewise.
4594 * linux-sparc-low.c (target_regsets): Likewise.
4595 * linux-xtensa-low.c (target_regsets): Likewise.
4597 * linux-low.c: Include <sys/uio.h>.
4598 (regsets_fetch_inferior_registers): Support nt_type.
4599 (regsets_store_inferior_registers): Likewise.
4600 (linux_process_qsupported): New.
4601 (linux_target_ops): Add linux_process_qsupported.
4603 * linux-low.h (regset_info): Add nt_type.
4604 (linux_target_ops): Add process_qsupported.
4606 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4608 (init_registers_i386_avx_linux): New.
4609 (init_registers_amd64_avx_linux): Likewise.
4610 (xmltarget_i386_linux_no_xml): Likewise.
4611 (xmltarget_amd64_linux_no_xml): Likewise.
4612 (PTRACE_GETREGSET): Likewise.
4613 (PTRACE_SETREGSET): Likewise.
4614 (x86_fill_xstateregset): Likewise.
4615 (x86_store_xstateregset): Likewise.
4616 (use_xml): Likewise.
4617 (x86_linux_update_xmltarget): Likewise.
4618 (x86_linux_process_qsupported): Likewise.
4619 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4620 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4621 init_registers_i386_linux here. Call
4622 x86_linux_update_xmltarget.
4623 (the_low_target): Add x86_linux_process_qsupported.
4625 * server.c (handle_query): Call target_process_qsupported.
4627 * target.h (target_ops): Add process_qsupported.
4628 (target_process_qsupported): New.
4630 2010-04-03 Pedro Alves <pedro@codesourcery.com>
4632 * inferiors.c (add_thread): Set last_status kind to
4633 TARGET_WAITKIND_IGNORE.
4634 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4635 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4636 (linux_wait_1): Move `thread' local definition to block that uses
4637 it. Don't NULL initialize `event_child'.
4638 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4639 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4640 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4642 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4644 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4645 an extended waitstatus, or by a watchpoint.
4646 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4647 thread was stepping or has been stopped by a watchpoint.
4649 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4651 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4652 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4653 of another, then delete the previous, and validate all
4655 (validate_inserted_breakpoint): New.
4656 (delete_disabled_breakpoints): New.
4657 (validate_breakpoints): New.
4658 (check_mem_read): Validate breakpoints before trusting their
4659 shadow. Delete disabled breakpoints.
4660 (check_mem_write): Validate breakpoints before trusting they
4661 should be inserted. Delete disabled breakpoints.
4662 * mem-break.h (validate_breakpoints):
4663 * server.c (handle_query): Validate breakpoints when we see a
4666 2010-04-01 Pedro Alves <pedro@codesourcery.com>
4668 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4669 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4670 if we could tell there's a GDB breakpoint at stop_pc.
4671 (need_step_over_p): Don't do a step over if we find a GDB
4672 breakpoint at the resume PC.
4674 * mem-break.c (struct raw_breakpoint): New.
4675 (enum bkpt_type): New type `gdb_breakpoint'.
4676 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4677 fields. New field `raw'.
4678 (find_raw_breakpoint_at): New.
4679 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4681 (set_breakpoint_at): Adjust.
4682 (delete_raw_breakpoint): New.
4683 (release_breakpoint): New.
4684 (delete_breakpoint): Rename to...
4685 (delete_breakpoint_1): ... this. Add proc parameter. Use
4686 release_breakpoint. Return ENOENT.
4687 (delete_breakpoint): Reimplement.
4688 (find_breakpoint_at): Delete.
4689 (find_gdb_breakpoint_at): New.
4690 (delete_breakpoint_at): Delete.
4691 (set_gdb_breakpoint_at): New.
4692 (delete_gdb_breakpoint_at): New.
4693 (gdb_breakpoint_here): New.
4694 (set_reinsert_breakpoint): Use release_breakpoint.
4695 (uninsert_breakpoint): Rename to ...
4696 (uninsert_raw_breakpoint): ... this.
4697 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4698 (reinsert_raw_breakpoint): Change parameter type to
4700 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4702 (check_breakpoints): Adjust. Use release_breakpoint.
4703 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4704 (breakpoint_inserted_here): Ditto.
4705 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4706 Don't trust the breakpoint's shadow if it is not inserted.
4707 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4708 (delete_all_breakpoints): Adjust.
4709 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4710 use delete_breakpoint_1.
4712 * mem-break.h (breakpoints_supported): Delete declaration.
4713 (set_gdb_breakpoint_at): Declare.
4714 (gdb_breakpoint_here): Declare.
4715 (delete_breakpoint_at): Delete.
4716 (delete_gdb_breakpoint_at): Declare.
4718 * server.h (struct raw_breakpoint): Forward declare.
4719 (struct process_info): New field `raw_breakpoints'.
4721 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
4724 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4726 * linux-low.c (status_pending_p_callback): Fix comment.
4727 (linux_wait_for_event_1): Move most of the internal breakpoint
4728 handling from here...
4729 (linux_wait_1): ... to here.
4730 (count_events_callback): New.
4731 (select_singlestep_lwp_callback): New.
4732 (select_event_lwp_callback): New.
4733 (cancel_breakpoints_callback): New.
4734 (select_event_lwp): New.
4735 (linux_wait_1): Simplify internal breakpoint handling. Give equal
4736 priority to all LWPs that have had events that should be reported
4737 to the client. Cancel breakpoints when about to reporting the
4738 event to the client, not while stopping lwps. No longer cancel
4739 finished single-steps here.
4740 (cancel_finished_single_step): Delete.
4741 (cancel_finished_single_steps): Delete.
4743 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4745 * mem-break.c (enum bkpt_type): New.
4746 (struct breakpoint): New field `type'.
4747 (set_breakpoint_at): Change return type to struct breakpoint
4748 pointer. Set type to `other_breakpoint' by default.
4749 (delete_breakpoint): Rewrite, supporting more than one breakpoint
4750 in the breakpoint list.
4751 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
4752 (reinsert_breakpoint): Rename to ...
4753 (reinsert_raw_breakpoint): ... this.
4754 (reinsert_breakpoints_at): Adjust.
4755 * mem-break.h (struct breakpoint): Declare.
4756 (set_breakpoint_at): Change return type to struct breakpoint
4759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4761 * server.c (handle_query): Assign, not compare.
4763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
4765 Teach linux gdbserver to step-over-breakpoints.
4767 * linux-low.c (can_hardware_single_step): New.
4768 (supports_breakpoints): New.
4769 (handle_extended_wait): If stopping threads, read the stop pc of
4772 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
4773 low target doesn't support retrieving the PC.
4774 (add_lwp): Set last_resume_kind to resume_continue.
4775 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
4776 (linux_attach): Don't clear stop_expected. Set the lwp's
4777 last_resume_kind to resume_stop.
4778 (linux_detach_one_lwp): Don't check for removed breakpoints.
4779 (check_removed_breakpoint): Delete.
4780 (status_pending_p): Rename to ...
4781 (status_pending_p_callback): ... this. Don't check for removed
4782 breakpoints. Don't consider threads that are stopped from GDB's
4784 (linux_wait_for_lwp): Always read the stop_pc here.
4785 (cancel_breakpoint): New.
4786 (step_over_bkpt): New global.
4787 (linux_wait_for_event_1): Implement stepping over breakpoints.
4788 (gdb_wants_lwp_stopped): New.
4789 (gdb_wants_all_stopped): New.
4790 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
4791 single-step traps here. Store the thread's last reported target
4793 (send_sigstop): Don't clear stop_expected. Always set it,
4795 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
4796 (cancel_finished_single_step): New.
4797 (cancel_finished_single_steps): New.
4798 (wait_for_sigstop): Don't cancel finished single-step traps here.
4799 (linux_resume_one_lwp): Don't check for removed breakpoints.
4800 Don't set `step' on non-hardware step archs.
4801 (linux_set_resume_request): Ignore resume_stop requests if already
4802 stopping or stopped. Set the lwp's last_resume_kind.
4803 (resume_status_pending_p): Don't check for removed breakpoints.
4804 (need_step_over_p): New.
4805 (start_step_over): New.
4806 (finish_step_over): New.
4807 (linux_resume_one_thread): Always queue a sigstop for resume_stop
4808 requests. Clear the thread's last reported target waitstatus.
4809 Don't use the `suspended' flag. Don't consider pending breakpoints.
4810 (linux_resume): Start a step-over if necessary.
4811 (proceed_one_lwp): New.
4812 (proceed_all_lwps): New.
4813 (unstop_all_lwps): New.
4814 * linux-low.h (struct lwp_info): Rewrite comment for the
4815 `suspended' flag. Add the `stop_pc' field. Delete the
4816 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
4817 Add `'last_resume_kind' and `need_step_over' fields.
4818 * inferiors.c (struct thread_info): Delete, moved elsewhere.
4819 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
4820 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
4821 (set_raw_breakpoint_at): New.
4822 (set_breakpoint_at): Rewrite to use it.
4823 (reinsert_breakpoint_handler): Delete.
4824 (set_reinsert_breakpoint): New.
4825 (reinsert_breakpoint_by_bp): Delete.
4826 (delete_reinsert_breakpoints): New.
4827 (uninsert_breakpoint): Rewrite.
4828 (uninsert_breakpoints_at): New.
4829 (reinsert_breakpoint): Rewrite.
4830 (reinsert_breakpoints_at): New.
4831 (check_breakpoints): Rewrite.
4832 (breakpoint_here): New.
4833 (breakpoint_inserted_here): New.
4834 (check_mem_read): Adjust.
4835 * mem-break.h (breakpoints_supported, breakpoint_here)
4836 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
4837 (reinsert_breakpoint_by_bp): Delete declaration.
4838 (delete_reinsert_breakpoints): Declare.
4839 (reinsert_breakpoint): Delete declaration.
4840 (reinsert_breakpoints_at): Declare.
4841 (uninsert_breakpoint): Delete declaration.
4842 (uninsert_breakpoints_at): Declare.
4843 (check_breakpoints): Adjust prototype.
4844 * server.h: Adjust include order.
4845 (struct thread_info): Declare here. Add a `last_status' field.
4847 2010-03-23 Michael Snyder <msnyder@vmware.com>
4849 * server.c (crc32): New function.
4850 (handle_query): Add handling for 'qCRC:' request.
4852 2010-03-23 Pedro Alves <pedro@codesourcery.com>
4854 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
4855 lwp had been stopped by a watchpoint.
4857 2010-03-16 Pedro Alves <pedro@codesourcery.com>
4859 * server.h (internal_error): Declare.
4860 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
4861 * utils.c (internal_error): New function.
4863 2010-03-15 Andreas Schwab <schwab@redhat.com>
4865 * configure.srv: Fix typo setting srv_regobj.
4867 2010-03-15 Pedro Alves <pedro@codesourcery.com>
4869 * linux-low.c (fetch_register): Avoid passing a non string literal
4871 (usr_store_inferior_registers): Ditto.
4873 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4875 * linux-low.c (linux_write_memory): Bail out early if peeking
4878 2010-03-14 Pedro Alves <pedro@codesourcery.com>
4880 * linux-low.h (struct lwp_info): New fields
4881 `stopped_by_watchpoint' and `stopped_data_address'.
4882 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
4883 here, and cache them in the lwp object.
4884 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
4886 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
4888 (linux_stopped_by_watchpoint): Rewrite.
4889 (linux_stopped_data_address): Rewrite.
4891 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
4893 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
4894 switching the current inferior, not before.
4896 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
4898 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
4899 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
4900 i386-linux.c and amd64-linux.c.
4901 (reg-i386.o): Removed.
4902 (reg-i386.c): Likewise.
4903 (reg-i386-linux.o): Likewise.
4904 (reg-i386-linux.c): Likewise.
4905 (reg-x86-64.o): Likewise.
4906 (reg-x86-64.c): Likewise.
4907 (reg-x86-64-linux.o): Likewise.
4908 (reg-x86-64-linux.c): Likewise.
4911 (i386-linux.o): Likewise.
4912 (i386-linux.c): Likewise.
4913 (amd64.o): Likewise.
4914 (amd64.c): Likewise.
4915 (amd64-linux.o): Likewise.
4916 (amd64-linux.c): Likewise.
4918 * configure.srv (srv_i386_regobj): New.
4919 (srv_i386_linux_regobj): Likewise.
4920 (srv_amd64_regobj): Likewise.
4921 (srv_amd64_linux_regobj): Likewise.
4922 (srv_i386_32bit_xmlfiles): Likewise.
4923 (srv_i386_64bit_xmlfiles): Likewise.
4924 (srv_i386_xmlfiles): Likewise.
4925 (srv_amd64_xmlfiles): Likewise.
4926 (srv_i386_linux_xmlfiles): Likewise.
4927 (srv_amd64_linux_xmlfiles): Likewise.
4928 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
4929 srv_xmlfiles to $srv_i386_xmlfiles.
4930 (i[34567]86-*-mingw32ce*): Likewise.
4931 (i[34567]86-*-mingw*): Likewise.
4932 (i[34567]86-*-nto*): Likewise.
4933 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
4934 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
4935 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
4936 (x86_64-*-linux*): Likewise.
4938 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
4939 (init_registers_amd64_linux): New.
4940 (x86_arch_setup): Replace init_registers_x86_64_linux with
4941 init_registers_amd64_linux.
4943 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
4945 * configure.ac: Check for libdl. If it is not available link against
4946 static libthread_db.
4947 * configure: Regenerate.
4949 2010-02-22 Pedro Alves <pedro@codesourcery.com>
4953 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
4954 handing a read watchpoint.
4955 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
4957 2010-02-12 Doug Evans <dje@google.com>
4959 * linux-low.c (linux_supports_tracefork_flag): Document.
4960 (linux_look_up_symbols): Add comment.
4962 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
4964 * regcache.c (supply_register): Clear regcache if buf is NULL.
4966 2010-02-02 Nicolas Roche <roche@sourceware.org>
4967 Joel Brobecker <brobecker@adacore.com>
4969 * inferiors.c (find_inferior): Add function documentation.
4970 (unloaded_dll): Handle the case where the unloaded dll has not
4971 been previously registered in the dll list.
4973 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4975 * linux-arm-low.c (thumb_breakpoint_len): Delete.
4976 (thumb2_breakpoint): New.
4977 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
4979 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4981 * linux-low.c (get_stop_pc): Check for SIGTRAP.
4982 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
4985 2010-01-21 Pedro Alves <pedro@codesourcery.com>
4987 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
4989 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4991 * linux-s390-low.c (s390_collect_ptrace_register)
4992 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
4994 2010-01-21 Doug Evans <dje@google.com>
4996 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4997 (PTRACE_ARG4_TYPE): New macro.
4998 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4999 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5000 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5001 (usr_store_inferior_registers): Ditto.
5002 (linux_read_memory, linux_write_memory): Ditto.
5003 (linux_test_for_tracefork): Ditto.
5005 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5006 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5008 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5010 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5013 2010-01-21 Pedro Alves <pedro@codesourcery.com>
5015 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5016 prototype to take a regcache. Adjust.
5018 2010-01-20 Pedro Alves <pedro@codesourcery.com>
5020 * regcache.h (struct thread_info): Forward declare.
5021 (struct regcache): New.
5022 (new_register_cache): Adjust prototype.
5023 (get_thread_regcache): Declare.
5024 (free_register_cache): Adjust prototype.
5025 (registers_to_string, registers_from_string): Ditto.
5026 (supply_register, supply_register_by_name, collect_register)
5027 (collect_register_as_string, collect_register_by_name): Ditto.
5028 * regcache.c (struct inferior_regcache_data): Delete.
5029 (get_regcache): Rename to ...
5030 (get_thread_regcache): ... this. Adjust. Switch inferior before
5032 (regcache_invalidate_one): Adjust.
5033 (regcache_invalidate): Fix prototype.
5034 (new_register_cache): Return the new register cache.
5035 (free_register_cache): Change prototype.
5036 (realloc_register_cache): Adjust.
5037 (registers_to_string): Change prototype to take a regcache. Adjust.
5038 (registers_from_string): Ditto.
5039 (register_data): Ditto.
5040 (supply_register): Ditto.
5041 (supply_register_by_name): Ditto.
5042 (collect_register): Ditto.
5043 (collect_register_as_string): Ditto.
5044 (collect_register_by_name): Ditto.
5045 * server.c (process_serial_event): Adjust.
5046 * linux-low.h (regset_fill_func, regset_store_func): Change
5048 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5050 * linux-low.c (get_stop_pc): Adjust.
5051 (check_removed_breakpoint): Adjust.
5052 (linux_wait_for_event): Adjust.
5053 (linux_resume_one_lwp): Adjust.
5054 (fetch_register): Add regcache parameter. Adjust.
5055 (usr_store_inferior_registers): Ditto.
5056 (regsets_fetch_inferior_registers): Ditto.
5057 (regsets_store_inferior_registers): Ditto.
5058 (linux_fetch_registers, linux_store_registers): Ditto.
5059 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5061 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5063 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5064 prototype to take a regcache.
5065 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5066 * remote-utils.c (convert_ascii_to_int, outreg)
5067 (prepare_resume_reply): Change prototype to take a regcache.
5069 * target.h (struct target_ops) <fetch_registers, store_registers>:
5070 Change prototype to take a regcache.
5071 (fetch_inferior_registers, store_inferior_registers): Change
5072 prototype to take a regcache. Adjust.
5073 * proc-service.c (ps_lgetregs): Adjust.
5074 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5075 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5076 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5077 take a regcache. Adjust.
5078 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5079 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5080 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5081 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5082 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5083 (cris_cannot_fetch_register):
5084 (cris_breakpoint_at): Change prototype to take a regcache.
5086 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5087 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5088 to take a regcache. Adjust.
5089 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5091 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5092 take a regcache. Adjust.
5093 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5094 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5095 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5096 * linux-mips-low.c (mips_get_pc):
5097 (mips_set_pc): Change prototype to take a regcache. Adjust.
5098 (mips_reinsert_addr): Adjust.
5099 (mips_collect_register): Change prototype to take a regcache.
5101 (mips_supply_register):
5102 (mips_collect_register_32bit, mips_supply_register_32bit)
5103 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5104 (mips_store_fpregset): Ditto.
5105 * linux-ppc-low.c (ppc_supply_ptrace_register)
5106 (ppc_supply_ptrace_register): Ditto.
5107 (parse_spufs_run): Adjust.
5108 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5109 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5110 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5111 take a regcache. Adjust.
5112 * linux-s390-low.c (s390_collect_ptrace_register)
5113 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5114 (s390_set_pc): Change prototype to take a regcache. Adjust.
5115 (s390_arch_setup): Adjust.
5116 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5117 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5118 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5119 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5120 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5122 (sparc_breakpoint_at): Adjust.
5123 * linux-xtensa-low.c (xtensa_fill_gregset):
5124 (xtensa_store_gregset):
5125 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5126 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5127 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5128 prototype to take a regcache. Adjust.
5129 * win32-arm-low.c (arm_fetch_inferior_register)
5130 (arm_store_inferior_register): Change prototype to take a
5132 * win32-i386-low.c (i386_fetch_inferior_register)
5133 (i386_store_inferior_register): Change prototype to take a
5135 * win32-low.c (child_fetch_inferior_registers)
5136 (child_store_inferior_registers): Change prototype to take a
5138 (win32_wait): Adjust.
5139 (win32_fetch_inferior_registers): Change prototype to take a
5141 (win32_store_inferior_registers): Adjust.
5142 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5143 store_inferior_register>: Change prototype to take a regcache.
5145 2010-01-20 Doug Evans <dje@google.com>
5147 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5149 (linux_wait_for_event1, linux_init_signals): Ditto.
5150 (W_STOPCODE): Provide definition if missing.
5152 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5154 * linux-low.c (linux_core_of_thread): New.
5155 (compare_ints, show_process, list_threads): New.
5156 (linux_qxfer_osdata): Report threads and cores.
5157 (linux_target_op): Register linux_core_of_thread.
5158 * remote-utils.c (prepare_resume_reply): Report the core.
5159 (buffer_xml_printf): Support %d specifier.
5160 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5162 (handle_query): Handle qXfer:threads. Announce availability
5164 * target.h (struct target_ops): New field core_of_thread.
5166 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5168 * Makefile.in (clean): Remove new generated files.
5169 (reg-s390.o, reg-s390.c): Remove rules.
5170 (reg-s390x.o, reg-s390x.c): Likewise.
5171 (s390-linux32.o, s390-linux32.c): Add rules.
5172 (s390-linux64.o, s390-linux64.c): Likewise.
5173 (s390x-linux64.o, s390x-linux64.c): Likewise.
5174 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5175 * linux-s390-low.c: Include <elf.h>.
5176 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5177 (init_registers_s390): Remove prototype.
5178 (init_registers_s390x): Likewise.
5179 (init_registers_s390_linux32): Add prototype.
5180 (init_registers_s390_linux64): Likewise.
5181 (init_registers_s390x_linux64): Likewise.
5182 (s390_num_regs_3264): New define.
5183 (s390_regmap_3264): New global variable.
5184 (s390_cannot_fetch_register): Remove obsolete check.
5185 (s390_cannot_store_register): Likewise.
5186 (s390_collect_ptrace_register): Handle upper/lower register halves.
5187 (s390_supply_ptrace_register): Likewise.
5188 (s390_fill_gregset): Update to register number changes.
5189 (s390_get_hwcap): New routine.
5190 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5191 Install appropriate regmap and register set.
5193 2010-01-01 Joel Brobecker <brobecker@adacore.com>
5195 * server.c (gdbserver_version): Update copyright year to 2010.
5196 * gdbreplay.c (gdbreplay_version): Likewise.
5198 2009-12-28 Doug Evans <dje@google.com>
5200 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5201 elf/external.h. Include <elf.h> instead but only if necessary.
5203 2009-12-28 Pedro Alves <pedro@codesourcery.com>
5205 * linux-low.c (linux_remove_process): Remove `detaching'
5206 parameter. Don't release/detach from thread_db here.
5207 (linux_kill): Release/detach from thread_db here, ...
5208 (linux_detach): ... and here, before actually detaching.
5209 (linux_wait_1): ... and here, when a process exits.
5210 * thread-db.c (any_thread_of): New.
5211 (thread_db_free): Switch the current inferior to a thread of the
5214 2009-12-21 Doug Evans <dje@google.com>
5216 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5218 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5219 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5220 warning ifndef __NR_tkill. Move setting of errno there too.
5221 Delete unnecessary resetting of errno after syscall.
5222 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5224 * configure.ac: Check for dladdr.
5225 * config.in: Regenerate.
5226 * configure: Regenerate.
5227 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5228 (try_thread_db_load): Update.
5230 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5232 2009-12-18 Doug Evans <dje@google.com>
5234 * event-loop.c: Include unistd.h if it exists.
5236 * linux-low.c (my_waitpid): Move definition away from being in
5237 between linux_tracefork_child/linux_test_for_tracefork.
5239 * gdb_proc_service.h (psaddr_t): Fix type.
5240 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5241 signature to match glibc.
5243 2009-12-16 Doug Evans <dje@google.com>
5245 * linux-low.c (linux_read_memory): Fix argument to read.
5247 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5249 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5250 events, don't leave current_inferior pointing at null.
5252 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5254 * win32-low.c (LOG): Delete.
5255 (OUTMSG): Output to stderr.
5256 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5257 on compile time LOG macro.
5258 (win32_wait): Fix debug output.
5260 2009-11-26 Pedro Alves <pedro@codesourcery.com>
5262 * win32-low.c (win32_add_one_solib): If the dll name is
5263 "ntdll.dll", prepend the system directory to the dll path.
5265 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5267 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5269 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
5270 Vladimir Prus <vladimir@codesourcery.com>
5272 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5273 * configure.ac: Check for __mcoldfire__ and set
5274 gdb_cv_m68k_is_coldfire.
5275 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5276 reg-cf.o and reg-m68k.o.
5277 * configure: Regenerated.
5279 2009-11-16 Pedro Alves <pedro@codesourcery.com>
5281 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5282 Pass it to thread_db_free.
5283 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5284 proper `detaching' argument to linux_remove_process.
5285 * linux-low.h (thread_db_free): Add `detaching' parameter.
5286 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5288 (thread_db_free): Add `detaching' parameter. Only
5289 call td_ta_clear_event if detaching from process.
5291 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5293 * thread-db.c (thread_db_free): Fix typo.
5295 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5298 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5300 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5302 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5303 with an i686 compiler.
5304 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5306 * configure: Rebuilt.
5308 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5312 * server.c (handle_search_memory_1): Correct read_addr initialization
5313 in loop for searching subsequent chunks.
5315 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5317 * configure.ac: New --with-libthread-db option.
5318 * thread-db.c: Allow direct dependence on libthread_db.
5319 (thread_db_free): Adjust.
5320 * config.in: Regenerate.
5321 * configure: Likewise.
5323 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5326 * thread-db.c (attach_thread): New function.
5327 (maybe_attach_thread): Return success/failure.
5328 (find_new_threads_callback): Adjust.
5329 (thread_db_find_new_threads): Loop until no new threads.
5331 2009-10-13 Pedro Alves <pedro@codesourcery.com>
5333 * proc-service.c (ps_lgetregs): Formatting.
5335 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5337 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5338 * configure.ac: Adjust.
5339 * linux-low.h (struct process_info_private): Move members to struct
5341 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5342 * linux-low.c (linux_remove_process): Adjust.
5343 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5344 * server.c (handle_query): Move code ...
5345 (handle_monitor_command): ... here. New function.
5346 * target.h (struct target_ops): New member.
5347 * thread-db.c (struct thread_db): New.
5348 (libthread_db_search_path): New variable.
5349 (thread_db_create_event, thread_db_enable_reporting)
5350 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5351 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5352 (try_thread_db_load_1, dladdr_to_soname): New functions.
5353 (try_thread_db_load, thread_db_load_search): New functions.
5354 (thread_db_init): Search for libthread_db.
5355 (thread_db_free): New function.
5356 (thread_db_handle_monitor_command): Likewise.
5357 * config.in: Regenerate.
5358 * configure: Regenerate.
5360 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5362 * spu-low.c (spu_kill): Wait for inferior to terminate.
5363 Call clear_inferiors.
5364 (spu_detach): Call clear_inferiors.
5366 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5368 * aclocal.m4: Regenerate.
5369 * config.in: Likewise.
5370 * configure: Likewise.
5372 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5374 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5375 (parse_spufs_run): New function.
5376 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5377 (ppc_breakpoint_at): Handle SPU breakpoints.
5379 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5381 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5382 (SPUFS_MAGIC): Define.
5383 (spu_enumerate_spu_ids): New function.
5384 (linux_qxfer_spu): New function.
5385 (linux_target_ops): Install linux_qxfer_spu.
5387 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5389 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5390 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5391 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5392 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5393 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5394 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5395 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5396 (init_registers_powerpc_cell32l): Add prototype.
5397 (init_registers_powerpc_cell64l): Likewise.
5398 (ppc_arch_setup): Detect Cell/B.E. architecture.
5400 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5402 * Makefile.in (datarootdir): New variable.
5404 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5406 * linux-low.c (linux_write_memory): Update debugging output.
5407 * Makefile.in (clean): Add new descriptions.
5408 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5409 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5410 * configure.srv: Add new files for arm*-*-linux*.
5411 * linux-arm-low.c: Add new declarations.
5412 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5413 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5414 (HWCAP_VFPv3D16): New.
5415 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5416 instead of __IWMMXT__.
5417 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5418 (arm_arch_setup): New.
5419 (target_regsets): Remove #ifdef. Add VFP regset.
5420 (the_low_target): Use arm_arch_setup.
5422 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5424 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5425 the main thread again.
5427 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5429 Adding Neutrino gdbserver.
5430 * configure: Regenerated.
5431 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5432 * configure.srv (i[34567]86-*-nto*): New target.
5433 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5434 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5435 (nto_comctrl) [__QNX__]: New function.
5436 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5438 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
5440 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5443 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5444 Pedro Alves <pedro@codesourcery.com>
5446 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5447 don't support CONTEXT_EXTENDED_REGISTERS.
5448 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5449 (the_low_target): Install them.
5450 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5451 failing with ERROR_PIPE_NOT_CONNECTED.
5453 2009-06-30 Doug Evans <dje@google.com>
5454 Pierre Muller <muller@ics.u-strasbg.fr>
5456 Add h/w watchpoint support to x86-linux, win32-i386.
5457 * Makefile.in (SFILES): Add i386-low.c
5458 (i386_low_h): Define.
5459 (i386-low.o): Add dependencies.
5460 (linux-x86-low.o): Add i386-low.h dependency.
5461 (win32-i386-low.o): Ditto.
5462 * i386-low.c: New file.
5463 * i386-low.h: New file.
5464 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5465 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5466 * linux-low.c (linux_add_process): Initialize arch_private.
5467 (linux_remove_process): Free arch_private.
5468 (add_lwp): Initialize arch_private.
5469 (delete_lwp): Free arch_private.
5470 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5472 * linux-low.h (process_info_private): New member arch_private.
5473 (lwp_info): New member arch_private.
5474 (linux_target_ops): New members new_process, new_thread,
5476 (ptid_of): New macro.
5477 * linux-x86-low.c: Include stddef.h, i386-low.h.
5478 (arch_process_info): New struct.
5479 (arch_lwp_info): New struct.
5480 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5481 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5482 (i386_dr_low_get_status): New function.
5483 (x86_insert_point, x86_remove_point): New functions.
5484 (x86_stopped_by_watchpoint): New function.
5485 (x86_stopped_data_address): New function.
5486 (x86_linux_new_process, x86_linux_new_thread): New functions.
5487 (x86_linux_prepare_to_resume): New function.
5488 (the_low_target): Add entries for insert_point, remove_point,
5489 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5491 * server.c (debug_hw_points): New global.
5492 (monitor_show_help): Document set debug-hw-points.
5493 (handle_query): Process "set debug-hw-points".
5494 * server.h (debug_hw_points): Declare.
5495 (paddress): Declare.
5496 * utils.c (NUMCELLS, CELLSIZE): New macros.
5497 (get_sell, xsnprintf, paddress): New functions.
5498 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5499 remove_point, stopped_by_watchpoint, stopped_data_address.
5500 * win32-i386-low.c: Include i386-low.h.
5501 (debug_reg_state): Replaces dr.
5502 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5503 (i386_dr_low_get_status): New function.
5504 (i386_insert_point, i386_remove_point): New functions.
5505 (i386_stopped_by_watchpoint): New function.
5506 (i386_stopped_data_address): New function.
5507 (i386_initial_stuff): Update.
5508 (get_thread_context,set_thread_context,i386_thread_added): Update.
5509 (the_low_target): Add entries for insert_point,
5510 remove_point, stopped_by_watchpoint, stopped_data_address.
5511 * win32-low.c (win32_insert_watchpoint): New function.
5512 (win32_remove_watchpoint): New function.
5513 (win32_stopped_by_watchpoint): New function.
5514 (win32_stopped_data_address): New function.
5515 (win32_target_ops): Add entries for insert_watchpoint,
5516 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5517 * win32-low.h (win32_target_ops): New members insert_point,
5518 remove_point, stopped_by_watchpoint, stopped_data_address.
5520 2009-06-25 Pedro Alves <pedro@codesourcery.com>
5522 * server.c (process_serial_event): Re-return unsupported, not
5523 error, if the type isn't recognized. Re-allow supporting only
5524 insert or remove packets. Also call require_running for
5525 breakpoints. Add missing break statement to default case. Tidy.
5526 * target.h (struct target_ops): Rename insert_watchpoint to
5527 insert_point, and remove_watchpoint to remove_point.
5529 * linux-low.h (struct linux_target_ops): Likewise.
5530 * linux-low.c (linux_insert_watchpoint): Rename to ...
5531 (linux_insert_point): ... this. Adjust.
5532 (linux_remove_watchpoint): Rename to ...
5533 (linux_remove_point): ... this. Adjust.
5534 (linux_target_ops): Adjust.
5535 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5536 (cris_insert_point): ... this.
5537 (cris_remove_watchpoint): Rename to ...
5538 (cris_remove_point): ... this.
5539 (the_low_target): Adjust.
5541 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5543 * server.c (handle_v_kill): Pass signal_pid to
5544 kill_inferior if multi_process is zero.
5546 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5548 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5549 * target.h (target_ops): Comment for *_watchpoint to make it clear
5550 the functions can get types '0' and '1'.
5552 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5554 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5555 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5556 * regcache.c (get_regcache): Likewise.
5557 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5558 * win32-low.c (child_fetch_inferior_registers): Remove check for
5561 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5562 Pedro Alves <pedro@codesourcery.com>
5564 * target.h (struct target_ops) <supports_multi_process>: New
5566 (target_supports_multi_process): New.
5567 * server.c (handle_query): Even if GDB reports support, only
5568 enable multi-process if the target also supports it. Report
5569 multi-process support only if the target backend supports it.
5570 * linux-low.c (linux_supports_multi_process): New function.
5571 (linux_target_ops): Install it as target_supports_multi_process
5574 2009-05-24 Doug Evans <dje@google.com>
5576 Global renaming of find_thread_pid to find_thread_ptid.
5577 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5578 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5579 All callers updated.
5581 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5582 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5585 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5586 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5587 (linux_resume_one_lwp): Ditto.
5589 2009-05-23 Doug Evans <dje@google.com>
5591 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5592 from struct inferior_list_entry * to struct lwp_info *.
5593 All callers updated.
5595 2009-05-13 Doug Evans <dje@google.com>
5597 * linux-x86-low.c: Don't include assert.h.
5598 (x86_siginfo_fixup): Use fatal, not assert.
5599 (x86_arch_setup): Fix comment.
5601 2009-05-12 Doug Evans <dje@google.com>
5603 Biarch support for i386/amd64 gdbserver.
5604 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5605 Add linux-x86-low.c.
5606 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5607 (linux-x86-low.o): Add.
5608 * linux-x86-64-low.c: Delete.
5609 * linux-i386-low.c: Delete.
5610 * linux-x86-low.c: New file.
5611 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5613 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5615 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5616 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5617 (linux_child_pid_to_exec_file): New function.
5618 (elf_64_header_p, elf_64_file_p): New functions.
5619 (siginfo_fixup): New function.
5620 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5621 give target a chance to convert layout.
5622 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5623 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5625 2009-05-07 Doug Evans <dje@google.com>
5627 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5628 (regsets_store_inferior_registers): Ditto.
5630 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5634 * linux-low.c (must_set_ptrace_flags): Delete.
5635 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5637 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5638 `lwp->must_set_ptrace_flags' instead.
5639 (linux_wait_for_event_1): Set ptrace options here.
5640 (linux_wait_1): ... not here.
5642 2009-04-30 Doug Evans <dje@google.com>
5644 * inferiors.c (started_inferior_callback): New function.
5645 (attached_inferior_callback): New function.
5646 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5647 * server.c (print_started_pid, print_attached_pid): New functions.
5648 (detach_or_kill_for_exit): New function.
5649 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5650 * server.h (have_started_inferiors_p): Declare.
5651 (have_attached_inferiors_p): Declare.
5653 * inferiors.c (remove_process): Fix memory leak, free process.
5654 * linux-low.c (linux_remove_process): New function.
5655 (linux_kill): Call it instead of remove_process.
5656 (linux_detach, linux_wait_1): Ditto.
5658 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5660 * configure.srv: Add x86 Windows CE target.
5662 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5664 * inferiors.c (get_thread_process): Make global.
5665 * server.h (get_thread_process): Add prototype.
5666 * thread-db.c (find_one_thread): Use get_thread_process
5667 instead of current_process.
5668 (thread_db_get_tls_address): Do not crash if called when
5669 thread layer is not yet initialized.
5671 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5673 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5674 * spu-low.c (current_tid): Rename to ...
5675 (current_ptid): ... this.
5676 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5677 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5678 ptid_get_lwp (current_ptid) instead of current_tid.
5679 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5680 instead of current_tid. Use find_process_pid to verify pid
5681 argument is valid. Pass proper argument to remove_process.
5682 (spu_thread_alive): Compare current_ptid instead of current_tid.
5683 (spu_resume): Likewise.
5685 2009-04-02 Pedro Alves <pedro@codesourcery.com>
5687 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5690 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5692 Implement the multiprocess extensions, and add linux multiprocess
5695 * server.h (ULONGEST): Declare.
5696 (struct ptid, ptid_t): New.
5697 (minus_one_ptid, null_ptid): Declare.
5698 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5699 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5700 (struct inferior_list_entry): Change `id' type from unsigned from
5702 (struct sym_cache, struct breakpoint, struct
5703 process_info_private): Forward declare.
5704 (struct process_info): Declare.
5705 (current_process): Declare.
5706 (all_processes): Declare.
5707 (initialize_inferiors): Declare.
5708 (add_thread): Adjust to use ptid_t.
5709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5710 (add_process, remove_process, find_thread_pid): Declare.
5711 (find_inferior_id): Adjust to use ptid_t.
5712 (cont_thread, general_thread, step_thread): Change type to ptid_t.
5713 (multi_process): Declare.
5714 (push_event): Adjust to use ptid_t.
5715 (read_ptid, write_ptid): Declare.
5716 (prepare_resume_reply): Adjust to use ptid_t.
5717 (clear_symbol_cache): Declare.
5718 * inferiors.c (all_processes): New.
5719 (null_ptid, minus_one_ptid): New.
5720 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5721 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
5722 (add_thread): Change unsigned long to ptid. Remove gdb_id
5724 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
5725 (gdb_id_to_thread): Rename to ...
5726 (find_thread_pid): ... this. Change unsigned long to ptid.
5727 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
5728 (loaded_dll, pull_pid_from_list): Adjust.
5729 (add_process, remove_process, find_process_pid)
5730 (get_thread_process, current_process, initialize_inferiors): New.
5731 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
5732 (struct target_waitstatus) <related_pid>: Ditto.
5733 (struct target_ops) <kill, detach>: Add `pid' argument. Change
5735 (struct target_ops) <join>: Add `pid' argument.
5736 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
5737 (struct target_ops) <wait>: Add `ptid' field. Change return type
5739 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
5740 (mywait): Add `ptid' argument. Change return type to ptid_t.
5741 (target_pid_to_str): Declare.
5742 * target.c (set_desired_inferior): Adjust to use ptids.
5743 (mywait): Add new `ptid' argument. Adjust.
5744 (target_pid_to_str): New.
5745 * mem-break.h (free_all_breakpoints): Declare.
5746 * mem-break.c (breakpoints): Delelete.
5747 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
5748 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
5749 to use per-process breakpoint list.
5750 (free_all_breakpoints): New.
5751 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
5752 (symbol_cache, all_symbols_looked_up): Delete.
5754 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
5756 (prepare_resume_reply): Change ptid argument's type from unsigned
5757 long to ptid_t. Adjust. Implement W;process and X;process.
5758 (free_sym_cache, clear_symbol_cache): New.
5759 (look_up_one_symbol): Adjust to per-process symbol cache. *
5760 * server.c (cont_thread, general_thread, step_thread): Change type
5763 (multi_process): New.
5764 (last_ptid): Change type to ptid_t.
5765 (struct vstop_notif) <ptid>: Change type to ptid_t.
5766 (queue_stop_reply, push_event): Change `ptid' argument's type to
5768 (discard_queued_stop_replies): Add `pid' argument.
5769 (start_inferior): Adjust to use ptids. Adjust to mywait interface
5770 changes. Don't reference the `attached' global.
5771 (attach_inferior): Adjust to mywait interface changes.
5772 (handle_query): Adjust to use ptids. Parse GDB's qSupported
5773 features. Handle and report "multiprocess+". Handle
5775 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
5777 (handle_v_kill): New.
5778 (handle_v_stopped): Adjust to use target_pid_to_str.
5779 (handle_v_requests): Allow multiple attaches and runs when
5780 multiprocess extensions are in effect. Handle "vKill".
5781 (myresume): Adjust to use ptids.
5782 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
5783 (handle_status): Adjust to discard_queued_stop_replies interface
5785 (first_thread_of, kill_inferior_callback)
5786 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
5787 (main): Call initialize_inferiors. Adjust to use ptids, killing
5788 and detaching from all inferiors. Handle multiprocess packet
5790 * linux-low.h: Include gdb_proc_service.h.
5791 (struct process_info_private): New.
5792 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
5793 <lwpid_of>: Use ptid_get_lwp.
5794 (get_lwp_thread): Adjust.
5795 (struct lwp_info): Add `dead' member.
5796 (find_lwp_pid): Declare.
5797 * linux-low.c (thread_db_active): Delete.
5798 (new_inferior): Adjust comment.
5799 (inferior_pid): Delete.
5800 (linux_add_process): New.
5801 (handle_extended_wait): Adjust.
5802 (add_lwp): Change unsigned long to ptid.
5803 (linux_create_inferior): Add process to processes table. Adjust
5804 to use ptids. Don't set new_inferior here.
5805 (linux_attach_lwp): Rename to ...
5806 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
5807 it. Adjust to use ptids.
5808 (linux_attach_lwp): New.
5809 (linux_attach): Add process to processes table. Don't set
5811 (struct counter): New.
5812 (second_thread_of_pid_p, last_thread_of_process_p): New.
5813 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
5815 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
5816 processes. Remove process from process table.
5817 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
5818 to multiple processes.
5819 (any_thread_of): New.
5820 (linux_detach): Add `pid' argument, and handle it. Remove process
5821 from processes table.
5822 (linux_join): Add `pid' argument. Handle it.
5823 (linux_thread_alive): Change unsighed long argument to ptid_t.
5824 Consider dead lwps as not being alive.
5825 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
5826 threads we're not interested in.
5827 (same_lwp, find_lwp_pid): New.
5828 (linux_wait_for_lwp): Change `pid' argument's type from int to
5830 (linux_wait_for_event): Rename to ...
5831 (linux_wait_for_event_1): ... this. Change `pid' argument's type
5832 from int to ptid_t. Adjust.
5833 (linux_wait_for_event): New.
5834 (linux_wait_1): Add `ptid' argument. Change return type to
5835 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
5836 that exit from the process table.
5837 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
5839 (mark_lwp_dead): New.
5840 (wait_for_sigstop): Adjust to use ptids. If a process exits while
5841 stopping all threads, mark its main lwp as dead.
5842 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
5844 (fetch_register, usr_store_inferior_registers)
5845 (regsets_fetch_inferior_registers)
5846 (regsets_store_inferior_registers, linux_read_memory)
5847 (linux_write_memory): Inline `inferior_pid'.
5848 (linux_look_up_symbols): Adjust to use per-process
5850 (linux_request_interrupt): Adjust to use ptids.
5851 (linux_read_auxv): Inline `inferior_pid'.
5852 (initialize_low): Don't reference thread_db_active.
5853 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
5854 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
5855 (ps_getpid): Return the pid of the current inferior.
5856 * thread-db.c (proc_handle, thread_agent): Delete.
5857 (thread_db_create_event, thread_db_enable_reporting): Adjust to
5859 (find_one_thread): Change argument type to ptid_t. Adjust to
5861 (maybe_attach_thread): Adjust to per-process data and ptids.
5862 (thread_db_find_new_threads): Ditto.
5863 (thread_db_init): Ditto.
5864 * spu-low.c (spu_create_inferior, spu_attach): Add process to
5865 processes table. Adjust to use ptids.
5866 (spu_kill, spu_detach): Adjust interface. Remove process from
5868 (spu_join, spu_thread_alive): Adjust interface.
5869 (spu_wait): Adjust interface. Remove process from processes
5870 table. Adjust to use ptids.
5871 * win32-low.c (current_inferior_tid): Delete.
5872 (current_inferior_ptid): New.
5873 (debug_event_ptid): New.
5874 (thread_rec): Take a ptid. Adjust.
5875 (child_add_thread): Add `pid' argument. Adjust to use ptids.
5876 (child_delete_thread): Ditto.
5877 (do_initial_child_stuff): Add `attached' argument. Add process to
5879 (child_fetch_inferior_registers, child_store_inferior_registers):
5881 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
5882 (win32_attach): Pass 1 to do_initial_child_stuff.
5883 (win32_kill): Adjust interface. Remove process from processes
5885 (win32_detach): Ditto.
5886 (win32_join): Adjust interface.
5887 (win32_thread_alive): Take a ptid.
5888 (win32_resume): Adjust to use ptids.
5889 (get_child_debug_event): Ditto.
5890 (win32_wait): Adjust interface. Remove exiting process from
5893 2009-04-01 Pedro Alves <pedro@codesourcery.com>
5895 Non-stop mode support.
5897 * server.h (non_stop): Declare.
5898 (gdb_client_data, handler_func): Declare.
5899 (delete_file_handler, add_file_handler, start_event_loop):
5901 (handle_serial_event, handle_target_event, push_event)
5902 (putpkt_notif): Declare.
5903 * target.h (enum resume_kind): New.
5904 (struct thread_resume): Replace `step' field by `kind' field.
5905 (TARGET_WNOHANG): Define.
5906 (struct target_ops) <wait>: Add `options' argument.
5907 <supports_non_stop, async, start_non_stop>: New fields.
5908 (target_supports_non_stop, target_async): New.
5909 (start_non_stop): Declare.
5910 (mywait): Add `options' argument.
5911 * target.c (mywait): Add `options' argument. Print child exit
5913 (start_non_stop): New.
5914 * server.c (non_stop, own_buf, mem_buf): New globals.
5915 (struct vstop_notif): New.
5916 (notif_queue): New global.
5917 (queue_stop_reply, push_event, discard_queued_stop_replies)
5918 (send_next_stop_reply): New.
5919 (start_inferior): Adjust to use resume_kind. Adjust to mywait
5921 (attach_inferior): In non-stop mode, don't wait for the target
5923 (handle_general_set): Handle QNonStop.
5924 (handle_query): When handling qC, return the current general
5925 thread, instead of the first thread of the list.
5926 (handle_query): If the backend supports non-stop mode, include
5927 QNonStop+ in the qSupported query response.
5928 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
5930 (handle_v_attach, handle_v_run): Handle non-stop mode.
5931 (handle_v_stopped): New.
5932 (handle_v_requests): Report support for vCont;t. Handle vStopped.
5933 (myresume): Adjust to use resume_kind. Handle non-stop.
5934 (queue_stop_reply_callback): New.
5935 (handle_status): Handle non-stop mode.
5936 (main): Clear non_stop flag on reconnection. Use the event-loop.
5937 Refactor serial protocol handling from here ...
5938 (process_serial_event): ... to this new function. When GDB
5939 selects any thread, select one here. In non-stop mode, wait until
5940 GDB acks all pending events before exiting.
5941 (handle_serial_event, handle_target_event): New.
5942 * remote-utils.c (remote_open): Install remote_desc in the event
5944 (remote_close): Remove remote_desc from the event loop.
5945 (putpkt_binary): Rename to...
5946 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
5947 (putpkt_binary): New as wrapper around putpkt_binary_1.
5948 (putpkt_notif): New.
5949 (prepare_resume_reply): In non-stop mode, don't change the
5951 * event-loop.c: New.
5952 * Makefile.in (OBJ): Add event-loop.o.
5953 (event-loop.o): New rule.
5955 * linux-low.h (pid_of): Moved here.
5957 (get_lwp_thread): Use lwpid_of.
5958 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
5959 * linux-low.c (pid_of): Delete.
5960 (inferior_pid): Use lwpid_of.
5961 (linux_event_pipe): New.
5962 (target_is_async_p): New.
5964 (handle_extended_wait): Use lwpid_of.
5965 (add_lwp): Don't set lwpid field.
5966 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
5967 (linux_kill_one_lwp): If killing a running lwp, stop it first.
5968 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
5969 (linux_detach_one_lwp): If detaching from a running lwp, stop it
5970 first. Adjust to linux_wait_for_event interface changes. Use
5972 (linux_detach): Don't delete the main lwp here.
5973 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
5974 (status_pending_p): Don't consider explicitly suspended lwps.
5975 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
5976 pointer. Add OPTIONS argument. Change return type to int. Use
5977 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
5978 (linux_wait_for_event): Take an integer pid instead of a lwp_info
5979 pointer. Add status pointer argument. Return a pid instead of a
5980 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
5981 changes. In non-stop mode, don't switch to a random thread.
5982 (linux_wait): Rename to...
5983 (linux_wait_1): ... this. Add target_options argument, and handle
5984 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
5985 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
5986 clean exit and signal exit code. Don't stop all threads in
5987 non-stop mode. In all-stop mode, only stop all threads when
5988 reporting a stop to GDB. Handle explicit thread stop requests.
5989 (async_file_flush, async_file_mark): New.
5991 (send_sigstop): Use lwpid_of.
5992 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
5993 interface changes. In non-stop mode, don't switch to a random
5995 (linux_resume_one_lwp): Use lwpid_of.
5996 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5997 (linux_resume_one_thread): ... this. Handle resume_stop. In
5998 non-stop mode, don't look for pending flag in all threads.
5999 (resume_status_pending_p): Don't consider explicitly suspended
6001 (my_waitpid): Reimplement. Emulate __WALL.
6002 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6004 (sigchld_handler, linux_supports_non_stop, linux_async)
6005 (linux_start_non_stop): New.
6006 (linux_target_ops): Register linux_supports_non_stop, linux_async
6007 and linux_start_non_stop.
6008 (initialize_low): Install SIGCHLD handler.
6009 * thread-db.c (thread_db_create_event, find_one_thread)
6010 (thread_db_get_tls_address): Use lwpid_of.
6011 * win32-low.c (win32_detach): Adjust to use resume_kind.
6012 (win32_wait): Add `options' argument.
6013 * spu-low.c (spu_resume): Adjust to use resume_kind.
6014 (spu_wait): Add `options' argument.
6016 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6018 Decouple target code from remote protocol.
6020 * target.h (enum target_waitkind): New.
6021 (struct target_waitstatus): New.
6022 (struct target_ops) <wait>: Return an unsigned long. Take a
6023 target_waitstatus pointer instead of a char pointer.
6025 * target.c (mywait): Change prototype to return an unsigned long.
6026 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6027 * server.h (thread_from_wait, old_thread_from_wait): Delete
6029 (prepare_resume_reply): Change prototype to take a
6031 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6032 (last_status, last_ptid): New.
6033 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6034 pid instead of a signal.
6035 (attach_inferior): Remove "status" and "signal" parameters.
6037 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6039 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6040 (handle_v_requests, myresume): Remove "status" and "signal"
6042 (handle_status): New.
6043 (main): Delete local `status'. Adjust.
6044 * remote-utils.c: Include target.h.
6045 (prepare_resume_reply): Change prototype to take a
6046 target_waitstatus. Adjust.
6048 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6050 * spu-low.c (spu_wait): Adjust.
6051 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6053 (win32_wait): Adjust.
6055 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6057 * target.h (struct thread_resume): Delete leave_stopped member.
6058 (struct target_ops): Add a `n' argument to the `resume' callback.
6059 * server.c (start_inferior): Adjust.
6060 (handle_v_cont, myresume): Adjust.
6061 * linux-low.c (check_removed_breakpoint): Adjust to resume
6062 interface change, and to removed leave_stopped field.
6063 (resume_ptr): Delete.
6064 (struct thread_resume_array): New.
6065 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6066 resume interface change.
6067 (linux_continue_one_thread, linux_queue_one_thread)
6068 (resume_status_pending_p): Check if the resume field is NULL
6069 instead of checking the leave_stopped member.
6070 (linux_resume): Adjust to the target resume interface change.
6071 * spu-low.c (spu_resume): Adjust to the target resume interface
6073 * win32-low.c (win32_detach, win32_resume): Ditto.
6075 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6077 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6079 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6081 (linux_continue_one_thread): Only preserve the stepping flag if
6082 there's a pending breakpoint.
6084 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6086 * server.c (main): After the inferior having exited, call
6087 remote_close before exiting gdbserver.
6089 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6091 Fix size of FPSCR in Power 7 processors.
6092 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6093 (PPC_FEATURE_HAS_DFP): New #define.
6094 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6097 2009-03-23 Pedro Alves <pedro@codesourcery.com>
6099 * server.c (handle_query) Whitespace and formatting.
6101 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6103 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6104 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6105 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6106 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6107 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6108 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6109 Makefile.in, configure.ac: Fix whitespace throughout.
6110 * configure: Regenerate.
6112 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6114 * inferiors.c (find_inferior): Make it safe for the callback
6115 function to delete the currently iterated inferior.
6117 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6119 * Makefile.in (linuw_low_h): Move higher.
6120 (thread-db.o): Depend on $(linux_low_h).
6122 2009-03-17 Pedro Alves <pedro@codesourcery.com>
6124 Rename "process" to "lwp" throughout.
6126 * linux-low.c (all_processes): Rename to...
6127 (all_lwps): ... this.
6128 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6129 (add_process): Rename to ...
6130 (add_lwp): ... this. Adjust.
6131 (linux_create_inferior): Adjust.
6132 (linux_attach_lwp): Adjust.
6133 (linux_attach): Adjust.
6134 (linux_kill_one_process): Rename to ...
6135 (linux_kill_one_lwp): ... this. Adjust.
6136 (linux_kill): Adjust.
6137 (linux_detach_one_process): Rename to ...
6138 (linux_detach_one_lwp): ... this. Adjust.
6139 (linux_detach): Adjust.
6140 (check_removed_breakpoint): Adjust.
6141 (status_pending_p): Adjust.
6142 (linux_wait_for_process): Rename to ...
6143 (linux_wait_for_lwp): ... this. Adjust.
6144 (linux_wait_for_event): Adjust.
6145 (send_sigstop): Adjust.
6146 (wait_for_sigstop): Adjust.
6147 (stop_all_processes): Rename to ...
6148 (stop_all_lwps): ... this.
6149 (linux_resume_one_process): Rename to ...
6150 (linux_resume_one_lwp): ... this. Adjust.
6151 (linux_set_resume_request, linux_continue_one_thread)
6152 (linux_queue_one_thread, resume_status_pending_p)
6153 (usr_store_inferior_registers, regsets_store_inferior_registers)
6154 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6156 * linux-low.h (get_process): Rename to ...
6157 (get_lwp): ... this. Adjust.
6158 (get_thread_process): Rename to ...
6159 (get_thread_lwp): ... this. Adjust.
6160 (get_process_thread): Rename to ...
6161 (get_lwp_thread): ... this. Adjust.
6162 (struct process_info): Rename to ...
6163 (struct lwp_info): ... this.
6164 (all_processes): Rename to ...
6165 (all_lwps): ... this.
6166 * proc-service.c (ps_lgetregs): Adjust.
6167 * thread-db.c (thread_db_create_event, find_one_thread)
6168 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6170 2009-03-14 Pedro Alves <pedro@codesourcery.com>
6172 * server.c (handle_query): Handle "qAttached".
6174 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6176 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6177 GPLv3, update license URL.
6179 2009-03-01 Doug Evans <dje@google.com>
6181 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
6182 (server_h): Add gdb_signals.h.
6183 (signals.o): Update.
6184 * server.h (target_signal_from_host,target_signal_to_host_p)
6185 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6187 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6189 * remote-utils.c (getpkt): Also generate remote-debug
6190 information if noack_mode is set.
6192 2009-02-06 Pedro Alves <pedro@codesourcery.com>
6194 * server.c (handle_query): Report qXfer:siginfo:read and
6195 qXfer:siginfo:write as supported and handle them.
6196 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6197 * linux-low.c (linux_xfer_siginfo): New.
6198 (linux_target_ops): Set it.
6200 2009-01-26 Pedro Alves <pedro@codesourcery.com>
6202 * server.c (gdbserver_usage): Mention --remote-debug.
6203 (main): Accept '--remote-debug' switch.
6205 2009-01-18 Doug Evans <dje@google.com>
6207 * regcache.c (new_register_cache): No need to check result of xcalloc.
6208 * server.c (handle_search_memory): Back out calls to xmalloc,
6209 result is checked and error is returned to user upon failure.
6210 (handle_query): Ditto. Add more checks for result of malloc.
6211 (handle_v_cont): Check result of malloc, report error back to
6213 (handle_v_run): Ditto. Call freeargv.
6214 * server.h (freeargv): Declare.
6215 * utils.c (freeargv): New fn.
6217 2009-01-15 Doug Evans <dje@google.com>
6219 * gdbreplay.c (perror_with_name): Make arg const char *.
6220 * server.h (target_signal_to_name): Make return type const char *.
6221 * thread-db.c (thread_db_err_str): Make return type const char *.
6222 * utils.c (perror_with_name): Make arg const char *.
6224 2009-01-14 Pedro Alves <pedro@codesourcery.com>
6226 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6227 when handling a EXIT_PROCESS_DEBUG_EVENT.
6229 2009-01-06 Joel Brobecker <brobecker@adacore.com>
6231 * gdbreplay.c (gdbreplay_version): Update copyright year.
6232 * server.c (gdbserver_version): Likewise.
6234 2009-01-05 Doug Evans <dje@google.com>
6236 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
6237 (handle_extended_wait): Improve comment.
6239 2008-12-13 Doug Evans <dje@google.com>
6241 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6242 * server.h (ATTR_MALLOC): New macro.
6243 (xmalloc,xcalloc,xstrdup): Declare.
6244 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6245 * inferiors.c: Ditto.
6246 * linux-low.c: Ditto.
6247 * mem-break.c: Ditto.
6248 * regcache.c: Ditto.
6249 * remote-utils.c: Ditto.
6252 * win32-low.c: Ditto.
6254 2008-12-12 Doug Evans <dje@google.com>
6256 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6257 in debugging printf.
6259 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6261 2008-12-09 Doug Evans <dje@google.com>
6263 * linux-low.h (struct process_info): Delete member tid, unused.
6264 * thread-db.c (find_one_thread): Update.
6265 (maybe_attach_thread): Update.
6267 2008-12-02 Pedro Alves <pedro@codesourcery.com>
6269 * target.h (struct target_ops): Add qxfer_osdata member.
6270 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6272 (linux_qxfer_osdata): New functions.
6273 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6275 * server.c (handle_query): Handle "qXfer:osdata:read:".
6276 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6277 (buffer_xml_printf): New functions.
6278 * server.h (struct buffer): New.
6279 (buffer_grow_str, buffer_grow_str0): New macros.
6280 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6281 (buffer_xml_printf): Declare.
6283 2008-11-24 Doug Evans <dje@google.com>
6285 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6287 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6289 * server.c (handle_v_run): Always use the supplied argument list.
6291 2008-11-19 Bob Wilson <bob.wilson@acm.org>
6293 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6294 (xtensa_regmap_table): Add entry for scompare1.
6296 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6298 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6299 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6300 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6301 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6302 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6303 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6304 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6305 XML target descriptions.
6306 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6307 when inferior is running on an ISA 2.05 or later processor. Add
6308 special case to return offset for full 64-bit slot of FPSCR when
6311 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6313 * Makefile.in (SFILES, clean): Added sparc64 files.
6314 (reg-sparc64.o, reg-sparc64.c): New.
6315 * configure.srv (sparc*-*-linux*): New configuration.
6316 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6317 syscall arguments for SPARC.
6318 (regsets_store_inferior_registers): Likewise.
6319 * linux-sparc-low.c: New file.
6321 2008-10-21 Doug Evans <dje@google.com>
6323 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6324 (READLINE_DIR,READLINE_DEP): Delete.
6325 (INTERNAL_CFLAGS): Update.
6326 (LINTFLAGS): Update.
6328 2008-10-10 Pedro Alves <pedro@codesourcery.com>
6330 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6331 whole argv from the last run, not just argv[0].
6333 2008-09-08 Pedro Alves <pedro@codesourcery.com>
6335 * regcache.c (new_register_cache): Return NULL if the register
6336 cache size isn't known yet.
6337 (free_register_cache): Avoid dereferencing a NULL regcache.
6339 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6341 * configure.srv: Merge MIPS and MIPS64.
6343 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6345 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6347 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
6349 * Makefile.in: Add required vsx dependencies.
6351 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6352 Declare init_registers_powerpc_vsx32l.
6353 Declare init_registers_powerpc_vsx64l.
6354 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6355 (ppc_arch_setup): Check for VSX in hwcap.
6356 (ppc_fill_vsxregset): New function.
6357 (ppc_store_vsxregset): New function.
6358 Add new VSX entry in regset_info target_regsets.
6360 * configure.srv: Add new VSX dependencies.
6362 2008-08-12 Pedro Alves <pedro@codesourcery.com>
6364 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6365 (remote_open): Set or clear transport_is_reliable.
6366 (putpkt_binary): Don't expect acks in noack mode.
6367 (getpkt): Don't send ack/nac in noack mode.
6368 * server.c (handle_general_set): Handle QStartNoAckMode.
6369 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6371 (main): Reset noack_mode on every connection.
6372 * server.h (noack_mode): Declare.
6374 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6376 * Makefile.in (GDBREPLAY_OBS): New variable.
6377 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6379 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6380 Daniel Jacobowitz <dan@codesourcery.com>
6382 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6383 (usr_store_inferior_registers): Likewise.
6384 (regsets_store_inferior_registers): Likewise.
6386 2008-07-31 Rolf Jansen <rj@surtec.com>
6387 Pedro Alves <pedro@codesourcery.com>
6389 * configure.ac: Check for memmem declaration.
6390 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6391 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6392 (disable_packet_qfThreadInfo): Unconditionally compile.
6393 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6394 * configure, config.in: Regenerate.
6396 2008-07-28 Doug Kwan <dougkwan@google.com>
6398 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6399 (linux_write_memory): Remove declaration of errno.
6401 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6403 * linux-low.c (handle_extended_wait): Do not use "status"
6404 variable uninitialized.
6406 2008-07-07 Pedro Alves <pedro@codesourcery.com>
6408 * server.c (handle_v_attach): Inhibit reporting dll changes.
6410 2008-06-27 Pedro Alves <pedro@codesourcery.com>
6412 * remote-utils.c (prepare_resume_reply): If requested, don't
6413 output "thread:TID" in the T stop reply.
6415 * server.c (disable_packet_vCont, disable_packet_Tthread)
6416 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6417 (handle_query): If requested, disable support for qC, qfThreadInfo
6419 (handle_v_requests): If requested, disable support for vCont.
6420 (gdbserver_show_disableable): New.
6421 (main): Handle --disable-packet and --disable-packet=LIST.
6423 * server.h (disable_packet_vCont, disable_packet_Tthread)
6424 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6426 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6428 * server.c (gdbserver_usage): Mention --version.
6430 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6432 * Makefile.in (gdbreplay.o): New rule.
6434 2008-06-06 Joseph Myers <joseph@codesourcery.com>
6436 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6437 message, not gdbserver.
6439 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
6440 Nathan Sidwell <nathan@codesourcery.com>
6441 Joseph Myers <joseph@codesourcery.com>
6443 * acinclude.m4: Include ../../config/acx.m4.
6444 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6445 * configure, config.in: Regenerate.
6446 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6447 * server.c (gdbserver_version): Print PKGVERSION.
6448 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6449 (main): Adjust gdbserver_usage calls.
6450 * gdbreplay.c (version, host_name): Add declarations.
6451 (gdbreplay_version, gdbreplay_usage): New.
6452 (main): Accept --version and --help options.
6454 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6456 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6457 (arm_breakpoint_at): Handle Thumb.
6458 (the_low_target): Add comment.
6460 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6462 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6464 2008-05-09 Doug Evans <dje@google.com>
6466 * server.h (decode_search_memory_packet): Declare.
6467 * remote-utils.c (decode_search_memory_packet): New fn.
6468 * server.c (handle_search_memory_1): New fn.
6469 (handle_search_memory): New fn.
6470 (handle_query): Process qSearch:memory packets.
6472 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6474 * regcache.c (registers_length): Remove.
6475 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6476 full register packet.
6477 * regcache.h (registers_length): Remove prototype.
6478 * server.h (PBUFSIZ): Define to 16384.
6480 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6482 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6483 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6484 powerpc-64l.o, and powerpc-altivec64l.o.
6485 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6486 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6487 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6488 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6489 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6492 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6493 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6494 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6495 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6496 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6497 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6498 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6499 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6500 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6501 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6504 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6505 (init_registers_powerpc_32l): ... this new prototype.
6506 (init_registers_powerpc_32): Remove, replace by ...
6507 (init_registers_powerpc_altivec32l): ... this new prototype.
6508 (init_registers_powerpc_e500): Remove, replace by ...
6509 (init_registers_powerpc_e500l): ... this new prototype.
6510 (init_registers_ppc64): Remove, replace by ...
6511 (init_registers_powerpc_64l): ... this new prototype.
6512 (init_registers_powerpc_64): Remove, replace by ...
6513 (init_registers_powerpc_altivec64l): ... this new prototype.
6514 (ppc_num_regs): Set to 73.
6515 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6516 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6517 (ppc_cannot_store_register): Handle orig_r3 and trap.
6518 (ppc_arch_setup): Update init_registers_... calls.
6519 (ppc_fill_gregset): Handle orig_r3 and trap.
6521 * inferiors.c (clear_inferiors): Reset current_inferior.
6523 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
6525 * acinclude.m4: Add override.m4.
6526 * configure: Regenerate.
6528 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6530 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6531 initial call to init_register_ppc64.
6533 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6535 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6536 single powerpc*-*-linux* case.
6537 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6539 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6541 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
6542 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
6544 * linux-ppc-low.c: Include <elf.h>.
6545 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6546 (ppc_hwcap): New global variable.
6547 (ppc_regmap): Remove __SPE__ #ifdef sections.
6548 (ppc_regmap_e500): New global variable.
6549 (ppc_cannot_store_register): Update __SPE__ special case.
6550 (ppc_get_hwcap): New function.
6551 (ppc_arch_setup): Use it to determine whether inferior supports
6552 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6553 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6554 Do not access registers if target does not support AltiVec.
6555 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6556 Do not access registers if target does not support SPE.
6557 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6559 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6561 * linux-low.c (disabled_regsets, num_regsets): New.
6562 (use_regsets_p): Delete.
6563 (linux_wait_for_process): Clear disabled_regsets.
6564 (regsets_fetch_inferior_registers): Check and set it.
6565 (regsets_store_inferior_registers): Likewise.
6566 (linux_fetch_registers, linux_store_registers): Do not use
6568 (initialize_low): Allocate disabled_regsets.
6570 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6572 * Makefile.in (LIBOBJS): New.
6574 (memmem.o): New rule.
6575 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6576 * configure: Regenerated.
6578 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6580 * server.c (handle_query): Never return "unsupported" for
6581 qXfer:features:read queries.
6583 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6585 * server.c (get_features_xml): Fix inverted condition.
6586 (handle_query): Always support qXfer:feature:read.
6588 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6590 * server.c (wrapper_argv): New.
6591 (start_inferior): Handle wrapper_argv. If set, expect an extra
6593 (gdbserver_usage): Document --wrapper.
6594 (main): Parse --wrapper.
6596 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6598 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6599 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6600 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6601 (ppc_set_pc): Likewise.
6602 (ppc_arch_setup): New function.
6603 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6604 of collect_register.
6605 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6607 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6609 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6610 instead of linux-ppc64-low.o.
6611 * linux-ppc64-low.c: Remove file.
6612 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6613 (linux-ppc64-low.o): Remove rule.
6615 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6616 (init_registers_powerpc_64): Likewise.
6617 (ppc_regmap): Conditionally define depending on __powerpc64__.
6618 (ppc_cannot_store_register): Do not special-case "fpscr" when
6619 compiled on __powerpc64__.
6620 (ppc_collect_ptrace_register): New function.
6621 (ppc_supply_ptrace_register): New function.
6622 (ppc_breakpoint): Change type to "unsigned int".
6623 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6624 (the_low_target): Conditionally provide initializers for the
6625 arch_setup member depending on __powerpc64__. Install
6626 collect_ptrace_register and supply_ptrace_register members.
6628 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6630 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6631 * server.c (gdbserver_xmltarget): Define.
6632 (get_features_xml): Use it to replace "target.xml" and arch_string.
6634 * configure.srv: Remove srv_xmltarget. Add XML files that were
6635 mentioned there to srv_xmlfiles instead. Remove conditional tests
6636 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6637 srv_xmlfiles and srv_regobj to include all possible choices.
6638 * configure.ac (srv_xmltarget): Remove.
6639 (srv_xmlfiles): Do not add "target.xml".
6640 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6641 checks for supplementary target information.
6642 * configure: Regenerate.
6643 * Makefile.in (XML_TARGET): Remove.
6644 (target.xml): Remove rule.
6645 (clean): Do not clean up target.xml.
6646 (.PRECIOUS): Do not mention target.xml.
6648 * target.h (struct target_ops): Remove arch_string member.
6649 * linux-low.c (linux_arch_string): Remove.
6650 (linux_target_ops): Remove arch_string initializer.
6651 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6652 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6653 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6654 * spu-low.c (spu_arch_string): Remove.
6655 (spu_target_ops): Remove arch_string initializer.
6656 * win32-low.c (win32_arch_string): Remove.
6657 (win32_target_ops): Remove arch_string initializer.
6658 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6659 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6660 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6662 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6664 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6665 by collect_ptrace_register and supply_ptrace_register hooks.
6666 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6667 instead of checking for the_low_target.left_pad_xfer.
6668 (usr_store_inferior_registers): Use collect_ptrace_register callback
6669 instead of checking for the_low_target.left_pad_xfer.
6671 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6672 (s390_supply_ptrace_register): Likewise.
6673 (s390_fill_gregset): Call s390_collect_ptrace_register.
6674 (the_low_target): Update.
6676 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6677 (ppc_supply_ptrace_register): Likewise.
6678 (the_low_target): Update.
6680 * linux-i386-low.c (the_low_target): Update.
6681 * linux-x86-64-low.c (the_low_target): Update.
6683 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6685 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6686 reg-s390.o and reg-s390x.o.
6688 * linux-low.c (new_inferior): New global variable.
6689 (linux_create_inferior, linux_attach): Set it.
6690 (linux_wait_for_process): Call the_low_target.arch_setup after the
6691 target has stopped for the first time.
6692 (initialize_low): Do not call the_low_target.arch_setup.
6694 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6695 (s390_set_pc): Likewise.
6696 (s390_arch_setup): New function.
6697 (the_low_target): Use s390_arch_setup as arch_setup routine.
6699 * regcache.c (realloc_register_cache): New function.
6700 (set_register_cache): Call it for each existing regcache.
6702 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6704 * server.h (init_registers): Remove prototype.
6706 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6707 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6708 instead of init_registers ().
6709 * linux-arm-low.c (init_registers_arm): Add prototype.
6710 (init_registers_arm_with_iwmmxt): Likewise.
6711 (the_low_target): Add initializer for arch_setup field.
6712 * linux-cris-low.c (init_registers_cris): Add prototype.
6713 (the_low_target): Add initializer for arch_setup field.
6714 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
6715 (the_low_target): Add initializer for arch_setup field.
6716 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
6717 (the_low_target): Add initializer for arch_setup field.
6718 * linux-ia64-low.c (init_registers_ia64): Add prototype.
6719 (the_low_target): Add initializer for arch_setup field.
6720 * linux-m32r-low.c (init_registers_m32r): Add prototype.
6721 (the_low_target): Add initializer for arch_setup field.
6722 * linux-m68k-low.c (init_registers_m68k): Add prototype.
6723 (the_low_target): Add initializer for arch_setup field.
6724 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
6725 (init_registers_mips64_linux): Likewise.
6726 (the_low_target): Add initializer for arch_setup field.
6727 * linux-ppc-low.c (init_registers_ppc): Add prototype.
6728 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
6729 (the_low_target): Add initializer for arch_setup field.
6730 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
6731 (init_registers_powerpc_64): Likewise.
6732 (the_low_target): Add initializer for arch_setup field.
6733 * linux-s390-low.c (init_registers_s390): Add prototype.
6734 (init_registers_s390x): Likewise.
6735 (the_low_target): Add initializer for arch_setup field.
6736 * linux-sh-low.c (init_registers_sh): Add prototype.
6737 (the_low_target): Add initializer for arch_setup field.
6738 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
6739 (the_low_target): Add initializer for arch_setup field.
6740 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
6741 (the_low_target): Add initializer for arch_setup field.
6743 * win32-low.h (struct win32_target_ops): Add arch_setup field.
6744 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
6745 instead of init_registers ().
6746 * win32-arm-low.c (init_registers_arm): Add prototype.
6747 (the_low_target): Add initializer for arch_setup field.
6748 * win32-i386-low.c (init_registers_i386): Add prototype.
6749 (the_low_target): Add initializer for arch_setup field.
6751 * spu-low.c (init_registers_spu): Add prototype.
6752 (initialize_low): Call initialie_registers_spu () instead of
6753 initialize_registers ().
6755 2008-02-19 Pedro Alves <pedro@codesourcery.com>
6757 * server.c (handle_v_requests): When handling the vRun and vAttach
6758 packets, if already debugging a process, don't kill it. Return an
6761 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
6763 * server.c (handle_query): Correct length check.
6765 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
6767 * win32-low.c (do_initial_child_stuff): Add process handle
6768 parameter. Set current_process_handle and current_process_id from the
6769 parameters. Clear globals.
6770 (win32_create_inferior): Don't set current_process_handle and
6771 current_process_id here. Instead pass them on the call to
6772 do_initial_child_stuff.
6773 (win32_attach): Likewise.
6774 (win32_clear_inferiors): New.
6775 (win32_kill): Don't close the current process handle or the
6776 current thread handle here. Instead call win32_clear_inferiors.
6777 (win32_detach): Don't open a new handle to the process. Call
6778 win32_clear_inferiors.
6779 (win32_join): Don't rely on current_process_handle; open a new
6780 handle using the process id.
6781 (win32_wait): Call win32_clear_inferiors when the inferior process
6784 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
6786 * server.c (monitor_show_help): Add "exit".
6788 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
6790 * Makefile.in (SFILES): Add linux-xtensa-low.c.
6791 (clean): Add reg-xtensa.c.
6792 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
6793 * configure.srv (xtensa*-*-linux*) New target.
6794 * linux-xtensa-low.c: New.
6795 * xtensa-xtregs.c: New.
6797 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
6799 * hostio.c: Don't include errno.h.
6800 (errno_to_fileio_errno): Move to hostio-errno.
6801 * hostio.c: (hostio_error): Remove the error parameter. Defer the
6802 error number outputting to the target->hostio_last_error callback.
6803 (hostio_packet_error): Use FILEIO_EINVAL directly.
6804 (handle_open, handle_pread, hostio_error, handle_unlink): Update
6805 calls to hostio_error.
6806 * hostio-errno.c: New.
6807 * server.h (hostio_last_error_from_errno): Declare.
6808 * target.h (target_ops): Add hostio_last_error member.
6809 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
6810 as hostio_last_error handler.
6811 * spu-low.c (spu_target_ops): Likewise.
6812 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
6813 (wince_hostio_last_error): New functions.
6814 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
6815 as hostio_last_error handler.
6816 (win32_target_ops) [!_WIN32_WCE]: Register
6817 hostio_last_error_from_errno as hostio_last_error handler.
6818 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
6819 (hostio-errno.o): New rule.
6820 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
6821 * configure.srv (srv_hostio_err_objs): New variable. Default to
6823 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
6824 * configure: Regenerate.
6826 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6828 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
6829 (linux_kill, linux_detach): Clean up the process list.
6830 * remote-utils.c (remote_open): Improve port number parsing.
6831 (putpkt_binary, input_interrupt): Only send interrupts if the target
6833 * server.c (extended_protocol): Make static.
6834 (attached): Define earlier.
6835 (exit_requested, response_needed, program_argv): New variables.
6836 (target_running): New.
6837 (start_inferior): Clear attached here.
6838 (attach_inferior): Set attached here.
6839 (require_running): Define.
6840 (handle_query): Use require_running and target_running. Implement
6842 (handle_v_attach, handle_v_run): New.
6843 (handle_v_requests): Use require_running. Handle vAttach and vRun.
6844 (gdbserver_usage): Update.
6845 (main): Redo argument parsing. Handle --debug and --multi. Handle
6846 --attach along with other options or after the port. Save
6847 program_argv. Support no initial program. Resynchronize
6848 communication with GDB after an error. Handle "monitor exit".
6849 Use require_running and target_running. Always allow the extended
6850 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
6851 restart in extended mode.
6852 * README: Refer to the GDB manual. Update --attach usage.
6854 2007-12-20 Andreas Schwab <schwab@suse.de>
6856 * linux-low.c (STACK_SIZE): Define.
6857 (linux_tracefork_child): Use it. Use __clone2 on ia64.
6858 (linux_test_for_tracefork): Likewise.
6860 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
6862 * linux-low.c (linux_wait_for_event): Update messages. Do not
6863 reinsert auto-delete breakpoints.
6864 * mem-break.c (struct breakpoint): Change return type of handler to
6866 (set_breakpoint_at): Update handler type.
6867 (reinsert_breakpoint_handler): Return 1 instead of calling
6869 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
6871 (check_breakpoints): Delete auto-delete breakpoints and return 2.
6872 * mem-break.h (set_breakpoint_at): Update handler type.
6873 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
6874 * win32-low.c (auto_delete_breakpoint): New.
6875 (get_child_debug_event): Use it.
6877 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
6879 * configure.ac: Check for pread and pwrite.
6880 * hostio.c (handle_pread): Fall back to lseek and read.
6881 (handle_pwrite): Fall back to lseek and write.
6882 * config.in, configure: Regenerated.
6884 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
6886 * server.c (myresume): Add own_buf argument.
6887 (main): Update calls.
6889 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
6891 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
6892 * remote-utils.c (remote_open): Do not call disable_async_io.
6893 (block_async_io): Delete.
6894 (unblock_async_io): Make static.
6895 (initialize_async_io): New.
6896 * server.c (handle_v_cont): Handle async I/O here.
6897 (myresume): Likewise. Move other common resume tasks here...
6898 (main): ... from here. Call initialize_async_io. Disable async
6899 I/O before the main loop.
6900 * server.h (initialize_async_io): Declare.
6901 (block_async_io, unblock_async_io): Delete prototypes.
6902 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
6904 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
6906 * remote-utils.c (readchar): Allow binary data in received messages.
6908 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6910 * win32-low.c (attaching): New global.
6911 (win32_create_inferior): Clear the `attaching' global.
6912 (win32_attach): Set the `attaching' global.
6913 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
6914 attaching. Only set a breakpoint at the entry point if not
6917 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6919 * server.c (main): Don't report dll events on the initial
6920 connection on attaches.
6922 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6924 * server.c (main): Relax numerical bases supported for the pid of
6925 the --attach command line argument.
6927 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6929 * win32-low.c (win32_attach): Call OpenProcess before
6930 DebugActiveProcess, not after. Add last error output to error
6933 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
6935 * win32-low.c (win32_get_thread_context)
6936 (win32_set_thread_context): New functions.
6937 (thread_rec): Use win32_get_thread_context.
6938 (continue_one_thread, win32_resume): Use win32_set_thread_context.
6939 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
6942 2007-12-03 Leo Zayas
6943 Pedro Alves <pedro_alves@portugalmail.pt>
6945 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
6947 (child_add_thread): Minor cleanup.
6948 (child_continue): Resume artificially suspended threads before
6949 calling ContinueDebugEvent.
6950 (suspend_one_thread): New.
6951 (fake_breakpoint_event): New.
6952 (get_child_debug_event): Change return type to int. Check here if
6953 gdb sent an interrupt request. If a soft interrupt was requested,
6954 fake a breakpoint event. Return 0 if there is no event to handle,
6956 (win32_wait): Don't check here if gdb sent an interrupt request.
6957 Ensure there is a valid event to handle.
6958 (win32_request_interrupt): Add soft interruption method as last
6961 2007-12-03 Leo Zayas
6962 Pedro Alves <pedro_alves@portugalmail.pt>
6964 * win32-low.h (win32_thread_info): Add descriptions to the
6965 structure members. Replace `suspend_count' counter by a
6967 * win32-low.c (thread_rec): Update condition of when to get the
6968 context from the inferior. Rely on ContextFlags being set if it
6969 has already been retrieved. Only suspend the inferior thread if
6970 we haven't already. Warn if that fails.
6971 (continue_one_thread): s/suspend_count/suspended/. Only call
6972 ResumeThread once. Warn if that fails.
6974 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6976 * win32-low.c (win32_wait): Don't read from the inferior when it
6979 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
6981 * Makefile.in (win32_low_h): New variable.
6982 (win32-low.o): Add dependency on $(win32_low_h).
6983 (win32-arm-low.o, win32-i386-low.o): New rules.
6985 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6987 * hostio.c: Correct copyright year.
6989 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
6991 * Makefile.in (OBS): Add hostio.o.
6992 (hostio.o): New rule.
6993 * server.h (handle_vFile): Declare.
6994 * hostio.c: New file.
6995 * server.c (handle_v_requests): Take packet_len and new_packet_len
6996 for binary packets. Call handle_vFile.
6997 (main): Update call to handle_v_requests.
6999 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7001 * linux-low.c: Include <sched.h>.
7003 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7005 * linux-low.c (linux_tracefork_grandchild): New.
7006 (linux_tracefork_child): Use clone.
7007 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7009 2007-10-31 Joel Brobecker <brobecker@adacore.com>
7011 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7013 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7015 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7017 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7019 * inferiors.c (change_inferior_id): Delete.
7020 (add_pid_to_list, pull_pid_from_list): New.
7021 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7022 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7023 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7024 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7025 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7026 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7027 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7028 (using_threads): Always set to 1.
7029 (handle_extended_wait): New.
7030 (add_process): Do not set TID.
7031 (linux_create_inferior): Set must_set_ptrace_flags.
7032 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7033 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7034 (linux_thread_alive): Rename TID argument to LWPID.
7035 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7036 (linux_wait_for_event): Do not use TID or check using_threads. Update
7037 call to dead_thread_notify. Call handle_extended_wait.
7038 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7039 (send_sigstop): Delete sigstop_sent.
7040 (wait_for_sigstop): Avoid TID.
7041 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7042 (linux_test_for_tracefork): New.
7043 (linux_lookup_signals): Use thread_db_active and
7044 linux_supports_tracefork_flag.
7045 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7046 * linux-low.h (get_process_thread): Avoid TID.
7047 (struct process_ifo): Move thread_known and tid to the end. Remove
7049 (linux_attach_lwp, thread_db_init): Update prototypes.
7050 * server.h (change_inferior_id): Delete prototype.
7051 (add_pid_to_list, pull_pid_from_list): New prototypes.
7052 * thread-db.c (thread_db_use_events): New.
7053 (find_first_thread): Rename to...
7054 (find_one_thread): ...this. Update callers and messages. Do not
7055 call fatal. Check thread_db_use_events. Do not call
7056 change_inferior_id or new_thread_notify.
7057 (maybe_attach_thread): Update. Do not call new_thread_notify.
7058 (thread_db_init): Set thread_db_use_events. Check use_events.
7059 * utils.c (fatal, warning): Correct message prefix.
7061 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7063 * Makefile.in (clean): Remove new files.
7064 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7065 (powerpc-64.o, powerpc-64.c): New rules.
7066 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7067 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7069 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7071 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7072 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7073 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7074 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7075 (target_regsets): Add AltiVec and SPE register sets.
7076 * configure.ac: Check for AltiVec and SPE.
7077 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7078 (ppc_fill_vrregset, ppc_store_vrregset): New.
7079 (target_regsets): Add AltiVec register set.
7080 * configure: Regenerated.
7082 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7084 * linux-low.c (O_LARGEFILE): Define.
7085 (linux_read_memory): Use /proc/PID/mem.
7086 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7087 * configure, config.in: Regenerated.
7089 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7091 * linux-low.c (linux_wait_for_event): Do not pass signals while
7094 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7096 * win32-low.c (create_process): New.
7097 (win32_create_inferior): Use create_process instead of
7098 CreateProcess. If create_process failed retry appending an ".exe"
7099 suffix. Store the GetLastError result immediatelly after
7100 create_process calls and use it on the call to error.
7102 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7104 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7106 2007-08-23 Joel Brobecker <brobecker@adacore.com>
7108 * configure.ac: Switch license to GPLv3.
7110 2007-08-01 Michael Snyder <msnyder@access-company.com>
7112 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7114 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7116 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7118 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7119 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7120 CloseToolhelp32Snapshot.
7121 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7122 CloseToolhelp32Snapshot.
7124 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
7126 * server.c (main): Check for inferior exit before main loop.
7128 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7130 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7131 instead of on tmp_desc.
7133 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7134 Daniel Jacobowitz <dan@codesourcery.com>
7136 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7137 (add_thread): Minor cleanups.
7138 (clear_inferiors): Move lower in the file. Clear the DLL
7140 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7141 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7142 (xml_escape_text): New.
7143 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7145 (handle_v_cont): Report errors.
7146 (gdbserver_version): Update.
7147 (main): Correct size of own_buf. Do not report initial DLL events.
7148 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7149 (unloaded_dll, xml_escape_text): New.
7150 * win32-low.c (enum target_waitkind): Update comments.
7151 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7152 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7153 (win32_EnumProcessModules, win32_GetModuleInformation)
7154 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7155 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7156 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7157 (win32_Module32First, win32_Module32Next, load_toolhelp)
7158 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7159 (get_child_debug_event): Handle DLL events.
7160 (win32_wait): Likewise.
7162 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7164 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7165 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7167 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7169 * win32-low.c (handle_output_debug_string): Ignore event if not
7172 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7174 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7176 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7178 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7180 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7182 * inferiors.c (change_inferior_id): Add comment.
7183 * linux-low.c (check_removed_breakpoint): Add an early
7184 prototype. Improve debug output.
7185 (linux_attach): Doc update.
7186 (linux_detach_one_process, linux_detach): Clean up before releasing
7188 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7189 * linux-low.h (struct process_info): Doc improvement.
7190 * mem-break.c (delete_all_breakpoints): New.
7191 * mem-break.h (delete_all_breakpoints): New prototype.
7192 * thread-db.c (find_first_thread): New.
7193 (thread_db_create_event): Call it instead of
7194 thread_db_find_new_threads. Clean up unused variables.
7195 (maybe_attach_thread): Remove first thread handling.
7196 (thread_db_find_new_threads): Use find_first_thread.
7197 (thread_db_get_tls_address): Likewise.
7199 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7201 * thread-db.c (thread_db_find_new_threads): Add prototype.
7202 (thread_db_create_event): Check for the main thread before adding
7204 (maybe_attach_thread): Only enable event reporting if TID == 0.
7205 (thread_db_get_tls_address): Check for new threads.
7207 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7209 * linux-low.c (linux_create_inferior): Try execv before execvp.
7210 * spu-low.c (spu_create_inferior): Likewise.
7212 2007-06-13 Mike Frysinger <vapier@gentoo.org>
7214 * linux-low.c (linux_create_inferior): Change execv to execvp.
7215 * spu-low.c (spu_create_inferior): Likewies.
7217 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7219 * Makefile.in (clean): Clean new files instead of deleted ones.
7220 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7221 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7223 * configure.srv: Specify XML files and new regformats for MIPS and
7225 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7226 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7227 an entry for the restart register.
7228 (mips_cannot_fetch_register, mips_cannot_store_register)
7229 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7230 register names to match the XML descriptions.
7231 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7232 restart register instead of $0.
7234 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7235 Markus Deuling <deuling@de.ibm.com>
7237 * remote-utils.c (decode_xfer_write): New function.
7238 * server.h (decode_xfer_write): Add prototype.
7239 * server.c (handle_query): Add PACKET_LEN argument. Support
7240 qXfer:spu:read and qXfer:spu:write packets.
7241 (main): Pass packet_len to handle_query.
7242 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7243 * target.h (target_ops): Add qxfer_spu.
7245 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7247 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7248 accessing non-seekable spufs files.
7250 2007-05-16 Markus Deuling <deuling@de.ibm.com>
7252 * server.c (handle_query): Add reply for qC packet.
7254 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7255 Leo Zayas <lerele@champenstudios@com>
7257 * server.h (check_remote_input_interrupt_request): New function.
7258 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7259 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7260 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7261 (check_remote_input_interrupt_request): New function.
7262 * server.h (check_remote_input_interrupt_request): Declare.
7263 * win32-low.c (winapi_DebugBreakProcess,
7264 winapi_GenerateConsoleCtrlEvent): New typedefs.
7265 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7267 (win32_wait): Check for remote interrupt request
7268 with check_remote_input_interrupt_request.
7269 (win32_request_interrupt): New function.
7270 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7272 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7274 * win32-low.c (debug_registers_changed,
7275 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7276 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7277 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7278 (thread_rec): Get context using the low target.
7279 (child_add_thread): Call thread_added on the low target,
7280 which does the same thing.
7282 (do_initial_child_stuff): Remove debug registers references.
7283 Set context using the low target. Resume threads after
7284 setting the contexts.
7285 (child_continue): Remove dead variable. Remove debug
7286 registers references.
7287 (child_fetch_inferior_registers): Go through the low target.
7288 (do_child_store_inferior_registers): Remove.
7289 (child_store_inferior_registers): Go through the low target.
7290 (win32_resume): Remove debug registers references.
7291 Set context using the low target.
7292 (handle_exception): Change return type to void. Don't record
7293 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7294 first chance exception.
7295 (get_child_debug_event): Change return type to void. Remove
7296 goto loop. Always return after waiting for debug event.
7297 (win32_wait): Convert to switch statement. Handle spurious
7300 * win32-i386-low.c (debug_registers_changed,
7301 debug_registers_used): New.
7302 (initial_stuff): Rename to ...
7303 (i386_initial_stuff): ... this. Clear debug registers
7305 (store_debug_registers): Delete.
7306 (i386_get_thread_context): New.
7307 (load_debug_registers): Delete.
7308 (i386_set_thread_context): New.
7309 (i386_thread_added): New.
7310 (single_step): Rename to ...
7311 (i386_single_step): ... this.
7312 (do_fetch_inferior_registers): Rename to ...
7313 (i386_fetch_inferior_register): ... this.
7314 (i386_store_inferior_register): New.
7315 (the_low_target): Adapt to new interface.
7317 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7318 (arm_get_thread_context): New.
7319 (arm_set_thread_context): New.
7321 (do_fetch_inferior_registers): Rename to ...
7322 (arm_fetch_inferior_register): ... this.
7323 (arm_store_inferior_register): New.
7324 (arm_wince_breakpoint): Reimplement as unsigned long.
7325 (arm_wince_breakpoint_len): Define.
7326 (the_low_target): Adapt to new interface.
7328 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7329 load_debug_registers. Add get_thread_context, set_thread_context,
7330 thread_added and store_inferior_register. Rename
7331 fetch_inferior_registers to fetch_inferior_register.
7332 (regptr): Remove declaration.
7334 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7336 * linux-low.c (linux_detach): Change return type to int. Return 0.
7337 * spu-low.c (spu_detach): Likewise.
7339 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7341 * target.h (target_ops): Change return type of detach to int.
7343 (join_inferior): New.
7344 * server.c (main): Don't skip detach support on mingw32.
7345 If the inferior doesn't support detaching return error.
7346 Call join_inferior instead of using waitpid.
7347 * linux-low.c (linux_join): New.
7348 (linux_target_op): Add linux_join.
7349 * spu-low.c (spu_join): New.
7350 (spu_target_ops): Add spu_join.
7351 * win32-low.c (win32_detach): Adapt to new interface.
7352 Reopen current_process_handle before detaching. Issue a child
7353 resume before detaching.
7355 (win32_target_op): Add win32_join.
7357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7359 * win32-low.c (win32-attach): Fix return value.
7360 * target.h (target_ops): Describe ATTACH return values.
7362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7364 * win32-low.c (GETPROCADDRESS): Define.
7365 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7366 (winapi_DebugSetProcessKillOnExit): Likewise.
7367 (win32_create_inferior): Force usage of ansi CreateProcessA.
7368 (win32_attach): Use GETPROCADDRESS.
7369 (win32_detach): Likewise.
7371 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7373 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7375 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7377 * win32-low.c: Commit leftover changes from 2007-03-29.
7379 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7381 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7382 fields short instead of int. Add explicit padding.
7383 (i387_cache_to_fsave): Remove unnecessary casts.
7384 (i387_fsave_to_cache): Doc fix.
7385 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7387 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7389 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7390 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7392 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7394 * configure.srv (arm*-*-mingw32ce*): Move near the other
7397 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7399 * configure.ac: Add errno checking.
7400 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7401 sys/file.h and malloc.h.
7402 (AC_CHECK_DECLS): Add perror.
7403 (srv_mingwce): Handle.
7404 * configure.srv (i[34567]86-*-cygwin*): Add
7405 win32-i386-low.o to srv_tgtobj.
7406 (i[34567]86-*-mingw*): Likewise.
7407 (arm*-*-mingw32ce*): Add case.
7408 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7409 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7410 [__MINGW32CE__] (strerror): New function.
7411 [__MINGW32CE__] (errno): Define to GetLastError.
7412 [__MINGW32CE__] (COUNTOF): New macro.
7413 (remote_open): Remove extra close call.
7414 * mem-break.c (delete_breakpoint_at): New function.
7415 * mem-break.h (delete_breakpoint_at): Declare.
7416 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7417 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7418 [USE_WIN32API] (read, write): Add char* casts.
7419 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7420 * server.h: Include wincecompat.h on Windows CE.
7421 [HAVE_ERRNO_H]: Check.
7422 (perror): Declare if not declared.
7423 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7424 (perror_with_name): Remove errno declaration.
7425 * wincecompat.h: New.
7426 * wincecompat.c: New.
7428 * win32-arm-low.c: New.
7429 * win32-i386-low.c: New.
7430 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7431 (OUTMSG2): Make it safe.
7433 (COUNTOF): New macro.
7434 (NUM_REGS): Get it from the low target.
7435 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7436 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7437 (thread_rec): Let low target handle debug registers.
7438 (child_add_thread): Likewise.
7439 (child_init_thread_list): Likewise.
7440 (continue_one_thread): Likewise.
7442 (do_child_fetch_inferior_registers): Move to ...
7443 * win32-i386-low.c: ... here, and rename to ...
7444 (do_fetch_inferior_registers): ... this.
7445 * win32-low.c (child_fetch_inferior_registers):
7446 Go through the low target.
7447 (do_child_store_inferior_registers): Use regptr.
7448 (strwinerror): New function.
7449 (win32_create_inferior): Handle Windows CE.
7450 Use strwinerror instead of strerror on Windows error
7451 codes. Add program to the error output.
7452 Don't close the main thread handle on Windows CE.
7453 (win32_attach): Use coredll.dll on Windows CE.
7454 (win32_kill): Close current process and current
7456 (win32_detach): Use coredll.dll on Windows CE.
7457 (win32_resume): Let low target handle debug registers, and
7459 (handle_exception): Add/Remove initial breakpoint. Avoid
7460 non-existant WSTOPSIG on Windows CE.
7461 (win32_read_inferior_memory): Cast to remove warning.
7462 (win32_arch_string): Go through the low target.
7463 (initialize_low): Call set_breakpoint_data with the low
7464 target's breakpoint.
7465 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7466 FOP_REGNUM, mappings): Move to ...
7467 * win32-i386-low.c: ... here.
7468 * win32-low.c (win32_thread_info): Move to ...
7469 * win32-low.h: ... here.
7470 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7471 win32-arm-low.c and wincecompat.c.
7472 (all:): Add $EXEEXT.
7473 (install-only:): Likewise.
7474 (gdbserver:): Likewise.
7475 (gdbreplay:): Likewise.
7476 * config.in: Regenerate.
7477 * configure: Regenerate.
7479 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7481 * win32-low.c: Rename typedef thread_info to
7482 win32_thread_info throughout.
7484 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7486 * win32-i386-low.c: Rename to ...
7487 * win32-low.c: ... this.
7488 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7489 * Makefile.in: Likewise.
7491 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7493 * remote-utils.c (monitor_output): Constify msg parameter.
7494 * server.h (monitor_output): Likewise.
7495 * win32-i386-low.c (handle_output_debug_string): New.
7496 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7497 handle_output_debug_string.
7498 (get_child_debug_event): Likewise.
7500 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7502 * server.c (main): Correct strtoul check.
7504 2007-03-27 Jon Ringle <jon@ringle.org>
7506 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7508 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7510 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7512 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7514 * terminal.h: Check HAVE_SGTTY_H.
7516 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
7518 * remote-utils.c (remote_open): Print out the assigned port number.
7520 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7522 * remote-utils.c (monitor_output): New function.
7523 * server.c (debug_threads): Define here.
7524 (monitor_show_help): New function.
7525 (handle_query): Handle qRcmd.
7526 (main): Do not handle 'd' packet.
7527 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7528 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7531 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7533 * Makefile.in (EXEEXT): New.
7534 (clean): Use $(EXEEXT).
7536 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7538 * target.h (target_ops): Rename send_signal to request_interrupt,
7539 and remove enum target_signal parameter.
7540 * linux-low.c (linux_request_interrupt): Rename from
7541 linux_send_signal, and always send SIGINT.
7542 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7543 and always send SIGINT.
7544 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7546 (input_interrupt): Likewise.
7548 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7550 * server.c (get_features_xml): Check if target implemented
7552 * win32-i386-low.c (win32_arch_string): New.
7553 (win32_target_ops): Add win32_arch_string as arch_string member.
7555 2007-02-22 Markus Deuling <deuling@de.ibm.com>
7557 * spu-low.c (spu_arch_string): New.
7558 (spu_target_ops): Add spu_arch_string.
7560 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7562 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7563 * configure.ac: Do not check for terminal.h.
7564 * configure, config.in: Regenerated.
7566 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7568 * Makefile.in (OBS): Add $(XML_BUILTIN).
7569 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7571 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7572 (arm-with-iwmmxt.c): New.
7573 * config.in, configure: Regenerate.
7574 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7575 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7576 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7577 (arm*-*-linux*): Add iWMMXt and regset support.
7578 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7579 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7580 (arm_store_wmmxregset, target_regsets): New.
7581 * server.c (get_features_xml): Take annex argument. Check builtin
7583 (handle_query): Handle multiple annexes.
7585 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7587 * remote-utils.c [USE_WIN32API] (read, write): Define.
7588 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7591 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7593 * linux-i386-low.c (the_low_target): Set arch_string.
7594 * linux-x86-64-low.c (the_low_target): Likewise.
7595 * linux-low.c (linux_arch_string): New.
7596 (linux_target_ops): Add it.
7597 * linux-low.h (struct linux_target_ops): Add arch_string.
7598 * server.c (write_qxfer_response): Use const void * for DATA.
7599 (get_features_xml): New.
7600 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7601 * target.h (struct target_ops): Add arch_string method.
7603 2007-01-03 Denis Pilat <denis.pilat@st.com>
7604 Daniel Jacobowitz <dan@codesourcery.com>
7606 * linux-low.c (linux_kill): Handle being called with no threads.
7607 * win32-i386-low.c (win32_kill): Likewise.
7608 (get_child_debug_event): Clear current_process_handle.
7610 2006-12-30 Denis PILAT <denis.pilat@st.com>
7611 Daniel Jacobowitz <dan@codesourcery.com>
7613 * remote-utils.c (remote_open): Check the type of specified
7614 serial port devices before opening them.
7615 * server.c (main): Kill the inferior if an error occurs during
7616 the first remote_open.
7618 2006-12-05 Markus Deuling <deuling@de.ibm.com>
7620 * README: Update supported targets.
7622 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7624 * Makefile.in (clean): Remove reg-mips64.c.
7625 (reg-mips64.c, reg-mips64.o): New rules.
7626 * configure.srv: Handle mips64. Include regset support for mips.
7627 * linux-mips-low.c (union mips_register): New.
7628 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7629 (mips_breakpoint, mips_breakpoint_at): Use int.
7630 (mips_collect_register, mips_supply_register)
7631 (mips_collect_register_32bit, mips_supply_register_32bit)
7632 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7633 (mips_store_fpregset, target_regsets): New.
7634 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7636 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7638 * configure.srv: Add target "spu*-*-*".
7639 * Makefile.in (clean): Remove reg-spu.c.
7640 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7641 * spu-low.c: New file.
7643 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7645 * configure.ac: Correct td_thr_tls_get_addr test.
7646 * configure: Regenerated.
7648 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7650 * linux-low.c (linux_wait_for_event): Reformat. Use the
7652 * remote-utils.c (decode_address_to_semicolon): New.
7653 * server.c (pass_signals, handle_general_set): New.
7654 (handle_query): Mention QPassSignals for qSupported.
7655 (main): Call handle_general_set.
7656 * server.h (pass_signals, decode_address_to_semicolon): New.
7658 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7660 * server.c (handle_query): Correct error handling for read_auxv.
7662 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7664 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7665 and srv_linux_thread_db to yes.
7666 * linux-s390-low.c (s390_fill_gregset): New function.
7667 (target_regsets): Define data structure.
7669 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7671 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7672 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7673 * config.in, configure: Regenerated.
7674 * inferiors.c (gdb_id_to_thread): New function.
7675 (gdb_id_to_thread_id): Use it.
7676 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7677 * linux-low.h (struct process_info): Add th member.
7678 (thread_db_get_tls_address): New prototype.
7679 * remote-utils.c (decode_address): Make non-static.
7680 * server.c (handle_query): Handle qGetTLSAddr.
7681 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7682 * target.h (struct target_ops): Add get_tls_address.
7683 * thread-db.c (maybe_attach_thread): Save the thread handle.
7684 (thread_db_get_tls_address): New.
7686 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7688 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7689 (linux_resume_one_process): Take a siginfo_t *. Update all
7690 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7691 (struct pending_signals): Add a siginfo_t.
7692 (linux_wait_for_process): Always set last_status.
7693 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7694 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7695 * linux-low.h (struct process_info): Add last_status.
7697 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7699 * remote-utils.c (try_rle): New function.
7700 (putpkt_binary): Use it.
7702 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7704 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7705 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7706 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7707 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7708 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7711 2006-08-08 Richard Sandiford <richard@codesourcery.com>
7713 * server.c (terminal_fd): New variable.
7714 (old_foreground_pgrp): Likewise.
7715 (restore_old_foreground_pgrp): New function.
7716 (start_inferior): Record the terminal file descriptor in terminal_fd
7717 and its original foreground group in old_foreground_pgrp. Register
7718 restore_old_foreground_pgrp with atexit().
7720 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
7722 * server.c (handle_query): Correct qPart to qXfer.
7724 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
7726 * configure.ac: Check for more headers which are missing on
7727 Windows. Automatically supply -lwsock32 and USE_WIN32API.
7728 * configure.srv: Add Cygwin and mingw32.
7729 * remote-utils.c: Don't include headers unconditionally which
7730 are missing on mingw32. Include <winsock.h> for mingw32.
7731 (remote_open): Adjust for mingw32 support. Flush
7732 standard error after writing to it.
7733 (remote_close, putpkt_binary, input_interrupt, block_async_io)
7734 (unblock_async_io, enable_async_io, disable_async_io)
7735 (readchar, getpkt): Update for Winsock support.
7736 (prepare_resume_reply): Expect a protocol signal number.
7737 * server.c: Disable <sys/wait.h> on mingw32.
7738 (start_inferior): Adjust for mingw32 support. Flush
7739 standard error after writing to it.
7740 (attach_inferior): Likewise. Use protocol signal
7742 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
7744 * win32-i386-low.c: New file.
7745 * Makefile.in (XM_CLIBS): Set.
7746 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
7747 (win32-i386-low.o): New dependency rule.
7748 * linux-low.c (linux_wait): Use target signal numbers.
7749 * target.h (struct target_ops): Doc fix.
7750 * server.h (target_signal_to_name): New prototype.
7751 * gdbreplay.c: Don't include headers unconditionally which
7752 are missing on mingw32. Include <winsock.h> for mingw32.
7753 (remote_close, remote_open): Adjust for Winsock support.
7754 * configure, config.in: Regenerated.
7756 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7758 * server.c (decode_xfer_read, write_qxfer_response): New.
7759 (handle_query): Take a packet length argument. Handle
7760 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
7761 the qSupported response.
7762 (main): Update call to handle_query.
7764 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
7766 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
7767 (putpkt_binary): Renamed from putpkt and adjusted for binary
7769 (putpkt): New wrapper for putpkt_binary.
7770 (readchar): Don't mask off the high bit.
7771 (decode_X_packet): New function.
7772 * server.c (main): Call putpkt_binary if a handler sets the packet
7773 length. Save the length of the incoming packet. Handle 'X'.
7774 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
7776 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
7778 * server.c (handle_query): Handle qSupported.
7780 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7782 * remote-utils.c (all_symbols_looked_up): New variable.
7783 (look_up_one_symbol): Check it.
7784 * server.h (look_up_one_symbol): New declaration.
7785 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
7787 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
7789 * Makefile.in (linux-arm-low.o): Update dependencies.
7790 * linux-arm-low.c: Include "gdb_proc_service.h".
7791 (PTRACE_GET_THREAD_AREA): Define.
7792 (ps_get_thread_area): New function.
7794 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
7796 * configure.srv (m68k*-*-uclinux*): New target.
7797 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
7798 (linux_resume_one_process): Remove extraneous cast.
7799 (linux_read_offsets): New.
7800 (linux_target_op): Add linux_read_offsets on mmuless systems.
7801 * server.c (handle_query): Add qOffsets logic.
7802 * target.h (struct target_ops): Add read_offsets.
7804 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7806 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
7807 (PTRACE_GET_THREAD_AREA): Define.
7808 (ps_get_thread_area): New function.
7809 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
7810 (linux-x86-64-low.o): Update.
7812 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
7814 * configure.ac: Remove checks for prfpregset_t.
7815 * gdb_proc_service.h: New file.
7816 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
7817 new "gdb_proc_service.h".
7818 * proc-service.c: Likewise.
7819 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
7820 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
7821 * Makefile.in (gdb_proc_service_h): Updated.
7822 * configure, config.in: Regenerated.
7824 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7826 * remote-utils.c (prepare_resume_reply): Move declaration
7827 of gdb_id_from_wait to the top of the block.
7829 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
7831 * linux-low.c (regsets_store_inferior_registers): Read the regset
7832 from the target before filling it.
7834 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7836 * server.c (attach_inferior): Return SIGTRAP for a successful
7839 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7841 * Makefile.in (OBS): Add version.o.
7842 (STAGESTUFF): Delete.
7843 (version.o): Add dependencies.
7844 (version.c): Replace rule.
7845 (clean): Remove version.c.
7846 * server.c (gdbserver_version): New.
7847 (gdbserver_usage): Use printf.
7848 (main): Handle --version and --help.
7849 * server.h (version, host_name): Add declarations.
7851 2005-12-23 Eli Zaretskii <eliz@gnu.org>
7863 * linux-x86-64-low.c:
7866 * linux-ppc64-low.c:
7875 * linux-crisv32-low.c:
7887 * gdbserver.1: Add (C) after Copyright. Update the FSF
7890 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
7892 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
7893 (arm_breakpoint_at): Recognize both breakpoints.
7894 (the_low_target): Use the correct breakpoint instruction.
7896 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
7898 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
7899 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
7900 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
7901 (the_low_target): Update.
7903 2005-10-25 Andreas Schwab <schwab@suse.de>
7905 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
7907 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
7908 (ia64_num_regs): Reduce to 462.
7910 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
7912 * acinclude.m4: Correct quoting.
7913 * aclocal.m4: Regenerated.
7915 Suggested by SZOKOVACS Robert <szo@ies.hu>:
7916 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
7917 (thread_db_init): Call thread_db_err_str.
7918 * configure.ac: Check for TD_VERSION.
7919 * config.in, configure: Regenerated.
7921 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7923 * server.h (error, fatal, warning): Add ATTR_FORMAT.
7925 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7927 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
7928 is not available. Define HAVE_PTRACE_GETREGS if it is.
7929 * config.in, configure: Regenerated.
7930 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
7931 * linux-i386-low.c, linux-m68k-low.c: Update to use
7932 HAVE_PTRACE_GETREGS.
7933 * linux-low.c (regsets_fetch_inferior_registers)
7934 (regsets_store_inferior_registers): Only return 0 if we processed
7936 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
7937 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
7939 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7941 * inferiors.c (struct thread_info): Add gdb_id.
7942 (add_thread): Add gdb_id argument.
7943 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
7944 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
7945 calls to add_thread.
7946 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
7947 * server.c (handle_query): Use thread_to_gdb_id.
7948 (handle_v_cont, main): Use gdb_id_to_thread_id.
7949 * server.h (add_thread): Update prototype.
7950 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
7953 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
7955 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
7956 left-padded registers.
7957 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
7958 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
7960 2005-07-01 Steve Ellcey <sje@cup.hp.com>
7962 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
7963 * configure: Regenerate.
7964 * config.in: Regenerate.
7965 * server.h (NEED_DECLARATION_STRERROR):
7966 Replace with !HAVE_DECL_STRERROR.
7968 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
7970 * linux-low.c (linux_wait, linux_send_signal): Don't test
7971 an unsigned long variable for > 0 if it could be MAX_ULONG.
7972 * server.c (myresume): Likewise.
7973 * target.c (set_desired_inferior): Likewise.
7975 2005-06-13 Mark Kettenis <kettenis@gnu.org>
7977 * configure.ac: Simplify and improve check for socklen_t.
7978 * configure, config.in: Regenerate.
7980 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
7982 * acconfig.h: Remove.
7983 * configure.ac: Add a test for socklen_t. Use three-argument
7984 AC_DEFINE throughout.
7985 * config.in: Regenerated using autoheader 2.59.
7986 * configure: Regenerated.
7988 * gdbreplay.c (socklen_t): Provide a default.
7989 (remote_open): Use socklen_t.
7990 * remote-utils.c (socklen_t): Provide a default.
7991 (remote_open): Use socklen_t.
7992 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
7995 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
7997 * linux-low.c (linux_read_memory, linux_write_memory)
7998 (linux_read_auxv): Likewise.
7999 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8000 (check_mem_write): Likewise.
8001 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8003 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8004 (registers_from_string, register_data): Likewise.
8005 * server.c (handle_query, main): Likewise.
8006 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8007 (decode_M_packet): Likewise.
8008 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8009 * target.h (struct target_ops): Update read_memory, write_memory,
8011 (read_inferior_memory, write_inferior_memory): Update.
8012 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8014 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8015 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8016 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8017 linux-s390-low.c, linux-sh-low.c: Update for changes in
8018 read_inferior_memory and the_low_target->breakpoint.
8020 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8022 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8023 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8024 * configure.srv: Add powerpc64-*-linux*.
8025 * linux-ppc64-low.c: New file.
8027 2005-05-23 Orjan Friberg <orjanf@axis.com>
8029 * linux-cris-low.c: New file with support for CRIS.
8030 * linux-crisv32-low.c: Ditto for CRISv32.
8031 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8032 (clean): Add reg-cris.c and reg-crisv32.c.
8033 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
8034 reg-crisv32.o, and reg-crisv32.c to make rules.
8035 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8038 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8040 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8041 of sizeof (PTRACE_XFER_TYPE).
8042 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8044 2005-05-12 Orjan Friberg <orjanf@axis.com>
8046 * target.h (struct target_ops): Add insert_watchpoint,
8047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8048 pointers for hardware watchpoint support.
8049 * linux-low.h (struct linux_target_ops): Ditto.
8050 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8051 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8052 to linux_target_ops.
8053 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8055 * server.c (main): Recognize 'Z' and 'z' packets.
8057 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8059 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8060 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8061 (the_low_target): Add new members.
8063 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8065 * proc-service.c (ps_lgetregs): Search all_processes instead of
8068 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8070 * server.c (start_inferior): Change return type to int.
8071 (attach_inferior): Change sigptr to int *.
8072 (handle_v_cont, handle_v_requests): Change signal to int *.
8073 (main): Change signal to int.
8075 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
8077 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8078 * configure.srv: Add m32r*-*-linux*.
8079 * linux-m32r-low.c: New file.
8081 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8083 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8085 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8087 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8088 Take unsigned long arguments for PIDs.
8089 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8090 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8091 (wait_for_sigstop, linux_resume_one_process)
8092 (regsets_fetch_inferior_registers, linux_send_signal)
8093 (linux_read_auxv): Likewise. Update the types of variables holding
8094 PIDs. Update format string specifiers.
8095 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8096 * remote-utils.c (prepare_resume_reply): Likewise.
8097 * server.c (cont_thread, general_thread, step_thread)
8098 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8100 (handle_query): Update format specifiers.
8101 (handle_v_cont, main): Use strtoul for thread IDs.
8102 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8103 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8104 (general_thread, step_thread, thread_from_wait)
8105 (old_thread_from_wait): Update.
8106 * target.h (struct thread_resume): Use unsigned long for THREAD.
8107 (struct target_ops): Use unsigned long for arguments to attach and
8110 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8112 * acinclude.m4: Include bfd/bfd.m4 directly.
8113 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8114 <agriffis@toolchain.org>.
8115 * aclocal.m4, configure: Regenerated.
8117 2005-01-07 Andrew Cagney <cagney@gnu.org>
8119 * configure.ac: Rename configure.in, require autoconf 2.59.
8120 * configure: Re-generate.
8122 2004-12-08 Daniel Jacobowitz <dan@debian.org>
8124 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8126 * aclocal.m4: Regenerated.
8127 * configure: Regenerated.
8129 2004-11-21 Andreas Schwab <schwab@suse.de>
8131 * linux-m68k-low.c (m68k_num_gregs): Define.
8132 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8133 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8134 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8135 (m68k_breakpoint_at): New. Add to the_low_target.
8137 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8138 srv_linux_thread_db to yes.
8140 2004-10-20 Joel Brobecker <brobecker@gnat.com>
8142 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8143 (ARCH_SET_FS): Likewise.
8144 (ARCH_GET_FS): Likewise.
8145 (ARCH_GET_GS): Likewise.
8147 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8149 * linux-i386-low.c (ps_get_thread_area): New.
8150 * linux-x86-64-low.c (ps_get_thread_area): New.
8151 * linux-low.c: Include <sys/syscall.h>.
8152 (linux_kill_one_process): Don't kill the first thread here.
8153 (linux_kill): Kill the first thread here.
8154 (kill_lwp): New function.
8155 (send_sigstop, linux_send_signal): Use it.
8156 * proc-service.c: Clean up #ifdefs.
8157 (fpregset_info): Delete.
8158 (ps_lgetregs): Update and enable implementation.
8159 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8161 * remote-utils.c (struct sym_cache, symbol_cache): New.
8162 (input_interrupt): Print a clearer message.
8163 (async_io_enabled): New variable.
8164 (enable_async_io, disable_async_io): Use it. Update comments.
8165 (look_up_one_symbol): Use the symbol cache.
8166 * thread-db.c (thread_db_look_up_symbols): New function.
8167 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8169 2004-10-16 Daniel Jacobowitz <dan@debian.org>
8171 * configure.in: Test for -rdynamic.
8172 * configure: Regenerated.
8173 * Makefile (INTERNAL_LDFLAGS): New.
8174 (gdbserver, gdbreplay): Use it.
8176 2004-09-02 Andrew Cagney <cagney@gnu.org>
8178 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8180 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
8182 * linux-low.c (linux_wait): Clear all_processes list also.
8184 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8186 * linux-low.c: Include <errno.h>. Remove extern declaration of
8189 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
8191 * gdbreplay.c, server.h, utils.c: Update copyright years.
8193 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8195 * server.c (main): Print child status or termination signal from
8196 variable 'signal', not 'sig'.
8198 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8200 * linux-low.c (linux_read_memory): Change return type to
8201 int. Check for and return error from ptrace().
8202 * target.c (read_inferior_memory): Change return type to int. Pass
8203 back return status from the_target->read_memory().
8204 * target.h (struct target_ops): Adapt *read_memory() prototype.
8206 (read_inferior_memory): Adapt prototype.
8207 * server.c (main): Return an error packet if
8208 read_inferior_memory() returns an error.
8210 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
8212 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8213 Unify with other clean targets.
8215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8217 * server.c (handle_v_cont): Call set_desired_inferior.
8219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8221 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8225 * linux-low.c (linux_wait): Unblock async I/O.
8226 (linux_resume): Block and enable async I/O.
8227 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8228 * server.h (block_async_io, unblock_async_io): Add prototypes.
8230 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8232 * remote-utils.c (remote_open): Print a status notice after
8234 * server.c (attach_inferior): Print a status notice after
8237 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
8239 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8241 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
8243 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8245 * server.c, target.h: Update copyright years.
8247 2004-02-25 Roland McGrath <roland@redhat.com>
8249 * target.h (struct target_ops): New member `read_auxv'.
8250 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8251 * linux-low.c (linux_read_auxv): New function.
8252 (linux_target_ops): Initialize `read_auxv' member to that.
8254 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8256 Committed by Jim Blandy <jimb@redhat.com>.
8258 * linux-s390-low.c (s390_num_regs): Update.
8259 (s390_regmap): Remove control registers. Use __s390x__ predefine
8260 instead of GPR_SIZE to distiguish s390 and s390x targets.
8262 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
8264 * linux-low.c: Update copyright year.
8265 (check_removed_breakpoint): Clear pending_is_breakpoint.
8266 (linux_set_resume_request, linux_queue_one_thread)
8267 (resume_status_pending_p): New functions.
8268 (linux_continue_one_thread): Use process->resume.
8269 (linux_resume): Only resume threads if there are no pending events.
8270 * linux-low.h (struct process_info): Add resume request
8273 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
8275 * regcache.c (new_register_cache): Clear the allocated register
8276 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8278 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
8280 * linux-low.c (linux_resume): Take a struct thread_resume *
8282 (linux_wait): Update call.
8283 (resume_ptr): New static variable.
8284 (linux_continue_one_thread): Renamed from
8285 linux_continue_one_process. Use resume_ptr.
8286 (linux_resume): Use linux_continue_one_thread.
8287 * server.c (handle_v_cont, handle_v_requests): New functions.
8288 (myresume): New function.
8289 (main): Handle 'v' case.
8290 * target.h (struct thread_resume): New type.
8291 (struct target_ops): Change argument of "resume" to struct
8293 (myresume): Delete macro.
8295 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8297 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8298 (uninstall): Support DESTDIR.
8300 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8302 * configure.srv: Add xscale*linux copy of arm*linux entry.
8304 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
8306 * linux-arm-low.c (arm_reinsert_addr): New function.
8307 (the_low_target): Add arm_reinsert_addr.
8309 2003-07-08 Mark Kettenis <kettenis@gnu.org>
8311 * mem-break.c: Remove whitespace at end of file.
8313 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8315 * configure.in: Check whether we need to prototype strerror.
8316 * server.h: Optionally prototype strerror.
8317 * gdbreplay.c (perror_with_name): Use strerror.
8318 * linux-low.c (linux_attach_lwp): Use strerror.
8319 * utils.c (perror_with_name): Use strerror.
8320 * config.in, configure: Regenerated.
8322 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
8324 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8325 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8327 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
8329 * Makefile.in (SFILES): Update.
8330 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8331 low-sun3.c: Remove files.
8333 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
8335 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8336 (linux_detach_one_process, linux_detach): New functions.
8337 (linux_target_ops): Add linux_detach.
8338 * server.c (main): Handle 'D' packet.
8339 * target.h (struct target_ops): Add "detach" member.
8340 (detach_inferior): Define.
8342 2003-06-13 Mark Kettenis <kettenis@gnu.org>
8344 From Kelley Cook <kelleycook@wideopenwest.com>:
8345 * configure.srv: Accept i[34567]86 variants.
8347 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
8349 * linux-low.c (linux_wait_for_event): Correct comment typos.
8350 (linux_resume_one_process): Call check_removed_breakpoint.
8351 (linux_send_signal): New function.
8352 (linux_target_ops): Add linux_send_signal.
8353 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8355 * target.h (struct target_ops): Add send_signal.
8357 2003-05-29 Jim Blandy <jimb@redhat.com>
8359 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8360 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8361 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8362 away part of the register's value.
8364 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
8366 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8367 (linux_wait_for_event, linux_init_signals): Likewise.
8369 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
8371 * configure.in: Check for stdlib.h.
8372 * configure: Regenerated.
8373 * config.in: Regenerated.
8375 2003-01-04 Andreas Schwab <schwab@suse.de>
8377 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8379 2003-01-02 Andrew Cagney <ac131313@redhat.com>
8381 * Makefile.in: Remove obsolete code.
8383 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
8385 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8386 defined(PT_FPR0_HI).
8388 2002-11-17 Stuart Hughes <seh@zee2.com>
8390 * linux-arm-low.c (arm_num_regs): Increase.
8391 (arm_regmap): Include status register.
8393 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
8395 * linux-low.c (register_addr): Remove incorrect -1 check.
8397 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
8399 * linux-low.c (linux_create_inferior): Call setpgid. Return
8401 (unstopped_p, linux_signal_pid): Remove.
8402 (linux_target_ops): Remove linux_signal_pid.
8403 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8404 global instead of target method.
8405 * target.h (struct target_ops): Remove signal_pid. Update comment
8406 for create_inferior.
8407 * server.c (signal_pid): New variable.
8408 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
8409 gdbserver. Set the child to be the foreground process group.
8410 (attach_inferior): Set signal_pid.
8412 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
8414 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8416 2002-08-20 Jim Blandy <jimb@redhat.com>
8418 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8421 2002-08-01 Andrew Cagney <cagney@redhat.com>
8423 * Makefile.in: Make chill references obsolete.
8425 2002-07-24 Kevin Buettner <kevinb@redhat.com>
8427 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8428 * configure: Regenerate.
8429 * config.in: Regenerate.
8431 2002-07-09 David O'Brien <obrien@FreeBSD.org>
8433 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8434 (perror_with_name, remote_close, remote_open, expect, play): Static.
8436 2002-07-04 Michal Ludvig <mludvig@suse.cz>
8438 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
8439 byte offsets instead of an array of indexes.
8440 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8442 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
8444 * regcache.c: Add comment.
8446 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
8448 * thread-db.c: New file.
8449 * proc-service.c: New file.
8450 * acinclude.m4: New file.
8451 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8452 proc-service.o, and thread-db.o.
8453 (linux-low.o): Add USE_THREAD_DB.
8454 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8455 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8456 * aclocal.m4: Regenerated.
8457 * config.in: Regenerated.
8458 * configure: Regenerated.
8459 * configure.in: Check for proc_service.h, sys/procfs.h,
8460 thread_db.h, and linux/elf.h headrs.
8461 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8462 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8463 Check for -lthread_db and thread support.
8464 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8465 PowerPC, and SuperH.
8466 * i387-fp.c: Constify arguments.
8467 * i387-fp.h: Likewise.
8468 * inferiors.c: (struct thread_info): Renamed from
8469 `struct inferior_info'. Remove PID member. Use generic inferior
8470 list header. All uses updated.
8471 (inferiors, signal_pid): Removed.
8472 (all_threads): New variable.
8473 (get_thread): Define.
8474 (add_inferior_to_list): New function.
8475 (for_each_inferior): New function.
8476 (change_inferior_id): New function.
8477 (add_inferior): Removed.
8478 (remove_inferior): New function.
8479 (add_thread): New function.
8480 (free_one_thread): New function.
8481 (remove_thread): New function.
8482 (clear_inferiors): Use for_each_inferior and free_one_thread.
8483 (find_inferior): New function.
8484 (find_inferior_id): New function.
8485 (inferior_target_data): Update argument type.
8486 (set_inferior_target_data): Likewise.
8487 (inferior_regcache_data): Likewise.
8488 (set_inferior_regcache_data): Likewise.
8489 * linux-low.c (linux_bp_reinsert): Remove.
8490 (all_processes, stopping_threads, using_thrads)
8491 (struct pending_signals, debug_threads, pid_of): New.
8492 (inferior_pid): Replace with macro.
8493 (struct inferior_linux_data): Remove.
8494 (get_stop_pc, add_process): New functions.
8495 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8496 Use add_process and add_thread.
8497 (linux_attach_lwp): New function, based on old linux_attach. Use
8498 add_process and add_thread. Set stop_expected for new threads.
8499 (linux_attach): New function.
8500 (linux_kill_one_process): New function.
8501 (linux_kill): Kill all LWPs.
8502 (linux_thread_alive): Use find_inferior_id.
8503 (check_removed_breakpoints, status_pending_p): New functions.
8504 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8505 Update. Use WNOHANG. Wait for cloned processes also. Update process
8506 struct for the found process.
8507 (linux_wait_for_event): New function.
8508 (linux_wait): Use it. Support LWPs.
8509 (send_sigstop, wait_for_sigstop, stop_all_processes)
8510 (linux_resume_one_process, linux_continue_one_process): New functions.
8511 (linux_resume): Support LWPs.
8512 (REGISTER_RAW_SIZE): Remove.
8513 (fetch_register): Use register_size instead. Call supply_register.
8514 (usr_store_inferior_registers): Likewise. Call collect_register.
8516 (regsets_fetch_inferior_registers): Improve error message.
8517 (regsets_store_inferior_registers): Add debugging.
8518 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8519 (unstopped_p, linux_signal_pid): New functions.
8520 (linux_target_ops): Add linux_signal_pid.
8521 (linux_init_signals): New function.
8522 (initialize_low): Call it. Initialize using_threads.
8523 * regcache.c (inferior_regcache_data): Add valid
8525 (get_regcache): Fetch registers lazily. Add fetch argument
8526 and update all callers.
8527 (regcache_invalidate_one, regcache_invalidate): New
8529 (new_register_cache): Renamed from create_register_cache.
8530 Return the new regcache.
8531 (free_register_cache): Change argument to a void *.
8532 (registers_to_string, registers_from_string): Call get_regcache
8533 with fetch flag set.
8534 (register_data): Make static. Pass fetch flag to get_regcache.
8535 (supply_register): Call get_regcache with fetch flag clear.
8536 (collect_register): Call get_regcache with fetch flag set.
8537 (collect_register_as_string): New function.
8538 * regcache.h: Update.
8539 * remote-utils.c (putpkt): Flush after debug output and use
8541 Handle input interrupts while waiting for an ACK.
8542 (input_interrupt): Use signal_pid method.
8543 (getpkt): Flush after debug output and use stderr.
8544 (outreg): Use collect_register_as_string.
8545 (new_thread_notify, dead_thread_notify): New functions.
8546 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8548 (look_up_one_symbol): Flush after debug output.
8549 * server.c (step_thread, server_waiting): New variables.
8550 (start_inferior): Don't use signal_pid. Update call to mywait.
8551 (attach_inferior): Update call to mywait.
8552 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8553 (main): Don't fetch/store registers explicitly. Use
8554 set_desired_inferior. Support proposed ``Hs'' packet. Update
8557 (struct inferior_list, struct_inferior_list_entry): New.
8558 * target.c (set_desired_inferior): New.
8559 (write_inferior_memory): Constify.
8560 (mywait): New function.
8562 (struct target_ops): New signal_pid method.
8563 (mywait): Removed macro, added prototype.
8565 * linux-low.h (regset_func): Removed.
8566 (regset_fill_func, regset_store_func): New.
8567 (enum regset_type): New.
8568 (struct regset_info): Add type field. Use new operation types.
8569 (struct linux_target_ops): stop_pc renamed to get_pc.
8570 Add decr_pc_after_break and breakpoint_at.
8571 (get_process, get_thread_proess, get_process_thread)
8572 (strut process_info, all_processes, linux_attach_lwp)
8573 (thread_db_init): New.
8575 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8576 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8577 (the_low_target): Add new members.
8578 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8579 (i386_store_fpxregset): Constify.
8580 (target_regsets): Add new kind identifier.
8581 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8582 (i386_set_pc): Add debugging.
8583 (i386_breakpoint_at): New function.
8584 (the_low_target): Add new members.
8585 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8586 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8587 (mips_breakpoint_at): New.
8588 (the_low_target): Add new members.
8589 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8590 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8591 (the_low_target): Add new members.
8592 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8593 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8594 (the_low_target): Add new members.
8595 * linux-x86-64-low.c (target_regsets): Add new kind
8598 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
8600 From Martin Pool <mbp@samba.org>:
8601 * server.c (gdbserver_usage): New function.
8604 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
8606 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8609 2002-05-04 Andrew Cagney <ac131313@redhat.com>
8611 * Makefile.in: Remove obsolete code.
8613 2002-04-24 Michal Ludvig <mludvig@suse.cz>
8615 * linux-low.c (regsets_fetch_inferior_registers),
8616 (regsets_store_inferior_registers): Removed cast to int from
8618 * regcache.h: Added declaration of struct inferior_info.
8620 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8622 * inferiors.c (struct inferior_info): Add regcache_data.
8623 (add_inferior): Call create_register_cache.
8624 (clear_inferiors): Call free_register_cache.
8625 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8626 * regcache.c (struct inferior_regcache_data): New.
8627 (registers): Remove.
8628 (get_regcache): New function.
8629 (create_register_cache, free_register_cache): New functions.
8630 (set_register_cache): Don't initialize the register cache here.
8631 (registers_to_string, registers_from_string, register_data): Call
8633 * regcache.h: Add prototypes.
8634 * server.h: Likewise.
8636 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
8638 * mem-break.c: New file.
8639 * mem-break.h: New file.
8640 * Makefile.in: Add mem-break.o rule; update server.h
8642 * inferiors.c (struct inferior_info): Add target_data
8644 (clear_inferiors): Free target_data member if set.
8645 (inferior_target_data, set_inferior_target_data): New functions.
8646 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8647 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8648 * linux-low.c (linux_bp_reinsert): New variable.
8649 (struct inferior_linux_data): New.
8650 (linux_create_inferior): Use set_inferior_target_data.
8651 (linux_attach): Likewise. Call add_inferior.
8652 (linux_wait_for_one_inferior): New function.
8653 (linux_wait): Call it.
8654 (linux_write_memory): Add const.
8655 (initialize_low): Call set_breakpoint_data.
8656 * linux-low.h (struct linux_target_ops): Add breakpoint
8658 * server.c (attach_inferior): Remove extra add_inferior
8660 * server.h: Include mem-break.h. Update inferior.c
8662 * target.c (read_inferior_memory)
8663 (write_inferior_memory): New functions.
8664 * target.h (read_inferior_memory)
8665 (write_inferior_memory): Change macros to prototypes.
8666 (struct target_ops): Update comments. Add const to write_memory
8669 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
8671 * linux-low.c (usr_store_inferior_registers): Support
8672 registers which are allowed to fail to store.
8673 * linux-low.h (linux_target_ops): Likewise.
8674 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8675 (ppc_cannot_store_register): FPSCR may not be storable.
8677 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8679 * server.h: Include <string.h> if HAVE_STRING_H.
8680 * ChangeLog: Correct paths in last ChangeLog entry.
8682 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8684 * linux-low.h: Remove obsolete prototypes.
8685 (struct linux_target_ops): New.
8686 (extern the_low_target): New.
8687 * linux-low.c (num_regs, regmap): Remove declarations.
8688 (register_addr): Use the_low_target explicitly.
8689 (fetch_register): Likewise.
8690 (usr_fetch_inferior_registers): Likewise.
8691 (usr_store_inferior_registers): Likewise.
8692 * linux-arm-low.c (num_regs): Remove.
8693 (arm_num_regs): Define.
8694 (arm_regmap): Renamed from regmap, made static.
8695 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8697 (arm_cannot_store_register): Renamed from cannot_store_register,
8699 (the_low_target): New.
8700 * linux-i386-low.c (num_regs): Remove.
8701 (i386_num_regs): Define.
8702 (i386_regmap): Renamed from regmap, made static.
8703 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8705 (i386_cannot_store_register): Renamed from cannot_store_register,
8707 (the_low_target): New.
8708 * linux-ia64-low.c (num_regs): Remove.
8709 (ia64_num_regs): Define.
8710 (ia64_regmap): Renamed from regmap, made static.
8711 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
8713 (ia64_cannot_store_register): Renamed from cannot_store_register,
8715 (the_low_target): New.
8716 * linux-m68k-low.c (num_regs): Remove.
8717 (m68k_num_regs): Define.
8718 (m68k_regmap): Renamed from regmap, made static.
8719 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
8721 (m68k_cannot_store_register): Renamed from cannot_store_register,
8723 (the_low_target): New.
8724 * linux-mips-low.c (num_regs): Remove.
8725 (mips_num_regs): Define.
8726 (mips_regmap): Renamed from regmap, made static.
8727 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
8729 (mips_cannot_store_register): Renamed from cannot_store_register,
8731 (the_low_target): New.
8732 * linux-ppc-low.c (num_regs): Remove.
8733 (ppc_num_regs): Define.
8734 (ppc_regmap): Renamed from regmap, made static.
8735 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
8737 (ppc_cannot_store_register): Renamed from cannot_store_register,
8739 (the_low_target): New.
8740 * linux-s390-low.c (num_regs): Remove.
8741 (s390_num_regs): Define.
8742 (s390_regmap): Renamed from regmap, made static.
8743 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
8745 (s390_cannot_store_register): Renamed from cannot_store_register,
8747 (the_low_target): New.
8748 * linux-sh-low.c (num_regs): Remove.
8749 (sh_num_regs): Define.
8750 (sh_regmap): Renamed from regmap, made static.
8751 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
8753 (sh_cannot_store_register): Renamed from cannot_store_register,
8755 (the_low_target): New.
8756 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
8757 (the_low_target): New.
8759 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8761 * Makefile.in: Add stamp-h target.
8762 * configure.in: Create stamp-h.
8763 * configure: Regenerated.
8765 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8767 * inferiors.c: New file.
8768 * target.c: New file.
8769 * target.h: New file.
8770 * Makefile.in: Add target.o and inferiors.o. Update
8772 * linux-low.c (inferior_pid): New static variable,
8773 moved from server.c.
8774 (linux_create_inferior): Renamed from create_inferior.
8775 Call add_inferior. Return 0 on success instead of a PID.
8776 (linux_attach): Renamed from myattach.
8777 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
8778 (linux_thread_alive): Renamed from mythread_alive.
8779 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
8781 (linux_resume): Renamed from myresume. Add missing ``return 0''.
8782 (regsets_store_inferior_registers): Correct error message.
8783 Add missing ``return 0''.
8784 (linux_fetch_registers): Renamed from fetch_inferior_registers.
8785 (linux_store_registers): Renamed from store_inferior_registers.
8786 (linux_read_memory): Renamed from read_inferior_memory.
8787 (linux_write_memory): Renamed from write_inferior_memory.
8788 (linux_target_ops): New structure.
8789 (initialize_low): Call set_target_ops ().
8790 * remote-utils.c (unhexify): New function.
8791 (hexify): New function.
8792 (input_interrupt): Send signals to ``signal_pid''.
8793 * server.c (inferior_pid): Remove.
8794 (start_inferior): Update create_inferior call.
8795 (attach_inferior): Call add_inferior.
8796 (handle_query): New function.
8797 (main): Call handle_query for `q' packets.
8798 * server.h: Include "target.h". Remove obsolete prototypes.
8799 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
8801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
8803 * Makefile.in: Add WARN_CFLAGS. Update configury
8805 * configure.in: Check for <string.h>
8806 * configure: Regenerate.
8807 * config.in: Regenerate.
8808 * gdbreplay.c: Include needed system headers.
8809 (remote_open): Remove strchr prototype.
8810 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
8811 * regcache.c (supply_register): Change buf argument to const void *.
8812 (supply_register_by_name): Likewise.
8813 (collect_register): Change buf argument to void *.
8814 (collect_register_by_name): Likewise.
8815 * regcache.h: Add missing prototypes.
8816 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
8817 * server.c (handle_query): New function.
8818 (attached): New static variable, moved out of main.
8819 (main): Quiet longjmp clobber warnings.
8820 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
8821 * utils.c (error): Remove NORETURN.